]> gcc.gnu.org Git - gcc.git/blame - gcc/c-family/ChangeLog
i386.h (HARD_REGNO_CALLER_SAVE_MODE): Apply HImode and QImode fixups to general and...
[gcc.git] / gcc / c-family / ChangeLog
CommitLineData
1ddca3f3
PC
12017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
2
3 Revert:
4 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
5
6 PR c++/71737
7 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
8
7d2f3f1d
PC
92017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
10
11 PR c++/71737
12 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
13
bce6f760
MS
142017-01-12 Martin Sebor <msebor@redhat.com>
15
16 (-Wformat-overflow): ...to this.
17
bf5fbf46
MS
182017-01-11 Martin Sebor <msebor@redhat.com>
19
20 PR c/78768
21 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
22 Also enable for LTO.
23
e363df3f
JM
242017-01-10 Jason Merrill <jason@redhat.com>
25
26 Implement P0195R2, C++17 variadic using.
27 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
28
bd2c6270
JJ
292017-01-09 Jakub Jelinek <jakub@redhat.com>
30
31 PR translation/79019
32 PR translation/79020
33 * c.opt (Wnormalized=): Fix typo in description.
34
efcc8d38
MS
352017-01-08 Martin Sebor <msebor@redhat.com>
36
37 PR middle-end/77708
38 * c.opt (-Wformat-truncation): New option.
39
435f3f7a
AO
402017-01-06 Alexandre Oliva <aoliva@redhat.com>
41
42 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
43 value to unsigned short to fit in 4 hex digits without
44 warnings.
45
4e89adf9
EB
462017-01-05 Eric Botcazou <ebotcazou@adacore.com>
47
48 * c.opt (fsso-struct): Add 'native' value.
49
cd445b54
ML
502017-01-05 Martin Liska <mliska@suse.cz>
51
52 PR pch/78970
53 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
54 header.
55
a9342885
MP
562017-01-04 Marek Polacek <polacek@redhat.com>
57
58 PR c++/64767
59 * c.opt (Wpointer-compare): New option.
60
fc73e60c
JJ
612017-01-04 Jakub Jelinek <jakub@redhat.com>
62
63 PR driver/78957
64 * c.opt (fsso-struct=): Add RejectNegative.
65
cbe34bb5
JJ
662017-01-01 Jakub Jelinek <jakub@redhat.com>
67
68 Update copyright years.
69
d4a6c0ea
ML
702016-12-29 Martin Liska <mliska@suse.cz>
71
72 PR c/78933
73 * c.opt (strong-eval-order): Add RejectNegative keyword.
74
67a5ad7c
JM
752016-12-22 Jason Merrill <jason@redhat.com>
76
77 Implement P0522R0, matching of template template arguments.
78 * c-cppbuiltin.c (c_cpp_builtins): Define
79 __cpp_template_template_args.
80
0dba7960
JJ
812016-12-21 Jakub Jelinek <jakub@redhat.com>
82
83 PR bootstrap/78817
84 * c-common.c (struct nonnull_arg_ctx): New type.
85 (check_function_nonnull): Return bool instead of void. Use
86 nonnull_arg_ctx as context rather than just location_t.
87 (check_nonnull_arg): Adjust for the new context type, set
88 warned_p to true if a warning has been diagnosed.
89 (check_function_arguments): Return bool instead of void.
90 * c-common.h (check_function_arguments): Adjust prototype.
91
31bfc9b9
JM
922016-12-21 Jason Merrill <jason@redhat.com>
93
94 * c.opt (-fnew-ttp-matching): New flag.
95 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
96
629b3d75
MJ
972016-12-14 Martin Jambor <mjambor@suse.cz>
98
99 * c-omp.c: Include omp-general.h instead of omp-low.h.
100 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
101 name.
102
474da67e
MS
1032016-12-14 Martin Sebor <msebor@redhat.com>
104
105 PR c/17308
106 * c-common.c (check_nonnull_arg): Disable when optimization
107 is enabled.
108
fe366b87
MP
1092016-12-12 Marek Polacek <polacek@redhat.com>
110
111 PR c++/78647
112 * c-common.c (attribute_fallthrough_p): Return false for
113 error_mark_node.
114
8bd9f164
MS
1152016-12-08 Martin Sebor <msebor@redhat.com>
116
117 PR c/78284
118 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
119
060162e0
MS
1202016-12-08 Martin Sebor <msebor@redhat.com>
121
122 PR c/78165
123 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
124 suffix.
125gcc/testsuite/ChangeLog:
126
ee92e7ba
MS
1272016-12-07 Martin Sebor <msebor@redhat.com>
128
129 PR c/53562
130 PR middle-end/77784
131 PR middle-end/78149
132 PR middle-end/78138
133 * c.opt (-Wstringop-overflow): New option.
134
84b0769e
MO
1352016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
136
137 * c-attribs.c (asan odr indicator): New attribute.
138 (handle_asan_odr_indicator_attribute): New function.
139
7fa6a965
PK
1402016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
141
142 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
143 ptrdiff_type_node;
144
56d8ffc1
JG
1452016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
146
147 * c-common.c (excess_precision_mode_join): New.
148 (c_ts18661_flt_eval_method): New.
149 (c_c11_flt_eval_method): Likewise.
150 (c_flt_eval_method): Likewise.
151 * c-common.h (excess_precision_mode_join): New.
152 (c_flt_eval_method): Likewise.
153 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
154 (cpp_iec_559_value): Call it.
155 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
156 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
157 __FLT_EVAL_METHOD_TS_18661_3__.
158
04f0fcf7
JG
1592016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
160
161 * c-opts.c (c_common_post_options): Add logic to handle the default
162 case for -fpermitted-flt-eval-methods.
163
fb2675cb
PB
1642016-11-23 Paolo Bonzini <bonzini@gnu.org>
165
166 * c.opt (Wexpansion-to-defined): New.
167
ec1c5694
JJ
1682016-11-23 Jakub Jelinek <jakub@redhat.com>
169
170 PR target/78451
171 * c-pragma.c (handle_pragma_target): Don't replace
172 current_target_pragma, but chainon the new args to the current one.
173
730c9e75
NS
1742016-11-22 Nathan Sidwell <nathan@acm.org>
175
176 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 177 indentation and formatting.
730c9e75 178
89990732
MS
1792016-11-21 Martin Sebor <msebor@redhat.com>
180
181 * c.opt (-fprintf-return-value): Enable by default.
182
48330c93
BE
1832016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
184
185 PR c++/71973
186 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
187 * c-common.c (c_common_nodes_and_builtins): Initialize
188 const_tm_ptr_type_node.
189
0d939c95
MP
1902016-11-16 Marek Polacek <polacek@redhat.com>
191
192 PR c/78285
193 * c-common.c (c_add_case_label): Turn error_at calls into inform.
194
8e745a17
JJ
1952016-11-14 Jakub Jelinek <jakub@redhat.com>
196
197 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
198
1ee62b92 1992016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
200 Richard Biener <rguenther@suse.de>
201
202 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
203 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
204 * c.opt (fgimple): New option.
1ee62b92 205
22b15758
UB
2062016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
207
208 PR c/35503
209 * c-common.h (warn_for_restrict): Declare.
210 * c-warn.c: Include gcc-rich-location.h.
211 (warn_for_restrict): New function.
212 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
213 (gcc_cdiag_char_table): Likewise.
214 (gcc_cxxdiag_char_table): Likewise.
215 * c.opt (Wrestrict): New option.
216
4be719cd
EB
2172016-11-13 Eric Botcazou <ebotcazou@adacore.com>
218
219 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
220 for nested types only if the type is a record or union and dump SLOC.
221
4a826ca6
JM
2222016-11-09 Jason Merrill <jason@redhat.com>
223
224 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
225
2e955d50
JJ
2262016-11-09 Jakub Jelinek <jakub@redhat.com>
227
228 * c-ubsan.c (ubsan_instrument_shift): Handle split
229 -fsanitize=shift-base and -fsanitize=shift-exponent.
230
51dc6603
JM
2312016-11-07 Jason Merrill <jason@redhat.com>
232
233 * c.opt (Wc++1z-compat): New.
234 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
235
6dc4a604
ML
2362016-11-07 Martin Liska <mliska@suse.cz>
237
238 * c-warn.c (warn_for_unused_label): Save all labels used
239 in goto or in &label.
240
b302001e
JM
2412016-11-03 Jason Merrill <jason@redhat.com>
242
243 * c-cppbuiltin.c (c_cpp_builtins): Correct
244 __cpp_inheriting_constructors.
245
31f7f784
JM
2462016-11-01 Jason Merrill <jason@redhat.com>
247
2bc78e3c
JM
248 * c-cppbuiltin.c (c_cpp_builtins): Update
249 __cpp_inheriting_constructors.
250
31f7f784
JM
251 * c.opt (-fnew-inheriting-ctors): New.
252 * c-opts.c: Default to on for ABI 11+.
253
dcb466ec
JJ
2542016-10-31 Jakub Jelinek <jakub@redhat.com>
255
256 PR c++/77948
257 * c.opt (fext-numeric-literals): Add Var and Init.
258 * c-opts.c (c_common_handle_option): Don't clear
259 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
260 (c_common_post_options): Clear it here if not set
261 explicitly.
262
52e1b91e
AH
2632016-10-28 Aldy Hernandez <aldyh@redhat.com>
264
265 PR debug/77773
266 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
267 if NULL.
268
e16f1cc7
JJ
2692016-10-25 Jakub Jelinek <jakub@redhat.com>
270
271 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
272 * c-common.c (c_common_reswords): Add __builtin_launder.
273
f8348061
BE
2742016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
275
276 * c-common.c (c_common_truthvalue_conversion): Warn for
277 multiplications in boolean context. Fix the quoting of '<<' and '<'
278 in the shift warning.
279
eff89e01
BE
2802016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
281
282 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
283
24bc7bf4
JM
2842016-10-20 Jason Merrill <jason@redhat.com>
285
286 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
287
4c712374
BE
2882016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
289
290 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
291 integer shift ops in boolean context.
292
2932016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
294
295 * c.opt (Walloca): New.
296 (Walloca-larger-than=): New.
297 (Wvla-larger-than=): New.
298
8fa18c06
MP
2992016-10-17 Marek Polacek <polacek@redhat.com>
300
301 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
302 Return immediately when finding a match.
303 (warn_tautological_cmp): Remove a boolean variable that is no longer
304 needed.
305
b12b1915
MP
3062016-10-17 Marek Polacek <polacek@redhat.com>
307
308 * c-attribs.c: New file.
309 * c-common.c: Move attributes handling to c-attribs.c.
310 (get_nonnull_operand): No longer static.
311 * c-common.h: Move the declarations from c-attribs.c to its own section.
312
2045acd9
JM
3132016-10-14 Jason Merrill <jason@redhat.com>
314
315 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
316 and __cpp_deduction_guides.
317
14a2c9aa
JM
3182016-10-13 Jason Merrill <jason@redhat.com>
319
320 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
321
4d0cdd0c
TP
3222016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
323
324 * c-cppbuiltin.c: Include memmodel.h.
325 * c-opts.c: Likewise.
326 * c-pragma.c: Likewise.
327 * c-warn.c: Likewise.
328
70f6d5e1
JJ
3292016-10-12 Jakub Jelinek <jakub@redhat.com>
330
331 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
332 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
333 * c-opts.c (sanitize_cpp_opts): Initialize
334 cpp_opts->cpp_warn_implicit_fallthrough.
335
78f61294
MP
3362016-10-11 Marek Polacek <polacek@redhat.com>
337
338 * c-common.c (warning_candidate_p): Change the return type to bool
339 and return true/false instead of 1/0.
340 (vector_mode_valid_p): Likewise.
341
038b5cc0
MP
3422016-10-11 Marek Polacek <polacek@redhat.com>
343
344 * c-common.c (fold_for_warn): No longer static.
345 (bool_promoted_to_int_p): Likewise.
346 (c_common_get_narrower): Likewise.
347 (constant_expression_warning): Move to c-warn.c.
348 (constant_expression_error): Likewise.
349 (overflow_warning): Likewise.
350 (warn_logical_operator): Likewise.
351 (find_array_ref_with_const_idx_r): Likewise.
352 (warn_tautological_cmp): Likewise.
353 (expr_has_boolean_operands_p): Likewise.
354 (warn_logical_not_parentheses): Likewise.
355 (warn_if_unused_value): Likewise.
356 (strict_aliasing_warning): Likewise.
357 (sizeof_pointer_memaccess_warning): Likewise.
358 (check_main_parameter_types): Likewise.
359 (conversion_warning): Likewise.
360 (warnings_for_convert_and_check): Likewise.
361 (match_case_to_enum_1): Likewise.
362 (match_case_to_enum): Likewise.
363 (c_do_switch_warnings): Likewise.
364 (warn_for_omitted_condop): Likewise.
365 (readonly_error): Likewise.
366 (lvalue_error): Likewise.
367 (invalid_indirection_error): Likewise.
368 (warn_array_subscript_with_type_char): Likewise.
369 (warn_about_parentheses): Likewise.
370 (warn_for_unused_label): Likewise.
371 (warn_for_div_by_zero): Likewise.
372 (warn_for_memset): Likewise.
373 (warn_for_sign_compare): Likewise.
374 (do_warn_double_promotion): Likewise.
375 (do_warn_unused_parameter): Likewise.
376 (record_locally_defined_typedef): Likewise.
377 (maybe_record_typedef_use): Likewise.
378 (maybe_warn_unused_local_typedefs): Likewise.
379 (maybe_warn_bool_compare): Likewise.
380 (maybe_warn_shift_overflow): Likewise.
381 (warn_duplicated_cond_add_or_warn): Likewise.
382 (diagnose_mismatched_attributes): Likewise.
383 * c-common.h: Move the declarations from c-warn.c to its own section.
384 * c-warn.c: New file.
385
627be19f
JM
3862016-10-08 Jason Merrill <jason@redhat.com>
387
388 * c-common.c (c_common_truthvalue_conversion): Don't distribute
389 into COND_EXPR in C++.
390
7bad794a
JJ
3912016-10-08 Jakub Jelinek <jakub@redhat.com>
392
393 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
394 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
395 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
396
be845b04
JJ
3972016-10-07 Jakub Jelinek <jakub@redhat.com>
398
399 Implement LWG2296 helper intrinsic
400 * c-common.h (enum rid): Add RID_ADDRESSOF.
401 * c-common.c (c_common_reswords): Add __builtin_addressof.
402
c09c4992
BE
4032016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
404
405 PR c++/77700
406 * c-common.c (c_common_truthvalue_conversion): Warn also for
407 suspicious enum values in boolean context.
408
342cfb3e
JJ
4092016-10-06 Jakub Jelinek <jakub@redhat.com>
410
411 Implement P0258R2 - helper for C++17
412 std::has_unique_object_representations trait
413 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
414 * c-common.c (c_common_reswords): Add
415 __has_unique_object_representations.
416
2e69f143
JJ
4172016-10-05 Jakub Jelinek <jakub@redhat.com>
418
419 PR sanitizer/66343
420 * c-ubsan.c (ubsan_instrument_return): Don't call
421 initialize_sanitizer_builtins here.
422
700fff34
BE
4232016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
424
425 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
426 conditional expression in boolean context when only one arm is
427 non-boolean.
428
9563bfcd
JJ
4292016-10-05 Jakub Jelinek <jakub@redhat.com>
430
04a32443
JJ
431 PR sanitizer/77823
432 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
433 is not integral.
434
9563bfcd
JJ
435 * c-common.c (c_common_reswords): Update comment for C++11.
436
f1644724
JM
4372016-10-04 Jason Merrill <jason@redhat.com>
438
439 * c-common.c (make_tree_vector_from_ctor): New.
440 * c-common.h: Declare it.
441
5a79befb
JJ
4422016-10-04 Jakub Jelinek <jakub@redhat.com>
443
444 * c-cppbuiltin.c (c_cpp_builtins): Don't define
445 __LIBGCC_JCR_SECTION_NAME__.
446
1633d3b9
BE
4472016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
448
449 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
450 left shift in boolean context.
451
a2c6e7f2
JJ
4522016-09-29 Jakub Jelinek <jakub@redhat.com>
453
454 Implement P0001R1 - C++17 removal of register storage class specifier
455 * c.opt (Wregister): New warning.
456 * c-opts.c (c_common_post_options): Enable -Wregister by
457 default for C++17.
458
75304c87
JG
4592016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
460
461 * c-opts.c (c_common_post_options): Remove special case for
462 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
463 in C++.
464
bbfac6da
JJ
4652016-09-27 Jakub Jelinek <jakub@redhat.com>
466
6e39060a
JJ
467 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
468 -std=c++1z.
469
bbfac6da
JJ
470 * c-ada-spec.c (print_ada_declaration): Remove break after return.
471
e73cf9a2
TP
4722016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
473
474 * c-common.c: Include memmodel.h.
475
c6147dc4
MP
4762016-09-26 Marek Polacek <polacek@redhat.com>
477
478 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
479
81fea426
MP
4802016-09-26 Marek Polacek <polacek@redhat.com>
481
482 PR c/7652
483 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
484 (handle_fallthrough_attribute): New function.
485 (attribute_fallthrough_p): New function.
486 * c-common.h (attribute_fallthrough_p): Declare.
487
9a2300e9
MP
4882016-09-24 Marek Polacek <polacek@redhat.com>
489
490 PR c/77490
491 * c.opt (Wbool-operation): New.
492
a09e9e35
BE
4932016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
494
495 * c-common.c (c_common_truthvalue_conversion): Inhibit
496 Wint-in-bool-context warning with from_macro_definition_at.
497 Mention the expression will always evaluate to true.
498
d43b4ccc
MS
4992016-09-21 Martin Sebor <msebor@redhat.com>
500
501 PR bootstrap/77676
502 * c.opt (fprintf-return-value): Temporarily initialize to zero
503 to unblock bootstrap failures.
504
2e1c20b1
JJ
5052016-09-21 Jakub Jelinek <jakub@redhat.com>
506
507 PR c++/77651
508 * c.opt (Waligned-new=): Add RejectNegative.
509 (faligned-new=): Likewise. Spelling fix - change
510 aligned_new_threshhold to aligned_new_threshold.
511 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
512 to aligned_new_threshold.
513
88d0c3f0
MS
5142016-09-20 Martin Sebor <msebor@redhat.com>
515
516 PR middle-end/49905
517 * c.opt: Add -Wformat-length and -fprintf-return-value.
518
144a96e4
BE
5192016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
520
521 PR c++/77434
522 * c.opt (Wint-in-bool-context): New warning.
523 * c-common.c (c_common_truthvalue_conversion): Warn on integer
524 constants in boolean context.
525
63012d9a
JM
5262016-09-19 Joseph Myers <joseph@codesourcery.com>
527
528 * c-common.c (max_align_t_align): Also consider alignment of
529 float128_type_node.
530
931388ce
JM
5312016-09-15 Jason Merrill <jason@redhat.com>
532
533 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
534 DECL_EXTERNAL.
535
38711381
JM
5362016-09-14 Jason Merrill <jason@redhat.com>
537
538 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
539 limit FIELD_DECL, either.
540
e51fbec3
MP
5412016-09-14 Marek Polacek <polacek@redhat.com>
542
543 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
544 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
545 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
546
254830ba
DM
5472016-09-13 David Malcolm <dmalcolm@redhat.com>
548
549 * c-common.c (warn_logical_not_parentheses): Replace
550 rich_location::add_fixit_insert calls with add_fixit_insert_before
551 and add_fixit_insert_after, eliminating the "next_loc" calculation.
552
42763690
JM
5532016-09-13 Jason Merrill <jason@redhat.com>
554 Tom de Vries <tom@codesourcery.com>
555
556 PR c++/77427
557 * c-common.c (set_underlying_type): Don't treat array as builtin type.
558
9453eee9
JM
5592016-09-13 Jason Merrill <jason@redhat.com>
560
561 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
562 limit types at all.
563
e96809e3
JM
5642016-09-12 Jason Merrill <jason@redhat.com>
565
566 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
567 bit/byte confusion, allow large alignment for types.
568
54dcdb88
BE
5692016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
570
571 PR c++/77496
572 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
573
d1463eb9
DM
5742016-09-12 David Malcolm <dmalcolm@redhat.com>
575
576 PR c/72858
577 * c-format.c (argument_parser::check_argument_type): Add params
578 "type_start" and "conversion_char". Use the former to generate
579 offset_to_type_start and pass it and conversion_char to
580 check_format_types.
581 (check_format_info_main): Capture the start of the type
582 information as "type_start", and pass it an format_char
583 to arg_parser.check_argument_type.
584 (check_format_types): Provide an example in the leading comment.
585 Add params "offset_to_type_start" and "conversion_char"; pass
586 them to format_type_warning calls.
587 (test_get_modifier_for_format_len): Likewise.
588 (matching_type_p): New function.
589 (get_format_for_type): Add param "conversion_char" and move
590 implementation into...
591 (get_format_for_type_1): ...new function, called twice.
592 Use new function matching_type_p rather than checking for
593 TYPE_CANONICAL equality.
594 (get_corrected_substring): New function.
595 (format_type_warning): Provide an example in the leading comment.
596 Add params "offset_to_type_start" and "conversion_char". Replace
597 call to get_format_for_type with call to get_corrected_substring
598 and move rejection of hints for widths/precisions there.
599 (assert_format_for_type_streq): Add param "conversion_char".
600 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
601 (test_get_format_for_type_printf): Add conversion chars to the
602 tests, adding coverage for various combinations of integer
603 vs double conversions, and for preserving octal and hexadecimal
604 conversions.
605 (test_get_format_for_type_scanf): Add conversion chars to the
606 tests.
607
5b28efbb
TV
6082016-09-10 Tom de Vries <tom@codesourcery.com>
609
610 PR C/71602
611 * c-common.c (build_va_arg): Handle more strict
612 targetm.canonical_va_list_type. Replace first argument type error with
613 assert.
614
3f0177e7
MS
6152016-09-09 Martin Sebor <msebor@redhat.com>
616
617 PR c/77520
618 PR c/77521
619 * c-format.c (argument_parser::find_format_char_info): Use %qc
620 format directive unconditionally.
621
af63ba4b
JM
6222016-09-09 Jason Merrill <jason@redhat.com>
623
624 Implement C++17 new of over-aligned types.
625 * c.opt: Add -faligned-new and -Waligned-new.
626 * c-common.c (max_align_t_align): Split out from...
627 (cxx_fundamental_alignment_p): ...here.
628 * c-common.h: Declare it.
629 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
630
c65248cb
JM
6312016-09-09 Joseph Myers <joseph@codesourcery.com>
632
633 * c-cppbuiltin.c (builtin_define_type_width): New function.
634 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
635 macros.
636
e5106e27
DM
6372016-09-07 David Malcolm <dmalcolm@redhat.com>
638
639 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
640 a POINTER_TYPE.
641 (substring_loc::get_location): Move to substring-locations.c,
642 keeping implementation as...
643 (c_get_substring_location): New function, from the above, reworked
644 to use accessors rather than member lookup.
645 * c-common.h (class substring_loc): Move to substring-locations.h,
646 replacing with a forward decl.
647 (c_get_substring_location): New decl.
648 * c-format.c: Include "substring-locations.h".
649 (format_warning_va): Move to substring-locations.c.
650 (format_warning_at_substring): Likewise.
651
a42e7952
MS
6522016-09-06 Martin Sebor <msebor@redhat.com>
653
654 PR c/77336
655 * c-format.c (check_function_format): Avoid issuing warnings for
656 functions unless they call format functions with non-constant
657 format strings.
658
b772a565
RB
6592016-09-06 Richard Biener <rguenther@suse.de>
660
661 PR c/77450
662 * c-common.c (c_common_mark_addressable_vec): Handle
663 COMPOUND_LITERAL_EXPR.
664
25ff5dd3
MP
6652016-09-05 Marek Polacek <polacek@redhat.com>
666
667 PR c/77423
668 * c-common.c (bool_promoted_to_int_p): New function.
669 (expr_has_boolean_operands_p): New function.
670 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
671 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
672
21234eb5
TV
6732016-09-04 Tom de Vries <tom@codesourcery.com>
674
675 revert:
676 2016-08-29 Tom de Vries <tom@codesourcery.com>
677
678 * c-common.c (build_va_arg): Replace first argument type error
679 with assert.
680
9dc5773f
JJ
6812016-09-02 Jakub Jelinek <jakub@redhat.com>
682
683 PR c/65467
684 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
685 (c_finish_omp_for): Reject _Atomic qualified iterators.
686
6872016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
688
689 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
690 size to guarantee it fits the output of the formatted function
691 regardless of its arguments.
692
295844f6
MP
6932016-09-01 Marek Polacek <polacek@redhat.com>
694
695 PR c/7652
696 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
697 FALLTHRU comments.
698
3d06b6f2
MP
6992016-08-29 Marek Polacek <polacek@redhat.com>
700
701 PR c/77292
702 * c-common.c (warn_logical_not_parentheses): Don't warn for
703 a comparison or a logical operator.
704
34cedad5
TV
7052016-08-29 Tom de Vries <tom@codesourcery.com>
706
707 * c-common.c (build_va_arg): Fix type comparison assert.
708
f162d717
TV
7092016-08-29 Tom de Vries <tom@codesourcery.com>
710
711 * c-common.c (build_va_arg): Replace first argument type error
712 with assert.
713
ba9bbd6f
TV
7142016-08-29 Tom de Vries <tom@codesourcery.com>
715
716 PR c/77398
717 * c-common.c (build_va_arg): Add first argument error. Build va_arg
718 with error_mark_node as va_list instead of with illegal va_list.
719
ebef225f
MP
7202016-08-25 Marek Polacek <polacek@redhat.com>
721 David Malcolm <dmalcolm@redhat.com>
722
723 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
724 * c-common.h (warn_logical_not_parentheses): Update declaration.
725
b00e6e75
MP
7262016-08-22 Marek Polacek <polacek@redhat.com>
727
728 PR c++/77321
729 * c-common.c (warn_for_memset): Check type for null.
730
6dc198e3
JM
7312016-08-22 Joseph Myers <joseph@codesourcery.com>
732
733 * c-family/c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
734 _FloatNx types for suffixes for built-in functions.
735
c65699ef
JM
7362016-08-19 Joseph Myers <joseph@codesourcery.com>
737
738 PR c/32187
739 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
740 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
741 (RID_FLOAT128X): New enum rid values.
742 (CASE_RID_FLOATN_NX): New macro.
743 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
744 keywords.
745 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
746 corresponding complex types.
747 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
748 _FloatNx and corresponding complex types.
749 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
750 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
751 and _FloatNx types for the widest type for determining
752 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
753 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
754 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
755 and _FloatNx types.
756 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
757 constants.
758 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
759 _FloatNx types.
760
cc015f3a
DM
7612016-08-18 David Malcolm <dmalcolm@redhat.com>
762
763 * c-opts.c (c_diagnostic_finalizer): Update for change to
764 diagnostic_show_locus.
765
cb18fd07
DM
7662016-08-18 David Malcolm <dmalcolm@redhat.com>
767
768 * c-common.c: Include "spellcheck.h".
769 (cb_get_suggestion): New function.
770 * c-common.h (cb_get_suggestion): New decl.
771 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
772 cb_get_suggestion.
773
a76989dc
MP
7742016-08-18 Marek Polacek <polacek@redhat.com>
775
776 PR c/71514
777 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
778 and pointer-to-VLA.
779
65e736c0
DM
7802016-08-16 David Malcolm <dmalcolm@redhat.com>
781
782 PR c/72857
783 * c-common.c (substring_loc::get_range): Rename to...
784 (substring_loc::get_location): ...this, converting param from a
785 source_range * to a location_t *. Call
786 get_source_location_for_substring rather than
787 get_source_range_for_substring, and pass in m_caret_idx.
788 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
789 (substring_loc::get_range): Replace with...
790 (substring_loc::get_location): ...this.
791 (substring_loc::set_caret_index): New method.
792 (substring_loc): Add field m_caret_idx.
793 * c-format.c (format_warning_va): Update for above changes.
794 Rename local "substring_loc" to "fmt_substring_loc" to avoid
795 clashing with type name.
796 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
797 (check_argument_type): Likewise.
798 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
799 Use a copy when emitting warnings, setting the caret index from TYPE.
800
7e1dde14 8012016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 802 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
803
804 * c-ada-spec.c (dump_number): New function.
805 (handle_escape_character): Likewise.
806 (print_ada_macros): Add handling of constant integers and strings.
807
191816a3
MP
8082016-08-12 Marek Polacek <polacek@redhat.com>
809
810 PR c/7652
811 * c-common.c (scalar_to_vector): Adjust fall through comment.
812 * c-opts.c (c_common_handle_option): Likewise.
813 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
814 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
815 fall through comment.
816 * cilk.c (extract_free_variables): Add FALLTHRU.
817
452df4a4
JM
8182016-08-10 Jason Merrill <jason@redhat.com>
819
820 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
821
f3365c12
JM
8222016-08-09 Jason Merrill <jason@redhat.com>
823
824 * c-common.c (c_common_attribute_table): vector_size affects type
825 identity.
826
f0bc3323
MP
8272016-08-09 Marek Polacek <polacek@redhat.com>
828
829 PR c/7652
830 * c-ada-spec.c (dump_generic_ada_node): Add return.
831
98e5a19a
JM
8322016-08-09 Jason Merrill <jason@redhat.com>
833
834 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
835 C++17 constexpr lambdas.
836
895aa8e1
DM
8372016-08-08 David Malcolm <dmalcolm@redhat.com>
838
839 PR c/64955
840 * c-common.h (selftest::c_format_c_tests): New declaration.
841 (selftest::run_c_tests): New declaration.
842 * c-format.c: Include "selftest.h.
843 (format_warning_va): Add param "corrected_substring" and use
844 it to add a replacement fix-it hint.
845 (format_warning_at_substring): Likewise.
846 (format_warning_at_char): Update for new param of
847 format_warning_va.
848 (argument_parser::check_argument_type): Pass "fki" to
849 check_format_types.
850 (check_format_types): Add param "fki" and pass it to
851 format_type_warning.
852 (deref_n_times): New function.
853 (get_modifier_for_format_len): New function.
854 (selftest::test_get_modifier_for_format_len): New function.
855 (get_format_for_type): New function.
856 (format_type_warning): Add param "fki" and use it to attempt
857 to provide hints for argument types when calling
858 format_warning_at_substring.
859 (selftest::get_info): New function.
860 (selftest::assert_format_for_type_streq): New function.
861 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
862 (selftest::test_get_format_for_type_printf): New function.
863 (selftest::test_get_format_for_type_scanf): New function.
864 (selftest::c_format_c_tests): New function.
865
e52ed3fe
DM
8662016-08-08 David Malcolm <dmalcolm@redhat.com>
867
868 PR c/52952
869 * c-format.c: Include "diagnostic.h".
870 (location_column_from_byte_offset): Delete.
871 (location_from_offset): Delete.
872 (format_warning_va): New function.
873 (format_warning_at_substring): New function.
874 (format_warning_at_char): New function.
875 (check_format_arg): Capture location of format_tree and pass to
876 check_format_info_main.
877 (argument_parser): Add fields "start_of_this_format" and
878 "format_string_cst".
879 (flag_chars_t::validate): Add param "format_string_cst". Convert
880 warning_at call using location_from_offset to call to
881 format_warning_at_char.
882 (argument_parser::argument_parser): Add param "format_string_cst_"
883 and use use it to initialize field "format_string_cst".
884 Initialize new field "start_of_this_format".
885 (argument_parser::read_format_flags): Convert warning_at call
886 using location_from_offset to a call to format_warning_at_char.
887 (argument_parser::read_any_format_left_precision): Likewise.
888 (argument_parser::read_any_format_precision): Likewise.
889 (argument_parser::read_any_other_modifier): Likewise.
890 (argument_parser::find_format_char_info): Likewise, in three places.
891 (argument_parser::parse_any_scan_set): Likewise, in one place.
892 (argument_parser::handle_conversions): Likewise, in two places.
893 (argument_parser::check_argument_type): Add param "fmt_param_loc"
894 and use it to make a substring_loc. Pass the latter to
895 check_format_types.
896 (check_format_info_main): Add params "fmt_param_loc" and
897 "format_string_cst". Convert warning_at calls using
898 location_from_offset to calls to format_warning_at_char. Pass the
899 new params to the arg_parser ctor. Pass "format_string_cst" to
900 flag_chars.validate. Pass "fmt_param_loc" to
901 arg_parser.check_argument_type.
902 (check_format_types): Convert first param from a location_t
903 to a const substring_loc & and rename to "fmt_loc". Attempt
904 to extract the range of the relevant parameter and pass it
905 to format_type_warning.
906 (format_type_warning): Convert first param from a location_t
907 to a const substring_loc & and rename to "fmt_loc". Add
908 params "param_range" and "type". Replace calls to warning_at
909 with calls to format_warning_at_substring.
910
1c4d457e
DM
9112016-08-08 David Malcolm <dmalcolm@redhat.com>
912
913 * c-format.c (class flag_chars_t): New class.
914 (struct length_modifier): New struct.
915 (class argument_parser): New class.
916 (flag_chars_t::flag_chars_t): New ctor.
917 (flag_chars_t::has_char_p): New method.
918 (flag_chars_t::add_char): New method.
919 (flag_chars_t::validate): New method.
920 (flag_chars_t::get_alloc_flag): New method.
921 (flag_chars_t::assignment_suppression_p): New method.
922 (argument_parser::argument_parser): New ctor.
923 (argument_parser::read_any_dollar): New method.
924 (argument_parser::read_format_flags): New method.
925 (argument_parser::read_any_format_width): New method.
926 (argument_parser::read_any_format_left_precision): New method.
927 (argument_parser::read_any_format_precision): New method.
928 (argument_parser::handle_alloc_chars): New method.
929 (argument_parser::read_any_length_modifier): New method.
930 (argument_parser::read_any_other_modifier): New method.
931 (argument_parser::find_format_char_info): New method.
932 (argument_parser::validate_flag_pairs): New method.
933 (argument_parser::give_y2k_warnings): New method.
934 (argument_parser::parse_any_scan_set): New method.
935 (argument_parser::handle_conversions): New method.
936 (argument_parser::check_argument_type): New method.
937 (check_format_info_main): Introduce classes argument_parser
938 and flag_chars_t, moving the code within the loop into methods
939 of these classes. Make various locals "const".
940
88fa5555
DM
9412016-08-05 David Malcolm <dmalcolm@redhat.com>
942
943 * c-common.c: Include "substring-locations.h".
944 (get_cpp_ttype_from_string_type): New function.
945 (g_string_concat_db): New global.
946 (substring_loc::get_range): New method.
947 * c-common.h (g_string_concat_db): New declaration.
948 (class substring_loc): New class.
949 * c-lex.c (lex_string): When concatenating strings, capture the
950 locations of all tokens using a new obstack, and record the
951 concatenation locations within g_string_concat_db.
952 * c-opts.c (c_common_init_options): Construct g_string_concat_db
953 on the ggc-heap.
954
78169471
MP
9552016-07-29 Marek Polacek <polacek@redhat.com>
956
638fc14f
MP
957 PR c/71926
958 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
959 parentheses warning.
960
78169471
MP
961 PR c/71574
962 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
963
1225d6b1
ML
9642016-07-28 Martin Liska <mliska@suse.cz>
965
966 PR gcov-profile/68025
967 * c-common.c (handle_no_profile_instrument_function_attribute):
968
ec1e2a40
BE
9692016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
970
971 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
972 BITS_PER_UNIT_LOG.
973
5ec2cd9f
JM
9742016-07-25 Jason Merrill <jason@redhat.com>
975
976 PR c++/65970
977 * c.opt (fconstexpr-loop-limit): New.
978
9dc5773f 9792016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
980
981 PR c++/71675
982 * c-common.c (resolve_overloaded_builtin): Avoid converting
983 __atomic_compare_exchange_n return type to that of what its
984 first argument points to.
985
e3fe09c1
UB
9862016-07-22 Uros Bizjak <ubizjak@gmail.com>
987
988 * c-common.c: Use HOST_WIDE_INT_M1U instead of
989 ~(unsigned HOST_WIDE_INT) 0.
990
bc91c436
ML
9912016-07-22 Martin Liska <mliska@suse.cz>
992
993 PR gcov-profile/69028
994 PR gcov-profile/62047
995 * cilk.c (create_cilk_helper_decl): Set location of a new decl
996 to the current_function_decl.
997
451dcc66
JM
9982016-07-21 Jason Merrill <jason@redhat.com>
999
1000 PR c++/65168
1001 * c-common.c (c_common_truthvalue_conversion): Check
1002 c_inhibit_evaluation_warnings for warning about address of
1003 reference.
1004
de6a69ee
DM
10052016-07-20 David Malcolm <dmalcolm@redhat.com>
1006
1007 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
1008 const char *.
1009
d022c55a
JM
10102016-07-15 Jason Merrill <jason@redhat.com>
1011
1012 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
1013
ddbbcb19
JJ
10142016-07-15 Jakub Jelinek <jakub@redhat.com>
1015
1016 PR c/71858
1017 * c-common.h (enum lookup_name_fuzzy_kind): Add
1018 FUZZY_LOOKUP_FUNCTION_NAME.
1019
d0cf395a
JM
10202016-07-08 Jason Merrill <jason@redhat.com>
1021
1022 P0145: Refining Expression Order for C++.
1023 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
1024 * c-opts.c: Adjust.
1025
98d44e93
MT
10262016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
1027
1028 PR c++/71214
1029 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
1030
f9d8d994
TS
10312016-06-29 Thomas Schwinge <thomas@codesourcery.com>
1032
1033 * c-pragma.h (enum pragma_kind): Rename
1034 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
1035 users.
1036
4aa83879
RB
10372016-06-29 Richard Biener <rguenther@suse.de>
1038
1039 PR middle-end/71002
1040 * c-common.c (c_common_get_alias_set): Remove union type punning case.
1041
a25bd9e6
JM
10422016-06-24 Jason Merrill <jason@redhat.com>
1043
1044 P0145R2: Refining Expression Order for C++.
1045 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
1046 MODIFY_EXPR.
1047
a86451b9
JJ
10482016-06-24 Jakub Jelinek <jakub@redhat.com>
1049
1050 * c-common.c (check_builtin_function_arguments): Require last
1051 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
1052 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
1053 if the last argument is pointer to enumerated or boolean type.
1054
1a4f11c8
DM
10552016-06-22 David Malcolm <dmalcolm@redhat.com>
1056
1057 PR c/70339
1058 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
1059 (lookup_name_fuzzy): New prototype.
1060
fe55692c
JDA
10612016-06-21 John David Anglin <danglin@gcc.gnu.org>
1062
1063 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
1064
4eb24e01
JM
10652016-06-14 Jason Merrill <jason@redhat.com>
1066
1067 P0145R2: Refining Expression Order for C++.
1068 * c.opt (fargs-in-order): New.
1069 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
1070
ef7cf206
JJ
10712016-06-13 Jakub Jelinek <jakub@redhat.com>
1072
0dda258b
JJ
1073 PR sanitizer/71498
1074 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
1075 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
1076
ef7cf206
JJ
1077 PR preprocessor/71183
1078 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
1079 to cb_get_source_date_epoch.
1080
50b15873
JJ
10812016-06-10 Jakub Jelinek <jakub@redhat.com>
1082
1083 PR c/68657
1084 * c.opt (Wpsabi): Add Warning flag.
1085
4d926e34
MS
10862016-06-10 Martin Sebor <msebor@redhat.com>
1087
1088 PR c/71392
1089 * gcc/c-family/c-common.c (handle_nonnull_attribute): Accept
1090 the nonnull attribute in type-generic builtins.
1091
e01b4e16
MS
10922016-06-09 Martin Sebor <msebor@redhat.com>
1093
1094 PR c/70883
1095 * c-common.c (builtin_function_validate_nargs): Make text of error
1096 message consistent with others like it.
1097
44a845ca
MS
10982016-06-08 Martin Sebor <msebor@redhat.com>
1099 Jakub Jelinek <jakub@redhat.com>
1100
1101 PR c++/70507
1102 PR c/68120
1103 * c-common.c (check_builtin_function_arguments): Handle
1104 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
1105
a80a7051
RB
11062016-06-08 Richard Biener <rguenther@suse.de>
1107
1108 * c-common.c (parse_optimize_options): Improve diagnostic messages.
1109
bfd67b47
RB
11102016-06-07 Richard Biener <rguenther@suse.de>
1111
1112 PR c/61564
1113 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
1114 options and warn about others.
1115
15c98b2e
ES
11162016-06-01 Eduard Sanou <dhole@openmailbox.org>
1117
1118 * c-common.c (get_source_date_epoch): Rename to
1119 cb_get_source_date_epoch.
1120 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
1121 message when the parsing fails. Use error_at instead of fatal_error.
1122 * c-common.h (get_source_date_epoch): Rename to
1123 cb_get_source_date_epoch.
1124 * c-common.h (cb_get_source_date_epoch): Prototype.
1125 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
1126 * c-common.h (c_omp_region_type): Remove trailing comma.
1127 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
1128 * c-lex.c (c_lex_with_flags): Remove initialization of
1129 pfile->source_date_epoch.
1130
00631022
JJ
11312016-05-30 Jakub Jelinek <jakub@redhat.com>
1132
1133 PR c++/71349
1134 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
1135 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
1136 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
1137 instead of C_OMP_CLAUSE_SPLIT_FOR.
1138
f17a223d
RB
11392016-05-24 Richard Biener <rguenther@suse.de>
1140
1141 PR middle-end/70434
1142 PR c/69504
1143 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
1144 (convert_vector_to_array_for_subscript): ... this.
1145 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
1146 VIEW_CONVERT_EXPR to an array type. Rename to ...
1147 (convert_vector_to_array_for_subscript): ... this.
1148
4f2e1536
MP
11492016-05-12 Marek Polacek <polacek@redhat.com>
1150
1151 PR c/70756
1152 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
1153 size_in_bytes and pass LOC to it.
1154
d6e83a8d
MM
11552016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1156
1157 PR c/43651
1158 * c.opt (Wduplicate-decl-specifier): New option.
1159
5c3a10fb
MP
11602016-05-11 Marek Polacek <polacek@redhat.com>
1161
1162 PR c++/71024
1163 * c-common.c (diagnose_mismatched_attributes): New function.
1164 * c-common.h (diagnose_mismatched_attributes): Declare.
1165
deef7113
MP
11662016-05-04 Marek Polacek <polacek@redhat.com>
1167
1168 * c.opt (Wdangling-else): New option.
1169
79ce98bc
MP
11702016-05-03 Marek Polacek <polacek@redhat.com>
1171
1172 PR c/70859
1173 * c-common.c (builtin_function_validate_nargs): Add location
1174 parameter. Use it.
1175 (check_builtin_function_arguments): Add location and arguments
1176 parameters. Use them.
1177 * c-common.h (check_builtin_function_arguments): Update declaration.
1178
381cdae4
RB
11792016-05-03 Richard Biener <rguenther@suse.de>
1180
1181 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
1182 allow call args to gimplify to SSA names.
1183
1d793c34
MP
11842016-05-03 Marek Polacek <polacek@redhat.com>
1185
1186 * c-common.h (enum c_omp_region_type): Remove stray comma.
1187
77886428
CP
11882016-05-02 Cesar Philippidis <cesar@codesourcery.com>
1189
1190 * c-common.h (enum c_omp_region_type): Define.
1191
697e0b28
RS
11922016-05-02 Richard Sandiford <richard.sandiford@arm.com>
1193
1194 * c-common.c (shorten_compare): Use wi::to_wide.
1195
e7ff0319
CP
11962016-04-29 Cesar Philippidis <cesar@codesourcery.com>
1197
1198 PR middle-end/70626
1199 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
1200 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
1201 reduction clauses in acc parallel loops.
1202
2fff3db8
MP
12032016-04-29 Marek Polacek <polacek@redhat.com>
1204
1205 PR c/70852
1206 * c-common.c (warn_for_memset): Check domain before accessing it.
1207
509063eb
DV
12082016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
1209
1210 PR/69089
1211 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
1212 "aligned" attribute.
1213
b632761d
JM
12142016-04-28 Jason Merrill <jason@redhat.com>
1215
1216 * c-lex.c (c_common_has_attribute): Handle nodiscard.
1217
174f6622
ES
12182016-04-28 Eduard Sanou <dhole@openmailbox.org>
1219 Matthias Klose <doko@debian.org>
1220
1221 * c-common.c (get_source_date_epoch): New function, gets the environment
1222 variable SOURCE_DATE_EPOCH and parses it as long long with error
1223 handling.
1224 * c-common.h (get_source_date_epoch): Prototype.
1225 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
1226
6bc2bb18
RB
12272015-04-27 Ryan Burn <contact@rnburn.com>
1228
1229 PR c++/69024
1230 PR c++/68997
1231 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
1232 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
1233 external linkage.
1234 (cilk_detect_and_unwrap): Corresponding changes.
1235 (extract_free_variables): Don't extract free variables from
1236 AGGR_INIT_EXPR slot.
1237 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
1238 (cilk_recognize_spawn): Likewise.
1239
c1e1f433
BS
12402016-04-27 Bernd Schmidt <bschmidt@redhat.com>
1241
1242 * c.opt (Wmemset-elt-size): New option.
1243 * c-common.c (warn_for_memset): New function.
1244 * c-common.h (warn_for_memset): Declare.
1245
d067e05f
JM
12462016-04-25 Jason Merrill <jason@redhat.com>
1247
1248 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
1249 No longer static.
1250 * c-common.h: Declare it.
1251 * c-lex.c (c_common_has_attribute): Add maybe_unused.
1252
9aa36ae5
JM
12532016-04-22 Jason Merrill <jason@redhat.com>
1254
1255 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
1256
477d4906
IV
12572016-04-20 Ilya Verbin <ilya.verbin@intel.com>
1258
1259 PR c++/69363
1260 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
1261 * c-common.h (c_finish_cilk_clauses): Remove declaration.
1262
fe37c7af
MM
12632016-04-18 Michael Matz <matz@suse.de>
1264
1265 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
1266 and SET_DECL_ALIGN.
1267
23f2660f
EB
12682016-04-17 Eric Botcazou <ebotcazou@adacore.com>
1269
1270 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
1271 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
1272 to incomplete types.
1273 (dump_nested_type): Remove redundant tests and tidy up.
1274 (print_ada_declaration): Also set TREE_VISITED on the declaration of
1275 a type which is the typedef of an original type.
1276
1e77281b
MP
12772016-04-15 Marek Polacek <polacek@redhat.com>
1278
1279 PR c/70651
1280 * c-common.c (build_va_arg): Change two asserts into errors and return
1281 error_mark_node.
1282
b3a77f21
MP
12832016-04-13 Marek Polacek <polacek@redhat.com>
1284
1285 PR c++/70639
1286 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
1287 for switch statements, too.
1288
322b8466
JM
12892016-03-28 Jason Merrill <jason@redhat.com>
1290
1291 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
1292
fbdb6baf
MP
12932016-03-23 Marek Polacek <polacek@redhat.com>
1294
1295 PR c++/69884
1296 * c.opt (Wignored-attributes): New option.
1297
5c240f4d
DM
12982016-03-22 David Malcolm <dmalcolm@redhat.com>
1299
1300 PR c/69993
1301 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
1302 diagnostic text, reversing the order of the warning and note so
1303 that they appear in source order.
1304
14ba7b28
MP
13052016-03-17 Marek Polacek <polacek@redhat.com>
1306
1307 PR c/69407
1308 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
1309 operations.
1310
08a1cadc
JM
13112016-03-14 Jason Merrill <jason@redhat.com>
1312
2aaeea19
JM
1313 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
1314
08a1cadc
JM
1315 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
1316
c06d25bb
RB
13172016-03-09 Richard Biener <rguenther@suse.de>
1318
1319 PR c/70143
1320 * c-common.c (strict_aliasing_warning): Add back
1321 alias_sets_conflict_p check.
1322
80aac5c8
JM
13232016-03-08 Jason Merrill <jason@redhat.com>
1324
1325 * c-opts.c (set_std_cxx1z): Don't enable concepts.
1326
64b23c13
DM
13272016-03-04 David Malcolm <dmalcolm@redhat.com>
1328
1329 PR c/68187
1330 * c-indentation.c (get_visual_column): Move code to determine next
1331 tab stop to...
1332 (next_tab_stop): ...this new function.
1333 (line_contains_hash_if): Delete function.
1334 (detect_preprocessor_logic): Delete function.
1335 (get_first_nws_vis_column): New function.
1336 (detect_intervening_unindent): New function.
1337 (should_warn_for_misleading_indentation): Replace call to
1338 detect_preprocessor_logic with a call to
1339 detect_intervening_unindent.
1340
729526f5
DM
13412016-03-04 David Malcolm <dmalcolm@redhat.com>
1342
1343 PR c/68187
1344 * c-indentation.c (should_warn_for_misleading_indentation): When
1345 suppressing warnings about cases where the guard and body are on
1346 the same column, only use the first non-whitespace column in place
1347 of the guard token column when dealing with "else" clauses.
1348 When rejecting aligned BODY and NEXT, loosen the requirement
1349 from equality with the first non-whitespace of guard to simply
1350 that they not be indented relative to it.
1351
e9a35493
RB
13522016-03-04 Richard Biener <rguenther@suse.de>
1353
1354 PR c++/70054
1355 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
1356 instead of alias_sets_conflict_p.
1357
1be56bc5
MP
13582016-03-01 Marek Polacek <polacek@redhat.com>
1359
1360 PR c++/69795
1361 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
1362 any DECL.
1363
35886f0b
MS
13642016-02-22 Martin Sebor <msebor@redhat.com>
1365
1366 PR middle-end/69780
1367 * c-common.c (check_builtin_function_arguments): Validate and
1368 reject invalid arguments to __builtin_alloca_with_align.
1369
4246c8da
MW
13702016-02-20 Mark Wielaard <mjw@redhat.com>
1371
1372 PR c/28901
1373 * c.opt (Wunused-const-variable): Turn into Alias for...
1374 (Wunused-const-variable=): New option.
1375
268be88c
BE
13762016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
1377
1378 PR c++/69865
1379 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
1380 here...
1381 (c_common_init_options): ...to here.
1382 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
1383
871b3f47
JJ
13842016-02-19 Jakub Jelinek <jakub@redhat.com>
1385
1386 PR c++/69826
1387 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
1388 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
1389 flag_preprocess_only.
1390
bf14eba2
JJ
13912016-02-16 Jakub Jelinek <jakub@redhat.com>
1392
1393 PR c/69835
1394 * c.opt (Wnonnull-compare): Enable for -Wall.
1395
ba6b3795
JJ
13962016-02-15 Jakub Jelinek <jakub@redhat.com>
1397
1398 PR c++/69797
1399 * c-common.c (sync_resolve_size): Diagnose too few arguments
1400 even when params is non-NULL empty vector.
1401
a011cd92
BS
14022016-02-08 Bernd Schmidt <bschmidt@redhat.com>
1403
1404 PR target/60410
1405 * c.opt (fshort-double): Remove.
1406
46cb9332
MS
14072016-02-05 Martin Sebor <msebor@redhat.com>
1408
1409 PR c++/69662
1410 * c.opt (Warning options): Update -Wplacement-new to take
1411 an optional argument.
1412
e1b81f2b
JJ
14132016-02-01 Jakub Jelinek <jakub@redhat.com>
1414
1415 PR preprocessor/69543
1416 PR c/69558
1417 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
1418 instead of loc to control_warning_option.
1419
b6adbb9f
NS
14202016-02-01 Nathan Sidwell <nathan@codesourcery.com>
1421
1422 * c.opt (fopenacc-dim=): New option.
1423
5d70666e
RB
14242016-01-27 Ryan Burn <contact@rnburn.com>
1425
1426 PR cilkplus/69267
1427 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
1428 gimplify_arg. Removed superfluous post_p argument.
1429 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
1430 superfluous post_p argument.
1431 * c-gimplify.c (c_gimplify_expr): Likewise.
1432
01e1dea3
DM
14332016-01-26 David Malcolm <dmalcolm@redhat.com>
1434
1435 PR other/69006
1436 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
1437 pp_newline_and_flush with pp_flush.
1438
9f04a53e
MS
14392016-01-20 Martin Sebor <msebor@redhat.com>
1440
1441 PR c/69405
1442 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
1443 an incompatible argument when the argument isn't a valid tree node.
1444
7f26f7df
JM
14452016-01-18 Jason Merrill <jason@redhat.com>
1446
1447 PR c++/68767
1448 * c-common.c (check_function_arguments_recurse): Fold the whole
1449 COND_EXPR, not just the condition.
1450
f62bf092
TV
14512016-01-18 Tom de Vries <tom@codesourcery.com>
1452
1453 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
1454 classify as loop clause.
1455
e0a575ff
JJ
14562016-01-15 Jakub Jelinek <jakub@redhat.com>
1457
1458 PR bootstrap/68271
1459 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
1460 C++ FE no longer has limit on number of pragmas.
1461
14622015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
1463
1464 PR c++/69048
1465 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 1466 to add missing cleanup point.
b6e3db06 1467
c7df95d8
DM
14682016-01-14 David Malcolm <dmalcolm@redhat.com>
1469
1470 PR c++/68819
1471 * c-indentation.c (get_visual_column): Add location_t param.
1472 Handle the column number being zero by effectively disabling the
1473 warning, with an "inform".
1474 (should_warn_for_misleading_indentation): Add location_t argument
1475 for all uses of get_visual_column.
1476
21efdd80
PP
14772016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
1478
1479 PR c++/69029
1480 * c-indentation.c (should_warn_for_misleading_indentation):
1481 Don't warn about do-while statements.
1482
7a127fa7
MS
14832016-01-07 Martin Sebor <msebor@redhat.com>
1484
1485 PR c/68966
1486 * c-common.c (sync_resolve_size): Reject first argument when it's
1487 a pointer to _Bool.
1488
c589e975
DM
14892016-01-05 David Malcolm <dmalcolm@redhat.com>
1490
1491 PR c/69122
1492 * c-indentation.c (get_visual_column): Remove default argument.
1493 (should_warn_for_misleading_indentation): For the multiline case,
1494 update call to get_visual_column for next_stmt_exploc so that it
1495 captures the location of the first non-whitespace character in the
1496 relevant line. Don't issue warnings if there is non-whitespace
1497 before the next statement.
1498
818ab71a
JJ
14992016-01-04 Jakub Jelinek <jakub@redhat.com>
1500
1501 Update copyright years.
1502
745e411d
DM
15032015-12-21 David Malcolm <dmalcolm@redhat.com>
1504
1505 * c-common.c (binary_op_error): Convert first param from
1506 location_t to rich_location * and use it when emitting an error.
1507 * c-common.h (binary_op_error): Convert first param from
1508 location_t to rich_location *.
1509
de67c4c3
DM
15102015-12-16 David Malcolm <dmalcolm@redhat.com>
1511
1512 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
1513 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
1514
4a38b02b
IV
15152015-12-15 Ilya Verbin <ilya.verbin@intel.com>
1516
1517 * c-common.c (c_common_attribute_table): Handle "omp declare target
1518 link" attribute.
1519
54d62f51
JJ
15202015-12-14 Jakub Jelinek <jakub@redhat.com>
1521
1522 PR c/68833
1523 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
1524
8d4227c8
TB
15252014-12-12 Tobias Burnus <burnus@net-b.de>
1526
1527 PR fortran/68815
1528 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
1529 specifiers (%d, %i,%u and %c).
1530
f6069ccc
DM
15312015-12-10 David Malcolm <dmalcolm@redhat.com>
1532
1533 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
1534
63bbf46d
JJ
15352015-12-08 Jakub Jelinek <jakub@redhat.com>
1536
1537 PR c/48088
1538 PR c/68657
1539 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
1540 * c-pragma.c (handle_pragma_diagnostic): Adjust
1541 control_warning_option caller.
1542
f79520bb
DM
15432015-12-07 David Malcolm <dmalcolm@redhat.com>
1544
1545 * c-common.c (c_cpp_error): Update for change to
1546 rich_location::set_range.
1547
b3d5bc62
JJ
15482015-12-04 Paolo Bonzini <bonzini@gnu.org>
1549
1550 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
1551 shifting 1 out of the sign bit.
1552
15532015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
1554
1555 * c-common.c (c_common_attribute_table[]): Update max arguments
1556 count for "simd" attribute.
1557 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
1558
6eb4a537
JJ
15592015-12-03 Jakub Jelinek <jakub@redhat.com>
1560
1561 PR preprocessor/57580
1562 * c-ppoutput.c (print): Change printed field to bool.
1563 Move src_file last for smaller padding.
1564 (init_pp_output): Set print.printed to false instead of 0.
1565 (scan_translation_unit): Fix up formatting. Set print.printed
1566 to true after printing something other than newline.
1567 (scan_translation_unit_trad): Set print.printed to true instead of 1.
1568 (maybe_print_line_1): Set print.printed to false instead of 0.
1569 (print_line_1): Likewise.
1570 (do_line_change): Set print.printed to true instead of 1.
1571 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
1572 dump_macro): Set print.printed to false after printing newline.
1573
4250754e
JM
15742015-12-02 Jason Merrill <jason@redhat.com>
1575
f479b43d
JM
1576 * c-common.c (fold_for_warn): New.
1577 (warn_logical_operator, warn_tautological_cmp)
1578 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
1579
4250754e
JM
1580 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
1581 (c_fully_fold_internal, decl_constant_value_for_optimization):
1582 Move to c/c-fold.c.
1583 * c-common.h: Don't declare decl_constant_value_for_optimization.
1584
e9e32ee6
JM
15852015-12-02 Joseph Myers <joseph@codesourcery.com>
1586
1587 PR c/68162
1588 * c-common.h (c_build_qualified_type): Add extra default
1589 arguments.
1590
37d5ad46
JB
15912015-12-01 Julian Brown <julian@codesourcery.com>
1592 Cesar Philippidis <cesar@codesourcery.com>
1593 James Norris <James_Norris@mentor.com>
1594
1595 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
1596 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
1597 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
1598
f07862c7
EB
15992015-11-30 Eric Botcazou <ebotcazou@adacore.com>
1600
1601 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
1602 (decl_sloc_common): Delete and move bulk of processing to...
1603 (decl_sloc): ...here.
1604 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
1605 (dump_ada_double_name): Remove S parameter and compute the suffix.
1606 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
1607 element type and deal with an anonymous one.
1608 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
1609 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
1610 and remove reference to QUAL_UNION_TYPE.
1611 (dump_nested_types): Make 2 passes on the fields and move bulk to...
1612 (dump_nested_type): ...here. New function extracted from above.
1613 Generate a full declaration for anonymous element type of arrays.
1614 (print_ada_declaration): Really skip anonymous declarations. Remove
1615 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
1616 Clean up processing of declarations of array types and objects.
1617 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
1618 Remove obsolete code and tidy up.
1619
75c8aac3
JH
16202015-11-29 Jan Hubicka <hubicka@ucw.cz>
1621
1622 PR c/67581
1623 * c-common.c (handle_transparent_union_attribute): Update
1624 also type variants.
1625
b58d3df2
ML
16262015-11-27 Martin Liska <mliska@suse.cz>
1627
1628 PR c++/68312
1629 * array-notation-common.c (cilkplus_extract_an_triplets):
1630 Release vector of vectors.
1631 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
1632
89a01fcf
EB
16332015-11-26 Eric Botcazou <ebotcazou@adacore.com>
1634
1635 PR c++/68527
1636 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
1637 (print_ada_struct_decl): Likewise.
1638
cc5c5226
IZ
16392015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
1640
1641 PR c++/68001
1642 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
1643 * cilk.c (recognize_spawn): Determine location in a more precise
1644 way.
1645
269adb9d
JM
16462015-11-19 Jason Merrill <jason@redhat.com>
1647
1648 * c-common.c (shorten_compare): But look through macros from
1649 system headers.
1650
d0eccfcd
JM
16512015-11-18 Jason Merrill <jason@redhat.com>
1652
1653 * c-common.c (shorten_compare): Don't -Wtype-limits if the
1654 non-constant operand comes from a macro.
1655
3e44547c
JM
16562015-11-17 Jason Merrill <jason@redhat.com>
1657
1658 PR bootstrap/68346
1659 * c-common.c (warn_tautological_cmp): Fold before checking for
1660 constants.
1661
0f62c7a0
MP
16622015-11-16 Marek Polacek <polacek@redhat.com>
1663
1664 PR c++/68362
1665 * c-common.c (check_case_bounds): Fold low and high cases.
1666
a868811e
MP
16672015-11-16 Marek Polacek <polacek@redhat.com>
1668
1669 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
1670 * c-common.c (c_common_get_alias_set): Likewise.
1671 (handle_visibility_attribute): Likewise.
1672
fff77217
KY
16732015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
1674
1675 * c-common.c (handle_simd_attribute): New.
1676 (struct attribute_spec): Add entry for "simd".
1677 (handle_simd_attribute): New.
1678
269e63b7
KT
16792015-11-13 Kai Tietz <ktietz70@googlemail.com>
1680
1681 * c-lex.c (interpret_float): Use fold_convert.
1682
ebedc9a3
DM
16832015-11-13 David Malcolm <dmalcolm@redhat.com>
1684
1685 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
1686 and store it on the result.
1687 * c-opts.c (c_common_init_options): Set
1688 global_dc->colorize_source_p.
1689
6e232ba4
JN
16902015-11-12 James Norris <jnorris@codesourcery.com>
1691 Joseph Myers <joseph@codesourcery.com>
1692
1693 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
1694 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
1695 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
1696 PRAGMA_OACC_CLAUSE_LINK.
1697
e78bede6
MP
16982015-11-11 Marek Polacek <polacek@redhat.com>
1699
1700 PR c/68107
1701 PR c++/68266
1702 * c-common.c (valid_array_size_p): New function.
1703 * c-common.h (valid_array_size_p): Declare.
1704
3f8257db 17052015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
1706
1707 PR bootstrap/68271
1708 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
1709
69f293c9
AM
17102015-11-11 Andrew MacLeod <amacleod@redhat.com>
1711
1712 * array-notation-common.c: Remove unused header files.
1713 * c-ada-spec.c: Likewise.
1714 * c-cilkplus.c: Likewise.
1715 * c-common.c: Likewise.
1716 * c-cppbuiltin.c: Likewise.
1717 * c-dump.c: Likewise.
1718 * c-format.c: Likewise.
1719 * c-gimplify.c: Likewise.
1720 * c-indentation.c: Likewise.
1721 * c-lex.c: Likewise.
1722 * c-omp.c: Likewise.
1723 * c-opts.c: Likewise.
1724 * c-pch.c: Likewise.
1725 * c-ppoutput.c: Likewise.
1726 * c-pragma.c: Likewise.
1727 * c-pretty-print.c: Likewise.
1728 * c-semantics.c: Likewise.
1729 * c-ubsan.c: Likewise.
1730 * cilk.c: Likewise.
1731 * stub-objc.c: Likewise.
1732
3a40d81d
NS
17332015-11-09 Thomas Schwinge <thomas@codesourcery.com>
1734 Cesar Philippidis <cesar@codesourcery.com>
1735 James Norris <jnorris@codesourcery.com>
1736 Julian Brown <julian@codesourcery.com>
1737 Nathan Sidwell <nathan@codesourcery.com>
1738
1739 * c-pragma.c (oacc_pragmas): Add "routine".
1740 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
1741
ee45a32d
EB
17422015-11-08 Eric Botcazou <ebotcazou@adacore.com>
1743
1744 * c-common.c (c_common_attributes): Add scalar_storage_order.
1745 (handle_scalar_storage_order_attribute): New function.
1746 * c-pragma.c (global_sso): New variable.
1747 (maybe_apply_pragma_scalar_storage_order): New function.
1748 (handle_pragma_scalar_storage_order): Likewise.
1749 (init_pragma): Register scalar_storage_order.
1750 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
1751 * c.opt (Wscalar-storage-order): New warning.
1752 (fsso-struct=): New option.
1753
eb11eb15
MS
17542015-11-08 Martin Sebor <msebor@redhat.com>
1755
1756 * c.opt (Wplacement-new): Add a period to the end of a sentence.
1757
0aad0198
RS
17582015-11-07 Richard Sandiford <richard.sandiford@arm.com>
1759
1760 * c-common.c: Don't undef DEF_BUILTIN.
1761
8a645150
DM
17622015-11-06 David Malcolm <dmalcolm@redhat.com>
1763
1764 * c-common.c (c_cpp_error): Convert parameter from location_t to
1765 rich_location *. Eliminate the "column_override" parameter and
1766 the call to diagnostic_override_column.
1767 Update the "done_lexing" clause to set range 0
1768 on the rich_location, rather than overwriting a location_t.
1769 * c-common.h (c_cpp_error): Convert parameter from location_t to
1770 rich_location *. Eliminate the "column_override" parameter.
1771
7a5e4956
CP
17722015-11-05 Cesar Philippidis <cesar@codesourcery.com>
1773 Thomas Schwinge <thomas@codesourcery.com>
1774 James Norris <jnorris@codesourcery.com>
1775
1776 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
1777 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
1778 clauses with parallel and kernels and loops.
1779 * c-pragma.h (enum pragma_omp_clause): Add entries for
1780 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
1781 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
1782 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
1783 INDEPENDENT,SEQ}.
1784 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
1785
e2f5cc96
MS
17862015-11-05 Martin Sebor <msebor@redhat.com>
1787
1788 PR c++/67942
1789 * c.opt (-Wplacement-new): New option.
1790
e01d41e5
JJ
17912015-11-05 Jakub Jelinek <jakub@redhat.com>
1792
1793 * c-common.h (c_finish_omp_atomic): Add TEST argument.
1794 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
1795 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
1796 save_expr or create_tmp_var* if TEST is true.
1797 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
1798 Don't call add_stmt here.
1799 (struct c_omp_check_loop_iv_data): New type.
1800 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
1801 c_omp_check_loop_iv_exprs): New functions.
1802 (c_omp_split_clauses): Adjust for lastprivate being allowed on
1803 distribute.
1804 (c_omp_declare_simd_clauses_to_numbers): Change
1805 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
1806 (c_omp_declare_simd_clauses_to_decls): Similarly change those
1807 from numbers to PARM_DECLs.
1808
595278be
MM
18092015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
1810
1811 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
1812 flag_checking.
1813
3f8257db 18142015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
1815
1816 PR c++-common/67882
b3d5bc62
JJ
1817 * c-common.h (fold_offsetof_1): Add argument.
1818 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
1819 offsetof expressions that reference elements past the end of
1820 an array.
1821
4bf9e5a8
TS
18222015-11-03 Thomas Schwinge <thomas@codesourcery.com>
1823 Chung-Lin Tang <cltang@codesourcery.com>
1824
1825 * c-pragma.c (oacc_pragmas): Add "atomic".
1826 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
1827
3b1661a9
ES
18282015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
1829
1830 * c-common.c (handle_target_clones_attribute): New.
1831 (c_common_attribute_table): Add handle_target_clones_attribute.
1832 (handle_always_inline_attribute): Add check on target_clones attribute.
1833 (handle_target_attribute): Ditto.
1834
2adfab87
AM
18352015-10-29 Andrew MacLeod <amacleod@redhat.com>
1836
1837 * array-notation-common.c: Reorder #include's and remove duplicates.
1838 * c-ada-spec.c: Likewise.
1839 * c-cilkplus.c: Likewise.
1840 * c-common.c: Likewise.
1841 * c-cppbuiltin.c: Likewise.
1842 * c-dump.c: Likewise.
1843 * c-format.c: Likewise.
1844 * c-gimplify.c: Likewise.
1845 * c-indentation.c: Likewise.
1846 * c-lex.c: Likewise.
1847 * c-omp.c: Likewise.
1848 * c-opts.c: Likewise.
1849 * c-pch.c: Likewise.
1850 * c-ppoutput.c: Likewise.
1851 * c-pragma.c: Likewise.
1852 * c-pretty-print.c: Likewise.
1853 * c-semantics.c: Likewise.
1854 * c-ubsan.c: Likewise.
1855 * cilk.c: Likewise.
1856 * stub-objc.c: Likewise.
1857
d90ec4f2
JM
18582015-10-28 Jason Merrill <jason@redhat.com>
1859
1860 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
1861
88bae6f4
TS
18622015-10-27 Thomas Schwinge <thomas@codesourcery.com>
1863 James Norris <jnorris@codesourcery.com>
1864 Cesar Philippidis <cesar@codesourcery.com>
1865
1866 PR c/64765
1867 PR c/64880
1868 * c-common.h (c_oacc_split_loop_clauses): Declare function.
1869 * c-omp.c (c_oacc_split_loop_clauses): New function.
1870
b1726d6c
MS
18712015-10-21 Martin Sebor <msebor@redhat.com>
1872
1873 PR driver/68043
1874 * c.opt: End each sentence that describes an option with a period.
1875
fa60eeb9
MP
18762015-10-20 Marek Polacek <polacek@redhat.com>
1877
1878 * array-notation-common.c (is_cilkplus_vector_p): Define.
1879 * c-common.h (is_cilkplus_vector_p): Declare.
1880
95979049
MP
18812015-10-20 Marek Polacek <polacek@redhat.com>
1882
1883 * c.opt (std=gnu++11): Do not describe as experimental.
1884 (std=gnu++14): Likewise.
1885
2a9fb712
JM
18862015-10-19 Jason Merrill <jason@redhat.com>
1887
1888 * c-cppbuiltin.c (c_cpp_builtins): Define
1889 __cpp_nontype_template_args.
1890
13b380a3
JM
18912015-10-19 Jason Merrill <jason@redhat.com>
1892
1893 * c-cppbuiltin.c (c_cpp_builtins): Define
1894 __cpp_enumerator_attributes, __cpp_fold_expressions,
1895 __cpp_unicode_characters.
1896
d9a6bd32
JJ
18972015-10-13 Jakub Jelinek <jakub@redhat.com>
1898 Aldy Hernandez <aldyh@redhat.com>
1899
1900 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
1901 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
1902 (c_define_builtins): Likewise.
1903 * c-common.h (enum c_omp_clause_split): Add
1904 C_OMP_CLAUSE_SPLIT_TASKLOOP.
1905 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
1906 (c_finish_omp_for): Add ORIG_DECLV argument.
1907 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
1908 201511 instead of 201307.
1909 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
1910 OMP_CRITICAL_CLAUSES to it.
1911 (c_finish_omp_ordered): Add CLAUSES argument, set
1912 OMP_ORDERED_CLAUSES to it.
1913 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
1914 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
1915 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
1916 constructs and new OpenMP 4.5 clauses. Clear
1917 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
1918 verification code.
1919 * c-pragma.c (omp_pragmas_simd): Add taskloop.
1920 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
1921 (enum pragma_omp_clause): Add
1922 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
1923 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
1924
624d31fe
RS
19252015-10-05 Richard Sandiford <richard.sandiford@arm.com>
1926
1927 * c-lex.c (interpret_float): Use real_equal instead of
1928 REAL_VALUES_EQUAL.
1929
b8fd7909
JM
19302015-10-04 Jason Merrill <jason@redhat.com>
1931
1932 Implement N4514, C++ Extensions for Transactional Memory.
1933 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
1934 (c_common_attribute_table): Add transaction_safe_dynamic.
1935 transaction_safe now affects type identity.
1936 (handle_tm_attribute): Handle transaction_safe_dynamic.
1937 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
1938 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
1939 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
1940 (D_TRANSMEM): New.
1941 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
1942 * c-pretty-print.c (pp_c_attributes_display): Don't print
1943 transaction_safe in C++.
1944
12651878
MP
19452015-10-02 Marek Polacek <polacek@redhat.com>
1946
1947 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
1948
3e3b8d63
MP
19492015-10-02 Marek Polacek <polacek@redhat.com>
1950
1951 PR c/64249
1952 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
1953 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
1954 * c.opt (Wduplicated-cond): New option.
1955
0d1a8f75
JM
19562015-10-01 Joseph Myers <joseph@codesourcery.com>
1957
1958 * c.opt (std=c11): Do not describe as experimental.
1959 (std=gnu11): Likewise.
1960 (std=iso9899:2011): Likewise.
1961
3e32ee19
NS
19622015-09-28 Nathan Sidwell <nathan@codesourcery.com>
1963
1964 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
1965 (DEF_FUNCTION_TYPE_VAR_11): Delete.
1966
974348ee
MP
19672015-09-25 Marek Polacek <polacek@redhat.com>
1968
1969 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
1970 (ubsan_instrument_shift): Likewise.
1971
15dbc1a6
MP
19722015-09-25 Marek Polacek <polacek@redhat.com>
1973
1974 PR sanitizer/64906
1975 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
1976
6b95d7cc
PP
19772015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
1978
1979 * c-indentation.c (should_warn_for_misleading_indentation):
1980 Compare next_stmt_vis_column with guard_line_first_nws instead
1981 of with guard_line_vis_column.
1982
c1822f9c
MLI
19832015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
1984
1985 PR c/49654
1986 PR c/49655
1987 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
1988 options and options not valid for the current language.
1989
d5398058
PP
19902015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
1991
1992 * c-indentation.c (should_warn_for_misleading_indentation):
1993 Float out and consolidate the calls to get_visual_column that
1994 are passed guard_exploc as an argument. Compare
1995 next_stmt_vis_column with guard_line_first_nws instead of with
1996 body_line_first_nws.
1997
6b333269
NS
19982015-09-22 Nathan Sidwell <nathan@codesourcery.com>
1999
2000 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
2001 Wnamespaces): New C++ warnings.
2002
a75f1574
JM
20032015-09-22 Jason Merrill <jason@redhat.com>
2004
2005 * c-common.h (abi_compat_version_crosses): New.
2006 (warn_abi_version): Declare.
2007 * c-common.c: Define it.
2008 * c-opts.c (c_common_post_options): Handle it.
2009 flag_abi_compat_version defaults to 8.
2010
bdaaa8b7
VV
20112015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
2012
2013 Complete the implementation of N4230, Nested namespace definition.
2014 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
2015 __cpp_nested_namespace_definitions.
2016
eaa797e8
MLI
20172015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2018
2019 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
2020
c4914de6
MLI
20212015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2022
2023 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
2024 when warning.
2025 * c-pragma.h (pragma_lex): Add optional loc argument.
2026
fcb87c50
MM
20272015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
2028
2029 * c-format.c (check_format_arg): Adjust to use common block size in all
2030 object pools.
2031
31bdd08a
DM
20322015-09-15 David Malcolm <dmalcolm@redhat.com>
2033
2034 * c-format.c (location_from_offset): Update for change in
2035 signature of location_get_source_line.
2036 * c-indentation.c (get_visual_column): Likewise.
2037 (line_contains_hash_if): Likewise.
2038
aa9f4b4c
MP
20392015-09-14 Marek Polacek <polacek@redhat.com>
2040
2041 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
2042 setting various warnings.
2043
aa256c4a
MP
20442015-09-14 Marek Polacek <polacek@redhat.com>
2045
2046 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
2047 a negative value.
2048
0f876f22
MW
20492015-09-11 Mark Wielaard <mjw@redhat.com>
2050
2051 PR c/28901
2052 * c.opt (Wunused-variable): Option from common.opt.
2053 (Wunused-const-variable): New option.
2054
273aa49e
PC
20552015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
2056
2057 PR c++/53184
2058 * c.opt ([Wsubobject-linkage]): Add.
2059
1807ffc1
MS
20602015-09-03 Martin Sebor <msebor@redhat.com>
2061
2062 PR c/66516
2063 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
2064 functions.
2065 * c-common.c (reject_gcc_builtin): Define.
2066
38942840
BI
20672015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
2068
2069 PR middle-end/60586
2070 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
2071 prototype.
2072 * c-gimplify.c (c_gimplify_expr): Added a call to the function
2073 cilk_gimplify_call_params_in_spawned_fn.
2074 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
2075 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
2076 unwrapping.
2077
c316b5e4
MP
20782015-08-25 Marek Polacek <polacek@redhat.com>
2079
2080 PR middle-end/67330
2081 * c-common.c (handle_weak_attribute): Don't check whether the
2082 visibility can be changed here.
2083
584a7c46
MLI
20842015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
2085
2086 * c-lex.c (c_lex_with_flags): Use explicit locations.
2087
a79683d5
TS
20882015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
2089
2090 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
2091 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
2092
61717a45
FXC
20932015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2094
2095 PR middle-end/36757
2096 * c-common.c (check_builtin_function_arguments): Add check
2097 for BUILT_IN_SIGNBIT argument.
2098
329524f5
PC
20992015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
2100
2101 PR c++/67160
2102 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
2103 in c++1z mode.
2104
4ee55665
MP
21052015-08-17 Marek Polacek <polacek@redhat.com>
2106
2107 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
2108 with whitespaces before qualifier names.
2109
b893e375
MP
21102015-08-12 Marek Polacek <polacek@redhat.com>
2111
2112 PR c++/55095
2113 * c-common.c (maybe_warn_shift_overflow): Properly handle
2114 left-shifting 1 into the sign bit.
2115
c2d89095
MLI
21162015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
2117
2118 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
2119
971e17ff
AS
21202015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
2121 Braden Obrzut <admin@maniacsvault.net>
2122 Jason Merrill <jason@redhat.com>
2123
2124 Add C++ Concepts TS support.
2125 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
2126 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
2127 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
2128 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
2129 * c-opts.c (set_std_cxx1z): Set flag_concepts.
2130 * c.opt (fconcepts): New.
2131
b3d5bc62
JJ
21322015-08-02 Martin Sebor <msebor@redhat.com>
2133
2134 * c.opt (-Wframe-address): New warning option.
2135
8ebca419
PP
21362015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
2137
2138 * c-indentation.c (should_warn_for_misleading_indentation):
2139 Improve heuristics.
2140
1a1e101f
PP
21412015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
2142
2143 * c-indentation.c (get_visual_column): Add parameter first_nws,
2144 use it. Update comment documenting the function.
2145 (is_first_nonwhitespace_on_line): Remove.
2146 (should_warn_for_misleading_indentation): Replace usage of
2147 of is_first_nonwhitespace_on_line with get_visual_column.
2148
992118a1
PP
21492015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
2150
2151 * c-indentation.h (struct token_indent_info): Define.
2152 (get_token_indent_info): Define.
2153 (warn_for_misleading_information): Declare.
2154 * c-common.h (warn_for_misleading_information): Remove.
2155 * c-identation.c (warn_for_misleading_indentation):
2156 Change declaration to take three token_indent_infos. Adjust
2157 accordingly.
2158 * c-identation.c (should_warn_for_misleading_indentation):
2159 Likewise. Bail out early if the body is a compound statement.
2160 (guard_tinfo_to_string): Define.
2161
e8fa3817
JM
21622015-07-30 Jason Merrill <jason@redhat.com>
2163
2164 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
2165 '*' for reference decay.
2166
173864e8
MP
21672015-07-30 Marek Polacek <polacek@redhat.com>
2168
2169 * c-common.c (warn_tautological_cmp): Bail for float types.
2170
f2afe6dd
MP
21712015-07-27 Marek Polacek <polacek@redhat.com>
2172
2173 PR bootstrap/67030
2174 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
2175
05b28fd6
MP
21762015-07-27 Marek Polacek <polacek@redhat.com>
2177
2178 PR c++/66555
2179 PR c/54979
2180 * c-common.c (find_array_ref_with_const_idx_r): New function.
2181 (warn_tautological_cmp): New function.
2182 * c-common.h (warn_tautological_cmp): Declare.
2183 * c.opt (Wtautological-compare): New option.
2184
5a5062b8
MP
21852015-07-23 Marek Polacek <polacek@redhat.com>
2186
2187 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
2188 (ubsan_instrument_shift): Likewise.
2189
dc891fe7
MP
21902015-07-23 Marek Polacek <polacek@redhat.com>
2191
2192 PR sanitizer/66908
2193 * c-ubsan.c: Include gimplify.h.
2194 (ubsan_instrument_division): Unshare OP0 and OP1.
2195 (ubsan_instrument_shift): Likewise.
2196
451b5e48
MP
21972015-07-20 Marek Polacek <polacek@redhat.com>
2198 Richard Sandiford <richard.sandiford@arm.com>
2199
2200 PR c++/55095
2201 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
2202 Use EXPR_LOC_OR_LOC.
2203 (maybe_warn_shift_overflow): New function.
2204 * c-common.h (maybe_warn_shift_overflow): Declare.
2205 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
2206 * c.opt (Wshift-overflow): New option.
2207
fb0b2914
ML
22082015-07-16 Martin Liska <mliska@suse.cz>
2209
2210 * c-format.c (static void check_format_info_main): Use
2211 object_allocator instead of pool_allocator.
2212 (check_format_arg): Likewise.
2213 (check_format_info_main): Likewise.
2214
903f5c23
AM
22152015-07-15 Andrew MacLeod <amacleod@redhat.com>
2216
2217 * c-opts.c: Remove multiline #include comment.
2218
026c3cfd
AH
22192015-07-12 Aldy Hernandez <aldyh@redhat.com>
2220
2221 * c-common.c: Fix double word typos.
2222
bb49ee66
EB
22232015-07-10 Eric Botcazou <ebotcazou@adacore.com>
2224
2225 * c-ada-spec.h (cpp_operation): Revert latest change.
2226 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
2227 constructors and destructors.
2228
1916bcb5
AM
22292015-07-09 Andrew MacLeod <amacleod@redhat.com>
2230
2231 * c-common.h: Adjust includes for flags.h changes.
2232 * stub-objc.c: Likewise.
026c3cfd 2233
a9dcd529
EB
22342015-07-08 Eric Botcazou <ebotcazou@adacore.com>
2235
2236 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
2237 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
2238
b03b462f
JJ
22392015-07-08 Jakub Jelinek <jakub@redhat.com>
2240
2241 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
2242 are to be removed, return NULL rather than original clauses list.
2243
c7131fb2
AM
22442015-07-07 Andrew MacLeod <amacleod@redhat.com>
2245
2246 * array-notation-common.c: Adjust includes.
2247 * c-ada-spec.c: Likewise.
2248 * c-cilkplus.c: Likewise.
2249 * c-common.h: Likewise.
2250 * c-cppbuiltin.c: Likewise.
2251 * c-dump.c: Likewise.
2252 * c-format.c: Likewise.
2253 * c-gimplify.c: Likewise.
2254 * c-indentation.c: Likewise.
2255 * c-lex.c: Likewise.
2256 * c-omp.c: Likewise.
2257 * c-opts.c: Likewise.
2258 * c-pch.c: Likewise.
2259 * c-ppoutput.c: Likewise.
2260 * c-pragma.c: Likewise.
2261 * c-pretty-print.c: Likewise.
2262 * c-semantics.c: Likewise.
2263 * c-ubsan.c: Likewise.
2264 * cilk.c: Likewise.
2265 * stub-objc.c: Likewise.
2266
2a7fb83f
EB
22672015-07-07 Eric Botcazou <ebotcazou@adacore.com>
2268
2269 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
2270 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
2271
a03c9bf1
JM
22722015-07-01 Jason Merrill <jason@redhat.com>
2273
36a85135
JM
2274 * c-common.h (D_CXX11): Rename from D_CXX0X.
2275 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
2276 * c-common.c: Adjust.
2277
e7fa68d5
JM
2278 * c-opts.c (c_common_post_options): Default to C++14.
2279
a03c9bf1
JM
2280 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
2281
fe95b036
ESR
22822015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
2283
2284 Implement N4197 - Adding u8 character literals
b3d5bc62 2285 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 2286 CPP_CHAR.
b3d5bc62 2287 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 2288 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 2289 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
2290 and CPP_UTF8CHAR tokens.
2291 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 2292
da2e71c9
MLI
22932015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2294
2295 PR fortran/66605
2296 * c-common.c (do_warn_unused_parameter): Move here.
2297 * c-common.h (do_warn_unused_parameter): Declare.
2298
b155cfd9
MP
22992015-06-29 Marek Polacek <polacek@redhat.com>
2300
2301 PR c/66322
2302 * c-common.c (check_case_bounds): Add bool * parameter. Set
2303 OUTSIDE_RANGE_P.
2304 (c_add_case_label): Add bool * parameter. Pass it down to
2305 check_case_bounds.
2306 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
2307 warning here.
2308 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
2309 declarations.
2310
31521951
MP
23112015-06-27 Marek Polacek <polacek@redhat.com>
2312
2313 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
2314 or VECTOR_INTEGER_TYPE_P throughout.
2315 * c-gimplify.c: Likewise.
2316
22d03525
MP
23172015-06-26 Marek Polacek <polacek@redhat.com>
2318
2319 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
2320 * c-common.c (c_fully_fold_internal): Likewise.
2321 (c_alignof_expr): Likewise.
2322 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
2323 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 2324 * cilk.c (create_parm_list): Likewise.
22d03525 2325
af05e6e5
MP
23262015-06-26 Marek Polacek <polacek@redhat.com>
2327
2328 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
2329
f0889939
AM
23302015-06-25 Andrew MacLeod <amacleod@redhat.com>
2331
2332 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
2333 * c-gimplify.c: Likewise.
2334 * c-pragma.c: Likewise.
2335 * c-ubsan.c: Likewise.
2336 * cilk.c: Likewise.
2337
ca752f39
RS
23382015-06-25 Richard Sandiford <richard.sandiford@arm.com>
2339
2340 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
2341 ggc_hasher.
2342
16a16ec7
AM
23432015-06-25 Andrew MacLeod <amacleod@redhat.com>
2344
2345 * cilk.c: Move calls.h after tm.h in the include chain.
2346
0ae9bd27
MP
23472015-06-25 Marek Polacek <polacek@redhat.com>
2348
2349 * array-notation-common.c: Use VAR_P throughout.
2350 * c-ada-spec.c: Likewise.
2351 * c-common.c: Likewise.
2352 * c-format.c: Likewise.
2353 * c-gimplify.c: Likewise.
2354 * c-omp.c: Likewise.
2355 * c-pragma.c: Likewise.
2356 * c-pretty-print.c: Likewise.
2357 * cilk.c: Likewise.
2358
62f9079a
MP
23592015-06-25 Marek Polacek <polacek@redhat.com>
2360
2361 * cilk.c (extract_free_variables): Use is_global_var.
2362
0fa16060
RS
23632015-06-23 Richard Sandiford <richard.sandiford@arm.com>
2364
2365 * c-common.c: Don't include target-def.h.
2366
a68ae2e1
MP
23672015-06-23 Marek Polacek <polacek@redhat.com>
2368
2369 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
2370 when comparing INTEGER_CSTs.
2371
c6a2f2d9
PMR
23722015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
2373
2374 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
2375 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
2376 (dump_ada_template): Skip partially specialized types.
2377
6b4db501
MM
23782015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
2379
2380 * c-common.c (scalar_to_vector): Use std::swap instead of manually
2381 swapping.
2382
abb226c9
AM
23832015-06-17 Andrew MacLeod <amacleod@redhat.com>
2384
2385 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
2386 * c-ada-spec.c: Likewise.
2387 * c-cilkplus.c: Likewise.
2388 * c-common.c: Likewise.
2389 * c-common.h: Likewise.
2390 * c-cppbuiltin.c: Likewise.
2391 * c-dump.c: Likewise.
2392 * c-format.c: Likewise.
2393 * c-gimplify.c: Likewise.
2394 * c-indentation.c: Likewise.
2395 * c-lex.c: Likewise.
2396 * c-omp.c: Likewise.
2397 * c-opts.c: Likewise.
2398 * c-pch.c: Likewise.
2399 * c-ppoutput.c: Likewise.
2400 * c-pragma.c: Likewise.
2401 * c-pretty-print.c: Likewise.
2402 * c-semantics.c: Likewise.
2403 * c-ubsan.c: Likewise.
2404 * cilk.c: Likewise.
2405 * stub-objc.c: Likewise.
2406
076fecad
PP
24072015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
2408
2409 PR c++/65168
2410 * c-common.c (c_common_truthvalue_conversion): Warn when
2411 converting an address of a reference to a truth value.
2412
13fdf2e2
AM
24132015-06-08 Andrew MacLeod <amacleod@redhat.com>
2414
2415 * array-notation-common.c : Adjust include files.
2416 * c-ada-spec.c : Likewise.
2417 * c-cilkplus.c : Likewise.
2418 * c-common.c : Likewise.
2419 * c-common.h : Likewise.
2420 * c-cppbuiltin.c : Likewise.
2421 * c-dump.c : Likewise.
2422 * c-format.c : Likewise.
2423 * c-gimplify.c : Likewise.
2424 * c-indentation.c : Likewise.
2425 * c-lex.c : Likewise.
2426 * c-omp.c : Likewise.
2427 * c-opts.c : Likewise.
2428 * c-pch.c : Likewise.
2429 * c-ppoutput.c : Likewise.
2430 * c-pragma.c : Likewise.
2431 * c-pretty-print.c : Likewise.
2432 * c-semantics.c : Likewise.
2433 * c-ubsan.c : Likewise.
2434 * cilk.c : Likewise.
2435 * stub-objc.c : Likewise.
2436
a1661b90
MP
24372015-06-08 Marek Polacek <polacek@redhat.com>
2438
2439 PR c/66415
2440 * c-format.c (location_from_offset): Return LOC if LINE is null.
2441
d7438551
AH
24422015-06-05 Aldy Hernandez <aldyh@redhat.com>
2443
2444 * c-common.h (c_parse_final_cleanups): New prototype.
2445 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
2446
b3d5bc62
JJ
24472015-06-04 Sriraman Tallam <tmsriram@google.com>
2448
2449 * c-common.c (noplt): New attribute.
2450 (handle_noplt_attribute): New handler.
2451
ecb9f223
AM
24522015-06-04 Andrew MacLeod <amacleod@redhat.com>
2453
2454 * array-notation-common.c: Adjust includes for restructured coretypes.h.
2455 * c-ada-spec.c: Likewise.
2456 * c-cilkplus.c: Likewise.
2457 * c-common.c: Likewise.
2458 * c-common.h: Likewise.
2459 * c-cppbuiltin.c: Likewise.
2460 * c-dump.c: Likewise.
2461 * c-format.c: Likewise.
2462 * c-gimplify.c: Likewise.
2463 * c-indentation.c: Likewise.
2464 * c-lex.c: Likewise.
2465 * c-omp.c: Likewise.
2466 * c-opts.c: Likewise.
2467 * c-pch.c: Likewise.
2468 * c-ppoutput.c: Likewise.
2469 * c-pragma.c: Likewise.
2470 * c-pretty-print.c: Likewise.
2471 * c-semantics.c: Likewise.
2472 * c-ubsan.c: Likewise.
2473 * cilk.c: Likewise.
2474 * stub-objc.c: Likewise.
2475
6ac48155
DM
24762015-06-02 David Malcolm <dmalcolm@redhat.com>
2477
2478 PR c/66220:
2479 * c-indentation.c (should_warn_for_misleading_indentation): Use
2480 expand_location rather than expand_location_to_spelling_point.
2481 Don't warn if the guarding statement is more indented than the
2482 next/body stmts.
2483
773ce42e
DM
24842015-06-02 David Malcolm <dmalcolm@redhat.com>
2485
2486 * c-indentation.c (warn_for_misleading_indentation): Bail out
2487 immediately if -Wmisleading-indentation isn't enabled.
2488
4fef8379
ML
24892015-06-01 Martin Liska <mliska@suse.cz>
2490
2491 * c-format.c (check_format_arg):Use new type-based pool allocator.
2492 (check_format_info_main) Likewise.
2493
1edfb384
EB
24942015-05-31 Eric Botcazou <ebotcazou@adacore.com>
2495
2496 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
2497 (has_nontrivial_methods): Likewise.
2498
9677ef52
MP
24992015-05-25 Marek Polacek <polacek@redhat.com>
2500
2501 * c-ubsan.c (ubsan_instrument_shift): Use type0.
2502
fd5c817a
MP
25032015-05-22 Marek Polacek <polacek@redhat.com>
2504
2505 PR c/47043
2506 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
2507
a2f45fe6 25082015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
2509
2510 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
2511 STACK_GROWS_DOWNWARD.
2512
a2f45fe6 25132015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
2514
2515 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
2516 STACK_GROWS_DOWNWARD rather than if it is defined.
2517
0fee2ac2 25182015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 2519
0fee2ac2
MLI
2520 PR c/52952
2521 * c-format.c (location_column_from_byte_offset): New.
2522 (location_from_offset): New.
2523 (struct format_wanted_type): Add offset_loc field.
2524 (check_format_info): Move handling of location for extra arguments
2525 closer to the point of warning.
2526 (check_format_info_main): Pass the result of location_from_offset
2527 to warning_at.
2528 (format_type_warning): Pass the result of location_from_offset
2529 to warning_at.
2530
cf4ef6f7
MP
25312015-05-20 Marek Polacek <polacek@redhat.com>
2532
2533 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
2534
3a65ee74
MP
25352015-05-20 Marek Polacek <polacek@redhat.com>
2536
2537 * c-ada-spec.c (dump_sloc): Use DECL_P.
2538
21b634ae
MP
25392015-05-20 Marek Polacek <polacek@redhat.com>
2540
2541 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
2542 * c-common.c: Likewise.
2543
0e50b624
DM
25442015-05-19 David Malcolm <dmalcolm@redhat.com>
2545
2546 * c-common.h (fe_file_change): Strengthen param from
2547 const line_map * to const line_map_ordinary *.
2548 (pp_file_change): Likewise.
2549 * c-lex.c (fe_file_change): Likewise.
2550 (cb_define): Use linemap_check_ordinary when invoking
2551 SOURCE_LINE.
2552 (cb_undef): Likewise.
2553 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
2554 invoking cb_file_change.
2555 (c_finish_options): Likewise.
2556 (push_command_line_include): Likewise.
2557 (cb_file_change): Strengthen param "new_map" from
2558 const line_map * to const line_map_ordinary *.
2559 * c-ppoutput.c (cb_define): Likewise for local "map".
2560 (pp_file_change): Likewise for param "map" and local "from".
2561
fab27f52
MM
25622015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
2563
2564 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
2565
2fe1d762
TV
25662015-05-18 Tom de Vries <tom@codesourcery.com>
2567
2568 * c-common.c (build_va_arg_1): New function.
2569 (build_va_arg): Add address operator to va_list operand if necessary.
2570
7a37fa90
MM
25712015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
2572
2573 PR c/48956
2574 * c-common.c (int_safely_convertible_to_real_p): Define.
2575 (unsafe_conversion_p): Check conversions involving complex types.
2576 (conversion_warning): Add new warning message for conversions which
2577 discard imaginary component.
2578 * c-common.h: (enum conversion_safety): Add new enumerator for such
2579 conversions.
2580
3aa3c9fc
MP
25812015-05-14 Marek Polacek <polacek@redhat.com>
2582
2583 PR c/66066
2584 PR c/66127
2585 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
2586 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
2587 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
2588 use it. If FOR_INT_CONST, require that all evaluated operands be
2589 INTEGER_CSTs.
2590
c3388e62
DM
25912015-05-12 David Malcolm <dmalcolm@redhat.com>
2592
2593 * c-common.h (warn_for_misleading_indentation): New prototype.
2594 * c-indentation.c: New file.
2595 * c.opt (Wmisleading-indentation): New option.
2596
c7b38fd5
TV
25972015-05-12 Tom de Vries <tom@codesourcery.com>
2598
2599 PR tree-optimization/66010
2600 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
2601
381bf11e
JM
26022015-05-09 Jason Merrill <jason@redhat.com>
2603
edff0c06
JM
2604 * c-opts.c (c_common_post_options): Also clear
2605 cpp_opts->cpp_warn_cxx11_compat.
2606
129211bc
JM
2607 * c-common.h (enum cxx_dialect): Add cxx_unset.
2608 * c-common.c (cxx_dialect): Initialize to cxx_unset.
2609 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
2610
381bf11e
JM
2611 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
2612 (std=gnu++0x): Mark as Undocumented.
2613 (std=gnu++1y): Add deprecated message.
2614
fe191308
JM
26152015-05-08 Jason Merrill <jason@redhat.com>
2616
765189ff
JM
2617 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
2618 * c-opts.c: Adjust.
2619
fe191308
JM
2620 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
2621
755e528f
MP
26222015-05-08 Marek Polacek <polacek@redhat.com>
2623
2624 PR c/64918
2625 * c.opt (Woverride-init-side-effects): New option.
2626
0173bd2a
MP
26272015-05-07 Marek Polacek <polacek@redhat.com>
2628
2629 PR c/65179
2630 * c-common.c (c_fully_fold_internal): Warn when left shifting a
2631 negative value.
2632 * c.opt (Wshift-negative-value): New option.
2633 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
2634 when -Wextra and C99/C++11 mode.
2635
e0f0d3b9
MP
26362015-05-07 Marek Polacek <polacek@redhat.com>
2637 Martin Uecker <uecker@eecs.berkeley.edu>
2638
2639 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
2640 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
2641
8243e2a9
JM
26422015-05-05 Jason Merrill <jason@redhat.com>
2643
2644 * c.opt (Wterminate): New.
2645
577cd070
MP
26462015-04-30 Marek Polacek <polacek@redhat.com>
2647
2648 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
2649 require that the non-constant be of a boolean type.
2650
0373796b
JT
26512015-04-29 Josh Triplett <josh@joshtriplett.org>
2652
e0f0d3b9
MP
2653 * c-common.c (handle_section_attribute): Refactor to reduce
2654 nesting and distinguish between error cases.
0373796b 2655
716c0ba6
MP
26562015-04-29 Marek Polacek <polacek@redhat.com>
2657
2658 PR c/64610
2659 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
2660 with 0/1.
2661
8848828b
JJ
26622015-04-29 Jakub Jelinek <jakub@redhat.com>
2663
2664 * c-common.h (omp_clause_mask): Unconditionally define as a class.
2665 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
2666 HOST_BITS_PER_WIDE_INT.
2667
ecd0e562
TV
26682015-04-28 Tom de Vries <tom@codesourcery.com>
2669
2670 PR tree-optimization/65887
2671 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
2672
2a877204 26732015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 2674 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
2675
2676 * c-ada-spec.c (in_function): Delete.
2677 (dump_generic_ada_node): Do not change in_function and remove the
2678 redundant code dealing with it.
2679 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
2680 (print_ada_methods): Output the static member functions in a nested
2681 package after the regular methods as well as associated renamings.
2682
4853031e
MP
26832015-04-24 Marek Polacek <polacek@redhat.com>
2684
2685 PR c/65830
2686 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
2687 and OPT_Wshift_count_overflow.
2688
8c2b7f79
MP
2689 PR c/63357
2690 * c-common.c (warn_logical_operator): Warn if the operands have the
2691 same expressions.
2692
b8787813
MP
26932015-04-24 Marek Polacek <polacek@redhat.com>
2694
2695 PR c/61534
2696 * c-common.c (warn_logical_operator): Bail if either operand comes
2697 from a macro expansion.
2698
8fba1830
BRF
26992015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
2700
2701 PR target/55143
2702 * c-common.c (c_default_pointer_mode): Add definition.
2703 * c-common.h (c_default_pointer_mode): Add declaration.
2704
17958621
JJ
27052015-03-11 Jakub Jelinek <jakub@redhat.com>
2706
2707 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
2708 on record_builtin_type argument.
2709
7ccb1a11
JJ
27102015-03-10 Jakub Jelinek <jakub@redhat.com>
2711
2712 PR c/65120
2713 * c-common.c (warn_logical_not_parentheses): Don't warn for
2714 !x == 0 or !x != 0.
2715
04fd785e
MP
27162015-03-07 Marek Polacek <polacek@redhat.com>
2717
2718 PR sanitizer/65280
2719 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
2720 before trying to figure out whether we have a flexible array member.
2721
a4e26206 27222015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 2723 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
2724
2725 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
2726
0d2489f4
EB
27272015-03-05 Eric Botcazou <ebotcazou@adacore.com>
2728
2729 PR ada/65319
2730 * c-ada-spec.c (print_destructor): Remove obsolete code.
2731
83ed54d7
EB
27322015-03-01 Eric Botcazou <ebotcazou@adacore.com>
2733
2734 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
2735 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
2736 DECL_TEMPLATE_RESULT emulations.
2737 (dump_ada_template)): Add guard for TYPE_METHODS.
2738
7631f0e2
MP
27392015-02-27 Marek Polacek <polacek@redhat.com>
2740
2741 PR c/65040
2742 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
2743
d1783ae5
KT
27442015-02-27 Kai Tietz <ktietz@redhat.com>
2745
2746 PR c/35330
2747 * c-pragma.c (handle_pragma_weak): Do not try to create
2748 weak/alias of declarations not being function, or variable
2749 declarations.
2750
56a9f6bc
TS
27512015-02-24 Thomas Schwinge <thomas@codesourcery.com>
2752
2753 PR libgomp/64625
2754 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
2755 Remove macros.
2756 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
2757
3d5cb23d
MP
27582015-02-16 Marek Polacek <polacek@redhat.com>
2759
2760 PR c/65066
2761 * c-format.c (check_format_types): Handle null param.
2762
fa008882
MP
27632015-02-13 Marek Polacek <polacek@redhat.com>
2764
2765 PR c/65040
2766 * c-format.c (check_format_types): Don't warn about different
2767 signedness if the original value is in the range of WANTED_TYPE.
2768
785f21af
JM
27692015-02-12 Jason Merrill <jason@redhat.com>
2770
2771 PR c++/64956
2772 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
2773 to the current highest version.
2774 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
2775
4886ec8e
JJ
27762015-02-04 Jakub Jelinek <jakub@redhat.com>
2777
2778 PR c/64824
2779 PR c/64868
2780 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
2781 instead of RDIV_EXPR. Use build_binary_op instead of
2782 build2_loc.
2783
40fecdd6
JM
27842015-01-30 Joseph Myers <joseph@codesourcery.com>
2785
2786 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
2787 to pass input_location as first argument.
2788
a0c88d06
TV
27892015-01-23 Tom de Vries <tom@codesourcery.com>
2790
2791 PR libgomp/64672
2792 * c.opt (fopenacc): Mark as LTO option.
2793
1506ae0e
TV
27942015-01-23 Tom de Vries <tom@codesourcery.com>
2795
2796 PR libgomp/64707
2797 * c.opt (fopenmp): Mark as LTO option.
2798
31be63ab
JJ
27992015-01-21 Jakub Jelinek <jakub@redhat.com>
2800
2801 PR c/63307
b1726d6c 2802 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
2803 (compare_decls): Fix up formatting.
2804
28052015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
2806
2807 PR c/63307
2808 * cilk.c: Include vec.h.
2809 (struct cilk_decls): New structure.
2810 (wrapper_parm_cb): Split this function to...
2811 (fill_decls_vec): ...this...
2812 (create_parm_list): ...and this.
2813 (compare_decls): New function.
2814 (for_local_cb): Remove.
2815 (wrapper_local_cb): Ditto.
2816 (build_wrapper_type): For now first traverse and fill vector of
2817 declarations then sort it and then deal with sorted vector.
2818 (cilk_outline): Ditto.
2819 (declare_one_free_variable): Ditto.
2820
6875457f
JM
28212015-01-21 Jason Merrill <jason@redhat.com>
2822
2823 PR c++/64629
2824 * c-format.c (check_format_arg): Call decl_constant_value.
2825
185c9e56
ML
28262015-01-19 Martin Liska <mliska@suse.cz>
2827
2828 * c-common.c (handle_noicf_attribute): New function.
2829
41dbbb37
TS
28302015-01-15 Thomas Schwinge <thomas@codesourcery.com>
2831 Bernd Schmidt <bernds@codesourcery.com>
2832 James Norris <jnorris@codesourcery.com>
2833 Cesar Philippidis <cesar@codesourcery.com>
2834 Ilmir Usmanov <i.usmanov@samsung.com>
2835 Jakub Jelinek <jakub@redhat.com>
2836
2837 * c.opt (fopenacc): New option.
2838 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
2839 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
2840 New macros.
2841 * c-common.h (c_finish_oacc_wait): New prototype.
2842 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
2843 (c_finish_oacc_wait): New function.
2844 * c-pragma.c (oacc_pragmas): New variable.
2845 (c_pp_lookup_pragma, init_pragma): Handle it.
2846 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
2847 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
2848 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
2849 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
2850 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
2851 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
2852 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
2853 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
2854 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
2855 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
2856 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
2857 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
2858 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
2859 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
2860 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
2861 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
2862 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
2863 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
2864 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
2865 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
2866 PRAGMA_OACC_CLAUSE_WORKER.
2867
3f8257db 28682015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
2869
2870 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
2871 for the new option fstack-protector_explicit.
2872 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
2873 (handle_stack_protect_attribute): New function.
2874
3f8257db 28752015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
2876
2877 * c.opt: New option -Warray-bounds=.
2878
adfac8df
JJ
28792015-01-09 Michael Collison <michael.collison@linaro.org>
2880
2881 * array-notation-common.c: Include hash-set.h, machmode.h,
2882 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2883 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
2884 * c-ada-spec.c: Ditto.
2885 * c-cilkplus.c: Ditto.
2886 * c-common.c: Include input.h due to flattening of tree.h.
2887 Define macro GCC_C_COMMON_C.
2888 * c-common.h: Flatten tree.h header files into c-common.h.
2889 Remove include of tree-core.h.
2890 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
2891 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2892 fold-const.h, wide-int.h, and inchash.h due to
2893 flattening of tree.h.
2894 * c-dump.c: Ditto.
2895 * c-format.c: Flatten tree.h header files into c-common.h.
2896 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
2897 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2898 fold-const.h, wide-int.h, and inchash.h due to
2899 flattening of tree.h.
2900 * c-dump.c: Include hash-set.h, machmode.h,
2901 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2902 fold-const.h, wide-int.h, and inchash.h due to
2903 flattening of tree.h.
2904 * c-format.c: Include hash-set.h, machmode.h,
2905 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2906 fold-const.h, wide-int.h, inchash.h and real.h due to
2907 flattening of tree.h.
2908 * c-gimplify.c: Include hash-set.h, machmode.h,
2909 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2910 fold-const.h, wide-int.h, and inchash.h due to
2911 flattening of tree.h.
2912 * cilk.c: Ditto.
2913 * c-lex.c: Ditto.
2914 * c-omp.c: Ditto.
2915 * c-opts.c: Ditto.
2916 * c-pch.c: Ditto.
2917 * c-ppoutput.c: Ditto.
2918 * c-pragma.c: Ditto.
2919 * c-pretty-print.c: Ditto.
2920 * c-semantics.c: Ditto.
2921 * c-ubsan.c: Ditto.
2922 * stub-objc.c: Ditto.
2923
f5481fc4
JM
29242015-01-08 Jason Merrill <jason@redhat.com>
2925
2926 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
2927 do_ubsan_in_current_function.
2928 (ubsan_maybe_instrument_reference_or_call): Likewise.
2929 * c-ubsan.h: Declare it.
2930
de35aa66
MS
29312015-01-08 Mike Stump <mikestump@comcast.net>
2932
2933 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
2934
4a9a42ab
MP
29352015-01-07 Marek Polacek <polacek@redhat.com>
2936
2937 PR c/64440
2938 * c-common.c (c_fully_fold_internal): Warn for division and modulo
2939 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
2940
2f42e5de
TS
29412015-01-05 Trevor Saunders <tsaunders@mozilla.com>
2942
2943 PR c++/31397
2944 * c.opt (Wsuggest-override): New option.
2945
5624e564
JJ
29462015-01-05 Jakub Jelinek <jakub@redhat.com>
2947
2948 Update copyright years.
2949
5bd012f8
MP
29502015-01-05 Marek Polacek <polacek@redhat.com>
2951
2952 PR c/64423
2953 * c-common.c (warn_array_subscript_with_type_char): Add location_t
2954 parameter. Use it.
2955 * c-common.h (warn_array_subscript_with_type_char): Update
2956 declaration.
2957
a7fa8d18
ESR
29582014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
2959
2960 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
2961 Control macro with flag_sized_deallocation.
2962
3f8257db 29632014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
2964
2965 * c.opt (Wdiscarded-array-qualifiers): New option.
2966
1f8d3e84
JJ
29672014-12-19 Jakub Jelinek <jakub@redhat.com>
2968
2969 PR preprocessor/63831
2970 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
2971 and __has_cpp_attribute here.
2972 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
2973 c_common_has_attribute.
2974 * c-common.h (c_common_has_attribute): New prototype.
2975 * c-lex.c (init_c_lex): Set cb->has_attribute to
2976 c_common_has_attribute instead of cb_has_attribute.
2977 (get_token_no_padding): New function.
2978 (cb_has_attribute): Renamed to ...
2979 (c_common_has_attribute): ... this. No longer static. Use
2980 get_token_no_padding, require ()s, don't build TREE_LIST
2981 unnecessarily, fix up formatting, adjust diagnostics, call
2982 init_attributes.
2983
20b06add
JM
29842014-12-15 Jason Merrill <jason@redhat.com>
2985
2986 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
2987 (-Wsized-deallocation): New.
2988 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
2989 to on in C++14 and up.
2990
94a073b2
JM
29912014-12-11 Jason Merrill <jason@redhat.com>
2992
acaa5911
JM
2993 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
2994
94a073b2
JM
2995 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
2996 we aren't complaining about VLAs.
2997
7fb66c15
MP
29982014-12-06 Marek Polacek <polacek@redhat.com>
2999
3000 PR tree-optimization/64183
3001 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
3002 shift-expression if it is integer_type_node. Use types_compatible_p.
3003
b731b390
JJ
30042014-11-29 Jakub Jelinek <jakub@redhat.com>
3005
3006 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
3007 last argument from create_tmp_var_raw and create_tmp_var calls.
3008 * cilk.c (gimplify_cilk_spawn): Likewise.
3009 * c-omp.c (c_finish_omp_atomic): Likewise.
3010
6a4da643
MP
30112014-11-28 Marek Polacek <polacek@redhat.com>
3012
3013 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
3014 instead of unsigned_type_node.
3015
541e35a6
MP
30162014-11-28 Marek Polacek <polacek@redhat.com>
3017
3018 PR c/63862
3019 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
3020 to op1_utype.
3021 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
3022 expression to unsigned_type_node.
3023
dcc97066
MW
30242014-11-20 Mark Wielaard <mjw@redhat.com>
3025
3026 PR debug/38757
3027 * c-opts.c (set_std_c89): Set lang_hooks.name.
3028 (set_std_c99): Likewise.
3029 (set_std_c11): Likewise.
3030 (set_std_cxx98): Likewise.
3031 (set_std_cxx11): Likewise.
3032 (set_std_cxx14): Likewise.
3033 (set_std_cxx1z): Likewise.
3034
aa7da51a
JJ
30352014-11-21 Jakub Jelinek <jakub@redhat.com>
3036
3037 PR target/63764
3038 * c-common.h (convert_vector_to_pointer_for_subscript): Change
3039 return type to bool.
009a3480 3040 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
3041 (convert_vector_to_pointer_for_subscript): Change return type to
3042 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
3043 and copy it into a TARGET_EXPR and use that instead of *vecp
3044 directly.
3045
538dd0b7
DM
30462014-11-19 David Malcolm <dmalcolm@redhat.com>
3047
3048 Merger of git branch "gimple-classes-v2-option-3".
3049 * ChangeLog.gimple-classes: New.
3050 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
3051 from being just a vec<gimple> to a vec<gbind *>.
3052
c39a5e99
JJ
30532014-11-18 Jakub Jelinek <jakub@redhat.com>
3054
3055 PR sanitizer/63813
3056 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
3057 argument to ptype, set type to TREE_TYPE (ptype). Don't call
3058 get_pointer_alignment for non-pointers. Use ptype, or if it is
3059 reference type, corresponding pointer type, as type of kind
3060 argument.
3061 (ubsan_maybe_instrument_reference,
3062 ubsan_maybe_instrument_member_call): Adjust callers.
3063
8537a4a9
MP
30642014-11-15 Marek Polacek <polacek@redhat.com>
3065
3066 PR middle-end/63884
3067 * array-notation-common.c (is_sec_implicit_index_fn): Return false
3068 for NULL fndecl.
3069 (extract_array_notation_exprs): Return for NULL node.
3070
2079956a
JM
30712014-11-12 Joseph Myers <joseph@codesourcery.com>
3072
3073 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
3074 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
3075
1304953e
JJ
30762014-11-12 Jakub Jelinek <jakub@redhat.com>
3077
3078 PR c/59708
3079 * c-common.c (check_builtin_function_arguments): Handle
3080 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
3081
e5e44252
AK
30822014-11-10 Andi Kleen <ak@linux.intel.com>
3083
3084 PR c/60804
3085 * c-common.h (check_no_cilk): Declare.
3086 * cilk.c (get_error_location): New function.
3087 (check_no_cilk): Dito.
3088
e64b984d
AK
30892014-11-10 Andi Kleen <ak@linux.intel.com>
3090
3091 * cilk.c (recognize_spawn): Use expression location
3092 for error message.
3093
13c21655
PC
30942014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
3095
3096 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
3097
42fd12b1
ESR
30982014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
3099
3100 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
3101 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
3102 (__cpp_range_based_for, __cpp_initializer_lists,
3103 __cpp_delegating_constructors, __cpp_nsdmi,
3104 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
3105 for C++11; (__cpp_attribute_deprecated): Remove in favor of
3106 __has_cpp_attribute.
3107 * c-lex.c (cb_has_attribute): New callback CPP function;
3108 (init_c_lex): Set has_attribute callback.
3109
6f450181
RB
31102014-11-04 Richard Biener <rguenther@suse.de>
3111
3112 * c-common.c (shorten_compare): Do not shorten mixed
3113 DFP and non-DFP compares.
3114
26f0e1d6
ESR
31152014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
3116
3117 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
3118 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
3119 Commentary and rearrangement of tests.
3120 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
3121 Commentary and rearrangement of tests.
3122 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto
3123 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
3124
ef4bddc2
RS
31252014-10-29 Richard Sandiford <richard.sandiford@arm.com>
3126
3127 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
3128 enum from machine_mode.
3129
c582198b
AM
31302014-10-28 Andrew MacLeod <amacleod@redhat.com>
3131
adfac8df
JJ
3132 * c-common.c: Adjust include files.
3133 * c-gimplify.c: Ditto.
3134 * cilk.c: Ditto.
3135 * c-pragma.c: Ditto.
3136 * c-ubsan.c: Ditto.
c582198b 3137
60393bbc
AM
31382014-10-27 Andrew MacLeod <amacleod@redhat.com>
3139
3140 * c-gimplify.c: Adjust include files.
3141
d723bb7c
MLI
31422014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
3143
3144 PR c++/53061
3145 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
3146 c_common_initialize_diagnostics.
3147 * c-common.h: Likewise.
3148
90f3520e
MP
31492014-10-24 Marek Polacek <polacek@redhat.com>
3150
3151 PR c/56980
3152 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
3153 print "struct"/"union"/"enum" for typedefed names.
3154
59d7607a
MP
31552014-10-23 Marek Polacek <polacek@redhat.com>
3156
3157 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
3158 in unsigned type.
3159
d95a2703
JJ
31602014-10-22 Jakub Jelinek <jakub@redhat.com>
3161 Yury Gribov <y.gribov@samsung.com>
3162
3163 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
3164 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
3165 instead of flag_sanitize_recover as bool flag.
3166
8e6ef852
KY
31672014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
3168
3169 * cilk.c: Revert previous change.
3170
948cf550
IZ
31712014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
3172
3173 PR c/63307
3174 * cilk.c: Include vec.h.
3175 (struct cilk_decls): New structure.
3176 (wrapper_parm_cb): Split this function to...
3177 (fill_decls_vec): ...this...
3178 (create_parm_list): ...and this.
3179 (compare_decls): New function.
3180 (for_local_cb): Remove.
3181 (wrapper_local_cb): Ditto.
3182 (build_wrapper_type): For now first traverse and fill vector of
3183 declarations then sort it and then deal with sorted vector.
3184 (cilk_outline): Ditto.
3185 (declare_one_free_variable): Ditto.
3186
92574c7c
MP
31872014-10-17 Marek Polacek <polacek@redhat.com>
3188
3189 * c-opts.c (c_common_post_options): Set warn_implicit_int.
3190 * c.opt (Wimplicit-int): Initialize to -1.
3191
83685514
AM
31922014-10-16 Andrew MacLeod <amacleod@redhat.com>
3193
3194 * c-pragma.c: Adjust include files.
3195 * c-semantics.c: Likewise.
3196
5b8300ea
DD
31972014-10-16 DJ Delorie <dj@redhat.com>
3198
3199 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
3200 multiples of bytes.
3201
5f83e90b
JM
32022014-10-14 Jason Merrill <jason@redhat.com>
3203
3204 PR c++/63455
3205 * c-common.h (CPP_PREPARSED_EXPR): New.
3206 (N_CP_TTYPES): Adjust.
3207
d73326ca
MP
32082014-10-15 Marek Polacek <polacek@redhat.com>
3209
3210 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
3211
78a7c317
DD
32122014-10-14 DJ Delorie <dj@redhat.com>
3213
3214 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
3215 types, not just __int128.
3216 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
3217 types, not just __int128.
3218 (cpp_atomic_builtins): Round pointer sizes up.
3219 (type_suffix): Use type precision, not specific types.
3220 * c-common.c (c_common_reswords): Remove __int128 special case.
3221 (c_common_type_for_size): Check for all __intN types, not just
3222 __int128.
3223 (c_common_type_for_mode): Likewise.
3224 (c_common_signed_or_unsigned_type): Likewise.
3225 (c_build_bitfield_integer_type): Likewise.
3226 (c_common_nodes_and_builtins): Likewise.
3227 (keyword_begins_type_specifier): Likewise.
3228 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
3229 __intN variants.
3230
2a22f99c
TS
32312014-10-12 Trevor Saunders <tsaunders@mozilla.com>
3232
3233 * c-common.c: Use hash_table instead of hashtab.
3234
2a8ef767
ESR
32352014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
3236
adfac8df 3237 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
3238 C++11 section.
3239
3c9aabbd
MG
32402014-10-03 Marc Glisse <marc.glisse@inria.fr>
3241
3242 PR c++/54427
3243 PR c++/57198
3244 PR c++/58845
3245 * c-common.c (warn_logical_operator): Punt for vectors.
3246
a15f7cb8
ESR
32472014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
3248
3249 Implement SD-6: SG10 Feature Test Recommendations
3250 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
3251 macros and the __has_header macro.
3252
8d0cf15e
JM
32532014-09-30 Jason Merrill <jason@redhat.com>
3254
dd5d5481
JM
3255 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
3256 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
3257 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
3258
b752325e
JM
3259 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
3260 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
3261
8d0cf15e
JM
3262 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
3263 * c-common.c (c_common_reswords): Remove __is_convertible_to.
3264
083e891e
MP
32652014-09-24 Marek Polacek <polacek@redhat.com>
3266
3267 PR c/61405
3268 PR c/53874
3269 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
3270
7861b648
AK
32712014-09-23 Andi Kleen <ak@linux.intel.com>
3272
3273 * c-common.c (handle_no_reorder_attribute): New function.
3274 (c_common_attribute_table): Add no_reorder attribute.
3275
9a79452d
JM
32762014-09-22 Joseph Myers <joseph@codesourcery.com>
3277
3278 * c-cppbuiltin.c (c_cpp_builtins): Define
3279 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
3280 modes.
3281
dd69f047
JM
32822014-09-18 Joseph Myers <joseph@codesourcery.com>
3283
3284 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
3285 for supported floating-point modes.
3286
737a4826
MLI
32872014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
3288
3289 * c.opt (Wpsabi): Use LangEnabledBy.
3290 * c-opts.c (c_common_handle_option): Do not handle here.
3291
8cc4b7a2
JM
32922014-09-12 Joseph Myers <joseph@codesourcery.com>
3293
3294 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
3295 macros for floating-point modes.
3296
179b5a55
MG
32972014-09-11 Marc Glisse <marc.glisse@inria.fr>
3298
3299 PR target/58757
3300 * c-cppbuiltin.c (builtin_define_float_constants): Correct
3301 __*_DENORM_MIN__ without denormals.
3302
570a11fe
JJ
33032014-09-10 Jakub Jelinek <jakub@redhat.com>
3304
3305 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
3306 ubsan_instrument_vla, ubsan_instrument_return): Adjust
3307 ubsan_create_data callers.
3308 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
3309 index is constant or BIT_AND_EXPR with constant mask and is
3310 small enough for the bound.
3311 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
3312 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
3313
b559c810
MLI
33142014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
3315
3316 * c.opt: Add CppReason to various flags.
3317 (Wdate-time): Re-sort.
3318 * c-common.c: Include c-common.h earlier.
3319 (struct reason_option_codes_t): Delete.
3320 (c_option_controlling_cpp_error): Prefix global type and struct
3321 with cpp_.
3322
1ef33fd4
MLI
33232014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
3324
3325 * c.opt (Wnormalized): New.
3326 (Wnormalized=): Use Enum and Reject Negative.
3327 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
3328
66bb34c0
JM
33292014-09-08 Joseph Myers <joseph@codesourcery.com>
3330
3331 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
3332 digits of floating-point modes if -fbuilding-libgcc.
3333
53d68b9f
JM
33342014-09-05 Joseph Myers <joseph@codesourcery.com>
3335
3336 * c-cppbuiltin.c (c_cpp_builtins): Also define
3337 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
3338 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
3339 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
3340 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
3341 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
3342 __LIBGCC_STACK_GROWS_DOWNWARD__,
3343 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
3344 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
3345 __LIBGCC_DWARF_FRAME_REGISTERS__,
3346 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
3347 __LIBGCC_STACK_POINTER_REGNUM__ and
3348 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
3349 (builtin_define_with_value): Handle backslash-escaping in string
3350 macro values.
3351
f65586dc
RB
33522014-09-05 Richard Biener <rguenther@suse.de>
3353
3354 PR middle-end/63148
3355 * c-format.c (check_format_arg): Properly handle
3356 effectively signed POINTER_PLUS_EXPR offset.
3357
2b71f4a4
MLI
33582014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
3359
3360 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
3361 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
3362 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
3363 and Init.
3364 * c-opts.c (c_common_handle_option): Do not handle here.
3365 (sanitize_cpp_opts): Likewise.
3366 * c-common.c (struct reason_option_codes_t): Handle
3367 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
3368
d2e4feca
MP
33692014-09-03 Marek Polacek <polacek@redhat.com>
3370
3371 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
3372
9a771876
JJ
33732014-09-02 Jakub Jelinek <jakub@redhat.com>
3374 Balaji V. Iyer <balaji.v.iyer@intel.com>
3375 Igor Zamyatin <igor.zamyatin@intel.com>
3376
3377 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
3378 * c-common.c (c_common_reswords): Added _Cilk_for.
3379 * c-common.h (enum rid): Added RID_CILK_FOR.
3380 (cilk_for_number_of_iterations): Add declaration.
3381 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
3382 CILK_FOR.
3383 * c-pragma.c (init_pragma): Register "grainsize" pragma.
3384 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
3385
81b5d104
MLI
33862014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3387
3388 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
3389 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
3390 Wundef): Use CPP, Var and Init.
3391 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
3392
b753b37b
MLI
33932014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3394
3395 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
3396 * c-opts.c (c_common_handle_option): Do not handle here.
3397
028aee17
JM
33982014-08-25 Jason Merrill <jason@redhat.com>
3399
3400 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
3401 -std=c++14 and -std=gnu++14, rather than the reverse.
3402 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
3403 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
3404 * c-common.h (cxx_dialect): Remove cxx1y.
3405
e4276ba5
ESR
34062014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
3407
3408 * c-common.h (enum cxx_dialect): Add cxx14.
3409 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
3410 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
3411 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
3412
a545cacd
JM
34132014-08-22 Jason Merrill <jason@redhat.com>
3414
3415 * c.opt (std=gnu++17): Fix alias.
3416
59ea0364
MP
34172014-08-22 Marek Polacek <polacek@redhat.com>
3418
3419 PR c++/62199
3420 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
3421 check for vector types. Drop LHS argument.
3422 * c-common.h (warn_logical_not_parentheses): Adjust.
3423
596e808c
MLI
34242014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
3425
3426 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
3427 (Wmultichar): Likewise.
3428 (Wdate-time): Use C-family languages instead of Common. Use CPP
3429 and Var.
3430 * c-opts.c (c_common_handle_option): Do not handle the above
3431 options here.
3432 (sanitize_cpp_opts): Likewise.
3433
18767f65
MLI
34342014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
3435
3436 PR fortran/44054
3437 * c-opts.c: Include tree-diagnostics.h.
3438 (c_diagnostic_finalizer): New.
3439 (c_common_initialize_diagnostics): Use it.
3440
b4413594
MLI
34412014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
3442
3443 PR preprocessor/51303
3444 * c-common.c (struct reason_option_codes_t option_codes):
3445 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
3446
43f9a13c
MLI
34472014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
3448
3449 PR c/60975
3450 PR c/53063
3451 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
3452 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
3453 (c_common_post_options): Call init_global_opts_from_cpp.
3454 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
3455
04159acf
MP
34562014-08-19 Marek Polacek <polacek@redhat.com>
3457
3458 PR c++/62153
3459 * c-common.c (maybe_warn_bool_compare): New function.
3460 * c-common.h (maybe_warn_bool_compare): Declare.
3461 * c.opt (Wbool-compare): New option.
3462
35aff4fb
MP
34632014-08-19 Marek Polacek <polacek@redhat.com>
3464
3465 * c.opt (Wc99-c11-compat): New option.
3466
177cce46
MP
34672014-08-19 Marek Polacek <polacek@redhat.com>
3468
3469 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
3470 to warn_c90_c99_compat.
3471 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
3472 to -1.
3473
6ae9194f
MLI
34742014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
3475 Steven Bosscher <steven@gcc.gnu.org>
3476
3477 PR c/52952
3478 * c-format.c: Add extra_arg_loc and format_string_loc to struct
3479 format_check_results.
3480 (check_function_format): Use true and add comment for boolean
3481 argument.
3482 (finish_dollar_format_checking): Use explicit location when warning.
3483 (check_format_info): Likewise.
3484 (check_format_arg): Set extra_arg_loc and format_string_loc.
3485 (check_format_info_main): Use explicit location when warning.
3486 (check_format_types): Pass explicit location.
3487 (format_type_warning): Likewise.
3488
8e54f6d3
MLI
34892014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
3490
3491 PR fortran/44054
3492 * c-format.c: Handle Fortran flags.
3493
cd4e76fc
IZ
34942014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
3495
3496 PR other/61962
3497 * array-notation-common.c (find_rank): Added handling for other
3498 types of references.
3499
f3bede71
MP
35002014-08-10 Marek Polacek <polacek@redhat.com>
3501
3502 PR c/51849
3503 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
3504 * c.opt (Wc90-c99-compat): Add option.
3505
9f25a338
TS
35062014-08-07 Trevor Saunders <tsaunders@mozilla.com>
3507
3508 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
3509
62e4eb35
MP
35102014-08-03 Marek Polacek <polacek@redhat.com>
3511
3512 * c-common.c (check_case_value): Add location_t parameter. Use it.
3513 (c_add_case_label): Pass loc to check_case_value.
3514
b787e7a2
TS
35152014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3516
3517 * cilk.c: Use hash_map instead of pointer_map.
3518
6e2830c3
TS
35192014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3520
3521 * c-gimplify.c: Use hash_set instead of pointer_set.
3522
a7ee52fb
IZ
35232014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
3524
3525 PR middle-end/61455
3526 * array-notation-common.c (extract_array_notation_exprs): Handling
3527 of DECL_EXPR added.
3528
944fa280
JJ
35292014-08-01 Jakub Jelinek <jakub@redhat.com>
3530
3531 * c-common.h (min_align_of_type): Removed prototype.
3532 * c-common.c (min_align_of_type): Removed.
3533 * c-ubsan.h (ubsan_maybe_instrument_reference,
3534 ubsan_maybe_instrument_member_call): New prototypes.
3535 * c-ubsan.c: Include stor-layout.h and builtins.h.
3536 (ubsan_maybe_instrument_reference_or_call,
3537 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
3538 functions.
3539
b4dfdc11
MG
35402014-07-31 Marc Glisse <marc.glisse@inria.fr>
3541
3542 PR c++/60517
3543 * c.opt (-Wreturn-local-addr): Move to common.opt.
3544
a41844e5
JM
35452014-07-30 Jason Merrill <jason@redhat.com>
3546
3547 PR c++/61659
3548 PR c++/61687
3549 Revert:
3550 * c.opt (-fuse-all-virtuals): New.
3551
976d5a22
TT
35522014-07-30 Tom Tromey <tromey@redhat.com>
3553
3554 PR c/59855
3555 * c.opt (Wdesignated-init): New option.
3556 * c-common.c (c_common_attribute_table): Add "designated_init".
3557 (handle_designated_init): New function.
3558
cdc94aca
MP
35592014-07-24 Marek Polacek <polacek@redhat.com>
3560
3561 PR c/57653
3562 * c-opts.c (c_finish_options): If -imacros is in effect, return.
3563
f41373b6
DS
35642014-07-16 Dodji Seketeli <dodji@redhat.com>
3565
3566 PR preprocessor/60723 - missing system-ness marks for macro tokens
3567 * c-ppoutput.c (struct print::prev_was_system_token): New data
3568 member.
3569 (init_pp_output): Initialize it.
3570 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
3571 (do_line_change): Return a flag saying if a line marker was
3572 emitted or not.
3573 (scan_translation_unit): Detect if the system-ness of the token we
3574 are about to emit is different from the one of the previously
3575 emitted token. If so, emit a line marker. Avoid emitting useless
3576 adjacent line markers. Avoid emitting line markers for tokens
3577 originating from the expansion of built-in macros.
3578 (scan_translation_unit_directives_only): Adjust.
3579
4d661eaa
MP
35802014-07-15 Marek Polacek <polacek@redhat.com>
3581
3582 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
3583 TYPE_MAX_VALUE is NULL.
3584
b108f48f
JJ
35852014-07-14 Jakub Jelinek <jakub@redhat.com>
3586
3587 PR middle-end/61294
3588 * c.opt (Wmemset-transposed-args): New warning.
3589
c0221884
JM
35902014-07-10 Jason Merrill <jason@redhat.com>
3591
3592 PR c++/61659
3593 PR c++/61687
3594 * c.opt (-fuse-all-virtuals): New.
3595
63dfbb95
RB
35962014-07-09 Richard Biener <rguenther@suse.de>
3597
3598 PR c-family/61741
3599 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
3600 using unsigned arithmetic if overflow does not wrap instead of
3601 if overflow is undefined.
3602
773ec47f
MP
36032014-07-06 Marek Polacek <polacek@redhat.com>
3604
3605 PR c/6940
3606 * c.opt (Wsizeof-array-argument): New option.
3607
00a7ba58
JJ
36082014-07-03 Jakub Jelinek <jakub@redhat.com>
3609
b1726d6c 3610 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
3611 comments->count <= 1, as comments->entries might be NULL.
3612
52ec0ea3
MP
36132014-07-01 Marek Polacek <polacek@redhat.com>
3614
3615 * c.opt (Wint-conversion): New option.
3616
d5c3d343
MP
36172014-07-01 Marek Polacek <polacek@redhat.com>
3618
3619 PR c/58286
3620 * c.opt (Wincompatible-pointer-types): New option.
3621
6e7ceb17
PC
36222014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
3623
3624 PR c++/51400
3625 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
3626 Do not discard TYPE_QUALS of type.
3627
da73100b
JM
36282014-06-26 Jason Merrill <jason@redhat.com>
3629
3630 * c-common.h (enum cxx_dialect): Add cxx1z.
3631 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
3632 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
3633
08eedf75
TJ
36342014-06-26 Teresa Johnson <tejohnson@google.com>
3635
3636 * c-common.h (get_dump_info): Declare.
3637 * c-gimplify.c (c_genericize): Use saved dump files.
3638 * c-opts.c (c_common_parse_file): Begin and end dumps
3639 once around parsing invocation.
3640 (get_dump_info): New function.
3641
7b56b2f8
MP
36422014-06-23 Marek Polacek <polacek@redhat.com>
3643 Andrew MacLeod <amacleod@redhat.com>
3644
3645 PR c/61553
3646 * c-common.c (get_atomic_generic_size): Don't segfault if the
3647 type doesn't have a size.
3648
0e37a2f3
MP
36492014-06-20 Marek Polacek <polacek@redhat.com>
3650
3651 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
3652 (ubsan_walk_array_refs_r): New function.
3653 (c_genericize): Instrument array bounds.
3654 * c-ubsan.c: Include "internal-fn.h".
3655 (ubsan_instrument_division): Mark instrumented arrays as having
3656 side effects. Adjust ubsan_type_descriptor call.
3657 (ubsan_instrument_shift): Likewise.
3658 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
3659 (ubsan_instrument_bounds): New function.
3660 (ubsan_array_ref_instrumented_p): New function.
3661 (ubsan_maybe_instrument_array_ref): New function.
3662 * c-ubsan.h (ubsan_instrument_bounds): Declare.
3663 (ubsan_array_ref_instrumented_p): Declare.
3664 (ubsan_maybe_instrument_array_ref): Declare.
3665
36662014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
3667
3668 PR lto/61123
3669 * c.opt (fshort-enums): Add to LTO.
3670 * c.opt (fshort-wchar): Likewise.
3671
5c3d09f7
MP
36722014-06-16 Marek Polacek <polacek@redhat.com>
3673
3674 PR c/60439
3675 * c.opt (Wswitch-bool): Add Var.
3676
9cf32741
JJ
36772014-06-12 Jakub Jelinek <jakub@redhat.com>
3678
3679 PR middle-end/61486
3680 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
3681 #pragma omp target teams or
3682 #pragma omp {,target }teams distribute simd.
3683
62984918
JM
36842014-06-12 Jason Merrill <jason@redhat.com>
3685
3686 * c.opt (Wabi=, fabi-compat-version): New.
3687 * c-opts.c (c_common_handle_option): Handle -Wabi=.
3688 (c_common_post_options): Handle flag_abi_compat_version default.
3689 Disallow -fabi-compat-version=1.
3690 * c-common.h (abi_version_crosses): New.
3691
f961457f
JH
36922014-06-11 Jan Hubicka <hubicka@ucw.cz>
3693
adfac8df 3694 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
3695 section names that are no longer trees.
3696
92d28cbb
JJ
36972014-06-10 Jakub Jelinek <jakub@redhat.com>
3698
3699 PR fortran/60928
3700 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
3701 (omp_pragmas): ... back here.
3702
742938c9
MP
37032014-06-05 Marek Polacek <polacek@redhat.com>
3704
3705 PR c/49706
3706 * c-common.c (warn_logical_not_parentheses): New function.
3707 * c-common.h (warn_logical_not_parentheses): Declare.
3708 * c.opt (Wlogical-not-parentheses): New option.
3709
9d548dfb
MP
37102014-06-04 Marek Polacek <polacek@redhat.com>
3711
3712 PR c/30020
3713 * c-common.c (check_case_bounds): Add location parameter.
3714 Use it.
3715 (c_add_case_label): Pass loc to check_case_bounds.
3716
fedfecef
MP
37172014-06-03 Marek Polacek <polacek@redhat.com>
3718
3719 PR c/60439
3720 * c.opt (Wswitch-bool): New option.
3721
f6a7cffc
TS
37222014-05-22 Thomas Schwinge <thomas@codesourcery.com>
3723
040d18b6
TS
3724 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
3725 Remove prototypes.
3726 (record_types_used_by_current_var_decl): Move prototype to where
3727 it belongs.
3728
f6a7cffc
TS
3729 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
3730 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
3731 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
3732
632f2871
RS
37332014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
3734
3735 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
3736 * c-common.c (c_common_nodes_and_builtins): Don't initialize
3737 void_zero_node.
3738 * c-pretty-print.c (pp_c_void_constant): New function.
3739 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
3740 (c_pretty_printer::expression): Handle VOID_CST.
3741 * cilk.c (extract_free_variables): Likewise.
3742 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
3743 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
3744
766090c2
TS
37452014-05-17 Trevor Saunders <tsaunders@mozilla.com>
3746
3747 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
3748 * c-pragma.c (push_alignment): Adjust.
3749 (handle_pragma_push_options): Likewise.
3750
661a0813
MP
37512014-05-09 Marek Polacek <polacek@redhat.com>
3752
3753 PR c/50459
3754 * c-common.c (check_user_alignment): Return -1 if alignment is error
3755 node.
3756 (handle_aligned_attribute): Don't call default_conversion on
3757 FUNCTION_DECLs.
3758 (handle_vector_size_attribute): Likewise.
3759 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
3760 (handle_sentinel_attribute): Call default_conversion and allow even
3761 integral types as an argument.
3762
2793eeab
MP
37632014-05-08 Marek Polacek <polacek@redhat.com>
3764
3765 PR c/61053
3766 * c-common.c (min_align_of_type): New function factored out from...
3767 (c_sizeof_or_alignof_type): ...here.
3768 * c-common.h (min_align_of_type): Declare.
3769
f827930a
MP
37702014-05-08 Marek Polacek <polacek@redhat.com>
3771
3772 PR c/61077
3773 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
3774 parameter type of main.
3775
ca49b74e
DD
37762014-05-07 DJ Delorie <dj@redhat.com>
3777
3778 * c-cppbuiltin.c (print_bits_of_hex): New.
3779 (builtin_define_type_minmax): Print values using hex so as not to
3780 require a pre-computed list of string values.
3781
1d60af08
KZ
37822014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
3783 Mike Stump <mikestump@comcast.net>
3784 Richard Sandiford <rdsandiford@googlemail.com>
3785
3786 * c-ada-spec.c: Include wide-int.h.
3787 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
3788 (dump_generic_ada_node): Use wide-int interfaces.
3789 * c-common.c: Include wide-int-print.h.
3790 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
3791 (pointer_int_sum): Use wide-int interfaces.
3792 (c_common_nodes_and_builtins): Use make_int_cst.
3793 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
3794 (handle_alloc_size_attribute): Use wide-int interfaces.
3795 (get_nonnull_operand): Likewise.
3796 * c-format.c (get_constant): Use tree_fits_uhwi_p.
3797 * c-lex.c: Include wide-int.h.
3798 (narrowest_unsigned_type): Take a widest_int rather than two
3799 HOST_WIDE_INTs.
3800 (narrowest_signed_type): Likewise.
3801 (interpret_integer): Update accordingly. Use wide-int interfaces.
3802 (lex_charconst): Use wide-int interfaces.
3803 * c-pretty-print.c: Include wide-int.h.
3804 (pp_c_integer_constant): Use wide-int interfaces.
3805 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
3806 INT_CST_LT_UNSIGNED.
3807
b15458be
RB
38082014-05-06 Richard Biener <rguenther@suse.de>
3809
3810 * c-opts.c (c_common_post_options): For -freestanding,
3811 -fno-hosted and -fno-builtin disable pattern recognition
3812 if not enabled explicitely.
3813
6577374e
MP
38142014-05-02 Marek Polacek <polacek@redhat.com>
3815
3816 * c.opt (Wsizeof-pointer-memaccess): Describe option.
3817
d00887e8
MP
38182014-05-01 Marek Polacek <polacek@redhat.com>
3819
3820 PR c/43245
3821 * c.opt (Wdiscarded-qualifiers): Add.
3822
f8ed5150
MP
38232014-04-30 Marek Polacek <polacek@redhat.com>
3824
3825 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
3826 INT_MIN / -1 sanitization only for integer types.
3827
45484dcf
MP
38282014-04-25 Marek Polacek <polacek@redhat.com>
3829
3830 PR c/18079
3831 * c-common.c (handle_noinline_attribute): Warn if the attribute
3832 conflicts with always_inline attribute.
3833 (handle_always_inline_attribute): Warn if the attribute conflicts
3834 with noinline attribute.
3835
38e514c0
MP
38362014-04-25 Marek Polacek <polacek@redhat.com>
3837
3838 PR c/60156
3839 * c-common.c (check_main_parameter_types): Warn about variadic main.
3840
44875f92
MS
38412014-04-24 Mike Stump <mikestump@comcast.net>
3842
3843 * c.opt (Wshadow-ivar): Default to on.
3844
dcaaa5a0
DP
38452014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
3846
3847 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
3848
c07d7c02
MP
38492014-04-23 Marek Polacek <polacek@redhat.com>
3850
3851 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
3852
1c33c9b7
JJ
38532014-04-22 Jakub Jelinek <jakub@redhat.com>
3854
3855 PR sanitizer/60275
3856 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
3857 if flag_sanitize_undefined_trap_on_error.
3858 (ubsan_instrument_division, ubsan_instrument_shift,
3859 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
3860 if !flag_sanitize_recover.
3861
793c625f
MG
38622014-04-22 Marc Glisse <marc.glisse@inria.fr>
3863
3864 PR libstdc++/43622
3865 * c-common.c (registered_builtin_types): Make non-static.
3866 * c-common.h (registered_builtin_types): Declare.
3867
b0f1bf36
RB
38682014-04-14 Richard Biener <rguenther@suse.de>
3869 Marc Glisse <marc.glisse@inria.fr>
3870
3871 PR c/60819
3872 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
3873 apply may-alias the scalar pointer type when applicable.
3874
3b07fa4a
IZ
38752014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
3876
3877 PR middle-end/60467
3878 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
3879 as possible argument for Cilk_spawn.
3880
cbbd2b1c
TB
38812014-04-11 Tobias Burnus <burnus@net-b.de>
3882
3883 PR c/60194
3884 * c.opt (Wformat-signedness): Add
3885 * c-format.c(check_format_types): Use it.
3886
6415bd5d
JM
38872014-04-11 Jason Merrill <jason@redhat.com>
3888
3889 PR c++/57926
3890 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
3891 default_conversion for an array argument.
3892
6525783a
MP
38932014-04-08 Marek Polacek <polacek@redhat.com>
3894
3895 PR sanitizer/60745
3896 * c-ubsan.c: Include asan.h.
3897 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
3898
880a467b
NS
38992014-04-03 Nathan Sidwell <nathan@codesourcery.com>
3900
3901 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
3902
7b59ff2d
MP
39032014-04-02 Marek Polacek <polacek@redhat.com>
3904
3905 * c-common.h (c_expand_expr): Remove declaration.
3906
8edbfaa6
JJ
39072014-03-28 Jakub Jelinek <jakub@redhat.com>
3908
3909 PR c++/60689
3910 * c-common.c (add_atomic_size_parameter): When creating new
3911 params vector, push the size argument first.
3912
07d72e1d
JJ
39132014-03-26 Jakub Jelinek <jakub@redhat.com>
3914
3915 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
3916 ubsan_instrument_vla, ubsan_instrument_return): Adjust
3917 ubsan_create_data callers.
3918
b35e0fa0
JJ
39192014-03-22 Jakub Jelinek <jakub@redhat.com>
3920
3921 PR debug/60603
3922 * c-opts.c (c_finish_options): Restore cb_file_change call to
3923 <built-in>.
3924
39a1ebb3
JJ
39252014-03-13 Jakub Jelinek <jakub@redhat.com>
3926
3927 PR middle-end/36282
3928 * c-pragma.c (apply_pragma_weak): Only look at
3929 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
3930 DECL_ASSEMBLER_NAME_SET_P (decl).
3931 (maybe_apply_pending_pragma_weaks): Exit early if
3932 vec_safe_is_empty (pending_weaks) rather than only when
3933 !pending_weaks.
3934 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
3935 set assembler name back to NULL afterwards.
3936
a07f6ed2
JM
39372014-03-11 Jason Merrill <jason@redhat.com>
3938
3939 * c.opt: Add -std=gnu++14.
3940
75b107f5
IB
39412014-03-11 Ian Bolton <ian.bolton@arm.com>
3942
3943 * c-opts.c (c_common_post_options): Don't override
3944 -ffp-contract=fast if unsafe-math-optimizations is on.
3945
f42c637e
PM
39462014-03-08 Paulo Matos <paulo@matos-sorge.com>
3947
22b15758 3948 * c.opt: Enable LTO FE for fshort-double.
f42c637e 3949
70e24808
JM
39502014-03-07 Jason Merrill <jason@redhat.com>
3951
3952 * c.opt: Add -std=c++14.
3953
3af9c5e9
MP
39542014-03-06 Marek Polacek <polacek@redhat.com>
3955
3956 PR c/60197
3957 * cilk.c (contains_cilk_spawn_stmt): New function.
3958 (contains_cilk_spawn_stmt_walker): Likewise.
3959 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
3960 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
3961
b3bdf019
JJ
39622014-03-03 Jakub Jelinek <jakub@redhat.com>
3963
3964 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
3965 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
3966 even when flag_preprocess_only.
3967
ca7e759d
JM
39682014-02-26 Jason Merrill <jason@redhat.com>
3969
3970 PR c++/59231
3971 PR c++/11586
3972 * c-common.c (shorten_compare): Don't check
3973 c_inhibit_evaluation_warnings.
3974
28e41874
JJ
39752014-02-19 Jakub Jelinek <jakub@redhat.com>
3976
cca615af
JJ
3977 PR c/37743
3978 * c-common.c (c_common_nodes_and_builtins): When initializing
3979 c_uint{16,32,64}_type_node, also set corresponding
3980 uint{16,32,64}_type_node to the same value.
3981
28e41874
JJ
3982 PR c++/60267
3983 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
3984 for PRAGMA_IVDEP if flag_preprocess_only.
3985
c2bf53a1
JJ
39862014-02-12 Jakub Jelinek <jakub@redhat.com>
3987
3988 PR c/60101
3989 * c-common.c (merge_tlist): If copy is true, call new_tlist,
3990 if false, add ADD itself, rather than vice versa.
3991 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
3992 copy. For SAVE_EXPR, only call merge_tlist once.
3993
8fcbce72
JJ
39942014-02-08 Jakub Jelinek <jakub@redhat.com>
3995
3996 PR middle-end/60092
3997 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
3998 and tree_to_uhwi.
3999 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
4000 functions.
4001 (c_common_attribute_table): Add alloc_align and assume_aligned
4002 attributes.
4003
0a756a3f
MP
40042014-02-06 Marek Polacek <polacek@redhat.com>
4005
4006 PR c/60087
4007 * c-common.c (warn_for_sign_compare): Call warning_at with location
4008 instead of warning.
4009
7ec4847a
MP
40102014-02-05 Marek Polacek <polacek@redhat.com>
4011
4012 PR c/53123
4013 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
4014 statement.
4015
66f20604
MP
40162014-02-04 Marek Polacek <polacek@redhat.com>
4017
4018 PR c/60036
4019 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
4020 SAVE_EXPR.
4021
5d77fb19
MG
40222014-02-03 Marc Glisse <marc.glisse@inria.fr>
4023
4024 PR c++/53017
4025 PR c++/59211
4026 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
4027 handle_vector_size_attribute, handle_nonnull_attribute): Call
4028 default_conversion on the attribute argument.
4029 (handle_nonnull_attribute): Increment the argument number.
4030
81e5eca8
MP
40312014-01-31 Marek Polacek <polacek@redhat.com>
4032
4033 PR c/59963
4034 * c-common.c (add_atomic_size_parameter): Pass vNULL to
4035 build_function_call_vec.
4036 (resolve_overloaded_builtin): Likewise.
4037 * c-common.h (build_function_call_vec): Adjust declaration.
4038
68fca595
MP
40392014-01-30 Marek Polacek <polacek@redhat.com>
4040
4041 PR c/59940
4042 * c-common.h (unsafe_conversion_p): Adjust declaration.
4043 (warnings_for_convert_and_check): Likewise.
4044 (convert_and_check): Likewise.
4045 * c-common.c (unsafe_conversion_p): Add location parameter. Call
4046 expansion_point_location_if_in_system_header on it.
4047 (warnings_for_convert_and_check): Add location parameter. Call
4048 expansion_point_location_if_in_system_header on it. Use it.
4049 (convert_and_check): Add location parameter. Use it.
4050 (conversion_warning): Likewise.
4051 (c_add_case_label): Adjust convert_and_check calls.
4052 (scalar_to_vector): Adjust unsafe_conversion_p calls.
4053
b72271b9
BI
40542014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
4055
4056 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
4057 flag_cilkplus.
4058 * c-pragma.c (init_pragma): Likewise.
4059 * c.opt: Likewise.
4060
393e8e8b
MP
40612014-01-23 Marek Polacek <polacek@redhat.com>
4062
4063 PR c/59846
4064 * c-common.c (shorten_compare): Add location_t parameter.
4065 * c-common.h (shorten_binary_op): Adjust declaration.
4066
f04dda30
MP
40672014-01-23 Marek Polacek <polacek@redhat.com>
4068
4069 PR c/58346
4070 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
4071 * c-common.h: Declare it.
4072
621955cb
EB
40732014-01-20 Eric Botcazou <ebotcazou@adacore.com>
4074
4075 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
4076 * c-ada-spec.c (dump_ads): Likewise.
4077 (cpp_check): Likewise.
4078 (dump_ada_specs): Likewise.
4079
40802014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
4081
4082 PR c++/49718
4083 * c-common.c (handle_no_instrument_function_attribute): Allow
4084 no_instrument_function attribute in class member
4085 definition/declaration.
4086
241f845a
JJ
40872014-01-15 Jakub Jelinek <jakub@redhat.com>
4088
4089 PR c/58943
4090 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
4091 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
4092 being COMPOUND_EXPR.
4093 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
4094 operand a SAVE_EXPR and second MODIFY_EXPR.
4095
e83b8e2e
JJ
40962014-01-09 Jakub Jelinek <jakub@redhat.com>
4097
4098 PR target/58115
4099 * c-pch.c (c_common_write_pch): Call
4100 prepare_target_option_nodes_for_pch.
4101
23a5b65a
RS
41022014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4103
4104 Update copyright years
4105
f9030485
RS
41062014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4107
4108 * array-notation-common.c, c-cilkplus.c: Use the standard form for
4109 the copyright notice.
4110
f2aa696b
EB
41112013-12-28 Eric Botcazou <ebotcazou@adacore.com>
4112
4113 * c-ada-spec.c (print_constructor): New function.
4114 (print_destructor): Retrieve the origin of the destructor.
4115 (print_ada_declaration): Revamp handling of constructors/destructors.
4116
3f8257db 41172013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
4118 Bill Maddox <maddox@google.com>
4119 Jason Merrill <jason@redhat.com>
4120
4121 * c.opt: Add -fdeclone-ctor-dtor.
4122 * c-opts.c (c_common_post_options): Default to on iff -Os.
4123
41958c28
BI
41242013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
4125
4126 * c-common.c (c_common_attribute_table): Added "cilk simd function"
4127 attribute.
4128 * c-pragma.h (enum pragma_cilk_clause): Remove.
4129 (enum pragma_omp_clause): Added the following fields:
4130 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
4131 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
4132 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
4133 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
4134 PRAGMA_CILK_CLAUSE_UNIFORM.
4135
b1726d6c 4136
12893402
BI
41372013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
4138
4139 * cilk.c (cilk_outline): Made this function non-static.
4140 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
4141 (create_cilk_wrapper): Added a new parameter: a function pointer.
4142 (c_install_body_w_frame_cleanup): Remove
4143 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
4144 * c-common.h (cilk_outline): New prototype.
4145 (gimplify_cilk_spawn): Removed two parameters.
4146 (cilk_install_body_with_frame_cleanup): New prototype.
4147 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
4148 CILK_SPAWN_STMT case.
4149
085b42ed
BS
41502013-12-11 Bernd Schmidt <bernds@codesourcery.com>
4151
2ce064c3
BS
4152 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
4153
085b42ed
BS
4154 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
4155 (int_array_type_node): Remove.
4156 * c-common.c (c_common_nodes_and_builtins): Don't build it.
4157
9e36c9ed
MP
41582013-12-05 Marek Polacek <polacek@redhat.com>
4159
4160 PR c/52023
4161 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
4162 [ADJUST_FIELD_ALIGN].
4163
296674db
JM
41642013-12-04 Joseph Myers <joseph@codesourcery.com>
4165
4166 PR c/52023
4167 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
4168 and check field alignment if set.
4169 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
4170 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
4171
b1726d6c 41722013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
4173 Marek Polacek <polacek@redhat.com>
4174
4175 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
4176 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
4177
d7947e19
L
41782013-11-29 H.J. Lu <hongjiu.lu@intel.com>
4179
4180 PR c/59309
4181 * cilk.c (gimplify_cilk_spawn): Properly handle function without
4182 arguments.
4183
fad7652e
JJ
41842013-11-29 Jakub Jelinek <jakub@redhat.com>
4185
4186 PR c/59280
4187 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
4188 goto invalid. If it is error_mark_node, don't issue further
4189 diagnostics.
4190
8b5e1202
SO
41912013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
4192
4193 * c.opt (Wopenmp-simd): New.
4194
0a508bb6
JJ
41952013-11-22 Jakub Jelinek <jakub@redhat.com>
4196
4197 * c-ubsan.h (ubsan_instrument_return): New prototype.
4198 * c-ubsan.c (ubsan_instrument_return): New function.
4199
2fb9a547
AM
42002013-11-22 Andrew MacLeod <amacleod@redhat.com>
4201
4202 * c-common.c: Add required include files from gimple.h.
4203 * c-gimplify.c: Likewise
4204 * cilk.c: Likewise
4205
8400e75e
DM
42062013-11-22 David Malcolm <dmalcolm@redhat.com>
4207
4208 * c-common.c (unsafe_conversion_p): Remove use of
4209 EXPR_LOC_OR_HERE macro.
4210 (conversion_warning): Likewise.
4211 (warnings_for_convert_and_check): Likewise.
4212 (warn_for_collisions_1): Likewise.
4213 (shorten_compare): Likewise, and remove use of in_system_header
4214 macro, using the location from the former.
4215 * c-lex.c (dump_one_header): Remove use of input_filename macro.
4216 (cb_def_pragma): Remove use of in_system_header macro.
4217 (lex_string): Likewise.
4218 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
4219
eb1ce453
KZ
42202013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
4221 Mike Stump <mikestump@comcast.net>
4222 Richard Sandiford <rdsandiford@googlemail.com>
4223
4224 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
4225 instead of TREE_INT_CST_LOW, in cases where there is a protecting
4226 tree_fits_shwi_p or tree_fits_uhwi_p.
4227 (dump_generic_ada_node): Likewise.
4228 * c-format.c (check_format_arg): Likewise.
4229 * c-pretty-print.c (pp_c_integer_constant): Likewise.
4230
6b3b8c27
KZ
42312013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
4232
4233 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
4234
49b0aa18
JC
42352013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
4236
4237 PR c/53001
4238 * c-common.c (unsafe_conversion_p): Make this function
4239 return an enumeration with more detail.
4240 (conversion_warning): Use the new return type of
4241 unsafe_conversion_p to separately warn either about conversions
4242 that lower floating point number precision or about the other
4243 kinds of conversions.
4244 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
4245 (unsafe_conversion_p): switching return type to
4246 conversion_safety enumeration.
49b0aa18
JC
4247 * c.opt: Adding new warning -Wfloat-conversion and
4248 enabling it with -Wconversion.
4249
b826515a
BS
42502013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
4251
8e745a17
JJ
4252 * c-opts.c: Include plugin.h.
4253 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 4254
b9a55b13
MP
42552013-11-19 Marek Polacek <polacek@redhat.com>
4256
4257 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
4258 call.
4259 (ubsan_instrument_shift): Likewise.
4260 (ubsan_instrument_vla): Likewise.
4261
7d362f6c
RS
42622013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4263
4264 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
4265 cast to unsigned type.
4266
386b1f1f
RS
42672013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4268
4269 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
4270 tree_low_cst.
4271 (complete_array_type): Update comment to refer to tree_to_[su]hwi
4272 rather than tree_low_cst.
4273
ae7e9ddd
RS
42742013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4275
4276 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
4277 tree_to_uhwi throughout.
4278
9439e9a1
RS
42792013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4280
4281 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
4282 tree_low_cst (..., 0) with tree_to_shwi throughout.
4283
cc269bb6
RS
42842013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4285
4286 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
4287 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
4288
9541ffee
RS
42892013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4290
4291 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
4292 host_integerp (..., 0) with tree_fits_shwi_p throughout.
4293
c02065fc
AH
42942013-11-15 Aldy Hernandez <aldyh@redhat.com>
4295
4296 * c-cilkplus.c: New file.
4297 * c-common.c (readonly_error): Add location argument.
4298 * c-common.h (readonly_error): Same.
4299 (c_finish_cilk_clauses): Protoize.
4300 (c_check_cilk_loop): Same.
4301 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
4302 Do not fail on error_mark_node.
4303 Abstract increment canonicalization to here...
4304 (c_omp_for_incr_canonicalize_ptr): New.
4305 c-pragma.c (init_pragma): Register "simd" pragma.
4306 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
4307 (enum pragma_cilk_clause): New.
4308
9cc65f15
RS
43092013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
4310
4311 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
4312 wchar_type and host_integerp checks.
4313
18f429e2
AM
43142013-11-14 Andrew MacLeod <amacleod@redhat.com>
4315
4316 * c-common.c: Likewise.
4317 * c-gimplify.c: Likewise.
4318 * cilk.c: Likewise.
4319
d8a2d370
DN
43202013-11-14 Diego Novillo <dnovillo@google.com>
4321
4322 * c-common.c: Include fold-const.h.
4323 Include stor-layout.h.
4324 Include calls.h.
4325 Include stringpool.h.
4326 Include attribs.h.
4327 Include varasm.h.
4328 Include trans-mem.h.
4329 * c-cppbuiltin.c: Include stor-layout.h.
4330 Include stringpool.h.
4331 * c-format.c: Include stringpool.h.
4332 * c-lex.c: Include stringpool.h.
4333 Include stor-layout.h.
4334 * c-pragma.c: Include stringpool.h.
4335 Include attribs.h.
4336 Include varasm.h.
4337 Include gcc-symtab.h.
4338 * c-pretty-print.c: Include stor-layout.h.
4339 Include attribs.h.
4340 * cilk.c: Include stringpool.h.
4341 Include calls.h.
4342
38b7bc7f
JM
43432013-11-13 Joseph Myers <joseph@codesourcery.com>
4344
4345 * c-common.h (enum rid): Add RID_AUTO_TYPE.
4346 * c-common.c (c_common_reswords): Add __auto_type.
4347 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
4348
45b0be94
AM
43492013-11-12 Andrew MacLeod <amacleod@redhat.com>
4350
18f429e2
AM
4351 * c-common.c: Include gimplify.h.
4352 * c-gimplify.c: Likewise.
4353 * cilk.c: Likewise.
4354 * c-omp.c: Include gimple-expr.h instead of gimple.h.
4355 * c-ubsan.c: Don't include gimple.h.
45b0be94 4356
582d9b50
JM
43572013-11-12 Joseph Myers <joseph@codesourcery.com>
4358
4359 * c-common.c (c_common_reswords): Add _Thread_local.
4360
6b28e197
JM
43612013-11-09 Joseph Myers <joseph@codesourcery.com>
4362
4363 * c-common.c (atomic_size_supported_p): New function.
4364 (resolve_overloaded_atomic_exchange)
4365 (resolve_overloaded_atomic_compare_exchange)
4366 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
4367 Use it instead of comparing size with a local list of sizes.
4368
267bac10
JM
43692013-11-07 Andrew MacLeod <amacleod@redhat.com>
4370 Joseph Myers <joseph@codesourcery.com>
4371
4372 * c-common.h (enum rid): Add RID_ATOMIC.
4373 * c-common.c (c_common_reswords): Add _Atomic.
4374 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
4375 (keyword_is_type_qualifier): Accept RID_ATOMIC.
4376 * c-format.c (check_format_types): Check for extra _Atomic
4377 qualifiers in format argument.
4378 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
4379 (pp_c_type_qualifier_list): Mention _Atomic in comment.
4380
5157b91e
TB
43812013-11-06 Tobias Burnus <burnus@net-b.de>
4382
4383 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
4384
6dbe0958
JM
43852013-11-06 Joseph Myers <joseph@codesourcery.com>
4386
4387 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
4388 standards modes.
4389 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
4390 to mean lack of IEEE 754 support.
4391
e8ff5196
TB
43922013-11-05 Tobias Burnus <burnus@net-b.de>
4393
4394 * c.opt (-Wdate-time): New option
4395 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
4396
254a0760
JM
43972013-11-05 Joseph Myers <joseph@codesourcery.com>
4398
4399 * c-cppbuiltin.c (cpp_iec_559_value): Test
4400 flag_excess_precision_cmdline not flag_excess_precision.
4401
6d7f7e0a
TB
44022013-11-05 Tobias Burnus <burnus@net-b.de>
4403
4404 * c.opt (fopenmp-simd): New option.
4405 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
4406 (omp_pragmas): ... this new struct.
4407 (c_pp_lookup_pragma): Also walk omp_pragmas.
4408 (init_pragma): Init pragmas for -fopenmp-simd.
4409
55a7f02f
MP
44102013-11-04 Marek Polacek <polacek@redhat.com>
4411
4412 PR c++/58979
4413 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
4414
9193fb05
JM
44152013-11-04 Joseph Myers <joseph@codesourcery.com>
4416
4417 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
4418 New functions.
4419 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
4420
94159ecf
EB
44212013-11-04 Eric Botcazou <ebotcazou@adacore.com>
4422
4423 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
4424 (dump_ada_specs): Adjust prototype of second callback.
4425 * c-ada-spec.c (cpp_check): New global variable.
4426 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
4427 (print_generic_ada_decl): Likewise.
4428 (has_static_fields): Change return type to bool and add guard.
4429 (has_nontrivial_methods): New predicate.
4430 (is_tagged_type): Change return type to bool.
4431 (separate_class_package): Call has_nontrivial_methods.
4432 (pp_ada_tree_identifier): Minor tweaks.
4433 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
4434 (dump_ada_array_domains): Likewise.
4435 (dump_ada_array_type): Likewise.
4436 (dump_template_types): Remove cpp_check parameter and do not pass it to
4437 dump_generic_ada_node.
4438 (dump_ada_template): Likewise.
4439 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
4440 recursively.
4441 (print_ada_methods): Change return type to integer. Remove cpp_check
4442 parameter and do not pass it down.
4443 (dump_nested_types): Remove cpp_check parameter and do not pass it to
4444 dump_generic_ada_node.
4445 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
4446 accessing methods.
4447 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
4448 down. Use has_nontrivial_methods to recognize C++ classes. Use return
4449 value of print_ada_methods.
4450 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
4451 Set cpp_check to it before invoking dump_ada_nodes.
4452 (dump_ada_specs): Likewise.
4453
b906f4ca
MP
44542013-11-03 Marek Polacek <polacek@redhat.com>
4455
4456 * c-ubsan.c: Don't include hash-table.h.
4457 (ubsan_instrument_vla): New function.
4458 * c-ubsan.h: Declare it.
4459
5e20cdc9
DM
44602013-10-31 David Malcolm <dmalcolm@redhat.com>
4461
4462 Automated part of renaming of symtab_node_base to symtab_node.
4463
4464 Patch autogenerated by rename_symtab.py from
4465 https://github.com/davidmalcolm/gcc-refactoring-scripts
4466 revision 58bb219cc090b2f4516a9297d868c245495ee622
4467
4468 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
4469 symtab_node_base to symtab_node.
4470
7057e645
ESR
44712013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
4472
8e745a17 4473 Implement C++14 digit separators.
7057e645
ESR
4474 * c-lex.c (interpret_float): Remove digit separators from scratch string
4475 before building real literal.
4476
193ea7bc
JJ
44772013-10-30 Jakub Jelinek <jakub@redhat.com>
4478
4479 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
4480
939b37da
BI
44812013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
4482
4483 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
4484 fields.
4485 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
4486 enabled.
4487 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
4488 (insert_cilk_frame): New prototype.
4489 (cilk_init_builtins): Likewise.
4490 (gimplify_cilk_spawn): Likewise.
4491 (c_cilk_install_body_w_frame_cleanup): Likewise.
4492 (cilk_detect_spawn_and_unwrap): Likewise.
4493 (cilk_set_spawn_marker): Likewise.
4494 (build_cilk_sync): Likewise.
4495 (build_cilk_spawn): Likewise.
4496 * cilk.c: New file.
4497
67348ccc
DM
44982013-10-29 David Malcolm <dmalcolm@redhat.com>
4499
4500 Patch autogenerated by refactor_symtab.py from
4501 https://github.com/davidmalcolm/gcc-refactoring-scripts
4502 revision 58bb219cc090b2f4516a9297d868c245495ee622
4503
4504 * c-gimplify.c (c_genericize): Update for conversion of symtab types
4505 to a true class hierarchy.
4506 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
4507
d570872d
RS
45082013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
4509
4510 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
4511
98906124
JL
45122013-10-26 Jeff Law <law@redhat.com>
4513
adfac8df
JJ
4514 * c-common.c (c_define_builtins): Remove mudflap support.
4515 * c.opt: Ignore and warn for mudflap options.
98906124 4516
d73749df 45172013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
4518
4519 PR other/33426
4520 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
4521 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
4522
3f04b1bb
JM
45232013-10-23 Jason Merrill <jason@redhat.com>
4524
4525 * c-format.c (gcc_cxxdiag_char_table): Add %X.
4526
acf0174b
JJ
45272013-10-11 Jakub Jelinek <jakub@redhat.com>
4528
acd15a28
JJ
4529 * c-common.h (omp_clause_mask::operator !=): New method.
4530 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
4531 instead of if (mask & something) tests everywhere.
4532
acf0174b
JJ
4533 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
4534 201307 instead of 201107.
4535 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
4536 (c_common_attribute_table): Add "omp declare target" and
4537 "omp declare simd" attributes.
4538 (handle_omp_declare_target_attribute,
4539 handle_omp_declare_simd_attribute): New functions.
4540 * c-omp.c: Include c-pragma.h.
4541 (c_finish_omp_taskgroup): New function.
4542 (c_finish_omp_atomic): Add swapped argument, if true,
4543 build the operation first with rhs, lhs arguments and use NOP_EXPR
4544 build_modify_expr.
4545 (c_finish_omp_for): Add code argument, pass it down to make_code.
4546 (c_omp_split_clauses): New function.
4547 (c_split_parallel_clauses): Removed.
4548 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
4549 c_omp_declare_simd_clauses_to_decls): New functions.
4550 * c-common.h (omp_clause_mask): New type.
4551 (OMP_CLAUSE_MASK_1): Define.
4552 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
4553 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
4554 omp_clause_mask::operator |, omp_clause_mask::operator &,
4555 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
4556 omp_clause_mask::operator ==): New methods.
4557 (enum c_omp_clause_split): New.
4558 (c_finish_omp_taskgroup): New prototype.
4559 (c_finish_omp_atomic): Add swapped argument.
4560 (c_finish_omp_for): Add code argument.
4561 (c_omp_split_clauses): New prototype.
4562 (c_split_parallel_clauses): Removed.
4563 (c_omp_declare_simd_clauses_to_numbers,
4564 c_omp_declare_simd_clauses_to_decls): New prototypes.
4565 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
4566 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
4567 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
4568 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
4569 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
4570 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
4571 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
4572 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
4573 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
4574 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
4575 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
4576 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
4577 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
4578 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
4579 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
4580 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
4581 PRAGMA_OMP_CLAUSE_UNIFORM.
4582
826cacfe
MG
45832013-10-09 Marc Glisse <marc.glisse@inria.fr>
4584
4585 PR tree-optimization/20318
4586 * c-common.c (handle_returns_nonnull_attribute): New function.
4587 (c_common_attribute_table): Add returns_nonnull.
4588
2284b034
MG
45892013-10-03 Marc Glisse <marc.glisse@inria.fr>
4590
4591 PR c++/19476
4592 * c.opt (fcheck-new): Move to common.opt.
4593
b56e9788
MP
45942013-09-25 Marek Polacek <polacek@redhat.com>
4595 Jakub Jelinek <jakub@redhat.com>
4596
4597 PR sanitizer/58413
4598 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
4599 an expression if we can prove it is correct.
4600 (ubsan_instrument_division): Likewise. Remove unnecessary
4601 check.
4602
ce6923c5
MP
46032013-09-18 Marek Polacek <polacek@redhat.com>
4604
4605 PR sanitizer/58411
4606 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
4607 Declare it.
4608 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
4609
fb5610fb
IS
46102013-09-14 Iain Sandoe <iain@codesourcery.com>
4611
4612 PR target/48094
4613 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
4614 fobjc-gc, freplace-objc-classes): Accept for LTO.
4615
88b0e79e
JC
46162013-09-13 Jacek Caban <jacek@codeweavers.com>
4617
4618 * c-target.def: New hook
4619
c9b0866a
PC
46202013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
4621
4622 PR c++/43452
4623 * c.opt (Wdelete-incomplete): Add.
4624
0af94e6f
JR
46252013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
4626
4627 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
4628 (vector_types_compatible_elements_p): New function.
4629 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
4630 declaration.
4631 (vector_types_compatible_elements_p): Declare.
4632
7c26172c
GDR
46332013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
4634
4635 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
4636 a virtual member function.
4637 (pp_simple_type_specifier): Remove.
4638 (pp_c_type_specifier): Likewise.
4639 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
4640 Rename from pp_c_type_specifier. Adjust.
4641 (c_pretty_printer::c_pretty_printer): Do not assign to
4642 simple_type_specifier.
4643
20059c8b
GDR
46442013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
4645
4646 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
4647 member function.
4648 (c_pretty_printer::storage_class_specifier): Likewise.
4649 (c_pretty_printer::initializer): Likewise.
4650 (pp_declaration): Remove.
4651 (pp_declaration_specifiers): Likewise.
4652 (pp_abstract_declarator): Likewise.
4653 (pp_declarator): Likewise.
4654 (pp_type_id): Likewise.
4655 (pp_statement): Likewise.
4656 (pp_constant): Likewise.
4657 (pp_id_expression): Likewise.
4658 (pp_primary_expression): Likewise.
4659 (pp_unary_expression): Likewise.
4660 (pp_multiplicative_expression): Likewise.
4661 (pp_conditional_expression): Likewise.
4662 (pp_assignment_expression): Likewise.
4663 (pp_expression): Likewise.
4664 (pp_c_type_id): Likewise.
4665 (pp_c_storage_class_specifier): Likewise.
4666 * c-pretty-print.c (pp_c_type_cast): Tidy.
4667 (pp_c_pointer): Likewise.
4668 (pp_c_type_specifier): Likewise.
4669 (pp_c_parameter_type_list): Likewise.
4670 (pp_c_function_definition): Likewise.
4671 (pp_c_init_declarator): Likewise.
4672 (pp_c_initializer_list): Likewise.
4673 (pp_c_constructor_elts): Likewise.
4674 (c_pretty_printer::direct_abstract_declarator): Likewise.
4675 (c_pretty_printer::declaration_specifiers): Likewise.
4676 (c_pretty_printer::primary_expression): Likewise.
4677 (c_pretty_printer::postfix_expression): Likewise.
4678 (c_pretty_printer::type_id): Rename from pp_c_type_id.
4679 (c_pretty_printer::storage_class_specifier): Rename from
4680 pp_c_storage_class_specifier.
4681 (c_pretty_printer::initializer): Rename from pp_c_initializer.
4682 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
4683 storage_class_specifier, initializer, offset_list, flags.
4684
de5a5fa1
MP
46852013-08-30 Marek Polacek <polacek@redhat.com>
4686
4687 * c-ubsan.c: New file.
4688 * c-ubsan.h: New file.
4689
8f0e4d72
GDR
46902013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
4691
4692 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
4693 member function.
4694 (c_pretty_printer::declaration_specifiers): Likewise.
4695 (c_pretty_printer::declarator): Likewise.
4696 (c_pretty_printer::abstract_declarator): Likewise.
4697 (c_pretty_printer::direct_abstract_declarator): Likewise.
4698 (c_pretty_printer::direct_declarator): Likewise.
4699 (c_pretty_printer::function_specifier): Likewise.
4700 (pp_declaration): Adjust.
4701 (pp_declaration_specifiers): Likewise.
4702 (pp_abstract_declarator): Likewise.
4703 (pp_direct_declarator): Likewise.
4704 (pp_function_specifier): Likewise.
4705 (pp_direct_abstract_declarator): Remove as unused.
4706 (pp_c_declaration): Remove.
4707 (pp_c_declaration_specifiers): Likewise.
4708 (pp_c_declarator): Likewise.
4709 (pp_c_direct_declarator): Likewise.
4710 (pp_c_function_specifier): Likewise.
4711 (pp_c_direct_abstract_declarator): Likewise.
4712 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
4713 from pp_c_abstract_declarator. Adjust.
4714 (c_pretty_printer::direct_abstract_declarator): Rename from
4715 pp_c_direct_abstract_declarator. Adjust.
4716 (c_pretty_printer::function_specifier): Rename from
4717 pp_c_function_specifier. Adjust.
4718 (c_pretty_printer::declaration_specifiers): Rename from
4719 pp_c_declaration_specifiers. Adjust.
4720 (c_pretty_printer::direct_declarator): Rename from
4721 pp_c_direct_declarator. Adjust.
4722 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
4723 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
4724 (c_pretty_printer::c_pretty_printer): Do not assign to
4725 declaration, declaration_specifiers, declarator,
4726 direct_declarator, direct_abstract_declarator, function_specifier.
4727
00d34d3a
GDR
47282013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
4729
4730 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
4731 virtual member function.
4732 (c_pretty_printer::multiplicative_expression): Likewise.
4733 (c_pretty_printer::conditional_expression): Likewise.
4734 (c_pretty_printer::assignment_expression): Likewise.
4735 (c_pretty_printer::expression): Likewise.
4736 (pp_unary_expression): Adjust.
4737 (pp_multiplicative_expression): Likewise.
4738 (pp_assignment_expression): Likewise.
4739 (pp_conditional_expression): Likewise.
4740 (pp_expression): Likewise.
4741 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
4742 from pp_c_unary_expression. Adjust.
4743 (c_pretty_printer::multiplicative_expression): Rename from
4744 pp_c_multiplicative_expression. Adjust.
4745 (c_pretty_printer::conditional_expression): Rename from
4746 pp_c_conditional_expression. Adjust.
4747 (c_pretty_printer::assignment_expression): Rename from
4748 pp_c_assignment_expression. Adjust.
4749 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
4750 (c_pretty_printer::c_pretty_printer): Do not assign to
4751 unary_expression, multiplicative_expression,
4752 conditional_expression, expression.
4753
fb22178f
GDR
47542013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
4755
4756 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
4757 virtual member function.
4758 (pp_postfix_expression): Adjust.
4759 (pp_c_postfix_expression): Remove.
4760 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
4761 from pp_c_postfix_expression. Adjust.
4762 (c_pretty_printer::c_pretty_printer): Do not assign to
4763 postfix_expression.
4764
7ecc2600
GDR
47652013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
4766
4767 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
4768 virtua member function.
4769 (pp_primary_expression): Adjust.
4770 (pp_c_primary_expression): Remove.
4771 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
4772 from pp_c_primary_expression. Adjust.
4773 (pp_c_initializer_list): Use pp_primary_expression.
4774 (c_pretty_printer::c_pretty_printer): Do not assign to
4775 primary_expression.
4776
0691175f
GDR
47772013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
4778
4779 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
4780 * c-pretty-print.c (M_): Remove.
4781 (c_pretty_printer::translate_string): Define.
4782 (pp_c_type_specifier): Use it.
4783 (pp_c_primary_expression): Likewise.
4784 (pp_c_expression): Likewise.
4785
66dfe4c4
GDR
47862013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
4787
4788 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
4789 virtual function.
4790 (pp_c_id_expression): Remove.
4791 (pp_id_expression): Adjust.
4792 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
4793 pp_c_id_expression. Adjust.
4794 (pp_c_postfix_expression): Use pp_id_expression.
4795 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
4796
ca43e9d5
GDR
47972013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
4798
4799 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
4800 member function.
4801 (pp_constant): Adjust.
4802 (pp_c_constant): Remove.
4803 * c-pretty-print.c (c_pretty_printer::constant): Rename from
4804 pp_c_constant. Adjust.
4805 (pp_c_constant)
4806 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
4807 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
4808
da6ca2b5
GDR
48092013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4810
4811 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
4812 (c_pretty_printer::c_pretty_printer): Declare.
4813 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
4814 c_pretty_printer_init. Adjust.
4815 (print_c_tree): Do not call c_pretty_printer_init.
4816 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
4817
65a372f4
AC
48182013-08-09 Arnaud Charlet <charlet@adacore.com>
4819
4820 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
4821
fd9b0f32
PC
48222013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
4823
4824 PR c++/58080
4825 * c-common.c (pointer_int_sum): Add bool parameter.
4826 * c-common.h (pointer_int_sum): Adjust declaration.
4827
e0aec1e9
GDR
48282013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
4829
4830 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
4831 c_pretty_printer variable.
4832
b066401f
GDR
48332013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
4834
4835 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
4836 (pp_base): Remove.
4837 (pp_c_base): Likewise. Adjust users.
4838 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
4839 (pp_c_whitespace): Do not call pp_base.
4840 (pp_c_left_paren): Likewise.
4841 (pp_c_right_paren): Likewise.
4842 (pp_c_left_brace): Likewise.
4843 (pp_c_right_brace): Likewise.
4844 (pp_c_left_bracket): Likewise.
4845 (pp_c_right_bracket): Likewise.
4846 (pp_c_dot): Likewise.
4847 (pp_c_ampersand): Likewise.
4848 (pp_c_star): Likewise.
4849 (pp_c_arrow): Likewise.
4850 (pp_c_semicolon): Likewise.
4851 (pp_c_complement): Likewise.
4852 (pp_c_exclamation): Likewise.
4853 (pp_c_direct_declarator): Likewise.
4854 (pp_c_ws_string): Likewise.
4855 (pp_c_identifier): Likewise.
4856 (pp_c_statement): Likewise.
4857 (print_c_tree): Likewise.
4858
65e5a578
ESR
48592013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
4860
4861 PR c++/58072
4862 * c-common.c (c_parse_error): Catch user-defined literal tokens and
4863 provide useful error strings.
4864
137a1a27
GDR
48652013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
4866
4867 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
4868 printer functions instead of pp_string or operators and punctuators.
4869 (dump_generic_ada_node): Likewise.
4870 * c-pretty-print.c (pp_c_type_specifier): Likewise.
4871 (pp_c_relational_expression): Likewise.
4872 (pp_c_logical_or_expression): Likewise.
4873
07838b13
GDR
48742013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
4875
4876 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
4877 functions instead of pp_character.
4878 (pp_ada_tree_identifier): Likewise.
4879 (dump_ada_double_name): Likewise.
4880 (dump_ada_function_declaration): Likewise.
4881 (dump_ada_array_domains): Likewise.
4882 (dump_template_types): Likewise.
4883 (dump_generic_ada_node): Likewise.
4884 (print_ada_declaration): Likewise.
4885 (print_ada_struct_decl): Likewise.
4886 * c-pretty-print.c (pp_c_integer_constant): Likewise.
4887
433cc7b0
TT
48882013-07-23 Tom Tromey <tromey@redhat.com>
4889
4890 * c-common.h (enum rid) <RID_GENERIC>: New constant.
4891 * c-common.c (c_common_reswords): Add _Generic.
4892
688010ba
OB
48932013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
4894
4895 * c-common.c: Fix typos.
4896 * c-common.h: Likewise.
4897
2a99e5e6
LL
48982013-07-13 Lubos Lunak <l.lunak@suse.cz>
4899
4900 PR c++/55203
4901 * c-common.c (c_common_attribute_table): Add warn_unused.
4902 (handle_warn_unused_attribute): New.
4903
c26302d5
JJ
49042013-07-10 Jakub Jelinek <jakub@redhat.com>
4905
4906 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
4907 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
4908
dfeadaa0
PC
49092013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
4910
4911 PR c++/57869
4912 * c.opt: Add Wconditionally-supported.
4913
6a2fa4b2
GS
49142013-07-08 Graham Stott <graham.stott@btinternet.com>
4915
adfac8df 4916 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
4917 unused variables l_length and l_node.
4918
ecdbd01a 49192013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
4920
4921 PR c/57821
4922 * c-common.c (complete_array_type): Delay folding first index
4923 like other indices. When folding, check for index overflow.
4924
bedc293e
MG
49252013-06-27 Marc Glisse <marc.glisse@inria.fr>
4926
4927 PR c++/57509
4928 * c-common.h (c_build_vec_perm_expr): New complain argument.
4929 * c-common.c (c_build_vec_perm_expr): Likewise.
4930 Use save_expr also in C++.
4931
604b2bfc
GDR
49322013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4933
4934 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
4935 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
4936 * c-opts.c (c_common_post_options): Likewise.
4937
dfeadaa0 49382013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
4939
4940 * array-notation-common.c (length_mismatch_in_expr): Changed the
4941 parameter type's from a dynamic array to a vec_tree. Also removed
4942 the size parameters.
4943 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
4944 the change above.
4945
2ce86d2e
BI
49462013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
4947
4948 * c-common.h (struct cilkplus_an_parts): New structure.
4949 (struct cilkplus_an_loop_parts): Likewise.
4950 (cilkplus_extract_an_triplets): New prototype.
4951 (fix_sec_implicit_args): Likewise.
4952 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
4953 (fix_sec_implicit_args): Likewise.
604b2bfc 4954
07a6825b
BI
49552013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
4956
4957 * array-notation-common.c (find_inv_trees): Removed an unwanted
4958 typecasting.
4959 * c-common.h (struct inv_list::additional_tcodes): Changed type from
4960 enum rid to enum tree_code.
4961
08346abd
JH
49622013-06-11 Jan Hubicka <jh@suse.cz>
4963
4964 * c-common.c (handle_alias_ifunc_attribute): Do not set
4965 DECL_EXTERNAL for weakref variables.
4966 * c-pragma.c (handle_pragma_weak): Make sure aliases
4967 are not declared as external.
4968
d60f1706
BI
49692013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4970
4971 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
4972 function from c/c-array-notation.c.
4973 (is_cilkplus_reduce_builtin): Likewise.
4974 (find_rank): Likewise.
4975 (extract_array_notation_exprs): Likewise.
4976 (replace_array_notations): Likewise.
4977 (find_inv_trees): Likewise.
4978 (replace_inv_trees): Likewise.
4979 (contains_array_notation_expr): Likewise.
4980 (find_correct_array_notation_type): Likewise.
4981 * c-common.h (struct inv_list): Moved this struct from the file
4982 c/c-array-notation.c and added a new field called additional tcodes.
4983 (length_mismatch_in_expr_p): New prototype.
4984 (is_cilkplus_reduce_builtin): Likewise.
4985 (find_rank): Likewise.
4986 (extract_array_notation_exprs): Likewise.
4987 (replace_array_notation): Likewise.
4988 (find_inv_trees): Likewise.
4989 (replace_inv_trees): Likewise.
4990 (find_correct_array_notation_type): Likewise.
dfeadaa0 4991
36536d79
BI
49922013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4993
4994 * c-common.c (c_define_builtins): When cilkplus is enabled, the
4995 function array_notation_init_builtins is called.
4996 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
4997 * c-common.def (ARRAY_NOTATION_REF): New tree.
4998 * c-common.h (build_array_notation_expr): New function declaration.
4999 (build_array_notation_ref): Likewise.
5000 (extract_sec_implicit_index_arg): New extern declaration.
5001 (is_sec_implicit_index_fn): Likewise.
5002 (ARRAY_NOTATION_CHECK): New define.
5003 (ARRAY_NOTATION_ARRAY): Likewise.
5004 (ARRAY_NOTATION_START): Likewise.
5005 (ARRAY_NOTATION_LENGTH): Likewise.
5006 (ARRAY_NOTATION_STRIDE): Likewise.
5007 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
5008 ARRAY_NOTATION_REF.
5009 (pp_c_expression): Likewise.
5010 * c.opt (flag_enable_cilkplus): New flag.
5011 * array-notation-common.c: New file.
5012
f7716d57
JJ
50132013-05-14 Jakub Jelinek <jakub@redhat.com>
5014
5015 PR c++/57274
5016 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
5017
a5e0cd1d
MG
50182013-05-10 Marc Glisse <marc.glisse@inria.fr>
5019
5020 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
5021 vectors.
5022
f6bc1c4a
HS
50232013-05-07 Han Shen <shenhan@google.com>
5024
5025 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
5026
3f12f6e9
SKS
50272013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
5028
5029 * c-common.c (check_user_alignment): Emit error for negative values.
5030
61949153
PC
50312013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5032
5033 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
5034
e93e18e9
PC
50352013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5036
5037 * c-cppbuiltin.c (c_cpp_builtins): Do not define
5038 __GXX_EXPERIMENTAL_CXX1Y__.
5039
44d90fe1 50402013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 5041 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
5042
5043 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
5044 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
5045 to simply use OPT_Wpointer_arith.
5046 (c_sizeof_or_alignof_type): Likewise.
5047
13f39b2e
PC
50482013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5049
5050 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
5051
4b84d650
JJ
50522013-04-12 Jakub Jelinek <jakub@redhat.com>
5053
5054 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
5055 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
5056 specifiers.
5057
fb037b5d
SB
50582013-04-07 Steven Bosscher <steven@gcc.gnu.org>
5059
5060 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
5061
4e856798
PC
50622013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
5063
5064 * c-common.c (pointer_int_sum): Remove dead code.
5065
4b1baac8
RS
50662013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
5067
5068 PR middle-end/56524
5069 * c-common.c (handle_optimize_attribute): Don't call
5070 save_optabs_if_changed.
5071
0b50e654
JJ
50722013-03-05 Jakub Jelinek <jakub@redhat.com>
5073
5074 PR middle-end/56461
5075 * c-pch.c (pch_init): Free target_validity at the end.
5076
48c41403
JJ
50772013-03-04 Jakub Jelinek <jakub@redhat.com>
5078
5079 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
5080
e664c61c
KS
50812013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
5082 Jakub Jelinek <jakub@redhat.com>
5083
5084 PR sanitizer/56454
5085 * c-common.c (handle_no_sanitize_address_attribute): New function.
5086 (c_common_attribute_table): Add no_sanitize_address attribute.
5087 (handle_no_address_safety_analysis_attribute): Add
5088 no_sanitize_address attribute, not no_address_safety_analysis
5089 attribute.
5090
a475fd3d 50912013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
5092
5093 PR target/52555
5094 * c-common.c (handle_optimize_attribute): Call
5095 save_optabs_if_changed.
5096
f6007d99
JJ
50972013-02-18 Jakub Jelinek <jakub@redhat.com>
5098 Steven Bosscher <steven@gcc.gnu.org>
5099
5100 PR pch/54117
5101 * c-opts.c (c_common_post_options): If debug info is enabled
5102 and non-dwarf*, refuse to load PCH files and when writing PCH
5103 file warn.
5104
cf35e2b1
JJ
51052013-02-05 Jakub Jelinek <jakub@redhat.com>
5106
5107 PR middle-end/56167
5108 * c-common.c (handle_error_attribute): Fix condition.
5109
32887460
JJ
51102013-01-30 Jakub Jelinek <jakub@redhat.com>
5111
5112 PR c++/55742
5113 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
5114
5af057d8
JM
51152013-01-18 Jason Merrill <jason@redhat.com>
5116
5117 PR target/54908
5118 * c.opt (-fextern-tls-init): New.
5119 * c-opts.c (c_common_post_options): Handle it.
5120
cc83c823
JJ
51212013-01-09 Jakub Jelinek <jakub@redhat.com>
5122
5123 PR c/48418
5124 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
5125 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
5126 and is either negative or bigger or equal to type precision
5127 of the first operand.
5128
a859517f
MP
51292012-12-03 Marek Polacek <polacek@redhat.com>
5130
5131 PR c/55570
5132 * c-common.c (check_user_alignment): Swap order of tests,
5133 check TREE_CODE first.
5134
2d7aa578
ESR
51352012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
5136
5137 PR c++/52654
5138 * c-common.h (overflow_type): New enum.
5139 (build_userdef_literal): Add overflow_type argument.
5140 (tree_userdef_literal): Add overflow_type.
5141 (USERDEF_LITERAL_OVERFLOW): New access macro.
5142 * c-common.c (build_userdef_literal): Add overflow_type
5143 argument.
5144 * c-lex.c (c_lex_with_flags): Add overflow_type to
5145 build_userdef_literal calls.
5146 (interpret_integer, interpret_float): Add overflow_type argument.
5147
cc3c4f62
RB
51482012-11-28 Richard Biener <rguenther@suse.de>
5149
5150 PR c/35634
5151 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
5152 here and use a type with proper overflow behavior for types that would
5153 need to be promoted for the arithmetic.
5154
77bc5132
JJ
51552012-11-23 Jakub Jelinek <jakub@redhat.com>
5156
5157 PR sanitizer/55435
5158 * c-common.c (handle_no_address_safety_analysis_attribute): New
5159 function.
5160 (c_common_attribute_table): Add no_address_safety_analysis.
5161
5dc99c46
SB
51622012-11-16 Simon Baldwin <simonb@google.com>
5163
5164 * c.opt: Add f[no-]canonical-system-headers.
5165 * c-opts.c (c_common_handle_option): Handle
5166 OPT_fcanonical_system_headers.
5167
a4a0016d
ESR
51682012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
5169
5170 PR c++/54413
5171 * c-opts.c (c_common_handle_option): Set new flags.
5172 * c.opt: Describe new flags.
5173
7dbb85a7
JM
51742012-11-09 Jason Merrill <jason@redhat.com>
5175
5176 * c.opt (Wabi-tag): New.
5177
ad7bac31
AK
51782012-11-09 Andi Kleen <ak@linux.intel.com>
5179
5180 PR 55139
5181 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 5182 MEMMODEL_MASK
ad7bac31 5183
7332899a
MLI
51842012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
5185
5186 PR c/53063
5187 * c.opt (Wformat): Make it Alias Wformat=1.
5188 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
5189 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
5190 LangEnabledBy.
5191 (Wformat=): RejectNegative. Use LangEnabledBy.
5192 (Wnonnull): Use LangEnabledBy.
5193 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
5194 * c-format.c (set_Wformat): Delete.
5195 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
8e745a17
JJ
5196 (maybe_read_dollar_number): Likewise.
5197 (avoid_dollar_number): Likewise.
5198 (finish_dollar_format_checking): Likewise.
5199 (check_format_info): Likewise.
5200 (check_format_info_main): Likewise.
5201 (check_format_types): Likewise.
5202 (format_type_warning): Likewise.
5203 * c-common.c (int): Likewise.
5204 (check_function_sentinel): Likewise.
5205 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 5206
34a180a6
MLI
52072012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
5208
5209 PR c/53063
5210 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
5211 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
5212 Use LangEnabledBy.
5213 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
5214 common.opt.
5215 (Wvariadic-macros): Init(1).
5216 * c-opts.c (c_common_handle_option): Do not handle them
5217 explicitly.
5218 (c_common_post_options): Likewise.
5219 (sanitize_cpp_opts): warn_unused_macros is now
5220 cpp_warn_unused_macros.
5221 (push_command_line_include): Likewise.
5222 * c-common.c (warn_unknown_pragmas): Do not define.
5223 * c-common.h (warn_unknown_pragmas): Do not declare.
5224
3f46d6a5
MLI
52252012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
5226
5227 PR c/51294
5228 * c-common.c (conversion_warning): Handle conditional expressions.
5229
880661a4
JW
52302012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
5231
5232 PR c++/54930
5233 * c.opt (Wreturn_local_addr): Define new option.
5234
4514a96b
JM
52352012-10-25 Jason Merrill <jason@redhat.com>
5236
f14edc1a
JM
5237 * c.opt (Wvirtual-move-assign): New.
5238
4514a96b
JM
5239 * c.opt (Winherited-variadic-ctor): New.
5240
93100c6b
MG
52412012-10-25 Marc Glisse <marc.glisse@inria.fr>
5242
5243 PR c++/54427
5244 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
5245
1efcb8c6
JM
52462012-10-23 Joseph Myers <joseph@codesourcery.com>
5247
5248 * c-common.h (pch_cpp_save_state): Declare.
5249 * c-target.def (c_preinclude): New hook.
5250 * c-opts.c (done_preinclude): New.
5251 (push_command_line_include): Handle default preincluded header.
5252 (cb_file_change): Call pch_cpp_save_state when calling
5253 push_command_line_include.
5254 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
5255 (pch_cpp_save_state): New.
5256 (pch_init): Call pch_cpp_save_state conditionally, instead of
5257 calling cpp_save_state.
5258
4a0ae68e
MLI
52592012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
5260
5261 PR c/53063
5262 PR c/40989
5263 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
5264 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
5265 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
5266 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
5267 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
5268 * c-opts.c (c_common_handle_option): Remove explicit handling from
5269 here.
5270 (c_common_post_options): Likewise.
5271
67e4210b
EB
52722012-10-18 Eric Botcazou <ebotcazou@adacore.com>
5273
5274 * c-ada-spec.c (LOCATION_COL): Delete.
5275 (compare_location): New function.
5276 (compare_node): Use it.
5277 (compare_comment): Likewise.
5278
65d4f2cd
MLI
52792012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
5280
5281 PR c/53063
5282 PR c/40989
5283 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
5284 * c-opts.c (c_common_handle_option): Do not set them here. Add
5285 comment.
5286 (c_common_post_options): Likewise.
5287
909881cb
EB
52882012-10-16 Eric Botcazou <ebotcazou@adacore.com>
5289
5290 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
5291 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
5292 Remove POINTER_TYPE handling, add large unsigned handling and use
5293 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
5294
3a785c97
JJ
52952012-10-12 Jakub Jelinek <jakub@redhat.com>
5296
5297 PR c/54381
5298 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
5299 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
5300 locs and array of 3 trees instead of just single loc and single
5301 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
5302 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
5303 For *cmp* builtins that take two sources strings report warnings
5304 about first and second source, not about destination and source.
5305
5e54f81d
MG
53062012-10-12 Marc Glisse <marc.glisse@inria.fr>
5307
5308 PR c++/53055
5309 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
5310
f5b02f1e
EB
53112012-10-11 Eric Botcazou <ebotcazou@adacore.com>
5312
5313 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
5314 declaring something coming from another file.
5315
b46dbc6c
AC
53162012-10-10 Arnaud Charlet <charlet@adacore.com>
5317
f5b02f1e 5318 PR ada/54845
b46dbc6c
AC
5319 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
5320
5d9de0d0
PC
53212012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
5322
5323 PR c++/54194
5324 * c-common.c (warn_about_parentheses): Add location_t parameter;
5325 use EXPR_LOC_OR_LOC.
5326 * c-common.h: Update declaration.
5327
a212e43f
MG
53282012-10-09 Marc Glisse <marc.glisse@inria.fr>
5329
5330 PR c++/54427
5331 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
5332 more operations. Make error messages optional.
5333 * c-common.h (enum stv_conv): Moved from c-typeck.c.
5334 (scalar_to_vector): Declare.
5335
b1db7f91
JM
53362012-10-08 Jason Merrill <jason@redhat.com>
5337
5338 * c-common.c (c_common_reswords): Add thread_local.
5339
e28d52cf
DS
53402012-10-08 Dodji Seketeli <dodji@redhat.com>
5341
5342 PR c++/53528 C++11 attribute support
5343 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
5344 new functions.
5345 * c-common.c (check_cxx_fundamental_alignment_constraints): New
5346 static function.
5347 (handle_aligned_attribute): In choose strictest alignment
5348 among many. Use new check_cxx_fundamental_alignment_constraints.
5349 (handle_transparent_union_attribute): In c++11 attribute syntax,
5350 don't look through typedefs.
5351
3b78de56
AC
53522012-10-04 Arnaud Charlet <charlet@adacore.com>
5353
5354 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
5355 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
5356 out of dumpfile.h.
5357
6040bb5f
DC
53582012-09-25 Dehao Chen <dehao@google.com>
5359
5360 PR middle-end/54645
3b78de56 5361 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
5362 map when read in the pch.
5363
3f8257db 53642012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
5365
5366 * c-ada-spec.c: Style fixes.
5367
3f8257db 53682012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
5369
5370 * c.opt (-fada-spec-parent): Define new command line switch.
5371 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
5372 is specified, generate binding spec as a child of the specified unit.
5373
0ccb505d
PC
53742012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
5375 Manuel López-Ibáñez <manu@gcc.gnu.org>
5376
5377 PR c++/53210
5378 * c.opt ([Winit-self]): Enabled by -Wall in C++.
5379
c583af79
AC
53802012-08-23 Arnaud Charlet <charlet@adacore.com>
5381
5382 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
5383 for pointers, and add missing Convention C pragma.
5384 (print_ada_struct_decl): Add missing aliased keyword.
5385 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
5386
1a4049e7
JJ
53872012-08-17 Jakub Jelinek <jakub@redhat.com>
5388
5389 * c-common.c (sizeof_pointer_memaccess_warning): New function.
5390 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
5391 * c-opts.c (c_common_handle_option): Enable it for -Wall.
5392 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
5393 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
5394
70b5e7dc
RG
53952012-08-10 Richard Guenther <rguenther@suse.de>
5396
5397 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
5398
f8923f7e
SB
53992012-08-07 Steven Bosscher <steven@gcc.gnu.org>
5400
5401 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
5402 instead of separate pp_newline and pp_flush.
5403 (print_c_tree): Likewise.
5404
e45abe1f
RH
54052012-07-26 Richard Henderson <rth@redhat.com>
5406
5407 * c-common.c (handle_hot_attribute): Allow labels.
5408 (handle_cold_attribute): Likewise.
5409
332f1d24
JJ
54102012-07-20 Jakub Jelinek <jakub@redhat.com>
5411
5412 PR c++/28656
5413 * c-common.c (check_function_nonnull): Handle multiple nonnull
5414 attributes properly.
5415
7ee2468b
SB
54162012-07-16 Steven Bosscher <steven@gcc.gnu.org>
5417
5418 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
5419 * c-ada-spec.c: Likewise.
5420 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
5421
ee7b28eb
SB
54222012-07-14 Steven Bosscher <steven@gcc.gnu.org>
5423
5424 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
5425 Remove code conditional on it.
5426
6bdf3519
SB
54272012-07-11 Steven Bosscher <steven@gcc.gnu.org>
5428
5429 * c-gimplify.c: Do not include basic-block.h.
5430 * c-common.c: Do not include linfuncs.h.
5431
532aafad
SB
54322012-07-08 Steven Bosscher <steven@gcc.gnu.org>
5433
5434 * c-common.h: Include tree.h.
5435
8d0d1915
JM
54362012-07-02 Jason Merrill <jason@redhat.com>
5437
5438 PR c++/53524
5439 * c-common.c (get_priority): Call default_conversion.
5440
fbc873ad
UB
54412012-07-01 Uros Bizjak <ubizjak@gmail.com>
5442
5443 * c-pch.c (c_common_write_pch): Remove unused variables.
5444
d4a10d0a
SB
54452012-06-29 Steven Bosscher <steven@gcc.gnu.org>
5446
5447 * cppspec.c: Moved from gcc/ to here.
5448
6f3a2e23
KT
54492012-06-27 Kai Tietz <ktietz@redhat.com>
5450
5451 PR preprocessor/37215
5452 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
5453
8ca92d04
SB
54542012-06-21 Steven Bosscher <steven@gcc.gnu.org>
5455
5456 * c-common.h (c_common_print_pch_checksum): Remove.
5457 * c-pch.c: Do not include output.h.
5458 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
5459 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
5460 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
5461 (struct c_pch_header): Remove.
5462 (get_ident): Update gpch version.
5463 (pch_init): Do not print executable_checksum to asm_out_file.
5464 Do not fail if there is no asm_out_file to read back from. Set
5465 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
5466 (c_common_write_pch): Verify that nothing was written to asm_out_file
5467 since pch_init was called. Do not write a c_pch_header, and do not
5468 copy from asm_out_file to the PCH.
5469 (c_common_read_pch): Do not read a c_pch_header, and do not restore
5470 the content of asm_out_file from the PCH.
5471 (c_common_print_pch_checksum): Remove.
5472 * c-opts.c (c_common_init): Print out executable_checksum directly.
5473
70f42967
SB
54742012-06-19 Steven Bosscher <steven@gcc.gnu.org>
5475
5476 * c-target.def (objc_declare_unresolved_class_reference,
5477 objc_declare_class_definition): Add new hooks.
5478
a8781821
SB
54792012-06-19 Steven Bosscher <steven@gcc.gnu.org>
5480
5481 * c-lex.c: Do not include output.h.
5482 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
5483 Remove uses of ASM_OUTPUT_IDENT.
5484
9e1a8dd1
RR
54852012-06-15 Marc Glisse <marc.glisse@inria.fr>
5486
5487 PR c++/51033
5488 * c-common.h (c_build_vec_perm_expr): Move decl here.
5489 * c-common.c (c_build_vec_perm_expr): Move definition
5490 here.
5491
6f07a821
SB
54922012-06-06 Steven Bosscher <steven@gcc.gnu.org>
5493
5494 * c.opt (fconserve-space): Turn into a no-op.
5495
9faeb493 54962012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
5497
5498 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
5499 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
5500 both the start and end of the function.
5501
a4b7d13c
SB
55022012-06-04 Steven Bosscher <steven@gcc.gnu.org>
5503
5504 * c-common.c: Do not include output.h.
5505 * c-pragma.c: Likewise.
5506
c265f413
SA
55072012-06-04 Steven Bosscher <steven@gcc.gnu.org>
5508
5509 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
5510 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
5511 (lang_decl_name): Handle namespace decls.
5512
be7a421e
SB
55132012-05-31 Steven Bosscher <steven@gcc.gnu.org>
5514
5515 * c-ada-spec.c: Do not include output.h.
5516 * c-semantics.c: Likewise.
5517
65de6659
JM
55182012-05-29 Joseph Myers <joseph@codesourcery.com>
5519
5520 * c-common.c: Fix typo.
5521
ca5f4331
MM
55222012-05-29 Michael Matz <matz@suse.de>
5523
5524 * c-common.h (c_expand_decl): Remove prototype.
5525
4f7f7aca
MLI
55262012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5527
5528 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
5529 * c-opts.c (c_common_handle_option): Remove code handling
5530 warn_missing_braces.
5531
4a792f9b
PC
55322012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
5533
5534 PR c++/25137
5535 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
5536 -Wmissing_braces.
5537
650dc14a
DS
55382012-05-22 Dodji Seketeli <dodji@redhat.com>
5539
5540 PR c++/53322
5541 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
5542
9b095bf1
MLI
55432012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
5544
5545 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
5546 * c-opts.c (c_common_handle_option): Do not handle explicitly
5547 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
5548
0b2c4be5
DS
55492012-05-16 Dodji Seketeli <dodji@redhat.com>
5550
5551 PR preprocessor/7263
5552 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
5553 to cpp_classify_number. For diagnostics, use the precise location
5554 instead of the global input_location.
5555
a1bde5af
PC
55562012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
5557
d02924ef 5558 PR c++/11856
a1bde5af
PC
5559 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
5560
d1ede5f4
BS
55612012-05-14 Bernd Schmidt <bernds@codesourcery.com>
5562
a1bde5af 5563 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 5564
f2bc201f
MLI
55652012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
5566
5567 PR 53063
5568 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
5569 Wreorder): Use LangEnabledBy.
5570 * c-opts.c (c_common_handle_option): Do not enable them
5571 explicitly. Call lang-specific generated functions.
5572 (c_common_post_options): Do not set them here.
5573
95744782
MLI
55742012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
5575
5576 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
5577 Wmissing-field-initializers,Wmissing-parameter-type,
5578 Wold-style-declaration,Woverride-init): Use EnabledBy.
5579 * c-opts.c (c_common_post_options): Do not set here explicitly.
5580
7d5a5747
MLI
55812012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
5582
5583 PR 53063
5584 * c-opts.c (c_common_handle_option): Use handle_generated_option
5585 to enable sub-options.
5586
5a3c9cf2
PC
55872012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
5588
5589 PR c++/53158
5590 * c-common.c (warnings_for_convert_and_check): Use warning_at.
5591
3ac8781c
RG
55922012-05-10 Richard Guenther <rguenther@suse.de>
5593
5594 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
5595 adjust commentary about TYPE_IS_SIZETYPE types.
5596
1e537948
MLI
55972012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5598
5599 PR c++/53261
5600 * c-common.c (warn_logical_operator): Check that argument of
5601 integer_zerop is not NULL.
5602
f2c4a785
MLI
56032012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
5604
5605 PR c/43772
5606 * c-common.c (warn_logical_operator): Do not warn if either side
5607 is already true or false.
5608
50f305ca
MLI
56092012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
5610
5611 PR c/51712
5612 * c-common.c (expr_original_type): New.
5613 (shorten_compare): Do not warn for enumeration types.
5614
0c3641b0
MLI
56152012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
5616
5617 * c.opt (fpermissive): Add Var(flag_permissive).
5618
7edaa4d2
MG
56192012-04-30 Marc Glisse <marc.glisse@inria.fr>
5620
5621 PR c++/51033
5622 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
5623 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
5624
b9c8da34
DS
56252012-04-30 Dodji Seketeli <dodji@redhat.com>
5626
5627 Add -Wvarargs option
5628 * c.opt (Wvarargs): Define new option.
5629
e6c69da0
MLI
56302012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
5631
5632 * c-common.c (check_function_arguments): Replace
5633 Wmissing-format-attribute with Wsuggest-attribute=format.
5634
90137d8f
MLI
56352012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
5636
5637 * c.opt (Wsuggest-attribute=format): New. Alias of
5638 Wmissing-format-attribute.
5639 * c-format.c (decode_format_type): Replace
5640 Wmissing-format-attribute with Wsuggest-attribute=format.
5641 (check_function_format): Likewise.
5642
9faeb493 56432012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
5644
5645 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
5646 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
5647 * c.opt: Add Wliteral-suffix.
5648
c1771a20
MLI
56492012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
5650
5651 PR c/44774
5652 * c.opt (Wpedantic): New.
5653 (pedantic): Alias Wpedantic.
5654 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
5655 (c_common_post_options): Likewise.
5656 (sanitize_cpp_opts): Likewise.
5657 * c-lex.c (interpret_float): Likewise.
5658 * c-format.c (check_format_types): Likewise.
5659 * c-common.c (pointer_int_sum): Likewise.
5660 (c_sizeof_or_alignof_type): Likewise.
5661 (c_add_case_label): Likewise.
5662 (c_do_switch_warnings): Likewise.
5663 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
5664
04b391c1
JM
56652012-04-15 Jason Merrill <jason@redhat.com>
5666
5667 PR c++/52818
5668 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
5669 (C_STD_NAME): Distinguish between C++98 and C++11.
5670
ac868f29
EB
56712012-04-11 Eric Botcazou <ebotcazou@adacore.com>
5672
5673 PR target/52624
5674 * c-common.h (uint16_type_node): Rename into...
5675 (c_uint16_type_node): ...this.
5676 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
5677 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
5678
fd4116f4
MLI
56792012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
5680
5681 * c-common.c (warn_if_unused_value): Move definition to here.
5682 * c-common.h (warn_if_unused_value): Move declaration to here.
5683
573ac65e
WB
56842012-03-23 William Bader <williambader@hotmail.com>
5685
5686 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
5687
552b8185
JM
56882012-03-20 Jason Merrill <jason@redhat.com>
5689
5690 * c-common.h (enum cxx_dialect): Add cxx1y.
5691 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
5692 test.
5693 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
5694 * c-opts.c (c_common_post_options): Likewise.
5695 (set_std_cxx1y): New.
5696 (c_common_handle_option): Call it.
5697 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
5698
04398fa8
PC
56992012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
5700
5701 PR c++/14710
5702 * c.opt ([Wuseless-cast]): Add.
5703
d2a12ae7
RG
57042012-03-16 Richard Guenther <rguenther@suse.de>
5705
5706 * c-pretty-print.c (pp_c_initializer_list): Adjust.
5707
a12bf402
MLI
57082012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
5709
5710 PR c++/44783
5711 * c.opt (ftemplate-backtrace-limit) Add.
5712
5c30094f
RO
57132012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5714
5715 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
5716 handling.
5717 * c-pragma.c (handle_pragma_extern_prefix): Remove.
5718 (init_pragma): Don't register extern_prefix.
5719
21fa2faf
RG
57202012-03-12 Richard Guenther <rguenther@suse.de>
5721
5722 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
5723 (builtin_type_for_size): Likewise.
5724
e3793c6f
JJ
57252012-02-13 Jakub Jelinek <jakub@redhat.com>
5726
5727 PR c++/52215
5728 * c-common.c (sync_resolve_params): Don't decide whether to convert
5729 or not based on TYPE_SIZE comparison, convert whenever arg_type
5730 is unsigned INTEGER_TYPE.
5731
93286335
PC
57322012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
5733
5734 PR c/52118
5735 * c.opt ([Wunused-local-typedefs]): Fix description.
5736
7a421706
MS
57372012-01-24 Mike Stump <mikestump@comcast.net>
5738
5739 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
5740 exactly.
5741
ba9b1f11
RG
57422012-01-18 Richard Guenther <rguenther@suse.de>
5743
5744 * c-opts.c (c_common_post_options): Reset LTO flags if
5745 we are about to generate a PCH.
5746
465406be
PC
57472012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
5748
5749 PR c++/51777
5750 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
5751 use pp_unsigned_wide_integer.
5752
aee15221
RG
57532012-01-10 Richard Guenther <rguenther@suse.de>
5754
5755 PR middle-end/51806
5756 * c-opts.c (c_common_handle_option): Move -Werror handling
5757 to language independent code.
5758
5720c0dc
RG
57592012-01-05 Richard Guenther <rguenther@suse.de>
5760
5761 PR middle-end/51764
5762 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
5763 from common.opt.
5764
73ac190a
PC
57652011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
5766
5767 PR c++/51316
5768 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
5769 of array types with an unknown bound.
5770
48b0b196
JM
57712011-12-20 Joseph Myers <joseph@codesourcery.com>
5772
5773 * c-common.c (flag_isoc99): Update comment to refer to C11.
5774 (flag_isoc1x): Change to flag_isoc11.
5775 * c-common.h (flag_isoc99): Update comment to refer to C11.
5776 (flag_isoc1x): Change to flag_isoc11.
5777 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
5778 C11.
5779 * c-opts.c (set_std_c1x): Change to set_std_c11.
5780 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
5781 Call set_std_c11.
5782 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
5783 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
5784 * c.opt (std=c1x): Change to std=c11. Document as non-draft
5785 standard.
5786 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
5787 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
5788 (std=gnu1x): Make alias of std=gnu11.
5789
d58d6eb5
JM
57902011-12-19 Jason Merrill <jason@redhat.com>
5791
5792 PR c++/51228
5793 * c-common.c (handle_transparent_union_attribute): Check the first
5794 field if the type is complete.
5795
b3908fcc
JW
57962011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
5797
5798 PR libstdc++/51365
5799 * c-common.c (RID_IS_FINAL): Add.
5800 * c-common.h (RID_IS_FINAL): Add.
5801
fea3ca91
IS
58022011-11-30 Iain Sandoe <iains@gcc.gnu.org>
5803
5804 * c.opt (fgnu-runtime): Provide full description.
5805 (fnext-runtime): Likewise.
5806 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
5807
62bad7cd
AM
58082011-11-28 Andrew MacLeod <amacleod@redhat.com>
5809
5810 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
5811 predefines in one place. Add LOCK_FREE predefines.
5812 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
5813 new func.
5814
c466c4ff
AM
58152011-11-24 Andrew MacLeod <amacleod@redhat.com>
5816
5817 PR c/51256
9faeb493 5818 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 5819 conditions
9faeb493
UB
5820 (resolve_overloaded_atomic_exchange,
5821 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
5822 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
5823 error_mark_node for error conditions.
9faeb493 5824
a5952633
RG
58252011-11-08 Richard Guenther <rguenther@suse.de>
5826
5827 PR middle-end/51010
5828 c-family/
5829
0a35513e
AH
58302011-11-07 Richard Henderson <rth@redhat.com>
5831 Aldy Hernandez <aldyh@redhat.com>
5832 Torvald Riegel <triegel@redhat.com>
5833
5834 Merged from transactional-memory.
5835
5836 * c-common.c (handle_tm_wrap_attribute,
5837 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
5838 (struct c_common_reswords): Added __transaction* keywords.
5839 (struct c_common_attribute_table): Added transaction* and tm_regparm
5840 attributes.
5841 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
5842 masks.
5843 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
5844 find_tm_attribute): Declare.
5845
6d87092d
JM
58462011-11-07 Jason Merrill <jason@redhat.com>
5847
5848 PR c++/35688
5849 * c-common.c, c-common.h: Revert yesterday's changes.
5850
8e7860a1
JM
58512011-11-06 Jason Merrill <jason@redhat.com>
5852
5853 PR c++/35688
5854 * c-common.c (decl_has_visibility_attr): Split out from...
5855 (c_determine_visibility): ...here.
5856 * c-common.h: Declare it.
5857
d19fa6b5
JM
58582011-11-06 Joseph Myers <joseph@codesourcery.com>
5859
5860 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
5861 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
5862 type.
5863 (check_user_alignment): New. Split out of
5864 handle_aligned_attribute. Disallow integer constants with
5865 noninteger types. Conditionally allow zero.
5866 (handle_aligned_attribute): Use check_user_alignment.
5867 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
5868
86951993
AM
58692011-11-06 Andrew MacLeod <amacleod@redhat.com>
5870 Richard Henderson <rth@redhat.com>
5871
5872 Merged from cxx-mem-model.
5873
5874 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 5875 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
5876 parameters that are the same type size.
5877 (get_atomic_generic_size): New. Find size of generic
5878 atomic function parameters and do typechecking.
5879 (add_atomic_size_parameter): New. Insert size into parameter list.
5880 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
5881 either __atomic_exchange_n or external library call.
9faeb493 5882 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 5883 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 5884 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
5885 __atomic_load_n or an external library call.
5886 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
5887 __atomic_store_n or an external library call.
5888 (resolve_overloaded_builtin): Handle new __atomic builtins.
5889
cf9e9959
EB
58902011-11-04 Eric Botcazou <ebotcazou@adacore.com>
5891
5892 PR c++/50608
5893 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
5894 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
5895 <INDIRECT_REF>: Return the argument.
5896 <ARRAY_REF>: Remove special code for negative offset.
5897 Call fold_build_pointer_plus instead of size_binop.
5898 (fold_offsetof): Remove STOP_REF argument and adjust.
5899 * c-common.h (fold_offsetof_1): Declare.
5900 (fold_offsetof): Remove STOP_REF argument.
5901
25339f10
JM
59022011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
5903
5904 PR c++/50810
5905 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
5906 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
5907 Wnarrowing for C++0x and C++98.
5908 * c.opt ([Wnarrowing]): Update.
5909
89401152
PC
59102011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
5911
5912 PR c++/44277
5913 * c.opt: Add Wzero-as-null-pointer-constant.
5914
97e3ad20
JM
59152011-10-31 Jason Merrill <jason@redhat.com>
5916
15694fdd
JM
5917 * c.opt (-fdeduce-init-list): Off by default.
5918
97e3ad20
JM
5919 PR c++/50920
5920 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
5921 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
5922 and -Wc++11-compat.
5923 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
5924
fb9120e3
RAV
59252011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
5926
5927 PR c++/30066
5928 * c.opt (fvisibility-inlines-hidden): Description change.
5929
3ce4f9e4
ESR
59302011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
5931
5932 Implement C++11 user-defined literals.
5933 * c-common.c (build_userdef_literal): New.
5934 * c-common.def: New tree code.
5935 * c-common.h (tree_userdef_literal): New tree struct and accessors.
5936 * c-lex.c (interpret_float): Add suffix parm.
5937 (c_lex_with_flags): Build literal tokens.
5938
5f53c243
PC
59392011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
5940
5941 PR c++/50841
5942 Revert:
5943 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
5944
5945 PR c++/50810
5946 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
5947 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
5948 Wnarrowing for C++0x and C++98.
5949 * c.opt ([Wnarrowing]): Update.
5950
263734e1
PC
59512011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
5952
5953 PR c++/50810
5954 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
5955 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
5956 Wnarrowing for C++0x and C++98.
5957 * c.opt ([Wnarrowing]): Update.
5958
d2e312d7
PC
59592011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
5960
5961 PR c++/45385
5962 * c-common.c (conversion_warning): Remove code looking for
5963 artificial operands.
5964
d17687f6
DS
59652011-10-18 Dodji Seketeli <dodji@redhat.com>
5966
5967 PR bootstrap/50760
5968 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 5969 !NO_IMPLICIT_EXTERN_C.
d17687f6 5970
fc8396e9
PC
59712011-10-17 Michael Spertus <mike_spertus@symantec.com>
5972
5973 * c-common.c (c_common_reswords): Add __bases,
5974 __direct_bases.
5975 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
5976
59772011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
5978
5979 PR c++/50757
5980 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
5981
847e697a
TT
59822011-10-15 Tom Tromey <tromey@redhat.com>
5983 Dodji Seketeli <dodji@redhat.com>
5984
5985 * c.opt (fdebug-cpp): New option.
5986 * c-opts.c (c_common_handle_option): Handle the option.
5987 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
5988 output stream in parameter. Factorized from ...
5989 (maybe_print_line): ... this. Dump location debug information when
5990 -fdebug-cpp is in effect.
5991 (print_line_1): New static function. Takes an output stream in
5992 parameter. Factorized from ...
5993 (print_line): ... here. Dump location information when -fdebug-cpp
5994 is in effect.
5995 (scan_translation_unit): Dump location information when
5996 -fdebug-cpp is in effect.
5997
92582b75
TT
59982011-10-15 Tom Tromey <tromey@redhat.com>
5999 Dodji Seketeli <dodji@redhat.com>
6000
6001 * c.opt (ftrack-macro-expansion): New option. Handle it with and
6002 without argument.
6003 * c-opts.c (c_common_handle_option)<case
6004 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
6005 cases. Handle -ftrack-macro-expansion with and without argument.
6006
46427374
TT
60072011-10-15 Tom Tromey <tromey@redhat.com>
6008 Dodji Seketeli <dodji@redhat.com>
6009
6010 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
6011 (print_line, cb_define, do_line_change): Adjust to avoid touching
6012 the internals of struct line_map. Use the public API instead.
6013 * c-pch.c (c_common_read_pch): Likewise.
6014 * c-lex.c (fe_file_change): Likewise.
6015
fc8396e9
PC
60162011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
6017
6018 PR c++/17212
6019 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
6020
60212011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
6022
6023 PR c++/33067
6024 * c-pretty-print.c (pp_c_floating_constant): Output
6025 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
6026
e79983f4
MM
60272011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
6028
6029 * c-common.c (def_builtin_1): Delete old interface with two
6030 parallel arrays to hold standard builtin declarations, and replace
6031 it with a function based interface that can support creating
6032 builtins on the fly in the future. Change all uses, and poison
6033 the old names. Make sure 0 is not a legitimate builtin index.
6034 * c-omp.c (c_finish_omp_barrier): Ditto.
6035 (c_finish_omp_taskwait): Ditto.
6036 (c_finish_omp_flush): Ditto.
6037
6637388f
TG
60382011-10-11 Tristan Gingold <gingold@adacore.com>
6039
6040 * c.opt: (fallow-parameterless-variadic-functions): New.
6041
3797cb21
DS
60422011-09-08 Dodji Seketeli <dodji@redhat.com>
6043
6044 PR c++/33255 - Support -Wunused-local-typedefs warning
6045 * c-common.h (struct c_language_function::local_typedefs): New
6046 field.
9faeb493
UB
6047 (record_locally_defined_typedef, maybe_record_typedef_use)
6048 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 6049 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
6050 (maybe_record_typedef_use)
6051 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
6052 * c.opt: Declare new -Wunused-local-typedefs flag.
6053
693ddb1b
EB
60542011-09-06 Eric Botcazou <ebotcazou@adacore.com>
6055
6056 PR middle-end/50266
6057 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
6058 computations.
6059
830c740f
RG
60602011-09-05 Richard Guenther <rguenther@suse.de>
6061
6062 * c-common.c (complete_array_type): Use ssize_int (-1) instead
6063 of integer_minus_one_node for empty array upper bounds.
6064
892a371f
DS
60652011-08-28 Dodji Seketeli <dodji@redhat.com>
6066
6067 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
6068 it's the first time it's being called on this main TU.
6069
0e3fdb48
RB
60702011-08-24 Richard Guenther <rguenther@suse.de>
6071
6072 PR c/49396
6073 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
6074
60752011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
6076
6077 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
6078 defined in cpp_init_builtins and c_cpp_builtins.
6079
d4a83c10
JM
60802011-08-19 Joseph Myers <joseph@codesourcery.com>
6081
6082 * c-common.c (c_common_reswords): Add __builtin_complex.
6083 * c-common.h (RID_BUILTIN_COMPLEX): New.
6084
bbceee64
JM
60852011-08-18 Joseph Myers <joseph@codesourcery.com>
6086
6087 * c-common.c (c_common_reswords): Add _Noreturn.
6088 (keyword_is_function_specifier): Handle RID_NORETURN.
6089 * c-common.h (RID_NORETURN): New.
6090
3f8257db 60912011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
6092
6093 * c-common.c (unsafe_conversion_p): New function. Check if it is
6094 unsafe to convert an expression to the type.
6095 (conversion_warning): Adjust, use unsafe_conversion_p.
6096 * c-common.h (unsafe_conversion_p): New function declaration.
6097
20906c66
JJ
60982011-08-02 Jakub Jelinek <jakub@redhat.com>
6099
6100 * c-common.h (c_finish_omp_atomic): Adjust prototype.
6101 (c_finish_omp_taskyield): New prototype.
6102 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
6103 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
6104 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
6105 or RHS1 have side-effects, evaluate those too in the right spot,
6106 if it is a decl and LHS is also a decl, error out if they
6107 aren't the same.
6108 (c_finish_omp_taskyield): New function.
6109 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
6110 * c-pragma.c (omp_pragmas): Add taskyield.
6111 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
6112 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
6113 PRAGMA_OMP_CLAUSE_MERGEABLE.
6114
770e5a2e
DS
61152011-07-25 Dodji Seketeli <dodji@redhat.com>
6116
6117 * c-common.h (set_underlying_type): Remove parm name from
6118 declaration.
6119
1baae426
RG
61202011-07-25 Romain Geissler <romain.geissler@gmail.com>
6121
6122 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 6123
fcb21722
JM
61242011-07-22 Jason Merrill <jason@redhat.com>
6125
76f86d00
JM
6126 PR c++/49793
6127 * c.opt (Wnarrowing): New.
6128
3a636414
JM
6129 PR c++/30112
6130 * c-common.h: Declare c_linkage_bindings.
6131 * c-pragma.c (handle_pragma_redefine_extname): Use it.
6132
fcb21722
JM
6133 PR c++/49813
6134 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
6135 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
6136 as flag_isoc99 for 'restrict'.
6137 (pp_c_specifier_qualifier_list): Likewise for _Complex.
6138
02614448
ILT
61392011-07-21 Ian Lance Taylor <iant@google.com>
6140
6141 PR middle-end/49705
6142 * c-common.c (c_disable_warnings): New static function.
6143 (c_enable_warnings): New static function.
6144 (c_fully_fold_internal): Change local unused_p to bool. Call
6145 c_disable_warnings and c_enable_warnings rather than change
6146 c_inhibit_evaluation_warnings.
6147
34429675
JM
61482011-07-20 Jason Merrill <jason@redhat.com>
6149
6150 PR c++/6709 (DR 743)
6151 PR c++/42603 (DR 950)
6152 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
6153 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
6154 (CPP_DECLTYPE): New.
6155 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
6156
5d49b6a7
RG
61572011-07-19 Richard Guenther <rguenther@suse.de>
6158
6159 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
6160 * c-omp.c (c_finish_omp_for): Likewise.
6161
e84a58ff
EB
61622011-07-12 Eric Botcazou <ebotcazou@adacore.com>
6163
6164 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
6165 body on the next line.
6166
329af3c7
JM
61672011-07-08 Jason Merrill <jason@redhat.com>
6168
4063e61b
JM
6169 PR c++/45437
6170 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
6171
329af3c7
JM
6172 PR c++/49673
6173 * c-common.c (c_apply_type_quals_to_decl): Don't check
6174 TYPE_NEEDS_CONSTRUCTING.
6175
1a072294
RG
61762011-07-06 Richard Guenther <rguenther@suse.de>
6177
6178 * c-common.c (c_common_nodes_and_builtins):
6179 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
6180
fce5dddd
RG
61812011-07-05 Richard Guenther <rguenther@suse.de>
6182
6183 * c-common.c (c_common_nodes_and_builtins): Build all common
6184 tree nodes first.
6185
45d439ac
JJ
61862011-06-27 Jakub Jelinek <jakub@redhat.com>
6187
56300785
JJ
6188 * c-common.h (c_tree_chain_next): New static inline function.
6189
45d439ac
JJ
6190 * c-common.c (check_builtin_function_arguments): Handle
6191 BUILT_IN_ASSUME_ALIGNED.
6192
e0a8ecf2
AM
61932011-06-21 Andrew MacLeod <amacleod@redhat.com>
6194
6195 * c-common.c: Add sync_ or SYNC__ to builtin names.
6196 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
6197
61982011-06-20 Pierre Vittet <piervit@pvittet.com>
6199
6200 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
6201 handler.
6202 (gen_pragma_handler): New union.
6203 (internal_pragma_handler): New type.
6204 (c_register_pragma_with_data)
6205 (c_register_pragma_with_expansion_and_data): New functions.
6206
6207 * c-pragma.c (registered_pragmas, c_register_pragma_1)
6208 (c_register_pragma, c_register_pragma_with_expansion)
6209 (c_invoke_pragma_handler): Changed to work with
6210 internal_pragma_handler.
6211 (c_register_pragma_with_data)
6212 (c_register_pragma_with_expansion_and_data): New functions.
6213
677f3fa8
JM
62142011-06-14 Joseph Myers <joseph@codesourcery.com>
6215
6216 * c-common.c: Include common/common-target.h.
6217 (handle_section_attribute): Use
6218 targetm_common.have_named_sections.
6219 * c-cppbuiltin.c: Include common/common-target.h.
6220 (c_cpp_builtins): Use targetm_common.except_unwind_info.
6221
d7fc8c14
RG
62222011-06-10 Richard Guenther <rguenther@suse.de>
6223
6224 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
6225 to print a IDENTIFIER_NODE.
6226
10e48e39
RO
62272011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6228 Joseph Myers <joseph@codesourcery.com>
6229
6230 * c.opt (fbuilding-libgcc): New option.
6231 * c-cppbuiltin.c (c_cpp_builtins): Define
6232 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
6233
6976ae51
JM
62342011-06-07 Jason Merrill <jason@redhat.com>
6235
3ff60975
JM
6236 * c-common.c (max_tinst_depth): Lower default to 900.
6237
6976ae51
JM
6238 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
6239
009db074
RG
62402011-06-07 Richard Guenther <rguenther@suse.de>
6241
6242 * c-common.c (c_common_nodes_and_builtins): Do not set
6243 size_type_node or call set_sizetype.
6244
b4592b92
DS
62452011-06-07 Dodji Seketeli <dodji@redhat.com>
6246
6247 PR debug/49130
6248 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 6249 type when using pointer comparison to compare types.
b4592b92 6250
014ab419
JW
62512011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
6252
6253 * c.opt: Add -Wdelete-non-virtual-dtor.
6254 * c-opts.c (c_common_handle_option): Include it in -Wall.
6255
4f60111f
NF
62562011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
6257
6258 PR bootstrap/49190
6259
6260 Revert:
6261 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
6262
6263 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
6264 not tree_common.
6265
4cc4f2f4
JJ
62662011-05-27 Jakub Jelinek <jakub@redhat.com>
6267
6268 PR c++/49165
6269 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
6270 C++ don't call c_common_truthvalue_conversion on void type arms.
6271
38e01f9e
NF
62722011-05-27 Nathan Froyd <froydnj@codesourcery.com>
6273
6274 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
6275 (stmt_list_stack): Define.
6276 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
6277 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
6278
92e948a8
NF
62792011-05-26 Nathan Froyd <froydnj@codesourcery.com>
6280
6281 * c-common.c (warning_candidate_p): Check for BLOCKs.
6282
a2fc3e63
NF
62832011-05-26 Nathan Froyd <froydnj@codesourcery.com>
6284
6285 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
6286 not tree_common.
6287
0957c029
JJ
62882011-05-25 Jakub Jelinek <jakub@redhat.com>
6289
6290 * c-common.c (def_fn_type): Remove extra va_end.
6291
828fb3ba
JM
62922011-05-23 Jason Merrill <jason@redhat.com>
6293
6294 PR c++/48106
6295 * c-common.c (c_common_get_narrower): New.
6296 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
6297
dde05067
NF
62982011-05-23 Nathan Froyd <froydnj@codesourcery.com>
6299
6300 * c-common.h (check_function_arguments): Tweak prototype of
6301 check_function_arguments.
6302 * c-common.c (check_function_arguments): Likewise. Adjust
6303 calls to check_function_nonnull, check_function_format, and
6304 check_function_sentinel.
6305 (check_function_sentinel): Take a FUNCTION_TYPE rather than
6306 separate attributes and typelist arguments. Use
6307 FOREACH_FUNCTION_ARGS to iterate over argument types.
6308
3c0d13bf
PC
63092011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
6310
6311 * c-common.c (c_common_reswords): Reorder.
6312 * c-common.h (rid): Likewise.
6313
8242dd04
NF
63142011-05-10 Nathan Froyd <froydnj@codesourcery.com>
6315
6316 * c-common.c (def_fn_type): Don't call build_function_type, call
6317 build_function_type_array or build_varargs_function_type_array
6318 instead.
6319 (c_common_nodes_and_builtins): Likewise.
6320
3d528853
NF
63212011-05-05 Nathan Froyd <froydnj@codesourcery.com>
6322
6323 * c-common.c (c_add_case_label): Omit the loc argument to
6324 build_case_label.
6325 * c-common.h (build_case_label): Remove.
6326 * c-semantics.c (build_case_label): Remove.
6327
a04a722b
JM
63282011-05-05 Joseph Myers <joseph@codesourcery.com>
6329
6330 * c-objc.h (objc_start_method_definition): Update prototype.
6331 * stub-objc.c (objc_start_method_definition): Add extra parameter.
6332
e19a18d4
NF
63332011-05-04 Nathan Froyd <froydnj@codesourcery.com>
6334
6335 * c-common.c (check_main_parameter_types): Reindent. Don't use
6336 TYPE_ARG_TYPES directly.
6337 (handle_nonnull_attribute): Likewise.
6338 (sync_resolve_params): Likewise.
6339 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
6340 to check_format_string.
6341 (handle_format_attribute): Likewise.
6342 (check_format_string): Take a function type to examine instead of
6343 a type list. Use a function_arg_iterator to step through argument
6344 types.
6345
c62c040f
RG
63462011-05-04 Richard Guenther <rguenther@suse.de>
6347
6348 * c-common.c (fix_string_type): Use size_int for index type bounds.
6349 (start_fname_decls): Do not pass NULL to build_int_cst.
6350 (c_init_attributes): Likewise.
6351 * c-lex.c (c_lex_with_flags): Likewise.
6352
c12ff9d8
JM
63532011-04-27 Jason Merrill <jason@redhat.com>
6354
6355 * c-common.c (make_tree_vector_from_list): New.
6356 * c-common.h: Declare it.
6357
304dfbe3
RG
63582011-04-26 Richard Guenther <rguenther@suse.de>
6359
6360 PR preprocessor/48248
6361 * c-ppoutput.c (maybe_print_line): Always optimize newlines
6362 for output size with -P.
6363
3c0d13bf
PC
63642011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
6365
6366 * c-common.c (struct c_common_resword): Add __underlying_type.
6367 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
6368
04695783
JM
63692011-04-20 Jim Meyering <meyering@redhat.com>
6370
6371 * c-format.c (init_dollar_format_checking): Remove useless
6372 if-before-free.
6373
0dc33c3c
NP
63742011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
6375
6376 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 6377 (objc_detect_field_duplicates): New.
0dc33c3c 6378 * stub-objc.c: Likewise.
3c0d13bf 6379
c59633d9
NP
63802011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
6381
6382 * stub-objc.c (objc_declare_protocols): Renamed to
6383 objc_declare_protocol.
6384 * c-objc.h: Likewise.
3c0d13bf 6385
32dabdaf
NP
63862011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
6387
6388 * stub-objc.c (objc_declare_class): Updated argument name.
6389
81f653d6
NF
63902011-04-12 Nathan Froyd <froydnj@codesourcery.com>
6391
6392 * c-common.h (c_common_init_ts): Declare.
6393 * c-common.c (c_common_init_ts): Define.
6394
eb345401
NP
63952011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
6396
6397 * c-objc.h (objc_build_message_expr): Updated prototype.
6398 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 6399
a358e188
MJ
64002011-04-12 Martin Jambor <mjambor@suse.cz>
6401
6402 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
6403 of cgraph_node.
6404
e6313a78
RG
64052011-04-11 Richard Guenther <rguenther@suse.de>
6406
6407 * c-common.c (complete_array_type): Build a range type of
6408 proper type.
6409
dcf0c47e
NF
64102011-04-08 Nathan Froyd <froydnj@codesourcery.com>
6411
6412 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
6413 (handle_type_generic_attribute): Likewise.
6414
1ee44b26
JM
64152011-04-07 Jason Merrill <jason@redhat.com>
6416
6417 PR c++/48450
6418 * c-common.c (c_common_truthvalue_conversion): Don't ignore
6419 conversion from C++0x scoped enum.
6420
acce4e77
JM
64212011-04-06 Joseph Myers <joseph@codesourcery.com>
6422
6423 * c-target-def.h: New file.
6424 * c-target.def: New file.
6425 * c-target.h: New file.
6426 * c-common.c (targetcm): Don't define here.
6427 * c-common.h (default_handle_c_option): Declare.
6428 * c-format.c: Include c-target.h instead of target.h.
6429 * c-opts.c: Include c-target.h instead of target.h. Explicitly
6430 include tm.h.
6431 (default_handle_c_option): Move from targhooks.c.
6432
e2eefb55
JJ
64332011-03-29 Jakub Jelinek <jakub@redhat.com>
6434
6435 PR preprocessor/48248
6436 * c-ppoutput.c (print): Add src_file field.
6437 (init_pp_output): Initialize it.
6438 (maybe_print_line): Don't optimize by adding up to 8 newlines
6439 if map->to_file and print.src_file are different file.
6440 (print_line): Update print.src_file.
6441
ba78087b
KT
64422011-03-25 Kai Tietz <ktietz@redhat.com>
6443
6444 * c-ada-spec.c (compare_comment): Use filename_cmp
6445 instead of strcmp for filename.
6446
0edf1bb2
JL
64472011-03-25 Jeff Law <law@redhat.com>
6448
adfac8df 6449 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 6450
c7dc8804
JM
64512011-03-25 Jason Merrill <jason@redhat.com>
6452
6453 * c.opt: Add -std=c++03.
6454
d1d879b1
EB
64552011-03-22 Eric Botcazou <ebotcazou@adacore.com>
6456
6457 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
6458
3f8257db 64592011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
6460
6461 PR target/12171
5050afdf
KT
6462 * c-pretty-print.c (pp_c_specifier_qualifier_list):
6463 Display allowed attributes for function pointer types.
6464 (pp_c_attributes_display): New function to display
6465 attributes having affects_type_identity flag set to true.
6466 * c-pretty-print.h (pp_c_attributes_display): New prototype.
6467
62d784f7
KT
6468 * c-common.c (c_common_attribute_table):
6469 Add new element.
6470 (c_common_format_attribute_table): Likewise.
6471
82d37118
JM
64722011-03-18 Jason Merrill <jason@redhat.com>
6473
49a000c3
JM
6474 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
6475 * c-common.h: Don't declare it here.
6476 * c-common.c: Or define it here.
6477 * c-opts.c (c_common_handle_option): Or set it here.
6478
82d37118
JM
6479 PR c++/35315
6480 * c-common.c (handle_transparent_union_attribute): Don't
6481 make a duplicate type in C++.
6482
17bc631c
JM
64832011-03-15 Jason Merrill <jason@redhat.com>
6484
6485 * c-common.c (max_constexpr_depth): New.
6486 * c-common.h: Declare it.
6487 * c-opts.c (c_common_handle_option): Set it.
6488 * c.opt (fconstexpr-depth): New option.
6489
1b9b91a6
JM
64902011-03-11 Jason Merrill <jason@redhat.com>
6491
f231b5ff
JM
6492 * c-common.c (attribute_takes_identifier_p): Add missing const.
6493
1b9b91a6
JM
6494 PR c++/46803
6495 * c-common.c (attribute_takes_identifier_p): Assume that an
6496 unknown attribute takes an identifier.
6497
a19e4d44
NF
64982011-03-07 Nathan Froyd <froydnj@codesourcery.com>
6499
6500 PR c/47786
6501 * c-common.c (c_type_hash): Call list_length instead of iterating
6502 through DECL_CHAIN. Rename 'i' to 'n_elements'.
6503
982d62f6
JJ
65042011-02-19 Jakub Jelinek <jakub@redhat.com>
6505
6506 PR c/47809
6507 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
6508
0a256240
NP
65092011-02-17 Iain Sandoe <iains@gcc.gnu.org>
6510
6511 * c.opt (fobjc-abi-version=) New.
6512 (fobjc-nilcheck): New.
6513
ba9e6dd5
NF
65142011-02-03 Nathan Froyd <froydnj@codesourcery.com>
6515
6516 PR c++/46890
6517 * c-common.h (keyword_is_decl_specifier): Declare.
6518 * c-common.c (keyword_is_decl_specifier): Define.
6519 (keyword_is_function_specifier): New function.
6520
7273813a
JJ
65212011-01-26 Jakub Jelinek <jakub@redhat.com>
6522
6523 PR c/47473
6524 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
6525 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
6526 REAL_TYPE.
6527
908ef79b
AC
65282011-01-26 Arnaud Charlet <charlet@adacore.com>
6529
6530 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
6531
237e9384
JJ
65322011-01-26 Jakub Jelinek <jakub@redhat.com>
6533
6534 PR pch/47430
6535 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
6536 after init_c_lex if pch_file is set.
6537
47ea1edf
DK
65382011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
6539
d4dba752 6540 PR c++/43601
47ea1edf
DK
6541 * c.opt (-fkeep-inline-dllexport): New switch.
6542
2aa9c6ae
RG
65432011-01-12 Richard Guenther <rguenther@suse.de>
6544
6545 PR middle-end/32511
6546 * c-common.c (handle_weak_attribute): Warn instead of error
6547 on declaring an inline function weak.
6548
7bd11157
TT
65492011-01-05 Tom Tromey <tromey@redhat.com>
6550
6551 * c-common.h (lvalue_error): Update.
6552 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
6553 not error.
6554
0e66e494 65552010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 6556
b4f588c4
NP
6557 PR objc/47075
6558 * c-objc.h (objc_finish_message_expr): Added argument to
6559 prototype.
6560
f4da8dce
NF
65612010-12-22 Nathan Froyd <froydnj@codesourcery.com>
6562
6563 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
6564 Use prototype_p.
6565
46270f14
NP
65662010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
6567
6568 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 6569 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 6570
4816c593
NF
65712010-12-10 Nathan Froyd <froydnj@codesourcery.com>
6572
6573 * c-common.h (readonly_error): Declare.
6574 * c-common.c (readonly_error): Define.
6575
7a6daeb0
NF
65762010-12-09 Nathan Froyd <froydnj@codesourcery.com>
6577
6578 * c-common.h (invalid_indirection_error): Declare.
6579 * c-common.c (invalid_indirection_error): Define.
6580
892f6119
RG
65812010-12-03 Richard Guenther <rguenther@suse.de>
6582
6583 PR c/46745
6584 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
6585 (pp_c_unary_expression): Likewise.
6586 (pp_c_expression): Likewise.
6587
6c39e757
NP
65882010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
6589
6590 * c-common.h (objc_finish_function): New.
6591 (objc_non_volatilized_type): Removed.
6592 (objc_type_quals_match): Removed.
6593 * stub-objc.c (objc_finish_function): New.
6594 (objc_non_volatilized_type): Removed.
6595 (objc_type_quals_match): Removed.
9faeb493 6596
7c475d11
JM
65972010-11-30 Joseph Myers <joseph@codesourcery.com>
6598
6599 * c-common.h (parse_optimize_options): Declare.
6600 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
6601 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
6602
71f3e391
JM
66032010-11-29 Joseph Myers <joseph@codesourcery.com>
6604
6605 * c-opts.c (check_deps_environment_vars): Use getenv instead of
6606 GET_ENVIRONMENT.
6607 * c-pch.c (O_BINARY): Don't define here.
6608 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
6609
d5fabb58
JM
66102010-11-25 Joseph Myers <joseph@codesourcery.com>
6611
6612 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
6613 targetm.except_unwind_info.
6614
299404a1
JM
66152010-11-23 Joseph Myers <joseph@codesourcery.com>
6616
6617 * c-opts.c (c_common_handle_option): Pass location to
6618 set_struct_debug_option.
6619
c98cd5bf
JM
66202010-11-23 Joseph Myers <joseph@codesourcery.com>
6621
6622 * c-common.c (visibility_options): Move from ../opts.c.
6623 * c-common.h (struct visibility_flags, visibility_options):
6624 Declare here.
6625 * c-opts.c (finish_options): Rename to c_finish_options.
6626 (c_common_init): Update call to finish_options.
6627
a9546771
NP
66282010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
6629
6630 PR objc/34033
6631 * c-lex.c (lex_string): Check that each string in an Objective-C
6632 string concat sequence starts with either one or zero '@', and
6633 that there are no spurious '@' signs at the end.
6634
24a57808
JM
66352010-11-20 Joseph Myers <joseph@codesourcery.com>
6636
6637 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
6638 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
6639 HANDLE_PRAGMA_VISIBILITY.
6640 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
6641 HANDLE_PRAGMA_VISIBILITY): Don't define.
6642 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
6643
a9aa2c3a
NF
66442010-11-20 Nathan Froyd <froydnj@codesourcery.com>
6645
6646 PR c++/16189
6647 PR c++/36888
6648 PR c++/45331
6649 * c-common.h (keyword_begins_type_specifier): Declare.
6650 (keyword_is_storage_class_specifier): Declare.
6651 (keyword_is_type_qualifier): Declare.
6652 * c-common.c (keyword_begins_type_specifier): New function.
6653 (keyword_is_storage_class_specifier): New function.
6654 (keyword_is_type_qualifier): Declare.
6655
5386338c
JM
66562010-11-19 Joseph Myers <joseph@codesourcery.com>
6657
6658 PR c/46547
6659 * c-common.c (in_late_binary_op): Define.
6660 (c_common_truthvalue_conversion): Check in_late_binary_op before
6661 calling c_save_expr.
6662 * c-common.h (in_late_binary_op): Declare.
6663
69ccdddb
JM
66642010-11-19 Joseph Myers <joseph@codesourcery.com>
6665
6666 * c-opts.c (c_common_handle_option): Update calls to
6667 set_struct_debug_option.
6668
6b192a09
NP
66692010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
6670
6671 * c-common.h (objc_declare_protocols): Added additional argument.
6672 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 6673
fb52b50a
NF
66742010-11-18 Nathan Froyd <froydnj@codesourcery.com>
6675
6676 PR c/33193
6677 * c-common.h (build_real_imag_expr): Declare.
6678 * c-semantics.c (build_real_imag_expr): Define.
6679
b37421c6
JM
66802010-11-17 Joseph Myers <joseph@codesourcery.com>
6681
6682 * c-opts.c (c_common_parse_file): Take no arguments.
6683 * c-common.h (c_common_parse_file): Update prototype.
6684
07078664
JJ
66852010-11-16 Jakub Jelinek <jakub@redhat.com>
6686
6687 PR c++/46401
6688 * c-common.c (warning_candidate_p): Don't track non-const calls
6689 or STRING_CSTs.
6690
c6a13190
ILT
66912010-11-15 Ian Lance Taylor <iant@google.com>
6692
6693 * c-lex.c (init_c_lex): Set macro debug callbacks if
6694 flag_dump_go_spec is set.
6695
925e8657
NP
66962010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
6697
6698 * c-common.h (objc_build_incr_expr_for_property_ref): New.
6699 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
6700
bb0a9581
NF
67012010-11-15 Nathan Froyd <froydnj@codesourcery.com>
6702
6703 PR preprocessor/45038
6704 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
6705 dialects.
6706
c5fa0890
JM
67072010-11-12 Joseph Myers <joseph@codesourcery.com>
6708
6709 * c-common.h (c_family_lang_mask): Declare.
6710 * c-opts.c (c_family_lang_mask): Make extern.
6711 * c-pragma.c (handle_pragma_diagnostic): Use
6712 control_warning_option.
6713
a4d8c676
JM
67142010-11-12 Joseph Myers <joseph@codesourcery.com>
6715
6716 * c-common.c (parse_optimize_options): Update call to
6717 decode_options.
6718 * c-common.h (c_common_handle_option): Update prototype.
6719 * c-opts.c (c_common_handle_option): Take location_t parameter and
6720 pass it to other functions.
6721
f954bd2c
JM
67222010-11-11 Joseph Myers <joseph@codesourcery.com>
6723
6724 * c-opts.c (warning_as_error_callback): Remove.
6725 (c_common_initialize_diagnostics): Don't call
6726 register_warning_as_error_callback.
6727 (c_common_handle_option): Handle -Werror=normalized= here.
6728
d8a07487
JM
67292010-11-10 Joseph Myers <joseph@codesourcery.com>
6730
6731 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
6732 in diagnostic.
6733 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
6734 letter.
6735 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
6736 Remove trailing '.' from diagnostics.
6737 * c.opt (Wwrite-strings_: Avoid '`' in help text.
6738
d5478783
JM
67392010-11-10 Joseph Myers <joseph@codesourcery.com>
6740
6741 * c-common.c (parse_optimize_options): Pass global_dc to
6742 decode_options.
6743 * c-opts.c (c_common_handle_option): Pass &global_options to
6744 set_Wstrict_aliasing.
6745 * c.opt (v): Don't mark Common or document here.
6746
91ebb981
IS
67472010-11-06 Iain Sandoe <iains@gcc.gnu.org>
6748
6749 PR target/44981
6750 * c-format.c (format_type): New type gcc_objc_string_format_type.
6751 (valid_stringptr_type_p): New.
6752 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 6753 (check_format_string): Pass expected type, use
91ebb981
IS
6754 valid_stringptr_type_p (), check that the format string types are
6755 consistent with the format specification.
6756 (decode_format_attr): Warn if NSString is used outside objective-c.
6757 (format_types_orig): Add NSString.
6758 (format_name): New.
6759 (format_flags): New.
6760 (check_format_arg): Handle format strings requiring an external parser.
6761 first_target_format_type: New variable.
6762 (handle_format_attribute): Set up first_target_format_type, pass the
6763 expected format arg string type to check_format_string().
6764 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
6765 * stub-objc.c (objc_string_ref_type_p): New.
6766 (objc_check_format_arg): New.
6767
bede2adc
NP
67682010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
6769
9faeb493 6770 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
6771 * c-common.h (objc_build_class_component_ref): New.
6772 * stub-objc.c (objc_build_class_component_ref): New.
6773
9a179d01
NP
67742010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
6775
6776 * c.opt (Wproperty-assign-default): New option.
6777
22d8d616
NP
67782010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
6779
6780 Implemented -fobjc-std=objc1 flag.
6781 * c.opt (fobjc-std=objc1): New option.
6782
2debdb4f
NP
67832010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
6784
6785 Implemented format and noreturn attributes for Objective-C methods.
6786 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
6787 attribute for Objective-C methods.
6788
ec52b111
JM
67892010-10-31 Jason Merrill <jason@redhat.com>
6790
6791 * c-common.c (conversion_warning, warn_for_collisions_1): Use
6792 EXPR_LOC_OR_HERE.
6793
46a88c12
NP
67942010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
6795
6796 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
6797 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
6798 (objc_add_property_declaration): Removed arguments for copies and
6799 ivar.
6800 (objc_build_getter_call): Renamed to
6801 objc_maybe_build_component_ref.
6802 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
6803 (objc_is_property_ref): New.
6804 * c-common.c (c_common_reswords): Removed copies and ivar.
6805 * stub-objc.c (objc_add_property_declaration): Removed arguments
6806 for copies and ivar.
6807 (objc_build_getter_call): Renamed to
6808 objc_maybe_build_component_ref.
6809 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
6810 (objc_is_property_ref): New.
9faeb493 6811
1e4bf85b
AC
68122010-10-29 Arnaud Charlet <charlet@adacore.com>
6813 Matthew Gingell <gingell@adacore.com>
6814
6815 * c-ada-spec.c (separate_class_package): New function.
6816 (pp_ada_tree_identifier): Prefix references to C++ classes with the
6817 name of their enclosing package.
6818 (print_ada_declaration): Use separate_class_package.
6819
81f0bab2
JM
68202010-10-27 Jason Merrill <jason@redhat.com>
6821
2b08f2c5
JM
6822 * c-common.c (c_common_reswords): Add __is_literal_type.
6823 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
6824
81f0bab2
JM
6825 * c-common.c (check_case_value): Remove special C++ code.
6826
200290f2
NP
68272010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
6828
6829 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
6830 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
6831 and RID_LAST_PATTR.
6832 (objc_add_property_declaration): Added additional arguments.
6833 (objc_property_attribute_kind): Removed.
6834 (objc_set_property_attr): Removed.
6835 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
6836 copy and nonatomic.
6837 * stub-objc.c (objc_add_property_declaration): Added additional
6838 arguments.
6839 (objc_set_property_attr): Removed.
9faeb493 6840
f614132b
NP
68412010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
6842
6843 * c-common.h (objc_add_property_variable): Renamed to
6844 objc_add_property_declaration. Added location argument.
6845 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 6846
b8a18805
NP
68472010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
6848
6849 * c-common.h (objc_maybe_printable_name): New.
6850 * stub-objc.c (objc_maybe_printable_name): New.
6851
3f8257db
JJ
68522010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
6853 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
6854
6855 * c-common.h (c_common_mark_addressable_vec): Declare.
6856 * c-common.c (c_common_mark_addressable_vec): New function.
6857
249a82c4
NP
68582010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
6859
6860 * c-common.h (objc_set_method_type): Removed.
6861 (objc_add_method_declaration): Added boolean argument.
6862 (objc_start_method_definition): Same change.
6863 (objc_build_method_signature): Same change.
6864 * stub-objc.c (objc_set_method_type): Removed.
6865 (objc_add_method_declaration): Added boolean argument.
6866 (objc_start_method_definition): Same change.
6867 (objc_build_method_signature): Same change.
6868
977e30bc
NP
68692010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
6870
6871 * c-common.h (finish_file): Removed.
6872 (objc_write_global_declarations): New.
6873 * c-opts.c (c_common_parse_file): Do not call finish_file.
6874 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 6875
da57d1b9
NP
68762010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
6877
6878 Implemented parsing @synthesize and @dynamic for
6879 Objective-C/Objective-C++.
6880 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
6881 (objc_add_synthesize_declaration): New.
6882 (objc_add_dynamic_declaration): New.
6883 * c-common.c (c_common_reswords): Add synthesize and dynamic.
6884 * stub-objc.c (objc_add_synthesize_declaration): New.
6885 (objc_add_dynamic_declaration): New.
9faeb493 6886
0069111f
MM
68872010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
6888
6889 PR target/46041
6890 * c-cppbuiltin.c (mode_has_fma): Move function here from
6891 builtins.c. Don't use the fma optab, instead just use the
6892 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
6893 using -save-temps.
6894
e426b47b
NP
68952010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
6896
6897 Merge from 'apple/trunk' branch on FSF servers.
0069111f 6898
3f8257db 6899 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 6900
9faeb493 6901 Radar 4330422
e426b47b
NP
6902 * c-common.h (objc_non_volatilized_type): New declaration
6903 * stub-objc.c (objc_non_volatilized_type): New stub.
6904
90fbfdc3
NP
69052010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
6906
e426b47b 6907 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 6908
3f8257db 6909 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 6910
9faeb493 6911 Radar 4133425
90fbfdc3 6912 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 6913 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 6914
c37d8c30
IS
69152010-10-17 Iain Sandoe <iains@gcc.gnu.org>
6916
6917 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
6918 * c-common.h (enum rid): Add RID_AT_PACKAGE.
6919 (objc_ivar_visibility_kind): New enum.
6920 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 6921 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
6922 visibility enum.
6923
1b1562a5
MM
69242010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
6925
6926 * c-cppbuiltin.c (builtin_define_float_constants): Emit
6927 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
6928 has the appropriate fma builtins.
6929 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
6930
668ea4b1
IS
69312010-10-14 Iain Sandoe <iains@gcc.gnu.org>
6932
1b1562a5 6933 merge from FSF apple 'trunk' branch.
3f8257db 6934 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 6935
668ea4b1
IS
6936 Radars 4436866, 4505126, 4506903, 4517826
6937 * c-common.c (c_common_resword): Define @property and its attributes.
6938 * c-common.h: Define property attribute enum entries.
6939 (OBJC_IS_PATTR_KEYWORD): New.
6940 (objc_property_attribute_kind): New enum.
6941 Declare objc_set_property_attr (), objc_add_property_variable (),
6942 objc_build_getter_call () and objc_build_setter_call ().
6943 * stub-objc.c (objc_set_property_attr): New stub.
6944 (objc_add_property_variable): Likewise.
6945 (objc_build_getter_call): Likewise.
6946 (objc_build_setter_call) Likewise.
1b1562a5 6947
a1178b30
IS
69482010-10-13 Iain Sandoe <iains@gcc.gnu.org>
6949
1b1562a5 6950 merge from FSF apple 'trunk' branch.
3f8257db 6951 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
6952
6953 Radar 3803157 (method attributes)
6954 * c-common.c (handle_deprecated_attribute): Recognize
6955 objc methods as valid declarations.
6956 * c-common.h: Declare objc_method_decl ().
1b1562a5 6957 * stub-objc.c (objc_method_decl): New stub.
a1178b30 6958
a75bfaa6
JM
69592010-10-08 Joseph Myers <joseph@codesourcery.com>
6960
6961 * c-common.c (parse_optimize_options): Call
6962 decode_cmdline_options_to_array_default_mask before
6963 decode_options. Update arguments to decode_options.
6964 * c-common.h (c_common_init_options_struct): Declare.
6965 * c-opts.c (c_common_init_options_struct): New. Split out from
6966 c_common_init_options.
6967
f05b9d93
NP
69682010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
6969
6970 Implemented fast enumeration for Objective-C.
6971 * c-common.h (objc_finish_foreach_loop): New.
6972 * stub-objc.c (objc_finish_foreach_loop): New.
6973
1ebe4b4f
JM
69742010-10-05 Joseph Myers <joseph@codesourcery.com>
6975
6976 * c-common.h (struct diagnostic_context): Don't declare here.
6977 (c_common_initialize_diagnostics): Declare using
6978 diagnostic_context typedef.
6979 * c-opts.c (c_common_handle_option): Pass global_dc to
6980 handle_generated_option.
6981
d4d24ba4
JM
69822010-10-04 Joseph Myers <joseph@codesourcery.com>
6983
6984 * c-opts.c (c_common_handle_option): Pass &global_options_set to
6985 handle_generated_option.
6986
478a1c5b
ILT
69872010-10-03 Ian Lance Taylor <iant@google.com>
6988
6989 * c.opt (-fplan9-extensions): New option.
6990
82a1c2fe
FXC
69912010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
6992
6993 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
6994 Remove.
6995 (c_cpp_builtins): Call functions from cppbuiltin.c instead
6996 of duplicating code.
6997
92902b1b
IS
69982010-09-30 Iain Sandoe <iains@gcc.gnu.org>
6999
7000 * c-common.c: Add two new entries for @optional
7001 and @required keywords.
7002
7003 merge from FSF 'apple/trunk' branch.
3f8257db 7004 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
7005
7006 Radar 4386773
7007 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
7008 objective-c keywords.
7009 (objc_set_method_opt): New declaration.
7010 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 7011
46625112
JM
70122010-09-30 Joseph Myers <joseph@codesourcery.com>
7013
7014 * c-common.c (handle_optimize_attribute): Pass &global_options to
7015 cl_optimization_save and cl_optimization_restore.
7016 * c-opts.c (c_common_handle_option): Pass &global_options to
7017 handle_generated_option.
7018 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
7019 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
7020 &global_options to cl_optimization_restore.
7021
49b91f05
NP
70222010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
7023
7024 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
7025 Objective-C/Objective-C++ keywords.
7026
13ed556f 70272010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 7028
9faeb493
UB
7029 Merge from 'apple/trunk' branch on FSF servers.
7030
3f8257db 7031 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
7032
7033 Radar 4281748
7034 * c-common.h (objc_check_global_decl): New declaration.
7035 * stub-objc.c (objc_check_global_decl): New stub.
7036
f0036cca
JM
70372010-09-29 Joseph Myers <joseph@codesourcery.com>
7038
7039 * c.opt: Don't use VarExists.
7040
e3339d0f
JM
70412010-09-29 Joseph Myers <joseph@codesourcery.com>
7042
7043 * c-common.c (c_cpp_error): Update names of diagnostic_context
7044 members.
7045 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
7046 cl_optimization members.
7047 * c-opts.c (warning_as_error_callback, c_common_handle_option,
7048 sanitize_cpp_opts, finish_options): Update names of cpp_options
7049 members.
7050
1973201f
NP
70512010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
7052
7053 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
7054 (objc_is_reserved_word): Removed.
7055 * c-common.c: Updated comments.
7056 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
7057 objc_is_reserved_word.
7058 * stub-objc.c (objc_is_reserved_word): Removed.
7059
f7e71da5
IS
70602010-09-28 Iain Sandoe <iains@gcc.gnu.org>
7061
9faeb493 7062 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
7063 include attributes.
7064 (objc_start_method_definition): Likewise.
7065 (objc_build_keyword_decl): Likewise.
7066 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
7067 (objc_start_method_definition): Likewise.
7068 (objc_build_keyword_decl): Likewise.
7069
c165dca7
IS
70702010-09-28 Iain Sandoe <iains@gcc.gnu.org>
7071
7072 * c-common.h (objc_start_class_interface): Adjust prototype.
7073 (objc_start_category_interface): Likewise.
7074 (objc_start_protocol): Likewise.
7075 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
7076 (objc_start_class_interface): Likewise.
7077 (objc_start_category_interface): Likewise.
7078
7458026b
ILT
70792010-09-27 Ian Lance Taylor <iant@google.com>
7080
7081 * c-common.c (c_common_attribute_table): Add no_split_stack.
7082 (handle_no_split_stack_attribute): New static function.
7083
b581b85b
NP
70842010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
7085
9faeb493 7086 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 7087
3f8257db 7088 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 7089
9faeb493 7090 Radar 4229905
b581b85b
NP
7091 * c-common.h (objc_have_common_type): New declaration.
7092 * stub-objc.c (objc_have_common_type): New stub.
7093
7094 2005-06-22 Ziemowit Laski <zlaski@apple.com>
7095
7096 Radar 4154928
7097 * c-common.h (objc_common_type): New prototype.
9faeb493 7098 * stub-objc.c (objc_common_type): New stub.
b581b85b 7099
46a4da10
JH
71002010-09-24 Jan Hubicka <jh@suse.cz>
7101
7102 * c-common.c (handle_leaf_attribute): New function.
7103 (struct attribute_spec c_common_att): Add leaf.
7104
e200444e
JM
71052010-09-22 Joseph Myers <joseph@codesourcery.com>
7106
7107 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
7108 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
7109 -dump, -dump=, -imacros, -imacros=, -include, -include=,
7110 -include-barrier, -include-directory, -include-directory=,
7111 -include-directory-after, -include-directory-after=,
7112 -include-prefix, -include-prefix=, -include-with-prefix,
7113 -include-with-prefix=, -include-with-prefix-after,
7114 -include-with-prefix-after=, -include-with-prefix-before,
7115 -include-with-prefix-before=, -no-integrated-cpp,
7116 -no-line-commands, -no-standard-includes, -no-warnings, -output,
7117 -output=, -pedantic, -pedantic-errors, -preprocess,
7118 -print-missing-file-dependencies, -trace-includes, -traditional,
7119 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
7120 -user-dependencies, -verbose, -write-dependencies,
7121 -write-user-dependencies, no-integrated-cpp, traditional): New.
7122
29a80ea6
NP
71232010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
7124
7125 PR objc/23710
ac1fc2fc
NP
7126 * c-common.h (objc_start_method_definition): Return bool instead
7127 of void.
7128 * stub-objc.c (objc_start_method_definition): Return bool instead
7129 of void.
7130
71312010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
7132
7133 PR objc/25965
7134 * c-common.h (objc_get_interface_ivars): New declaration.
7135 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 7136
de621752
ILT
71372010-09-15 Ian Lance Taylor <iant@google.com>
7138
7139 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 7140 messages. Remove period at end of warning message.
de621752 7141
ba885ec5
NS
71422010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7143
7144 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
7145 (handle_alias_attribute): ... here.
7146 (handle_ifunc_attribute): New.
7147
c5ee1358
MM
71482010-09-06 Mark Mitchell <mark@codesourcery.com>
7149
7150 * c-common.h (do_warn_double_promotion): Declare.
7151 * c-common.c (do_warn_double_promotion): Define.
7152
0a0b3574
MM
71532010-09-05 Mark Mitchell <mark@codesourcery.com>
7154
7155 * c.opt (Wdouble-promotion): New.
7156
d1779886
JM
71572010-09-02 Joseph Myers <joseph@codesourcery.com>
7158
7159 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
7160 fvtable-thunks, fxref): Mark no longer supported in help text.
7161
2d2bd949
JM
71622010-09-02 Joseph Myers <joseph@codesourcery.com>
7163
7164 * c.opt (Wimport, fall-virtual, falt-external-templates,
7165 fdefault-inline, fenum-int-equiv, fexternal-templates,
7166 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
7167 fname-mangling-version-, fnew-abi, fnonnull-objects,
7168 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
7169 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
7170 applicable.
7171 (fhandle-exceptions): Mark with Alias and Warn.
7172 * c-opts.c (c_common_handle_option): Don't handle options marked
7173 as ignored.
7174
5de8299c
JM
71752010-09-02 Joseph Myers <joseph@codesourcery.com>
7176
7177 * c.opt (Wcomments, Werror-implicit-function-declaration,
7178 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
7179 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
7180 aliases.
7181 * c-common.c (option_codes): Use OPT_Wcomment instead of
7182 OPT_Wcomments.
7183 * c-opts.c (warning_as_error_callback, c_common_handle_option):
7184 Don't handle options marked as aliases.
7185
0ceb0201
RG
71862010-08-25 Richard Guenther <rguenther@suse.de>
7187
7188 * c-common.c (c_common_get_alias_set): Remove special
7189 handling for pointers.
7190
ac47786e
NF
71912010-08-20 Nathan Froyd <froydnj@codesourcery.com>
7192
7193 * c-common.c: Use FOR_EACH_VEC_ELT.
7194 * c-gimplify.c: Likewise.
7195 * c-pragma.c: Likewise.
7196
c878765b
JM
71972010-08-16 Joseph Myers <joseph@codesourcery.com>
7198
7199 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
7200 RejectDriver.
7201 (MMDX): Change back to MMD. Mark NoDriverArg instead of
7202 RejectDriver.
7203 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
7204 instead of OPT_MDX and OPT_MMDX.
7205
603349bf
JM
72062010-08-16 Joseph Myers <joseph@codesourcery.com>
7207
7208 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
7209
644fa7ac
JM
72102010-08-12 Joseph Myers <joseph@codesourcery.com>
7211
7212 * c.opt (MD, MMD): Change to MDX and MMDX.
7213 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
7214
481e1176
JM
72152010-08-11 Joseph Myers <joseph@codesourcery.com>
7216
7217 * c-opts.c (c_common_handle_option): Call handle_generated_option
7218 instead of handle_option.
7219
ac8dc9f7
NF
72202010-08-08 Nathan Froyd <froydnj@codesourcery.com>
7221
7222 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
7223 (maybe_apply_renaming_pragma): Delete unneeded declarations.
7224
4f8c876d
NF
72252010-08-08 Nathan Froyd <froydnj@codesourcery.com>
7226
7227 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
7228 (pending_redefine_extname): Change type to a VEC.
7229 (add_to_renaming_pragma_list): Update for new type of
7230 pending_redefine_extname.
ac8dc9f7 7231 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 7232
3b0c690e
AC
72332010-08-04 Arnaud Charlet <charlet@adacore.com>
7234
7235 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
7236 visited.
7237 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
7238 decide whether a type has already been declared/seen.
7239 Do not go to the original type.
7240 (dump_nested_types): New parameter forward.
7241 Generate forward declaration if needed and mark type as visited.
7242 (print_ada_declaration): Call dump_nested_types if not already done.
7243 Mark types as visited.
7244
1890bccc
JM
72452010-08-03 Joseph Myers <joseph@codesourcery.com>
7246
7247 * c.opt (-print-pch-checksum): Remove option.
7248 * c-opts.c (c_common_handle_option): Don't handle
7249 OPT_print_pch_checksum.
7250
5f20c657
JM
72512010-07-27 Joseph Myers <joseph@codesourcery.com>
7252
7253 * c-common.h (c_common_handle_option): Update prototype and return
7254 value type.
7255 * c-opts.c (c_common_handle_option): Update prototype and return
7256 value type. Update calls to handle_option and
7257 enable_warning_as_error.
7258
f551f80c
JJ
72592010-07-27 Jakub Jelinek <jakub@redhat.com>
7260
7261 PR c/45079
7262 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
7263
61ff2bdc
JM
72642010-07-27 Joseph Myers <joseph@codesourcery.com>
7265
7266 * c-common.h (c_common_missing_argument): Remove.
7267 * c-opts.c (c_common_missing_argument): Remove.
7268 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
7269 idirafter, imacros, include, isysroot, isystem, iquote): Add
7270 MissingArgError.
7271 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
7272
7a9bf9a4
JM
72732010-07-27 Joseph Myers <joseph@codesourcery.com>
7274
7275 * c-common.h (c_common_option_lang_mask,
7276 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
7277 New.
7278 (c_common_init_options): Update prototype.
7279 * c-opts.c (c_common_option_lang_mask): New.
7280 (c_common_initialize_diagnostics): Split out of
7281 c_common_init_options.
7282 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
7283 New.
7284 (c_common_init_options): Update prototype. Use decoded options in
7285 search for -lang-asm.
7286
910ad8de
NF
72872010-07-15 Nathan Froyd <froydnj@codesourcery.com>
7288
7289 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
7290 * c-format.c: Likewise.
7291
718f9c0f
MLI
72922010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
7293
7294 * c-common.h: Include diagnostic-core.h. Error if already
7295 included.
7296 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
7297
4d451982
MLI
72982010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
7299
adfac8df 7300 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
7301 Do not include expr.h
7302 (vector_mode_valid_p): Move here.
7303
119fe915
SB
73042010-06-21 DJ Delorie <dj@redhat.com>
7305
7306 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
7307 allow these pragmas anywhere.
7308
73092010-06-14 Jakub Jelinek <jakub@redhat.com>
7310
7311 PR bootstrap/44509
7312 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
7313 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
7314 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
7315 ggc_strdup instead of xstrdup.
7316
73172010-06-10 Jakub Jelinek <jakub@redhat.com>
7318
7319 * c-cppbuiltin.c: Include cpp-id-data.h.
7320 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
7321 (lazy_hex_fp_value): New function.
7322 (builtin_define_with_hex_fp_value): Provide definitions lazily.
7323
6662d794
MLI
73242010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
7325
7326 * c-gimplify.c: Do not include tree-flow.h
7327
38f8b050
JR
73282010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
7329
7330 PR other/44034
7331 * c-common.c: Rename targetm member:
7332 targetm.enum_va_list -> targetm.enum_va_list_p
7333
9589f23e
AS
73342010-06-28 Anatoly Sokolov <aesok@post.ru>
7335
7336 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
7337
3b06d379
SB
73382010-06-28 Steven Bosscher <steven@gcc.gnu.org>
7339
7340 * c-cppbuiltin.c: Do not include except.h.
7341
d166d4c3
AK
73422010-06-24 Andi Kleen <ak@linux.intel.com>
7343
9faeb493
UB
7344 * c-common.c (warn_for_omitted_condop): New.
7345 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 7346
70cb8be6
JM
73472010-06-21 Joseph Myers <joseph@codesourcery.com>
7348
7349 * c.opt (lang-objc): Remove.
7350 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
7351
a4c97feb
JR
73522010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
7353
7354 * c-opts.c: Include "tm_p.h".
7355
6e2f1956
JM
73562010-06-20 Joseph Myers <joseph@codesourcery.com>
7357
7358 * c-common.c (parse_optimize_options): Update call to
7359 decode_options.
7360
bc87224e
NF
73612010-06-18 Nathan Froyd <froydnj@codesourcery.com>
7362
7363 * c-common.c (record_types_used_by_current_var_decl): Adjust for
7364 new type of types_used_by_cur_var_decl.
7365
b49cf425
JR
73662010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
7367
7368 PR bootstrap/44512
7369 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
7370 for C++ standard compliance.
7371
59f9c2ed
JM
73722010-06-16 Jason Merrill <jason@redhat.com>
7373
7374 * c.opt: Add -Wnoexcept.
7375
33766b66
RG
73762010-06-16 Richard Guenther <rguenther@suse.de>
7377
7378 PR c/44555
7379 * c-common.c (c_common_truthvalue_conversion): Remove
7380 premature and wrong optimization concering ADDR_EXPRs.
7381
eff7e30c
AC
73822010-06-15 Arnaud Charlet <charlet@adacore.com>
7383
7384 * c-ada-spec.c (dump_sloc): Remove column info.
7385 (is_simple_enum): New function.
7386 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
7387 enum types when relevant.
7388
6312e84d
MLI
73892010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
7390
9faeb493 7391 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
7392 location.
7393
1cb42611
JM
73942010-06-10 Joseph Myers <joseph@codesourcery.com>
7395
7396 * c-opts.c (c_common_handle_option): Don't handle
7397 OPT_fshow_column.
7398
a9429e29
LB
73992010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
7400
7401 * c-pragma.c (push_alignment): Use typed GC allocation.
7402 (handle_pragma_push_options): Likewise.
7403
7404 * c-common.c (parse_optimize_options): Likewise.
7405
7406 * c-common.h (struct sorted_fields_type): Add variable_size GTY
7407 option.
7408
5498f011
JM
74092010-06-07 Joseph Myers <joseph@codesourcery.com>
7410
7411 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
7412 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
7413 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
7414 flag_signed_bitfields, warn_strict_null_sentinel,
7415 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
7416 flag_gen_declaration, flag_no_gnu_keywords,
7417 flag_implement_inlines, flag_implicit_templates,
7418 flag_implicit_inline_templates, flag_optional_diags,
7419 flag_elide_constructors, flag_default_inline, flag_rtti,
7420 flag_conserve_space, flag_access_control, flag_check_new,
7421 flag_new_for_scope, flag_weak, flag_working_directory,
7422 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
7423 flag_enforce_eh_specs, flag_threadsafe_statics,
7424 flag_pretty_templates): Remove.
7425 * c-common.h (flag_preprocess_only, flag_nil_receivers,
7426 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
7427 flag_replace_objc_classes, flag_undef, flag_no_builtin,
7428 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
7429 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
7430 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
7431 flag_no_gnu_keywords, flag_implement_inlines,
7432 flag_implicit_templates, flag_implicit_inline_templates,
7433 flag_optional_diags, flag_elide_constructors, flag_default_inline,
7434 flag_rtti, flag_conserve_space, flag_access_control,
7435 flag_check_new, flag_new_for_scope, flag_weak,
7436 flag_working_directory, flag_use_cxa_atexit,
7437 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
7438 flag_threadsafe_statics, flag_pretty_templates,
7439 warn_strict_null_sentinel): Remove.
7440 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
7441 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
7442 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
7443 fimplicit-inline-templates, fimplicit-templates,
7444 flax-vector-conversions, fms-extensions, fnil-receivers,
7445 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
7446 frtti, fshort-double, fshort-enums, fshort-wchar,
7447 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
7448 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
7449 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
7450 gen-decls, undef): Use Var.
7451 (fdefault-inline, foptional-diags): Document as doing nothing.
7452 * c-opts.c (c_common_handle_option): Remove cases for options now
7453 using Var. Mark ignored options as such.
7454
39dabefd
SB
74552010-06-05 Steven Bosscher <steven@gcc.gnu.org>
7456
9faeb493 7457 * c-common.c: Moved to here from parent directory.
39dabefd
SB
7458 * c-common.def: Likewise.
7459 * c-common.h: Likewise.
7460 * c-cppbuiltin.c: Likewise.
7461 * c-dump.c: Likewise.
7462 * c-format.c: Likewise.
7463 * c-format.h : Likewise.
7464 * c-gimplify.c: Likewise.
7465 * c-lex.c: Likewise.
7466 * c-omp.c: Likewise.
7467 * c.opt: Likewise.
7468 * c-opts.c: Likewise.
7469 * c-pch.c: Likewise.
7470 * c-ppoutput.c: Likewise.
7471 * c-pragma.c: Likewise.
7472 * c-pragma.h: Likewise.
7473 * c-pretty-print.c: Likewise.
7474 * c-pretty-print.h: Likewise.
7475 * c-semantics.c: Likewise.
7476 * stub-objc.c: Likewise.
7477
7478 * c-common.c: Include gt-c-family-c-common.h.
7479 * c-pragma.c: Include gt-c-family-c-pragma.h.
7480\f
cbe34bb5 7481Copyright (C) 2010-2017 Free Software Foundation, Inc.
39dabefd
SB
7482
7483Copying and distribution of this file, with or without modification,
7484are permitted in any medium without royalty provided the copyright
7485notice and this notice are preserved.
This page took 2.597695 seconds and 5 git commands to generate.