]> gcc.gnu.org Git - gcc.git/blame - gcc/c-family/ChangeLog
Add new effective target: profile_update_atomic
[gcc.git] / gcc / c-family / ChangeLog
CommitLineData
9453eee9
JM
12016-09-13 Jason Merrill <jason@redhat.com>
2
3 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
4 limit types at all.
5
e96809e3
JM
62016-09-12 Jason Merrill <jason@redhat.com>
7
8 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
9 bit/byte confusion, allow large alignment for types.
10
54dcdb88
BE
112016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
12
13 PR c++/77496
14 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
15
d1463eb9
DM
162016-09-12 David Malcolm <dmalcolm@redhat.com>
17
18 PR c/72858
19 * c-format.c (argument_parser::check_argument_type): Add params
20 "type_start" and "conversion_char". Use the former to generate
21 offset_to_type_start and pass it and conversion_char to
22 check_format_types.
23 (check_format_info_main): Capture the start of the type
24 information as "type_start", and pass it an format_char
25 to arg_parser.check_argument_type.
26 (check_format_types): Provide an example in the leading comment.
27 Add params "offset_to_type_start" and "conversion_char"; pass
28 them to format_type_warning calls.
29 (test_get_modifier_for_format_len): Likewise.
30 (matching_type_p): New function.
31 (get_format_for_type): Add param "conversion_char" and move
32 implementation into...
33 (get_format_for_type_1): ...new function, called twice.
34 Use new function matching_type_p rather than checking for
35 TYPE_CANONICAL equality.
36 (get_corrected_substring): New function.
37 (format_type_warning): Provide an example in the leading comment.
38 Add params "offset_to_type_start" and "conversion_char". Replace
39 call to get_format_for_type with call to get_corrected_substring
40 and move rejection of hints for widths/precisions there.
41 (assert_format_for_type_streq): Add param "conversion_char".
42 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
43 (test_get_format_for_type_printf): Add conversion chars to the
44 tests, adding coverage for various combinations of integer
45 vs double conversions, and for preserving octal and hexadecimal
46 conversions.
47 (test_get_format_for_type_scanf): Add conversion chars to the
48 tests.
49
5b28efbb
TV
502016-09-10 Tom de Vries <tom@codesourcery.com>
51
52 PR C/71602
53 * c-common.c (build_va_arg): Handle more strict
54 targetm.canonical_va_list_type. Replace first argument type error with
55 assert.
56
3f0177e7
MS
572016-09-09 Martin Sebor <msebor@redhat.com>
58
59 PR c/77520
60 PR c/77521
61 * c-format.c (argument_parser::find_format_char_info): Use %qc
62 format directive unconditionally.
63
af63ba4b
JM
642016-09-09 Jason Merrill <jason@redhat.com>
65
66 Implement C++17 new of over-aligned types.
67 * c.opt: Add -faligned-new and -Waligned-new.
68 * c-common.c (max_align_t_align): Split out from...
69 (cxx_fundamental_alignment_p): ...here.
70 * c-common.h: Declare it.
71 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
72
c65248cb
JM
732016-09-09 Joseph Myers <joseph@codesourcery.com>
74
75 * c-cppbuiltin.c (builtin_define_type_width): New function.
76 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
77 macros.
78
e5106e27
DM
792016-09-07 David Malcolm <dmalcolm@redhat.com>
80
81 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
82 a POINTER_TYPE.
83 (substring_loc::get_location): Move to substring-locations.c,
84 keeping implementation as...
85 (c_get_substring_location): New function, from the above, reworked
86 to use accessors rather than member lookup.
87 * c-common.h (class substring_loc): Move to substring-locations.h,
88 replacing with a forward decl.
89 (c_get_substring_location): New decl.
90 * c-format.c: Include "substring-locations.h".
91 (format_warning_va): Move to substring-locations.c.
92 (format_warning_at_substring): Likewise.
93
a42e7952
MS
942016-09-06 Martin Sebor <msebor@redhat.com>
95
96 PR c/77336
97 * c-format.c (check_function_format): Avoid issuing warnings for
98 functions unless they call format functions with non-constant
99 format strings.
100
b772a565
RB
1012016-09-06 Richard Biener <rguenther@suse.de>
102
103 PR c/77450
104 * c-common.c (c_common_mark_addressable_vec): Handle
105 COMPOUND_LITERAL_EXPR.
106
25ff5dd3
MP
1072016-09-05 Marek Polacek <polacek@redhat.com>
108
109 PR c/77423
110 * c-common.c (bool_promoted_to_int_p): New function.
111 (expr_has_boolean_operands_p): New function.
112 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
113 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
114
21234eb5
TV
1152016-09-04 Tom de Vries <tom@codesourcery.com>
116
117 revert:
118 2016-08-29 Tom de Vries <tom@codesourcery.com>
119
120 * c-common.c (build_va_arg): Replace first argument type error
121 with assert.
122
9dc5773f
JJ
1232016-09-02 Jakub Jelinek <jakub@redhat.com>
124
125 PR c/65467
126 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
127 (c_finish_omp_for): Reject _Atomic qualified iterators.
128
1292016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
130
131 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
132 size to guarantee it fits the output of the formatted function
133 regardless of its arguments.
134
295844f6
MP
1352016-09-01 Marek Polacek <polacek@redhat.com>
136
137 PR c/7652
138 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
139 FALLTHRU comments.
140
3d06b6f2
MP
1412016-08-29 Marek Polacek <polacek@redhat.com>
142
143 PR c/77292
144 * c-common.c (warn_logical_not_parentheses): Don't warn for
145 a comparison or a logical operator.
146
34cedad5
TV
1472016-08-29 Tom de Vries <tom@codesourcery.com>
148
149 * c-common.c (build_va_arg): Fix type comparison assert.
150
f162d717
TV
1512016-08-29 Tom de Vries <tom@codesourcery.com>
152
153 * c-common.c (build_va_arg): Replace first argument type error
154 with assert.
155
ba9bbd6f
TV
1562016-08-29 Tom de Vries <tom@codesourcery.com>
157
158 PR c/77398
159 * c-common.c (build_va_arg): Add first argument error. Build va_arg
160 with error_mark_node as va_list instead of with illegal va_list.
161
ebef225f
MP
1622016-08-25 Marek Polacek <polacek@redhat.com>
163 David Malcolm <dmalcolm@redhat.com>
164
165 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
166 * c-common.h (warn_logical_not_parentheses): Update declaration.
167
b00e6e75
MP
1682016-08-22 Marek Polacek <polacek@redhat.com>
169
170 PR c++/77321
171 * c-common.c (warn_for_memset): Check type for null.
172
6dc198e3
JM
1732016-08-22 Joseph Myers <joseph@codesourcery.com>
174
175 * c-family/c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
176 _FloatNx types for suffixes for built-in functions.
177
c65699ef
JM
1782016-08-19 Joseph Myers <joseph@codesourcery.com>
179
180 PR c/32187
181 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
182 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
183 (RID_FLOAT128X): New enum rid values.
184 (CASE_RID_FLOATN_NX): New macro.
185 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
186 keywords.
187 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
188 corresponding complex types.
189 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
190 _FloatNx and corresponding complex types.
191 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
192 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
193 and _FloatNx types for the widest type for determining
194 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
195 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
196 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
197 and _FloatNx types.
198 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
199 constants.
200 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
201 _FloatNx types.
202
cc015f3a
DM
2032016-08-18 David Malcolm <dmalcolm@redhat.com>
204
205 * c-opts.c (c_diagnostic_finalizer): Update for change to
206 diagnostic_show_locus.
207
cb18fd07
DM
2082016-08-18 David Malcolm <dmalcolm@redhat.com>
209
210 * c-common.c: Include "spellcheck.h".
211 (cb_get_suggestion): New function.
212 * c-common.h (cb_get_suggestion): New decl.
213 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
214 cb_get_suggestion.
215
a76989dc
MP
2162016-08-18 Marek Polacek <polacek@redhat.com>
217
218 PR c/71514
219 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
220 and pointer-to-VLA.
221
65e736c0
DM
2222016-08-16 David Malcolm <dmalcolm@redhat.com>
223
224 PR c/72857
225 * c-common.c (substring_loc::get_range): Rename to...
226 (substring_loc::get_location): ...this, converting param from a
227 source_range * to a location_t *. Call
228 get_source_location_for_substring rather than
229 get_source_range_for_substring, and pass in m_caret_idx.
230 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
231 (substring_loc::get_range): Replace with...
232 (substring_loc::get_location): ...this.
233 (substring_loc::set_caret_index): New method.
234 (substring_loc): Add field m_caret_idx.
235 * c-format.c (format_warning_va): Update for above changes.
236 Rename local "substring_loc" to "fmt_substring_loc" to avoid
237 clashing with type name.
238 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
239 (check_argument_type): Likewise.
240 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
241 Use a copy when emitting warnings, setting the caret index from TYPE.
242
7e1dde14
EB
2432016-08-16 Eric Botcazou <ebotcazou@adacore.com>
244 Arnaud Charlet <charlet@adacore.com>
245
246 * c-ada-spec.c (dump_number): New function.
247 (handle_escape_character): Likewise.
248 (print_ada_macros): Add handling of constant integers and strings.
249
191816a3
MP
2502016-08-12 Marek Polacek <polacek@redhat.com>
251
252 PR c/7652
253 * c-common.c (scalar_to_vector): Adjust fall through comment.
254 * c-opts.c (c_common_handle_option): Likewise.
255 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
256 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
257 fall through comment.
258 * cilk.c (extract_free_variables): Add FALLTHRU.
259
452df4a4
JM
2602016-08-10 Jason Merrill <jason@redhat.com>
261
262 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
263
f3365c12
JM
2642016-08-09 Jason Merrill <jason@redhat.com>
265
266 * c-common.c (c_common_attribute_table): vector_size affects type
267 identity.
268
f0bc3323
MP
2692016-08-09 Marek Polacek <polacek@redhat.com>
270
271 PR c/7652
272 * c-ada-spec.c (dump_generic_ada_node): Add return.
273
98e5a19a
JM
2742016-08-09 Jason Merrill <jason@redhat.com>
275
276 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
277 C++17 constexpr lambdas.
278
895aa8e1
DM
2792016-08-08 David Malcolm <dmalcolm@redhat.com>
280
281 PR c/64955
282 * c-common.h (selftest::c_format_c_tests): New declaration.
283 (selftest::run_c_tests): New declaration.
284 * c-format.c: Include "selftest.h.
285 (format_warning_va): Add param "corrected_substring" and use
286 it to add a replacement fix-it hint.
287 (format_warning_at_substring): Likewise.
288 (format_warning_at_char): Update for new param of
289 format_warning_va.
290 (argument_parser::check_argument_type): Pass "fki" to
291 check_format_types.
292 (check_format_types): Add param "fki" and pass it to
293 format_type_warning.
294 (deref_n_times): New function.
295 (get_modifier_for_format_len): New function.
296 (selftest::test_get_modifier_for_format_len): New function.
297 (get_format_for_type): New function.
298 (format_type_warning): Add param "fki" and use it to attempt
299 to provide hints for argument types when calling
300 format_warning_at_substring.
301 (selftest::get_info): New function.
302 (selftest::assert_format_for_type_streq): New function.
303 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
304 (selftest::test_get_format_for_type_printf): New function.
305 (selftest::test_get_format_for_type_scanf): New function.
306 (selftest::c_format_c_tests): New function.
307
e52ed3fe
DM
3082016-08-08 David Malcolm <dmalcolm@redhat.com>
309
310 PR c/52952
311 * c-format.c: Include "diagnostic.h".
312 (location_column_from_byte_offset): Delete.
313 (location_from_offset): Delete.
314 (format_warning_va): New function.
315 (format_warning_at_substring): New function.
316 (format_warning_at_char): New function.
317 (check_format_arg): Capture location of format_tree and pass to
318 check_format_info_main.
319 (argument_parser): Add fields "start_of_this_format" and
320 "format_string_cst".
321 (flag_chars_t::validate): Add param "format_string_cst". Convert
322 warning_at call using location_from_offset to call to
323 format_warning_at_char.
324 (argument_parser::argument_parser): Add param "format_string_cst_"
325 and use use it to initialize field "format_string_cst".
326 Initialize new field "start_of_this_format".
327 (argument_parser::read_format_flags): Convert warning_at call
328 using location_from_offset to a call to format_warning_at_char.
329 (argument_parser::read_any_format_left_precision): Likewise.
330 (argument_parser::read_any_format_precision): Likewise.
331 (argument_parser::read_any_other_modifier): Likewise.
332 (argument_parser::find_format_char_info): Likewise, in three places.
333 (argument_parser::parse_any_scan_set): Likewise, in one place.
334 (argument_parser::handle_conversions): Likewise, in two places.
335 (argument_parser::check_argument_type): Add param "fmt_param_loc"
336 and use it to make a substring_loc. Pass the latter to
337 check_format_types.
338 (check_format_info_main): Add params "fmt_param_loc" and
339 "format_string_cst". Convert warning_at calls using
340 location_from_offset to calls to format_warning_at_char. Pass the
341 new params to the arg_parser ctor. Pass "format_string_cst" to
342 flag_chars.validate. Pass "fmt_param_loc" to
343 arg_parser.check_argument_type.
344 (check_format_types): Convert first param from a location_t
345 to a const substring_loc & and rename to "fmt_loc". Attempt
346 to extract the range of the relevant parameter and pass it
347 to format_type_warning.
348 (format_type_warning): Convert first param from a location_t
349 to a const substring_loc & and rename to "fmt_loc". Add
350 params "param_range" and "type". Replace calls to warning_at
351 with calls to format_warning_at_substring.
352
1c4d457e
DM
3532016-08-08 David Malcolm <dmalcolm@redhat.com>
354
355 * c-format.c (class flag_chars_t): New class.
356 (struct length_modifier): New struct.
357 (class argument_parser): New class.
358 (flag_chars_t::flag_chars_t): New ctor.
359 (flag_chars_t::has_char_p): New method.
360 (flag_chars_t::add_char): New method.
361 (flag_chars_t::validate): New method.
362 (flag_chars_t::get_alloc_flag): New method.
363 (flag_chars_t::assignment_suppression_p): New method.
364 (argument_parser::argument_parser): New ctor.
365 (argument_parser::read_any_dollar): New method.
366 (argument_parser::read_format_flags): New method.
367 (argument_parser::read_any_format_width): New method.
368 (argument_parser::read_any_format_left_precision): New method.
369 (argument_parser::read_any_format_precision): New method.
370 (argument_parser::handle_alloc_chars): New method.
371 (argument_parser::read_any_length_modifier): New method.
372 (argument_parser::read_any_other_modifier): New method.
373 (argument_parser::find_format_char_info): New method.
374 (argument_parser::validate_flag_pairs): New method.
375 (argument_parser::give_y2k_warnings): New method.
376 (argument_parser::parse_any_scan_set): New method.
377 (argument_parser::handle_conversions): New method.
378 (argument_parser::check_argument_type): New method.
379 (check_format_info_main): Introduce classes argument_parser
380 and flag_chars_t, moving the code within the loop into methods
381 of these classes. Make various locals "const".
382
88fa5555
DM
3832016-08-05 David Malcolm <dmalcolm@redhat.com>
384
385 * c-common.c: Include "substring-locations.h".
386 (get_cpp_ttype_from_string_type): New function.
387 (g_string_concat_db): New global.
388 (substring_loc::get_range): New method.
389 * c-common.h (g_string_concat_db): New declaration.
390 (class substring_loc): New class.
391 * c-lex.c (lex_string): When concatenating strings, capture the
392 locations of all tokens using a new obstack, and record the
393 concatenation locations within g_string_concat_db.
394 * c-opts.c (c_common_init_options): Construct g_string_concat_db
395 on the ggc-heap.
396
78169471
MP
3972016-07-29 Marek Polacek <polacek@redhat.com>
398
638fc14f
MP
399 PR c/71926
400 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
401 parentheses warning.
402
78169471
MP
403 PR c/71574
404 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
405
1225d6b1
ML
4062016-07-28 Martin Liska <mliska@suse.cz>
407
408 PR gcov-profile/68025
409 * c-common.c (handle_no_profile_instrument_function_attribute):
410
ec1e2a40
BE
4112016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
412
413 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
414 BITS_PER_UNIT_LOG.
415
5ec2cd9f
JM
4162016-07-25 Jason Merrill <jason@redhat.com>
417
418 PR c++/65970
419 * c.opt (fconstexpr-loop-limit): New.
420
9dc5773f 4212016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
422
423 PR c++/71675
424 * c-common.c (resolve_overloaded_builtin): Avoid converting
425 __atomic_compare_exchange_n return type to that of what its
426 first argument points to.
427
e3fe09c1
UB
4282016-07-22 Uros Bizjak <ubizjak@gmail.com>
429
430 * c-common.c: Use HOST_WIDE_INT_M1U instead of
431 ~(unsigned HOST_WIDE_INT) 0.
432
bc91c436
ML
4332016-07-22 Martin Liska <mliska@suse.cz>
434
435 PR gcov-profile/69028
436 PR gcov-profile/62047
437 * cilk.c (create_cilk_helper_decl): Set location of a new decl
438 to the current_function_decl.
439
451dcc66
JM
4402016-07-21 Jason Merrill <jason@redhat.com>
441
442 PR c++/65168
443 * c-common.c (c_common_truthvalue_conversion): Check
444 c_inhibit_evaluation_warnings for warning about address of
445 reference.
446
de6a69ee
DM
4472016-07-20 David Malcolm <dmalcolm@redhat.com>
448
449 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
450 const char *.
451
d022c55a
JM
4522016-07-15 Jason Merrill <jason@redhat.com>
453
454 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
455
ddbbcb19
JJ
4562016-07-15 Jakub Jelinek <jakub@redhat.com>
457
458 PR c/71858
459 * c-common.h (enum lookup_name_fuzzy_kind): Add
460 FUZZY_LOOKUP_FUNCTION_NAME.
461
d0cf395a
JM
4622016-07-08 Jason Merrill <jason@redhat.com>
463
464 P0145: Refining Expression Order for C++.
465 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
466 * c-opts.c: Adjust.
467
98d44e93
MT
4682016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
469
470 PR c++/71214
471 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
472
f9d8d994
TS
4732016-06-29 Thomas Schwinge <thomas@codesourcery.com>
474
475 * c-pragma.h (enum pragma_kind): Rename
476 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
477 users.
478
4aa83879
RB
4792016-06-29 Richard Biener <rguenther@suse.de>
480
481 PR middle-end/71002
482 * c-common.c (c_common_get_alias_set): Remove union type punning case.
483
a25bd9e6
JM
4842016-06-24 Jason Merrill <jason@redhat.com>
485
486 P0145R2: Refining Expression Order for C++.
487 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
488 MODIFY_EXPR.
489
a86451b9
JJ
4902016-06-24 Jakub Jelinek <jakub@redhat.com>
491
492 * c-common.c (check_builtin_function_arguments): Require last
493 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
494 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
495 if the last argument is pointer to enumerated or boolean type.
496
1a4f11c8
DM
4972016-06-22 David Malcolm <dmalcolm@redhat.com>
498
499 PR c/70339
500 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
501 (lookup_name_fuzzy): New prototype.
502
fe55692c
JDA
5032016-06-21 John David Anglin <danglin@gcc.gnu.org>
504
505 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
506
4eb24e01
JM
5072016-06-14 Jason Merrill <jason@redhat.com>
508
509 P0145R2: Refining Expression Order for C++.
510 * c.opt (fargs-in-order): New.
511 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
512
ef7cf206
JJ
5132016-06-13 Jakub Jelinek <jakub@redhat.com>
514
0dda258b
JJ
515 PR sanitizer/71498
516 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
517 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
518
ef7cf206
JJ
519 PR preprocessor/71183
520 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
521 to cb_get_source_date_epoch.
522
50b15873
JJ
5232016-06-10 Jakub Jelinek <jakub@redhat.com>
524
525 PR c/68657
526 * c.opt (Wpsabi): Add Warning flag.
527
4d926e34
MS
5282016-06-10 Martin Sebor <msebor@redhat.com>
529
530 PR c/71392
531 * gcc/c-family/c-common.c (handle_nonnull_attribute): Accept
532 the nonnull attribute in type-generic builtins.
533
e01b4e16
MS
5342016-06-09 Martin Sebor <msebor@redhat.com>
535
536 PR c/70883
537 * c-common.c (builtin_function_validate_nargs): Make text of error
538 message consistent with others like it.
539
44a845ca
MS
5402016-06-08 Martin Sebor <msebor@redhat.com>
541 Jakub Jelinek <jakub@redhat.com>
542
543 PR c++/70507
544 PR c/68120
545 * c-common.c (check_builtin_function_arguments): Handle
546 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
547
a80a7051
RB
5482016-06-08 Richard Biener <rguenther@suse.de>
549
550 * c-common.c (parse_optimize_options): Improve diagnostic messages.
551
bfd67b47
RB
5522016-06-07 Richard Biener <rguenther@suse.de>
553
554 PR c/61564
555 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
556 options and warn about others.
557
15c98b2e
ES
5582016-06-01 Eduard Sanou <dhole@openmailbox.org>
559
560 * c-common.c (get_source_date_epoch): Rename to
561 cb_get_source_date_epoch.
562 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
563 message when the parsing fails. Use error_at instead of fatal_error.
564 * c-common.h (get_source_date_epoch): Rename to
565 cb_get_source_date_epoch.
566 * c-common.h (cb_get_source_date_epoch): Prototype.
567 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
568 * c-common.h (c_omp_region_type): Remove trailing comma.
569 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
570 * c-lex.c (c_lex_with_flags): Remove initialization of
571 pfile->source_date_epoch.
572
00631022
JJ
5732016-05-30 Jakub Jelinek <jakub@redhat.com>
574
575 PR c++/71349
576 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
577 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
578 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
579 instead of C_OMP_CLAUSE_SPLIT_FOR.
580
f17a223d
RB
5812016-05-24 Richard Biener <rguenther@suse.de>
582
583 PR middle-end/70434
584 PR c/69504
585 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
586 (convert_vector_to_array_for_subscript): ... this.
587 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
588 VIEW_CONVERT_EXPR to an array type. Rename to ...
589 (convert_vector_to_array_for_subscript): ... this.
590
4f2e1536
MP
5912016-05-12 Marek Polacek <polacek@redhat.com>
592
593 PR c/70756
594 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
595 size_in_bytes and pass LOC to it.
596
d6e83a8d
MM
5972016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
598
599 PR c/43651
600 * c.opt (Wduplicate-decl-specifier): New option.
601
5c3a10fb
MP
6022016-05-11 Marek Polacek <polacek@redhat.com>
603
604 PR c++/71024
605 * c-common.c (diagnose_mismatched_attributes): New function.
606 * c-common.h (diagnose_mismatched_attributes): Declare.
607
deef7113
MP
6082016-05-04 Marek Polacek <polacek@redhat.com>
609
610 * c.opt (Wdangling-else): New option.
611
79ce98bc
MP
6122016-05-03 Marek Polacek <polacek@redhat.com>
613
614 PR c/70859
615 * c-common.c (builtin_function_validate_nargs): Add location
616 parameter. Use it.
617 (check_builtin_function_arguments): Add location and arguments
618 parameters. Use them.
619 * c-common.h (check_builtin_function_arguments): Update declaration.
620
381cdae4
RB
6212016-05-03 Richard Biener <rguenther@suse.de>
622
623 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
624 allow call args to gimplify to SSA names.
625
1d793c34
MP
6262016-05-03 Marek Polacek <polacek@redhat.com>
627
628 * c-common.h (enum c_omp_region_type): Remove stray comma.
629
77886428
CP
6302016-05-02 Cesar Philippidis <cesar@codesourcery.com>
631
632 * c-common.h (enum c_omp_region_type): Define.
633
697e0b28
RS
6342016-05-02 Richard Sandiford <richard.sandiford@arm.com>
635
636 * c-common.c (shorten_compare): Use wi::to_wide.
637
e7ff0319
CP
6382016-04-29 Cesar Philippidis <cesar@codesourcery.com>
639
640 PR middle-end/70626
641 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
642 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
643 reduction clauses in acc parallel loops.
644
2fff3db8
MP
6452016-04-29 Marek Polacek <polacek@redhat.com>
646
647 PR c/70852
648 * c-common.c (warn_for_memset): Check domain before accessing it.
649
509063eb
DV
6502016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
651
652 PR/69089
653 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
654 "aligned" attribute.
655
b632761d
JM
6562016-04-28 Jason Merrill <jason@redhat.com>
657
658 * c-lex.c (c_common_has_attribute): Handle nodiscard.
659
174f6622
ES
6602016-04-28 Eduard Sanou <dhole@openmailbox.org>
661 Matthias Klose <doko@debian.org>
662
663 * c-common.c (get_source_date_epoch): New function, gets the environment
664 variable SOURCE_DATE_EPOCH and parses it as long long with error
665 handling.
666 * c-common.h (get_source_date_epoch): Prototype.
667 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
668
6bc2bb18
RB
6692015-04-27 Ryan Burn <contact@rnburn.com>
670
671 PR c++/69024
672 PR c++/68997
673 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
674 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
675 external linkage.
676 (cilk_detect_and_unwrap): Corresponding changes.
677 (extract_free_variables): Don't extract free variables from
678 AGGR_INIT_EXPR slot.
679 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
680 (cilk_recognize_spawn): Likewise.
681
c1e1f433
BS
6822016-04-27 Bernd Schmidt <bschmidt@redhat.com>
683
684 * c.opt (Wmemset-elt-size): New option.
685 * c-common.c (warn_for_memset): New function.
686 * c-common.h (warn_for_memset): Declare.
687
d067e05f
JM
6882016-04-25 Jason Merrill <jason@redhat.com>
689
690 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
691 No longer static.
692 * c-common.h: Declare it.
693 * c-lex.c (c_common_has_attribute): Add maybe_unused.
694
9aa36ae5
JM
6952016-04-22 Jason Merrill <jason@redhat.com>
696
697 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
698
477d4906
IV
6992016-04-20 Ilya Verbin <ilya.verbin@intel.com>
700
701 PR c++/69363
702 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
703 * c-common.h (c_finish_cilk_clauses): Remove declaration.
704
fe37c7af
MM
7052016-04-18 Michael Matz <matz@suse.de>
706
707 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
708 and SET_DECL_ALIGN.
709
23f2660f
EB
7102016-04-17 Eric Botcazou <ebotcazou@adacore.com>
711
712 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
713 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
714 to incomplete types.
715 (dump_nested_type): Remove redundant tests and tidy up.
716 (print_ada_declaration): Also set TREE_VISITED on the declaration of
717 a type which is the typedef of an original type.
718
1e77281b
MP
7192016-04-15 Marek Polacek <polacek@redhat.com>
720
721 PR c/70651
722 * c-common.c (build_va_arg): Change two asserts into errors and return
723 error_mark_node.
724
b3a77f21
MP
7252016-04-13 Marek Polacek <polacek@redhat.com>
726
727 PR c++/70639
728 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
729 for switch statements, too.
730
322b8466
JM
7312016-03-28 Jason Merrill <jason@redhat.com>
732
733 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
734
fbdb6baf
MP
7352016-03-23 Marek Polacek <polacek@redhat.com>
736
737 PR c++/69884
738 * c.opt (Wignored-attributes): New option.
739
5c240f4d
DM
7402016-03-22 David Malcolm <dmalcolm@redhat.com>
741
742 PR c/69993
743 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
744 diagnostic text, reversing the order of the warning and note so
745 that they appear in source order.
746
14ba7b28
MP
7472016-03-17 Marek Polacek <polacek@redhat.com>
748
749 PR c/69407
750 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
751 operations.
752
08a1cadc
JM
7532016-03-14 Jason Merrill <jason@redhat.com>
754
2aaeea19
JM
755 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
756
08a1cadc
JM
757 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
758
c06d25bb
RB
7592016-03-09 Richard Biener <rguenther@suse.de>
760
761 PR c/70143
762 * c-common.c (strict_aliasing_warning): Add back
763 alias_sets_conflict_p check.
764
80aac5c8
JM
7652016-03-08 Jason Merrill <jason@redhat.com>
766
767 * c-opts.c (set_std_cxx1z): Don't enable concepts.
768
64b23c13
DM
7692016-03-04 David Malcolm <dmalcolm@redhat.com>
770
771 PR c/68187
772 * c-indentation.c (get_visual_column): Move code to determine next
773 tab stop to...
774 (next_tab_stop): ...this new function.
775 (line_contains_hash_if): Delete function.
776 (detect_preprocessor_logic): Delete function.
777 (get_first_nws_vis_column): New function.
778 (detect_intervening_unindent): New function.
779 (should_warn_for_misleading_indentation): Replace call to
780 detect_preprocessor_logic with a call to
781 detect_intervening_unindent.
782
729526f5
DM
7832016-03-04 David Malcolm <dmalcolm@redhat.com>
784
785 PR c/68187
786 * c-indentation.c (should_warn_for_misleading_indentation): When
787 suppressing warnings about cases where the guard and body are on
788 the same column, only use the first non-whitespace column in place
789 of the guard token column when dealing with "else" clauses.
790 When rejecting aligned BODY and NEXT, loosen the requirement
791 from equality with the first non-whitespace of guard to simply
792 that they not be indented relative to it.
793
e9a35493
RB
7942016-03-04 Richard Biener <rguenther@suse.de>
795
796 PR c++/70054
797 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
798 instead of alias_sets_conflict_p.
799
1be56bc5
MP
8002016-03-01 Marek Polacek <polacek@redhat.com>
801
802 PR c++/69795
803 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
804 any DECL.
805
35886f0b
MS
8062016-02-22 Martin Sebor <msebor@redhat.com>
807
808 PR middle-end/69780
809 * c-common.c (check_builtin_function_arguments): Validate and
810 reject invalid arguments to __builtin_alloca_with_align.
811
4246c8da
MW
8122016-02-20 Mark Wielaard <mjw@redhat.com>
813
814 PR c/28901
815 * c.opt (Wunused-const-variable): Turn into Alias for...
816 (Wunused-const-variable=): New option.
817
268be88c
BE
8182016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
819
820 PR c++/69865
821 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
822 here...
823 (c_common_init_options): ...to here.
824 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
825
871b3f47
JJ
8262016-02-19 Jakub Jelinek <jakub@redhat.com>
827
828 PR c++/69826
829 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
830 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
831 flag_preprocess_only.
832
bf14eba2
JJ
8332016-02-16 Jakub Jelinek <jakub@redhat.com>
834
835 PR c/69835
836 * c.opt (Wnonnull-compare): Enable for -Wall.
837
ba6b3795
JJ
8382016-02-15 Jakub Jelinek <jakub@redhat.com>
839
840 PR c++/69797
841 * c-common.c (sync_resolve_size): Diagnose too few arguments
842 even when params is non-NULL empty vector.
843
a011cd92
BS
8442016-02-08 Bernd Schmidt <bschmidt@redhat.com>
845
846 PR target/60410
847 * c.opt (fshort-double): Remove.
848
46cb9332
MS
8492016-02-05 Martin Sebor <msebor@redhat.com>
850
851 PR c++/69662
852 * c.opt (Warning options): Update -Wplacement-new to take
853 an optional argument.
854
e1b81f2b
JJ
8552016-02-01 Jakub Jelinek <jakub@redhat.com>
856
857 PR preprocessor/69543
858 PR c/69558
859 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
860 instead of loc to control_warning_option.
861
b6adbb9f
NS
8622016-02-01 Nathan Sidwell <nathan@codesourcery.com>
863
864 * c.opt (fopenacc-dim=): New option.
865
5d70666e
RB
8662016-01-27 Ryan Burn <contact@rnburn.com>
867
868 PR cilkplus/69267
869 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
870 gimplify_arg. Removed superfluous post_p argument.
871 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
872 superfluous post_p argument.
873 * c-gimplify.c (c_gimplify_expr): Likewise.
874
01e1dea3
DM
8752016-01-26 David Malcolm <dmalcolm@redhat.com>
876
877 PR other/69006
878 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
879 pp_newline_and_flush with pp_flush.
880
9f04a53e
MS
8812016-01-20 Martin Sebor <msebor@redhat.com>
882
883 PR c/69405
884 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
885 an incompatible argument when the argument isn't a valid tree node.
886
7f26f7df
JM
8872016-01-18 Jason Merrill <jason@redhat.com>
888
889 PR c++/68767
890 * c-common.c (check_function_arguments_recurse): Fold the whole
891 COND_EXPR, not just the condition.
892
f62bf092
TV
8932016-01-18 Tom de Vries <tom@codesourcery.com>
894
895 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
896 classify as loop clause.
897
e0a575ff
JJ
8982016-01-15 Jakub Jelinek <jakub@redhat.com>
899
900 PR bootstrap/68271
901 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
902 C++ FE no longer has limit on number of pragmas.
903
9042015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
905
906 PR c++/69048
907 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 908 to add missing cleanup point.
b6e3db06 909
c7df95d8
DM
9102016-01-14 David Malcolm <dmalcolm@redhat.com>
911
912 PR c++/68819
913 * c-indentation.c (get_visual_column): Add location_t param.
914 Handle the column number being zero by effectively disabling the
915 warning, with an "inform".
916 (should_warn_for_misleading_indentation): Add location_t argument
917 for all uses of get_visual_column.
918
21efdd80
PP
9192016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
920
921 PR c++/69029
922 * c-indentation.c (should_warn_for_misleading_indentation):
923 Don't warn about do-while statements.
924
7a127fa7
MS
9252016-01-07 Martin Sebor <msebor@redhat.com>
926
927 PR c/68966
928 * c-common.c (sync_resolve_size): Reject first argument when it's
929 a pointer to _Bool.
930
c589e975
DM
9312016-01-05 David Malcolm <dmalcolm@redhat.com>
932
933 PR c/69122
934 * c-indentation.c (get_visual_column): Remove default argument.
935 (should_warn_for_misleading_indentation): For the multiline case,
936 update call to get_visual_column for next_stmt_exploc so that it
937 captures the location of the first non-whitespace character in the
938 relevant line. Don't issue warnings if there is non-whitespace
939 before the next statement.
940
818ab71a
JJ
9412016-01-04 Jakub Jelinek <jakub@redhat.com>
942
943 Update copyright years.
944
745e411d
DM
9452015-12-21 David Malcolm <dmalcolm@redhat.com>
946
947 * c-common.c (binary_op_error): Convert first param from
948 location_t to rich_location * and use it when emitting an error.
949 * c-common.h (binary_op_error): Convert first param from
950 location_t to rich_location *.
951
de67c4c3
DM
9522015-12-16 David Malcolm <dmalcolm@redhat.com>
953
954 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
955 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
956
4a38b02b
IV
9572015-12-15 Ilya Verbin <ilya.verbin@intel.com>
958
959 * c-common.c (c_common_attribute_table): Handle "omp declare target
960 link" attribute.
961
54d62f51
JJ
9622015-12-14 Jakub Jelinek <jakub@redhat.com>
963
964 PR c/68833
965 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
966
8d4227c8
TB
9672014-12-12 Tobias Burnus <burnus@net-b.de>
968
969 PR fortran/68815
970 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
971 specifiers (%d, %i,%u and %c).
972
f6069ccc
DM
9732015-12-10 David Malcolm <dmalcolm@redhat.com>
974
975 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
976
63bbf46d
JJ
9772015-12-08 Jakub Jelinek <jakub@redhat.com>
978
979 PR c/48088
980 PR c/68657
981 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
982 * c-pragma.c (handle_pragma_diagnostic): Adjust
983 control_warning_option caller.
984
f79520bb
DM
9852015-12-07 David Malcolm <dmalcolm@redhat.com>
986
987 * c-common.c (c_cpp_error): Update for change to
988 rich_location::set_range.
989
b3d5bc62
JJ
9902015-12-04 Paolo Bonzini <bonzini@gnu.org>
991
992 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
993 shifting 1 out of the sign bit.
994
9952015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
996
997 * c-common.c (c_common_attribute_table[]): Update max arguments
998 count for "simd" attribute.
999 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
1000
6eb4a537
JJ
10012015-12-03 Jakub Jelinek <jakub@redhat.com>
1002
1003 PR preprocessor/57580
1004 * c-ppoutput.c (print): Change printed field to bool.
1005 Move src_file last for smaller padding.
1006 (init_pp_output): Set print.printed to false instead of 0.
1007 (scan_translation_unit): Fix up formatting. Set print.printed
1008 to true after printing something other than newline.
1009 (scan_translation_unit_trad): Set print.printed to true instead of 1.
1010 (maybe_print_line_1): Set print.printed to false instead of 0.
1011 (print_line_1): Likewise.
1012 (do_line_change): Set print.printed to true instead of 1.
1013 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
1014 dump_macro): Set print.printed to false after printing newline.
1015
4250754e
JM
10162015-12-02 Jason Merrill <jason@redhat.com>
1017
f479b43d
JM
1018 * c-common.c (fold_for_warn): New.
1019 (warn_logical_operator, warn_tautological_cmp)
1020 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
1021
4250754e
JM
1022 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
1023 (c_fully_fold_internal, decl_constant_value_for_optimization):
1024 Move to c/c-fold.c.
1025 * c-common.h: Don't declare decl_constant_value_for_optimization.
1026
e9e32ee6
JM
10272015-12-02 Joseph Myers <joseph@codesourcery.com>
1028
1029 PR c/68162
1030 * c-common.h (c_build_qualified_type): Add extra default
1031 arguments.
1032
37d5ad46
JB
10332015-12-01 Julian Brown <julian@codesourcery.com>
1034 Cesar Philippidis <cesar@codesourcery.com>
1035 James Norris <James_Norris@mentor.com>
1036
1037 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
1038 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
1039 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
1040
f07862c7
EB
10412015-11-30 Eric Botcazou <ebotcazou@adacore.com>
1042
1043 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
1044 (decl_sloc_common): Delete and move bulk of processing to...
1045 (decl_sloc): ...here.
1046 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
1047 (dump_ada_double_name): Remove S parameter and compute the suffix.
1048 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
1049 element type and deal with an anonymous one.
1050 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
1051 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
1052 and remove reference to QUAL_UNION_TYPE.
1053 (dump_nested_types): Make 2 passes on the fields and move bulk to...
1054 (dump_nested_type): ...here. New function extracted from above.
1055 Generate a full declaration for anonymous element type of arrays.
1056 (print_ada_declaration): Really skip anonymous declarations. Remove
1057 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
1058 Clean up processing of declarations of array types and objects.
1059 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
1060 Remove obsolete code and tidy up.
1061
75c8aac3
JH
10622015-11-29 Jan Hubicka <hubicka@ucw.cz>
1063
1064 PR c/67581
1065 * c-common.c (handle_transparent_union_attribute): Update
1066 also type variants.
1067
b58d3df2
ML
10682015-11-27 Martin Liska <mliska@suse.cz>
1069
1070 PR c++/68312
1071 * array-notation-common.c (cilkplus_extract_an_triplets):
1072 Release vector of vectors.
1073 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
1074
89a01fcf
EB
10752015-11-26 Eric Botcazou <ebotcazou@adacore.com>
1076
1077 PR c++/68527
1078 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
1079 (print_ada_struct_decl): Likewise.
1080
cc5c5226
IZ
10812015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
1082
1083 PR c++/68001
1084 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
1085 * cilk.c (recognize_spawn): Determine location in a more precise
1086 way.
1087
269adb9d
JM
10882015-11-19 Jason Merrill <jason@redhat.com>
1089
1090 * c-common.c (shorten_compare): But look through macros from
1091 system headers.
1092
d0eccfcd
JM
10932015-11-18 Jason Merrill <jason@redhat.com>
1094
1095 * c-common.c (shorten_compare): Don't -Wtype-limits if the
1096 non-constant operand comes from a macro.
1097
3e44547c
JM
10982015-11-17 Jason Merrill <jason@redhat.com>
1099
1100 PR bootstrap/68346
1101 * c-common.c (warn_tautological_cmp): Fold before checking for
1102 constants.
1103
0f62c7a0
MP
11042015-11-16 Marek Polacek <polacek@redhat.com>
1105
1106 PR c++/68362
1107 * c-common.c (check_case_bounds): Fold low and high cases.
1108
a868811e
MP
11092015-11-16 Marek Polacek <polacek@redhat.com>
1110
1111 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
1112 * c-common.c (c_common_get_alias_set): Likewise.
1113 (handle_visibility_attribute): Likewise.
1114
fff77217
KY
11152015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
1116
1117 * c-common.c (handle_simd_attribute): New.
1118 (struct attribute_spec): Add entry for "simd".
1119 (handle_simd_attribute): New.
1120
269e63b7
KT
11212015-11-13 Kai Tietz <ktietz70@googlemail.com>
1122
1123 * c-lex.c (interpret_float): Use fold_convert.
1124
ebedc9a3
DM
11252015-11-13 David Malcolm <dmalcolm@redhat.com>
1126
1127 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
1128 and store it on the result.
1129 * c-opts.c (c_common_init_options): Set
1130 global_dc->colorize_source_p.
1131
6e232ba4
JN
11322015-11-12 James Norris <jnorris@codesourcery.com>
1133 Joseph Myers <joseph@codesourcery.com>
1134
1135 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
1136 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
1137 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
1138 PRAGMA_OACC_CLAUSE_LINK.
1139
e78bede6
MP
11402015-11-11 Marek Polacek <polacek@redhat.com>
1141
1142 PR c/68107
1143 PR c++/68266
1144 * c-common.c (valid_array_size_p): New function.
1145 * c-common.h (valid_array_size_p): Declare.
1146
3f8257db 11472015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
1148
1149 PR bootstrap/68271
1150 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
1151
69f293c9
AM
11522015-11-11 Andrew MacLeod <amacleod@redhat.com>
1153
1154 * array-notation-common.c: Remove unused header files.
1155 * c-ada-spec.c: Likewise.
1156 * c-cilkplus.c: Likewise.
1157 * c-common.c: Likewise.
1158 * c-cppbuiltin.c: Likewise.
1159 * c-dump.c: Likewise.
1160 * c-format.c: Likewise.
1161 * c-gimplify.c: Likewise.
1162 * c-indentation.c: Likewise.
1163 * c-lex.c: Likewise.
1164 * c-omp.c: Likewise.
1165 * c-opts.c: Likewise.
1166 * c-pch.c: Likewise.
1167 * c-ppoutput.c: Likewise.
1168 * c-pragma.c: Likewise.
1169 * c-pretty-print.c: Likewise.
1170 * c-semantics.c: Likewise.
1171 * c-ubsan.c: Likewise.
1172 * cilk.c: Likewise.
1173 * stub-objc.c: Likewise.
1174
3a40d81d
NS
11752015-11-09 Thomas Schwinge <thomas@codesourcery.com>
1176 Cesar Philippidis <cesar@codesourcery.com>
1177 James Norris <jnorris@codesourcery.com>
1178 Julian Brown <julian@codesourcery.com>
1179 Nathan Sidwell <nathan@codesourcery.com>
1180
1181 * c-pragma.c (oacc_pragmas): Add "routine".
1182 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
1183
ee45a32d
EB
11842015-11-08 Eric Botcazou <ebotcazou@adacore.com>
1185
1186 * c-common.c (c_common_attributes): Add scalar_storage_order.
1187 (handle_scalar_storage_order_attribute): New function.
1188 * c-pragma.c (global_sso): New variable.
1189 (maybe_apply_pragma_scalar_storage_order): New function.
1190 (handle_pragma_scalar_storage_order): Likewise.
1191 (init_pragma): Register scalar_storage_order.
1192 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
1193 * c.opt (Wscalar-storage-order): New warning.
1194 (fsso-struct=): New option.
1195
eb11eb15
MS
11962015-11-08 Martin Sebor <msebor@redhat.com>
1197
1198 * c.opt (Wplacement-new): Add a period to the end of a sentence.
1199
0aad0198
RS
12002015-11-07 Richard Sandiford <richard.sandiford@arm.com>
1201
1202 * c-common.c: Don't undef DEF_BUILTIN.
1203
8a645150
DM
12042015-11-06 David Malcolm <dmalcolm@redhat.com>
1205
1206 * c-common.c (c_cpp_error): Convert parameter from location_t to
1207 rich_location *. Eliminate the "column_override" parameter and
1208 the call to diagnostic_override_column.
1209 Update the "done_lexing" clause to set range 0
1210 on the rich_location, rather than overwriting a location_t.
1211 * c-common.h (c_cpp_error): Convert parameter from location_t to
1212 rich_location *. Eliminate the "column_override" parameter.
1213
7a5e4956
CP
12142015-11-05 Cesar Philippidis <cesar@codesourcery.com>
1215 Thomas Schwinge <thomas@codesourcery.com>
1216 James Norris <jnorris@codesourcery.com>
1217
1218 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
1219 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
1220 clauses with parallel and kernels and loops.
1221 * c-pragma.h (enum pragma_omp_clause): Add entries for
1222 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
1223 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
1224 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
1225 INDEPENDENT,SEQ}.
1226 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
1227
e2f5cc96
MS
12282015-11-05 Martin Sebor <msebor@redhat.com>
1229
1230 PR c++/67942
1231 * c.opt (-Wplacement-new): New option.
1232
e01d41e5
JJ
12332015-11-05 Jakub Jelinek <jakub@redhat.com>
1234
1235 * c-common.h (c_finish_omp_atomic): Add TEST argument.
1236 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
1237 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
1238 save_expr or create_tmp_var* if TEST is true.
1239 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
1240 Don't call add_stmt here.
1241 (struct c_omp_check_loop_iv_data): New type.
1242 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
1243 c_omp_check_loop_iv_exprs): New functions.
1244 (c_omp_split_clauses): Adjust for lastprivate being allowed on
1245 distribute.
1246 (c_omp_declare_simd_clauses_to_numbers): Change
1247 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
1248 (c_omp_declare_simd_clauses_to_decls): Similarly change those
1249 from numbers to PARM_DECLs.
1250
595278be
MM
12512015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
1252
1253 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
1254 flag_checking.
1255
3f8257db 12562015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
1257
1258 PR c++-common/67882
b3d5bc62
JJ
1259 * c-common.h (fold_offsetof_1): Add argument.
1260 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
1261 offsetof expressions that reference elements past the end of
1262 an array.
1263
4bf9e5a8
TS
12642015-11-03 Thomas Schwinge <thomas@codesourcery.com>
1265 Chung-Lin Tang <cltang@codesourcery.com>
1266
1267 * c-pragma.c (oacc_pragmas): Add "atomic".
1268 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
1269
3b1661a9
ES
12702015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
1271
1272 * c-common.c (handle_target_clones_attribute): New.
1273 (c_common_attribute_table): Add handle_target_clones_attribute.
1274 (handle_always_inline_attribute): Add check on target_clones attribute.
1275 (handle_target_attribute): Ditto.
1276
2adfab87
AM
12772015-10-29 Andrew MacLeod <amacleod@redhat.com>
1278
1279 * array-notation-common.c: Reorder #include's and remove duplicates.
1280 * c-ada-spec.c: Likewise.
1281 * c-cilkplus.c: Likewise.
1282 * c-common.c: Likewise.
1283 * c-cppbuiltin.c: Likewise.
1284 * c-dump.c: Likewise.
1285 * c-format.c: Likewise.
1286 * c-gimplify.c: Likewise.
1287 * c-indentation.c: Likewise.
1288 * c-lex.c: Likewise.
1289 * c-omp.c: Likewise.
1290 * c-opts.c: Likewise.
1291 * c-pch.c: Likewise.
1292 * c-ppoutput.c: Likewise.
1293 * c-pragma.c: Likewise.
1294 * c-pretty-print.c: Likewise.
1295 * c-semantics.c: Likewise.
1296 * c-ubsan.c: Likewise.
1297 * cilk.c: Likewise.
1298 * stub-objc.c: Likewise.
1299
d90ec4f2
JM
13002015-10-28 Jason Merrill <jason@redhat.com>
1301
1302 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
1303
88bae6f4
TS
13042015-10-27 Thomas Schwinge <thomas@codesourcery.com>
1305 James Norris <jnorris@codesourcery.com>
1306 Cesar Philippidis <cesar@codesourcery.com>
1307
1308 PR c/64765
1309 PR c/64880
1310 * c-common.h (c_oacc_split_loop_clauses): Declare function.
1311 * c-omp.c (c_oacc_split_loop_clauses): New function.
1312
b1726d6c
MS
13132015-10-21 Martin Sebor <msebor@redhat.com>
1314
1315 PR driver/68043
1316 * c.opt: End each sentence that describes an option with a period.
1317
fa60eeb9
MP
13182015-10-20 Marek Polacek <polacek@redhat.com>
1319
1320 * array-notation-common.c (is_cilkplus_vector_p): Define.
1321 * c-common.h (is_cilkplus_vector_p): Declare.
1322
95979049
MP
13232015-10-20 Marek Polacek <polacek@redhat.com>
1324
1325 * c.opt (std=gnu++11): Do not describe as experimental.
1326 (std=gnu++14): Likewise.
1327
2a9fb712
JM
13282015-10-19 Jason Merrill <jason@redhat.com>
1329
1330 * c-cppbuiltin.c (c_cpp_builtins): Define
1331 __cpp_nontype_template_args.
1332
13b380a3
JM
13332015-10-19 Jason Merrill <jason@redhat.com>
1334
1335 * c-cppbuiltin.c (c_cpp_builtins): Define
1336 __cpp_enumerator_attributes, __cpp_fold_expressions,
1337 __cpp_unicode_characters.
1338
d9a6bd32
JJ
13392015-10-13 Jakub Jelinek <jakub@redhat.com>
1340 Aldy Hernandez <aldyh@redhat.com>
1341
1342 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
1343 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
1344 (c_define_builtins): Likewise.
1345 * c-common.h (enum c_omp_clause_split): Add
1346 C_OMP_CLAUSE_SPLIT_TASKLOOP.
1347 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
1348 (c_finish_omp_for): Add ORIG_DECLV argument.
1349 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
1350 201511 instead of 201307.
1351 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
1352 OMP_CRITICAL_CLAUSES to it.
1353 (c_finish_omp_ordered): Add CLAUSES argument, set
1354 OMP_ORDERED_CLAUSES to it.
1355 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
1356 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
1357 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
1358 constructs and new OpenMP 4.5 clauses. Clear
1359 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
1360 verification code.
1361 * c-pragma.c (omp_pragmas_simd): Add taskloop.
1362 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
1363 (enum pragma_omp_clause): Add
1364 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
1365 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
1366
624d31fe
RS
13672015-10-05 Richard Sandiford <richard.sandiford@arm.com>
1368
1369 * c-lex.c (interpret_float): Use real_equal instead of
1370 REAL_VALUES_EQUAL.
1371
b8fd7909
JM
13722015-10-04 Jason Merrill <jason@redhat.com>
1373
1374 Implement N4514, C++ Extensions for Transactional Memory.
1375 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
1376 (c_common_attribute_table): Add transaction_safe_dynamic.
1377 transaction_safe now affects type identity.
1378 (handle_tm_attribute): Handle transaction_safe_dynamic.
1379 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
1380 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
1381 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
1382 (D_TRANSMEM): New.
1383 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
1384 * c-pretty-print.c (pp_c_attributes_display): Don't print
1385 transaction_safe in C++.
1386
12651878
MP
13872015-10-02 Marek Polacek <polacek@redhat.com>
1388
1389 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
1390
3e3b8d63
MP
13912015-10-02 Marek Polacek <polacek@redhat.com>
1392
1393 PR c/64249
1394 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
1395 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
1396 * c.opt (Wduplicated-cond): New option.
1397
0d1a8f75
JM
13982015-10-01 Joseph Myers <joseph@codesourcery.com>
1399
1400 * c.opt (std=c11): Do not describe as experimental.
1401 (std=gnu11): Likewise.
1402 (std=iso9899:2011): Likewise.
1403
3e32ee19
NS
14042015-09-28 Nathan Sidwell <nathan@codesourcery.com>
1405
1406 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
1407 (DEF_FUNCTION_TYPE_VAR_11): Delete.
1408
974348ee
MP
14092015-09-25 Marek Polacek <polacek@redhat.com>
1410
1411 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
1412 (ubsan_instrument_shift): Likewise.
1413
15dbc1a6
MP
14142015-09-25 Marek Polacek <polacek@redhat.com>
1415
1416 PR sanitizer/64906
1417 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
1418
6b95d7cc
PP
14192015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
1420
1421 * c-indentation.c (should_warn_for_misleading_indentation):
1422 Compare next_stmt_vis_column with guard_line_first_nws instead
1423 of with guard_line_vis_column.
1424
c1822f9c
MLI
14252015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
1426
1427 PR c/49654
1428 PR c/49655
1429 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
1430 options and options not valid for the current language.
1431
d5398058
PP
14322015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
1433
1434 * c-indentation.c (should_warn_for_misleading_indentation):
1435 Float out and consolidate the calls to get_visual_column that
1436 are passed guard_exploc as an argument. Compare
1437 next_stmt_vis_column with guard_line_first_nws instead of with
1438 body_line_first_nws.
1439
6b333269
NS
14402015-09-22 Nathan Sidwell <nathan@codesourcery.com>
1441
1442 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
1443 Wnamespaces): New C++ warnings.
1444
a75f1574
JM
14452015-09-22 Jason Merrill <jason@redhat.com>
1446
1447 * c-common.h (abi_compat_version_crosses): New.
1448 (warn_abi_version): Declare.
1449 * c-common.c: Define it.
1450 * c-opts.c (c_common_post_options): Handle it.
1451 flag_abi_compat_version defaults to 8.
1452
bdaaa8b7
VV
14532015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
1454
1455 Complete the implementation of N4230, Nested namespace definition.
1456 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
1457 __cpp_nested_namespace_definitions.
1458
eaa797e8
MLI
14592015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1460
1461 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
1462
c4914de6
MLI
14632015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1464
1465 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
1466 when warning.
1467 * c-pragma.h (pragma_lex): Add optional loc argument.
1468
fcb87c50
MM
14692015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
1470
1471 * c-format.c (check_format_arg): Adjust to use common block size in all
1472 object pools.
1473
31bdd08a
DM
14742015-09-15 David Malcolm <dmalcolm@redhat.com>
1475
1476 * c-format.c (location_from_offset): Update for change in
1477 signature of location_get_source_line.
1478 * c-indentation.c (get_visual_column): Likewise.
1479 (line_contains_hash_if): Likewise.
1480
aa9f4b4c
MP
14812015-09-14 Marek Polacek <polacek@redhat.com>
1482
1483 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
1484 setting various warnings.
1485
aa256c4a
MP
14862015-09-14 Marek Polacek <polacek@redhat.com>
1487
1488 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
1489 a negative value.
1490
0f876f22
MW
14912015-09-11 Mark Wielaard <mjw@redhat.com>
1492
1493 PR c/28901
1494 * c.opt (Wunused-variable): Option from common.opt.
1495 (Wunused-const-variable): New option.
1496
273aa49e
PC
14972015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
1498
1499 PR c++/53184
1500 * c.opt ([Wsubobject-linkage]): Add.
1501
1807ffc1
MS
15022015-09-03 Martin Sebor <msebor@redhat.com>
1503
1504 PR c/66516
1505 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
1506 functions.
1507 * c-common.c (reject_gcc_builtin): Define.
1508
38942840
BI
15092015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
1510
1511 PR middle-end/60586
1512 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
1513 prototype.
1514 * c-gimplify.c (c_gimplify_expr): Added a call to the function
1515 cilk_gimplify_call_params_in_spawned_fn.
1516 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
1517 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
1518 unwrapping.
1519
c316b5e4
MP
15202015-08-25 Marek Polacek <polacek@redhat.com>
1521
1522 PR middle-end/67330
1523 * c-common.c (handle_weak_attribute): Don't check whether the
1524 visibility can be changed here.
1525
584a7c46
MLI
15262015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
1527
1528 * c-lex.c (c_lex_with_flags): Use explicit locations.
1529
a79683d5
TS
15302015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
1531
1532 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
1533 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
1534
61717a45
FXC
15352015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1536
1537 PR middle-end/36757
1538 * c-common.c (check_builtin_function_arguments): Add check
1539 for BUILT_IN_SIGNBIT argument.
1540
329524f5
PC
15412015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
1542
1543 PR c++/67160
1544 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
1545 in c++1z mode.
1546
4ee55665
MP
15472015-08-17 Marek Polacek <polacek@redhat.com>
1548
1549 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
1550 with whitespaces before qualifier names.
1551
b893e375
MP
15522015-08-12 Marek Polacek <polacek@redhat.com>
1553
1554 PR c++/55095
1555 * c-common.c (maybe_warn_shift_overflow): Properly handle
1556 left-shifting 1 into the sign bit.
1557
c2d89095
MLI
15582015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
1559
1560 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
1561
971e17ff
AS
15622015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
1563 Braden Obrzut <admin@maniacsvault.net>
1564 Jason Merrill <jason@redhat.com>
1565
1566 Add C++ Concepts TS support.
1567 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
1568 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
1569 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
1570 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
1571 * c-opts.c (set_std_cxx1z): Set flag_concepts.
1572 * c.opt (fconcepts): New.
1573
b3d5bc62
JJ
15742015-08-02 Martin Sebor <msebor@redhat.com>
1575
1576 * c.opt (-Wframe-address): New warning option.
1577
8ebca419
PP
15782015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
1579
1580 * c-indentation.c (should_warn_for_misleading_indentation):
1581 Improve heuristics.
1582
1a1e101f
PP
15832015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
1584
1585 * c-indentation.c (get_visual_column): Add parameter first_nws,
1586 use it. Update comment documenting the function.
1587 (is_first_nonwhitespace_on_line): Remove.
1588 (should_warn_for_misleading_indentation): Replace usage of
1589 of is_first_nonwhitespace_on_line with get_visual_column.
1590
992118a1
PP
15912015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
1592
1593 * c-indentation.h (struct token_indent_info): Define.
1594 (get_token_indent_info): Define.
1595 (warn_for_misleading_information): Declare.
1596 * c-common.h (warn_for_misleading_information): Remove.
1597 * c-identation.c (warn_for_misleading_indentation):
1598 Change declaration to take three token_indent_infos. Adjust
1599 accordingly.
1600 * c-identation.c (should_warn_for_misleading_indentation):
1601 Likewise. Bail out early if the body is a compound statement.
1602 (guard_tinfo_to_string): Define.
1603
e8fa3817
JM
16042015-07-30 Jason Merrill <jason@redhat.com>
1605
1606 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
1607 '*' for reference decay.
1608
173864e8
MP
16092015-07-30 Marek Polacek <polacek@redhat.com>
1610
1611 * c-common.c (warn_tautological_cmp): Bail for float types.
1612
f2afe6dd
MP
16132015-07-27 Marek Polacek <polacek@redhat.com>
1614
1615 PR bootstrap/67030
1616 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
1617
05b28fd6
MP
16182015-07-27 Marek Polacek <polacek@redhat.com>
1619
1620 PR c++/66555
1621 PR c/54979
1622 * c-common.c (find_array_ref_with_const_idx_r): New function.
1623 (warn_tautological_cmp): New function.
1624 * c-common.h (warn_tautological_cmp): Declare.
1625 * c.opt (Wtautological-compare): New option.
1626
5a5062b8
MP
16272015-07-23 Marek Polacek <polacek@redhat.com>
1628
1629 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
1630 (ubsan_instrument_shift): Likewise.
1631
dc891fe7
MP
16322015-07-23 Marek Polacek <polacek@redhat.com>
1633
1634 PR sanitizer/66908
1635 * c-ubsan.c: Include gimplify.h.
1636 (ubsan_instrument_division): Unshare OP0 and OP1.
1637 (ubsan_instrument_shift): Likewise.
1638
451b5e48
MP
16392015-07-20 Marek Polacek <polacek@redhat.com>
1640 Richard Sandiford <richard.sandiford@arm.com>
1641
1642 PR c++/55095
1643 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
1644 Use EXPR_LOC_OR_LOC.
1645 (maybe_warn_shift_overflow): New function.
1646 * c-common.h (maybe_warn_shift_overflow): Declare.
1647 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
1648 * c.opt (Wshift-overflow): New option.
1649
fb0b2914
ML
16502015-07-16 Martin Liska <mliska@suse.cz>
1651
1652 * c-format.c (static void check_format_info_main): Use
1653 object_allocator instead of pool_allocator.
1654 (check_format_arg): Likewise.
1655 (check_format_info_main): Likewise.
1656
903f5c23
AM
16572015-07-15 Andrew MacLeod <amacleod@redhat.com>
1658
1659 * c-opts.c: Remove multiline #include comment.
1660
026c3cfd
AH
16612015-07-12 Aldy Hernandez <aldyh@redhat.com>
1662
1663 * c-common.c: Fix double word typos.
1664
bb49ee66
EB
16652015-07-10 Eric Botcazou <ebotcazou@adacore.com>
1666
1667 * c-ada-spec.h (cpp_operation): Revert latest change.
1668 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
1669 constructors and destructors.
1670
1916bcb5
AM
16712015-07-09 Andrew MacLeod <amacleod@redhat.com>
1672
1673 * c-common.h: Adjust includes for flags.h changes.
1674 * stub-objc.c: Likewise.
026c3cfd 1675
a9dcd529
EB
16762015-07-08 Eric Botcazou <ebotcazou@adacore.com>
1677
1678 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
1679 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
1680
b03b462f
JJ
16812015-07-08 Jakub Jelinek <jakub@redhat.com>
1682
1683 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
1684 are to be removed, return NULL rather than original clauses list.
1685
c7131fb2
AM
16862015-07-07 Andrew MacLeod <amacleod@redhat.com>
1687
1688 * array-notation-common.c: Adjust includes.
1689 * c-ada-spec.c: Likewise.
1690 * c-cilkplus.c: Likewise.
1691 * c-common.h: Likewise.
1692 * c-cppbuiltin.c: Likewise.
1693 * c-dump.c: Likewise.
1694 * c-format.c: Likewise.
1695 * c-gimplify.c: Likewise.
1696 * c-indentation.c: Likewise.
1697 * c-lex.c: Likewise.
1698 * c-omp.c: Likewise.
1699 * c-opts.c: Likewise.
1700 * c-pch.c: Likewise.
1701 * c-ppoutput.c: Likewise.
1702 * c-pragma.c: Likewise.
1703 * c-pretty-print.c: Likewise.
1704 * c-semantics.c: Likewise.
1705 * c-ubsan.c: Likewise.
1706 * cilk.c: Likewise.
1707 * stub-objc.c: Likewise.
1708
2a7fb83f
EB
17092015-07-07 Eric Botcazou <ebotcazou@adacore.com>
1710
1711 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
1712 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
1713
a03c9bf1
JM
17142015-07-01 Jason Merrill <jason@redhat.com>
1715
36a85135
JM
1716 * c-common.h (D_CXX11): Rename from D_CXX0X.
1717 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
1718 * c-common.c: Adjust.
1719
e7fa68d5
JM
1720 * c-opts.c (c_common_post_options): Default to C++14.
1721
a03c9bf1
JM
1722 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
1723
fe95b036
ESR
17242015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
1725
1726 Implement N4197 - Adding u8 character literals
b3d5bc62 1727 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 1728 CPP_CHAR.
b3d5bc62 1729 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 1730 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 1731 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
1732 and CPP_UTF8CHAR tokens.
1733 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 1734
da2e71c9
MLI
17352015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1736
1737 PR fortran/66605
1738 * c-common.c (do_warn_unused_parameter): Move here.
1739 * c-common.h (do_warn_unused_parameter): Declare.
1740
b155cfd9
MP
17412015-06-29 Marek Polacek <polacek@redhat.com>
1742
1743 PR c/66322
1744 * c-common.c (check_case_bounds): Add bool * parameter. Set
1745 OUTSIDE_RANGE_P.
1746 (c_add_case_label): Add bool * parameter. Pass it down to
1747 check_case_bounds.
1748 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
1749 warning here.
1750 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
1751 declarations.
1752
31521951
MP
17532015-06-27 Marek Polacek <polacek@redhat.com>
1754
1755 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
1756 or VECTOR_INTEGER_TYPE_P throughout.
1757 * c-gimplify.c: Likewise.
1758
22d03525
MP
17592015-06-26 Marek Polacek <polacek@redhat.com>
1760
1761 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
1762 * c-common.c (c_fully_fold_internal): Likewise.
1763 (c_alignof_expr): Likewise.
1764 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
1765 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 1766 * cilk.c (create_parm_list): Likewise.
22d03525 1767
af05e6e5
MP
17682015-06-26 Marek Polacek <polacek@redhat.com>
1769
1770 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
1771
f0889939
AM
17722015-06-25 Andrew MacLeod <amacleod@redhat.com>
1773
1774 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
1775 * c-gimplify.c: Likewise.
1776 * c-pragma.c: Likewise.
1777 * c-ubsan.c: Likewise.
1778 * cilk.c: Likewise.
1779
ca752f39
RS
17802015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1781
1782 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
1783 ggc_hasher.
1784
16a16ec7
AM
17852015-06-25 Andrew MacLeod <amacleod@redhat.com>
1786
1787 * cilk.c: Move calls.h after tm.h in the include chain.
1788
0ae9bd27
MP
17892015-06-25 Marek Polacek <polacek@redhat.com>
1790
1791 * array-notation-common.c: Use VAR_P throughout.
1792 * c-ada-spec.c: Likewise.
1793 * c-common.c: Likewise.
1794 * c-format.c: Likewise.
1795 * c-gimplify.c: Likewise.
1796 * c-omp.c: Likewise.
1797 * c-pragma.c: Likewise.
1798 * c-pretty-print.c: Likewise.
1799 * cilk.c: Likewise.
1800
62f9079a
MP
18012015-06-25 Marek Polacek <polacek@redhat.com>
1802
1803 * cilk.c (extract_free_variables): Use is_global_var.
1804
0fa16060
RS
18052015-06-23 Richard Sandiford <richard.sandiford@arm.com>
1806
1807 * c-common.c: Don't include target-def.h.
1808
a68ae2e1
MP
18092015-06-23 Marek Polacek <polacek@redhat.com>
1810
1811 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
1812 when comparing INTEGER_CSTs.
1813
c6a2f2d9
PMR
18142015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
1815
1816 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
1817 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
1818 (dump_ada_template): Skip partially specialized types.
1819
6b4db501
MM
18202015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
1821
1822 * c-common.c (scalar_to_vector): Use std::swap instead of manually
1823 swapping.
1824
abb226c9
AM
18252015-06-17 Andrew MacLeod <amacleod@redhat.com>
1826
1827 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
1828 * c-ada-spec.c: Likewise.
1829 * c-cilkplus.c: Likewise.
1830 * c-common.c: Likewise.
1831 * c-common.h: Likewise.
1832 * c-cppbuiltin.c: Likewise.
1833 * c-dump.c: Likewise.
1834 * c-format.c: Likewise.
1835 * c-gimplify.c: Likewise.
1836 * c-indentation.c: Likewise.
1837 * c-lex.c: Likewise.
1838 * c-omp.c: Likewise.
1839 * c-opts.c: Likewise.
1840 * c-pch.c: Likewise.
1841 * c-ppoutput.c: Likewise.
1842 * c-pragma.c: Likewise.
1843 * c-pretty-print.c: Likewise.
1844 * c-semantics.c: Likewise.
1845 * c-ubsan.c: Likewise.
1846 * cilk.c: Likewise.
1847 * stub-objc.c: Likewise.
1848
076fecad
PP
18492015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
1850
1851 PR c++/65168
1852 * c-common.c (c_common_truthvalue_conversion): Warn when
1853 converting an address of a reference to a truth value.
1854
13fdf2e2
AM
18552015-06-08 Andrew MacLeod <amacleod@redhat.com>
1856
1857 * array-notation-common.c : Adjust include files.
1858 * c-ada-spec.c : Likewise.
1859 * c-cilkplus.c : Likewise.
1860 * c-common.c : Likewise.
1861 * c-common.h : Likewise.
1862 * c-cppbuiltin.c : Likewise.
1863 * c-dump.c : Likewise.
1864 * c-format.c : Likewise.
1865 * c-gimplify.c : Likewise.
1866 * c-indentation.c : Likewise.
1867 * c-lex.c : Likewise.
1868 * c-omp.c : Likewise.
1869 * c-opts.c : Likewise.
1870 * c-pch.c : Likewise.
1871 * c-ppoutput.c : Likewise.
1872 * c-pragma.c : Likewise.
1873 * c-pretty-print.c : Likewise.
1874 * c-semantics.c : Likewise.
1875 * c-ubsan.c : Likewise.
1876 * cilk.c : Likewise.
1877 * stub-objc.c : Likewise.
1878
a1661b90
MP
18792015-06-08 Marek Polacek <polacek@redhat.com>
1880
1881 PR c/66415
1882 * c-format.c (location_from_offset): Return LOC if LINE is null.
1883
d7438551
AH
18842015-06-05 Aldy Hernandez <aldyh@redhat.com>
1885
1886 * c-common.h (c_parse_final_cleanups): New prototype.
1887 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
1888
b3d5bc62
JJ
18892015-06-04 Sriraman Tallam <tmsriram@google.com>
1890
1891 * c-common.c (noplt): New attribute.
1892 (handle_noplt_attribute): New handler.
1893
ecb9f223
AM
18942015-06-04 Andrew MacLeod <amacleod@redhat.com>
1895
1896 * array-notation-common.c: Adjust includes for restructured coretypes.h.
1897 * c-ada-spec.c: Likewise.
1898 * c-cilkplus.c: Likewise.
1899 * c-common.c: Likewise.
1900 * c-common.h: Likewise.
1901 * c-cppbuiltin.c: Likewise.
1902 * c-dump.c: Likewise.
1903 * c-format.c: Likewise.
1904 * c-gimplify.c: Likewise.
1905 * c-indentation.c: Likewise.
1906 * c-lex.c: Likewise.
1907 * c-omp.c: Likewise.
1908 * c-opts.c: Likewise.
1909 * c-pch.c: Likewise.
1910 * c-ppoutput.c: Likewise.
1911 * c-pragma.c: Likewise.
1912 * c-pretty-print.c: Likewise.
1913 * c-semantics.c: Likewise.
1914 * c-ubsan.c: Likewise.
1915 * cilk.c: Likewise.
1916 * stub-objc.c: Likewise.
1917
6ac48155
DM
19182015-06-02 David Malcolm <dmalcolm@redhat.com>
1919
1920 PR c/66220:
1921 * c-indentation.c (should_warn_for_misleading_indentation): Use
1922 expand_location rather than expand_location_to_spelling_point.
1923 Don't warn if the guarding statement is more indented than the
1924 next/body stmts.
1925
773ce42e
DM
19262015-06-02 David Malcolm <dmalcolm@redhat.com>
1927
1928 * c-indentation.c (warn_for_misleading_indentation): Bail out
1929 immediately if -Wmisleading-indentation isn't enabled.
1930
4fef8379
ML
19312015-06-01 Martin Liska <mliska@suse.cz>
1932
1933 * c-format.c (check_format_arg):Use new type-based pool allocator.
1934 (check_format_info_main) Likewise.
1935
1edfb384
EB
19362015-05-31 Eric Botcazou <ebotcazou@adacore.com>
1937
1938 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
1939 (has_nontrivial_methods): Likewise.
1940
9677ef52
MP
19412015-05-25 Marek Polacek <polacek@redhat.com>
1942
1943 * c-ubsan.c (ubsan_instrument_shift): Use type0.
1944
fd5c817a
MP
19452015-05-22 Marek Polacek <polacek@redhat.com>
1946
1947 PR c/47043
1948 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
1949
a2f45fe6 19502015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
1951
1952 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
1953 STACK_GROWS_DOWNWARD.
1954
a2f45fe6 19552015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
1956
1957 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
1958 STACK_GROWS_DOWNWARD rather than if it is defined.
1959
0fee2ac2 19602015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 1961
0fee2ac2
MLI
1962 PR c/52952
1963 * c-format.c (location_column_from_byte_offset): New.
1964 (location_from_offset): New.
1965 (struct format_wanted_type): Add offset_loc field.
1966 (check_format_info): Move handling of location for extra arguments
1967 closer to the point of warning.
1968 (check_format_info_main): Pass the result of location_from_offset
1969 to warning_at.
1970 (format_type_warning): Pass the result of location_from_offset
1971 to warning_at.
1972
cf4ef6f7
MP
19732015-05-20 Marek Polacek <polacek@redhat.com>
1974
1975 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
1976
3a65ee74
MP
19772015-05-20 Marek Polacek <polacek@redhat.com>
1978
1979 * c-ada-spec.c (dump_sloc): Use DECL_P.
1980
21b634ae
MP
19812015-05-20 Marek Polacek <polacek@redhat.com>
1982
1983 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
1984 * c-common.c: Likewise.
1985
0e50b624
DM
19862015-05-19 David Malcolm <dmalcolm@redhat.com>
1987
1988 * c-common.h (fe_file_change): Strengthen param from
1989 const line_map * to const line_map_ordinary *.
1990 (pp_file_change): Likewise.
1991 * c-lex.c (fe_file_change): Likewise.
1992 (cb_define): Use linemap_check_ordinary when invoking
1993 SOURCE_LINE.
1994 (cb_undef): Likewise.
1995 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
1996 invoking cb_file_change.
1997 (c_finish_options): Likewise.
1998 (push_command_line_include): Likewise.
1999 (cb_file_change): Strengthen param "new_map" from
2000 const line_map * to const line_map_ordinary *.
2001 * c-ppoutput.c (cb_define): Likewise for local "map".
2002 (pp_file_change): Likewise for param "map" and local "from".
2003
fab27f52
MM
20042015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
2005
2006 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
2007
2fe1d762
TV
20082015-05-18 Tom de Vries <tom@codesourcery.com>
2009
2010 * c-common.c (build_va_arg_1): New function.
2011 (build_va_arg): Add address operator to va_list operand if necessary.
2012
7a37fa90
MM
20132015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
2014
2015 PR c/48956
2016 * c-common.c (int_safely_convertible_to_real_p): Define.
2017 (unsafe_conversion_p): Check conversions involving complex types.
2018 (conversion_warning): Add new warning message for conversions which
2019 discard imaginary component.
2020 * c-common.h: (enum conversion_safety): Add new enumerator for such
2021 conversions.
2022
3aa3c9fc
MP
20232015-05-14 Marek Polacek <polacek@redhat.com>
2024
2025 PR c/66066
2026 PR c/66127
2027 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
2028 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
2029 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
2030 use it. If FOR_INT_CONST, require that all evaluated operands be
2031 INTEGER_CSTs.
2032
c3388e62
DM
20332015-05-12 David Malcolm <dmalcolm@redhat.com>
2034
2035 * c-common.h (warn_for_misleading_indentation): New prototype.
2036 * c-indentation.c: New file.
2037 * c.opt (Wmisleading-indentation): New option.
2038
c7b38fd5
TV
20392015-05-12 Tom de Vries <tom@codesourcery.com>
2040
2041 PR tree-optimization/66010
2042 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
2043
381bf11e
JM
20442015-05-09 Jason Merrill <jason@redhat.com>
2045
edff0c06
JM
2046 * c-opts.c (c_common_post_options): Also clear
2047 cpp_opts->cpp_warn_cxx11_compat.
2048
129211bc
JM
2049 * c-common.h (enum cxx_dialect): Add cxx_unset.
2050 * c-common.c (cxx_dialect): Initialize to cxx_unset.
2051 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
2052
381bf11e
JM
2053 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
2054 (std=gnu++0x): Mark as Undocumented.
2055 (std=gnu++1y): Add deprecated message.
2056
fe191308
JM
20572015-05-08 Jason Merrill <jason@redhat.com>
2058
765189ff
JM
2059 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
2060 * c-opts.c: Adjust.
2061
fe191308
JM
2062 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
2063
755e528f
MP
20642015-05-08 Marek Polacek <polacek@redhat.com>
2065
2066 PR c/64918
2067 * c.opt (Woverride-init-side-effects): New option.
2068
0173bd2a
MP
20692015-05-07 Marek Polacek <polacek@redhat.com>
2070
2071 PR c/65179
2072 * c-common.c (c_fully_fold_internal): Warn when left shifting a
2073 negative value.
2074 * c.opt (Wshift-negative-value): New option.
2075 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
2076 when -Wextra and C99/C++11 mode.
2077
e0f0d3b9
MP
20782015-05-07 Marek Polacek <polacek@redhat.com>
2079 Martin Uecker <uecker@eecs.berkeley.edu>
2080
2081 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
2082 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
2083
8243e2a9
JM
20842015-05-05 Jason Merrill <jason@redhat.com>
2085
2086 * c.opt (Wterminate): New.
2087
577cd070
MP
20882015-04-30 Marek Polacek <polacek@redhat.com>
2089
2090 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
2091 require that the non-constant be of a boolean type.
2092
0373796b
JT
20932015-04-29 Josh Triplett <josh@joshtriplett.org>
2094
e0f0d3b9
MP
2095 * c-common.c (handle_section_attribute): Refactor to reduce
2096 nesting and distinguish between error cases.
0373796b 2097
716c0ba6
MP
20982015-04-29 Marek Polacek <polacek@redhat.com>
2099
2100 PR c/64610
2101 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
2102 with 0/1.
2103
8848828b
JJ
21042015-04-29 Jakub Jelinek <jakub@redhat.com>
2105
2106 * c-common.h (omp_clause_mask): Unconditionally define as a class.
2107 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
2108 HOST_BITS_PER_WIDE_INT.
2109
ecd0e562
TV
21102015-04-28 Tom de Vries <tom@codesourcery.com>
2111
2112 PR tree-optimization/65887
2113 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
2114
2a877204 21152015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 2116 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
2117
2118 * c-ada-spec.c (in_function): Delete.
2119 (dump_generic_ada_node): Do not change in_function and remove the
2120 redundant code dealing with it.
2121 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
2122 (print_ada_methods): Output the static member functions in a nested
2123 package after the regular methods as well as associated renamings.
2124
4853031e
MP
21252015-04-24 Marek Polacek <polacek@redhat.com>
2126
2127 PR c/65830
2128 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
2129 and OPT_Wshift_count_overflow.
2130
8c2b7f79
MP
2131 PR c/63357
2132 * c-common.c (warn_logical_operator): Warn if the operands have the
2133 same expressions.
2134
b8787813
MP
21352015-04-24 Marek Polacek <polacek@redhat.com>
2136
2137 PR c/61534
2138 * c-common.c (warn_logical_operator): Bail if either operand comes
2139 from a macro expansion.
2140
8fba1830
BRF
21412015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
2142
2143 PR target/55143
2144 * c-common.c (c_default_pointer_mode): Add definition.
2145 * c-common.h (c_default_pointer_mode): Add declaration.
2146
17958621
JJ
21472015-03-11 Jakub Jelinek <jakub@redhat.com>
2148
2149 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
2150 on record_builtin_type argument.
2151
7ccb1a11
JJ
21522015-03-10 Jakub Jelinek <jakub@redhat.com>
2153
2154 PR c/65120
2155 * c-common.c (warn_logical_not_parentheses): Don't warn for
2156 !x == 0 or !x != 0.
2157
04fd785e
MP
21582015-03-07 Marek Polacek <polacek@redhat.com>
2159
2160 PR sanitizer/65280
2161 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
2162 before trying to figure out whether we have a flexible array member.
2163
a4e26206
EB
21642015-03-06 Eric Botcazou <ebotcazou@adacore.com>
2165 Jonathan Wakely <jwakely.gcc@gmail.com>
2166
2167 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
2168
0d2489f4
EB
21692015-03-05 Eric Botcazou <ebotcazou@adacore.com>
2170
2171 PR ada/65319
2172 * c-ada-spec.c (print_destructor): Remove obsolete code.
2173
83ed54d7
EB
21742015-03-01 Eric Botcazou <ebotcazou@adacore.com>
2175
2176 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
2177 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
2178 DECL_TEMPLATE_RESULT emulations.
2179 (dump_ada_template)): Add guard for TYPE_METHODS.
2180
7631f0e2
MP
21812015-02-27 Marek Polacek <polacek@redhat.com>
2182
2183 PR c/65040
2184 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
2185
d1783ae5
KT
21862015-02-27 Kai Tietz <ktietz@redhat.com>
2187
2188 PR c/35330
2189 * c-pragma.c (handle_pragma_weak): Do not try to create
2190 weak/alias of declarations not being function, or variable
2191 declarations.
2192
56a9f6bc
TS
21932015-02-24 Thomas Schwinge <thomas@codesourcery.com>
2194
2195 PR libgomp/64625
2196 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
2197 Remove macros.
2198 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
2199
3d5cb23d
MP
22002015-02-16 Marek Polacek <polacek@redhat.com>
2201
2202 PR c/65066
2203 * c-format.c (check_format_types): Handle null param.
2204
fa008882
MP
22052015-02-13 Marek Polacek <polacek@redhat.com>
2206
2207 PR c/65040
2208 * c-format.c (check_format_types): Don't warn about different
2209 signedness if the original value is in the range of WANTED_TYPE.
2210
785f21af
JM
22112015-02-12 Jason Merrill <jason@redhat.com>
2212
2213 PR c++/64956
2214 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
2215 to the current highest version.
2216 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
2217
4886ec8e
JJ
22182015-02-04 Jakub Jelinek <jakub@redhat.com>
2219
2220 PR c/64824
2221 PR c/64868
2222 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
2223 instead of RDIV_EXPR. Use build_binary_op instead of
2224 build2_loc.
2225
40fecdd6
JM
22262015-01-30 Joseph Myers <joseph@codesourcery.com>
2227
2228 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
2229 to pass input_location as first argument.
2230
a0c88d06
TV
22312015-01-23 Tom de Vries <tom@codesourcery.com>
2232
2233 PR libgomp/64672
2234 * c.opt (fopenacc): Mark as LTO option.
2235
1506ae0e
TV
22362015-01-23 Tom de Vries <tom@codesourcery.com>
2237
2238 PR libgomp/64707
2239 * c.opt (fopenmp): Mark as LTO option.
2240
31be63ab
JJ
22412015-01-21 Jakub Jelinek <jakub@redhat.com>
2242
2243 PR c/63307
b1726d6c 2244 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
2245 (compare_decls): Fix up formatting.
2246
22472015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
2248
2249 PR c/63307
2250 * cilk.c: Include vec.h.
2251 (struct cilk_decls): New structure.
2252 (wrapper_parm_cb): Split this function to...
2253 (fill_decls_vec): ...this...
2254 (create_parm_list): ...and this.
2255 (compare_decls): New function.
2256 (for_local_cb): Remove.
2257 (wrapper_local_cb): Ditto.
2258 (build_wrapper_type): For now first traverse and fill vector of
2259 declarations then sort it and then deal with sorted vector.
2260 (cilk_outline): Ditto.
2261 (declare_one_free_variable): Ditto.
2262
6875457f
JM
22632015-01-21 Jason Merrill <jason@redhat.com>
2264
2265 PR c++/64629
2266 * c-format.c (check_format_arg): Call decl_constant_value.
2267
185c9e56
ML
22682015-01-19 Martin Liska <mliska@suse.cz>
2269
2270 * c-common.c (handle_noicf_attribute): New function.
2271
41dbbb37
TS
22722015-01-15 Thomas Schwinge <thomas@codesourcery.com>
2273 Bernd Schmidt <bernds@codesourcery.com>
2274 James Norris <jnorris@codesourcery.com>
2275 Cesar Philippidis <cesar@codesourcery.com>
2276 Ilmir Usmanov <i.usmanov@samsung.com>
2277 Jakub Jelinek <jakub@redhat.com>
2278
2279 * c.opt (fopenacc): New option.
2280 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
2281 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
2282 New macros.
2283 * c-common.h (c_finish_oacc_wait): New prototype.
2284 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
2285 (c_finish_oacc_wait): New function.
2286 * c-pragma.c (oacc_pragmas): New variable.
2287 (c_pp_lookup_pragma, init_pragma): Handle it.
2288 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
2289 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
2290 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
2291 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
2292 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
2293 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
2294 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
2295 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
2296 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
2297 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
2298 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
2299 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
2300 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
2301 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
2302 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
2303 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
2304 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
2305 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
2306 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
2307 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
2308 PRAGMA_OACC_CLAUSE_WORKER.
2309
3f8257db 23102015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
2311
2312 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
2313 for the new option fstack-protector_explicit.
2314 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
2315 (handle_stack_protect_attribute): New function.
2316
3f8257db 23172015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
2318
2319 * c.opt: New option -Warray-bounds=.
2320
adfac8df
JJ
23212015-01-09 Michael Collison <michael.collison@linaro.org>
2322
2323 * array-notation-common.c: Include hash-set.h, machmode.h,
2324 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2325 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
2326 * c-ada-spec.c: Ditto.
2327 * c-cilkplus.c: Ditto.
2328 * c-common.c: Include input.h due to flattening of tree.h.
2329 Define macro GCC_C_COMMON_C.
2330 * c-common.h: Flatten tree.h header files into c-common.h.
2331 Remove include of tree-core.h.
2332 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
2333 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2334 fold-const.h, wide-int.h, and inchash.h due to
2335 flattening of tree.h.
2336 * c-dump.c: Ditto.
2337 * c-format.c: Flatten tree.h header files into c-common.h.
2338 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
2339 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2340 fold-const.h, wide-int.h, and inchash.h due to
2341 flattening of tree.h.
2342 * c-dump.c: Include hash-set.h, machmode.h,
2343 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2344 fold-const.h, wide-int.h, and inchash.h due to
2345 flattening of tree.h.
2346 * c-format.c: Include hash-set.h, machmode.h,
2347 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2348 fold-const.h, wide-int.h, inchash.h and real.h due to
2349 flattening of tree.h.
2350 * c-gimplify.c: Include hash-set.h, machmode.h,
2351 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2352 fold-const.h, wide-int.h, and inchash.h due to
2353 flattening of tree.h.
2354 * cilk.c: Ditto.
2355 * c-lex.c: Ditto.
2356 * c-omp.c: Ditto.
2357 * c-opts.c: Ditto.
2358 * c-pch.c: Ditto.
2359 * c-ppoutput.c: Ditto.
2360 * c-pragma.c: Ditto.
2361 * c-pretty-print.c: Ditto.
2362 * c-semantics.c: Ditto.
2363 * c-ubsan.c: Ditto.
2364 * stub-objc.c: Ditto.
2365
f5481fc4
JM
23662015-01-08 Jason Merrill <jason@redhat.com>
2367
2368 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
2369 do_ubsan_in_current_function.
2370 (ubsan_maybe_instrument_reference_or_call): Likewise.
2371 * c-ubsan.h: Declare it.
2372
de35aa66
MS
23732015-01-08 Mike Stump <mikestump@comcast.net>
2374
2375 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
2376
4a9a42ab
MP
23772015-01-07 Marek Polacek <polacek@redhat.com>
2378
2379 PR c/64440
2380 * c-common.c (c_fully_fold_internal): Warn for division and modulo
2381 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
2382
2f42e5de
TS
23832015-01-05 Trevor Saunders <tsaunders@mozilla.com>
2384
2385 PR c++/31397
2386 * c.opt (Wsuggest-override): New option.
2387
5624e564
JJ
23882015-01-05 Jakub Jelinek <jakub@redhat.com>
2389
2390 Update copyright years.
2391
5bd012f8
MP
23922015-01-05 Marek Polacek <polacek@redhat.com>
2393
2394 PR c/64423
2395 * c-common.c (warn_array_subscript_with_type_char): Add location_t
2396 parameter. Use it.
2397 * c-common.h (warn_array_subscript_with_type_char): Update
2398 declaration.
2399
a7fa8d18
ESR
24002014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
2401
2402 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
2403 Control macro with flag_sized_deallocation.
2404
3f8257db 24052014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
2406
2407 * c.opt (Wdiscarded-array-qualifiers): New option.
2408
1f8d3e84
JJ
24092014-12-19 Jakub Jelinek <jakub@redhat.com>
2410
2411 PR preprocessor/63831
2412 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
2413 and __has_cpp_attribute here.
2414 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
2415 c_common_has_attribute.
2416 * c-common.h (c_common_has_attribute): New prototype.
2417 * c-lex.c (init_c_lex): Set cb->has_attribute to
2418 c_common_has_attribute instead of cb_has_attribute.
2419 (get_token_no_padding): New function.
2420 (cb_has_attribute): Renamed to ...
2421 (c_common_has_attribute): ... this. No longer static. Use
2422 get_token_no_padding, require ()s, don't build TREE_LIST
2423 unnecessarily, fix up formatting, adjust diagnostics, call
2424 init_attributes.
2425
20b06add
JM
24262014-12-15 Jason Merrill <jason@redhat.com>
2427
2428 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
2429 (-Wsized-deallocation): New.
2430 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
2431 to on in C++14 and up.
2432
94a073b2
JM
24332014-12-11 Jason Merrill <jason@redhat.com>
2434
acaa5911
JM
2435 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
2436
94a073b2
JM
2437 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
2438 we aren't complaining about VLAs.
2439
7fb66c15
MP
24402014-12-06 Marek Polacek <polacek@redhat.com>
2441
2442 PR tree-optimization/64183
2443 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
2444 shift-expression if it is integer_type_node. Use types_compatible_p.
2445
b731b390
JJ
24462014-11-29 Jakub Jelinek <jakub@redhat.com>
2447
2448 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
2449 last argument from create_tmp_var_raw and create_tmp_var calls.
2450 * cilk.c (gimplify_cilk_spawn): Likewise.
2451 * c-omp.c (c_finish_omp_atomic): Likewise.
2452
6a4da643
MP
24532014-11-28 Marek Polacek <polacek@redhat.com>
2454
2455 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
2456 instead of unsigned_type_node.
2457
541e35a6
MP
24582014-11-28 Marek Polacek <polacek@redhat.com>
2459
2460 PR c/63862
2461 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
2462 to op1_utype.
2463 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
2464 expression to unsigned_type_node.
2465
dcc97066
MW
24662014-11-20 Mark Wielaard <mjw@redhat.com>
2467
2468 PR debug/38757
2469 * c-opts.c (set_std_c89): Set lang_hooks.name.
2470 (set_std_c99): Likewise.
2471 (set_std_c11): Likewise.
2472 (set_std_cxx98): Likewise.
2473 (set_std_cxx11): Likewise.
2474 (set_std_cxx14): Likewise.
2475 (set_std_cxx1z): Likewise.
2476
aa7da51a
JJ
24772014-11-21 Jakub Jelinek <jakub@redhat.com>
2478
2479 PR target/63764
2480 * c-common.h (convert_vector_to_pointer_for_subscript): Change
2481 return type to bool.
009a3480 2482 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
2483 (convert_vector_to_pointer_for_subscript): Change return type to
2484 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
2485 and copy it into a TARGET_EXPR and use that instead of *vecp
2486 directly.
2487
538dd0b7
DM
24882014-11-19 David Malcolm <dmalcolm@redhat.com>
2489
2490 Merger of git branch "gimple-classes-v2-option-3".
2491 * ChangeLog.gimple-classes: New.
2492 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
2493 from being just a vec<gimple> to a vec<gbind *>.
2494
c39a5e99
JJ
24952014-11-18 Jakub Jelinek <jakub@redhat.com>
2496
2497 PR sanitizer/63813
2498 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
2499 argument to ptype, set type to TREE_TYPE (ptype). Don't call
2500 get_pointer_alignment for non-pointers. Use ptype, or if it is
2501 reference type, corresponding pointer type, as type of kind
2502 argument.
2503 (ubsan_maybe_instrument_reference,
2504 ubsan_maybe_instrument_member_call): Adjust callers.
2505
8537a4a9
MP
25062014-11-15 Marek Polacek <polacek@redhat.com>
2507
2508 PR middle-end/63884
2509 * array-notation-common.c (is_sec_implicit_index_fn): Return false
2510 for NULL fndecl.
2511 (extract_array_notation_exprs): Return for NULL node.
2512
2079956a
JM
25132014-11-12 Joseph Myers <joseph@codesourcery.com>
2514
2515 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
2516 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
2517
1304953e
JJ
25182014-11-12 Jakub Jelinek <jakub@redhat.com>
2519
2520 PR c/59708
2521 * c-common.c (check_builtin_function_arguments): Handle
2522 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
2523
e5e44252
AK
25242014-11-10 Andi Kleen <ak@linux.intel.com>
2525
2526 PR c/60804
2527 * c-common.h (check_no_cilk): Declare.
2528 * cilk.c (get_error_location): New function.
2529 (check_no_cilk): Dito.
2530
e64b984d
AK
25312014-11-10 Andi Kleen <ak@linux.intel.com>
2532
2533 * cilk.c (recognize_spawn): Use expression location
2534 for error message.
2535
13c21655
PC
25362014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
2537
2538 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
2539
42fd12b1
ESR
25402014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
2541
2542 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
2543 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
2544 (__cpp_range_based_for, __cpp_initializer_lists,
2545 __cpp_delegating_constructors, __cpp_nsdmi,
2546 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
2547 for C++11; (__cpp_attribute_deprecated): Remove in favor of
2548 __has_cpp_attribute.
2549 * c-lex.c (cb_has_attribute): New callback CPP function;
2550 (init_c_lex): Set has_attribute callback.
2551
6f450181
RB
25522014-11-04 Richard Biener <rguenther@suse.de>
2553
2554 * c-common.c (shorten_compare): Do not shorten mixed
2555 DFP and non-DFP compares.
2556
26f0e1d6
ESR
25572014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
2558
2559 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
2560 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
2561 Commentary and rearrangement of tests.
2562 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
2563 Commentary and rearrangement of tests.
2564 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto
2565 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
2566
ef4bddc2
RS
25672014-10-29 Richard Sandiford <richard.sandiford@arm.com>
2568
2569 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
2570 enum from machine_mode.
2571
c582198b
AM
25722014-10-28 Andrew MacLeod <amacleod@redhat.com>
2573
adfac8df
JJ
2574 * c-common.c: Adjust include files.
2575 * c-gimplify.c: Ditto.
2576 * cilk.c: Ditto.
2577 * c-pragma.c: Ditto.
2578 * c-ubsan.c: Ditto.
c582198b 2579
60393bbc
AM
25802014-10-27 Andrew MacLeod <amacleod@redhat.com>
2581
2582 * c-gimplify.c: Adjust include files.
2583
d723bb7c
MLI
25842014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
2585
2586 PR c++/53061
2587 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
2588 c_common_initialize_diagnostics.
2589 * c-common.h: Likewise.
2590
90f3520e
MP
25912014-10-24 Marek Polacek <polacek@redhat.com>
2592
2593 PR c/56980
2594 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
2595 print "struct"/"union"/"enum" for typedefed names.
2596
59d7607a
MP
25972014-10-23 Marek Polacek <polacek@redhat.com>
2598
2599 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
2600 in unsigned type.
2601
d95a2703
JJ
26022014-10-22 Jakub Jelinek <jakub@redhat.com>
2603 Yury Gribov <y.gribov@samsung.com>
2604
2605 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
2606 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
2607 instead of flag_sanitize_recover as bool flag.
2608
8e6ef852
KY
26092014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
2610
2611 * cilk.c: Revert previous change.
2612
948cf550
IZ
26132014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
2614
2615 PR c/63307
2616 * cilk.c: Include vec.h.
2617 (struct cilk_decls): New structure.
2618 (wrapper_parm_cb): Split this function to...
2619 (fill_decls_vec): ...this...
2620 (create_parm_list): ...and this.
2621 (compare_decls): New function.
2622 (for_local_cb): Remove.
2623 (wrapper_local_cb): Ditto.
2624 (build_wrapper_type): For now first traverse and fill vector of
2625 declarations then sort it and then deal with sorted vector.
2626 (cilk_outline): Ditto.
2627 (declare_one_free_variable): Ditto.
2628
92574c7c
MP
26292014-10-17 Marek Polacek <polacek@redhat.com>
2630
2631 * c-opts.c (c_common_post_options): Set warn_implicit_int.
2632 * c.opt (Wimplicit-int): Initialize to -1.
2633
83685514
AM
26342014-10-16 Andrew MacLeod <amacleod@redhat.com>
2635
2636 * c-pragma.c: Adjust include files.
2637 * c-semantics.c: Likewise.
2638
5b8300ea
DD
26392014-10-16 DJ Delorie <dj@redhat.com>
2640
2641 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
2642 multiples of bytes.
2643
5f83e90b
JM
26442014-10-14 Jason Merrill <jason@redhat.com>
2645
2646 PR c++/63455
2647 * c-common.h (CPP_PREPARSED_EXPR): New.
2648 (N_CP_TTYPES): Adjust.
2649
d73326ca
MP
26502014-10-15 Marek Polacek <polacek@redhat.com>
2651
2652 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
2653
78a7c317
DD
26542014-10-14 DJ Delorie <dj@redhat.com>
2655
2656 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
2657 types, not just __int128.
2658 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
2659 types, not just __int128.
2660 (cpp_atomic_builtins): Round pointer sizes up.
2661 (type_suffix): Use type precision, not specific types.
2662 * c-common.c (c_common_reswords): Remove __int128 special case.
2663 (c_common_type_for_size): Check for all __intN types, not just
2664 __int128.
2665 (c_common_type_for_mode): Likewise.
2666 (c_common_signed_or_unsigned_type): Likewise.
2667 (c_build_bitfield_integer_type): Likewise.
2668 (c_common_nodes_and_builtins): Likewise.
2669 (keyword_begins_type_specifier): Likewise.
2670 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
2671 __intN variants.
2672
2a22f99c
TS
26732014-10-12 Trevor Saunders <tsaunders@mozilla.com>
2674
2675 * c-common.c: Use hash_table instead of hashtab.
2676
2a8ef767
ESR
26772014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
2678
adfac8df 2679 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
2680 C++11 section.
2681
3c9aabbd
MG
26822014-10-03 Marc Glisse <marc.glisse@inria.fr>
2683
2684 PR c++/54427
2685 PR c++/57198
2686 PR c++/58845
2687 * c-common.c (warn_logical_operator): Punt for vectors.
2688
a15f7cb8
ESR
26892014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
2690
2691 Implement SD-6: SG10 Feature Test Recommendations
2692 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
2693 macros and the __has_header macro.
2694
8d0cf15e
JM
26952014-09-30 Jason Merrill <jason@redhat.com>
2696
dd5d5481
JM
2697 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
2698 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
2699 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
2700
b752325e
JM
2701 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
2702 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
2703
8d0cf15e
JM
2704 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
2705 * c-common.c (c_common_reswords): Remove __is_convertible_to.
2706
083e891e
MP
27072014-09-24 Marek Polacek <polacek@redhat.com>
2708
2709 PR c/61405
2710 PR c/53874
2711 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
2712
7861b648
AK
27132014-09-23 Andi Kleen <ak@linux.intel.com>
2714
2715 * c-common.c (handle_no_reorder_attribute): New function.
2716 (c_common_attribute_table): Add no_reorder attribute.
2717
9a79452d
JM
27182014-09-22 Joseph Myers <joseph@codesourcery.com>
2719
2720 * c-cppbuiltin.c (c_cpp_builtins): Define
2721 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
2722 modes.
2723
dd69f047
JM
27242014-09-18 Joseph Myers <joseph@codesourcery.com>
2725
2726 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
2727 for supported floating-point modes.
2728
737a4826
MLI
27292014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
2730
2731 * c.opt (Wpsabi): Use LangEnabledBy.
2732 * c-opts.c (c_common_handle_option): Do not handle here.
2733
8cc4b7a2
JM
27342014-09-12 Joseph Myers <joseph@codesourcery.com>
2735
2736 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
2737 macros for floating-point modes.
2738
179b5a55
MG
27392014-09-11 Marc Glisse <marc.glisse@inria.fr>
2740
2741 PR target/58757
2742 * c-cppbuiltin.c (builtin_define_float_constants): Correct
2743 __*_DENORM_MIN__ without denormals.
2744
570a11fe
JJ
27452014-09-10 Jakub Jelinek <jakub@redhat.com>
2746
2747 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
2748 ubsan_instrument_vla, ubsan_instrument_return): Adjust
2749 ubsan_create_data callers.
2750 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
2751 index is constant or BIT_AND_EXPR with constant mask and is
2752 small enough for the bound.
2753 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
2754 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
2755
b559c810
MLI
27562014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
2757
2758 * c.opt: Add CppReason to various flags.
2759 (Wdate-time): Re-sort.
2760 * c-common.c: Include c-common.h earlier.
2761 (struct reason_option_codes_t): Delete.
2762 (c_option_controlling_cpp_error): Prefix global type and struct
2763 with cpp_.
2764
1ef33fd4
MLI
27652014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
2766
2767 * c.opt (Wnormalized): New.
2768 (Wnormalized=): Use Enum and Reject Negative.
2769 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
2770
66bb34c0
JM
27712014-09-08 Joseph Myers <joseph@codesourcery.com>
2772
2773 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
2774 digits of floating-point modes if -fbuilding-libgcc.
2775
53d68b9f
JM
27762014-09-05 Joseph Myers <joseph@codesourcery.com>
2777
2778 * c-cppbuiltin.c (c_cpp_builtins): Also define
2779 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
2780 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
2781 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
2782 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
2783 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
2784 __LIBGCC_STACK_GROWS_DOWNWARD__,
2785 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
2786 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
2787 __LIBGCC_DWARF_FRAME_REGISTERS__,
2788 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
2789 __LIBGCC_STACK_POINTER_REGNUM__ and
2790 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
2791 (builtin_define_with_value): Handle backslash-escaping in string
2792 macro values.
2793
f65586dc
RB
27942014-09-05 Richard Biener <rguenther@suse.de>
2795
2796 PR middle-end/63148
2797 * c-format.c (check_format_arg): Properly handle
2798 effectively signed POINTER_PLUS_EXPR offset.
2799
2b71f4a4
MLI
28002014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
2801
2802 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
2803 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
2804 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
2805 and Init.
2806 * c-opts.c (c_common_handle_option): Do not handle here.
2807 (sanitize_cpp_opts): Likewise.
2808 * c-common.c (struct reason_option_codes_t): Handle
2809 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
2810
d2e4feca
MP
28112014-09-03 Marek Polacek <polacek@redhat.com>
2812
2813 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
2814
9a771876
JJ
28152014-09-02 Jakub Jelinek <jakub@redhat.com>
2816 Balaji V. Iyer <balaji.v.iyer@intel.com>
2817 Igor Zamyatin <igor.zamyatin@intel.com>
2818
2819 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
2820 * c-common.c (c_common_reswords): Added _Cilk_for.
2821 * c-common.h (enum rid): Added RID_CILK_FOR.
2822 (cilk_for_number_of_iterations): Add declaration.
2823 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
2824 CILK_FOR.
2825 * c-pragma.c (init_pragma): Register "grainsize" pragma.
2826 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
2827
81b5d104
MLI
28282014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2829
2830 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
2831 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
2832 Wundef): Use CPP, Var and Init.
2833 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
2834
b753b37b
MLI
28352014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2836
2837 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
2838 * c-opts.c (c_common_handle_option): Do not handle here.
2839
028aee17
JM
28402014-08-25 Jason Merrill <jason@redhat.com>
2841
2842 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
2843 -std=c++14 and -std=gnu++14, rather than the reverse.
2844 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
2845 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
2846 * c-common.h (cxx_dialect): Remove cxx1y.
2847
e4276ba5
ESR
28482014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
2849
2850 * c-common.h (enum cxx_dialect): Add cxx14.
2851 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
2852 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
2853 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
2854
a545cacd
JM
28552014-08-22 Jason Merrill <jason@redhat.com>
2856
2857 * c.opt (std=gnu++17): Fix alias.
2858
59ea0364
MP
28592014-08-22 Marek Polacek <polacek@redhat.com>
2860
2861 PR c++/62199
2862 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
2863 check for vector types. Drop LHS argument.
2864 * c-common.h (warn_logical_not_parentheses): Adjust.
2865
596e808c
MLI
28662014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
2867
2868 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
2869 (Wmultichar): Likewise.
2870 (Wdate-time): Use C-family languages instead of Common. Use CPP
2871 and Var.
2872 * c-opts.c (c_common_handle_option): Do not handle the above
2873 options here.
2874 (sanitize_cpp_opts): Likewise.
2875
18767f65
MLI
28762014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
2877
2878 PR fortran/44054
2879 * c-opts.c: Include tree-diagnostics.h.
2880 (c_diagnostic_finalizer): New.
2881 (c_common_initialize_diagnostics): Use it.
2882
b4413594
MLI
28832014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
2884
2885 PR preprocessor/51303
2886 * c-common.c (struct reason_option_codes_t option_codes):
2887 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
2888
43f9a13c
MLI
28892014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
2890
2891 PR c/60975
2892 PR c/53063
2893 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
2894 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
2895 (c_common_post_options): Call init_global_opts_from_cpp.
2896 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
2897
04159acf
MP
28982014-08-19 Marek Polacek <polacek@redhat.com>
2899
2900 PR c++/62153
2901 * c-common.c (maybe_warn_bool_compare): New function.
2902 * c-common.h (maybe_warn_bool_compare): Declare.
2903 * c.opt (Wbool-compare): New option.
2904
35aff4fb
MP
29052014-08-19 Marek Polacek <polacek@redhat.com>
2906
2907 * c.opt (Wc99-c11-compat): New option.
2908
177cce46
MP
29092014-08-19 Marek Polacek <polacek@redhat.com>
2910
2911 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
2912 to warn_c90_c99_compat.
2913 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
2914 to -1.
2915
6ae9194f
MLI
29162014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
2917 Steven Bosscher <steven@gcc.gnu.org>
2918
2919 PR c/52952
2920 * c-format.c: Add extra_arg_loc and format_string_loc to struct
2921 format_check_results.
2922 (check_function_format): Use true and add comment for boolean
2923 argument.
2924 (finish_dollar_format_checking): Use explicit location when warning.
2925 (check_format_info): Likewise.
2926 (check_format_arg): Set extra_arg_loc and format_string_loc.
2927 (check_format_info_main): Use explicit location when warning.
2928 (check_format_types): Pass explicit location.
2929 (format_type_warning): Likewise.
2930
8e54f6d3
MLI
29312014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
2932
2933 PR fortran/44054
2934 * c-format.c: Handle Fortran flags.
2935
cd4e76fc
IZ
29362014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
2937
2938 PR other/61962
2939 * array-notation-common.c (find_rank): Added handling for other
2940 types of references.
2941
f3bede71
MP
29422014-08-10 Marek Polacek <polacek@redhat.com>
2943
2944 PR c/51849
2945 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
2946 * c.opt (Wc90-c99-compat): Add option.
2947
9f25a338
TS
29482014-08-07 Trevor Saunders <tsaunders@mozilla.com>
2949
2950 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
2951
62e4eb35
MP
29522014-08-03 Marek Polacek <polacek@redhat.com>
2953
2954 * c-common.c (check_case_value): Add location_t parameter. Use it.
2955 (c_add_case_label): Pass loc to check_case_value.
2956
b787e7a2
TS
29572014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2958
2959 * cilk.c: Use hash_map instead of pointer_map.
2960
6e2830c3
TS
29612014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2962
2963 * c-gimplify.c: Use hash_set instead of pointer_set.
2964
a7ee52fb
IZ
29652014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
2966
2967 PR middle-end/61455
2968 * array-notation-common.c (extract_array_notation_exprs): Handling
2969 of DECL_EXPR added.
2970
944fa280
JJ
29712014-08-01 Jakub Jelinek <jakub@redhat.com>
2972
2973 * c-common.h (min_align_of_type): Removed prototype.
2974 * c-common.c (min_align_of_type): Removed.
2975 * c-ubsan.h (ubsan_maybe_instrument_reference,
2976 ubsan_maybe_instrument_member_call): New prototypes.
2977 * c-ubsan.c: Include stor-layout.h and builtins.h.
2978 (ubsan_maybe_instrument_reference_or_call,
2979 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
2980 functions.
2981
b4dfdc11
MG
29822014-07-31 Marc Glisse <marc.glisse@inria.fr>
2983
2984 PR c++/60517
2985 * c.opt (-Wreturn-local-addr): Move to common.opt.
2986
a41844e5
JM
29872014-07-30 Jason Merrill <jason@redhat.com>
2988
2989 PR c++/61659
2990 PR c++/61687
2991 Revert:
2992 * c.opt (-fuse-all-virtuals): New.
2993
976d5a22
TT
29942014-07-30 Tom Tromey <tromey@redhat.com>
2995
2996 PR c/59855
2997 * c.opt (Wdesignated-init): New option.
2998 * c-common.c (c_common_attribute_table): Add "designated_init".
2999 (handle_designated_init): New function.
3000
cdc94aca
MP
30012014-07-24 Marek Polacek <polacek@redhat.com>
3002
3003 PR c/57653
3004 * c-opts.c (c_finish_options): If -imacros is in effect, return.
3005
f41373b6
DS
30062014-07-16 Dodji Seketeli <dodji@redhat.com>
3007
3008 PR preprocessor/60723 - missing system-ness marks for macro tokens
3009 * c-ppoutput.c (struct print::prev_was_system_token): New data
3010 member.
3011 (init_pp_output): Initialize it.
3012 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
3013 (do_line_change): Return a flag saying if a line marker was
3014 emitted or not.
3015 (scan_translation_unit): Detect if the system-ness of the token we
3016 are about to emit is different from the one of the previously
3017 emitted token. If so, emit a line marker. Avoid emitting useless
3018 adjacent line markers. Avoid emitting line markers for tokens
3019 originating from the expansion of built-in macros.
3020 (scan_translation_unit_directives_only): Adjust.
3021
4d661eaa
MP
30222014-07-15 Marek Polacek <polacek@redhat.com>
3023
3024 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
3025 TYPE_MAX_VALUE is NULL.
3026
b108f48f
JJ
30272014-07-14 Jakub Jelinek <jakub@redhat.com>
3028
3029 PR middle-end/61294
3030 * c.opt (Wmemset-transposed-args): New warning.
3031
c0221884
JM
30322014-07-10 Jason Merrill <jason@redhat.com>
3033
3034 PR c++/61659
3035 PR c++/61687
3036 * c.opt (-fuse-all-virtuals): New.
3037
63dfbb95
RB
30382014-07-09 Richard Biener <rguenther@suse.de>
3039
3040 PR c-family/61741
3041 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
3042 using unsigned arithmetic if overflow does not wrap instead of
3043 if overflow is undefined.
3044
773ec47f
MP
30452014-07-06 Marek Polacek <polacek@redhat.com>
3046
3047 PR c/6940
3048 * c.opt (Wsizeof-array-argument): New option.
3049
00a7ba58
JJ
30502014-07-03 Jakub Jelinek <jakub@redhat.com>
3051
b1726d6c 3052 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
3053 comments->count <= 1, as comments->entries might be NULL.
3054
52ec0ea3
MP
30552014-07-01 Marek Polacek <polacek@redhat.com>
3056
3057 * c.opt (Wint-conversion): New option.
3058
d5c3d343
MP
30592014-07-01 Marek Polacek <polacek@redhat.com>
3060
3061 PR c/58286
3062 * c.opt (Wincompatible-pointer-types): New option.
3063
6e7ceb17
PC
30642014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
3065
3066 PR c++/51400
3067 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
3068 Do not discard TYPE_QUALS of type.
3069
da73100b
JM
30702014-06-26 Jason Merrill <jason@redhat.com>
3071
3072 * c-common.h (enum cxx_dialect): Add cxx1z.
3073 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
3074 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
3075
08eedf75
TJ
30762014-06-26 Teresa Johnson <tejohnson@google.com>
3077
3078 * c-common.h (get_dump_info): Declare.
3079 * c-gimplify.c (c_genericize): Use saved dump files.
3080 * c-opts.c (c_common_parse_file): Begin and end dumps
3081 once around parsing invocation.
3082 (get_dump_info): New function.
3083
7b56b2f8
MP
30842014-06-23 Marek Polacek <polacek@redhat.com>
3085 Andrew MacLeod <amacleod@redhat.com>
3086
3087 PR c/61553
3088 * c-common.c (get_atomic_generic_size): Don't segfault if the
3089 type doesn't have a size.
3090
0e37a2f3
MP
30912014-06-20 Marek Polacek <polacek@redhat.com>
3092
3093 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
3094 (ubsan_walk_array_refs_r): New function.
3095 (c_genericize): Instrument array bounds.
3096 * c-ubsan.c: Include "internal-fn.h".
3097 (ubsan_instrument_division): Mark instrumented arrays as having
3098 side effects. Adjust ubsan_type_descriptor call.
3099 (ubsan_instrument_shift): Likewise.
3100 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
3101 (ubsan_instrument_bounds): New function.
3102 (ubsan_array_ref_instrumented_p): New function.
3103 (ubsan_maybe_instrument_array_ref): New function.
3104 * c-ubsan.h (ubsan_instrument_bounds): Declare.
3105 (ubsan_array_ref_instrumented_p): Declare.
3106 (ubsan_maybe_instrument_array_ref): Declare.
3107
31082014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
3109
3110 PR lto/61123
3111 * c.opt (fshort-enums): Add to LTO.
3112 * c.opt (fshort-wchar): Likewise.
3113
5c3d09f7
MP
31142014-06-16 Marek Polacek <polacek@redhat.com>
3115
3116 PR c/60439
3117 * c.opt (Wswitch-bool): Add Var.
3118
9cf32741
JJ
31192014-06-12 Jakub Jelinek <jakub@redhat.com>
3120
3121 PR middle-end/61486
3122 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
3123 #pragma omp target teams or
3124 #pragma omp {,target }teams distribute simd.
3125
62984918
JM
31262014-06-12 Jason Merrill <jason@redhat.com>
3127
3128 * c.opt (Wabi=, fabi-compat-version): New.
3129 * c-opts.c (c_common_handle_option): Handle -Wabi=.
3130 (c_common_post_options): Handle flag_abi_compat_version default.
3131 Disallow -fabi-compat-version=1.
3132 * c-common.h (abi_version_crosses): New.
3133
f961457f
JH
31342014-06-11 Jan Hubicka <hubicka@ucw.cz>
3135
adfac8df 3136 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
3137 section names that are no longer trees.
3138
92d28cbb
JJ
31392014-06-10 Jakub Jelinek <jakub@redhat.com>
3140
3141 PR fortran/60928
3142 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
3143 (omp_pragmas): ... back here.
3144
742938c9
MP
31452014-06-05 Marek Polacek <polacek@redhat.com>
3146
3147 PR c/49706
3148 * c-common.c (warn_logical_not_parentheses): New function.
3149 * c-common.h (warn_logical_not_parentheses): Declare.
3150 * c.opt (Wlogical-not-parentheses): New option.
3151
9d548dfb
MP
31522014-06-04 Marek Polacek <polacek@redhat.com>
3153
3154 PR c/30020
3155 * c-common.c (check_case_bounds): Add location parameter.
3156 Use it.
3157 (c_add_case_label): Pass loc to check_case_bounds.
3158
fedfecef
MP
31592014-06-03 Marek Polacek <polacek@redhat.com>
3160
3161 PR c/60439
3162 * c.opt (Wswitch-bool): New option.
3163
f6a7cffc
TS
31642014-05-22 Thomas Schwinge <thomas@codesourcery.com>
3165
040d18b6
TS
3166 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
3167 Remove prototypes.
3168 (record_types_used_by_current_var_decl): Move prototype to where
3169 it belongs.
3170
f6a7cffc
TS
3171 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
3172 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
3173 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
3174
632f2871
RS
31752014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
3176
3177 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
3178 * c-common.c (c_common_nodes_and_builtins): Don't initialize
3179 void_zero_node.
3180 * c-pretty-print.c (pp_c_void_constant): New function.
3181 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
3182 (c_pretty_printer::expression): Handle VOID_CST.
3183 * cilk.c (extract_free_variables): Likewise.
3184 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
3185 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
3186
766090c2
TS
31872014-05-17 Trevor Saunders <tsaunders@mozilla.com>
3188
3189 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
3190 * c-pragma.c (push_alignment): Adjust.
3191 (handle_pragma_push_options): Likewise.
3192
661a0813
MP
31932014-05-09 Marek Polacek <polacek@redhat.com>
3194
3195 PR c/50459
3196 * c-common.c (check_user_alignment): Return -1 if alignment is error
3197 node.
3198 (handle_aligned_attribute): Don't call default_conversion on
3199 FUNCTION_DECLs.
3200 (handle_vector_size_attribute): Likewise.
3201 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
3202 (handle_sentinel_attribute): Call default_conversion and allow even
3203 integral types as an argument.
3204
2793eeab
MP
32052014-05-08 Marek Polacek <polacek@redhat.com>
3206
3207 PR c/61053
3208 * c-common.c (min_align_of_type): New function factored out from...
3209 (c_sizeof_or_alignof_type): ...here.
3210 * c-common.h (min_align_of_type): Declare.
3211
f827930a
MP
32122014-05-08 Marek Polacek <polacek@redhat.com>
3213
3214 PR c/61077
3215 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
3216 parameter type of main.
3217
ca49b74e
DD
32182014-05-07 DJ Delorie <dj@redhat.com>
3219
3220 * c-cppbuiltin.c (print_bits_of_hex): New.
3221 (builtin_define_type_minmax): Print values using hex so as not to
3222 require a pre-computed list of string values.
3223
1d60af08
KZ
32242014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
3225 Mike Stump <mikestump@comcast.net>
3226 Richard Sandiford <rdsandiford@googlemail.com>
3227
3228 * c-ada-spec.c: Include wide-int.h.
3229 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
3230 (dump_generic_ada_node): Use wide-int interfaces.
3231 * c-common.c: Include wide-int-print.h.
3232 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
3233 (pointer_int_sum): Use wide-int interfaces.
3234 (c_common_nodes_and_builtins): Use make_int_cst.
3235 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
3236 (handle_alloc_size_attribute): Use wide-int interfaces.
3237 (get_nonnull_operand): Likewise.
3238 * c-format.c (get_constant): Use tree_fits_uhwi_p.
3239 * c-lex.c: Include wide-int.h.
3240 (narrowest_unsigned_type): Take a widest_int rather than two
3241 HOST_WIDE_INTs.
3242 (narrowest_signed_type): Likewise.
3243 (interpret_integer): Update accordingly. Use wide-int interfaces.
3244 (lex_charconst): Use wide-int interfaces.
3245 * c-pretty-print.c: Include wide-int.h.
3246 (pp_c_integer_constant): Use wide-int interfaces.
3247 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
3248 INT_CST_LT_UNSIGNED.
3249
b15458be
RB
32502014-05-06 Richard Biener <rguenther@suse.de>
3251
3252 * c-opts.c (c_common_post_options): For -freestanding,
3253 -fno-hosted and -fno-builtin disable pattern recognition
3254 if not enabled explicitely.
3255
6577374e
MP
32562014-05-02 Marek Polacek <polacek@redhat.com>
3257
3258 * c.opt (Wsizeof-pointer-memaccess): Describe option.
3259
d00887e8
MP
32602014-05-01 Marek Polacek <polacek@redhat.com>
3261
3262 PR c/43245
3263 * c.opt (Wdiscarded-qualifiers): Add.
3264
f8ed5150
MP
32652014-04-30 Marek Polacek <polacek@redhat.com>
3266
3267 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
3268 INT_MIN / -1 sanitization only for integer types.
3269
45484dcf
MP
32702014-04-25 Marek Polacek <polacek@redhat.com>
3271
3272 PR c/18079
3273 * c-common.c (handle_noinline_attribute): Warn if the attribute
3274 conflicts with always_inline attribute.
3275 (handle_always_inline_attribute): Warn if the attribute conflicts
3276 with noinline attribute.
3277
38e514c0
MP
32782014-04-25 Marek Polacek <polacek@redhat.com>
3279
3280 PR c/60156
3281 * c-common.c (check_main_parameter_types): Warn about variadic main.
3282
44875f92
MS
32832014-04-24 Mike Stump <mikestump@comcast.net>
3284
3285 * c.opt (Wshadow-ivar): Default to on.
3286
dcaaa5a0
DP
32872014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
3288
3289 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
3290
c07d7c02
MP
32912014-04-23 Marek Polacek <polacek@redhat.com>
3292
3293 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
3294
1c33c9b7
JJ
32952014-04-22 Jakub Jelinek <jakub@redhat.com>
3296
3297 PR sanitizer/60275
3298 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
3299 if flag_sanitize_undefined_trap_on_error.
3300 (ubsan_instrument_division, ubsan_instrument_shift,
3301 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
3302 if !flag_sanitize_recover.
3303
793c625f
MG
33042014-04-22 Marc Glisse <marc.glisse@inria.fr>
3305
3306 PR libstdc++/43622
3307 * c-common.c (registered_builtin_types): Make non-static.
3308 * c-common.h (registered_builtin_types): Declare.
3309
b0f1bf36
RB
33102014-04-14 Richard Biener <rguenther@suse.de>
3311 Marc Glisse <marc.glisse@inria.fr>
3312
3313 PR c/60819
3314 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
3315 apply may-alias the scalar pointer type when applicable.
3316
3b07fa4a
IZ
33172014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
3318
3319 PR middle-end/60467
3320 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
3321 as possible argument for Cilk_spawn.
3322
cbbd2b1c
TB
33232014-04-11 Tobias Burnus <burnus@net-b.de>
3324
3325 PR c/60194
3326 * c.opt (Wformat-signedness): Add
3327 * c-format.c(check_format_types): Use it.
3328
6415bd5d
JM
33292014-04-11 Jason Merrill <jason@redhat.com>
3330
3331 PR c++/57926
3332 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
3333 default_conversion for an array argument.
3334
6525783a
MP
33352014-04-08 Marek Polacek <polacek@redhat.com>
3336
3337 PR sanitizer/60745
3338 * c-ubsan.c: Include asan.h.
3339 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
3340
880a467b
NS
33412014-04-03 Nathan Sidwell <nathan@codesourcery.com>
3342
3343 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
3344
7b59ff2d
MP
33452014-04-02 Marek Polacek <polacek@redhat.com>
3346
3347 * c-common.h (c_expand_expr): Remove declaration.
3348
8edbfaa6
JJ
33492014-03-28 Jakub Jelinek <jakub@redhat.com>
3350
3351 PR c++/60689
3352 * c-common.c (add_atomic_size_parameter): When creating new
3353 params vector, push the size argument first.
3354
07d72e1d
JJ
33552014-03-26 Jakub Jelinek <jakub@redhat.com>
3356
3357 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
3358 ubsan_instrument_vla, ubsan_instrument_return): Adjust
3359 ubsan_create_data callers.
3360
b35e0fa0
JJ
33612014-03-22 Jakub Jelinek <jakub@redhat.com>
3362
3363 PR debug/60603
3364 * c-opts.c (c_finish_options): Restore cb_file_change call to
3365 <built-in>.
3366
39a1ebb3
JJ
33672014-03-13 Jakub Jelinek <jakub@redhat.com>
3368
3369 PR middle-end/36282
3370 * c-pragma.c (apply_pragma_weak): Only look at
3371 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
3372 DECL_ASSEMBLER_NAME_SET_P (decl).
3373 (maybe_apply_pending_pragma_weaks): Exit early if
3374 vec_safe_is_empty (pending_weaks) rather than only when
3375 !pending_weaks.
3376 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
3377 set assembler name back to NULL afterwards.
3378
a07f6ed2
JM
33792014-03-11 Jason Merrill <jason@redhat.com>
3380
3381 * c.opt: Add -std=gnu++14.
3382
75b107f5
IB
33832014-03-11 Ian Bolton <ian.bolton@arm.com>
3384
3385 * c-opts.c (c_common_post_options): Don't override
3386 -ffp-contract=fast if unsafe-math-optimizations is on.
3387
f42c637e
PM
33882014-03-08 Paulo Matos <paulo@matos-sorge.com>
3389
3390 * c.opt: Enable LTO FE for fshort-double.
3391
70e24808
JM
33922014-03-07 Jason Merrill <jason@redhat.com>
3393
3394 * c.opt: Add -std=c++14.
3395
3af9c5e9
MP
33962014-03-06 Marek Polacek <polacek@redhat.com>
3397
3398 PR c/60197
3399 * cilk.c (contains_cilk_spawn_stmt): New function.
3400 (contains_cilk_spawn_stmt_walker): Likewise.
3401 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
3402 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
3403
b3bdf019
JJ
34042014-03-03 Jakub Jelinek <jakub@redhat.com>
3405
3406 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
3407 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
3408 even when flag_preprocess_only.
3409
ca7e759d
JM
34102014-02-26 Jason Merrill <jason@redhat.com>
3411
3412 PR c++/59231
3413 PR c++/11586
3414 * c-common.c (shorten_compare): Don't check
3415 c_inhibit_evaluation_warnings.
3416
28e41874
JJ
34172014-02-19 Jakub Jelinek <jakub@redhat.com>
3418
cca615af
JJ
3419 PR c/37743
3420 * c-common.c (c_common_nodes_and_builtins): When initializing
3421 c_uint{16,32,64}_type_node, also set corresponding
3422 uint{16,32,64}_type_node to the same value.
3423
28e41874
JJ
3424 PR c++/60267
3425 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
3426 for PRAGMA_IVDEP if flag_preprocess_only.
3427
c2bf53a1
JJ
34282014-02-12 Jakub Jelinek <jakub@redhat.com>
3429
3430 PR c/60101
3431 * c-common.c (merge_tlist): If copy is true, call new_tlist,
3432 if false, add ADD itself, rather than vice versa.
3433 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
3434 copy. For SAVE_EXPR, only call merge_tlist once.
3435
8fcbce72
JJ
34362014-02-08 Jakub Jelinek <jakub@redhat.com>
3437
3438 PR middle-end/60092
3439 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
3440 and tree_to_uhwi.
3441 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
3442 functions.
3443 (c_common_attribute_table): Add alloc_align and assume_aligned
3444 attributes.
3445
0a756a3f
MP
34462014-02-06 Marek Polacek <polacek@redhat.com>
3447
3448 PR c/60087
3449 * c-common.c (warn_for_sign_compare): Call warning_at with location
3450 instead of warning.
3451
7ec4847a
MP
34522014-02-05 Marek Polacek <polacek@redhat.com>
3453
3454 PR c/53123
3455 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
3456 statement.
3457
66f20604
MP
34582014-02-04 Marek Polacek <polacek@redhat.com>
3459
3460 PR c/60036
3461 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
3462 SAVE_EXPR.
3463
5d77fb19
MG
34642014-02-03 Marc Glisse <marc.glisse@inria.fr>
3465
3466 PR c++/53017
3467 PR c++/59211
3468 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
3469 handle_vector_size_attribute, handle_nonnull_attribute): Call
3470 default_conversion on the attribute argument.
3471 (handle_nonnull_attribute): Increment the argument number.
3472
81e5eca8
MP
34732014-01-31 Marek Polacek <polacek@redhat.com>
3474
3475 PR c/59963
3476 * c-common.c (add_atomic_size_parameter): Pass vNULL to
3477 build_function_call_vec.
3478 (resolve_overloaded_builtin): Likewise.
3479 * c-common.h (build_function_call_vec): Adjust declaration.
3480
68fca595
MP
34812014-01-30 Marek Polacek <polacek@redhat.com>
3482
3483 PR c/59940
3484 * c-common.h (unsafe_conversion_p): Adjust declaration.
3485 (warnings_for_convert_and_check): Likewise.
3486 (convert_and_check): Likewise.
3487 * c-common.c (unsafe_conversion_p): Add location parameter. Call
3488 expansion_point_location_if_in_system_header on it.
3489 (warnings_for_convert_and_check): Add location parameter. Call
3490 expansion_point_location_if_in_system_header on it. Use it.
3491 (convert_and_check): Add location parameter. Use it.
3492 (conversion_warning): Likewise.
3493 (c_add_case_label): Adjust convert_and_check calls.
3494 (scalar_to_vector): Adjust unsafe_conversion_p calls.
3495
b72271b9
BI
34962014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
3497
3498 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
3499 flag_cilkplus.
3500 * c-pragma.c (init_pragma): Likewise.
3501 * c.opt: Likewise.
3502
393e8e8b
MP
35032014-01-23 Marek Polacek <polacek@redhat.com>
3504
3505 PR c/59846
3506 * c-common.c (shorten_compare): Add location_t parameter.
3507 * c-common.h (shorten_binary_op): Adjust declaration.
3508
f04dda30
MP
35092014-01-23 Marek Polacek <polacek@redhat.com>
3510
3511 PR c/58346
3512 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
3513 * c-common.h: Declare it.
3514
621955cb
EB
35152014-01-20 Eric Botcazou <ebotcazou@adacore.com>
3516
3517 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
3518 * c-ada-spec.c (dump_ads): Likewise.
3519 (cpp_check): Likewise.
3520 (dump_ada_specs): Likewise.
3521
35222014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
3523
3524 PR c++/49718
3525 * c-common.c (handle_no_instrument_function_attribute): Allow
3526 no_instrument_function attribute in class member
3527 definition/declaration.
3528
241f845a
JJ
35292014-01-15 Jakub Jelinek <jakub@redhat.com>
3530
3531 PR c/58943
3532 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
3533 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
3534 being COMPOUND_EXPR.
3535 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
3536 operand a SAVE_EXPR and second MODIFY_EXPR.
3537
e83b8e2e
JJ
35382014-01-09 Jakub Jelinek <jakub@redhat.com>
3539
3540 PR target/58115
3541 * c-pch.c (c_common_write_pch): Call
3542 prepare_target_option_nodes_for_pch.
3543
23a5b65a
RS
35442014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3545
3546 Update copyright years
3547
f9030485
RS
35482014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3549
3550 * array-notation-common.c, c-cilkplus.c: Use the standard form for
3551 the copyright notice.
3552
f2aa696b
EB
35532013-12-28 Eric Botcazou <ebotcazou@adacore.com>
3554
3555 * c-ada-spec.c (print_constructor): New function.
3556 (print_destructor): Retrieve the origin of the destructor.
3557 (print_ada_declaration): Revamp handling of constructors/destructors.
3558
3f8257db 35592013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
3560 Bill Maddox <maddox@google.com>
3561 Jason Merrill <jason@redhat.com>
3562
3563 * c.opt: Add -fdeclone-ctor-dtor.
3564 * c-opts.c (c_common_post_options): Default to on iff -Os.
3565
41958c28
BI
35662013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
3567
3568 * c-common.c (c_common_attribute_table): Added "cilk simd function"
3569 attribute.
3570 * c-pragma.h (enum pragma_cilk_clause): Remove.
3571 (enum pragma_omp_clause): Added the following fields:
3572 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
3573 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
3574 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
3575 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
3576 PRAGMA_CILK_CLAUSE_UNIFORM.
3577
b1726d6c 3578
12893402
BI
35792013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
3580
3581 * cilk.c (cilk_outline): Made this function non-static.
3582 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
3583 (create_cilk_wrapper): Added a new parameter: a function pointer.
3584 (c_install_body_w_frame_cleanup): Remove
3585 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
3586 * c-common.h (cilk_outline): New prototype.
3587 (gimplify_cilk_spawn): Removed two parameters.
3588 (cilk_install_body_with_frame_cleanup): New prototype.
3589 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
3590 CILK_SPAWN_STMT case.
3591
085b42ed
BS
35922013-12-11 Bernd Schmidt <bernds@codesourcery.com>
3593
2ce064c3
BS
3594 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
3595
085b42ed
BS
3596 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
3597 (int_array_type_node): Remove.
3598 * c-common.c (c_common_nodes_and_builtins): Don't build it.
3599
9e36c9ed
MP
36002013-12-05 Marek Polacek <polacek@redhat.com>
3601
3602 PR c/52023
3603 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
3604 [ADJUST_FIELD_ALIGN].
3605
296674db
JM
36062013-12-04 Joseph Myers <joseph@codesourcery.com>
3607
3608 PR c/52023
3609 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
3610 and check field alignment if set.
3611 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
3612 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
3613
b1726d6c 36142013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
3615 Marek Polacek <polacek@redhat.com>
3616
3617 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
3618 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
3619
d7947e19
L
36202013-11-29 H.J. Lu <hongjiu.lu@intel.com>
3621
3622 PR c/59309
3623 * cilk.c (gimplify_cilk_spawn): Properly handle function without
3624 arguments.
3625
fad7652e
JJ
36262013-11-29 Jakub Jelinek <jakub@redhat.com>
3627
3628 PR c/59280
3629 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
3630 goto invalid. If it is error_mark_node, don't issue further
3631 diagnostics.
3632
8b5e1202
SO
36332013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
3634
3635 * c.opt (Wopenmp-simd): New.
3636
0a508bb6
JJ
36372013-11-22 Jakub Jelinek <jakub@redhat.com>
3638
3639 * c-ubsan.h (ubsan_instrument_return): New prototype.
3640 * c-ubsan.c (ubsan_instrument_return): New function.
3641
2fb9a547
AM
36422013-11-22 Andrew MacLeod <amacleod@redhat.com>
3643
3644 * c-common.c: Add required include files from gimple.h.
3645 * c-gimplify.c: Likewise
3646 * cilk.c: Likewise
3647
8400e75e
DM
36482013-11-22 David Malcolm <dmalcolm@redhat.com>
3649
3650 * c-common.c (unsafe_conversion_p): Remove use of
3651 EXPR_LOC_OR_HERE macro.
3652 (conversion_warning): Likewise.
3653 (warnings_for_convert_and_check): Likewise.
3654 (warn_for_collisions_1): Likewise.
3655 (shorten_compare): Likewise, and remove use of in_system_header
3656 macro, using the location from the former.
3657 * c-lex.c (dump_one_header): Remove use of input_filename macro.
3658 (cb_def_pragma): Remove use of in_system_header macro.
3659 (lex_string): Likewise.
3660 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
3661
eb1ce453
KZ
36622013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
3663 Mike Stump <mikestump@comcast.net>
3664 Richard Sandiford <rdsandiford@googlemail.com>
3665
3666 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
3667 instead of TREE_INT_CST_LOW, in cases where there is a protecting
3668 tree_fits_shwi_p or tree_fits_uhwi_p.
3669 (dump_generic_ada_node): Likewise.
3670 * c-format.c (check_format_arg): Likewise.
3671 * c-pretty-print.c (pp_c_integer_constant): Likewise.
3672
6b3b8c27
KZ
36732013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
3674
3675 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
3676
49b0aa18
JC
36772013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
3678
3679 PR c/53001
3680 * c-common.c (unsafe_conversion_p): Make this function
3681 return an enumeration with more detail.
3682 (conversion_warning): Use the new return type of
3683 unsafe_conversion_p to separately warn either about conversions
3684 that lower floating point number precision or about the other
3685 kinds of conversions.
3686 * c-common.h (enum conversion_safety): New enumeration.
3687 (unsafe_conversion_p): switching return type to
3688 conversion_safety enumeration.
3689 * c.opt: Adding new warning -Wfloat-conversion and
3690 enabling it with -Wconversion.
3691
b826515a
BS
36922013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
3693
3694 * c-opts.c: Include plugin.h.
3695 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
3696
b9a55b13
MP
36972013-11-19 Marek Polacek <polacek@redhat.com>
3698
3699 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
3700 call.
3701 (ubsan_instrument_shift): Likewise.
3702 (ubsan_instrument_vla): Likewise.
3703
7d362f6c
RS
37042013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3705
3706 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
3707 cast to unsigned type.
3708
386b1f1f
RS
37092013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3710
3711 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
3712 tree_low_cst.
3713 (complete_array_type): Update comment to refer to tree_to_[su]hwi
3714 rather than tree_low_cst.
3715
ae7e9ddd
RS
37162013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3717
3718 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
3719 tree_to_uhwi throughout.
3720
9439e9a1
RS
37212013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3722
3723 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
3724 tree_low_cst (..., 0) with tree_to_shwi throughout.
3725
cc269bb6
RS
37262013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3727
3728 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
3729 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
3730
9541ffee
RS
37312013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3732
3733 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
3734 host_integerp (..., 0) with tree_fits_shwi_p throughout.
3735
c02065fc
AH
37362013-11-15 Aldy Hernandez <aldyh@redhat.com>
3737
3738 * c-cilkplus.c: New file.
3739 * c-common.c (readonly_error): Add location argument.
3740 * c-common.h (readonly_error): Same.
3741 (c_finish_cilk_clauses): Protoize.
3742 (c_check_cilk_loop): Same.
3743 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
3744 Do not fail on error_mark_node.
3745 Abstract increment canonicalization to here...
3746 (c_omp_for_incr_canonicalize_ptr): New.
3747 c-pragma.c (init_pragma): Register "simd" pragma.
3748 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
3749 (enum pragma_cilk_clause): New.
3750
9cc65f15
RS
37512013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
3752
3753 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
3754 wchar_type and host_integerp checks.
3755
18f429e2
AM
37562013-11-14 Andrew MacLeod <amacleod@redhat.com>
3757
3758 * c-common.c: Likewise.
3759 * c-gimplify.c: Likewise.
3760 * cilk.c: Likewise.
3761
d8a2d370
DN
37622013-11-14 Diego Novillo <dnovillo@google.com>
3763
3764 * c-common.c: Include fold-const.h.
3765 Include stor-layout.h.
3766 Include calls.h.
3767 Include stringpool.h.
3768 Include attribs.h.
3769 Include varasm.h.
3770 Include trans-mem.h.
3771 * c-cppbuiltin.c: Include stor-layout.h.
3772 Include stringpool.h.
3773 * c-format.c: Include stringpool.h.
3774 * c-lex.c: Include stringpool.h.
3775 Include stor-layout.h.
3776 * c-pragma.c: Include stringpool.h.
3777 Include attribs.h.
3778 Include varasm.h.
3779 Include gcc-symtab.h.
3780 * c-pretty-print.c: Include stor-layout.h.
3781 Include attribs.h.
3782 * cilk.c: Include stringpool.h.
3783 Include calls.h.
3784
38b7bc7f
JM
37852013-11-13 Joseph Myers <joseph@codesourcery.com>
3786
3787 * c-common.h (enum rid): Add RID_AUTO_TYPE.
3788 * c-common.c (c_common_reswords): Add __auto_type.
3789 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
3790
45b0be94
AM
37912013-11-12 Andrew MacLeod <amacleod@redhat.com>
3792
18f429e2
AM
3793 * c-common.c: Include gimplify.h.
3794 * c-gimplify.c: Likewise.
3795 * cilk.c: Likewise.
3796 * c-omp.c: Include gimple-expr.h instead of gimple.h.
3797 * c-ubsan.c: Don't include gimple.h.
45b0be94 3798
582d9b50
JM
37992013-11-12 Joseph Myers <joseph@codesourcery.com>
3800
3801 * c-common.c (c_common_reswords): Add _Thread_local.
3802
6b28e197
JM
38032013-11-09 Joseph Myers <joseph@codesourcery.com>
3804
3805 * c-common.c (atomic_size_supported_p): New function.
3806 (resolve_overloaded_atomic_exchange)
3807 (resolve_overloaded_atomic_compare_exchange)
3808 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
3809 Use it instead of comparing size with a local list of sizes.
3810
267bac10
JM
38112013-11-07 Andrew MacLeod <amacleod@redhat.com>
3812 Joseph Myers <joseph@codesourcery.com>
3813
3814 * c-common.h (enum rid): Add RID_ATOMIC.
3815 * c-common.c (c_common_reswords): Add _Atomic.
3816 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
3817 (keyword_is_type_qualifier): Accept RID_ATOMIC.
3818 * c-format.c (check_format_types): Check for extra _Atomic
3819 qualifiers in format argument.
3820 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
3821 (pp_c_type_qualifier_list): Mention _Atomic in comment.
3822
5157b91e
TB
38232013-11-06 Tobias Burnus <burnus@net-b.de>
3824
3825 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
3826
6dbe0958
JM
38272013-11-06 Joseph Myers <joseph@codesourcery.com>
3828
3829 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
3830 standards modes.
3831 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
3832 to mean lack of IEEE 754 support.
3833
e8ff5196
TB
38342013-11-05 Tobias Burnus <burnus@net-b.de>
3835
3836 * c.opt (-Wdate-time): New option
3837 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
3838
254a0760
JM
38392013-11-05 Joseph Myers <joseph@codesourcery.com>
3840
3841 * c-cppbuiltin.c (cpp_iec_559_value): Test
3842 flag_excess_precision_cmdline not flag_excess_precision.
3843
6d7f7e0a
TB
38442013-11-05 Tobias Burnus <burnus@net-b.de>
3845
3846 * c.opt (fopenmp-simd): New option.
3847 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
3848 (omp_pragmas): ... this new struct.
3849 (c_pp_lookup_pragma): Also walk omp_pragmas.
3850 (init_pragma): Init pragmas for -fopenmp-simd.
3851
55a7f02f
MP
38522013-11-04 Marek Polacek <polacek@redhat.com>
3853
3854 PR c++/58979
3855 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
3856
9193fb05
JM
38572013-11-04 Joseph Myers <joseph@codesourcery.com>
3858
3859 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
3860 New functions.
3861 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
3862
94159ecf
EB
38632013-11-04 Eric Botcazou <ebotcazou@adacore.com>
3864
3865 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
3866 (dump_ada_specs): Adjust prototype of second callback.
3867 * c-ada-spec.c (cpp_check): New global variable.
3868 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
3869 (print_generic_ada_decl): Likewise.
3870 (has_static_fields): Change return type to bool and add guard.
3871 (has_nontrivial_methods): New predicate.
3872 (is_tagged_type): Change return type to bool.
3873 (separate_class_package): Call has_nontrivial_methods.
3874 (pp_ada_tree_identifier): Minor tweaks.
3875 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
3876 (dump_ada_array_domains): Likewise.
3877 (dump_ada_array_type): Likewise.
3878 (dump_template_types): Remove cpp_check parameter and do not pass it to
3879 dump_generic_ada_node.
3880 (dump_ada_template): Likewise.
3881 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
3882 recursively.
3883 (print_ada_methods): Change return type to integer. Remove cpp_check
3884 parameter and do not pass it down.
3885 (dump_nested_types): Remove cpp_check parameter and do not pass it to
3886 dump_generic_ada_node.
3887 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
3888 accessing methods.
3889 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
3890 down. Use has_nontrivial_methods to recognize C++ classes. Use return
3891 value of print_ada_methods.
3892 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
3893 Set cpp_check to it before invoking dump_ada_nodes.
3894 (dump_ada_specs): Likewise.
3895
b906f4ca
MP
38962013-11-03 Marek Polacek <polacek@redhat.com>
3897
3898 * c-ubsan.c: Don't include hash-table.h.
3899 (ubsan_instrument_vla): New function.
3900 * c-ubsan.h: Declare it.
3901
5e20cdc9
DM
39022013-10-31 David Malcolm <dmalcolm@redhat.com>
3903
3904 Automated part of renaming of symtab_node_base to symtab_node.
3905
3906 Patch autogenerated by rename_symtab.py from
3907 https://github.com/davidmalcolm/gcc-refactoring-scripts
3908 revision 58bb219cc090b2f4516a9297d868c245495ee622
3909
3910 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
3911 symtab_node_base to symtab_node.
3912
7057e645
ESR
39132013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
3914
3915 Implement C++14 digit separators.
3916 * c-lex.c (interpret_float): Remove digit separators from scratch string
3917 before building real literal.
3918
193ea7bc
JJ
39192013-10-30 Jakub Jelinek <jakub@redhat.com>
3920
3921 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
3922
939b37da
BI
39232013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
3924
3925 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
3926 fields.
3927 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
3928 enabled.
3929 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
3930 (insert_cilk_frame): New prototype.
3931 (cilk_init_builtins): Likewise.
3932 (gimplify_cilk_spawn): Likewise.
3933 (c_cilk_install_body_w_frame_cleanup): Likewise.
3934 (cilk_detect_spawn_and_unwrap): Likewise.
3935 (cilk_set_spawn_marker): Likewise.
3936 (build_cilk_sync): Likewise.
3937 (build_cilk_spawn): Likewise.
3938 * cilk.c: New file.
3939
67348ccc
DM
39402013-10-29 David Malcolm <dmalcolm@redhat.com>
3941
3942 Patch autogenerated by refactor_symtab.py from
3943 https://github.com/davidmalcolm/gcc-refactoring-scripts
3944 revision 58bb219cc090b2f4516a9297d868c245495ee622
3945
3946 * c-gimplify.c (c_genericize): Update for conversion of symtab types
3947 to a true class hierarchy.
3948 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
3949
d570872d
RS
39502013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
3951
3952 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
3953
98906124
JL
39542013-10-26 Jeff Law <law@redhat.com>
3955
adfac8df
JJ
3956 * c-common.c (c_define_builtins): Remove mudflap support.
3957 * c.opt: Ignore and warn for mudflap options.
98906124 3958
d73749df 39592013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
3960
3961 PR other/33426
3962 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
3963 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
3964
3f04b1bb
JM
39652013-10-23 Jason Merrill <jason@redhat.com>
3966
3967 * c-format.c (gcc_cxxdiag_char_table): Add %X.
3968
acf0174b
JJ
39692013-10-11 Jakub Jelinek <jakub@redhat.com>
3970
acd15a28
JJ
3971 * c-common.h (omp_clause_mask::operator !=): New method.
3972 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
3973 instead of if (mask & something) tests everywhere.
3974
acf0174b
JJ
3975 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
3976 201307 instead of 201107.
3977 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
3978 (c_common_attribute_table): Add "omp declare target" and
3979 "omp declare simd" attributes.
3980 (handle_omp_declare_target_attribute,
3981 handle_omp_declare_simd_attribute): New functions.
3982 * c-omp.c: Include c-pragma.h.
3983 (c_finish_omp_taskgroup): New function.
3984 (c_finish_omp_atomic): Add swapped argument, if true,
3985 build the operation first with rhs, lhs arguments and use NOP_EXPR
3986 build_modify_expr.
3987 (c_finish_omp_for): Add code argument, pass it down to make_code.
3988 (c_omp_split_clauses): New function.
3989 (c_split_parallel_clauses): Removed.
3990 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
3991 c_omp_declare_simd_clauses_to_decls): New functions.
3992 * c-common.h (omp_clause_mask): New type.
3993 (OMP_CLAUSE_MASK_1): Define.
3994 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
3995 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
3996 omp_clause_mask::operator |, omp_clause_mask::operator &,
3997 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
3998 omp_clause_mask::operator ==): New methods.
3999 (enum c_omp_clause_split): New.
4000 (c_finish_omp_taskgroup): New prototype.
4001 (c_finish_omp_atomic): Add swapped argument.
4002 (c_finish_omp_for): Add code argument.
4003 (c_omp_split_clauses): New prototype.
4004 (c_split_parallel_clauses): Removed.
4005 (c_omp_declare_simd_clauses_to_numbers,
4006 c_omp_declare_simd_clauses_to_decls): New prototypes.
4007 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
4008 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
4009 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
4010 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
4011 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
4012 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
4013 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
4014 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
4015 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
4016 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
4017 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
4018 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
4019 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
4020 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
4021 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
4022 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
4023 PRAGMA_OMP_CLAUSE_UNIFORM.
4024
826cacfe
MG
40252013-10-09 Marc Glisse <marc.glisse@inria.fr>
4026
4027 PR tree-optimization/20318
4028 * c-common.c (handle_returns_nonnull_attribute): New function.
4029 (c_common_attribute_table): Add returns_nonnull.
4030
2284b034
MG
40312013-10-03 Marc Glisse <marc.glisse@inria.fr>
4032
4033 PR c++/19476
4034 * c.opt (fcheck-new): Move to common.opt.
4035
b56e9788
MP
40362013-09-25 Marek Polacek <polacek@redhat.com>
4037 Jakub Jelinek <jakub@redhat.com>
4038
4039 PR sanitizer/58413
4040 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
4041 an expression if we can prove it is correct.
4042 (ubsan_instrument_division): Likewise. Remove unnecessary
4043 check.
4044
ce6923c5
MP
40452013-09-18 Marek Polacek <polacek@redhat.com>
4046
4047 PR sanitizer/58411
4048 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
4049 Declare it.
4050 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
4051
fb5610fb
IS
40522013-09-14 Iain Sandoe <iain@codesourcery.com>
4053
4054 PR target/48094
4055 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
4056 fobjc-gc, freplace-objc-classes): Accept for LTO.
4057
88b0e79e
JC
40582013-09-13 Jacek Caban <jacek@codeweavers.com>
4059
4060 * c-target.def: New hook
4061
c9b0866a
PC
40622013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
4063
4064 PR c++/43452
4065 * c.opt (Wdelete-incomplete): Add.
4066
0af94e6f
JR
40672013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
4068
4069 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
4070 (vector_types_compatible_elements_p): New function.
4071 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
4072 declaration.
4073 (vector_types_compatible_elements_p): Declare.
4074
7c26172c
GDR
40752013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
4076
4077 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
4078 a virtual member function.
4079 (pp_simple_type_specifier): Remove.
4080 (pp_c_type_specifier): Likewise.
4081 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
4082 Rename from pp_c_type_specifier. Adjust.
4083 (c_pretty_printer::c_pretty_printer): Do not assign to
4084 simple_type_specifier.
4085
20059c8b
GDR
40862013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
4087
4088 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
4089 member function.
4090 (c_pretty_printer::storage_class_specifier): Likewise.
4091 (c_pretty_printer::initializer): Likewise.
4092 (pp_declaration): Remove.
4093 (pp_declaration_specifiers): Likewise.
4094 (pp_abstract_declarator): Likewise.
4095 (pp_declarator): Likewise.
4096 (pp_type_id): Likewise.
4097 (pp_statement): Likewise.
4098 (pp_constant): Likewise.
4099 (pp_id_expression): Likewise.
4100 (pp_primary_expression): Likewise.
4101 (pp_unary_expression): Likewise.
4102 (pp_multiplicative_expression): Likewise.
4103 (pp_conditional_expression): Likewise.
4104 (pp_assignment_expression): Likewise.
4105 (pp_expression): Likewise.
4106 (pp_c_type_id): Likewise.
4107 (pp_c_storage_class_specifier): Likewise.
4108 * c-pretty-print.c (pp_c_type_cast): Tidy.
4109 (pp_c_pointer): Likewise.
4110 (pp_c_type_specifier): Likewise.
4111 (pp_c_parameter_type_list): Likewise.
4112 (pp_c_function_definition): Likewise.
4113 (pp_c_init_declarator): Likewise.
4114 (pp_c_initializer_list): Likewise.
4115 (pp_c_constructor_elts): Likewise.
4116 (c_pretty_printer::direct_abstract_declarator): Likewise.
4117 (c_pretty_printer::declaration_specifiers): Likewise.
4118 (c_pretty_printer::primary_expression): Likewise.
4119 (c_pretty_printer::postfix_expression): Likewise.
4120 (c_pretty_printer::type_id): Rename from pp_c_type_id.
4121 (c_pretty_printer::storage_class_specifier): Rename from
4122 pp_c_storage_class_specifier.
4123 (c_pretty_printer::initializer): Rename from pp_c_initializer.
4124 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
4125 storage_class_specifier, initializer, offset_list, flags.
4126
de5a5fa1
MP
41272013-08-30 Marek Polacek <polacek@redhat.com>
4128
4129 * c-ubsan.c: New file.
4130 * c-ubsan.h: New file.
4131
8f0e4d72
GDR
41322013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
4133
4134 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
4135 member function.
4136 (c_pretty_printer::declaration_specifiers): Likewise.
4137 (c_pretty_printer::declarator): Likewise.
4138 (c_pretty_printer::abstract_declarator): Likewise.
4139 (c_pretty_printer::direct_abstract_declarator): Likewise.
4140 (c_pretty_printer::direct_declarator): Likewise.
4141 (c_pretty_printer::function_specifier): Likewise.
4142 (pp_declaration): Adjust.
4143 (pp_declaration_specifiers): Likewise.
4144 (pp_abstract_declarator): Likewise.
4145 (pp_direct_declarator): Likewise.
4146 (pp_function_specifier): Likewise.
4147 (pp_direct_abstract_declarator): Remove as unused.
4148 (pp_c_declaration): Remove.
4149 (pp_c_declaration_specifiers): Likewise.
4150 (pp_c_declarator): Likewise.
4151 (pp_c_direct_declarator): Likewise.
4152 (pp_c_function_specifier): Likewise.
4153 (pp_c_direct_abstract_declarator): Likewise.
4154 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
4155 from pp_c_abstract_declarator. Adjust.
4156 (c_pretty_printer::direct_abstract_declarator): Rename from
4157 pp_c_direct_abstract_declarator. Adjust.
4158 (c_pretty_printer::function_specifier): Rename from
4159 pp_c_function_specifier. Adjust.
4160 (c_pretty_printer::declaration_specifiers): Rename from
4161 pp_c_declaration_specifiers. Adjust.
4162 (c_pretty_printer::direct_declarator): Rename from
4163 pp_c_direct_declarator. Adjust.
4164 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
4165 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
4166 (c_pretty_printer::c_pretty_printer): Do not assign to
4167 declaration, declaration_specifiers, declarator,
4168 direct_declarator, direct_abstract_declarator, function_specifier.
4169
00d34d3a
GDR
41702013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
4171
4172 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
4173 virtual member function.
4174 (c_pretty_printer::multiplicative_expression): Likewise.
4175 (c_pretty_printer::conditional_expression): Likewise.
4176 (c_pretty_printer::assignment_expression): Likewise.
4177 (c_pretty_printer::expression): Likewise.
4178 (pp_unary_expression): Adjust.
4179 (pp_multiplicative_expression): Likewise.
4180 (pp_assignment_expression): Likewise.
4181 (pp_conditional_expression): Likewise.
4182 (pp_expression): Likewise.
4183 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
4184 from pp_c_unary_expression. Adjust.
4185 (c_pretty_printer::multiplicative_expression): Rename from
4186 pp_c_multiplicative_expression. Adjust.
4187 (c_pretty_printer::conditional_expression): Rename from
4188 pp_c_conditional_expression. Adjust.
4189 (c_pretty_printer::assignment_expression): Rename from
4190 pp_c_assignment_expression. Adjust.
4191 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
4192 (c_pretty_printer::c_pretty_printer): Do not assign to
4193 unary_expression, multiplicative_expression,
4194 conditional_expression, expression.
4195
fb22178f
GDR
41962013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
4197
4198 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
4199 virtual member function.
4200 (pp_postfix_expression): Adjust.
4201 (pp_c_postfix_expression): Remove.
4202 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
4203 from pp_c_postfix_expression. Adjust.
4204 (c_pretty_printer::c_pretty_printer): Do not assign to
4205 postfix_expression.
4206
7ecc2600
GDR
42072013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
4208
4209 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
4210 virtua member function.
4211 (pp_primary_expression): Adjust.
4212 (pp_c_primary_expression): Remove.
4213 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
4214 from pp_c_primary_expression. Adjust.
4215 (pp_c_initializer_list): Use pp_primary_expression.
4216 (c_pretty_printer::c_pretty_printer): Do not assign to
4217 primary_expression.
4218
0691175f
GDR
42192013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
4220
4221 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
4222 * c-pretty-print.c (M_): Remove.
4223 (c_pretty_printer::translate_string): Define.
4224 (pp_c_type_specifier): Use it.
4225 (pp_c_primary_expression): Likewise.
4226 (pp_c_expression): Likewise.
4227
66dfe4c4
GDR
42282013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
4229
4230 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
4231 virtual function.
4232 (pp_c_id_expression): Remove.
4233 (pp_id_expression): Adjust.
4234 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
4235 pp_c_id_expression. Adjust.
4236 (pp_c_postfix_expression): Use pp_id_expression.
4237 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
4238
ca43e9d5
GDR
42392013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
4240
4241 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
4242 member function.
4243 (pp_constant): Adjust.
4244 (pp_c_constant): Remove.
4245 * c-pretty-print.c (c_pretty_printer::constant): Rename from
4246 pp_c_constant. Adjust.
4247 (pp_c_constant)
4248 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
4249 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
4250
da6ca2b5
GDR
42512013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4252
4253 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
4254 (c_pretty_printer::c_pretty_printer): Declare.
4255 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
4256 c_pretty_printer_init. Adjust.
4257 (print_c_tree): Do not call c_pretty_printer_init.
4258 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
4259
65a372f4
AC
42602013-08-09 Arnaud Charlet <charlet@adacore.com>
4261
4262 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
4263
fd9b0f32
PC
42642013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
4265
4266 PR c++/58080
4267 * c-common.c (pointer_int_sum): Add bool parameter.
4268 * c-common.h (pointer_int_sum): Adjust declaration.
4269
e0aec1e9
GDR
42702013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
4271
4272 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
4273 c_pretty_printer variable.
4274
b066401f
GDR
42752013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
4276
4277 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
4278 (pp_base): Remove.
4279 (pp_c_base): Likewise. Adjust users.
4280 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
4281 (pp_c_whitespace): Do not call pp_base.
4282 (pp_c_left_paren): Likewise.
4283 (pp_c_right_paren): Likewise.
4284 (pp_c_left_brace): Likewise.
4285 (pp_c_right_brace): Likewise.
4286 (pp_c_left_bracket): Likewise.
4287 (pp_c_right_bracket): Likewise.
4288 (pp_c_dot): Likewise.
4289 (pp_c_ampersand): Likewise.
4290 (pp_c_star): Likewise.
4291 (pp_c_arrow): Likewise.
4292 (pp_c_semicolon): Likewise.
4293 (pp_c_complement): Likewise.
4294 (pp_c_exclamation): Likewise.
4295 (pp_c_direct_declarator): Likewise.
4296 (pp_c_ws_string): Likewise.
4297 (pp_c_identifier): Likewise.
4298 (pp_c_statement): Likewise.
4299 (print_c_tree): Likewise.
4300
65e5a578
ESR
43012013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
4302
4303 PR c++/58072
4304 * c-common.c (c_parse_error): Catch user-defined literal tokens and
4305 provide useful error strings.
4306
137a1a27
GDR
43072013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
4308
4309 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
4310 printer functions instead of pp_string or operators and punctuators.
4311 (dump_generic_ada_node): Likewise.
4312 * c-pretty-print.c (pp_c_type_specifier): Likewise.
4313 (pp_c_relational_expression): Likewise.
4314 (pp_c_logical_or_expression): Likewise.
4315
07838b13
GDR
43162013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
4317
4318 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
4319 functions instead of pp_character.
4320 (pp_ada_tree_identifier): Likewise.
4321 (dump_ada_double_name): Likewise.
4322 (dump_ada_function_declaration): Likewise.
4323 (dump_ada_array_domains): Likewise.
4324 (dump_template_types): Likewise.
4325 (dump_generic_ada_node): Likewise.
4326 (print_ada_declaration): Likewise.
4327 (print_ada_struct_decl): Likewise.
4328 * c-pretty-print.c (pp_c_integer_constant): Likewise.
4329
433cc7b0
TT
43302013-07-23 Tom Tromey <tromey@redhat.com>
4331
4332 * c-common.h (enum rid) <RID_GENERIC>: New constant.
4333 * c-common.c (c_common_reswords): Add _Generic.
4334
688010ba
OB
43352013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
4336
4337 * c-common.c: Fix typos.
4338 * c-common.h: Likewise.
4339
2a99e5e6
LL
43402013-07-13 Lubos Lunak <l.lunak@suse.cz>
4341
4342 PR c++/55203
4343 * c-common.c (c_common_attribute_table): Add warn_unused.
4344 (handle_warn_unused_attribute): New.
4345
c26302d5
JJ
43462013-07-10 Jakub Jelinek <jakub@redhat.com>
4347
4348 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
4349 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
4350
dfeadaa0
PC
43512013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
4352
4353 PR c++/57869
4354 * c.opt: Add Wconditionally-supported.
4355
6a2fa4b2
GS
43562013-07-08 Graham Stott <graham.stott@btinternet.com>
4357
adfac8df 4358 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
4359 unused variables l_length and l_node.
4360
ecdbd01a 43612013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
4362
4363 PR c/57821
4364 * c-common.c (complete_array_type): Delay folding first index
4365 like other indices. When folding, check for index overflow.
4366
bedc293e
MG
43672013-06-27 Marc Glisse <marc.glisse@inria.fr>
4368
4369 PR c++/57509
4370 * c-common.h (c_build_vec_perm_expr): New complain argument.
4371 * c-common.c (c_build_vec_perm_expr): Likewise.
4372 Use save_expr also in C++.
4373
604b2bfc
GDR
43742013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4375
4376 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
4377 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
4378 * c-opts.c (c_common_post_options): Likewise.
4379
dfeadaa0 43802013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
4381
4382 * array-notation-common.c (length_mismatch_in_expr): Changed the
4383 parameter type's from a dynamic array to a vec_tree. Also removed
4384 the size parameters.
4385 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
4386 the change above.
4387
2ce86d2e
BI
43882013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
4389
4390 * c-common.h (struct cilkplus_an_parts): New structure.
4391 (struct cilkplus_an_loop_parts): Likewise.
4392 (cilkplus_extract_an_triplets): New prototype.
4393 (fix_sec_implicit_args): Likewise.
4394 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
4395 (fix_sec_implicit_args): Likewise.
604b2bfc 4396
07a6825b
BI
43972013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
4398
4399 * array-notation-common.c (find_inv_trees): Removed an unwanted
4400 typecasting.
4401 * c-common.h (struct inv_list::additional_tcodes): Changed type from
4402 enum rid to enum tree_code.
4403
08346abd
JH
44042013-06-11 Jan Hubicka <jh@suse.cz>
4405
4406 * c-common.c (handle_alias_ifunc_attribute): Do not set
4407 DECL_EXTERNAL for weakref variables.
4408 * c-pragma.c (handle_pragma_weak): Make sure aliases
4409 are not declared as external.
4410
d60f1706
BI
44112013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4412
4413 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
4414 function from c/c-array-notation.c.
4415 (is_cilkplus_reduce_builtin): Likewise.
4416 (find_rank): Likewise.
4417 (extract_array_notation_exprs): Likewise.
4418 (replace_array_notations): Likewise.
4419 (find_inv_trees): Likewise.
4420 (replace_inv_trees): Likewise.
4421 (contains_array_notation_expr): Likewise.
4422 (find_correct_array_notation_type): Likewise.
4423 * c-common.h (struct inv_list): Moved this struct from the file
4424 c/c-array-notation.c and added a new field called additional tcodes.
4425 (length_mismatch_in_expr_p): New prototype.
4426 (is_cilkplus_reduce_builtin): Likewise.
4427 (find_rank): Likewise.
4428 (extract_array_notation_exprs): Likewise.
4429 (replace_array_notation): Likewise.
4430 (find_inv_trees): Likewise.
4431 (replace_inv_trees): Likewise.
4432 (find_correct_array_notation_type): Likewise.
dfeadaa0 4433
36536d79
BI
44342013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4435
4436 * c-common.c (c_define_builtins): When cilkplus is enabled, the
4437 function array_notation_init_builtins is called.
4438 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
4439 * c-common.def (ARRAY_NOTATION_REF): New tree.
4440 * c-common.h (build_array_notation_expr): New function declaration.
4441 (build_array_notation_ref): Likewise.
4442 (extract_sec_implicit_index_arg): New extern declaration.
4443 (is_sec_implicit_index_fn): Likewise.
4444 (ARRAY_NOTATION_CHECK): New define.
4445 (ARRAY_NOTATION_ARRAY): Likewise.
4446 (ARRAY_NOTATION_START): Likewise.
4447 (ARRAY_NOTATION_LENGTH): Likewise.
4448 (ARRAY_NOTATION_STRIDE): Likewise.
4449 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
4450 ARRAY_NOTATION_REF.
4451 (pp_c_expression): Likewise.
4452 * c.opt (flag_enable_cilkplus): New flag.
4453 * array-notation-common.c: New file.
4454
f7716d57
JJ
44552013-05-14 Jakub Jelinek <jakub@redhat.com>
4456
4457 PR c++/57274
4458 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
4459
a5e0cd1d
MG
44602013-05-10 Marc Glisse <marc.glisse@inria.fr>
4461
4462 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
4463 vectors.
4464
f6bc1c4a
HS
44652013-05-07 Han Shen <shenhan@google.com>
4466
4467 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
4468
3f12f6e9
SKS
44692013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
4470
4471 * c-common.c (check_user_alignment): Emit error for negative values.
4472
61949153
PC
44732013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
4474
4475 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
4476
e93e18e9
PC
44772013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
4478
4479 * c-cppbuiltin.c (c_cpp_builtins): Do not define
4480 __GXX_EXPERIMENTAL_CXX1Y__.
4481
44d90fe1
PC
44822013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
4483 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4484
4485 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
4486 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
4487 to simply use OPT_Wpointer_arith.
4488 (c_sizeof_or_alignof_type): Likewise.
4489
13f39b2e
PC
44902013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
4491
4492 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
4493
4b84d650
JJ
44942013-04-12 Jakub Jelinek <jakub@redhat.com>
4495
4496 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
4497 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
4498 specifiers.
4499
fb037b5d
SB
45002013-04-07 Steven Bosscher <steven@gcc.gnu.org>
4501
4502 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
4503
4e856798
PC
45042013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
4505
4506 * c-common.c (pointer_int_sum): Remove dead code.
4507
4b1baac8
RS
45082013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
4509
4510 PR middle-end/56524
4511 * c-common.c (handle_optimize_attribute): Don't call
4512 save_optabs_if_changed.
4513
0b50e654
JJ
45142013-03-05 Jakub Jelinek <jakub@redhat.com>
4515
4516 PR middle-end/56461
4517 * c-pch.c (pch_init): Free target_validity at the end.
4518
48c41403
JJ
45192013-03-04 Jakub Jelinek <jakub@redhat.com>
4520
4521 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
4522
e664c61c
KS
45232013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
4524 Jakub Jelinek <jakub@redhat.com>
4525
4526 PR sanitizer/56454
4527 * c-common.c (handle_no_sanitize_address_attribute): New function.
4528 (c_common_attribute_table): Add no_sanitize_address attribute.
4529 (handle_no_address_safety_analysis_attribute): Add
4530 no_sanitize_address attribute, not no_address_safety_analysis
4531 attribute.
4532
a475fd3d 45332013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
4534
4535 PR target/52555
4536 * c-common.c (handle_optimize_attribute): Call
4537 save_optabs_if_changed.
4538
f6007d99
JJ
45392013-02-18 Jakub Jelinek <jakub@redhat.com>
4540 Steven Bosscher <steven@gcc.gnu.org>
4541
4542 PR pch/54117
4543 * c-opts.c (c_common_post_options): If debug info is enabled
4544 and non-dwarf*, refuse to load PCH files and when writing PCH
4545 file warn.
4546
cf35e2b1
JJ
45472013-02-05 Jakub Jelinek <jakub@redhat.com>
4548
4549 PR middle-end/56167
4550 * c-common.c (handle_error_attribute): Fix condition.
4551
32887460
JJ
45522013-01-30 Jakub Jelinek <jakub@redhat.com>
4553
4554 PR c++/55742
4555 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
4556
5af057d8
JM
45572013-01-18 Jason Merrill <jason@redhat.com>
4558
4559 PR target/54908
4560 * c.opt (-fextern-tls-init): New.
4561 * c-opts.c (c_common_post_options): Handle it.
4562
cc83c823
JJ
45632013-01-09 Jakub Jelinek <jakub@redhat.com>
4564
4565 PR c/48418
4566 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
4567 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
4568 and is either negative or bigger or equal to type precision
4569 of the first operand.
4570
a859517f
MP
45712012-12-03 Marek Polacek <polacek@redhat.com>
4572
4573 PR c/55570
4574 * c-common.c (check_user_alignment): Swap order of tests,
4575 check TREE_CODE first.
4576
2d7aa578
ESR
45772012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
4578
4579 PR c++/52654
4580 * c-common.h (overflow_type): New enum.
4581 (build_userdef_literal): Add overflow_type argument.
4582 (tree_userdef_literal): Add overflow_type.
4583 (USERDEF_LITERAL_OVERFLOW): New access macro.
4584 * c-common.c (build_userdef_literal): Add overflow_type
4585 argument.
4586 * c-lex.c (c_lex_with_flags): Add overflow_type to
4587 build_userdef_literal calls.
4588 (interpret_integer, interpret_float): Add overflow_type argument.
4589
cc3c4f62
RB
45902012-11-28 Richard Biener <rguenther@suse.de>
4591
4592 PR c/35634
4593 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
4594 here and use a type with proper overflow behavior for types that would
4595 need to be promoted for the arithmetic.
4596
77bc5132
JJ
45972012-11-23 Jakub Jelinek <jakub@redhat.com>
4598
4599 PR sanitizer/55435
4600 * c-common.c (handle_no_address_safety_analysis_attribute): New
4601 function.
4602 (c_common_attribute_table): Add no_address_safety_analysis.
4603
5dc99c46
SB
46042012-11-16 Simon Baldwin <simonb@google.com>
4605
4606 * c.opt: Add f[no-]canonical-system-headers.
4607 * c-opts.c (c_common_handle_option): Handle
4608 OPT_fcanonical_system_headers.
4609
a4a0016d
ESR
46102012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
4611
4612 PR c++/54413
4613 * c-opts.c (c_common_handle_option): Set new flags.
4614 * c.opt: Describe new flags.
4615
7dbb85a7
JM
46162012-11-09 Jason Merrill <jason@redhat.com>
4617
4618 * c.opt (Wabi-tag): New.
4619
ad7bac31
AK
46202012-11-09 Andi Kleen <ak@linux.intel.com>
4621
4622 PR 55139
4623 * c-common.c (get_atomic_generic_size): Mask with
4624 MEMMODEL_MASK
4625
7332899a
MLI
46262012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
4627
4628 PR c/53063
4629 * c.opt (Wformat): Make it Alias Wformat=1.
4630 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
4631 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
4632 LangEnabledBy.
4633 (Wformat=): RejectNegative. Use LangEnabledBy.
4634 (Wnonnull): Use LangEnabledBy.
4635 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
4636 * c-format.c (set_Wformat): Delete.
4637 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
4638 (maybe_read_dollar_number): Likewise.
4639 (avoid_dollar_number): Likewise.
4640 (finish_dollar_format_checking): Likewise.
4641 (check_format_info): Likewise.
4642 (check_format_info_main): Likewise.
4643 (check_format_types): Likewise.
4644 (format_type_warning): Likewise.
4645 * c-common.c (int): Likewise.
4646 (check_function_sentinel): Likewise.
4647 * c-common.h (warn_format,set_Wformat): Do not declare here.
4648
34a180a6
MLI
46492012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
4650
4651 PR c/53063
4652 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
4653 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
4654 Use LangEnabledBy.
4655 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
4656 common.opt.
4657 (Wvariadic-macros): Init(1).
4658 * c-opts.c (c_common_handle_option): Do not handle them
4659 explicitly.
4660 (c_common_post_options): Likewise.
4661 (sanitize_cpp_opts): warn_unused_macros is now
4662 cpp_warn_unused_macros.
4663 (push_command_line_include): Likewise.
4664 * c-common.c (warn_unknown_pragmas): Do not define.
4665 * c-common.h (warn_unknown_pragmas): Do not declare.
4666
3f46d6a5
MLI
46672012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
4668
4669 PR c/51294
4670 * c-common.c (conversion_warning): Handle conditional expressions.
4671
880661a4
JW
46722012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
4673
4674 PR c++/54930
4675 * c.opt (Wreturn_local_addr): Define new option.
4676
4514a96b
JM
46772012-10-25 Jason Merrill <jason@redhat.com>
4678
f14edc1a
JM
4679 * c.opt (Wvirtual-move-assign): New.
4680
4514a96b
JM
4681 * c.opt (Winherited-variadic-ctor): New.
4682
93100c6b
MG
46832012-10-25 Marc Glisse <marc.glisse@inria.fr>
4684
4685 PR c++/54427
4686 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
4687
1efcb8c6
JM
46882012-10-23 Joseph Myers <joseph@codesourcery.com>
4689
4690 * c-common.h (pch_cpp_save_state): Declare.
4691 * c-target.def (c_preinclude): New hook.
4692 * c-opts.c (done_preinclude): New.
4693 (push_command_line_include): Handle default preincluded header.
4694 (cb_file_change): Call pch_cpp_save_state when calling
4695 push_command_line_include.
4696 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
4697 (pch_cpp_save_state): New.
4698 (pch_init): Call pch_cpp_save_state conditionally, instead of
4699 calling cpp_save_state.
4700
4a0ae68e
MLI
47012012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
4702
4703 PR c/53063
4704 PR c/40989
4705 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
4706 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
4707 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
4708 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
4709 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
4710 * c-opts.c (c_common_handle_option): Remove explicit handling from
4711 here.
4712 (c_common_post_options): Likewise.
4713
67e4210b
EB
47142012-10-18 Eric Botcazou <ebotcazou@adacore.com>
4715
4716 * c-ada-spec.c (LOCATION_COL): Delete.
4717 (compare_location): New function.
4718 (compare_node): Use it.
4719 (compare_comment): Likewise.
4720
65d4f2cd
MLI
47212012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
4722
4723 PR c/53063
4724 PR c/40989
4725 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
4726 * c-opts.c (c_common_handle_option): Do not set them here. Add
4727 comment.
4728 (c_common_post_options): Likewise.
4729
909881cb
EB
47302012-10-16 Eric Botcazou <ebotcazou@adacore.com>
4731
4732 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
4733 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
4734 Remove POINTER_TYPE handling, add large unsigned handling and use
4735 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
4736
3a785c97
JJ
47372012-10-12 Jakub Jelinek <jakub@redhat.com>
4738
4739 PR c/54381
4740 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
4741 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
4742 locs and array of 3 trees instead of just single loc and single
4743 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
4744 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
4745 For *cmp* builtins that take two sources strings report warnings
4746 about first and second source, not about destination and source.
4747
5e54f81d
MG
47482012-10-12 Marc Glisse <marc.glisse@inria.fr>
4749
4750 PR c++/53055
4751 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
4752
f5b02f1e
EB
47532012-10-11 Eric Botcazou <ebotcazou@adacore.com>
4754
4755 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
4756 declaring something coming from another file.
4757
b46dbc6c
AC
47582012-10-10 Arnaud Charlet <charlet@adacore.com>
4759
f5b02f1e 4760 PR ada/54845
b46dbc6c
AC
4761 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
4762
5d9de0d0
PC
47632012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
4764
4765 PR c++/54194
4766 * c-common.c (warn_about_parentheses): Add location_t parameter;
4767 use EXPR_LOC_OR_LOC.
4768 * c-common.h: Update declaration.
4769
a212e43f
MG
47702012-10-09 Marc Glisse <marc.glisse@inria.fr>
4771
4772 PR c++/54427
4773 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
4774 more operations. Make error messages optional.
4775 * c-common.h (enum stv_conv): Moved from c-typeck.c.
4776 (scalar_to_vector): Declare.
4777
b1db7f91
JM
47782012-10-08 Jason Merrill <jason@redhat.com>
4779
4780 * c-common.c (c_common_reswords): Add thread_local.
4781
e28d52cf
DS
47822012-10-08 Dodji Seketeli <dodji@redhat.com>
4783
4784 PR c++/53528 C++11 attribute support
4785 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
4786 new functions.
4787 * c-common.c (check_cxx_fundamental_alignment_constraints): New
4788 static function.
4789 (handle_aligned_attribute): In choose strictest alignment
4790 among many. Use new check_cxx_fundamental_alignment_constraints.
4791 (handle_transparent_union_attribute): In c++11 attribute syntax,
4792 don't look through typedefs.
4793
3b78de56
AC
47942012-10-04 Arnaud Charlet <charlet@adacore.com>
4795
4796 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
4797 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
4798 out of dumpfile.h.
4799
6040bb5f
DC
48002012-09-25 Dehao Chen <dehao@google.com>
4801
4802 PR middle-end/54645
3b78de56 4803 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
4804 map when read in the pch.
4805
3f8257db 48062012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
4807
4808 * c-ada-spec.c: Style fixes.
4809
3f8257db 48102012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
4811
4812 * c.opt (-fada-spec-parent): Define new command line switch.
4813 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
4814 is specified, generate binding spec as a child of the specified unit.
4815
0ccb505d
PC
48162012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
4817 Manuel López-Ibáñez <manu@gcc.gnu.org>
4818
4819 PR c++/53210
4820 * c.opt ([Winit-self]): Enabled by -Wall in C++.
4821
c583af79
AC
48222012-08-23 Arnaud Charlet <charlet@adacore.com>
4823
4824 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
4825 for pointers, and add missing Convention C pragma.
4826 (print_ada_struct_decl): Add missing aliased keyword.
4827 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
4828
1a4049e7
JJ
48292012-08-17 Jakub Jelinek <jakub@redhat.com>
4830
4831 * c-common.c (sizeof_pointer_memaccess_warning): New function.
4832 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
4833 * c-opts.c (c_common_handle_option): Enable it for -Wall.
4834 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
4835 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
4836
70b5e7dc
RG
48372012-08-10 Richard Guenther <rguenther@suse.de>
4838
4839 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
4840
f8923f7e
SB
48412012-08-07 Steven Bosscher <steven@gcc.gnu.org>
4842
4843 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
4844 instead of separate pp_newline and pp_flush.
4845 (print_c_tree): Likewise.
4846
e45abe1f
RH
48472012-07-26 Richard Henderson <rth@redhat.com>
4848
4849 * c-common.c (handle_hot_attribute): Allow labels.
4850 (handle_cold_attribute): Likewise.
4851
332f1d24
JJ
48522012-07-20 Jakub Jelinek <jakub@redhat.com>
4853
4854 PR c++/28656
4855 * c-common.c (check_function_nonnull): Handle multiple nonnull
4856 attributes properly.
4857
7ee2468b
SB
48582012-07-16 Steven Bosscher <steven@gcc.gnu.org>
4859
4860 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
4861 * c-ada-spec.c: Likewise.
4862 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
4863
ee7b28eb
SB
48642012-07-14 Steven Bosscher <steven@gcc.gnu.org>
4865
4866 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
4867 Remove code conditional on it.
4868
6bdf3519
SB
48692012-07-11 Steven Bosscher <steven@gcc.gnu.org>
4870
4871 * c-gimplify.c: Do not include basic-block.h.
4872 * c-common.c: Do not include linfuncs.h.
4873
532aafad
SB
48742012-07-08 Steven Bosscher <steven@gcc.gnu.org>
4875
4876 * c-common.h: Include tree.h.
4877
8d0d1915
JM
48782012-07-02 Jason Merrill <jason@redhat.com>
4879
4880 PR c++/53524
4881 * c-common.c (get_priority): Call default_conversion.
4882
fbc873ad
UB
48832012-07-01 Uros Bizjak <ubizjak@gmail.com>
4884
4885 * c-pch.c (c_common_write_pch): Remove unused variables.
4886
d4a10d0a
SB
48872012-06-29 Steven Bosscher <steven@gcc.gnu.org>
4888
4889 * cppspec.c: Moved from gcc/ to here.
4890
6f3a2e23
KT
48912012-06-27 Kai Tietz <ktietz@redhat.com>
4892
4893 PR preprocessor/37215
4894 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
4895
8ca92d04
SB
48962012-06-21 Steven Bosscher <steven@gcc.gnu.org>
4897
4898 * c-common.h (c_common_print_pch_checksum): Remove.
4899 * c-pch.c: Do not include output.h.
4900 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
4901 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
4902 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
4903 (struct c_pch_header): Remove.
4904 (get_ident): Update gpch version.
4905 (pch_init): Do not print executable_checksum to asm_out_file.
4906 Do not fail if there is no asm_out_file to read back from. Set
4907 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
4908 (c_common_write_pch): Verify that nothing was written to asm_out_file
4909 since pch_init was called. Do not write a c_pch_header, and do not
4910 copy from asm_out_file to the PCH.
4911 (c_common_read_pch): Do not read a c_pch_header, and do not restore
4912 the content of asm_out_file from the PCH.
4913 (c_common_print_pch_checksum): Remove.
4914 * c-opts.c (c_common_init): Print out executable_checksum directly.
4915
70f42967
SB
49162012-06-19 Steven Bosscher <steven@gcc.gnu.org>
4917
4918 * c-target.def (objc_declare_unresolved_class_reference,
4919 objc_declare_class_definition): Add new hooks.
4920
a8781821
SB
49212012-06-19 Steven Bosscher <steven@gcc.gnu.org>
4922
4923 * c-lex.c: Do not include output.h.
4924 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
4925 Remove uses of ASM_OUTPUT_IDENT.
4926
9e1a8dd1
RR
49272012-06-15 Marc Glisse <marc.glisse@inria.fr>
4928
4929 PR c++/51033
4930 * c-common.h (c_build_vec_perm_expr): Move decl here.
4931 * c-common.c (c_build_vec_perm_expr): Move definition
4932 here.
4933
6f07a821
SB
49342012-06-06 Steven Bosscher <steven@gcc.gnu.org>
4935
4936 * c.opt (fconserve-space): Turn into a no-op.
4937
9faeb493 49382012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
4939
4940 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
4941 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
4942 both the start and end of the function.
4943
a4b7d13c
SB
49442012-06-04 Steven Bosscher <steven@gcc.gnu.org>
4945
4946 * c-common.c: Do not include output.h.
4947 * c-pragma.c: Likewise.
4948
c265f413
SA
49492012-06-04 Steven Bosscher <steven@gcc.gnu.org>
4950
4951 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
4952 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
4953 (lang_decl_name): Handle namespace decls.
4954
be7a421e
SB
49552012-05-31 Steven Bosscher <steven@gcc.gnu.org>
4956
4957 * c-ada-spec.c: Do not include output.h.
4958 * c-semantics.c: Likewise.
4959
65de6659
JM
49602012-05-29 Joseph Myers <joseph@codesourcery.com>
4961
4962 * c-common.c: Fix typo.
4963
ca5f4331
MM
49642012-05-29 Michael Matz <matz@suse.de>
4965
4966 * c-common.h (c_expand_decl): Remove prototype.
4967
4f7f7aca
MLI
49682012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4969
4970 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
4971 * c-opts.c (c_common_handle_option): Remove code handling
4972 warn_missing_braces.
4973
4a792f9b
PC
49742012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
4975
4976 PR c++/25137
4977 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
4978 -Wmissing_braces.
4979
650dc14a
DS
49802012-05-22 Dodji Seketeli <dodji@redhat.com>
4981
4982 PR c++/53322
4983 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
4984
9b095bf1
MLI
49852012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
4986
4987 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
4988 * c-opts.c (c_common_handle_option): Do not handle explicitly
4989 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
4990
0b2c4be5
DS
49912012-05-16 Dodji Seketeli <dodji@redhat.com>
4992
4993 PR preprocessor/7263
4994 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
4995 to cpp_classify_number. For diagnostics, use the precise location
4996 instead of the global input_location.
4997
a1bde5af
PC
49982012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
4999
d02924ef 5000 PR c++/11856
a1bde5af
PC
5001 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
5002
d1ede5f4
BS
50032012-05-14 Bernd Schmidt <bernds@codesourcery.com>
5004
a1bde5af 5005 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 5006
f2bc201f
MLI
50072012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
5008
5009 PR 53063
5010 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
5011 Wreorder): Use LangEnabledBy.
5012 * c-opts.c (c_common_handle_option): Do not enable them
5013 explicitly. Call lang-specific generated functions.
5014 (c_common_post_options): Do not set them here.
5015
95744782
MLI
50162012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
5017
5018 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
5019 Wmissing-field-initializers,Wmissing-parameter-type,
5020 Wold-style-declaration,Woverride-init): Use EnabledBy.
5021 * c-opts.c (c_common_post_options): Do not set here explicitly.
5022
7d5a5747
MLI
50232012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
5024
5025 PR 53063
5026 * c-opts.c (c_common_handle_option): Use handle_generated_option
5027 to enable sub-options.
5028
5a3c9cf2
PC
50292012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
5030
5031 PR c++/53158
5032 * c-common.c (warnings_for_convert_and_check): Use warning_at.
5033
3ac8781c
RG
50342012-05-10 Richard Guenther <rguenther@suse.de>
5035
5036 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
5037 adjust commentary about TYPE_IS_SIZETYPE types.
5038
1e537948
MLI
50392012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5040
5041 PR c++/53261
5042 * c-common.c (warn_logical_operator): Check that argument of
5043 integer_zerop is not NULL.
5044
f2c4a785
MLI
50452012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
5046
5047 PR c/43772
5048 * c-common.c (warn_logical_operator): Do not warn if either side
5049 is already true or false.
5050
50f305ca
MLI
50512012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
5052
5053 PR c/51712
5054 * c-common.c (expr_original_type): New.
5055 (shorten_compare): Do not warn for enumeration types.
5056
0c3641b0
MLI
50572012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
5058
5059 * c.opt (fpermissive): Add Var(flag_permissive).
5060
7edaa4d2
MG
50612012-04-30 Marc Glisse <marc.glisse@inria.fr>
5062
5063 PR c++/51033
5064 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
5065 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
5066
b9c8da34
DS
50672012-04-30 Dodji Seketeli <dodji@redhat.com>
5068
5069 Add -Wvarargs option
5070 * c.opt (Wvarargs): Define new option.
5071
e6c69da0
MLI
50722012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
5073
5074 * c-common.c (check_function_arguments): Replace
5075 Wmissing-format-attribute with Wsuggest-attribute=format.
5076
90137d8f
MLI
50772012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
5078
5079 * c.opt (Wsuggest-attribute=format): New. Alias of
5080 Wmissing-format-attribute.
5081 * c-format.c (decode_format_type): Replace
5082 Wmissing-format-attribute with Wsuggest-attribute=format.
5083 (check_function_format): Likewise.
5084
9faeb493 50852012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
5086
5087 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
5088 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
5089 * c.opt: Add Wliteral-suffix.
5090
c1771a20
MLI
50912012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
5092
5093 PR c/44774
5094 * c.opt (Wpedantic): New.
5095 (pedantic): Alias Wpedantic.
5096 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
5097 (c_common_post_options): Likewise.
5098 (sanitize_cpp_opts): Likewise.
5099 * c-lex.c (interpret_float): Likewise.
5100 * c-format.c (check_format_types): Likewise.
5101 * c-common.c (pointer_int_sum): Likewise.
5102 (c_sizeof_or_alignof_type): Likewise.
5103 (c_add_case_label): Likewise.
5104 (c_do_switch_warnings): Likewise.
5105 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
5106
04b391c1
JM
51072012-04-15 Jason Merrill <jason@redhat.com>
5108
5109 PR c++/52818
5110 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
5111 (C_STD_NAME): Distinguish between C++98 and C++11.
5112
ac868f29
EB
51132012-04-11 Eric Botcazou <ebotcazou@adacore.com>
5114
5115 PR target/52624
5116 * c-common.h (uint16_type_node): Rename into...
5117 (c_uint16_type_node): ...this.
5118 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
5119 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
5120
fd4116f4
MLI
51212012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
5122
5123 * c-common.c (warn_if_unused_value): Move definition to here.
5124 * c-common.h (warn_if_unused_value): Move declaration to here.
5125
573ac65e
WB
51262012-03-23 William Bader <williambader@hotmail.com>
5127
5128 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
5129
552b8185
JM
51302012-03-20 Jason Merrill <jason@redhat.com>
5131
5132 * c-common.h (enum cxx_dialect): Add cxx1y.
5133 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
5134 test.
5135 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
5136 * c-opts.c (c_common_post_options): Likewise.
5137 (set_std_cxx1y): New.
5138 (c_common_handle_option): Call it.
5139 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
5140
04398fa8
PC
51412012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
5142
5143 PR c++/14710
5144 * c.opt ([Wuseless-cast]): Add.
5145
d2a12ae7
RG
51462012-03-16 Richard Guenther <rguenther@suse.de>
5147
5148 * c-pretty-print.c (pp_c_initializer_list): Adjust.
5149
a12bf402
MLI
51502012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
5151
5152 PR c++/44783
5153 * c.opt (ftemplate-backtrace-limit) Add.
5154
5c30094f
RO
51552012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5156
5157 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
5158 handling.
5159 * c-pragma.c (handle_pragma_extern_prefix): Remove.
5160 (init_pragma): Don't register extern_prefix.
5161
21fa2faf
RG
51622012-03-12 Richard Guenther <rguenther@suse.de>
5163
5164 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
5165 (builtin_type_for_size): Likewise.
5166
e3793c6f
JJ
51672012-02-13 Jakub Jelinek <jakub@redhat.com>
5168
5169 PR c++/52215
5170 * c-common.c (sync_resolve_params): Don't decide whether to convert
5171 or not based on TYPE_SIZE comparison, convert whenever arg_type
5172 is unsigned INTEGER_TYPE.
5173
93286335
PC
51742012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
5175
5176 PR c/52118
5177 * c.opt ([Wunused-local-typedefs]): Fix description.
5178
7a421706
MS
51792012-01-24 Mike Stump <mikestump@comcast.net>
5180
5181 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
5182 exactly.
5183
ba9b1f11
RG
51842012-01-18 Richard Guenther <rguenther@suse.de>
5185
5186 * c-opts.c (c_common_post_options): Reset LTO flags if
5187 we are about to generate a PCH.
5188
465406be
PC
51892012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
5190
5191 PR c++/51777
5192 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
5193 use pp_unsigned_wide_integer.
5194
aee15221
RG
51952012-01-10 Richard Guenther <rguenther@suse.de>
5196
5197 PR middle-end/51806
5198 * c-opts.c (c_common_handle_option): Move -Werror handling
5199 to language independent code.
5200
5720c0dc
RG
52012012-01-05 Richard Guenther <rguenther@suse.de>
5202
5203 PR middle-end/51764
5204 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
5205 from common.opt.
5206
73ac190a
PC
52072011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
5208
5209 PR c++/51316
5210 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
5211 of array types with an unknown bound.
5212
48b0b196
JM
52132011-12-20 Joseph Myers <joseph@codesourcery.com>
5214
5215 * c-common.c (flag_isoc99): Update comment to refer to C11.
5216 (flag_isoc1x): Change to flag_isoc11.
5217 * c-common.h (flag_isoc99): Update comment to refer to C11.
5218 (flag_isoc1x): Change to flag_isoc11.
5219 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
5220 C11.
5221 * c-opts.c (set_std_c1x): Change to set_std_c11.
5222 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
5223 Call set_std_c11.
5224 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
5225 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
5226 * c.opt (std=c1x): Change to std=c11. Document as non-draft
5227 standard.
5228 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
5229 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
5230 (std=gnu1x): Make alias of std=gnu11.
5231
d58d6eb5
JM
52322011-12-19 Jason Merrill <jason@redhat.com>
5233
5234 PR c++/51228
5235 * c-common.c (handle_transparent_union_attribute): Check the first
5236 field if the type is complete.
5237
b3908fcc
JW
52382011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
5239
5240 PR libstdc++/51365
5241 * c-common.c (RID_IS_FINAL): Add.
5242 * c-common.h (RID_IS_FINAL): Add.
5243
fea3ca91
IS
52442011-11-30 Iain Sandoe <iains@gcc.gnu.org>
5245
5246 * c.opt (fgnu-runtime): Provide full description.
5247 (fnext-runtime): Likewise.
5248 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
5249
62bad7cd
AM
52502011-11-28 Andrew MacLeod <amacleod@redhat.com>
5251
5252 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
5253 predefines in one place. Add LOCK_FREE predefines.
5254 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
5255 new func.
5256
c466c4ff
AM
52572011-11-24 Andrew MacLeod <amacleod@redhat.com>
5258
5259 PR c/51256
9faeb493 5260 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 5261 conditions
9faeb493
UB
5262 (resolve_overloaded_atomic_exchange,
5263 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
5264 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
5265 error_mark_node for error conditions.
9faeb493 5266
a5952633
RG
52672011-11-08 Richard Guenther <rguenther@suse.de>
5268
5269 PR middle-end/51010
5270 c-family/
5271
0a35513e
AH
52722011-11-07 Richard Henderson <rth@redhat.com>
5273 Aldy Hernandez <aldyh@redhat.com>
5274 Torvald Riegel <triegel@redhat.com>
5275
5276 Merged from transactional-memory.
5277
5278 * c-common.c (handle_tm_wrap_attribute,
5279 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
5280 (struct c_common_reswords): Added __transaction* keywords.
5281 (struct c_common_attribute_table): Added transaction* and tm_regparm
5282 attributes.
5283 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
5284 masks.
5285 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
5286 find_tm_attribute): Declare.
5287
6d87092d
JM
52882011-11-07 Jason Merrill <jason@redhat.com>
5289
5290 PR c++/35688
5291 * c-common.c, c-common.h: Revert yesterday's changes.
5292
8e7860a1
JM
52932011-11-06 Jason Merrill <jason@redhat.com>
5294
5295 PR c++/35688
5296 * c-common.c (decl_has_visibility_attr): Split out from...
5297 (c_determine_visibility): ...here.
5298 * c-common.h: Declare it.
5299
d19fa6b5
JM
53002011-11-06 Joseph Myers <joseph@codesourcery.com>
5301
5302 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
5303 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
5304 type.
5305 (check_user_alignment): New. Split out of
5306 handle_aligned_attribute. Disallow integer constants with
5307 noninteger types. Conditionally allow zero.
5308 (handle_aligned_attribute): Use check_user_alignment.
5309 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
5310
86951993
AM
53112011-11-06 Andrew MacLeod <amacleod@redhat.com>
5312 Richard Henderson <rth@redhat.com>
5313
5314 Merged from cxx-mem-model.
5315
5316 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 5317 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
5318 parameters that are the same type size.
5319 (get_atomic_generic_size): New. Find size of generic
5320 atomic function parameters and do typechecking.
5321 (add_atomic_size_parameter): New. Insert size into parameter list.
5322 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
5323 either __atomic_exchange_n or external library call.
9faeb493 5324 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 5325 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 5326 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
5327 __atomic_load_n or an external library call.
5328 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
5329 __atomic_store_n or an external library call.
5330 (resolve_overloaded_builtin): Handle new __atomic builtins.
5331
cf9e9959
EB
53322011-11-04 Eric Botcazou <ebotcazou@adacore.com>
5333
5334 PR c++/50608
5335 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
5336 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
5337 <INDIRECT_REF>: Return the argument.
5338 <ARRAY_REF>: Remove special code for negative offset.
5339 Call fold_build_pointer_plus instead of size_binop.
5340 (fold_offsetof): Remove STOP_REF argument and adjust.
5341 * c-common.h (fold_offsetof_1): Declare.
5342 (fold_offsetof): Remove STOP_REF argument.
5343
25339f10
JM
53442011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
5345
5346 PR c++/50810
5347 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
5348 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
5349 Wnarrowing for C++0x and C++98.
5350 * c.opt ([Wnarrowing]): Update.
5351
89401152
PC
53522011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
5353
5354 PR c++/44277
5355 * c.opt: Add Wzero-as-null-pointer-constant.
5356
97e3ad20
JM
53572011-10-31 Jason Merrill <jason@redhat.com>
5358
15694fdd
JM
5359 * c.opt (-fdeduce-init-list): Off by default.
5360
97e3ad20
JM
5361 PR c++/50920
5362 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
5363 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
5364 and -Wc++11-compat.
5365 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
5366
fb9120e3
RAV
53672011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
5368
5369 PR c++/30066
5370 * c.opt (fvisibility-inlines-hidden): Description change.
5371
3ce4f9e4
ESR
53722011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
5373
5374 Implement C++11 user-defined literals.
5375 * c-common.c (build_userdef_literal): New.
5376 * c-common.def: New tree code.
5377 * c-common.h (tree_userdef_literal): New tree struct and accessors.
5378 * c-lex.c (interpret_float): Add suffix parm.
5379 (c_lex_with_flags): Build literal tokens.
5380
5f53c243
PC
53812011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
5382
5383 PR c++/50841
5384 Revert:
5385 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
5386
5387 PR c++/50810
5388 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
5389 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
5390 Wnarrowing for C++0x and C++98.
5391 * c.opt ([Wnarrowing]): Update.
5392
263734e1
PC
53932011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
5394
5395 PR c++/50810
5396 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
5397 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
5398 Wnarrowing for C++0x and C++98.
5399 * c.opt ([Wnarrowing]): Update.
5400
d2e312d7
PC
54012011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
5402
5403 PR c++/45385
5404 * c-common.c (conversion_warning): Remove code looking for
5405 artificial operands.
5406
d17687f6
DS
54072011-10-18 Dodji Seketeli <dodji@redhat.com>
5408
5409 PR bootstrap/50760
5410 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 5411 !NO_IMPLICIT_EXTERN_C.
d17687f6 5412
fc8396e9
PC
54132011-10-17 Michael Spertus <mike_spertus@symantec.com>
5414
5415 * c-common.c (c_common_reswords): Add __bases,
5416 __direct_bases.
5417 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
5418
54192011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
5420
5421 PR c++/50757
5422 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
5423
847e697a
TT
54242011-10-15 Tom Tromey <tromey@redhat.com>
5425 Dodji Seketeli <dodji@redhat.com>
5426
5427 * c.opt (fdebug-cpp): New option.
5428 * c-opts.c (c_common_handle_option): Handle the option.
5429 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
5430 output stream in parameter. Factorized from ...
5431 (maybe_print_line): ... this. Dump location debug information when
5432 -fdebug-cpp is in effect.
5433 (print_line_1): New static function. Takes an output stream in
5434 parameter. Factorized from ...
5435 (print_line): ... here. Dump location information when -fdebug-cpp
5436 is in effect.
5437 (scan_translation_unit): Dump location information when
5438 -fdebug-cpp is in effect.
5439
92582b75
TT
54402011-10-15 Tom Tromey <tromey@redhat.com>
5441 Dodji Seketeli <dodji@redhat.com>
5442
5443 * c.opt (ftrack-macro-expansion): New option. Handle it with and
5444 without argument.
5445 * c-opts.c (c_common_handle_option)<case
5446 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
5447 cases. Handle -ftrack-macro-expansion with and without argument.
5448
46427374
TT
54492011-10-15 Tom Tromey <tromey@redhat.com>
5450 Dodji Seketeli <dodji@redhat.com>
5451
5452 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
5453 (print_line, cb_define, do_line_change): Adjust to avoid touching
5454 the internals of struct line_map. Use the public API instead.
5455 * c-pch.c (c_common_read_pch): Likewise.
5456 * c-lex.c (fe_file_change): Likewise.
5457
fc8396e9
PC
54582011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
5459
5460 PR c++/17212
5461 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
5462
54632011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
5464
5465 PR c++/33067
5466 * c-pretty-print.c (pp_c_floating_constant): Output
5467 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
5468
e79983f4
MM
54692011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
5470
5471 * c-common.c (def_builtin_1): Delete old interface with two
5472 parallel arrays to hold standard builtin declarations, and replace
5473 it with a function based interface that can support creating
5474 builtins on the fly in the future. Change all uses, and poison
5475 the old names. Make sure 0 is not a legitimate builtin index.
5476 * c-omp.c (c_finish_omp_barrier): Ditto.
5477 (c_finish_omp_taskwait): Ditto.
5478 (c_finish_omp_flush): Ditto.
5479
6637388f
TG
54802011-10-11 Tristan Gingold <gingold@adacore.com>
5481
5482 * c.opt: (fallow-parameterless-variadic-functions): New.
5483
3797cb21
DS
54842011-09-08 Dodji Seketeli <dodji@redhat.com>
5485
5486 PR c++/33255 - Support -Wunused-local-typedefs warning
5487 * c-common.h (struct c_language_function::local_typedefs): New
5488 field.
9faeb493
UB
5489 (record_locally_defined_typedef, maybe_record_typedef_use)
5490 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 5491 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
5492 (maybe_record_typedef_use)
5493 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
5494 * c.opt: Declare new -Wunused-local-typedefs flag.
5495
693ddb1b
EB
54962011-09-06 Eric Botcazou <ebotcazou@adacore.com>
5497
5498 PR middle-end/50266
5499 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
5500 computations.
5501
830c740f
RG
55022011-09-05 Richard Guenther <rguenther@suse.de>
5503
5504 * c-common.c (complete_array_type): Use ssize_int (-1) instead
5505 of integer_minus_one_node for empty array upper bounds.
5506
892a371f
DS
55072011-08-28 Dodji Seketeli <dodji@redhat.com>
5508
5509 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
5510 it's the first time it's being called on this main TU.
5511
0e3fdb48
RB
55122011-08-24 Richard Guenther <rguenther@suse.de>
5513
5514 PR c/49396
5515 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
5516
55172011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
5518
5519 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
5520 defined in cpp_init_builtins and c_cpp_builtins.
5521
d4a83c10
JM
55222011-08-19 Joseph Myers <joseph@codesourcery.com>
5523
5524 * c-common.c (c_common_reswords): Add __builtin_complex.
5525 * c-common.h (RID_BUILTIN_COMPLEX): New.
5526
bbceee64
JM
55272011-08-18 Joseph Myers <joseph@codesourcery.com>
5528
5529 * c-common.c (c_common_reswords): Add _Noreturn.
5530 (keyword_is_function_specifier): Handle RID_NORETURN.
5531 * c-common.h (RID_NORETURN): New.
5532
3f8257db 55332011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
5534
5535 * c-common.c (unsafe_conversion_p): New function. Check if it is
5536 unsafe to convert an expression to the type.
5537 (conversion_warning): Adjust, use unsafe_conversion_p.
5538 * c-common.h (unsafe_conversion_p): New function declaration.
5539
20906c66
JJ
55402011-08-02 Jakub Jelinek <jakub@redhat.com>
5541
5542 * c-common.h (c_finish_omp_atomic): Adjust prototype.
5543 (c_finish_omp_taskyield): New prototype.
5544 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
5545 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
5546 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
5547 or RHS1 have side-effects, evaluate those too in the right spot,
5548 if it is a decl and LHS is also a decl, error out if they
5549 aren't the same.
5550 (c_finish_omp_taskyield): New function.
5551 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
5552 * c-pragma.c (omp_pragmas): Add taskyield.
5553 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
5554 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
5555 PRAGMA_OMP_CLAUSE_MERGEABLE.
5556
770e5a2e
DS
55572011-07-25 Dodji Seketeli <dodji@redhat.com>
5558
5559 * c-common.h (set_underlying_type): Remove parm name from
5560 declaration.
5561
1baae426
RG
55622011-07-25 Romain Geissler <romain.geissler@gmail.com>
5563
5564 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 5565
fcb21722
JM
55662011-07-22 Jason Merrill <jason@redhat.com>
5567
76f86d00
JM
5568 PR c++/49793
5569 * c.opt (Wnarrowing): New.
5570
3a636414
JM
5571 PR c++/30112
5572 * c-common.h: Declare c_linkage_bindings.
5573 * c-pragma.c (handle_pragma_redefine_extname): Use it.
5574
fcb21722
JM
5575 PR c++/49813
5576 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
5577 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
5578 as flag_isoc99 for 'restrict'.
5579 (pp_c_specifier_qualifier_list): Likewise for _Complex.
5580
02614448
ILT
55812011-07-21 Ian Lance Taylor <iant@google.com>
5582
5583 PR middle-end/49705
5584 * c-common.c (c_disable_warnings): New static function.
5585 (c_enable_warnings): New static function.
5586 (c_fully_fold_internal): Change local unused_p to bool. Call
5587 c_disable_warnings and c_enable_warnings rather than change
5588 c_inhibit_evaluation_warnings.
5589
34429675
JM
55902011-07-20 Jason Merrill <jason@redhat.com>
5591
5592 PR c++/6709 (DR 743)
5593 PR c++/42603 (DR 950)
5594 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
5595 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
5596 (CPP_DECLTYPE): New.
5597 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
5598
5d49b6a7
RG
55992011-07-19 Richard Guenther <rguenther@suse.de>
5600
5601 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
5602 * c-omp.c (c_finish_omp_for): Likewise.
5603
e84a58ff
EB
56042011-07-12 Eric Botcazou <ebotcazou@adacore.com>
5605
5606 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
5607 body on the next line.
5608
329af3c7
JM
56092011-07-08 Jason Merrill <jason@redhat.com>
5610
4063e61b
JM
5611 PR c++/45437
5612 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
5613
329af3c7
JM
5614 PR c++/49673
5615 * c-common.c (c_apply_type_quals_to_decl): Don't check
5616 TYPE_NEEDS_CONSTRUCTING.
5617
1a072294
RG
56182011-07-06 Richard Guenther <rguenther@suse.de>
5619
5620 * c-common.c (c_common_nodes_and_builtins):
5621 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
5622
fce5dddd
RG
56232011-07-05 Richard Guenther <rguenther@suse.de>
5624
5625 * c-common.c (c_common_nodes_and_builtins): Build all common
5626 tree nodes first.
5627
45d439ac
JJ
56282011-06-27 Jakub Jelinek <jakub@redhat.com>
5629
56300785
JJ
5630 * c-common.h (c_tree_chain_next): New static inline function.
5631
45d439ac
JJ
5632 * c-common.c (check_builtin_function_arguments): Handle
5633 BUILT_IN_ASSUME_ALIGNED.
5634
e0a8ecf2
AM
56352011-06-21 Andrew MacLeod <amacleod@redhat.com>
5636
5637 * c-common.c: Add sync_ or SYNC__ to builtin names.
5638 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
5639
56402011-06-20 Pierre Vittet <piervit@pvittet.com>
5641
5642 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
5643 handler.
5644 (gen_pragma_handler): New union.
5645 (internal_pragma_handler): New type.
5646 (c_register_pragma_with_data)
5647 (c_register_pragma_with_expansion_and_data): New functions.
5648
5649 * c-pragma.c (registered_pragmas, c_register_pragma_1)
5650 (c_register_pragma, c_register_pragma_with_expansion)
5651 (c_invoke_pragma_handler): Changed to work with
5652 internal_pragma_handler.
5653 (c_register_pragma_with_data)
5654 (c_register_pragma_with_expansion_and_data): New functions.
5655
677f3fa8
JM
56562011-06-14 Joseph Myers <joseph@codesourcery.com>
5657
5658 * c-common.c: Include common/common-target.h.
5659 (handle_section_attribute): Use
5660 targetm_common.have_named_sections.
5661 * c-cppbuiltin.c: Include common/common-target.h.
5662 (c_cpp_builtins): Use targetm_common.except_unwind_info.
5663
d7fc8c14
RG
56642011-06-10 Richard Guenther <rguenther@suse.de>
5665
5666 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
5667 to print a IDENTIFIER_NODE.
5668
10e48e39
RO
56692011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5670 Joseph Myers <joseph@codesourcery.com>
5671
5672 * c.opt (fbuilding-libgcc): New option.
5673 * c-cppbuiltin.c (c_cpp_builtins): Define
5674 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
5675
6976ae51
JM
56762011-06-07 Jason Merrill <jason@redhat.com>
5677
3ff60975
JM
5678 * c-common.c (max_tinst_depth): Lower default to 900.
5679
6976ae51
JM
5680 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
5681
009db074
RG
56822011-06-07 Richard Guenther <rguenther@suse.de>
5683
5684 * c-common.c (c_common_nodes_and_builtins): Do not set
5685 size_type_node or call set_sizetype.
5686
b4592b92
DS
56872011-06-07 Dodji Seketeli <dodji@redhat.com>
5688
5689 PR debug/49130
5690 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 5691 type when using pointer comparison to compare types.
b4592b92 5692
014ab419
JW
56932011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
5694
5695 * c.opt: Add -Wdelete-non-virtual-dtor.
5696 * c-opts.c (c_common_handle_option): Include it in -Wall.
5697
4f60111f
NF
56982011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
5699
5700 PR bootstrap/49190
5701
5702 Revert:
5703 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
5704
5705 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
5706 not tree_common.
5707
4cc4f2f4
JJ
57082011-05-27 Jakub Jelinek <jakub@redhat.com>
5709
5710 PR c++/49165
5711 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
5712 C++ don't call c_common_truthvalue_conversion on void type arms.
5713
38e01f9e
NF
57142011-05-27 Nathan Froyd <froydnj@codesourcery.com>
5715
5716 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
5717 (stmt_list_stack): Define.
5718 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
5719 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
5720
92e948a8
NF
57212011-05-26 Nathan Froyd <froydnj@codesourcery.com>
5722
5723 * c-common.c (warning_candidate_p): Check for BLOCKs.
5724
a2fc3e63
NF
57252011-05-26 Nathan Froyd <froydnj@codesourcery.com>
5726
5727 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
5728 not tree_common.
5729
0957c029
JJ
57302011-05-25 Jakub Jelinek <jakub@redhat.com>
5731
5732 * c-common.c (def_fn_type): Remove extra va_end.
5733
828fb3ba
JM
57342011-05-23 Jason Merrill <jason@redhat.com>
5735
5736 PR c++/48106
5737 * c-common.c (c_common_get_narrower): New.
5738 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
5739
dde05067
NF
57402011-05-23 Nathan Froyd <froydnj@codesourcery.com>
5741
5742 * c-common.h (check_function_arguments): Tweak prototype of
5743 check_function_arguments.
5744 * c-common.c (check_function_arguments): Likewise. Adjust
5745 calls to check_function_nonnull, check_function_format, and
5746 check_function_sentinel.
5747 (check_function_sentinel): Take a FUNCTION_TYPE rather than
5748 separate attributes and typelist arguments. Use
5749 FOREACH_FUNCTION_ARGS to iterate over argument types.
5750
3c0d13bf
PC
57512011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
5752
5753 * c-common.c (c_common_reswords): Reorder.
5754 * c-common.h (rid): Likewise.
5755
8242dd04
NF
57562011-05-10 Nathan Froyd <froydnj@codesourcery.com>
5757
5758 * c-common.c (def_fn_type): Don't call build_function_type, call
5759 build_function_type_array or build_varargs_function_type_array
5760 instead.
5761 (c_common_nodes_and_builtins): Likewise.
5762
3d528853
NF
57632011-05-05 Nathan Froyd <froydnj@codesourcery.com>
5764
5765 * c-common.c (c_add_case_label): Omit the loc argument to
5766 build_case_label.
5767 * c-common.h (build_case_label): Remove.
5768 * c-semantics.c (build_case_label): Remove.
5769
a04a722b
JM
57702011-05-05 Joseph Myers <joseph@codesourcery.com>
5771
5772 * c-objc.h (objc_start_method_definition): Update prototype.
5773 * stub-objc.c (objc_start_method_definition): Add extra parameter.
5774
e19a18d4
NF
57752011-05-04 Nathan Froyd <froydnj@codesourcery.com>
5776
5777 * c-common.c (check_main_parameter_types): Reindent. Don't use
5778 TYPE_ARG_TYPES directly.
5779 (handle_nonnull_attribute): Likewise.
5780 (sync_resolve_params): Likewise.
5781 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
5782 to check_format_string.
5783 (handle_format_attribute): Likewise.
5784 (check_format_string): Take a function type to examine instead of
5785 a type list. Use a function_arg_iterator to step through argument
5786 types.
5787
c62c040f
RG
57882011-05-04 Richard Guenther <rguenther@suse.de>
5789
5790 * c-common.c (fix_string_type): Use size_int for index type bounds.
5791 (start_fname_decls): Do not pass NULL to build_int_cst.
5792 (c_init_attributes): Likewise.
5793 * c-lex.c (c_lex_with_flags): Likewise.
5794
c12ff9d8
JM
57952011-04-27 Jason Merrill <jason@redhat.com>
5796
5797 * c-common.c (make_tree_vector_from_list): New.
5798 * c-common.h: Declare it.
5799
304dfbe3
RG
58002011-04-26 Richard Guenther <rguenther@suse.de>
5801
5802 PR preprocessor/48248
5803 * c-ppoutput.c (maybe_print_line): Always optimize newlines
5804 for output size with -P.
5805
3c0d13bf
PC
58062011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
5807
5808 * c-common.c (struct c_common_resword): Add __underlying_type.
5809 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
5810
04695783
JM
58112011-04-20 Jim Meyering <meyering@redhat.com>
5812
5813 * c-format.c (init_dollar_format_checking): Remove useless
5814 if-before-free.
5815
0dc33c3c
NP
58162011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
5817
5818 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 5819 (objc_detect_field_duplicates): New.
0dc33c3c 5820 * stub-objc.c: Likewise.
3c0d13bf 5821
c59633d9
NP
58222011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
5823
5824 * stub-objc.c (objc_declare_protocols): Renamed to
5825 objc_declare_protocol.
5826 * c-objc.h: Likewise.
3c0d13bf 5827
32dabdaf
NP
58282011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
5829
5830 * stub-objc.c (objc_declare_class): Updated argument name.
5831
81f653d6
NF
58322011-04-12 Nathan Froyd <froydnj@codesourcery.com>
5833
5834 * c-common.h (c_common_init_ts): Declare.
5835 * c-common.c (c_common_init_ts): Define.
5836
eb345401
NP
58372011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
5838
5839 * c-objc.h (objc_build_message_expr): Updated prototype.
5840 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 5841
a358e188
MJ
58422011-04-12 Martin Jambor <mjambor@suse.cz>
5843
5844 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
5845 of cgraph_node.
5846
e6313a78
RG
58472011-04-11 Richard Guenther <rguenther@suse.de>
5848
5849 * c-common.c (complete_array_type): Build a range type of
5850 proper type.
5851
dcf0c47e
NF
58522011-04-08 Nathan Froyd <froydnj@codesourcery.com>
5853
5854 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
5855 (handle_type_generic_attribute): Likewise.
5856
1ee44b26
JM
58572011-04-07 Jason Merrill <jason@redhat.com>
5858
5859 PR c++/48450
5860 * c-common.c (c_common_truthvalue_conversion): Don't ignore
5861 conversion from C++0x scoped enum.
5862
acce4e77
JM
58632011-04-06 Joseph Myers <joseph@codesourcery.com>
5864
5865 * c-target-def.h: New file.
5866 * c-target.def: New file.
5867 * c-target.h: New file.
5868 * c-common.c (targetcm): Don't define here.
5869 * c-common.h (default_handle_c_option): Declare.
5870 * c-format.c: Include c-target.h instead of target.h.
5871 * c-opts.c: Include c-target.h instead of target.h. Explicitly
5872 include tm.h.
5873 (default_handle_c_option): Move from targhooks.c.
5874
e2eefb55
JJ
58752011-03-29 Jakub Jelinek <jakub@redhat.com>
5876
5877 PR preprocessor/48248
5878 * c-ppoutput.c (print): Add src_file field.
5879 (init_pp_output): Initialize it.
5880 (maybe_print_line): Don't optimize by adding up to 8 newlines
5881 if map->to_file and print.src_file are different file.
5882 (print_line): Update print.src_file.
5883
ba78087b
KT
58842011-03-25 Kai Tietz <ktietz@redhat.com>
5885
5886 * c-ada-spec.c (compare_comment): Use filename_cmp
5887 instead of strcmp for filename.
5888
0edf1bb2
JL
58892011-03-25 Jeff Law <law@redhat.com>
5890
adfac8df 5891 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 5892
c7dc8804
JM
58932011-03-25 Jason Merrill <jason@redhat.com>
5894
5895 * c.opt: Add -std=c++03.
5896
d1d879b1
EB
58972011-03-22 Eric Botcazou <ebotcazou@adacore.com>
5898
5899 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
5900
3f8257db 59012011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
5902
5903 PR target/12171
5050afdf
KT
5904 * c-pretty-print.c (pp_c_specifier_qualifier_list):
5905 Display allowed attributes for function pointer types.
5906 (pp_c_attributes_display): New function to display
5907 attributes having affects_type_identity flag set to true.
5908 * c-pretty-print.h (pp_c_attributes_display): New prototype.
5909
62d784f7
KT
5910 * c-common.c (c_common_attribute_table):
5911 Add new element.
5912 (c_common_format_attribute_table): Likewise.
5913
82d37118
JM
59142011-03-18 Jason Merrill <jason@redhat.com>
5915
49a000c3
JM
5916 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
5917 * c-common.h: Don't declare it here.
5918 * c-common.c: Or define it here.
5919 * c-opts.c (c_common_handle_option): Or set it here.
5920
82d37118
JM
5921 PR c++/35315
5922 * c-common.c (handle_transparent_union_attribute): Don't
5923 make a duplicate type in C++.
5924
17bc631c
JM
59252011-03-15 Jason Merrill <jason@redhat.com>
5926
5927 * c-common.c (max_constexpr_depth): New.
5928 * c-common.h: Declare it.
5929 * c-opts.c (c_common_handle_option): Set it.
5930 * c.opt (fconstexpr-depth): New option.
5931
1b9b91a6
JM
59322011-03-11 Jason Merrill <jason@redhat.com>
5933
f231b5ff
JM
5934 * c-common.c (attribute_takes_identifier_p): Add missing const.
5935
1b9b91a6
JM
5936 PR c++/46803
5937 * c-common.c (attribute_takes_identifier_p): Assume that an
5938 unknown attribute takes an identifier.
5939
a19e4d44
NF
59402011-03-07 Nathan Froyd <froydnj@codesourcery.com>
5941
5942 PR c/47786
5943 * c-common.c (c_type_hash): Call list_length instead of iterating
5944 through DECL_CHAIN. Rename 'i' to 'n_elements'.
5945
982d62f6
JJ
59462011-02-19 Jakub Jelinek <jakub@redhat.com>
5947
5948 PR c/47809
5949 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
5950
0a256240
NP
59512011-02-17 Iain Sandoe <iains@gcc.gnu.org>
5952
5953 * c.opt (fobjc-abi-version=) New.
5954 (fobjc-nilcheck): New.
5955
ba9e6dd5
NF
59562011-02-03 Nathan Froyd <froydnj@codesourcery.com>
5957
5958 PR c++/46890
5959 * c-common.h (keyword_is_decl_specifier): Declare.
5960 * c-common.c (keyword_is_decl_specifier): Define.
5961 (keyword_is_function_specifier): New function.
5962
7273813a
JJ
59632011-01-26 Jakub Jelinek <jakub@redhat.com>
5964
5965 PR c/47473
5966 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
5967 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
5968 REAL_TYPE.
5969
908ef79b
AC
59702011-01-26 Arnaud Charlet <charlet@adacore.com>
5971
5972 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
5973
237e9384
JJ
59742011-01-26 Jakub Jelinek <jakub@redhat.com>
5975
5976 PR pch/47430
5977 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
5978 after init_c_lex if pch_file is set.
5979
47ea1edf
DK
59802011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
5981
d4dba752 5982 PR c++/43601
47ea1edf
DK
5983 * c.opt (-fkeep-inline-dllexport): New switch.
5984
2aa9c6ae
RG
59852011-01-12 Richard Guenther <rguenther@suse.de>
5986
5987 PR middle-end/32511
5988 * c-common.c (handle_weak_attribute): Warn instead of error
5989 on declaring an inline function weak.
5990
7bd11157
TT
59912011-01-05 Tom Tromey <tromey@redhat.com>
5992
5993 * c-common.h (lvalue_error): Update.
5994 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
5995 not error.
5996
0e66e494 59972010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 5998
b4f588c4
NP
5999 PR objc/47075
6000 * c-objc.h (objc_finish_message_expr): Added argument to
6001 prototype.
6002
f4da8dce
NF
60032010-12-22 Nathan Froyd <froydnj@codesourcery.com>
6004
6005 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
6006 Use prototype_p.
6007
46270f14
NP
60082010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
6009
6010 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 6011 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 6012
4816c593
NF
60132010-12-10 Nathan Froyd <froydnj@codesourcery.com>
6014
6015 * c-common.h (readonly_error): Declare.
6016 * c-common.c (readonly_error): Define.
6017
7a6daeb0
NF
60182010-12-09 Nathan Froyd <froydnj@codesourcery.com>
6019
6020 * c-common.h (invalid_indirection_error): Declare.
6021 * c-common.c (invalid_indirection_error): Define.
6022
892f6119
RG
60232010-12-03 Richard Guenther <rguenther@suse.de>
6024
6025 PR c/46745
6026 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
6027 (pp_c_unary_expression): Likewise.
6028 (pp_c_expression): Likewise.
6029
6c39e757
NP
60302010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
6031
6032 * c-common.h (objc_finish_function): New.
6033 (objc_non_volatilized_type): Removed.
6034 (objc_type_quals_match): Removed.
6035 * stub-objc.c (objc_finish_function): New.
6036 (objc_non_volatilized_type): Removed.
6037 (objc_type_quals_match): Removed.
9faeb493 6038
7c475d11
JM
60392010-11-30 Joseph Myers <joseph@codesourcery.com>
6040
6041 * c-common.h (parse_optimize_options): Declare.
6042 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
6043 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
6044
71f3e391
JM
60452010-11-29 Joseph Myers <joseph@codesourcery.com>
6046
6047 * c-opts.c (check_deps_environment_vars): Use getenv instead of
6048 GET_ENVIRONMENT.
6049 * c-pch.c (O_BINARY): Don't define here.
6050 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
6051
d5fabb58
JM
60522010-11-25 Joseph Myers <joseph@codesourcery.com>
6053
6054 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
6055 targetm.except_unwind_info.
6056
299404a1
JM
60572010-11-23 Joseph Myers <joseph@codesourcery.com>
6058
6059 * c-opts.c (c_common_handle_option): Pass location to
6060 set_struct_debug_option.
6061
c98cd5bf
JM
60622010-11-23 Joseph Myers <joseph@codesourcery.com>
6063
6064 * c-common.c (visibility_options): Move from ../opts.c.
6065 * c-common.h (struct visibility_flags, visibility_options):
6066 Declare here.
6067 * c-opts.c (finish_options): Rename to c_finish_options.
6068 (c_common_init): Update call to finish_options.
6069
a9546771
NP
60702010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
6071
6072 PR objc/34033
6073 * c-lex.c (lex_string): Check that each string in an Objective-C
6074 string concat sequence starts with either one or zero '@', and
6075 that there are no spurious '@' signs at the end.
6076
24a57808
JM
60772010-11-20 Joseph Myers <joseph@codesourcery.com>
6078
6079 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
6080 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
6081 HANDLE_PRAGMA_VISIBILITY.
6082 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
6083 HANDLE_PRAGMA_VISIBILITY): Don't define.
6084 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
6085
a9aa2c3a
NF
60862010-11-20 Nathan Froyd <froydnj@codesourcery.com>
6087
6088 PR c++/16189
6089 PR c++/36888
6090 PR c++/45331
6091 * c-common.h (keyword_begins_type_specifier): Declare.
6092 (keyword_is_storage_class_specifier): Declare.
6093 (keyword_is_type_qualifier): Declare.
6094 * c-common.c (keyword_begins_type_specifier): New function.
6095 (keyword_is_storage_class_specifier): New function.
6096 (keyword_is_type_qualifier): Declare.
6097
5386338c
JM
60982010-11-19 Joseph Myers <joseph@codesourcery.com>
6099
6100 PR c/46547
6101 * c-common.c (in_late_binary_op): Define.
6102 (c_common_truthvalue_conversion): Check in_late_binary_op before
6103 calling c_save_expr.
6104 * c-common.h (in_late_binary_op): Declare.
6105
69ccdddb
JM
61062010-11-19 Joseph Myers <joseph@codesourcery.com>
6107
6108 * c-opts.c (c_common_handle_option): Update calls to
6109 set_struct_debug_option.
6110
6b192a09
NP
61112010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
6112
6113 * c-common.h (objc_declare_protocols): Added additional argument.
6114 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 6115
fb52b50a
NF
61162010-11-18 Nathan Froyd <froydnj@codesourcery.com>
6117
6118 PR c/33193
6119 * c-common.h (build_real_imag_expr): Declare.
6120 * c-semantics.c (build_real_imag_expr): Define.
6121
b37421c6
JM
61222010-11-17 Joseph Myers <joseph@codesourcery.com>
6123
6124 * c-opts.c (c_common_parse_file): Take no arguments.
6125 * c-common.h (c_common_parse_file): Update prototype.
6126
07078664
JJ
61272010-11-16 Jakub Jelinek <jakub@redhat.com>
6128
6129 PR c++/46401
6130 * c-common.c (warning_candidate_p): Don't track non-const calls
6131 or STRING_CSTs.
6132
c6a13190
ILT
61332010-11-15 Ian Lance Taylor <iant@google.com>
6134
6135 * c-lex.c (init_c_lex): Set macro debug callbacks if
6136 flag_dump_go_spec is set.
6137
925e8657
NP
61382010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
6139
6140 * c-common.h (objc_build_incr_expr_for_property_ref): New.
6141 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
6142
bb0a9581
NF
61432010-11-15 Nathan Froyd <froydnj@codesourcery.com>
6144
6145 PR preprocessor/45038
6146 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
6147 dialects.
6148
c5fa0890
JM
61492010-11-12 Joseph Myers <joseph@codesourcery.com>
6150
6151 * c-common.h (c_family_lang_mask): Declare.
6152 * c-opts.c (c_family_lang_mask): Make extern.
6153 * c-pragma.c (handle_pragma_diagnostic): Use
6154 control_warning_option.
6155
a4d8c676
JM
61562010-11-12 Joseph Myers <joseph@codesourcery.com>
6157
6158 * c-common.c (parse_optimize_options): Update call to
6159 decode_options.
6160 * c-common.h (c_common_handle_option): Update prototype.
6161 * c-opts.c (c_common_handle_option): Take location_t parameter and
6162 pass it to other functions.
6163
f954bd2c
JM
61642010-11-11 Joseph Myers <joseph@codesourcery.com>
6165
6166 * c-opts.c (warning_as_error_callback): Remove.
6167 (c_common_initialize_diagnostics): Don't call
6168 register_warning_as_error_callback.
6169 (c_common_handle_option): Handle -Werror=normalized= here.
6170
d8a07487
JM
61712010-11-10 Joseph Myers <joseph@codesourcery.com>
6172
6173 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
6174 in diagnostic.
6175 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
6176 letter.
6177 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
6178 Remove trailing '.' from diagnostics.
6179 * c.opt (Wwrite-strings_: Avoid '`' in help text.
6180
d5478783
JM
61812010-11-10 Joseph Myers <joseph@codesourcery.com>
6182
6183 * c-common.c (parse_optimize_options): Pass global_dc to
6184 decode_options.
6185 * c-opts.c (c_common_handle_option): Pass &global_options to
6186 set_Wstrict_aliasing.
6187 * c.opt (v): Don't mark Common or document here.
6188
91ebb981
IS
61892010-11-06 Iain Sandoe <iains@gcc.gnu.org>
6190
6191 PR target/44981
6192 * c-format.c (format_type): New type gcc_objc_string_format_type.
6193 (valid_stringptr_type_p): New.
6194 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 6195 (check_format_string): Pass expected type, use
91ebb981
IS
6196 valid_stringptr_type_p (), check that the format string types are
6197 consistent with the format specification.
6198 (decode_format_attr): Warn if NSString is used outside objective-c.
6199 (format_types_orig): Add NSString.
6200 (format_name): New.
6201 (format_flags): New.
6202 (check_format_arg): Handle format strings requiring an external parser.
6203 first_target_format_type: New variable.
6204 (handle_format_attribute): Set up first_target_format_type, pass the
6205 expected format arg string type to check_format_string().
6206 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
6207 * stub-objc.c (objc_string_ref_type_p): New.
6208 (objc_check_format_arg): New.
6209
bede2adc
NP
62102010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
6211
9faeb493 6212 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
6213 * c-common.h (objc_build_class_component_ref): New.
6214 * stub-objc.c (objc_build_class_component_ref): New.
6215
9a179d01
NP
62162010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
6217
6218 * c.opt (Wproperty-assign-default): New option.
6219
22d8d616
NP
62202010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
6221
6222 Implemented -fobjc-std=objc1 flag.
6223 * c.opt (fobjc-std=objc1): New option.
6224
2debdb4f
NP
62252010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
6226
6227 Implemented format and noreturn attributes for Objective-C methods.
6228 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
6229 attribute for Objective-C methods.
6230
ec52b111
JM
62312010-10-31 Jason Merrill <jason@redhat.com>
6232
6233 * c-common.c (conversion_warning, warn_for_collisions_1): Use
6234 EXPR_LOC_OR_HERE.
6235
46a88c12
NP
62362010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
6237
6238 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
6239 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
6240 (objc_add_property_declaration): Removed arguments for copies and
6241 ivar.
6242 (objc_build_getter_call): Renamed to
6243 objc_maybe_build_component_ref.
6244 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
6245 (objc_is_property_ref): New.
6246 * c-common.c (c_common_reswords): Removed copies and ivar.
6247 * stub-objc.c (objc_add_property_declaration): Removed arguments
6248 for copies and ivar.
6249 (objc_build_getter_call): Renamed to
6250 objc_maybe_build_component_ref.
6251 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
6252 (objc_is_property_ref): New.
9faeb493 6253
1e4bf85b
AC
62542010-10-29 Arnaud Charlet <charlet@adacore.com>
6255 Matthew Gingell <gingell@adacore.com>
6256
6257 * c-ada-spec.c (separate_class_package): New function.
6258 (pp_ada_tree_identifier): Prefix references to C++ classes with the
6259 name of their enclosing package.
6260 (print_ada_declaration): Use separate_class_package.
6261
81f0bab2
JM
62622010-10-27 Jason Merrill <jason@redhat.com>
6263
2b08f2c5
JM
6264 * c-common.c (c_common_reswords): Add __is_literal_type.
6265 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
6266
81f0bab2
JM
6267 * c-common.c (check_case_value): Remove special C++ code.
6268
200290f2
NP
62692010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
6270
6271 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
6272 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
6273 and RID_LAST_PATTR.
6274 (objc_add_property_declaration): Added additional arguments.
6275 (objc_property_attribute_kind): Removed.
6276 (objc_set_property_attr): Removed.
6277 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
6278 copy and nonatomic.
6279 * stub-objc.c (objc_add_property_declaration): Added additional
6280 arguments.
6281 (objc_set_property_attr): Removed.
9faeb493 6282
f614132b
NP
62832010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
6284
6285 * c-common.h (objc_add_property_variable): Renamed to
6286 objc_add_property_declaration. Added location argument.
6287 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 6288
b8a18805
NP
62892010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
6290
6291 * c-common.h (objc_maybe_printable_name): New.
6292 * stub-objc.c (objc_maybe_printable_name): New.
6293
3f8257db
JJ
62942010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
6295 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
6296
6297 * c-common.h (c_common_mark_addressable_vec): Declare.
6298 * c-common.c (c_common_mark_addressable_vec): New function.
6299
249a82c4
NP
63002010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
6301
6302 * c-common.h (objc_set_method_type): Removed.
6303 (objc_add_method_declaration): Added boolean argument.
6304 (objc_start_method_definition): Same change.
6305 (objc_build_method_signature): Same change.
6306 * stub-objc.c (objc_set_method_type): Removed.
6307 (objc_add_method_declaration): Added boolean argument.
6308 (objc_start_method_definition): Same change.
6309 (objc_build_method_signature): Same change.
6310
977e30bc
NP
63112010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
6312
6313 * c-common.h (finish_file): Removed.
6314 (objc_write_global_declarations): New.
6315 * c-opts.c (c_common_parse_file): Do not call finish_file.
6316 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 6317
da57d1b9
NP
63182010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
6319
6320 Implemented parsing @synthesize and @dynamic for
6321 Objective-C/Objective-C++.
6322 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
6323 (objc_add_synthesize_declaration): New.
6324 (objc_add_dynamic_declaration): New.
6325 * c-common.c (c_common_reswords): Add synthesize and dynamic.
6326 * stub-objc.c (objc_add_synthesize_declaration): New.
6327 (objc_add_dynamic_declaration): New.
9faeb493 6328
0069111f
MM
63292010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
6330
6331 PR target/46041
6332 * c-cppbuiltin.c (mode_has_fma): Move function here from
6333 builtins.c. Don't use the fma optab, instead just use the
6334 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
6335 using -save-temps.
6336
e426b47b
NP
63372010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
6338
6339 Merge from 'apple/trunk' branch on FSF servers.
0069111f 6340
3f8257db 6341 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 6342
9faeb493 6343 Radar 4330422
e426b47b
NP
6344 * c-common.h (objc_non_volatilized_type): New declaration
6345 * stub-objc.c (objc_non_volatilized_type): New stub.
6346
90fbfdc3
NP
63472010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
6348
e426b47b 6349 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 6350
3f8257db 6351 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 6352
9faeb493 6353 Radar 4133425
90fbfdc3 6354 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 6355 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 6356
c37d8c30
IS
63572010-10-17 Iain Sandoe <iains@gcc.gnu.org>
6358
6359 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
6360 * c-common.h (enum rid): Add RID_AT_PACKAGE.
6361 (objc_ivar_visibility_kind): New enum.
6362 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 6363 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
6364 visibility enum.
6365
1b1562a5
MM
63662010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
6367
6368 * c-cppbuiltin.c (builtin_define_float_constants): Emit
6369 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
6370 has the appropriate fma builtins.
6371 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
6372
668ea4b1
IS
63732010-10-14 Iain Sandoe <iains@gcc.gnu.org>
6374
1b1562a5 6375 merge from FSF apple 'trunk' branch.
3f8257db 6376 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 6377
668ea4b1
IS
6378 Radars 4436866, 4505126, 4506903, 4517826
6379 * c-common.c (c_common_resword): Define @property and its attributes.
6380 * c-common.h: Define property attribute enum entries.
6381 (OBJC_IS_PATTR_KEYWORD): New.
6382 (objc_property_attribute_kind): New enum.
6383 Declare objc_set_property_attr (), objc_add_property_variable (),
6384 objc_build_getter_call () and objc_build_setter_call ().
6385 * stub-objc.c (objc_set_property_attr): New stub.
6386 (objc_add_property_variable): Likewise.
6387 (objc_build_getter_call): Likewise.
6388 (objc_build_setter_call) Likewise.
1b1562a5 6389
a1178b30
IS
63902010-10-13 Iain Sandoe <iains@gcc.gnu.org>
6391
1b1562a5 6392 merge from FSF apple 'trunk' branch.
3f8257db 6393 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
6394
6395 Radar 3803157 (method attributes)
6396 * c-common.c (handle_deprecated_attribute): Recognize
6397 objc methods as valid declarations.
6398 * c-common.h: Declare objc_method_decl ().
1b1562a5 6399 * stub-objc.c (objc_method_decl): New stub.
a1178b30 6400
a75bfaa6
JM
64012010-10-08 Joseph Myers <joseph@codesourcery.com>
6402
6403 * c-common.c (parse_optimize_options): Call
6404 decode_cmdline_options_to_array_default_mask before
6405 decode_options. Update arguments to decode_options.
6406 * c-common.h (c_common_init_options_struct): Declare.
6407 * c-opts.c (c_common_init_options_struct): New. Split out from
6408 c_common_init_options.
6409
f05b9d93
NP
64102010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
6411
6412 Implemented fast enumeration for Objective-C.
6413 * c-common.h (objc_finish_foreach_loop): New.
6414 * stub-objc.c (objc_finish_foreach_loop): New.
6415
1ebe4b4f
JM
64162010-10-05 Joseph Myers <joseph@codesourcery.com>
6417
6418 * c-common.h (struct diagnostic_context): Don't declare here.
6419 (c_common_initialize_diagnostics): Declare using
6420 diagnostic_context typedef.
6421 * c-opts.c (c_common_handle_option): Pass global_dc to
6422 handle_generated_option.
6423
d4d24ba4
JM
64242010-10-04 Joseph Myers <joseph@codesourcery.com>
6425
6426 * c-opts.c (c_common_handle_option): Pass &global_options_set to
6427 handle_generated_option.
6428
478a1c5b
ILT
64292010-10-03 Ian Lance Taylor <iant@google.com>
6430
6431 * c.opt (-fplan9-extensions): New option.
6432
82a1c2fe
FXC
64332010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
6434
6435 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
6436 Remove.
6437 (c_cpp_builtins): Call functions from cppbuiltin.c instead
6438 of duplicating code.
6439
92902b1b
IS
64402010-09-30 Iain Sandoe <iains@gcc.gnu.org>
6441
6442 * c-common.c: Add two new entries for @optional
6443 and @required keywords.
6444
6445 merge from FSF 'apple/trunk' branch.
3f8257db 6446 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
6447
6448 Radar 4386773
6449 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
6450 objective-c keywords.
6451 (objc_set_method_opt): New declaration.
6452 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 6453
46625112
JM
64542010-09-30 Joseph Myers <joseph@codesourcery.com>
6455
6456 * c-common.c (handle_optimize_attribute): Pass &global_options to
6457 cl_optimization_save and cl_optimization_restore.
6458 * c-opts.c (c_common_handle_option): Pass &global_options to
6459 handle_generated_option.
6460 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
6461 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
6462 &global_options to cl_optimization_restore.
6463
49b91f05
NP
64642010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
6465
6466 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
6467 Objective-C/Objective-C++ keywords.
6468
13ed556f 64692010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 6470
9faeb493
UB
6471 Merge from 'apple/trunk' branch on FSF servers.
6472
3f8257db 6473 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
6474
6475 Radar 4281748
6476 * c-common.h (objc_check_global_decl): New declaration.
6477 * stub-objc.c (objc_check_global_decl): New stub.
6478
f0036cca
JM
64792010-09-29 Joseph Myers <joseph@codesourcery.com>
6480
6481 * c.opt: Don't use VarExists.
6482
e3339d0f
JM
64832010-09-29 Joseph Myers <joseph@codesourcery.com>
6484
6485 * c-common.c (c_cpp_error): Update names of diagnostic_context
6486 members.
6487 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
6488 cl_optimization members.
6489 * c-opts.c (warning_as_error_callback, c_common_handle_option,
6490 sanitize_cpp_opts, finish_options): Update names of cpp_options
6491 members.
6492
1973201f
NP
64932010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
6494
6495 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
6496 (objc_is_reserved_word): Removed.
6497 * c-common.c: Updated comments.
6498 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
6499 objc_is_reserved_word.
6500 * stub-objc.c (objc_is_reserved_word): Removed.
6501
f7e71da5
IS
65022010-09-28 Iain Sandoe <iains@gcc.gnu.org>
6503
9faeb493 6504 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
6505 include attributes.
6506 (objc_start_method_definition): Likewise.
6507 (objc_build_keyword_decl): Likewise.
6508 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
6509 (objc_start_method_definition): Likewise.
6510 (objc_build_keyword_decl): Likewise.
6511
c165dca7
IS
65122010-09-28 Iain Sandoe <iains@gcc.gnu.org>
6513
6514 * c-common.h (objc_start_class_interface): Adjust prototype.
6515 (objc_start_category_interface): Likewise.
6516 (objc_start_protocol): Likewise.
6517 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
6518 (objc_start_class_interface): Likewise.
6519 (objc_start_category_interface): Likewise.
6520
7458026b
ILT
65212010-09-27 Ian Lance Taylor <iant@google.com>
6522
6523 * c-common.c (c_common_attribute_table): Add no_split_stack.
6524 (handle_no_split_stack_attribute): New static function.
6525
b581b85b
NP
65262010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
6527
9faeb493 6528 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 6529
3f8257db 6530 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 6531
9faeb493 6532 Radar 4229905
b581b85b
NP
6533 * c-common.h (objc_have_common_type): New declaration.
6534 * stub-objc.c (objc_have_common_type): New stub.
6535
6536 2005-06-22 Ziemowit Laski <zlaski@apple.com>
6537
6538 Radar 4154928
6539 * c-common.h (objc_common_type): New prototype.
9faeb493 6540 * stub-objc.c (objc_common_type): New stub.
b581b85b 6541
46a4da10
JH
65422010-09-24 Jan Hubicka <jh@suse.cz>
6543
6544 * c-common.c (handle_leaf_attribute): New function.
6545 (struct attribute_spec c_common_att): Add leaf.
6546
e200444e
JM
65472010-09-22 Joseph Myers <joseph@codesourcery.com>
6548
6549 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
6550 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
6551 -dump, -dump=, -imacros, -imacros=, -include, -include=,
6552 -include-barrier, -include-directory, -include-directory=,
6553 -include-directory-after, -include-directory-after=,
6554 -include-prefix, -include-prefix=, -include-with-prefix,
6555 -include-with-prefix=, -include-with-prefix-after,
6556 -include-with-prefix-after=, -include-with-prefix-before,
6557 -include-with-prefix-before=, -no-integrated-cpp,
6558 -no-line-commands, -no-standard-includes, -no-warnings, -output,
6559 -output=, -pedantic, -pedantic-errors, -preprocess,
6560 -print-missing-file-dependencies, -trace-includes, -traditional,
6561 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
6562 -user-dependencies, -verbose, -write-dependencies,
6563 -write-user-dependencies, no-integrated-cpp, traditional): New.
6564
29a80ea6
NP
65652010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
6566
6567 PR objc/23710
ac1fc2fc
NP
6568 * c-common.h (objc_start_method_definition): Return bool instead
6569 of void.
6570 * stub-objc.c (objc_start_method_definition): Return bool instead
6571 of void.
6572
65732010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
6574
6575 PR objc/25965
6576 * c-common.h (objc_get_interface_ivars): New declaration.
6577 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 6578
de621752
ILT
65792010-09-15 Ian Lance Taylor <iant@google.com>
6580
6581 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 6582 messages. Remove period at end of warning message.
de621752 6583
ba885ec5
NS
65842010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6585
6586 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
6587 (handle_alias_attribute): ... here.
6588 (handle_ifunc_attribute): New.
6589
c5ee1358
MM
65902010-09-06 Mark Mitchell <mark@codesourcery.com>
6591
6592 * c-common.h (do_warn_double_promotion): Declare.
6593 * c-common.c (do_warn_double_promotion): Define.
6594
0a0b3574
MM
65952010-09-05 Mark Mitchell <mark@codesourcery.com>
6596
6597 * c.opt (Wdouble-promotion): New.
6598
d1779886
JM
65992010-09-02 Joseph Myers <joseph@codesourcery.com>
6600
6601 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
6602 fvtable-thunks, fxref): Mark no longer supported in help text.
6603
2d2bd949
JM
66042010-09-02 Joseph Myers <joseph@codesourcery.com>
6605
6606 * c.opt (Wimport, fall-virtual, falt-external-templates,
6607 fdefault-inline, fenum-int-equiv, fexternal-templates,
6608 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
6609 fname-mangling-version-, fnew-abi, fnonnull-objects,
6610 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
6611 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
6612 applicable.
6613 (fhandle-exceptions): Mark with Alias and Warn.
6614 * c-opts.c (c_common_handle_option): Don't handle options marked
6615 as ignored.
6616
5de8299c
JM
66172010-09-02 Joseph Myers <joseph@codesourcery.com>
6618
6619 * c.opt (Wcomments, Werror-implicit-function-declaration,
6620 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
6621 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
6622 aliases.
6623 * c-common.c (option_codes): Use OPT_Wcomment instead of
6624 OPT_Wcomments.
6625 * c-opts.c (warning_as_error_callback, c_common_handle_option):
6626 Don't handle options marked as aliases.
6627
0ceb0201
RG
66282010-08-25 Richard Guenther <rguenther@suse.de>
6629
6630 * c-common.c (c_common_get_alias_set): Remove special
6631 handling for pointers.
6632
ac47786e
NF
66332010-08-20 Nathan Froyd <froydnj@codesourcery.com>
6634
6635 * c-common.c: Use FOR_EACH_VEC_ELT.
6636 * c-gimplify.c: Likewise.
6637 * c-pragma.c: Likewise.
6638
c878765b
JM
66392010-08-16 Joseph Myers <joseph@codesourcery.com>
6640
6641 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
6642 RejectDriver.
6643 (MMDX): Change back to MMD. Mark NoDriverArg instead of
6644 RejectDriver.
6645 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
6646 instead of OPT_MDX and OPT_MMDX.
6647
603349bf
JM
66482010-08-16 Joseph Myers <joseph@codesourcery.com>
6649
6650 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
6651
644fa7ac
JM
66522010-08-12 Joseph Myers <joseph@codesourcery.com>
6653
6654 * c.opt (MD, MMD): Change to MDX and MMDX.
6655 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
6656
481e1176
JM
66572010-08-11 Joseph Myers <joseph@codesourcery.com>
6658
6659 * c-opts.c (c_common_handle_option): Call handle_generated_option
6660 instead of handle_option.
6661
ac8dc9f7
NF
66622010-08-08 Nathan Froyd <froydnj@codesourcery.com>
6663
6664 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
6665 (maybe_apply_renaming_pragma): Delete unneeded declarations.
6666
4f8c876d
NF
66672010-08-08 Nathan Froyd <froydnj@codesourcery.com>
6668
6669 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
6670 (pending_redefine_extname): Change type to a VEC.
6671 (add_to_renaming_pragma_list): Update for new type of
6672 pending_redefine_extname.
ac8dc9f7 6673 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 6674
3b0c690e
AC
66752010-08-04 Arnaud Charlet <charlet@adacore.com>
6676
6677 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
6678 visited.
6679 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
6680 decide whether a type has already been declared/seen.
6681 Do not go to the original type.
6682 (dump_nested_types): New parameter forward.
6683 Generate forward declaration if needed and mark type as visited.
6684 (print_ada_declaration): Call dump_nested_types if not already done.
6685 Mark types as visited.
6686
1890bccc
JM
66872010-08-03 Joseph Myers <joseph@codesourcery.com>
6688
6689 * c.opt (-print-pch-checksum): Remove option.
6690 * c-opts.c (c_common_handle_option): Don't handle
6691 OPT_print_pch_checksum.
6692
5f20c657
JM
66932010-07-27 Joseph Myers <joseph@codesourcery.com>
6694
6695 * c-common.h (c_common_handle_option): Update prototype and return
6696 value type.
6697 * c-opts.c (c_common_handle_option): Update prototype and return
6698 value type. Update calls to handle_option and
6699 enable_warning_as_error.
6700
f551f80c
JJ
67012010-07-27 Jakub Jelinek <jakub@redhat.com>
6702
6703 PR c/45079
6704 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
6705
61ff2bdc
JM
67062010-07-27 Joseph Myers <joseph@codesourcery.com>
6707
6708 * c-common.h (c_common_missing_argument): Remove.
6709 * c-opts.c (c_common_missing_argument): Remove.
6710 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
6711 idirafter, imacros, include, isysroot, isystem, iquote): Add
6712 MissingArgError.
6713 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
6714
7a9bf9a4
JM
67152010-07-27 Joseph Myers <joseph@codesourcery.com>
6716
6717 * c-common.h (c_common_option_lang_mask,
6718 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
6719 New.
6720 (c_common_init_options): Update prototype.
6721 * c-opts.c (c_common_option_lang_mask): New.
6722 (c_common_initialize_diagnostics): Split out of
6723 c_common_init_options.
6724 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
6725 New.
6726 (c_common_init_options): Update prototype. Use decoded options in
6727 search for -lang-asm.
6728
910ad8de
NF
67292010-07-15 Nathan Froyd <froydnj@codesourcery.com>
6730
6731 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
6732 * c-format.c: Likewise.
6733
718f9c0f
MLI
67342010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
6735
6736 * c-common.h: Include diagnostic-core.h. Error if already
6737 included.
6738 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
6739
4d451982
MLI
67402010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
6741
adfac8df 6742 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
6743 Do not include expr.h
6744 (vector_mode_valid_p): Move here.
6745
119fe915
SB
67462010-06-21 DJ Delorie <dj@redhat.com>
6747
6748 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
6749 allow these pragmas anywhere.
6750
67512010-06-14 Jakub Jelinek <jakub@redhat.com>
6752
6753 PR bootstrap/44509
6754 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
6755 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
6756 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
6757 ggc_strdup instead of xstrdup.
6758
67592010-06-10 Jakub Jelinek <jakub@redhat.com>
6760
6761 * c-cppbuiltin.c: Include cpp-id-data.h.
6762 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
6763 (lazy_hex_fp_value): New function.
6764 (builtin_define_with_hex_fp_value): Provide definitions lazily.
6765
6662d794
MLI
67662010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
6767
6768 * c-gimplify.c: Do not include tree-flow.h
6769
38f8b050
JR
67702010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
6771
6772 PR other/44034
6773 * c-common.c: Rename targetm member:
6774 targetm.enum_va_list -> targetm.enum_va_list_p
6775
9589f23e
AS
67762010-06-28 Anatoly Sokolov <aesok@post.ru>
6777
6778 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
6779
3b06d379
SB
67802010-06-28 Steven Bosscher <steven@gcc.gnu.org>
6781
6782 * c-cppbuiltin.c: Do not include except.h.
6783
d166d4c3
AK
67842010-06-24 Andi Kleen <ak@linux.intel.com>
6785
9faeb493
UB
6786 * c-common.c (warn_for_omitted_condop): New.
6787 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 6788
70cb8be6
JM
67892010-06-21 Joseph Myers <joseph@codesourcery.com>
6790
6791 * c.opt (lang-objc): Remove.
6792 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
6793
a4c97feb
JR
67942010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
6795
6796 * c-opts.c: Include "tm_p.h".
6797
6e2f1956
JM
67982010-06-20 Joseph Myers <joseph@codesourcery.com>
6799
6800 * c-common.c (parse_optimize_options): Update call to
6801 decode_options.
6802
bc87224e
NF
68032010-06-18 Nathan Froyd <froydnj@codesourcery.com>
6804
6805 * c-common.c (record_types_used_by_current_var_decl): Adjust for
6806 new type of types_used_by_cur_var_decl.
6807
b49cf425
JR
68082010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
6809
6810 PR bootstrap/44512
6811 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
6812 for C++ standard compliance.
6813
59f9c2ed
JM
68142010-06-16 Jason Merrill <jason@redhat.com>
6815
6816 * c.opt: Add -Wnoexcept.
6817
33766b66
RG
68182010-06-16 Richard Guenther <rguenther@suse.de>
6819
6820 PR c/44555
6821 * c-common.c (c_common_truthvalue_conversion): Remove
6822 premature and wrong optimization concering ADDR_EXPRs.
6823
eff7e30c
AC
68242010-06-15 Arnaud Charlet <charlet@adacore.com>
6825
6826 * c-ada-spec.c (dump_sloc): Remove column info.
6827 (is_simple_enum): New function.
6828 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
6829 enum types when relevant.
6830
6312e84d
MLI
68312010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
6832
9faeb493 6833 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
6834 location.
6835
1cb42611
JM
68362010-06-10 Joseph Myers <joseph@codesourcery.com>
6837
6838 * c-opts.c (c_common_handle_option): Don't handle
6839 OPT_fshow_column.
6840
a9429e29
LB
68412010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
6842
6843 * c-pragma.c (push_alignment): Use typed GC allocation.
6844 (handle_pragma_push_options): Likewise.
6845
6846 * c-common.c (parse_optimize_options): Likewise.
6847
6848 * c-common.h (struct sorted_fields_type): Add variable_size GTY
6849 option.
6850
5498f011
JM
68512010-06-07 Joseph Myers <joseph@codesourcery.com>
6852
6853 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
6854 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
6855 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
6856 flag_signed_bitfields, warn_strict_null_sentinel,
6857 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
6858 flag_gen_declaration, flag_no_gnu_keywords,
6859 flag_implement_inlines, flag_implicit_templates,
6860 flag_implicit_inline_templates, flag_optional_diags,
6861 flag_elide_constructors, flag_default_inline, flag_rtti,
6862 flag_conserve_space, flag_access_control, flag_check_new,
6863 flag_new_for_scope, flag_weak, flag_working_directory,
6864 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
6865 flag_enforce_eh_specs, flag_threadsafe_statics,
6866 flag_pretty_templates): Remove.
6867 * c-common.h (flag_preprocess_only, flag_nil_receivers,
6868 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
6869 flag_replace_objc_classes, flag_undef, flag_no_builtin,
6870 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
6871 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
6872 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
6873 flag_no_gnu_keywords, flag_implement_inlines,
6874 flag_implicit_templates, flag_implicit_inline_templates,
6875 flag_optional_diags, flag_elide_constructors, flag_default_inline,
6876 flag_rtti, flag_conserve_space, flag_access_control,
6877 flag_check_new, flag_new_for_scope, flag_weak,
6878 flag_working_directory, flag_use_cxa_atexit,
6879 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
6880 flag_threadsafe_statics, flag_pretty_templates,
6881 warn_strict_null_sentinel): Remove.
6882 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
6883 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
6884 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
6885 fimplicit-inline-templates, fimplicit-templates,
6886 flax-vector-conversions, fms-extensions, fnil-receivers,
6887 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
6888 frtti, fshort-double, fshort-enums, fshort-wchar,
6889 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
6890 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
6891 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
6892 gen-decls, undef): Use Var.
6893 (fdefault-inline, foptional-diags): Document as doing nothing.
6894 * c-opts.c (c_common_handle_option): Remove cases for options now
6895 using Var. Mark ignored options as such.
6896
39dabefd
SB
68972010-06-05 Steven Bosscher <steven@gcc.gnu.org>
6898
9faeb493 6899 * c-common.c: Moved to here from parent directory.
39dabefd
SB
6900 * c-common.def: Likewise.
6901 * c-common.h: Likewise.
6902 * c-cppbuiltin.c: Likewise.
6903 * c-dump.c: Likewise.
6904 * c-format.c: Likewise.
6905 * c-format.h : Likewise.
6906 * c-gimplify.c: Likewise.
6907 * c-lex.c: Likewise.
6908 * c-omp.c: Likewise.
6909 * c.opt: Likewise.
6910 * c-opts.c: Likewise.
6911 * c-pch.c: Likewise.
6912 * c-ppoutput.c: Likewise.
6913 * c-pragma.c: Likewise.
6914 * c-pragma.h: Likewise.
6915 * c-pretty-print.c: Likewise.
6916 * c-pretty-print.h: Likewise.
6917 * c-semantics.c: Likewise.
6918 * stub-objc.c: Likewise.
6919
6920 * c-common.c: Include gt-c-family-c-common.h.
6921 * c-pragma.c: Include gt-c-family-c-pragma.h.
6922\f
818ab71a 6923Copyright (C) 2010-2016 Free Software Foundation, Inc.
39dabefd
SB
6924
6925Copying and distribution of this file, with or without modification,
6926are permitted in any medium without royalty provided the copyright
6927notice and this notice are preserved.
This page took 2.442604 seconds and 5 git commands to generate.