]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
invoke.texi (-fsanitize=bounds): Move to the table with -fsanitize=undefined suboptions.
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
5e88a8f4
IZ
12014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
2
3 PR middle-end/57541
4 * c-array-notation.c (fix_builtin_array_notation_fn):
5 Check for 0 arguments in builtin call. Check that bultin argument is
6 correct.
7 * c-parser.c (c_parser_array_notation): Check for incorrect initial
8 index.
9
9698b078
SH
102014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
11
12 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
13 qualifiers in __auto_type for atomic types.
14 (c_parser_typeof_specifier): Discard all type qualifiers in
15 __typeof__ for atomic types.
16
6e07c515
MP
172014-06-25 Marek Polacek <polacek@redhat.com>
18
19 PR c/61162
20 * c-parser.c (c_parser_statement_after_labels): Pass the location of
21 the return expression to c_finish_return.
22
da6f124d
JJ
232014-06-25 Jakub Jelinek <jakub@redhat.com>
24
25 * c-typeck.c (c_finish_omp_clauses): Make sure
26 OMP_CLAUSE_LINEAR_STEP has correct type.
27
c203e8a7
TS
282014-06-24 Trevor Saunders <tsaunders@mozilla.com>
29
30 * c-decl.c: Adjust.
31
56ad0e38
JJ
322014-06-24 Jakub Jelinek <jakub@redhat.com>
33
34 * c-parser.c (c_parser_omp_for_loop): For
35 #pragma omp parallel for simd move lastprivate clause from parallel
36 to for rather than simd.
37
47c2554f
MP
382014-06-23 Marek Polacek <polacek@redhat.com>
39
40 * c-typeck.c (parser_build_binary_op): Don't call
41 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
42
56363ffd
JH
432014-06-15 Jan Hubicka <hubicka@ucw.cz>
44
45 * c-parser.c (c_parser_omp_threadprivate): Likewise.
46 * c-decl.c (merge_decls): Likewise.
47
d7ff7ae5
MP
482014-06-09 Marek Polacek <polacek@redhat.com>
49
50 PR c/36446
51 * c-typeck.c (error_init): Call inform instead of error_at.
52 (pedwarn_init): Call inform instead of pedwarn.
53 (warning_init): Call inform instead of warning_at.
54
24d047a3
JH
552014-06-07 Jan Hubicka <hubicka@ucw.cz>
56
57 * c-decl.c (merge_decls): Use set_decl_section_name.
58 (duplicate_decls): Remove node if it exists.
59
9bac5cbb
G
602014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
61
62 PR c/53119
63 * c-typeck.c (push_init_level, process_init_element,
64 pop_init_level): Correct check for zero initialization, move
65 missing brace warning to respect zero initialization.
66
8ffcdea8
MP
672014-06-05 Marek Polacek <polacek@redhat.com>
68
69 PR c/56724
70 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
71
742938c9
MP
722014-06-05 Marek Polacek <polacek@redhat.com>
73
74 PR c/49706
75 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
76 on the left hand side operand of a comparison.
77
6447c55d
MP
782014-06-05 Marek Polacek <polacek@redhat.com>
79
80 PR c/48062
81 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
82 Print note only if the warning was printed.
83
9dc7743c
IZ
842014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
85
86 PR c/58942
87 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
88 with a pointer.
89
fedfecef
MP
902014-06-03 Marek Polacek <polacek@redhat.com>
91
92 PR c/60439
93 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
94 c_start_case.
95 * c-tree.h (c_start_case): Update.
96 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
97 switch condition has boolean value.
98
9b2b7279
AM
992014-06-02 Andrew MacLeod <amacleod@redhat.com>
100
101 * c-decl.c: Include builtins.h.
102 * c-parser.c: Likewise.
103
5c1bc275
MP
1042014-05-27 Marek Polacek <polacek@redhat.com>
105
106 PR c/56724
107 * c-typeck.c (convert_arguments): Get location of a parameter. Change
108 error and warning calls to error_at and warning_at. Pass location of
109 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
110 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
111 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
112
97563bc8
IZ
1132014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
114
115 PR c/61191
116 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
117 function parameters.
118
aede2c10
JH
1192014-05-23 Jan Hubicka <hubicka@ucw.cz>
120
121 * c-decl.c (merge_decls): Preserve symtab node pointers.
122 (duplicate_decls): Free new decl.
123
edbba2ce
TS
1242014-05-23 Thomas Schwinge <thomas@codesourcery.com>
125
f3316c6d
TS
126 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
127 initialization.
128
edbba2ce
TS
129 * c-parser.c (c_parser_omp_target): Return bool values.
130
68c81f24
TS
1312014-05-22 Thomas Schwinge <thomas@codesourcery.com>
132
133 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
134 num_teams_loc variable to num_thread_limit_loc.
135
632f2871
RS
1362014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
137
138 * c-array-notation.c (expand_array_notations): Use void_node
139 instead of void_zero_node.
140
766090c2
TS
1412014-05-17 Trevor Saunders <tsaunders@mozilla.com>
142
143 * c-decl.c (finish_struct): Adjust.
144 (finish_enum): Likewise.
145 (bind): Adjust.
146 (record_inline_static): Likewise.
147 (push_scope): Likewise.
148 (make_label): Likewise.
149 (lookup_label_for_goto): Likewise.
150 (finish_struct): Likewise.
151 (finish_enum): Likewise.
152 (store_parm_decls): Likewise.
153 (c_push_function_context): Likewise.
154 * c-lang.h: Remove usage of variable_size gty attribute.
155 * c-parser.c (c_parse_init): Adjust.
156 (c_parse_file): Likewise.
157
2b107f6b
MP
1582014-05-13 Marek Polacek <polacek@redhat.com>
159
160 PR c/61162
161 * c-typeck.c (convert_for_assignment): Pass location to
162 WARN_FOR_ASSIGNMENT instead of input_location.
163
d033409e
MP
1642014-05-10 Marek Polacek <polacek@redhat.com>
165
166 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
167 maybe_warn_string_init.
168 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
169 maybe_warn_string_init.
170 * c-tree.h (maybe_warn_string_init): Update declaration.
171 * c-typeck.c (maybe_warn_string_init): Add location parameter.
172 Call pedwarn_init with loc instead of with input_location.
173 (digest_init): Pass init_loc to maybe_warn_string_init.
174 (pop_init_level): Call pedwarn_init with loc instead of with
175 input_location.
176 (set_init_index): Likewise.
177 (process_init_element): Likewise.
178
ea58ef42
MP
1792014-05-09 Marek Polacek <polacek@redhat.com>
180
181 PR c/61096
182 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
183 (c_parser_initelt): Pass location to set_init_label. Pass array index
184 location to set_init_index.
185 * c-tree.h (push_init_level): Update declaration.
186 (pop_init_level): Likewise.
187 (set_init_index): Likewise.
188 (set_init_label): Likewise.
189 * c-typeck.c (error_init): Add location parameter. Call error_at
190 instead of error.
191 (digest_init): Pass init_loc to error_init.
192 (really_start_incremental_init):
193 (push_init_level): Add location parameter. Pass loc to pop_init_level
194 and error_init.
195 (pop_init_level): Likewise.
196 (set_designator): Add location parameter. Pass loc to pop_init_level,
197 push_init_level, and error_init.
198 (set_init_index): Add location parameter. Pass loc to error_init and
199 set_designator.
200 (set_init_label): Likewise.
201 (output_init_element): Pass loc to error_init.
202 (process_init_element): Pass loc to error_init, pop_init_level,
203 pedwarn_init, and push_init_level.
204
661a0813
MP
2052014-05-09 Marek Polacek <polacek@redhat.com>
206
207 PR c/50459
208 * c-parser.c (c_parser_attributes): Parse the arguments as an
209 expression-list if the attribute takes identifier.
210
2793eeab
MP
2112014-05-08 Marek Polacek <polacek@redhat.com>
212
213 PR c/61053
214 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
215 TYPE_ALIGN_UNIT.
216
f827930a
MP
2172014-05-08 Marek Polacek <polacek@redhat.com>
218
219 PR c/61077
220 * c-decl.c (start_function): Warn for _Atomic-qualified return type
221 of main.
222
1d60af08
KZ
2232014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
224 Mike Stump <mikestump@comcast.net>
225 Richard Sandiford <rdsandiford@googlemail.com>
226
227 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
228 (finish_enum): Use wide-int interfaces.
229 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
230 * c-typeck.c (build_c_cast): Likewise.
231 (set_nonincremental_init_from_string): Likewise.
232 (c_tree_equal): Likewise.
233
a0e24419
MP
2342014-05-02 Marek Polacek <polacek@redhat.com>
235
236 PR c/25801
237 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
238 Return size_one_node when the type is not complete.
239 (pointer_diff): Remove comment.
240 (build_unary_op): Improve error messages.
241
19fc9faa
MP
2422014-05-02 Marek Polacek <polacek@redhat.com>
243
244 * c-typeck.c (c_finish_return): Separate warning_at calls.
245
63bc4e87
MP
2462014-05-02 Marek Polacek <polacek@redhat.com>
247
248 * c-tree.h (error_init): Remove declaration.
249 (pedwarn_init): Likewise.
250 * c-typeck.c (error_init): Make static and move above.
251 (pedwarn_init): Likewise.
252 (warning_init): Move above.
253 (maybe_warn_string_init): Likewise.
254
4bd2511b
JL
2552014-05-01 Jeff Law <law@redhat.com>
256
257 Revert:
258
259 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
260 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
261 avoid goto.
262
6a358dcb
MP
2632014-05-02 Marek Polacek <polacek@redhat.com>
264
265 PR c/60784
266 * c-typeck.c (push_init_level): Set constructor_designated to
267 p->designated for structures.
268
ae5ebda4
MP
2692014-05-01 Marek Polacek <polacek@redhat.com>
270
271 PR c/60915
272 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
273 function-definition has an attribute after the declarator.
274
96b40f8d
MP
2752014-05-01 Marek Polacek <polacek@redhat.com>
276
277 PR c/60257
278 * c-typeck.c (warning_init): Add location_t parameter. Call
279 warning_at instead of warning.
280 (push_init_level): Pass input_location to warning_init.
281 (add_pending_init): Add location_t parameter. Pass loc to
282 warning_init.
283 (set_nonincremental_init): Pass input_location to add_pending_init.
284 (set_nonincremental_init_from_string): Likewise.
285 (output_init_element): Pass loc to warning_init and to
286 add_pending_init.
287
32e00768
MP
2882014-05-01 Marek Polacek <polacek@redhat.com>
289
290 PR c/43395
291 * c-typeck.c (c_finish_return): Distinguish between label and variable
292 when warning about returning local address.
293
c9379ce2
MP
2942014-05-01 Marek Polacek <polacek@redhat.com>
295
296 PR c/29467
297 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
298 in C89 mode.
299
d00887e8
MP
3002014-05-01 Marek Polacek <polacek@redhat.com>
301
302 PR c/43245
303 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
304 instead of 0 to WARN_FOR_QUALIFIERS.
305
5436fa2e
MP
3062014-05-01 Marek Polacek <polacek@redhat.com>
307
308 PR c/56989
309 * c-typeck.c (default_conversion): Use better location for
310 error call.
311
f8ed5150
MP
3122014-04-30 Marek Polacek <polacek@redhat.com>
313
314 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
315 also when SANITIZE_FLOAT_DIVIDE is on.
316
8337d1db
MP
3172014-04-30 Marek Polacek <polacek@redhat.com>
318
319 PR c/60139
320 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
321 and pedwarn_init. Use loc insted of input_location.
322
c4bdc42f
MP
3232014-04-30 Marek Polacek <polacek@redhat.com>
324
325 PR c/60351
326 * c-typeck.c (build_binary_op): Use location when warning about
327 shift count.
328
45484dcf
MP
3292014-04-25 Marek Polacek <polacek@redhat.com>
330
331 PR c/18079
332 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
333 always_inline/noinline and hot/cold attributes.
334
34cf811f
MP
3352014-04-25 Marek Polacek <polacek@redhat.com>
336
337 PR c/60114
338 * c-parser.c (c_parser_initelt): Pass input_location to
339 process_init_element.
340 (c_parser_initval): Pass loc to process_init_element.
341 * c-tree.h (process_init_element): Adjust declaration.
342 * c-typeck.c (push_init_level): Pass input_location to
343 process_init_element.
344 (pop_init_level): Likewise.
345 (set_designator): Likewise.
346 (output_init_element): Add location_t parameter. Pass loc to
347 digest_init.
348 (output_pending_init_elements): Pass input_location to
349 output_init_element.
350 (process_init_element): Add location_t parameter. Pass loc to
351 output_init_element.
352
42056eac
JJ
3532014-04-24 Jakub Jelinek <jakub@redhat.com>
354
355 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
356 atomic-clause, allow comma in between atomic-clause and
357 seq_cst.
358
e162a134
JJ
3592014-04-22 Jakub Jelinek <jakub@redhat.com>
360
361 PR c/59073
362 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
363 fails, don't set OM_PARALLEL_COMBINED and return NULL.
364
2f6babac
IZ
3652014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
366
367 PR middle-end/60469
368 * c-array-notation.c (fix_builtin_array_notation_fn): Use
369 create_tmp_var instead build_decl for creating temps.
370 (build_array_notation_expr): Likewise.
371 (fix_conditional_array_notations_1): Likewise.
372 (fix_array_notation_expr): Likewise.
373 (fix_array_notation_call_expr): Likewise.
374
8edbfaa6
JJ
3752014-03-28 Jakub Jelinek <jakub@redhat.com>
376
377 PR c++/60689
378 * c-tree.h (c_build_function_call_vec): New prototype.
379 * c-typeck.c (build_function_call_vec): Don't call
380 resolve_overloaded_builtin here.
381 (c_build_function_call_vec): New wrapper function around
382 build_function_call_vec. Call resolve_overloaded_builtin here.
383 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
384 Call c_build_function_call_vec instead of build_function_call_vec.
385 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
386 * c-decl.c (finish_decl): Likewise.
387
7485aeea
MLI
3882014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
389
390 PR c/55383
391 * c-typeck.c: Use correct format string in cast-qual warning
392
b17a8b07
TS
3932014-03-07 Thomas Schwinge <thomas@codesourcery.com>
394
395 * c-decl.c (c_decl_attributes): Use
396 lang_hooks.types.omp_mappable_type.
397 * c-typeck.c (c_finish_omp_clauses): Likewise.
398
3af9c5e9
MP
3992014-03-06 Marek Polacek <polacek@redhat.com>
400
401 PR c/60197
402 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
403 of checking tree code.
404
1c9f5f33
PK
4052014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
406
407 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
408 (c_parser_parameter_declaration): Likewise.
409
cc28fc7f
MP
4102014-02-19 Marek Polacek <polacek@redhat.com>
411
412 PR c/60195
413 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
414 Call mark_exp_read on exp.value.
415 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
416 TREE_ADDRESSABLE on old instead of val.
417 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
418
b581c05c
PK
4192014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
420
421 * c-parser.c (c_parser_get_builtin_args): Replace calls to
422 C_EXPR_APPEND by vec_safe_push.
423 * c-tree.h (C_EXPR_APPEND): Remove.
424
81e5eca8
MP
4252014-01-31 Marek Polacek <polacek@redhat.com>
426
427 PR c/59963
428 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
429 build_function_call_vec.
430 (build_function_call): Likewise.
431 (build_atomic_assign): Likewise.
432 (build_function_call_vec): Add arg_loc parameter. Use it.
433 (convert_arguments): Likewise.
434 (convert_for_assignment): Rename rhs_loc to expr_loc.
435 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
436 (c_parser_objc_keywordexpr): Likewise.
437 (c_parser_postfix_expression_after_primary): Call
438 build_function_call_vec with expr_loc rather than op_loc.
439 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
440 build_function_call_vec.
441 (c_parser_expr_list): Add locations parameter. Fill it with locations
442 of function arguments.
443 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
444
68fca595
MP
4452014-01-30 Marek Polacek <polacek@redhat.com>
446
447 PR c/59940
448 * c-typeck.c (build_function_call_vec): Use loc parameter.
449 (convert_arguments): Add location parameter. Use it.
450 (ep_convert_and_check): Likewise.
451 (build_atomic_assign): Adjust convert_for_assignment call.
452 (build_modify_expr): Likewise.
453 (digest_init): Likewise.
454 (c_finish_return): Likewise.
455 (build_conditional_expr): Adjust ep_convert_and_check calls.
456 (convert_for_assignment): Add rhs_loc parameter. Use it.
457 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
458 calls.
459
fa337f3a
RB
4602014-01-30 Richard Biener <rguenther@suse.de>
461
462 PR c/59905
463 * c-typeck.c (build_function_call_vec): Do not replace calls
464 to a function via an incompatible type with a runtime abort.
465
b72271b9
BI
4662014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
467
468 * c-parser.c (c_parser_declaration_or_fndef): Replaced
469 flag_enable_cilkplus with flag_cilkplus.
470 (c_parser_direct_declarator_inner): Likewise.
471 (c_parser_attribute_any_word): Likewise.
472 (c_parser_attributes): Likewise.
473 (c_parser_compound_statement): Likewise.
474 (c_parser_statement_after_labels): Likewise.
475 (c_parser_if_statement): Likewise.
476 (c_parser_switch_statement): Likewise.
477 (c_parser_do_statement): Likewise.
478 (c_parser_for_statement): Likewise.
479 (c_parser_unary_expression): Likewise.
480 (c_parser_postfix_expression): Likewise.
481 (c_parser_postfix_expression_after_primary): Likewise.
482 (c_parser_postfix_expression_after_primary): Likewise.
483 (c_parser_omp_clause_name): Likewise.
484 (c_finish_omp_declare_simd): Likewise.
485 (c_parser_cilk_verify_simd): Likewise.
486 * c-typeck.c (build_array_ref): Likewise.
487 (build_function_call_vec): Likewise.
488 (convert_arguments): Likewise.
489 (build_compound_expr): Likewise.
490 (c_finish_return): Likewise.
491 (c_finish_if_stmt): Likewise.
492 (c_finish_loop): Likewise.
493 (build_binary_op): Likewise.
494
393e8e8b
MP
4952014-01-23 Marek Polacek <polacek@redhat.com>
496
497 PR c/59846
498 * c-typeck.c (parser_build_binary_op): Use location instead of
499 input_location.
500 (build_binary_op): Pass location to shorten_compare.
501
f04dda30
MP
5022014-01-23 Marek Polacek <polacek@redhat.com>
503
504 PR c/58346
505 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
506 an empty aggregate.
507
789eadcd
MP
5082014-01-23 Marek Polacek <polacek@redhat.com>
509
510 PR c/59871
511 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
512 of a comma expression.
513 (emit_side_effect_warnings): Likewise.
514
40f14e9f
BI
5152014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
516
517 PR c/59825
518 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
519 function to use walk_tree and moved a lot of its functionality to
520 expand_array_notations.
521 (expand_array_notations): New function.
522
74558dd9
BI
5232014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
524
525 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
526 attribute an attribute without value.
527
652fea39
JJ
5282014-01-23 Jakub Jelinek <jakub@redhat.com>
529
530 PR middle-end/58809
531 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
532 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
533
f34f1c87
MP
5342014-01-22 Marek Polacek <polacek@redhat.com>
535
536 PR c/59891
537 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
538 of remove_c_maybe_const_expr on op1 and op2.
539
241f845a
JJ
5402014-01-15 Jakub Jelinek <jakub@redhat.com>
541
542 PR c/58943
543 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
544 effects, preevaluate rhs using SAVE_EXPR first.
545
9a74f20c
BI
5462014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
547
548 PR c++/59631
549 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
550 statements with if-elseif statements.
551
96066ce1
MP
5522014-01-06 Marek Polacek <polacek@redhat.com>
553
554 PR c/57773
555 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
556 defined bit-field types only in ISO C.
557
23a5b65a
RS
5582014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
559
560 Update copyright years
561
f9030485
RS
5622014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
563
564 * c-array-notation.c: Use the standard form for the copyright notice.
565
41958c28
BI
5662013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
567
568 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
569 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
570 field in parser is not empty. If not-empty, call the function
571 c_parser_finish_omp_declare_simd.
572 (c_parser_cilk_clause_vectorlength): Modified function to be shared
573 between SIMD-enabled functions and #pragma simd. Added new parameter.
574 (c_parser_cilk_all_clauses): Modified the usage of the function
575 c_parser_cilk_clause_vectorlength as mentioned above.
576 (c_parser_cilk_simd_fn_vector_attrs): New function.
577 (c_finish_cilk_simd_fn_tokens): Likewise.
578 (is_cilkplus_vector_p): Likewise.
579 (c_parser_omp_clause_name): Added checking for "vectorlength,"
580 "nomask," and "mask" strings in clause name.
581 (c_parser_omp_all_clauses): Added 3 new case statements:
582 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
583 PRAGMA_CILK_CLAUSE_NOMASK.
584 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
585 check for vector attribute and if so call the function
586 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
587 called the function c_finish_cilk_simd_fn_tokens.
588 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
589 parser field is non-empty. If so, parse them as you would parse
590 the omp declare simd pragma.
591 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
592 Added a check when step is a parameter and flag it as error.
593 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
594 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
595 pragma_omp_clause.
596
cef0fd0e
TS
5972013-12-17 Thomas Schwinge <thomas@codesourcery.com>
598
599 * c-parser.c (c_parser_omp_parallel): Fix description.
600
12893402
BI
6012013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
602
603 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
604 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
605 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
606 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
607
296674db
JM
6082013-12-04 Joseph Myers <joseph@codesourcery.com>
609
610 PR c/52023
611 * c-parser.c (c_parser_alignas_specifier): Use
612 c_sizeof_or_alignof_type instead of c_alignof.
613 (c_parser_alignof_expression): Likewise, with min_alignof
614 parameter depending on alignof spelling used.
615
edd28054
MP
6162013-12-04 Marek Polacek <polacek@redhat.com>
617
618 PR c/54113
619 * c-decl.c (start_function): Don't warn for missing prototype for
620 inline functions.
621
da0fc454
MP
6222013-12-03 Marek Polacek <polacek@redhat.com>
623
624 PR c/59351
625 * c-decl.c (build_compound_literal): Allow compound literals with
626 empty initial value.
627
4c2ecab0
JM
6282013-12-02 Joseph Myers <joseph@codesourcery.com>
629
630 PR c/58235
631 * c-typeck.c (build_modify_expr): Diagnose assignment to
632 expression with array type.
633
340baef7
JM
6342013-11-29 Joseph Myers <joseph@codesourcery.com>
635
636 PR c/42262
637 * c-typeck.c (process_init_element): Do not treat a string as
638 initializing a whole array when used with a designator for an
639 individual element.
640
6763b9f7
JM
6412013-11-29 Joseph Myers <joseph@codesourcery.com>
642
643 PR c/57574
644 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
645 an inline function following a static declaration.
646
e7bd1de1
JJ
6472013-11-28 Jakub Jelinek <jakub@redhat.com>
648
649 PR c/59310
650 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
651 to p_name before calling c_parser_omp_teams instead of after.
652 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
653 argument. Remove unused p_name variable.
654
0136f8f0
AH
6552013-11-27 Aldy Hernandez <aldyh@redhat.com>
656 Jakub Jelinek <jakub@redhat.com>
657
658 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
659 external_scope is NULL.
660
241b71bb
TV
6612013-11-27 Tom de Vries <tom@codesourcery.com>
662 Marc Glisse <marc.glisse@inria.fr>
663
664 PR c++/59032
665 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
666
2fb9a547
AM
6672013-11-22 Andrew MacLeod <amacleod@redhat.com>
668
669 * c-typeck.c: Add required include files from gimple.h.
670
8400e75e
DM
6712013-11-22 David Malcolm <dmalcolm@redhat.com>
672
673 * c-decl.c (define_label, shadow_tag_warned)
674 (check_bitfield_type_and_width, grokdeclarator, grokparms,
675 store_parm_decls_newstyle, store_parm_decls_oldstyle)
676 (declspecs_add_type): Remove use of in_system_header macro.
677 * c-parser.c (c_parser_unary_expression): Likewise.
678 * c-typeck.c (store_init_value, process_init_element)
679 (c_start_case): Likewise.
680
681 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
682 macro.
683
684 * c-parser.c (c_parser_set_source_position_from_token): Remove
685 reference to in_system_header from comment.
686
386b1f1f
RS
6872013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
688
689 * c-decl.c (grokdeclarator): Update comment to refer to
690 tree_to_[su]hwi rather than tree_low_cst.
691
ae7e9ddd
RS
6922013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
693
694 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
695 tree_to_uhwi throughout.
696
9439e9a1
RS
6972013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
698
699 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
700 throughout.
701
9541ffee
RS
7022013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
703
704 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
705 throughout.
706
c02065fc
AH
7072013-11-15 Aldy Hernandez <aldyh@redhat.com>
708
709 * c-parser.c (c_parser_cilk_simd): New.
710 (c_parser_cilk_verify_simd): New.
711 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
712 (c_parser_omp_for_loop): Add case for NE_EXPR.
713 Set c_break_label for CILK_SIMD.
714 (c_parser_cilk_clause_vectorlength): New.
715 (c_parser_cilk_clause_linear): New.
716 (c_parser_cilk_clause_name): New.
717 (c_parser_cilk_all_clauses): New.
718 * c-typeck.c (build_unary_op): Pass location argument to
719 readonly_error.
720 (build_modify_expr): Same.
721 (build_asm_expr): Same.
722 (c_finish_bc_stmt): Error on break/continue in loops.
723
18f429e2
AM
7242013-11-14 Andrew MacLeod <amacleod@redhat.com>
725
726 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
727
d8a2d370
DN
7282013-11-14 Diego Novillo <dnovillo@google.com>
729
730 * c-decl.c: Include print-tree.h.
731 Include stor-layout.h.
732 Include varasm.h.
733 Include attribs.h.
734 Include stringpool.h.
735 * c-lang.c: Include fold-const.h.
736 * c-parser.c: Include stringpool.h.
737 Include attribs.h.
738 Include stor-layout.h.
739 Include varasm.h.
740 Include trans-mem.h.
741 * c-typeck.c: Include stor-layout.h.
742 Include trans-mem.h.
743 Include varasm.h.
744 Include stmt.h.
745
38b7bc7f
JM
7462013-11-13 Joseph Myers <joseph@codesourcery.com>
747
748 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
749 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
750 __auto_type.
751 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
752 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
753 RID_AUTO_TYPE.
754 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
755 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
756 (c_parser_declarator, c_parser_direct_declarator_inner)
757 (c_parser_parameter_declaration, c_parser_type_name): All callers
758 changed.
759 (c_parser_declaration_or_fndef): Handle declarations with type
760 determined from the initializer.
761
45b0be94
AM
7622013-11-12 Andrew MacLeod <amacleod@redhat.com>
763
18f429e2 764 * c-typeck.c: Include gimplify.h.
45b0be94 765
582d9b50
JM
7662013-11-12 Joseph Myers <joseph@codesourcery.com>
767
768 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
769 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
770 comment.
771 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
772 or _Thread_local as appropriate in diagnostics.
773 (build_null_declspecs): Initialize ret->thread_gnu_p.
774 (declspecs_add_scspec): Handle either __thread or _Thread_local
775 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
776 pedantic. Do not disallow _Thread_local extern and _Thread_local
777 static.
778
267bac10
JM
7792013-11-07 Joseph Myers <joseph@codesourcery.com>
780 Andrew MacLeod <amacleod@redhat.com>
781
782 * c-aux-info.c (gen_type): Handle atomic qualifier.
783 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
784 qualifiers when compating types.
785 (shadow_tag_warned): Handle atomic_p in declspecs.
786 (quals_from_declspecs): Likewise.
787 (start_decl): Use c_type_promotes_to when promoting argument
788 types.
789 (grokdeclarator): Handle _Atomic.
790 (get_parm_info): Diagnose any qualifier on "void" as only
791 parameter.
792 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
793 comparing types. Use c_type_promotes_to when promoting argument
794 types.
795 (finish_function): Use c_type_promotes_to when promoting argument
796 types.
797 (build_null_declspecs): Handle atomic_p in declspecs.
798 (declspecs_add_qual): Handle RID_ATOMIC.
799 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
800 (c_token_starts_declspecs): Handle RID_ATOMIC.
801 (c_parser_declspecs): Handle atomic type specifiers and
802 qualifiers.
803 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
804 from types of expressions with atomic type.
805 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
806 (c_parser_attribute_any_word): Handle RID_ATOMIC.
807 (c_parser_initializer, c_parser_initelt, c_parser_initval)
808 (c_parser_statement_after_labels, c_parser_switch_statement)
809 (c_parser_for_statement, c_parser_expr_no_commas)
810 (c_parser_conditional_expression, c_parser_binary_expression)
811 (c_parser_cast_expression, c_parser_unary_expression)
812 (c_parser_postfix_expression)
813 (c_parser_postfix_expression_after_primary, c_parser_expression):
814 Use convert_lvalue_to_rvalue.
815 (c_parser_expression_conv, c_parser_expr_list): Document
816 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
817 (c_parser_objc_synchronized_statement): Use
818 convert_lvalue_to_rvalue.
819 (c_parser_objc_selector): Handle RID_ATOMIC.
820 (c_parser_objc_receiver, c_parser_array_notation): Use
821 convert_lvalue_to_rvalue.
822 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
823 _Atomic (type-name).
824 (struct c_declspecs): Add atomic_p field.
825 (convert_lvalue_to_rvalue): Declare.
826 * c-typeck.c (c_type_promotes_to): Promote atomic types to
827 corresponding atomic types.
828 (qualify_type): Don't add _Atomic qualifiers from second argument.
829 (comp_target_types): Do not allow _Atomic mismatches.
830 (type_lists_compatible_p): Do not remove atomic qualifiers when
831 comparing types.
832 (really_atomic_lvalue, convert_lvalue_to_rvalue)
833 (build_atomic_assign): New functions.
834 (build_unary_op): Use build_atomic_assign for atomic increment and
835 decrement.
836 (build_conditional_expr): Do not treat _Atomic void as a qualified
837 version of void.
838 (build_modify_expr): Use build_atomic_assign for atomic LHS.
839 (find_anonymous_field_with_type, convert_to_anonymous_field)
840 (convert_for_assignment): Do not remove atomic qualifiers when
841 comparing types.
842 (digest_init): Do not accept initialization of arrays of atomic
843 elements by string constants.
844 (build_asm_expr): Use convert_lvalue_to_rvalue.
845 (build_binary_op): Do not treat _Atomic void as a qualified
846 version of void.
847
0c249d4b
DD
8482013-11-06 DJ Delorie <dj@redhat.com>
849
850 * c-decl.c (locate_old_decl): If a previous conflicting decl is
851 both explicit and builtin, print the location of the explicit one.
852
6d7f7e0a
TB
8532013-11-05 Tobias Burnus <burnus@net-b.de>
854
855 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
856 c_parser_omp_distribute, c_parser_omp_teams,
857 c_parser_omp_target, c_parser_omp_declare): Handle
858 -fopenmp-simd.
859
b906f4ca
MP
8602013-11-03 Marek Polacek <polacek@redhat.com>
861
862 * c-decl.c (grokdeclarator): Add VLA instrumentation.
863
ee1d5a02
JJ
8642013-11-01 Jakub Jelinek <jakub@redhat.com>
865
866 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
867 check_dup_generic at the end, unless remove is true.
868 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
869 remove = true;.
870 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
871
5a9785fb
JJ
8722013-10-31 Jakub Jelinek <jakub@redhat.com>
873
874 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
875 with decl that is not pointer nor array.
876
939b37da
BI
8772013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
878
879 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
880 a spawning function is found.
881 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
882 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
883 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
884 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
885 case.
886 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
887 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
888 expr.
889 (c_finish_return): Added a check to reject _Cilk_spawn in return
890 expression.
891 (build_cilk_spawn): New function.
892 (build_cilk_sync): Likewise.
893 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
894
d4af74d4
TB
8952013-10-27 Tobias Burnus <burnus@net-b.de>
896
897 PR other/33426
898 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
899 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
900 (c_parser_statement_after_labels): Update calls.
901
d73749df 9022013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
903
904 PR other/33426
905 * c-parser.c (c_parser_pragma, c_parser_for_statement):
906 Handle PRAGMA_IVDEP.
907 (c_parser_statement_after_labels): Update call.
908
f28aa681
MP
9092013-10-24 Marek Polacek <polacek@redhat.com>
910
911 * c-parser.c (c_parser_struct_declaration): Add a comment.
912 (c_parser_declarator): Don't allow _Alignas here.
913
0645c1a2
AM
9142013-10-17 Andrew MacLeod <amacleod@redhat.com>
915
916 * c-parser.c: Include omp-low.h.
917 * c-typeck.c: Likewise.
918
568a31f2
MP
9192013-10-17 Marek Polacek <polacek@redhat.com>
920
921 PR c/58267
922 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
923 Document syntax of the array-declarator.
924 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
925 are not permitted.
926 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
927 (c_parser_struct_declaration): Likewise.
928 (c_parser_declarator): Likewise.
929 (c_parser_direct_declarator_inner): Likewise.
930 (c_parser_parameter_declaration): Likewise.
931 (c_parser_type_name): Likewise.
932
acf0174b
JJ
9332013-10-11 Jakub Jelinek <jakub@redhat.com>
934
935 * c-lang.h (current_omp_declare_target_attribute): New extern
936 decl.
937 * c-parser.c: Include c-lang.h.
938 (struct c_parser): Change tokens to c_token *.
939 Add tokens_buf field. Change tokens_avail type to unsigned int.
940 (c_parser_consume_token): If parser->tokens isn't
941 &parser->tokens_buf[0], increment parser->tokens.
942 (c_parser_consume_pragma): Likewise.
943 (enum pragma_context): Add pragma_struct and pragma_param.
944 (c_parser_external_declaration): Adjust
945 c_parser_declaration_or_fndef caller.
946 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
947 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
948 Adjust recursive call.
949 (c_parser_struct_or_union_specifier): Use pragma_struct instead
950 of pragma_external.
951 (c_parser_parameter_declaration): Use pragma_param instead of
952 pragma_external.
953 (c_parser_compound_statement_nostart, c_parser_label,
954 c_parser_for_statement): Adjust
955 c_parser_declaration_or_fndef callers.
956 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
957 it through to c_parser_conditional_expression.
958 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
959 pass it through to c_parser_binary_expression. Adjust recursive
960 call.
961 (c_parser_binary_expression): Remove prec argument, add
962 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
963 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
964 binop matches it, use build2 instead of parser_build_binary_op.
965 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
966 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
967 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
968 Handle pragma_struct and pragma_param the same as pragma_external.
969 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
970 (c_parser_omp_variable_list): Parse array sections for
971 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
972 (c_parser_omp_clause_collapse): Fully fold collapse expression.
973 (c_parser_omp_clause_reduction): Handle user defined reductions.
974 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
975 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
976 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
977 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
978 c_parser_omp_clause_depend, c_parser_omp_clause_map,
979 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
980 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
981 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
982 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
983 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
984 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
985 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
986 (c_parser_omp_for_loop): Add CODE argument, pass it through
987 to c_finish_omp_for. Change last argument to cclauses,
988 and adjust uses to grab parallel clauses from the array of all
989 the split clauses. Adjust c_parser_binary_expression,
990 c_parser_declaration_or_fndef and c_finish_omp_for callers.
991 (omp_split_clauses): New function.
992 (c_parser_omp_simd): New function.
993 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
994 Allow the function to be called also when parsing combined constructs,
995 and call c_parser_omp_simd when parsing for simd.
996 (c_parser_omp_sections_scope): If section-sequence doesn't start with
997 #pragma omp section, require exactly one structured-block instead of
998 sequence of statements.
999 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
1000 Allow the function to be called also when parsing combined constructs.
1001 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
1002 Allow the function to be called also when parsing combined
1003 constructs.
1004 (c_parser_omp_taskgroup, c_parser_omp_cancel,
1005 c_parser_omp_cancellation_point, c_parser_omp_distribute,
1006 c_parser_omp_teams, c_parser_omp_target_data,
1007 c_parser_omp_target_update, c_parser_omp_target,
1008 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
1009 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
1010 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
1011 (c_parser_omp_construct): Add p_name and mask vars. Handle
1012 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
1013 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
1014 and c_parser_omp_sections callers.
1015 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
1016 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1017 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
1018 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
1019 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
1020 OMP_CLAUSE_DEPEND.
1021 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
1022 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
1023 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
1024 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
1025 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
1026 * c-typeck.c: Include tree-inline.h.
1027 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
1028 handle_omp_array_sections_1, handle_omp_array_sections,
1029 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
1030 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
1031 user defined reductions.
1032 (c_tree_equal): New function.
1033 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
1034 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
1035 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
1036 c_check_omp_declare_reduction_r): New prototypes.
1037 * c-decl.c (current_omp_declare_target_attribute): New variable.
1038 (c_decl_attributes): New function.
1039 (start_decl, start_function): Use it instead of decl_attributes.
1040 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
1041 c_omp_reduction_decl, c_omp_reduction_lookup,
1042 c_check_omp_declare_reduction_r): New functions.
1043
0a6c2227
TT
10442013-09-25 Tom Tromey <tromey@redhat.com>
1045
1046 * Make-lang.in (c/gccspec.o): Remove.
1047 (CFLAGS-c/gccspec.o): New variable.
1048 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
1049 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
1050 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
1051
f3bc55f0
TT
10522013-09-25 Tom Tromey <tromey@redhat.com>
1053
1054 * Make-lang.in (c/gccspec.o): Don't use subshell.
1055
a24d975c
MP
10562013-09-18 Marek Polacek <polacek@redhat.com>
1057
1058 PR sanitize/58443
1059 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
1060 Remove unnecessary check.
1061
ce6923c5
MP
10622013-09-18 Marek Polacek <polacek@redhat.com>
1063
1064 PR sanitizer/58411
1065 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
1066 no_sanitize_undefined attribute.
1067
a1e51df9
KT
10682013-09-13 Kai Tietz <ktietz@redhat.com>
1069
1070 PR target/57848
1071 * c-decl.c (c_builtin_function_ext_scope): Remove
1072 wrong assumption that it is never called on prexisting
1073 symbol.
1074
0af94e6f
JR
10752013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
1076
1077 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
1078
20059c8b
GDR
10792013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1080
1081 * c-objc-common.c (c_tree_printer): Tidy.
1082
de5a5fa1
MP
10832013-08-30 Marek Polacek <polacek@redhat.com>
1084
1085 * c-typeck.c (build_binary_op): Add division by zero and shift
1086 instrumentation.
1087
2531a1d9 10882013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 1089 Joseph Myers <joseph@codesourcery.com>
2531a1d9 1090
6e2bcc98 1091 PR c/35649
2531a1d9
JR
1092 * c-typeck.c (c_common_type): Prefer double_type_node over
1093 other REAL_TYPE types with the same precision.
1094 (convert_arguments): Likewise.
1095
025311c4
GDR
10962013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
1097
1098 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
1099 (c_initialize_diagnostics): Call a destructor for the early printer.
1100
da6ca2b5
GDR
11012013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1102
1103 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
1104 printer initialization.
1105
318cda85 11062013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 1107
318cda85
BI
1108 PR c/57490
1109 * c-array-notation.c (fix_conditional_array_notations_1): Added a
1110 check for truth values.
1111 (expand_array_notation_exprs): Added truth values case. Removed an
1112 unwanted else. Added for-loop to walk through subtrees in default
1113 case.
1114
b066401f
GDR
11152013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
1116
1117 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
1118
fb48aadc
JM
11192013-07-23 Joseph Myers <joseph@codesourcery.com>
1120
1121 * c-parser.c (struct c_generic_association): Fix typo.
1122
433cc7b0
TT
11232013-07-23 Tom Tromey <tromey@redhat.com>
1124 Joseph Myers <joseph@codesourcery.com>
1125
1126 * c-parser.c (struct c_generic_association): New.
1127 (c_generic_association_d): New typedef.
1128 (c_parser_generic_selection): New function.
1129 (c_parser_postfix_expression): Handle RID_GENERIC.
1130
26d40c3d
JM
11312013-07-13 Jason Merrill <jason@redhat.com>
1132
1133 PR c++/57793
1134 * c-decl.c (finish_struct): Check for too-large class.
1135
ecdbd01a 11362013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
1137
1138 PR c/57821
1139 * c-typeck.c (set_init_index): When folding, check for index overflow.
1140
1141ed3f
BI
11412013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
1142
1143 * c-parser.c (c_parser_array_notation): Removed rejection of array
1144 notations in an array of function pointers.
1145
713b46fa
BI
11462013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
1147
1148 * c-array-notation.c (make_triplet_val_inv): New function.
1149 (create_cmp_incr): Likewise.
1150 (create_array_refs): Likewise.
1151 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
1152 Also modularized common parts between functions and called the function.
1153 (build_array_notation_expr): Likewise.
1154 (fix_conditional_array_notations_1): Likewise.
1155 (fix_array_notation_expr): Likewise.
1156 (fix_array_notation_call_expr): Likewise.
1157
92f20202
MP
11582013-06-18 Marek Polacek <polacek@redhat.com>
1159
1160 PR c/57630
1161 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
1162
73a23b06
BI
11632013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
1164
1165 * c-array-notation.c (build_array_notation_expr): Reject array notation
1166 mismatch between LHS and RHS even inside a call_expr. Also, removed
1167 a couple while statements that were dead code.
1168
00b8517d
BI
11692013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
1170
1171 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
1172 excessive precision expressions in function parameters. Also removed
1173 couple unwanted while statements.
1174
1509bdda
BI
11752013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
1176
1177 * c-array-notation.c (expand_array_notation_exprs): Added
1178 ARRAY_NOTATION_REF case.
1179
d60f1706
BI
11802013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
1181
1182 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
1183 function to c-family/array-notation-common.c.
1184 (is_cilkplus_reduce_builtin): Likewise.
1185 (find_rank): Likewise.
1186 (extract_array_notation_exprs): Likewise.
1187 (replace_array_notations): Likewise.
1188 (find_inv_trees): Likewise.
1189 (replace_inv_trees): Likewise.
1190 (contains_array_notation_expr): Likewise.
1191 (find_correct_array_notation_type): Likewise.
1192 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
1193 (struct inv_list): Moved this to c-family/array-notation-common.c.
1194 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
1195
6d6efbb3
BI
11962013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
1197
1198 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
1199 reduction functions outside the for-loop. Added a check if the fundecl
1200 is non-NULL. Finally, removed an unwanted if-statement, and made the
1201 body unconditional.
1202
25c22937
BI
12032013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
1204
1205 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
1206 condition of the if-statement matches the rank of else-block and then-
1207 block when array notations are used.
1208 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
1209 expression after the entire function body is parsed.
1210 (c_parser_expr_no_commas): Delayed creating array notation expressions
1211 to the end of function parsing.
1212 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
1213 whole if-statement instead of just the condition.
1214 (expand_array_notation_exprs): Added MODIFY_EXPR case.
1215
edd25645
BI
12162013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
1217
1218 PR c/57474
1219 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
1220 array to NULL_TREE if they are unused. Also added a check for the
1221 field to be NULL before its fields are used in future.
1222
065ce7f1
RO
12232013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1224
1225 PR bootstrap/57450
1226 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
1227 (build_array_notation_expr): Likewise.
1228
36536d79
BI
12292013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
1230
1231 * c-typeck.c (build_array_ref): Added a check to see if array's
1232 index is greater than one. If true, then emit an error.
1233 (build_function_call_vec): Exclude error reporting and checking
1234 for builtin array-notation functions.
1235 (convert_arguments): Likewise.
1236 (c_finish_return): Added a check for array notations as a return
1237 expression. If true, then emit an error.
1238 (c_finish_loop): Added a check for array notations in a loop
1239 condition. If true then emit an error.
1240 (lvalue_p): Added a ARRAY_NOTATION_REF case.
1241 (build_binary_op): Added a check for array notation expr inside
1242 op1 and op0. If present, we call another function to find correct
1243 type.
1244 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
1245 * c-parser.c (c_parser_compound_statement): Check if array
1246 notation code is used in tree, if so, then transform them into
1247 appropriate C code.
1248 (c_parser_expr_no_commas): Check if array notation is used in LHS
1249 or RHS, if so, then build array notation expression instead of
1250 regular modify.
1251 (c_parser_postfix_expression_after_primary): Added a check for
1252 colon(s) after square braces, if so then handle it like an array
1253 notation. Also, break up array notations in unary op if found.
1254 (c_parser_direct_declarator_inner): Added a check for array
1255 notation.
1256 (c_parser_compound_statement): Added a check for array notation in
1257 a stmt. If one is present, then expand array notation expr.
1258 (c_parser_if_statement): Likewise.
1259 (c_parser_switch_statement): Added a check for array notations in
1260 a switch statement's condition. If true, then output an error.
1261 (c_parser_while_statement): Similarly, but for a while.
1262 (c_parser_do_statement): Similarly, but for a do-while.
1263 (c_parser_for_statement): Similarly, but for a for-loop.
1264 (c_parser_unary_expression): Check if array notation is used in a
1265 pre-increment or pre-decrement expression. If true, then expand
1266 them.
1267 (c_parser_array_notation): New function.
1268 * c-array-notation.c: New file.
1269 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
1270
cd192ccc
MS
12712013-05-23 Mike Stump <mikestump@comcast.net>
1272
1273 * c-typeck.c (convert_for_assignment): Handle references to memory
1274 spaces better.
1275
427b248d
JM
12762013-05-16 Jason Merrill <jason@redhat.com>
1277
1278 * Make-lang.in (cc1$(exeext)): Use link mutex.
1279
44d90fe1
PC
12802013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
1281
1282 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
1283 to simply use OPT_Wpointer_arith.
1284 (build_unary_op): Likewise.
1285
4e7d7b3d
JJ
12862013-04-03 Jakub Jelinek <jakub@redhat.com>
1287
1288 PR c/19449
1289 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
1290 argument. If set, or it temporarily for parsing of the first
1291 argument into force_folding_builtin_constant_p.
1292 (c_parser_postfix_expression): Adjust callers.
1293
839b422f
RB
12942013-03-21 Richard Biener <rguenther@suse.de>
1295
1296 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
1297 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
1298
2ee028f1
MP
12992013-02-12 Marek Polacek <polacek@redhat.com>
1300
1301 PR c/44938
1302 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
1303 origtypes to NULL.
1304
8824edff
JJ
13052013-01-24 Jakub Jelinek <jakub@redhat.com>
1306
1307 PR c/56078
1308 * c-typeck.c (set_nonincremental_init_from_string): If
1309 constructor_max_index is NULL, treat it as if tree_int_cst_lt
1310 returned false.
1311 (process_init_element): Likewise.
1312
eadd3d0d
JJ
13132012-12-20 Jakub Jelinek <jakub@redhat.com>
1314
1315 PR c++/55619
1316 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
1317 argument, don't call default_function_array_conversion
1318 nor c_fully_fold here.
1319 (c_parser_asm_statement): Adjust callers.
1320 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
1321 and outputs here, and call default_function_array_conversion
1322 on inputs that don't need to be addressable.
1323
f8a93a2e
JJ
13242012-12-18 Jakub Jelinek <jakub@redhat.com>
1325
1326 PR c/39464
1327 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
1328 warning require that both c_common_unsigned_type as well as
1329 c_common_signed_type is the same for both mvl and mvr types.
1330
9771b263
DN
13312012-11-16 Diego Novillo <dnovillo@google.com>
1332
1333 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
1334
1335 * c-common.c: Use new vec API in vec.h.
1336 * c-common.h: Likewise.
1337 * c-gimplify.c: Likewise.
1338 * c-pragma.c: Likewise.
1339 * c-pretty-print.c: Likewise.
1340 * c-pretty-print.h: Likewise.
1341 * c-semantics.c: Likewise.
1342 * c-decl.c: Likewise.
1343 * c-parser.c: Likewise.
1344 * c-tree.h: Likewise.
1345 * c-typeck.c: Likewise.
1346
880661a4
JW
13472012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
1348
1349 PR c++/54930
1350 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
1351
077d1abe
MLI
13522012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1353
1354 PR c/53066
1355 * c-decl.c (warn_if_shadowing): Do not warn if a variable
1356 shadows a function, unless the variable is a function or a
1357 pointer-to-function.
1358
3a785c97
JJ
13592012-10-12 Jakub Jelinek <jakub@redhat.com>
1360
1361 PR c/54381
1362 * c-parser.c (struct c_tree_loc_pair): Removed.
1363 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
1364 add location_t * and tree * arguments, fill in array of 3
1365 sizeof_arg trees and corresponding locs.
1366 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
1367 c_parser_expr_list callers.
1368 (c_parser_postfix_expression_after_primary): Likewise. Pass
1369 array of 3 sizeof_arg trees and locs (corresponding to first
1370 3 arguments) to sizeof_pointer_memaccess_warning.
1371
703c8606
LC
13722012-10-09 Lawrence Crowl <crowl@google.com>
1373
1374 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
1375 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
1376 hash table.
1377
5d9de0d0
PC
13782012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
1379
1380 PR c++/54194
1381 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
1382 call.
1383
a212e43f
MG
13842012-10-09 Marc Glisse <marc.glisse@inria.fr>
1385
1386 PR c++/54427
1387 * c-typeck.c: Include c-common.h.
1388 (enum stv_conv): Moved to c-common.h.
1389 (scalar_to_vector): Moved to c-common.c.
1390 (build_binary_op): Adapt to scalar_to_vector's new prototype.
1391 * Make-lang.in: c-typeck.c depends on c-common.h.
1392
3b78de56
AC
13932012-10-04 Arnaud Charlet <charlet@adacore.com>
1394
1395 * c-decl.c (c_write_global_declarations): Fix handling of
1396 -fdump-ada-spec*.
1397
78c60e3d
SS
13982012-09-30 Sharad Singhai <singhai@google.com>
1399
1400 * c-decl.c (c_write_global_declarations): Use a different method
1401 to determine if the dump has ben initialized.
1402
9f33203d
JM
14032012-09-14 Joseph Myers <joseph@codesourcery.com>
1404
1405 PR c/54552
1406 * c-typeck.c (c_cast_expr): When casting to a type requiring
1407 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
1408 c_fully_fold first.
1409
a27d595d
JM
14102012-09-14 Joseph Myers <joseph@codesourcery.com>
1411
1412 PR c/54103
1413 * c-typeck.c (build_unary_op): Pass original argument of
1414 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
1415 any C_MAYBE_CONST_EXPR, if it has integer operands.
1416 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
1417 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
1418 to c_objc_common_truthvalue_conversion, then remove any
1419 C_MAYBE_CONST_EXPR, if they have integer operands. Use
1420 c_objc_common_truthvalue_conversion not
1421 c_common_truthvalue_conversion.
1422 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
1423 call note_integer_operands for arguments with integer operands
1424 that are not integer constants.
1425
9feb29df
JJ
14262012-09-13 Jakub Jelinek <jakub@redhat.com>
1427
1428 PR c/54559
1429 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
1430 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
1431
d409320c
JJ
14322012-08-31 Jakub Jelinek <jakub@redhat.com>
1433
1434 PR c/54428
1435 * c-convert.c (convert): Don't call fold_convert_loc if
1436 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
1437 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
1438 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
1439
6265d07c
JJ
14402012-08-24 Jakub Jelinek <jakub@redhat.com>
1441
1442 PR c/54355
1443 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
1444 for nested and empty_ok arguments in the call to
1445 c_parser_declaration_or_fndef.
1446
1a4049e7
JJ
14472012-08-17 Jakub Jelinek <jakub@redhat.com>
1448
1449 * c-tree.h (c_last_sizeof_arg): Declare.
1450 * c-parser.c (struct c_tree_loc_pair): New type.
1451 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
1452 non-NULL.
1453 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
1454 (c_parser_postfix_expression_after_primary): Likewise. Call
1455 sizeof_pointer_memaccess_warning if needed.
1456 (sizeof_ptr_memacc_comptypes): New function.
1457 * c-typeck.c (c_last_sizeof_arg): New global variable.
1458 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
1459
0229aee9
UB
14602012-07-24 Uros Bizjak <ubizjak@gmail.com>
1461
1462 * c-lang.h (lang_decl): Add variable_size GTY option.
1463
7ee2468b
SB
14642012-07-16 Steven Bosscher <steven@gcc.gnu.org>
1465
1466 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
1467 * Make-lang.in: Fix dependencies.
1468
d4a10d0a
SB
14692012-06-29 Steven Bosscher <steven@gcc.gnu.org>
1470
1471 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
1472 and add language Makefile hooks.
1473 * config-lang.in: New file.
1474 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
1475 add the required "normal" config-lang.in rules.
1476 * c-lang.h: Moved from gcc/ to here.
1477 * c-tree.h: Likewise.
1478 * c-objc-common.c: Likewise.
1479 * c-objc-common.h: Likewise.
1480 * c-typeck.c: Likewise.
1481 * c-convert.c: Likewise.
1482 * c-lang.c: Likewise.
1483 * c-aux-info.c: Likewise.
1484 * c-errors.c: Likewise.
1485 * gccspec.c: Likewise.
1486 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
1487 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
1488\f
23a5b65a 1489Copyright (C) 2012-2014 Free Software Foundation, Inc.
d4a10d0a
SB
1490
1491Copying and distribution of this file, with or without modification,
1492are permitted in any medium without royalty provided the copyright
1493notice and this notice are preserved.