]> gcc.gnu.org Git - gcc.git/blame - gcc/c/ChangeLog
Add new file gcc/testsuite/jit.dg/test-constants.c erroneously omitted from r219401
[gcc.git] / gcc / c / ChangeLog
CommitLineData
2cc901dc
MP
12015-01-07 Marek Polacek <polacek@redhat.com>
2
3 PR c/64417
4 * c-typeck.c (process_init_element): Disallow initialization of
5 a flexible array member with a string constant if the structure
6 is in an array.
7
5624e564
JJ
82015-01-05 Jakub Jelinek <jakub@redhat.com>
9
e5341100
JJ
10 PR sanitizer/64344
11 * c-typeck.c (convert_for_assignment, c_finish_return): For
12 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
13 types also set in_late_binary_op around convert call.
14 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
15 to integral type casts, if not in_late_binary_op, pass c_fully_fold
16 result on expr as last argument to ubsan_instrument_float_cast,
17 if in_late_binary_op, don't use c_save_expr but save_expr.
18
5624e564
JJ
19 Update copyright years.
20
5bd012f8
MP
212015-01-05 Marek Polacek <polacek@redhat.com>
22
23 PR c/64423
24 * c-typeck.c (build_array_ref): Pass loc down to
25 warn_array_subscript_with_type_char.
26
768952be
MU
272014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
28
29 * c-typeck.c: New behavious for pointers to arrays with qualifiers
30 (common-pointer-type): For pointers to arrays take qualifiers from
31 element type.
32 (build_conditional_expr): Add warnings for lost qualifiers.
33 (comp-target-types): Allow pointers to arrays with different qualifiers.
34 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
35 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
36 to PEDWARN_FOR_QUALIFIERS.
37
8f94a8c4
JJ
382014-12-17 Jakub Jelinek <jakub@redhat.com>
39
40 PR sanitizer/64289
41 * c-convert.c: Include ubsan.h.
42 (convert): For real -> integral casts and
43 -fsanitize=float-cast-overflow don't call convert_to_integer, but
44 instead instrument the float cast directly.
45
b731b390
JJ
462014-11-29 Jakub Jelinek <jakub@redhat.com>
47
48 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
49 c_finish_stmt_expr): Remove NULL last argument from
50 create_tmp_var_raw and create_tmp_var calls.
51 * c-array-notation.c (fix_builtin_array_notation_fn,
52 build_array_notation_expr, fix_conditional_array_notations_1,
53 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
54
541e35a6
MP
552014-11-28 Marek Polacek <polacek@redhat.com>
56
57 PR c/63862
58 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
59 convert the right operand to integer type.
60
b286be94
MP
612014-11-25 Marek Polacek <polacek@redhat.com>
62
63 PR c/63877
64 * c-decl.c (start_function): Disable -Wmissing-declarations warning
65 for inline functions.
66
aa7da51a
JJ
672014-11-21 Jakub Jelinek <jakub@redhat.com>
68
69 PR target/63764
70 * c-typeck.c (build_array_ref): Adjust
71 convert_vector_to_pointer_for_subscript caller. If it returns true,
72 call non_lvalue_loc on the result.
73
d876207f
RB
742014-11-11 Richard Biener <rguenther@suse.de>
75
76 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
77 to true.
78
e5e44252
AK
792014-11-10 Andi Kleen <ak@linux.intel.com>
80
81 PR c/60804
82 * c-parser.c (c_parser_statement_after_labels): Call
83 check_no_cilk.
84 (c_parser_if_statement): Dito.
85 (c_parser_switch_statement): Dito.
86 (c_parser_while_statement): Dito.
87 (c_parser_do_statement): Dito.
88 (c_parser_for_statement): Dito.
89 * c-typeck.c (c_finish_loop): Dito.
90
13c21655
PC
912014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
92
93 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
94 OPT_Wshift_count_overflow in the warnings.
95
2d51fcef
MP
962014-10-30 Marek Polacek <polacek@redhat.com>
97
98 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
99 print the stripped version as well, if they're not the same.
100
ef4bddc2
RS
1012014-10-29 Richard Sandiford <richard.sandiford@arm.com>
102
103 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
104 machine_mode.
105
c582198b
AM
1062014-10-28 Andrew MacLeod <amacleod@redhat.com>
107
108 * c-decl.c: Adjust include files.
109 * c-parser.c: Ditto.
110
ddc8de03
PM
1112014-10-27 Phil Muldoon <pmuldoon@redhat.com>
112 Tom Tromey <tromey@redhat.com>
113
114 * c-tree.h (enum c_oracle_request): New.
115 (c_binding_oracle_function): New typedef.
116 (c_binding_oracle, c_pushtag, c_bind): Declare.
117 * c-decl.c (c_binding_oracle): New global.
118 (I_SYMBOL_CHECKED): New macro.
119 (i_symbol_binding): New function.
120 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
121 (I_TAG_CHECKED): New macro.
122 (i_tag_binding): New function.
123 (I_TAG_BINDING, I_TAG_DECL): Redefine.
124 (I_LABEL_CHECKED): New macro.
125 (i_label_binding): New function.
126 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
127 (c_print_identifier): Save and restore c_binding_oracle.
128 (c_pushtag, c_bind): New functions.
129
60393bbc
AM
1302014-10-27 Andrew MacLeod <amacleod@redhat.com>
131
132 * c-typeck.c: Adjust include files.
133
d723bb7c
MLI
1342014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
135
136 PR c++/53061
137 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
138 initialization here...
139 (c_initialize_diagnostics): ... but here. Set defaults after
140 building pretty-printer.
141
1bc5a451
MP
1422014-10-23 Marek Polacek <polacek@redhat.com>
143
144 PR c/63626
145 * c-decl.c (pop_scope): Don't print warning in external_scope.
146
4435bb92
MP
1472014-10-19 Marek Polacek <polacek@redhat.com>
148
149 PR c/63567
150 * c-typeck.c (output_init_element): Allow initializing objects with
151 static storage duration with compound literals even in C99 and add
152 pedwarn for it.
153
7278465e
MP
1542014-10-17 Marek Polacek <polacek@redhat.com>
155
156 PR c/63567
157 * c-typeck.c (digest_init): Allow initializing objects with static
158 storage duration with compound literals even in C99 and add pedwarn
159 for it.
160
d9b7be2e
MP
1612014-10-17 Marek Polacek <polacek@redhat.com>
162
163 PR c/63543
164 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
165 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
166 error multiple times. Print the type.
167
f406ae1f
MP
1682014-10-17 Marek Polacek <polacek@redhat.com>
169
170 PR c/63549
171 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
172 type.
173
92574c7c
MP
1742014-10-17 Marek Polacek <polacek@redhat.com>
175
176 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
177 (start_function): Use OPT_Wimplicit_int instead of 0.
178 (store_parm_decls_oldstyle): Likewise.
179
1bc4a978
MT
1802014-10-17 Alan Modra <amodra@gmail.com>
181
182 PR middle-end/61848
183 * c-decl.c (merge_decls): Don't merge section name or tls model
184 to newdecl symtab node, instead merge to olddecl. Override
185 existing olddecl section name. Set tls_model for all thread-local
186 vars, not just OMP thread-private ones. Remove incorrect comment.
187
83685514
AM
1882014-10-16 Andrew MacLeod <amacleod@redhat.com>
189
190 * c-decl.c: Adjust include files.
191
78a7c317
DD
1922014-10-14 DJ Delorie <dj@redhat.com>
193
194 * c-parser.c (c_parse_init): Add RID entries for each __intN.
195 (c_token_starts_typename): Check all __intN, not just __int128.
196 (c_token_starts_declspecs): Likewise.
197 (c_parser_declspecs): Likewise.
198 (c_parser_attribute_any_word): Likewise.
199 (c_parser_objc_selector): Likewise.
200 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
201 (struct c_declspecs): Add int_n_idx field to record *which* __intN
202 is specified.
203 * c-decl.c (declspecs_add_type): Check for all __intN, not just
204 __int128.
205 (finish_declspecs): Likewise.
206
74d98c1e
AB
2072014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
208
209 * c-parser.c (c_parser_all_labels): New function to replace
210 the duplicate code.
211 (c_parser_statement): Call the new function.
212
84937de2
MP
2132014-10-09 Marek Polacek <polacek@redhat.com>
214
215 PR c/63480
216 * c-typeck.c (pop_init_level): Don't warn about initializing
217 with { }.
218
0382aaa0
MP
2192014-10-07 Marek Polacek <polacek@redhat.com>
220
221 PR c/59717
222 * c-decl.c (header_for_builtin_fn): New function.
223 (implicitly_declare): Suggest which header to include.
224
7a0ca710
MP
2252014-10-07 Marek Polacek <polacek@redhat.com>
226
227 * c-convert.c (convert): Use error_operand_p.
228 * c-typeck.c (require_complete_type): Likewise.
229 (really_atomic_lvalue): Likewise.
230 (digest_init): Likewise.
231 (handle_omp_array_sections_1): Likewise.
232
6bc8a126
MP
2332014-10-03 Marek Polacek <polacek@redhat.com>
234
235 PR c/63453
236 * c-decl.c (pop_scope): Don't warn about "inline function declared
237 but never defined" for functions marked with gnu_inline attribute.
238
d90c0a59
JJ
2392014-09-25 Jakub Jelinek <jakub@redhat.com>
240
241 PR c++/63249
242 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
243 on low_bound and length.
244
083e891e
MP
2452014-09-24 Marek Polacek <polacek@redhat.com>
246
247 PR c/61405
248 PR c/53874
249 * c-parser.c: Don't define CPP_KEYWORD.
250 (c_parser_switch_statement): Pass original type to c_finish_case.
251 * c-tree.h (c_finish_case): Update declaration.
252 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
253 conditionally to c_do_switch_warnings.
254
8d95fe25
MP
2552014-09-03 Marek Polacek <polacek@redhat.com>
256
257 PR c/62024
258 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
259 conversions.
260
9a771876
JJ
2612014-09-02 Jakub Jelinek <jakub@redhat.com>
262 Balaji V. Iyer <balaji.v.iyer@intel.com>
263 Igor Zamyatin <igor.zamyatin@intel.com>
264
265 * c-parser.c (c_parser_cilk_for): New function.
266 (c_parser_cilk_grainsize): Likewise.
267 (c_get_temp_regvar): Likewise.
268 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
269 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
270 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
271 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
272 case.
273
b7679d96
CG
2742014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
275
276 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
277 with using HOST_WIDE_INT without truncation to 'int'
278
59ea0364
MP
2792014-08-22 Marek Polacek <polacek@redhat.com>
280
281 PR c++/62199
282 * c-typeck.c (parser_build_binary_op): Adjust call to
283 warn_logical_not_parentheses.
284
671a475e
IZ
2852014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
286
287 PR other/62008
288 * c-parser.c (c_parser_array_notation): Check for correct
289 type of an array added.
290
04159acf
MP
2912014-08-19 Marek Polacek <polacek@redhat.com>
292
293 PR c++/62153
294 * c-typeck.c (build_binary_op): If either operand of a comparison
295 is a boolean expression, call maybe_warn_bool_compare.
296
c77935ee
PP
2972014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
298
299 PR c/45584
300 * c-typeck.c (build_c_cast): Do a conversion even when the
301 TYPE_MAIN_VARIANTs are the same.
302
35aff4fb
MP
3032014-08-19 Marek Polacek <polacek@redhat.com>
304
305 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
306 pedwarn_c99 instead of pedwarn.
307 (grokfield): Likewise.
308 (warn_defaults_to): New function.
309 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
310 Unconditionally call pedwarn_c99 instead of pedwarn.
311 (start_function): Call warn_defaults_to instead of pedwarn_c99.
312 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
313 check flag_isoc11 before.
314 * c-errors.c (pedwarn_c99): Change the return type to bool.
315 Handle -Wc99-c11-compat.
316 * c-parser.c (disable_extension_diagnostics): Handle
317 warn_c99_c11_compat.
318 (restore_extension_diagnostics): Likewise.
319 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
320 instead of pedwarn, don't check flag_isoc11 before.
321 (c_parser_declspecs): Likewise.
322 (c_parser_alignas_specifier): Likewise.
323 (c_parser_alignof_expression): Likewise.
324 (c_parser_generic_selection): Likewise.
325 * c-tree.h (pedwarn_c99): Update declaration.
326 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
327 of pedwarn_c99.
328
177cce46
MP
3292014-08-19 Marek Polacek <polacek@redhat.com>
330
331 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
332 to pedwarn_c90.
333 * c-errors.c: Include "opts.h".
334 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
335 * c-parser.c (disable_extension_diagnostics): Handle negative value
336 of warn_c90_c99_compat, too.
337 (restore_extension_diagnostics): Likewise.
338 (c_parser_compound_statement_nostart): Pass
339 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
340
6dc99c33
MP
3412014-08-12 Marek Polacek <polacek@redhat.com>
342
343 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
344 Add pedwarn.
345 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
346 Likewise.
347 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
348
f3bede71
MP
3492014-08-10 Marek Polacek <polacek@redhat.com>
350
351 PR c/51849
352 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
353 Call pedwarn_c90 instead of pedwarn.
354 (check_bitfield_type_and_width): Likewise.
355 (declspecs_add_qual): Likewise.
356 (declspecs_add_type): Likewise.
357 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
358 Adjust to only call pedwarn_c90.
359 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
360 pedwarn_c90 instead of pedwarn.
361 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
362 * c-parser.c (disable_extension_diagnostics): Handle
363 warn_c90_c99_compat.
364 (restore_extension_diagnostics): Likewise.
365 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
366 pedwarn_c90 instead of pedwarn.
367 (c_parser_initelt): Likewise.
368 (c_parser_postfix_expression): Likewise.
369 (c_parser_postfix_expression_after_paren_type): Likewise.
370 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
371 * c-tree.h: Fix formatting.
372 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
373 pedwarn_c90 instead of pedwarn.
374
9f25a338
TS
3752014-08-07 Trevor Saunders <tsaunders@mozilla.com>
376
377 * c-typeck.c: Remove include of pointer-set.h.
378
044331a8
MP
3792014-08-07 Marek Polacek <polacek@redhat.com>
380
381 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
382
b787e7a2
TS
3832014-08-02 Trevor Saunders <tsaunders@mozilla.com>
384
385 * c-typeck.c: Use hash_map instead of pointer_map.
386
6e2830c3
TS
3872014-08-02 Trevor Saunders <tsaunders@mozilla.com>
388
389 * c-decl.c: Use hash_set instead of pointer_set.
390
a7ee52fb
IZ
3912014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
392
393 PR middle-end/61455
394 * c-array-notation.c (expand_array_notations): Handling
395 of DECL_EXPR added.
396
b4dfdc11
MG
3972014-07-31 Marc Glisse <marc.glisse@inria.fr>
398
399 PR c++/60517
400 * c-typeck.c (c_finish_return): Return 0 instead of the address of
401 a local variable.
402
976d5a22
TT
4032014-07-30 Tom Tromey <tromey@redhat.com>
404
405 * c-typeck.c (struct constructor_stack) <designator_depth>: New
406 field.
407 (really_start_incremental_init, push_init_level): Initialize
408 designator_depth.
409 (pop_init_level): Set global designator_depth.
410 (process_init_element): Check for designated_init attribute.
411
30281de2
MP
4122014-07-20 Marek Polacek <polacek@redhat.com>
413
414 PR c/61852
415 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
416 (implicitly_declare): Pass location to implicit_decl_warning.
417
b108f48f
JJ
4182014-07-14 Jakub Jelinek <jakub@redhat.com>
419
420 PR middle-end/61294
421 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
422 If non-NULL, call c_parser_check_literal_zero.
423 (c_parser_check_literal_zero): New function.
424 (c_parser_postfix_expression_after_primary): Adjust
425 c_parser_expr_list caller, handle -Wmemset-transposed-args.
426
773ec47f
MP
4272014-07-06 Marek Polacek <polacek@redhat.com>
428
429 PR c/6940
430 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
431 * c-tree.h (C_ARRAY_PARAMETER): Define.
432 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
433 function parameter.
434
22e1cf1c
JH
4352014-07-02 Jan Hubicka <hubicka@ucw.cz>
436 Chen Gang <gang.chen.5i5j@gmail.com>
437
438 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
439 releasing symbol.
440
52ec0ea3
MP
4412014-07-01 Marek Polacek <polacek@redhat.com>
442
443 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
444 instead of 0 to WARN_FOR_ASSIGNMENT.
445
d5c3d343
MP
4462014-07-01 Marek Polacek <polacek@redhat.com>
447
448 PR c/58286
449 * c-typeck.c (convert_for_assignment): Pass
450 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
451
6a7253a4
MP
4522014-06-30 Marek Polacek <polacek@redhat.com>
453
454 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
455 has no_sanitize_undefined attribute.
456
5e88a8f4
IZ
4572014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
458
459 PR middle-end/57541
460 * c-array-notation.c (fix_builtin_array_notation_fn):
461 Check for 0 arguments in builtin call. Check that bultin argument is
462 correct.
463 * c-parser.c (c_parser_array_notation): Check for incorrect initial
464 index.
465
9698b078
SH
4662014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
467
468 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
469 qualifiers in __auto_type for atomic types.
470 (c_parser_typeof_specifier): Discard all type qualifiers in
471 __typeof__ for atomic types.
472
6e07c515
MP
4732014-06-25 Marek Polacek <polacek@redhat.com>
474
475 PR c/61162
476 * c-parser.c (c_parser_statement_after_labels): Pass the location of
477 the return expression to c_finish_return.
478
da6f124d
JJ
4792014-06-25 Jakub Jelinek <jakub@redhat.com>
480
481 * c-typeck.c (c_finish_omp_clauses): Make sure
482 OMP_CLAUSE_LINEAR_STEP has correct type.
483
c203e8a7
TS
4842014-06-24 Trevor Saunders <tsaunders@mozilla.com>
485
486 * c-decl.c: Adjust.
487
56ad0e38
JJ
4882014-06-24 Jakub Jelinek <jakub@redhat.com>
489
490 * c-parser.c (c_parser_omp_for_loop): For
491 #pragma omp parallel for simd move lastprivate clause from parallel
492 to for rather than simd.
493
47c2554f
MP
4942014-06-23 Marek Polacek <polacek@redhat.com>
495
496 * c-typeck.c (parser_build_binary_op): Don't call
497 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
498
56363ffd
JH
4992014-06-15 Jan Hubicka <hubicka@ucw.cz>
500
501 * c-parser.c (c_parser_omp_threadprivate): Likewise.
502 * c-decl.c (merge_decls): Likewise.
503
d7ff7ae5
MP
5042014-06-09 Marek Polacek <polacek@redhat.com>
505
506 PR c/36446
507 * c-typeck.c (error_init): Call inform instead of error_at.
508 (pedwarn_init): Call inform instead of pedwarn.
509 (warning_init): Call inform instead of warning_at.
510
24d047a3
JH
5112014-06-07 Jan Hubicka <hubicka@ucw.cz>
512
513 * c-decl.c (merge_decls): Use set_decl_section_name.
514 (duplicate_decls): Remove node if it exists.
515
9bac5cbb
G
5162014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
517
518 PR c/53119
519 * c-typeck.c (push_init_level, process_init_element,
520 pop_init_level): Correct check for zero initialization, move
521 missing brace warning to respect zero initialization.
522
8ffcdea8
MP
5232014-06-05 Marek Polacek <polacek@redhat.com>
524
525 PR c/56724
526 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
527
742938c9
MP
5282014-06-05 Marek Polacek <polacek@redhat.com>
529
530 PR c/49706
531 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
532 on the left hand side operand of a comparison.
533
6447c55d
MP
5342014-06-05 Marek Polacek <polacek@redhat.com>
535
536 PR c/48062
537 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
538 Print note only if the warning was printed.
539
9dc7743c
IZ
5402014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
541
542 PR c/58942
543 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
544 with a pointer.
545
fedfecef
MP
5462014-06-03 Marek Polacek <polacek@redhat.com>
547
548 PR c/60439
549 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
550 c_start_case.
551 * c-tree.h (c_start_case): Update.
552 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
553 switch condition has boolean value.
554
9b2b7279
AM
5552014-06-02 Andrew MacLeod <amacleod@redhat.com>
556
557 * c-decl.c: Include builtins.h.
558 * c-parser.c: Likewise.
559
5c1bc275
MP
5602014-05-27 Marek Polacek <polacek@redhat.com>
561
562 PR c/56724
563 * c-typeck.c (convert_arguments): Get location of a parameter. Change
564 error and warning calls to error_at and warning_at. Pass location of
565 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
566 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
567 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
568
97563bc8
IZ
5692014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
570
571 PR c/61191
572 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
573 function parameters.
574
aede2c10
JH
5752014-05-23 Jan Hubicka <hubicka@ucw.cz>
576
577 * c-decl.c (merge_decls): Preserve symtab node pointers.
578 (duplicate_decls): Free new decl.
579
edbba2ce
TS
5802014-05-23 Thomas Schwinge <thomas@codesourcery.com>
581
f3316c6d
TS
582 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
583 initialization.
584
edbba2ce
TS
585 * c-parser.c (c_parser_omp_target): Return bool values.
586
68c81f24
TS
5872014-05-22 Thomas Schwinge <thomas@codesourcery.com>
588
589 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
590 num_teams_loc variable to num_thread_limit_loc.
591
632f2871
RS
5922014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
593
594 * c-array-notation.c (expand_array_notations): Use void_node
595 instead of void_zero_node.
596
766090c2
TS
5972014-05-17 Trevor Saunders <tsaunders@mozilla.com>
598
599 * c-decl.c (finish_struct): Adjust.
600 (finish_enum): Likewise.
601 (bind): Adjust.
602 (record_inline_static): Likewise.
603 (push_scope): Likewise.
604 (make_label): Likewise.
605 (lookup_label_for_goto): Likewise.
606 (finish_struct): Likewise.
607 (finish_enum): Likewise.
608 (store_parm_decls): Likewise.
609 (c_push_function_context): Likewise.
610 * c-lang.h: Remove usage of variable_size gty attribute.
611 * c-parser.c (c_parse_init): Adjust.
612 (c_parse_file): Likewise.
613
2b107f6b
MP
6142014-05-13 Marek Polacek <polacek@redhat.com>
615
616 PR c/61162
617 * c-typeck.c (convert_for_assignment): Pass location to
618 WARN_FOR_ASSIGNMENT instead of input_location.
619
d033409e
MP
6202014-05-10 Marek Polacek <polacek@redhat.com>
621
622 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
623 maybe_warn_string_init.
624 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
625 maybe_warn_string_init.
626 * c-tree.h (maybe_warn_string_init): Update declaration.
627 * c-typeck.c (maybe_warn_string_init): Add location parameter.
628 Call pedwarn_init with loc instead of with input_location.
629 (digest_init): Pass init_loc to maybe_warn_string_init.
630 (pop_init_level): Call pedwarn_init with loc instead of with
631 input_location.
632 (set_init_index): Likewise.
633 (process_init_element): Likewise.
634
ea58ef42
MP
6352014-05-09 Marek Polacek <polacek@redhat.com>
636
637 PR c/61096
638 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
639 (c_parser_initelt): Pass location to set_init_label. Pass array index
640 location to set_init_index.
641 * c-tree.h (push_init_level): Update declaration.
642 (pop_init_level): Likewise.
643 (set_init_index): Likewise.
644 (set_init_label): Likewise.
645 * c-typeck.c (error_init): Add location parameter. Call error_at
646 instead of error.
647 (digest_init): Pass init_loc to error_init.
648 (really_start_incremental_init):
649 (push_init_level): Add location parameter. Pass loc to pop_init_level
650 and error_init.
651 (pop_init_level): Likewise.
652 (set_designator): Add location parameter. Pass loc to pop_init_level,
653 push_init_level, and error_init.
654 (set_init_index): Add location parameter. Pass loc to error_init and
655 set_designator.
656 (set_init_label): Likewise.
657 (output_init_element): Pass loc to error_init.
658 (process_init_element): Pass loc to error_init, pop_init_level,
659 pedwarn_init, and push_init_level.
660
661a0813
MP
6612014-05-09 Marek Polacek <polacek@redhat.com>
662
663 PR c/50459
664 * c-parser.c (c_parser_attributes): Parse the arguments as an
665 expression-list if the attribute takes identifier.
666
2793eeab
MP
6672014-05-08 Marek Polacek <polacek@redhat.com>
668
669 PR c/61053
670 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
671 TYPE_ALIGN_UNIT.
672
f827930a
MP
6732014-05-08 Marek Polacek <polacek@redhat.com>
674
675 PR c/61077
676 * c-decl.c (start_function): Warn for _Atomic-qualified return type
677 of main.
678
1d60af08
KZ
6792014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
680 Mike Stump <mikestump@comcast.net>
681 Richard Sandiford <rdsandiford@googlemail.com>
682
683 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
684 (finish_enum): Use wide-int interfaces.
685 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
686 * c-typeck.c (build_c_cast): Likewise.
687 (set_nonincremental_init_from_string): Likewise.
688 (c_tree_equal): Likewise.
689
a0e24419
MP
6902014-05-02 Marek Polacek <polacek@redhat.com>
691
692 PR c/25801
693 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
694 Return size_one_node when the type is not complete.
695 (pointer_diff): Remove comment.
696 (build_unary_op): Improve error messages.
697
19fc9faa
MP
6982014-05-02 Marek Polacek <polacek@redhat.com>
699
700 * c-typeck.c (c_finish_return): Separate warning_at calls.
701
63bc4e87
MP
7022014-05-02 Marek Polacek <polacek@redhat.com>
703
704 * c-tree.h (error_init): Remove declaration.
705 (pedwarn_init): Likewise.
706 * c-typeck.c (error_init): Make static and move above.
707 (pedwarn_init): Likewise.
708 (warning_init): Move above.
709 (maybe_warn_string_init): Likewise.
710
4bd2511b
JL
7112014-05-01 Jeff Law <law@redhat.com>
712
713 Revert:
714
715 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
716 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
717 avoid goto.
718
6a358dcb
MP
7192014-05-02 Marek Polacek <polacek@redhat.com>
720
721 PR c/60784
722 * c-typeck.c (push_init_level): Set constructor_designated to
723 p->designated for structures.
724
ae5ebda4
MP
7252014-05-01 Marek Polacek <polacek@redhat.com>
726
727 PR c/60915
728 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
729 function-definition has an attribute after the declarator.
730
96b40f8d
MP
7312014-05-01 Marek Polacek <polacek@redhat.com>
732
733 PR c/60257
734 * c-typeck.c (warning_init): Add location_t parameter. Call
735 warning_at instead of warning.
736 (push_init_level): Pass input_location to warning_init.
737 (add_pending_init): Add location_t parameter. Pass loc to
738 warning_init.
739 (set_nonincremental_init): Pass input_location to add_pending_init.
740 (set_nonincremental_init_from_string): Likewise.
741 (output_init_element): Pass loc to warning_init and to
742 add_pending_init.
743
32e00768
MP
7442014-05-01 Marek Polacek <polacek@redhat.com>
745
746 PR c/43395
747 * c-typeck.c (c_finish_return): Distinguish between label and variable
748 when warning about returning local address.
749
c9379ce2
MP
7502014-05-01 Marek Polacek <polacek@redhat.com>
751
752 PR c/29467
753 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
754 in C89 mode.
755
d00887e8
MP
7562014-05-01 Marek Polacek <polacek@redhat.com>
757
758 PR c/43245
759 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
760 instead of 0 to WARN_FOR_QUALIFIERS.
761
5436fa2e
MP
7622014-05-01 Marek Polacek <polacek@redhat.com>
763
764 PR c/56989
765 * c-typeck.c (default_conversion): Use better location for
766 error call.
767
f8ed5150
MP
7682014-04-30 Marek Polacek <polacek@redhat.com>
769
770 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
771 also when SANITIZE_FLOAT_DIVIDE is on.
772
8337d1db
MP
7732014-04-30 Marek Polacek <polacek@redhat.com>
774
775 PR c/60139
776 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
777 and pedwarn_init. Use loc insted of input_location.
778
c4bdc42f
MP
7792014-04-30 Marek Polacek <polacek@redhat.com>
780
781 PR c/60351
782 * c-typeck.c (build_binary_op): Use location when warning about
783 shift count.
784
45484dcf
MP
7852014-04-25 Marek Polacek <polacek@redhat.com>
786
787 PR c/18079
788 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
789 always_inline/noinline and hot/cold attributes.
790
34cf811f
MP
7912014-04-25 Marek Polacek <polacek@redhat.com>
792
793 PR c/60114
794 * c-parser.c (c_parser_initelt): Pass input_location to
795 process_init_element.
796 (c_parser_initval): Pass loc to process_init_element.
797 * c-tree.h (process_init_element): Adjust declaration.
798 * c-typeck.c (push_init_level): Pass input_location to
799 process_init_element.
800 (pop_init_level): Likewise.
801 (set_designator): Likewise.
802 (output_init_element): Add location_t parameter. Pass loc to
803 digest_init.
804 (output_pending_init_elements): Pass input_location to
805 output_init_element.
806 (process_init_element): Add location_t parameter. Pass loc to
807 output_init_element.
808
42056eac
JJ
8092014-04-24 Jakub Jelinek <jakub@redhat.com>
810
811 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
812 atomic-clause, allow comma in between atomic-clause and
813 seq_cst.
814
e162a134
JJ
8152014-04-22 Jakub Jelinek <jakub@redhat.com>
816
817 PR c/59073
818 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
819 fails, don't set OM_PARALLEL_COMBINED and return NULL.
820
2f6babac
IZ
8212014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
822
823 PR middle-end/60469
824 * c-array-notation.c (fix_builtin_array_notation_fn): Use
825 create_tmp_var instead build_decl for creating temps.
826 (build_array_notation_expr): Likewise.
827 (fix_conditional_array_notations_1): Likewise.
828 (fix_array_notation_expr): Likewise.
829 (fix_array_notation_call_expr): Likewise.
830
8edbfaa6
JJ
8312014-03-28 Jakub Jelinek <jakub@redhat.com>
832
833 PR c++/60689
834 * c-tree.h (c_build_function_call_vec): New prototype.
835 * c-typeck.c (build_function_call_vec): Don't call
836 resolve_overloaded_builtin here.
837 (c_build_function_call_vec): New wrapper function around
838 build_function_call_vec. Call resolve_overloaded_builtin here.
839 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
840 Call c_build_function_call_vec instead of build_function_call_vec.
841 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
842 * c-decl.c (finish_decl): Likewise.
843
7485aeea
MLI
8442014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
845
846 PR c/55383
847 * c-typeck.c: Use correct format string in cast-qual warning
848
b17a8b07
TS
8492014-03-07 Thomas Schwinge <thomas@codesourcery.com>
850
851 * c-decl.c (c_decl_attributes): Use
852 lang_hooks.types.omp_mappable_type.
853 * c-typeck.c (c_finish_omp_clauses): Likewise.
854
3af9c5e9
MP
8552014-03-06 Marek Polacek <polacek@redhat.com>
856
857 PR c/60197
858 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
859 of checking tree code.
860
1c9f5f33
PK
8612014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
862
863 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
864 (c_parser_parameter_declaration): Likewise.
865
cc28fc7f
MP
8662014-02-19 Marek Polacek <polacek@redhat.com>
867
868 PR c/60195
869 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
870 Call mark_exp_read on exp.value.
871 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
872 TREE_ADDRESSABLE on old instead of val.
873 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
874
b581c05c
PK
8752014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
876
877 * c-parser.c (c_parser_get_builtin_args): Replace calls to
878 C_EXPR_APPEND by vec_safe_push.
879 * c-tree.h (C_EXPR_APPEND): Remove.
880
81e5eca8
MP
8812014-01-31 Marek Polacek <polacek@redhat.com>
882
883 PR c/59963
884 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
885 build_function_call_vec.
886 (build_function_call): Likewise.
887 (build_atomic_assign): Likewise.
888 (build_function_call_vec): Add arg_loc parameter. Use it.
889 (convert_arguments): Likewise.
890 (convert_for_assignment): Rename rhs_loc to expr_loc.
891 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
892 (c_parser_objc_keywordexpr): Likewise.
893 (c_parser_postfix_expression_after_primary): Call
894 build_function_call_vec with expr_loc rather than op_loc.
895 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
896 build_function_call_vec.
897 (c_parser_expr_list): Add locations parameter. Fill it with locations
898 of function arguments.
899 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
900
68fca595
MP
9012014-01-30 Marek Polacek <polacek@redhat.com>
902
903 PR c/59940
904 * c-typeck.c (build_function_call_vec): Use loc parameter.
905 (convert_arguments): Add location parameter. Use it.
906 (ep_convert_and_check): Likewise.
907 (build_atomic_assign): Adjust convert_for_assignment call.
908 (build_modify_expr): Likewise.
909 (digest_init): Likewise.
910 (c_finish_return): Likewise.
911 (build_conditional_expr): Adjust ep_convert_and_check calls.
912 (convert_for_assignment): Add rhs_loc parameter. Use it.
913 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
914 calls.
915
fa337f3a
RB
9162014-01-30 Richard Biener <rguenther@suse.de>
917
918 PR c/59905
919 * c-typeck.c (build_function_call_vec): Do not replace calls
920 to a function via an incompatible type with a runtime abort.
921
b72271b9
BI
9222014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
923
924 * c-parser.c (c_parser_declaration_or_fndef): Replaced
925 flag_enable_cilkplus with flag_cilkplus.
926 (c_parser_direct_declarator_inner): Likewise.
927 (c_parser_attribute_any_word): Likewise.
928 (c_parser_attributes): Likewise.
929 (c_parser_compound_statement): Likewise.
930 (c_parser_statement_after_labels): Likewise.
931 (c_parser_if_statement): Likewise.
932 (c_parser_switch_statement): Likewise.
933 (c_parser_do_statement): Likewise.
934 (c_parser_for_statement): Likewise.
935 (c_parser_unary_expression): Likewise.
936 (c_parser_postfix_expression): Likewise.
937 (c_parser_postfix_expression_after_primary): Likewise.
938 (c_parser_postfix_expression_after_primary): Likewise.
939 (c_parser_omp_clause_name): Likewise.
940 (c_finish_omp_declare_simd): Likewise.
941 (c_parser_cilk_verify_simd): Likewise.
942 * c-typeck.c (build_array_ref): Likewise.
943 (build_function_call_vec): Likewise.
944 (convert_arguments): Likewise.
945 (build_compound_expr): Likewise.
946 (c_finish_return): Likewise.
947 (c_finish_if_stmt): Likewise.
948 (c_finish_loop): Likewise.
949 (build_binary_op): Likewise.
950
393e8e8b
MP
9512014-01-23 Marek Polacek <polacek@redhat.com>
952
953 PR c/59846
954 * c-typeck.c (parser_build_binary_op): Use location instead of
955 input_location.
956 (build_binary_op): Pass location to shorten_compare.
957
f04dda30
MP
9582014-01-23 Marek Polacek <polacek@redhat.com>
959
960 PR c/58346
961 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
962 an empty aggregate.
963
789eadcd
MP
9642014-01-23 Marek Polacek <polacek@redhat.com>
965
966 PR c/59871
967 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
968 of a comma expression.
969 (emit_side_effect_warnings): Likewise.
970
40f14e9f
BI
9712014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
972
973 PR c/59825
974 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
975 function to use walk_tree and moved a lot of its functionality to
976 expand_array_notations.
977 (expand_array_notations): New function.
978
74558dd9
BI
9792014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
980
981 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
982 attribute an attribute without value.
983
652fea39
JJ
9842014-01-23 Jakub Jelinek <jakub@redhat.com>
985
986 PR middle-end/58809
987 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
988 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
989
f34f1c87
MP
9902014-01-22 Marek Polacek <polacek@redhat.com>
991
992 PR c/59891
993 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
994 of remove_c_maybe_const_expr on op1 and op2.
995
241f845a
JJ
9962014-01-15 Jakub Jelinek <jakub@redhat.com>
997
998 PR c/58943
999 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
1000 effects, preevaluate rhs using SAVE_EXPR first.
1001
9a74f20c
BI
10022014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
1003
1004 PR c++/59631
1005 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
1006 statements with if-elseif statements.
1007
96066ce1
MP
10082014-01-06 Marek Polacek <polacek@redhat.com>
1009
1010 PR c/57773
1011 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
1012 defined bit-field types only in ISO C.
1013
23a5b65a
RS
10142014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1015
1016 Update copyright years
1017
f9030485
RS
10182014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1019
1020 * c-array-notation.c: Use the standard form for the copyright notice.
1021
41958c28
BI
10222013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
1023
1024 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
1025 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
1026 field in parser is not empty. If not-empty, call the function
1027 c_parser_finish_omp_declare_simd.
1028 (c_parser_cilk_clause_vectorlength): Modified function to be shared
1029 between SIMD-enabled functions and #pragma simd. Added new parameter.
1030 (c_parser_cilk_all_clauses): Modified the usage of the function
1031 c_parser_cilk_clause_vectorlength as mentioned above.
1032 (c_parser_cilk_simd_fn_vector_attrs): New function.
1033 (c_finish_cilk_simd_fn_tokens): Likewise.
1034 (is_cilkplus_vector_p): Likewise.
1035 (c_parser_omp_clause_name): Added checking for "vectorlength,"
1036 "nomask," and "mask" strings in clause name.
1037 (c_parser_omp_all_clauses): Added 3 new case statements:
1038 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
1039 PRAGMA_CILK_CLAUSE_NOMASK.
1040 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
1041 check for vector attribute and if so call the function
1042 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
1043 called the function c_finish_cilk_simd_fn_tokens.
1044 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
1045 parser field is non-empty. If so, parse them as you would parse
1046 the omp declare simd pragma.
1047 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
1048 Added a check when step is a parameter and flag it as error.
1049 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
1050 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
1051 pragma_omp_clause.
1052
cef0fd0e
TS
10532013-12-17 Thomas Schwinge <thomas@codesourcery.com>
1054
1055 * c-parser.c (c_parser_omp_parallel): Fix description.
1056
12893402
BI
10572013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
1058
1059 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
1060 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1061 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
1062 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
1063
296674db
JM
10642013-12-04 Joseph Myers <joseph@codesourcery.com>
1065
1066 PR c/52023
1067 * c-parser.c (c_parser_alignas_specifier): Use
1068 c_sizeof_or_alignof_type instead of c_alignof.
1069 (c_parser_alignof_expression): Likewise, with min_alignof
1070 parameter depending on alignof spelling used.
1071
edd28054
MP
10722013-12-04 Marek Polacek <polacek@redhat.com>
1073
1074 PR c/54113
1075 * c-decl.c (start_function): Don't warn for missing prototype for
1076 inline functions.
1077
da0fc454
MP
10782013-12-03 Marek Polacek <polacek@redhat.com>
1079
1080 PR c/59351
1081 * c-decl.c (build_compound_literal): Allow compound literals with
1082 empty initial value.
1083
4c2ecab0
JM
10842013-12-02 Joseph Myers <joseph@codesourcery.com>
1085
1086 PR c/58235
1087 * c-typeck.c (build_modify_expr): Diagnose assignment to
1088 expression with array type.
1089
340baef7
JM
10902013-11-29 Joseph Myers <joseph@codesourcery.com>
1091
1092 PR c/42262
1093 * c-typeck.c (process_init_element): Do not treat a string as
1094 initializing a whole array when used with a designator for an
1095 individual element.
1096
6763b9f7
JM
10972013-11-29 Joseph Myers <joseph@codesourcery.com>
1098
1099 PR c/57574
1100 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
1101 an inline function following a static declaration.
1102
e7bd1de1
JJ
11032013-11-28 Jakub Jelinek <jakub@redhat.com>
1104
1105 PR c/59310
1106 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
1107 to p_name before calling c_parser_omp_teams instead of after.
1108 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
1109 argument. Remove unused p_name variable.
1110
0136f8f0
AH
11112013-11-27 Aldy Hernandez <aldyh@redhat.com>
1112 Jakub Jelinek <jakub@redhat.com>
1113
1114 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
1115 external_scope is NULL.
1116
241b71bb
TV
11172013-11-27 Tom de Vries <tom@codesourcery.com>
1118 Marc Glisse <marc.glisse@inria.fr>
1119
1120 PR c++/59032
1121 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
1122
2fb9a547
AM
11232013-11-22 Andrew MacLeod <amacleod@redhat.com>
1124
1125 * c-typeck.c: Add required include files from gimple.h.
1126
8400e75e
DM
11272013-11-22 David Malcolm <dmalcolm@redhat.com>
1128
1129 * c-decl.c (define_label, shadow_tag_warned)
1130 (check_bitfield_type_and_width, grokdeclarator, grokparms,
1131 store_parm_decls_newstyle, store_parm_decls_oldstyle)
1132 (declspecs_add_type): Remove use of in_system_header macro.
1133 * c-parser.c (c_parser_unary_expression): Likewise.
1134 * c-typeck.c (store_init_value, process_init_element)
1135 (c_start_case): Likewise.
1136
1137 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
1138 macro.
1139
1140 * c-parser.c (c_parser_set_source_position_from_token): Remove
1141 reference to in_system_header from comment.
1142
386b1f1f
RS
11432013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1144
1145 * c-decl.c (grokdeclarator): Update comment to refer to
1146 tree_to_[su]hwi rather than tree_low_cst.
1147
ae7e9ddd
RS
11482013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1149
1150 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
1151 tree_to_uhwi throughout.
1152
9439e9a1
RS
11532013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1154
1155 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
1156 throughout.
1157
9541ffee
RS
11582013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1159
1160 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
1161 throughout.
1162
c02065fc
AH
11632013-11-15 Aldy Hernandez <aldyh@redhat.com>
1164
1165 * c-parser.c (c_parser_cilk_simd): New.
1166 (c_parser_cilk_verify_simd): New.
1167 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
1168 (c_parser_omp_for_loop): Add case for NE_EXPR.
1169 Set c_break_label for CILK_SIMD.
1170 (c_parser_cilk_clause_vectorlength): New.
1171 (c_parser_cilk_clause_linear): New.
1172 (c_parser_cilk_clause_name): New.
1173 (c_parser_cilk_all_clauses): New.
1174 * c-typeck.c (build_unary_op): Pass location argument to
1175 readonly_error.
1176 (build_modify_expr): Same.
1177 (build_asm_expr): Same.
1178 (c_finish_bc_stmt): Error on break/continue in loops.
1179
18f429e2
AM
11802013-11-14 Andrew MacLeod <amacleod@redhat.com>
1181
1182 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
1183
d8a2d370
DN
11842013-11-14 Diego Novillo <dnovillo@google.com>
1185
1186 * c-decl.c: Include print-tree.h.
1187 Include stor-layout.h.
1188 Include varasm.h.
1189 Include attribs.h.
1190 Include stringpool.h.
1191 * c-lang.c: Include fold-const.h.
1192 * c-parser.c: Include stringpool.h.
1193 Include attribs.h.
1194 Include stor-layout.h.
1195 Include varasm.h.
1196 Include trans-mem.h.
1197 * c-typeck.c: Include stor-layout.h.
1198 Include trans-mem.h.
1199 Include varasm.h.
1200 Include stmt.h.
1201
38b7bc7f
JM
12022013-11-13 Joseph Myers <joseph@codesourcery.com>
1203
1204 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
1205 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
1206 __auto_type.
1207 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
1208 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
1209 RID_AUTO_TYPE.
1210 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
1211 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
1212 (c_parser_declarator, c_parser_direct_declarator_inner)
1213 (c_parser_parameter_declaration, c_parser_type_name): All callers
1214 changed.
1215 (c_parser_declaration_or_fndef): Handle declarations with type
1216 determined from the initializer.
1217
45b0be94
AM
12182013-11-12 Andrew MacLeod <amacleod@redhat.com>
1219
18f429e2 1220 * c-typeck.c: Include gimplify.h.
45b0be94 1221
582d9b50
JM
12222013-11-12 Joseph Myers <joseph@codesourcery.com>
1223
1224 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
1225 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
1226 comment.
1227 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
1228 or _Thread_local as appropriate in diagnostics.
1229 (build_null_declspecs): Initialize ret->thread_gnu_p.
1230 (declspecs_add_scspec): Handle either __thread or _Thread_local
1231 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
1232 pedantic. Do not disallow _Thread_local extern and _Thread_local
1233 static.
1234
267bac10
JM
12352013-11-07 Joseph Myers <joseph@codesourcery.com>
1236 Andrew MacLeod <amacleod@redhat.com>
1237
1238 * c-aux-info.c (gen_type): Handle atomic qualifier.
1239 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
1240 qualifiers when compating types.
1241 (shadow_tag_warned): Handle atomic_p in declspecs.
1242 (quals_from_declspecs): Likewise.
1243 (start_decl): Use c_type_promotes_to when promoting argument
1244 types.
1245 (grokdeclarator): Handle _Atomic.
1246 (get_parm_info): Diagnose any qualifier on "void" as only
1247 parameter.
1248 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
1249 comparing types. Use c_type_promotes_to when promoting argument
1250 types.
1251 (finish_function): Use c_type_promotes_to when promoting argument
1252 types.
1253 (build_null_declspecs): Handle atomic_p in declspecs.
1254 (declspecs_add_qual): Handle RID_ATOMIC.
1255 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
1256 (c_token_starts_declspecs): Handle RID_ATOMIC.
1257 (c_parser_declspecs): Handle atomic type specifiers and
1258 qualifiers.
1259 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
1260 from types of expressions with atomic type.
1261 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
1262 (c_parser_attribute_any_word): Handle RID_ATOMIC.
1263 (c_parser_initializer, c_parser_initelt, c_parser_initval)
1264 (c_parser_statement_after_labels, c_parser_switch_statement)
1265 (c_parser_for_statement, c_parser_expr_no_commas)
1266 (c_parser_conditional_expression, c_parser_binary_expression)
1267 (c_parser_cast_expression, c_parser_unary_expression)
1268 (c_parser_postfix_expression)
1269 (c_parser_postfix_expression_after_primary, c_parser_expression):
1270 Use convert_lvalue_to_rvalue.
1271 (c_parser_expression_conv, c_parser_expr_list): Document
1272 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
1273 (c_parser_objc_synchronized_statement): Use
1274 convert_lvalue_to_rvalue.
1275 (c_parser_objc_selector): Handle RID_ATOMIC.
1276 (c_parser_objc_receiver, c_parser_array_notation): Use
1277 convert_lvalue_to_rvalue.
1278 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
1279 _Atomic (type-name).
1280 (struct c_declspecs): Add atomic_p field.
1281 (convert_lvalue_to_rvalue): Declare.
1282 * c-typeck.c (c_type_promotes_to): Promote atomic types to
1283 corresponding atomic types.
1284 (qualify_type): Don't add _Atomic qualifiers from second argument.
1285 (comp_target_types): Do not allow _Atomic mismatches.
1286 (type_lists_compatible_p): Do not remove atomic qualifiers when
1287 comparing types.
1288 (really_atomic_lvalue, convert_lvalue_to_rvalue)
1289 (build_atomic_assign): New functions.
1290 (build_unary_op): Use build_atomic_assign for atomic increment and
1291 decrement.
1292 (build_conditional_expr): Do not treat _Atomic void as a qualified
1293 version of void.
1294 (build_modify_expr): Use build_atomic_assign for atomic LHS.
1295 (find_anonymous_field_with_type, convert_to_anonymous_field)
1296 (convert_for_assignment): Do not remove atomic qualifiers when
1297 comparing types.
1298 (digest_init): Do not accept initialization of arrays of atomic
1299 elements by string constants.
1300 (build_asm_expr): Use convert_lvalue_to_rvalue.
1301 (build_binary_op): Do not treat _Atomic void as a qualified
1302 version of void.
1303
0c249d4b
DD
13042013-11-06 DJ Delorie <dj@redhat.com>
1305
1306 * c-decl.c (locate_old_decl): If a previous conflicting decl is
1307 both explicit and builtin, print the location of the explicit one.
1308
6d7f7e0a
TB
13092013-11-05 Tobias Burnus <burnus@net-b.de>
1310
1311 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
1312 c_parser_omp_distribute, c_parser_omp_teams,
1313 c_parser_omp_target, c_parser_omp_declare): Handle
1314 -fopenmp-simd.
1315
b906f4ca
MP
13162013-11-03 Marek Polacek <polacek@redhat.com>
1317
1318 * c-decl.c (grokdeclarator): Add VLA instrumentation.
1319
ee1d5a02
JJ
13202013-11-01 Jakub Jelinek <jakub@redhat.com>
1321
1322 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
1323 check_dup_generic at the end, unless remove is true.
1324 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
1325 remove = true;.
1326 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
1327
5a9785fb
JJ
13282013-10-31 Jakub Jelinek <jakub@redhat.com>
1329
1330 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
1331 with decl that is not pointer nor array.
1332
939b37da
BI
13332013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1334
1335 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
1336 a spawning function is found.
1337 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
1338 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
1339 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1340 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
1341 case.
1342 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
1343 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
1344 expr.
1345 (c_finish_return): Added a check to reject _Cilk_spawn in return
1346 expression.
1347 (build_cilk_spawn): New function.
1348 (build_cilk_sync): Likewise.
1349 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
1350
d4af74d4
TB
13512013-10-27 Tobias Burnus <burnus@net-b.de>
1352
1353 PR other/33426
1354 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
1355 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
1356 (c_parser_statement_after_labels): Update calls.
1357
d73749df 13582013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
1359
1360 PR other/33426
1361 * c-parser.c (c_parser_pragma, c_parser_for_statement):
1362 Handle PRAGMA_IVDEP.
1363 (c_parser_statement_after_labels): Update call.
1364
f28aa681
MP
13652013-10-24 Marek Polacek <polacek@redhat.com>
1366
1367 * c-parser.c (c_parser_struct_declaration): Add a comment.
1368 (c_parser_declarator): Don't allow _Alignas here.
1369
0645c1a2
AM
13702013-10-17 Andrew MacLeod <amacleod@redhat.com>
1371
1372 * c-parser.c: Include omp-low.h.
1373 * c-typeck.c: Likewise.
1374
568a31f2
MP
13752013-10-17 Marek Polacek <polacek@redhat.com>
1376
1377 PR c/58267
1378 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
1379 Document syntax of the array-declarator.
1380 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
1381 are not permitted.
1382 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
1383 (c_parser_struct_declaration): Likewise.
1384 (c_parser_declarator): Likewise.
1385 (c_parser_direct_declarator_inner): Likewise.
1386 (c_parser_parameter_declaration): Likewise.
1387 (c_parser_type_name): Likewise.
1388
acf0174b
JJ
13892013-10-11 Jakub Jelinek <jakub@redhat.com>
1390
1391 * c-lang.h (current_omp_declare_target_attribute): New extern
1392 decl.
1393 * c-parser.c: Include c-lang.h.
1394 (struct c_parser): Change tokens to c_token *.
1395 Add tokens_buf field. Change tokens_avail type to unsigned int.
1396 (c_parser_consume_token): If parser->tokens isn't
1397 &parser->tokens_buf[0], increment parser->tokens.
1398 (c_parser_consume_pragma): Likewise.
1399 (enum pragma_context): Add pragma_struct and pragma_param.
1400 (c_parser_external_declaration): Adjust
1401 c_parser_declaration_or_fndef caller.
1402 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
1403 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
1404 Adjust recursive call.
1405 (c_parser_struct_or_union_specifier): Use pragma_struct instead
1406 of pragma_external.
1407 (c_parser_parameter_declaration): Use pragma_param instead of
1408 pragma_external.
1409 (c_parser_compound_statement_nostart, c_parser_label,
1410 c_parser_for_statement): Adjust
1411 c_parser_declaration_or_fndef callers.
1412 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
1413 it through to c_parser_conditional_expression.
1414 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
1415 pass it through to c_parser_binary_expression. Adjust recursive
1416 call.
1417 (c_parser_binary_expression): Remove prec argument, add
1418 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
1419 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
1420 binop matches it, use build2 instead of parser_build_binary_op.
1421 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
1422 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
1423 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
1424 Handle pragma_struct and pragma_param the same as pragma_external.
1425 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
1426 (c_parser_omp_variable_list): Parse array sections for
1427 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
1428 (c_parser_omp_clause_collapse): Fully fold collapse expression.
1429 (c_parser_omp_clause_reduction): Handle user defined reductions.
1430 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
1431 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
1432 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
1433 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
1434 c_parser_omp_clause_depend, c_parser_omp_clause_map,
1435 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
1436 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
1437 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
1438 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
1439 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
1440 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
1441 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
1442 (c_parser_omp_for_loop): Add CODE argument, pass it through
1443 to c_finish_omp_for. Change last argument to cclauses,
1444 and adjust uses to grab parallel clauses from the array of all
1445 the split clauses. Adjust c_parser_binary_expression,
1446 c_parser_declaration_or_fndef and c_finish_omp_for callers.
1447 (omp_split_clauses): New function.
1448 (c_parser_omp_simd): New function.
1449 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
1450 Allow the function to be called also when parsing combined constructs,
1451 and call c_parser_omp_simd when parsing for simd.
1452 (c_parser_omp_sections_scope): If section-sequence doesn't start with
1453 #pragma omp section, require exactly one structured-block instead of
1454 sequence of statements.
1455 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
1456 Allow the function to be called also when parsing combined constructs.
1457 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
1458 Allow the function to be called also when parsing combined
1459 constructs.
1460 (c_parser_omp_taskgroup, c_parser_omp_cancel,
1461 c_parser_omp_cancellation_point, c_parser_omp_distribute,
1462 c_parser_omp_teams, c_parser_omp_target_data,
1463 c_parser_omp_target_update, c_parser_omp_target,
1464 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
1465 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
1466 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
1467 (c_parser_omp_construct): Add p_name and mask vars. Handle
1468 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
1469 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
1470 and c_parser_omp_sections callers.
1471 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
1472 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1473 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
1474 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
1475 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
1476 OMP_CLAUSE_DEPEND.
1477 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
1478 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
1479 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
1480 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
1481 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
1482 * c-typeck.c: Include tree-inline.h.
1483 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
1484 handle_omp_array_sections_1, handle_omp_array_sections,
1485 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
1486 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
1487 user defined reductions.
1488 (c_tree_equal): New function.
1489 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
1490 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
1491 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
1492 c_check_omp_declare_reduction_r): New prototypes.
1493 * c-decl.c (current_omp_declare_target_attribute): New variable.
1494 (c_decl_attributes): New function.
1495 (start_decl, start_function): Use it instead of decl_attributes.
1496 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
1497 c_omp_reduction_decl, c_omp_reduction_lookup,
1498 c_check_omp_declare_reduction_r): New functions.
1499
0a6c2227
TT
15002013-09-25 Tom Tromey <tromey@redhat.com>
1501
1502 * Make-lang.in (c/gccspec.o): Remove.
1503 (CFLAGS-c/gccspec.o): New variable.
1504 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
1505 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
1506 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
1507
f3bc55f0
TT
15082013-09-25 Tom Tromey <tromey@redhat.com>
1509
1510 * Make-lang.in (c/gccspec.o): Don't use subshell.
1511
a24d975c
MP
15122013-09-18 Marek Polacek <polacek@redhat.com>
1513
1514 PR sanitize/58443
1515 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
1516 Remove unnecessary check.
1517
ce6923c5
MP
15182013-09-18 Marek Polacek <polacek@redhat.com>
1519
1520 PR sanitizer/58411
1521 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
1522 no_sanitize_undefined attribute.
1523
a1e51df9
KT
15242013-09-13 Kai Tietz <ktietz@redhat.com>
1525
1526 PR target/57848
1527 * c-decl.c (c_builtin_function_ext_scope): Remove
1528 wrong assumption that it is never called on prexisting
1529 symbol.
1530
0af94e6f
JR
15312013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
1532
1533 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
1534
20059c8b
GDR
15352013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1536
1537 * c-objc-common.c (c_tree_printer): Tidy.
1538
de5a5fa1
MP
15392013-08-30 Marek Polacek <polacek@redhat.com>
1540
1541 * c-typeck.c (build_binary_op): Add division by zero and shift
1542 instrumentation.
1543
2531a1d9 15442013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 1545 Joseph Myers <joseph@codesourcery.com>
2531a1d9 1546
6e2bcc98 1547 PR c/35649
2531a1d9
JR
1548 * c-typeck.c (c_common_type): Prefer double_type_node over
1549 other REAL_TYPE types with the same precision.
1550 (convert_arguments): Likewise.
1551
025311c4
GDR
15522013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
1553
1554 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
1555 (c_initialize_diagnostics): Call a destructor for the early printer.
1556
da6ca2b5
GDR
15572013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1558
1559 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
1560 printer initialization.
1561
318cda85 15622013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 1563
318cda85
BI
1564 PR c/57490
1565 * c-array-notation.c (fix_conditional_array_notations_1): Added a
1566 check for truth values.
1567 (expand_array_notation_exprs): Added truth values case. Removed an
1568 unwanted else. Added for-loop to walk through subtrees in default
1569 case.
1570
b066401f
GDR
15712013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
1572
1573 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
1574
fb48aadc
JM
15752013-07-23 Joseph Myers <joseph@codesourcery.com>
1576
1577 * c-parser.c (struct c_generic_association): Fix typo.
1578
433cc7b0
TT
15792013-07-23 Tom Tromey <tromey@redhat.com>
1580 Joseph Myers <joseph@codesourcery.com>
1581
1582 * c-parser.c (struct c_generic_association): New.
1583 (c_generic_association_d): New typedef.
1584 (c_parser_generic_selection): New function.
1585 (c_parser_postfix_expression): Handle RID_GENERIC.
1586
26d40c3d
JM
15872013-07-13 Jason Merrill <jason@redhat.com>
1588
1589 PR c++/57793
1590 * c-decl.c (finish_struct): Check for too-large class.
1591
ecdbd01a 15922013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
1593
1594 PR c/57821
1595 * c-typeck.c (set_init_index): When folding, check for index overflow.
1596
1141ed3f
BI
15972013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
1598
1599 * c-parser.c (c_parser_array_notation): Removed rejection of array
1600 notations in an array of function pointers.
1601
713b46fa
BI
16022013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
1603
1604 * c-array-notation.c (make_triplet_val_inv): New function.
1605 (create_cmp_incr): Likewise.
1606 (create_array_refs): Likewise.
1607 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
1608 Also modularized common parts between functions and called the function.
1609 (build_array_notation_expr): Likewise.
1610 (fix_conditional_array_notations_1): Likewise.
1611 (fix_array_notation_expr): Likewise.
1612 (fix_array_notation_call_expr): Likewise.
1613
92f20202
MP
16142013-06-18 Marek Polacek <polacek@redhat.com>
1615
1616 PR c/57630
1617 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
1618
73a23b06
BI
16192013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
1620
1621 * c-array-notation.c (build_array_notation_expr): Reject array notation
1622 mismatch between LHS and RHS even inside a call_expr. Also, removed
1623 a couple while statements that were dead code.
1624
00b8517d
BI
16252013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
1626
1627 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
1628 excessive precision expressions in function parameters. Also removed
1629 couple unwanted while statements.
1630
1509bdda
BI
16312013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
1632
1633 * c-array-notation.c (expand_array_notation_exprs): Added
1634 ARRAY_NOTATION_REF case.
1635
d60f1706
BI
16362013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
1637
1638 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
1639 function to c-family/array-notation-common.c.
1640 (is_cilkplus_reduce_builtin): Likewise.
1641 (find_rank): Likewise.
1642 (extract_array_notation_exprs): Likewise.
1643 (replace_array_notations): Likewise.
1644 (find_inv_trees): Likewise.
1645 (replace_inv_trees): Likewise.
1646 (contains_array_notation_expr): Likewise.
1647 (find_correct_array_notation_type): Likewise.
1648 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
1649 (struct inv_list): Moved this to c-family/array-notation-common.c.
1650 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
1651
6d6efbb3
BI
16522013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
1653
1654 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
1655 reduction functions outside the for-loop. Added a check if the fundecl
1656 is non-NULL. Finally, removed an unwanted if-statement, and made the
1657 body unconditional.
1658
25c22937
BI
16592013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
1660
1661 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
1662 condition of the if-statement matches the rank of else-block and then-
1663 block when array notations are used.
1664 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
1665 expression after the entire function body is parsed.
1666 (c_parser_expr_no_commas): Delayed creating array notation expressions
1667 to the end of function parsing.
1668 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
1669 whole if-statement instead of just the condition.
1670 (expand_array_notation_exprs): Added MODIFY_EXPR case.
1671
edd25645
BI
16722013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
1673
1674 PR c/57474
1675 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
1676 array to NULL_TREE if they are unused. Also added a check for the
1677 field to be NULL before its fields are used in future.
1678
065ce7f1
RO
16792013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1680
1681 PR bootstrap/57450
1682 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
1683 (build_array_notation_expr): Likewise.
1684
36536d79
BI
16852013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
1686
1687 * c-typeck.c (build_array_ref): Added a check to see if array's
1688 index is greater than one. If true, then emit an error.
1689 (build_function_call_vec): Exclude error reporting and checking
1690 for builtin array-notation functions.
1691 (convert_arguments): Likewise.
1692 (c_finish_return): Added a check for array notations as a return
1693 expression. If true, then emit an error.
1694 (c_finish_loop): Added a check for array notations in a loop
1695 condition. If true then emit an error.
1696 (lvalue_p): Added a ARRAY_NOTATION_REF case.
1697 (build_binary_op): Added a check for array notation expr inside
1698 op1 and op0. If present, we call another function to find correct
1699 type.
1700 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
1701 * c-parser.c (c_parser_compound_statement): Check if array
1702 notation code is used in tree, if so, then transform them into
1703 appropriate C code.
1704 (c_parser_expr_no_commas): Check if array notation is used in LHS
1705 or RHS, if so, then build array notation expression instead of
1706 regular modify.
1707 (c_parser_postfix_expression_after_primary): Added a check for
1708 colon(s) after square braces, if so then handle it like an array
1709 notation. Also, break up array notations in unary op if found.
1710 (c_parser_direct_declarator_inner): Added a check for array
1711 notation.
1712 (c_parser_compound_statement): Added a check for array notation in
1713 a stmt. If one is present, then expand array notation expr.
1714 (c_parser_if_statement): Likewise.
1715 (c_parser_switch_statement): Added a check for array notations in
1716 a switch statement's condition. If true, then output an error.
1717 (c_parser_while_statement): Similarly, but for a while.
1718 (c_parser_do_statement): Similarly, but for a do-while.
1719 (c_parser_for_statement): Similarly, but for a for-loop.
1720 (c_parser_unary_expression): Check if array notation is used in a
1721 pre-increment or pre-decrement expression. If true, then expand
1722 them.
1723 (c_parser_array_notation): New function.
1724 * c-array-notation.c: New file.
1725 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
1726
cd192ccc
MS
17272013-05-23 Mike Stump <mikestump@comcast.net>
1728
1729 * c-typeck.c (convert_for_assignment): Handle references to memory
1730 spaces better.
1731
427b248d
JM
17322013-05-16 Jason Merrill <jason@redhat.com>
1733
1734 * Make-lang.in (cc1$(exeext)): Use link mutex.
1735
44d90fe1
PC
17362013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
1737
1738 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
1739 to simply use OPT_Wpointer_arith.
1740 (build_unary_op): Likewise.
1741
4e7d7b3d
JJ
17422013-04-03 Jakub Jelinek <jakub@redhat.com>
1743
1744 PR c/19449
1745 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
1746 argument. If set, or it temporarily for parsing of the first
1747 argument into force_folding_builtin_constant_p.
1748 (c_parser_postfix_expression): Adjust callers.
1749
839b422f
RB
17502013-03-21 Richard Biener <rguenther@suse.de>
1751
1752 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
1753 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
1754
2ee028f1
MP
17552013-02-12 Marek Polacek <polacek@redhat.com>
1756
1757 PR c/44938
1758 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
1759 origtypes to NULL.
1760
8824edff
JJ
17612013-01-24 Jakub Jelinek <jakub@redhat.com>
1762
1763 PR c/56078
1764 * c-typeck.c (set_nonincremental_init_from_string): If
1765 constructor_max_index is NULL, treat it as if tree_int_cst_lt
1766 returned false.
1767 (process_init_element): Likewise.
1768
eadd3d0d
JJ
17692012-12-20 Jakub Jelinek <jakub@redhat.com>
1770
1771 PR c++/55619
1772 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
1773 argument, don't call default_function_array_conversion
1774 nor c_fully_fold here.
1775 (c_parser_asm_statement): Adjust callers.
1776 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
1777 and outputs here, and call default_function_array_conversion
1778 on inputs that don't need to be addressable.
1779
f8a93a2e
JJ
17802012-12-18 Jakub Jelinek <jakub@redhat.com>
1781
1782 PR c/39464
1783 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
1784 warning require that both c_common_unsigned_type as well as
1785 c_common_signed_type is the same for both mvl and mvr types.
1786
9771b263
DN
17872012-11-16 Diego Novillo <dnovillo@google.com>
1788
1789 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
1790
1791 * c-common.c: Use new vec API in vec.h.
1792 * c-common.h: Likewise.
1793 * c-gimplify.c: Likewise.
1794 * c-pragma.c: Likewise.
1795 * c-pretty-print.c: Likewise.
1796 * c-pretty-print.h: Likewise.
1797 * c-semantics.c: Likewise.
1798 * c-decl.c: Likewise.
1799 * c-parser.c: Likewise.
1800 * c-tree.h: Likewise.
1801 * c-typeck.c: Likewise.
1802
880661a4
JW
18032012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
1804
1805 PR c++/54930
1806 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
1807
077d1abe
MLI
18082012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1809
1810 PR c/53066
1811 * c-decl.c (warn_if_shadowing): Do not warn if a variable
1812 shadows a function, unless the variable is a function or a
1813 pointer-to-function.
1814
3a785c97
JJ
18152012-10-12 Jakub Jelinek <jakub@redhat.com>
1816
1817 PR c/54381
1818 * c-parser.c (struct c_tree_loc_pair): Removed.
1819 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
1820 add location_t * and tree * arguments, fill in array of 3
1821 sizeof_arg trees and corresponding locs.
1822 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
1823 c_parser_expr_list callers.
1824 (c_parser_postfix_expression_after_primary): Likewise. Pass
1825 array of 3 sizeof_arg trees and locs (corresponding to first
1826 3 arguments) to sizeof_pointer_memaccess_warning.
1827
703c8606
LC
18282012-10-09 Lawrence Crowl <crowl@google.com>
1829
1830 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
1831 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
1832 hash table.
1833
5d9de0d0
PC
18342012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
1835
1836 PR c++/54194
1837 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
1838 call.
1839
a212e43f
MG
18402012-10-09 Marc Glisse <marc.glisse@inria.fr>
1841
1842 PR c++/54427
1843 * c-typeck.c: Include c-common.h.
1844 (enum stv_conv): Moved to c-common.h.
1845 (scalar_to_vector): Moved to c-common.c.
1846 (build_binary_op): Adapt to scalar_to_vector's new prototype.
1847 * Make-lang.in: c-typeck.c depends on c-common.h.
1848
3b78de56
AC
18492012-10-04 Arnaud Charlet <charlet@adacore.com>
1850
1851 * c-decl.c (c_write_global_declarations): Fix handling of
1852 -fdump-ada-spec*.
1853
78c60e3d
SS
18542012-09-30 Sharad Singhai <singhai@google.com>
1855
1856 * c-decl.c (c_write_global_declarations): Use a different method
1857 to determine if the dump has ben initialized.
1858
9f33203d
JM
18592012-09-14 Joseph Myers <joseph@codesourcery.com>
1860
1861 PR c/54552
1862 * c-typeck.c (c_cast_expr): When casting to a type requiring
1863 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
1864 c_fully_fold first.
1865
a27d595d
JM
18662012-09-14 Joseph Myers <joseph@codesourcery.com>
1867
1868 PR c/54103
1869 * c-typeck.c (build_unary_op): Pass original argument of
1870 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
1871 any C_MAYBE_CONST_EXPR, if it has integer operands.
1872 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
1873 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
1874 to c_objc_common_truthvalue_conversion, then remove any
1875 C_MAYBE_CONST_EXPR, if they have integer operands. Use
1876 c_objc_common_truthvalue_conversion not
1877 c_common_truthvalue_conversion.
1878 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
1879 call note_integer_operands for arguments with integer operands
1880 that are not integer constants.
1881
9feb29df
JJ
18822012-09-13 Jakub Jelinek <jakub@redhat.com>
1883
1884 PR c/54559
1885 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
1886 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
1887
d409320c
JJ
18882012-08-31 Jakub Jelinek <jakub@redhat.com>
1889
1890 PR c/54428
1891 * c-convert.c (convert): Don't call fold_convert_loc if
1892 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
1893 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
1894 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
1895
6265d07c
JJ
18962012-08-24 Jakub Jelinek <jakub@redhat.com>
1897
1898 PR c/54355
1899 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
1900 for nested and empty_ok arguments in the call to
1901 c_parser_declaration_or_fndef.
1902
1a4049e7
JJ
19032012-08-17 Jakub Jelinek <jakub@redhat.com>
1904
1905 * c-tree.h (c_last_sizeof_arg): Declare.
1906 * c-parser.c (struct c_tree_loc_pair): New type.
1907 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
1908 non-NULL.
1909 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
1910 (c_parser_postfix_expression_after_primary): Likewise. Call
1911 sizeof_pointer_memaccess_warning if needed.
1912 (sizeof_ptr_memacc_comptypes): New function.
1913 * c-typeck.c (c_last_sizeof_arg): New global variable.
1914 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
1915
0229aee9
UB
19162012-07-24 Uros Bizjak <ubizjak@gmail.com>
1917
1918 * c-lang.h (lang_decl): Add variable_size GTY option.
1919
7ee2468b
SB
19202012-07-16 Steven Bosscher <steven@gcc.gnu.org>
1921
1922 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
1923 * Make-lang.in: Fix dependencies.
1924
d4a10d0a
SB
19252012-06-29 Steven Bosscher <steven@gcc.gnu.org>
1926
1927 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
1928 and add language Makefile hooks.
1929 * config-lang.in: New file.
1930 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
1931 add the required "normal" config-lang.in rules.
1932 * c-lang.h: Moved from gcc/ to here.
1933 * c-tree.h: Likewise.
1934 * c-objc-common.c: Likewise.
1935 * c-objc-common.h: Likewise.
1936 * c-typeck.c: Likewise.
1937 * c-convert.c: Likewise.
1938 * c-lang.c: Likewise.
1939 * c-aux-info.c: Likewise.
1940 * c-errors.c: Likewise.
1941 * gccspec.c: Likewise.
1942 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
1943 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
1944\f
5624e564 1945Copyright (C) 2012-2015 Free Software Foundation, Inc.
d4a10d0a
SB
1946
1947Copying and distribution of this file, with or without modification,
1948are permitted in any medium without royalty provided the copyright
1949notice and this notice are preserved.
This page took 0.836239 seconds and 5 git commands to generate.