]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
IPA REF alias refactoring
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
70575064 12014-06-30 Marek Polacek <polacek@redhat.com>
2
3 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4 has no_sanitize_undefined attribute.
5
4879e4cf 62014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
7
8 PR middle-end/57541
9 * c-array-notation.c (fix_builtin_array_notation_fn):
10 Check for 0 arguments in builtin call. Check that bultin argument is
11 correct.
12 * c-parser.c (c_parser_array_notation): Check for incorrect initial
13 index.
14
45c5b823 152014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
16
17 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
18 qualifiers in __auto_type for atomic types.
19 (c_parser_typeof_specifier): Discard all type qualifiers in
20 __typeof__ for atomic types.
21
430b73ee 222014-06-25 Marek Polacek <polacek@redhat.com>
23
24 PR c/61162
25 * c-parser.c (c_parser_statement_after_labels): Pass the location of
26 the return expression to c_finish_return.
27
9580cb79 282014-06-25 Jakub Jelinek <jakub@redhat.com>
29
30 * c-typeck.c (c_finish_omp_clauses): Make sure
31 OMP_CLAUSE_LINEAR_STEP has correct type.
32
c1f445d2 332014-06-24 Trevor Saunders <tsaunders@mozilla.com>
34
35 * c-decl.c: Adjust.
36
e471cc6f 372014-06-24 Jakub Jelinek <jakub@redhat.com>
38
39 * c-parser.c (c_parser_omp_for_loop): For
40 #pragma omp parallel for simd move lastprivate clause from parallel
41 to for rather than simd.
42
499b7390 432014-06-23 Marek Polacek <polacek@redhat.com>
44
45 * c-typeck.c (parser_build_binary_op): Don't call
46 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
47
5e68df57 482014-06-15 Jan Hubicka <hubicka@ucw.cz>
49
50 * c-parser.c (c_parser_omp_threadprivate): Likewise.
51 * c-decl.c (merge_decls): Likewise.
52
064b0d02 532014-06-09 Marek Polacek <polacek@redhat.com>
54
55 PR c/36446
56 * c-typeck.c (error_init): Call inform instead of error_at.
57 (pedwarn_init): Call inform instead of pedwarn.
58 (warning_init): Call inform instead of warning_at.
59
71e19e54 602014-06-07 Jan Hubicka <hubicka@ucw.cz>
61
62 * c-decl.c (merge_decls): Use set_decl_section_name.
63 (duplicate_decls): Remove node if it exists.
64
95cdf3fd 652014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
66
67 PR c/53119
68 * c-typeck.c (push_init_level, process_init_element,
69 pop_init_level): Correct check for zero initialization, move
70 missing brace warning to respect zero initialization.
71
a07f86a6 722014-06-05 Marek Polacek <polacek@redhat.com>
73
74 PR c/56724
75 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
76
32dc1512 772014-06-05 Marek Polacek <polacek@redhat.com>
78
79 PR c/49706
80 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
81 on the left hand side operand of a comparison.
82
64cf1262 832014-06-05 Marek Polacek <polacek@redhat.com>
84
85 PR c/48062
86 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
87 Print note only if the warning was printed.
88
071f6d39 892014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
90
91 PR c/58942
92 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
93 with a pointer.
94
c69ec07d 952014-06-03 Marek Polacek <polacek@redhat.com>
96
97 PR c/60439
98 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
99 c_start_case.
100 * c-tree.h (c_start_case): Update.
101 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
102 switch condition has boolean value.
103
f7715905 1042014-06-02 Andrew MacLeod <amacleod@redhat.com>
105
106 * c-decl.c: Include builtins.h.
107 * c-parser.c: Likewise.
108
dcfff6f9 1092014-05-27 Marek Polacek <polacek@redhat.com>
110
111 PR c/56724
112 * c-typeck.c (convert_arguments): Get location of a parameter. Change
113 error and warning calls to error_at and warning_at. Pass location of
114 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
115 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
116 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
117
c048c42c 1182014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
119
120 PR c/61191
121 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
122 function parameters.
123
8c016392 1242014-05-23 Jan Hubicka <hubicka@ucw.cz>
125
126 * c-decl.c (merge_decls): Preserve symtab node pointers.
127 (duplicate_decls): Free new decl.
128
184a718f 1292014-05-23 Thomas Schwinge <thomas@codesourcery.com>
130
6ce915ef 131 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
132 initialization.
133
184a718f 134 * c-parser.c (c_parser_omp_target): Return bool values.
135
22ac3f78 1362014-05-22 Thomas Schwinge <thomas@codesourcery.com>
137
138 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
139 num_teams_loc variable to num_thread_limit_loc.
140
3ab4693e 1412014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
142
143 * c-array-notation.c (expand_array_notations): Use void_node
144 instead of void_zero_node.
145
25a27413 1462014-05-17 Trevor Saunders <tsaunders@mozilla.com>
147
148 * c-decl.c (finish_struct): Adjust.
149 (finish_enum): Likewise.
150 (bind): Adjust.
151 (record_inline_static): Likewise.
152 (push_scope): Likewise.
153 (make_label): Likewise.
154 (lookup_label_for_goto): Likewise.
155 (finish_struct): Likewise.
156 (finish_enum): Likewise.
157 (store_parm_decls): Likewise.
158 (c_push_function_context): Likewise.
159 * c-lang.h: Remove usage of variable_size gty attribute.
160 * c-parser.c (c_parse_init): Adjust.
161 (c_parse_file): Likewise.
162
172b8440 1632014-05-13 Marek Polacek <polacek@redhat.com>
164
165 PR c/61162
166 * c-typeck.c (convert_for_assignment): Pass location to
167 WARN_FOR_ASSIGNMENT instead of input_location.
168
c9e51d25 1692014-05-10 Marek Polacek <polacek@redhat.com>
170
171 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
172 maybe_warn_string_init.
173 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
174 maybe_warn_string_init.
175 * c-tree.h (maybe_warn_string_init): Update declaration.
176 * c-typeck.c (maybe_warn_string_init): Add location parameter.
177 Call pedwarn_init with loc instead of with input_location.
178 (digest_init): Pass init_loc to maybe_warn_string_init.
179 (pop_init_level): Call pedwarn_init with loc instead of with
180 input_location.
181 (set_init_index): Likewise.
182 (process_init_element): Likewise.
183
53de1631 1842014-05-09 Marek Polacek <polacek@redhat.com>
185
186 PR c/61096
187 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
188 (c_parser_initelt): Pass location to set_init_label. Pass array index
189 location to set_init_index.
190 * c-tree.h (push_init_level): Update declaration.
191 (pop_init_level): Likewise.
192 (set_init_index): Likewise.
193 (set_init_label): Likewise.
194 * c-typeck.c (error_init): Add location parameter. Call error_at
195 instead of error.
196 (digest_init): Pass init_loc to error_init.
197 (really_start_incremental_init):
198 (push_init_level): Add location parameter. Pass loc to pop_init_level
199 and error_init.
200 (pop_init_level): Likewise.
201 (set_designator): Add location parameter. Pass loc to pop_init_level,
202 push_init_level, and error_init.
203 (set_init_index): Add location parameter. Pass loc to error_init and
204 set_designator.
205 (set_init_label): Likewise.
206 (output_init_element): Pass loc to error_init.
207 (process_init_element): Pass loc to error_init, pop_init_level,
208 pedwarn_init, and push_init_level.
209
3e5a8b00 2102014-05-09 Marek Polacek <polacek@redhat.com>
211
212 PR c/50459
213 * c-parser.c (c_parser_attributes): Parse the arguments as an
214 expression-list if the attribute takes identifier.
215
c2c4ae8d 2162014-05-08 Marek Polacek <polacek@redhat.com>
217
218 PR c/61053
219 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
220 TYPE_ALIGN_UNIT.
221
2026249a 2222014-05-08 Marek Polacek <polacek@redhat.com>
223
224 PR c/61077
225 * c-decl.c (start_function): Warn for _Atomic-qualified return type
226 of main.
227
960d5a55 2282014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
229 Mike Stump <mikestump@comcast.net>
230 Richard Sandiford <rdsandiford@googlemail.com>
231
232 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
233 (finish_enum): Use wide-int interfaces.
234 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
235 * c-typeck.c (build_c_cast): Likewise.
236 (set_nonincremental_init_from_string): Likewise.
237 (c_tree_equal): Likewise.
238
e0e14cbd 2392014-05-02 Marek Polacek <polacek@redhat.com>
240
241 PR c/25801
242 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
243 Return size_one_node when the type is not complete.
244 (pointer_diff): Remove comment.
245 (build_unary_op): Improve error messages.
246
27ff10cb 2472014-05-02 Marek Polacek <polacek@redhat.com>
248
249 * c-typeck.c (c_finish_return): Separate warning_at calls.
250
68410ce9 2512014-05-02 Marek Polacek <polacek@redhat.com>
252
253 * c-tree.h (error_init): Remove declaration.
254 (pedwarn_init): Likewise.
255 * c-typeck.c (error_init): Make static and move above.
256 (pedwarn_init): Likewise.
257 (warning_init): Move above.
258 (maybe_warn_string_init): Likewise.
259
e8e27117 2602014-05-01 Jeff Law <law@redhat.com>
261
262 Revert:
263
264 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
265 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
266 avoid goto.
267
971df357 2682014-05-02 Marek Polacek <polacek@redhat.com>
269
270 PR c/60784
271 * c-typeck.c (push_init_level): Set constructor_designated to
272 p->designated for structures.
273
de548fe5 2742014-05-01 Marek Polacek <polacek@redhat.com>
275
276 PR c/60915
277 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
278 function-definition has an attribute after the declarator.
279
053a0ded 2802014-05-01 Marek Polacek <polacek@redhat.com>
281
282 PR c/60257
283 * c-typeck.c (warning_init): Add location_t parameter. Call
284 warning_at instead of warning.
285 (push_init_level): Pass input_location to warning_init.
286 (add_pending_init): Add location_t parameter. Pass loc to
287 warning_init.
288 (set_nonincremental_init): Pass input_location to add_pending_init.
289 (set_nonincremental_init_from_string): Likewise.
290 (output_init_element): Pass loc to warning_init and to
291 add_pending_init.
292
694296f2 2932014-05-01 Marek Polacek <polacek@redhat.com>
294
295 PR c/43395
296 * c-typeck.c (c_finish_return): Distinguish between label and variable
297 when warning about returning local address.
298
86bbd7f9 2992014-05-01 Marek Polacek <polacek@redhat.com>
300
301 PR c/29467
302 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
303 in C89 mode.
304
e4ab2ef3 3052014-05-01 Marek Polacek <polacek@redhat.com>
306
307 PR c/43245
308 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
309 instead of 0 to WARN_FOR_QUALIFIERS.
310
ca3999cb 3112014-05-01 Marek Polacek <polacek@redhat.com>
312
313 PR c/56989
314 * c-typeck.c (default_conversion): Use better location for
315 error call.
316
52cc0072 3172014-04-30 Marek Polacek <polacek@redhat.com>
318
319 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
320 also when SANITIZE_FLOAT_DIVIDE is on.
321
af379dd3 3222014-04-30 Marek Polacek <polacek@redhat.com>
323
324 PR c/60139
325 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
326 and pedwarn_init. Use loc insted of input_location.
327
b069c2a0 3282014-04-30 Marek Polacek <polacek@redhat.com>
329
330 PR c/60351
331 * c-typeck.c (build_binary_op): Use location when warning about
332 shift count.
333
4a026b48 3342014-04-25 Marek Polacek <polacek@redhat.com>
335
336 PR c/18079
337 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
338 always_inline/noinline and hot/cold attributes.
339
adc93f31 3402014-04-25 Marek Polacek <polacek@redhat.com>
341
342 PR c/60114
343 * c-parser.c (c_parser_initelt): Pass input_location to
344 process_init_element.
345 (c_parser_initval): Pass loc to process_init_element.
346 * c-tree.h (process_init_element): Adjust declaration.
347 * c-typeck.c (push_init_level): Pass input_location to
348 process_init_element.
349 (pop_init_level): Likewise.
350 (set_designator): Likewise.
351 (output_init_element): Add location_t parameter. Pass loc to
352 digest_init.
353 (output_pending_init_elements): Pass input_location to
354 output_init_element.
355 (process_init_element): Add location_t parameter. Pass loc to
356 output_init_element.
357
e1029911 3582014-04-24 Jakub Jelinek <jakub@redhat.com>
359
360 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
361 atomic-clause, allow comma in between atomic-clause and
362 seq_cst.
363
9f0a7bc6 3642014-04-22 Jakub Jelinek <jakub@redhat.com>
365
366 PR c/59073
367 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
368 fails, don't set OM_PARALLEL_COMBINED and return NULL.
369
094da06d 3702014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
371
372 PR middle-end/60469
373 * c-array-notation.c (fix_builtin_array_notation_fn): Use
374 create_tmp_var instead build_decl for creating temps.
375 (build_array_notation_expr): Likewise.
376 (fix_conditional_array_notations_1): Likewise.
377 (fix_array_notation_expr): Likewise.
378 (fix_array_notation_call_expr): Likewise.
379
5a672e62 3802014-03-28 Jakub Jelinek <jakub@redhat.com>
381
382 PR c++/60689
383 * c-tree.h (c_build_function_call_vec): New prototype.
384 * c-typeck.c (build_function_call_vec): Don't call
385 resolve_overloaded_builtin here.
386 (c_build_function_call_vec): New wrapper function around
387 build_function_call_vec. Call resolve_overloaded_builtin here.
388 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
389 Call c_build_function_call_vec instead of build_function_call_vec.
390 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
391 * c-decl.c (finish_decl): Likewise.
392
f40f5e0e 3932014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
394
395 PR c/55383
396 * c-typeck.c: Use correct format string in cast-qual warning
397
9ec099a3 3982014-03-07 Thomas Schwinge <thomas@codesourcery.com>
399
400 * c-decl.c (c_decl_attributes): Use
401 lang_hooks.types.omp_mappable_type.
402 * c-typeck.c (c_finish_omp_clauses): Likewise.
403
3bfdc94f 4042014-03-06 Marek Polacek <polacek@redhat.com>
405
406 PR c/60197
407 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
408 of checking tree code.
409
8f1128f8 4102014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
411
412 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
413 (c_parser_parameter_declaration): Likewise.
414
977b1853 4152014-02-19 Marek Polacek <polacek@redhat.com>
416
417 PR c/60195
418 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
419 Call mark_exp_read on exp.value.
420 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
421 TREE_ADDRESSABLE on old instead of val.
422 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
423
825cd6ef 4242014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
425
426 * c-parser.c (c_parser_get_builtin_args): Replace calls to
427 C_EXPR_APPEND by vec_safe_push.
428 * c-tree.h (C_EXPR_APPEND): Remove.
429
ec761d5a 4302014-01-31 Marek Polacek <polacek@redhat.com>
431
432 PR c/59963
433 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
434 build_function_call_vec.
435 (build_function_call): Likewise.
436 (build_atomic_assign): Likewise.
437 (build_function_call_vec): Add arg_loc parameter. Use it.
438 (convert_arguments): Likewise.
439 (convert_for_assignment): Rename rhs_loc to expr_loc.
440 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
441 (c_parser_objc_keywordexpr): Likewise.
442 (c_parser_postfix_expression_after_primary): Call
443 build_function_call_vec with expr_loc rather than op_loc.
444 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
445 build_function_call_vec.
446 (c_parser_expr_list): Add locations parameter. Fill it with locations
447 of function arguments.
448 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
449
22a75734 4502014-01-30 Marek Polacek <polacek@redhat.com>
451
452 PR c/59940
453 * c-typeck.c (build_function_call_vec): Use loc parameter.
454 (convert_arguments): Add location parameter. Use it.
455 (ep_convert_and_check): Likewise.
456 (build_atomic_assign): Adjust convert_for_assignment call.
457 (build_modify_expr): Likewise.
458 (digest_init): Likewise.
459 (c_finish_return): Likewise.
460 (build_conditional_expr): Adjust ep_convert_and_check calls.
461 (convert_for_assignment): Add rhs_loc parameter. Use it.
462 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
463 calls.
464
29f580ac 4652014-01-30 Richard Biener <rguenther@suse.de>
466
467 PR c/59905
468 * c-typeck.c (build_function_call_vec): Do not replace calls
469 to a function via an incompatible type with a runtime abort.
470
a89e6c15 4712014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
472
473 * c-parser.c (c_parser_declaration_or_fndef): Replaced
474 flag_enable_cilkplus with flag_cilkplus.
475 (c_parser_direct_declarator_inner): Likewise.
476 (c_parser_attribute_any_word): Likewise.
477 (c_parser_attributes): Likewise.
478 (c_parser_compound_statement): Likewise.
479 (c_parser_statement_after_labels): Likewise.
480 (c_parser_if_statement): Likewise.
481 (c_parser_switch_statement): Likewise.
482 (c_parser_do_statement): Likewise.
483 (c_parser_for_statement): Likewise.
484 (c_parser_unary_expression): Likewise.
485 (c_parser_postfix_expression): Likewise.
486 (c_parser_postfix_expression_after_primary): Likewise.
487 (c_parser_postfix_expression_after_primary): Likewise.
488 (c_parser_omp_clause_name): Likewise.
489 (c_finish_omp_declare_simd): Likewise.
490 (c_parser_cilk_verify_simd): Likewise.
491 * c-typeck.c (build_array_ref): Likewise.
492 (build_function_call_vec): Likewise.
493 (convert_arguments): Likewise.
494 (build_compound_expr): Likewise.
495 (c_finish_return): Likewise.
496 (c_finish_if_stmt): Likewise.
497 (c_finish_loop): Likewise.
498 (build_binary_op): Likewise.
499
2623625f 5002014-01-23 Marek Polacek <polacek@redhat.com>
501
502 PR c/59846
503 * c-typeck.c (parser_build_binary_op): Use location instead of
504 input_location.
505 (build_binary_op): Pass location to shorten_compare.
506
46da3601 5072014-01-23 Marek Polacek <polacek@redhat.com>
508
509 PR c/58346
510 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
511 an empty aggregate.
512
9a9db3c1 5132014-01-23 Marek Polacek <polacek@redhat.com>
514
515 PR c/59871
516 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
517 of a comma expression.
518 (emit_side_effect_warnings): Likewise.
519
69c9b607 5202014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
521
522 PR c/59825
523 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
524 function to use walk_tree and moved a lot of its functionality to
525 expand_array_notations.
526 (expand_array_notations): New function.
527
7e005ab5 5282014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
529
530 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
531 attribute an attribute without value.
532
d6779b5f 5332014-01-23 Jakub Jelinek <jakub@redhat.com>
534
535 PR middle-end/58809
536 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
537 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
538
ec431042 5392014-01-22 Marek Polacek <polacek@redhat.com>
540
541 PR c/59891
542 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
543 of remove_c_maybe_const_expr on op1 and op2.
544
1248c663 5452014-01-15 Jakub Jelinek <jakub@redhat.com>
546
547 PR c/58943
548 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
549 effects, preevaluate rhs using SAVE_EXPR first.
550
0bc789fc 5512014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
552
553 PR c++/59631
554 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
555 statements with if-elseif statements.
556
6685d11c 5572014-01-06 Marek Polacek <polacek@redhat.com>
558
559 PR c/57773
560 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
561 defined bit-field types only in ISO C.
562
3aea1f79 5632014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
564
565 Update copyright years
566
e4f22041 5672014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
568
569 * c-array-notation.c: Use the standard form for the copyright notice.
570
74acc703 5712013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
572
573 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
574 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
575 field in parser is not empty. If not-empty, call the function
576 c_parser_finish_omp_declare_simd.
577 (c_parser_cilk_clause_vectorlength): Modified function to be shared
578 between SIMD-enabled functions and #pragma simd. Added new parameter.
579 (c_parser_cilk_all_clauses): Modified the usage of the function
580 c_parser_cilk_clause_vectorlength as mentioned above.
581 (c_parser_cilk_simd_fn_vector_attrs): New function.
582 (c_finish_cilk_simd_fn_tokens): Likewise.
583 (is_cilkplus_vector_p): Likewise.
584 (c_parser_omp_clause_name): Added checking for "vectorlength,"
585 "nomask," and "mask" strings in clause name.
586 (c_parser_omp_all_clauses): Added 3 new case statements:
587 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
588 PRAGMA_CILK_CLAUSE_NOMASK.
589 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
590 check for vector attribute and if so call the function
591 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
592 called the function c_finish_cilk_simd_fn_tokens.
593 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
594 parser field is non-empty. If so, parse them as you would parse
595 the omp declare simd pragma.
596 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
597 Added a check when step is a parameter and flag it as error.
598 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
599 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
600 pragma_omp_clause.
601
395dc01c 6022013-12-17 Thomas Schwinge <thomas@codesourcery.com>
603
604 * c-parser.c (c_parser_omp_parallel): Fix description.
605
433e804e 6062013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
607
608 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
609 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
610 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
611 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
612
a179a7dc 6132013-12-04 Joseph Myers <joseph@codesourcery.com>
614
615 PR c/52023
616 * c-parser.c (c_parser_alignas_specifier): Use
617 c_sizeof_or_alignof_type instead of c_alignof.
618 (c_parser_alignof_expression): Likewise, with min_alignof
619 parameter depending on alignof spelling used.
620
bdf1e3c7 6212013-12-04 Marek Polacek <polacek@redhat.com>
622
623 PR c/54113
624 * c-decl.c (start_function): Don't warn for missing prototype for
625 inline functions.
626
05e8f674 6272013-12-03 Marek Polacek <polacek@redhat.com>
628
629 PR c/59351
630 * c-decl.c (build_compound_literal): Allow compound literals with
631 empty initial value.
632
39f74d66 6332013-12-02 Joseph Myers <joseph@codesourcery.com>
634
635 PR c/58235
636 * c-typeck.c (build_modify_expr): Diagnose assignment to
637 expression with array type.
638
f221adca 6392013-11-29 Joseph Myers <joseph@codesourcery.com>
640
641 PR c/42262
642 * c-typeck.c (process_init_element): Do not treat a string as
643 initializing a whole array when used with a designator for an
644 individual element.
645
75bce827 6462013-11-29 Joseph Myers <joseph@codesourcery.com>
647
648 PR c/57574
649 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
650 an inline function following a static declaration.
651
dc133326 6522013-11-28 Jakub Jelinek <jakub@redhat.com>
653
654 PR c/59310
655 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
656 to p_name before calling c_parser_omp_teams instead of after.
657 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
658 argument. Remove unused p_name variable.
659
d09768a4 6602013-11-27 Aldy Hernandez <aldyh@redhat.com>
661 Jakub Jelinek <jakub@redhat.com>
662
663 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
664 external_scope is NULL.
665
73fd9cbe 6662013-11-27 Tom de Vries <tom@codesourcery.com>
667 Marc Glisse <marc.glisse@inria.fr>
668
669 PR c++/59032
670 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
671
bc61cadb 6722013-11-22 Andrew MacLeod <amacleod@redhat.com>
673
674 * c-typeck.c: Add required include files from gimple.h.
675
3df42822 6762013-11-22 David Malcolm <dmalcolm@redhat.com>
677
678 * c-decl.c (define_label, shadow_tag_warned)
679 (check_bitfield_type_and_width, grokdeclarator, grokparms,
680 store_parm_decls_newstyle, store_parm_decls_oldstyle)
681 (declspecs_add_type): Remove use of in_system_header macro.
682 * c-parser.c (c_parser_unary_expression): Likewise.
683 * c-typeck.c (store_init_value, process_init_element)
684 (c_start_case): Likewise.
685
686 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
687 macro.
688
689 * c-parser.c (c_parser_set_source_position_from_token): Remove
690 reference to in_system_header from comment.
691
08f817b3 6922013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
693
694 * c-decl.c (grokdeclarator): Update comment to refer to
695 tree_to_[su]hwi rather than tree_low_cst.
696
6a0712d4 6972013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
698
699 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
700 tree_to_uhwi throughout.
701
fcb97e84 7022013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
703
704 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
705 throughout.
706
35ec552a 7072013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
708
709 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
710 throughout.
711
f2697631 7122013-11-15 Aldy Hernandez <aldyh@redhat.com>
713
714 * c-parser.c (c_parser_cilk_simd): New.
715 (c_parser_cilk_verify_simd): New.
716 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
717 (c_parser_omp_for_loop): Add case for NE_EXPR.
718 Set c_break_label for CILK_SIMD.
719 (c_parser_cilk_clause_vectorlength): New.
720 (c_parser_cilk_clause_linear): New.
721 (c_parser_cilk_clause_name): New.
722 (c_parser_cilk_all_clauses): New.
723 * c-typeck.c (build_unary_op): Pass location argument to
724 readonly_error.
725 (build_modify_expr): Same.
726 (build_asm_expr): Same.
727 (c_finish_bc_stmt): Error on break/continue in loops.
728
e795d6e1 7292013-11-14 Andrew MacLeod <amacleod@redhat.com>
730
731 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
732
9ed99284 7332013-11-14 Diego Novillo <dnovillo@google.com>
734
735 * c-decl.c: Include print-tree.h.
736 Include stor-layout.h.
737 Include varasm.h.
738 Include attribs.h.
739 Include stringpool.h.
740 * c-lang.c: Include fold-const.h.
741 * c-parser.c: Include stringpool.h.
742 Include attribs.h.
743 Include stor-layout.h.
744 Include varasm.h.
745 Include trans-mem.h.
746 * c-typeck.c: Include stor-layout.h.
747 Include trans-mem.h.
748 Include varasm.h.
749 Include stmt.h.
750
4fba5eb9 7512013-11-13 Joseph Myers <joseph@codesourcery.com>
752
753 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
754 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
755 __auto_type.
756 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
757 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
758 RID_AUTO_TYPE.
759 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
760 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
761 (c_parser_declarator, c_parser_direct_declarator_inner)
762 (c_parser_parameter_declaration, c_parser_type_name): All callers
763 changed.
764 (c_parser_declaration_or_fndef): Handle declarations with type
765 determined from the initializer.
766
a8783bee 7672013-11-12 Andrew MacLeod <amacleod@redhat.com>
768
e795d6e1 769 * c-typeck.c: Include gimplify.h.
a8783bee 770
d184e0c0 7712013-11-12 Joseph Myers <joseph@codesourcery.com>
772
773 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
774 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
775 comment.
776 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
777 or _Thread_local as appropriate in diagnostics.
778 (build_null_declspecs): Initialize ret->thread_gnu_p.
779 (declspecs_add_scspec): Handle either __thread or _Thread_local
780 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
781 pedantic. Do not disallow _Thread_local extern and _Thread_local
782 static.
783
b560fabd 7842013-11-07 Joseph Myers <joseph@codesourcery.com>
785 Andrew MacLeod <amacleod@redhat.com>
786
787 * c-aux-info.c (gen_type): Handle atomic qualifier.
788 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
789 qualifiers when compating types.
790 (shadow_tag_warned): Handle atomic_p in declspecs.
791 (quals_from_declspecs): Likewise.
792 (start_decl): Use c_type_promotes_to when promoting argument
793 types.
794 (grokdeclarator): Handle _Atomic.
795 (get_parm_info): Diagnose any qualifier on "void" as only
796 parameter.
797 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
798 comparing types. Use c_type_promotes_to when promoting argument
799 types.
800 (finish_function): Use c_type_promotes_to when promoting argument
801 types.
802 (build_null_declspecs): Handle atomic_p in declspecs.
803 (declspecs_add_qual): Handle RID_ATOMIC.
804 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
805 (c_token_starts_declspecs): Handle RID_ATOMIC.
806 (c_parser_declspecs): Handle atomic type specifiers and
807 qualifiers.
808 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
809 from types of expressions with atomic type.
810 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
811 (c_parser_attribute_any_word): Handle RID_ATOMIC.
812 (c_parser_initializer, c_parser_initelt, c_parser_initval)
813 (c_parser_statement_after_labels, c_parser_switch_statement)
814 (c_parser_for_statement, c_parser_expr_no_commas)
815 (c_parser_conditional_expression, c_parser_binary_expression)
816 (c_parser_cast_expression, c_parser_unary_expression)
817 (c_parser_postfix_expression)
818 (c_parser_postfix_expression_after_primary, c_parser_expression):
819 Use convert_lvalue_to_rvalue.
820 (c_parser_expression_conv, c_parser_expr_list): Document
821 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
822 (c_parser_objc_synchronized_statement): Use
823 convert_lvalue_to_rvalue.
824 (c_parser_objc_selector): Handle RID_ATOMIC.
825 (c_parser_objc_receiver, c_parser_array_notation): Use
826 convert_lvalue_to_rvalue.
827 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
828 _Atomic (type-name).
829 (struct c_declspecs): Add atomic_p field.
830 (convert_lvalue_to_rvalue): Declare.
831 * c-typeck.c (c_type_promotes_to): Promote atomic types to
832 corresponding atomic types.
833 (qualify_type): Don't add _Atomic qualifiers from second argument.
834 (comp_target_types): Do not allow _Atomic mismatches.
835 (type_lists_compatible_p): Do not remove atomic qualifiers when
836 comparing types.
837 (really_atomic_lvalue, convert_lvalue_to_rvalue)
838 (build_atomic_assign): New functions.
839 (build_unary_op): Use build_atomic_assign for atomic increment and
840 decrement.
841 (build_conditional_expr): Do not treat _Atomic void as a qualified
842 version of void.
843 (build_modify_expr): Use build_atomic_assign for atomic LHS.
844 (find_anonymous_field_with_type, convert_to_anonymous_field)
845 (convert_for_assignment): Do not remove atomic qualifiers when
846 comparing types.
847 (digest_init): Do not accept initialization of arrays of atomic
848 elements by string constants.
849 (build_asm_expr): Use convert_lvalue_to_rvalue.
850 (build_binary_op): Do not treat _Atomic void as a qualified
851 version of void.
852
8b023e7c 8532013-11-06 DJ Delorie <dj@redhat.com>
854
855 * c-decl.c (locate_old_decl): If a previous conflicting decl is
856 both explicit and builtin, print the location of the explicit one.
857
c630ef93 8582013-11-05 Tobias Burnus <burnus@net-b.de>
859
860 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
861 c_parser_omp_distribute, c_parser_omp_teams,
862 c_parser_omp_target, c_parser_omp_declare): Handle
863 -fopenmp-simd.
864
2c4c3477 8652013-11-03 Marek Polacek <polacek@redhat.com>
866
867 * c-decl.c (grokdeclarator): Add VLA instrumentation.
868
df205251 8692013-11-01 Jakub Jelinek <jakub@redhat.com>
870
871 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
872 check_dup_generic at the end, unless remove is true.
873 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
874 remove = true;.
875 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
876
23871d0c 8772013-10-31 Jakub Jelinek <jakub@redhat.com>
878
879 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
880 with decl that is not pointer nor array.
881
d037099f 8822013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
883
884 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
885 a spawning function is found.
886 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
887 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
888 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
889 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
890 case.
891 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
892 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
893 expr.
894 (c_finish_return): Added a check to reject _Cilk_spawn in return
895 expression.
896 (build_cilk_spawn): New function.
897 (build_cilk_sync): Likewise.
898 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
899
4c90c04c 9002013-10-27 Tobias Burnus <burnus@net-b.de>
901
902 PR other/33426
903 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
904 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
905 (c_parser_statement_after_labels): Update calls.
906
48a972c8 9072013-10-24 Tobias Burnus <burnus@net-b.de>
4644b593 908
909 PR other/33426
910 * c-parser.c (c_parser_pragma, c_parser_for_statement):
911 Handle PRAGMA_IVDEP.
912 (c_parser_statement_after_labels): Update call.
913
12f86df0 9142013-10-24 Marek Polacek <polacek@redhat.com>
915
916 * c-parser.c (c_parser_struct_declaration): Add a comment.
917 (c_parser_declarator): Don't allow _Alignas here.
918
7740abd8 9192013-10-17 Andrew MacLeod <amacleod@redhat.com>
920
921 * c-parser.c: Include omp-low.h.
922 * c-typeck.c: Likewise.
923
43d03c23 9242013-10-17 Marek Polacek <polacek@redhat.com>
925
926 PR c/58267
927 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
928 Document syntax of the array-declarator.
929 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
930 are not permitted.
931 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
932 (c_parser_struct_declaration): Likewise.
933 (c_parser_declarator): Likewise.
934 (c_parser_direct_declarator_inner): Likewise.
935 (c_parser_parameter_declaration): Likewise.
936 (c_parser_type_name): Likewise.
937
bc7bff74 9382013-10-11 Jakub Jelinek <jakub@redhat.com>
939
940 * c-lang.h (current_omp_declare_target_attribute): New extern
941 decl.
942 * c-parser.c: Include c-lang.h.
943 (struct c_parser): Change tokens to c_token *.
944 Add tokens_buf field. Change tokens_avail type to unsigned int.
945 (c_parser_consume_token): If parser->tokens isn't
946 &parser->tokens_buf[0], increment parser->tokens.
947 (c_parser_consume_pragma): Likewise.
948 (enum pragma_context): Add pragma_struct and pragma_param.
949 (c_parser_external_declaration): Adjust
950 c_parser_declaration_or_fndef caller.
951 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
952 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
953 Adjust recursive call.
954 (c_parser_struct_or_union_specifier): Use pragma_struct instead
955 of pragma_external.
956 (c_parser_parameter_declaration): Use pragma_param instead of
957 pragma_external.
958 (c_parser_compound_statement_nostart, c_parser_label,
959 c_parser_for_statement): Adjust
960 c_parser_declaration_or_fndef callers.
961 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
962 it through to c_parser_conditional_expression.
963 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
964 pass it through to c_parser_binary_expression. Adjust recursive
965 call.
966 (c_parser_binary_expression): Remove prec argument, add
967 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
968 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
969 binop matches it, use build2 instead of parser_build_binary_op.
970 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
971 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
972 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
973 Handle pragma_struct and pragma_param the same as pragma_external.
974 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
975 (c_parser_omp_variable_list): Parse array sections for
976 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
977 (c_parser_omp_clause_collapse): Fully fold collapse expression.
978 (c_parser_omp_clause_reduction): Handle user defined reductions.
979 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
980 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
981 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
982 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
983 c_parser_omp_clause_depend, c_parser_omp_clause_map,
984 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
985 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
986 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
987 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
988 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
989 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
990 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
991 (c_parser_omp_for_loop): Add CODE argument, pass it through
992 to c_finish_omp_for. Change last argument to cclauses,
993 and adjust uses to grab parallel clauses from the array of all
994 the split clauses. Adjust c_parser_binary_expression,
995 c_parser_declaration_or_fndef and c_finish_omp_for callers.
996 (omp_split_clauses): New function.
997 (c_parser_omp_simd): New function.
998 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
999 Allow the function to be called also when parsing combined constructs,
1000 and call c_parser_omp_simd when parsing for simd.
1001 (c_parser_omp_sections_scope): If section-sequence doesn't start with
1002 #pragma omp section, require exactly one structured-block instead of
1003 sequence of statements.
1004 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
1005 Allow the function to be called also when parsing combined constructs.
1006 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
1007 Allow the function to be called also when parsing combined
1008 constructs.
1009 (c_parser_omp_taskgroup, c_parser_omp_cancel,
1010 c_parser_omp_cancellation_point, c_parser_omp_distribute,
1011 c_parser_omp_teams, c_parser_omp_target_data,
1012 c_parser_omp_target_update, c_parser_omp_target,
1013 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
1014 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
1015 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
1016 (c_parser_omp_construct): Add p_name and mask vars. Handle
1017 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
1018 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
1019 and c_parser_omp_sections callers.
1020 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
1021 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1022 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
1023 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
1024 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
1025 OMP_CLAUSE_DEPEND.
1026 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
1027 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
1028 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
1029 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
1030 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
1031 * c-typeck.c: Include tree-inline.h.
1032 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
1033 handle_omp_array_sections_1, handle_omp_array_sections,
1034 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
1035 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
1036 user defined reductions.
1037 (c_tree_equal): New function.
1038 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
1039 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
1040 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
1041 c_check_omp_declare_reduction_r): New prototypes.
1042 * c-decl.c (current_omp_declare_target_attribute): New variable.
1043 (c_decl_attributes): New function.
1044 (start_decl, start_function): Use it instead of decl_attributes.
1045 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
1046 c_omp_reduction_decl, c_omp_reduction_lookup,
1047 c_check_omp_declare_reduction_r): New functions.
1048
3ce7d1bd 10492013-09-25 Tom Tromey <tromey@redhat.com>
1050
1051 * Make-lang.in (c/gccspec.o): Remove.
1052 (CFLAGS-c/gccspec.o): New variable.
1053 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
1054 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
1055 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
1056
96da1c1d 10572013-09-25 Tom Tromey <tromey@redhat.com>
1058
1059 * Make-lang.in (c/gccspec.o): Don't use subshell.
1060
1b309377 10612013-09-18 Marek Polacek <polacek@redhat.com>
1062
1063 PR sanitize/58443
1064 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
1065 Remove unnecessary check.
1066
05f893e1 10672013-09-18 Marek Polacek <polacek@redhat.com>
1068
1069 PR sanitizer/58411
1070 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
1071 no_sanitize_undefined attribute.
1072
bda0b9d2 10732013-09-13 Kai Tietz <ktietz@redhat.com>
1074
1075 PR target/57848
1076 * c-decl.c (c_builtin_function_ext_scope): Remove
1077 wrong assumption that it is never called on prexisting
1078 symbol.
1079
73437615 10802013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
1081
1082 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
1083
eaab24b9 10842013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1085
1086 * c-objc-common.c (c_tree_printer): Tidy.
1087
9e46467d 10882013-08-30 Marek Polacek <polacek@redhat.com>
1089
1090 * c-typeck.c (build_binary_op): Add division by zero and shift
1091 instrumentation.
1092
f8234178 10932013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
f9086116 1094 Joseph Myers <joseph@codesourcery.com>
f8234178 1095
c90a7d10 1096 PR c/35649
f8234178 1097 * c-typeck.c (c_common_type): Prefer double_type_node over
1098 other REAL_TYPE types with the same precision.
1099 (convert_arguments): Likewise.
1100
6f07f480 11012013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
1102
1103 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
1104 (c_initialize_diagnostics): Call a destructor for the early printer.
1105
eed6bc21 11062013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1107
1108 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
1109 printer initialization.
1110
57717943 11112013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
eed6bc21 1112
57717943 1113 PR c/57490
1114 * c-array-notation.c (fix_conditional_array_notations_1): Added a
1115 check for truth values.
1116 (expand_array_notation_exprs): Added truth values case. Removed an
1117 unwanted else. Added for-loop to walk through subtrees in default
1118 case.
1119
a94db6b0 11202013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
1121
1122 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
1123
e76163a9 11242013-07-23 Joseph Myers <joseph@codesourcery.com>
1125
1126 * c-parser.c (struct c_generic_association): Fix typo.
1127
7aa04c8d 11282013-07-23 Tom Tromey <tromey@redhat.com>
1129 Joseph Myers <joseph@codesourcery.com>
1130
1131 * c-parser.c (struct c_generic_association): New.
1132 (c_generic_association_d): New typedef.
1133 (c_parser_generic_selection): New function.
1134 (c_parser_postfix_expression): Handle RID_GENERIC.
1135
76bbe4ca 11362013-07-13 Jason Merrill <jason@redhat.com>
1137
1138 PR c++/57793
1139 * c-decl.c (finish_struct): Check for too-large class.
1140
21ebaa24 11412013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
f5298614 1142
1143 PR c/57821
1144 * c-typeck.c (set_init_index): When folding, check for index overflow.
1145
936c3081 11462013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
1147
1148 * c-parser.c (c_parser_array_notation): Removed rejection of array
1149 notations in an array of function pointers.
1150
50acebe0 11512013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
1152
1153 * c-array-notation.c (make_triplet_val_inv): New function.
1154 (create_cmp_incr): Likewise.
1155 (create_array_refs): Likewise.
1156 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
1157 Also modularized common parts between functions and called the function.
1158 (build_array_notation_expr): Likewise.
1159 (fix_conditional_array_notations_1): Likewise.
1160 (fix_array_notation_expr): Likewise.
1161 (fix_array_notation_call_expr): Likewise.
1162
01e6cdb4 11632013-06-18 Marek Polacek <polacek@redhat.com>
1164
1165 PR c/57630
1166 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
1167
6a3adac6 11682013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
1169
1170 * c-array-notation.c (build_array_notation_expr): Reject array notation
1171 mismatch between LHS and RHS even inside a call_expr. Also, removed
1172 a couple while statements that were dead code.
1173
62aab3f3 11742013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
1175
1176 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
1177 excessive precision expressions in function parameters. Also removed
1178 couple unwanted while statements.
1179
bfc83720 11802013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
1181
1182 * c-array-notation.c (expand_array_notation_exprs): Added
1183 ARRAY_NOTATION_REF case.
1184
09970d67 11852013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
1186
1187 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
1188 function to c-family/array-notation-common.c.
1189 (is_cilkplus_reduce_builtin): Likewise.
1190 (find_rank): Likewise.
1191 (extract_array_notation_exprs): Likewise.
1192 (replace_array_notations): Likewise.
1193 (find_inv_trees): Likewise.
1194 (replace_inv_trees): Likewise.
1195 (contains_array_notation_expr): Likewise.
1196 (find_correct_array_notation_type): Likewise.
1197 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
1198 (struct inv_list): Moved this to c-family/array-notation-common.c.
1199 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
1200
6e13bc01 12012013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
1202
1203 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
1204 reduction functions outside the for-loop. Added a check if the fundecl
1205 is non-NULL. Finally, removed an unwanted if-statement, and made the
1206 body unconditional.
1207
cc92dddc 12082013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
1209
1210 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
1211 condition of the if-statement matches the rank of else-block and then-
1212 block when array notations are used.
1213 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
1214 expression after the entire function body is parsed.
1215 (c_parser_expr_no_commas): Delayed creating array notation expressions
1216 to the end of function parsing.
1217 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
1218 whole if-statement instead of just the condition.
1219 (expand_array_notation_exprs): Added MODIFY_EXPR case.
1220
eddc63fd 12212013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
1222
1223 PR c/57474
1224 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
1225 array to NULL_TREE if they are unused. Also added a check for the
1226 field to be NULL before its fields are used in future.
1227
a2115a4a 12282013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1229
1230 PR bootstrap/57450
1231 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
1232 (build_array_notation_expr): Likewise.
1233
3c6d4197 12342013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
1235
1236 * c-typeck.c (build_array_ref): Added a check to see if array's
1237 index is greater than one. If true, then emit an error.
1238 (build_function_call_vec): Exclude error reporting and checking
1239 for builtin array-notation functions.
1240 (convert_arguments): Likewise.
1241 (c_finish_return): Added a check for array notations as a return
1242 expression. If true, then emit an error.
1243 (c_finish_loop): Added a check for array notations in a loop
1244 condition. If true then emit an error.
1245 (lvalue_p): Added a ARRAY_NOTATION_REF case.
1246 (build_binary_op): Added a check for array notation expr inside
1247 op1 and op0. If present, we call another function to find correct
1248 type.
1249 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
1250 * c-parser.c (c_parser_compound_statement): Check if array
1251 notation code is used in tree, if so, then transform them into
1252 appropriate C code.
1253 (c_parser_expr_no_commas): Check if array notation is used in LHS
1254 or RHS, if so, then build array notation expression instead of
1255 regular modify.
1256 (c_parser_postfix_expression_after_primary): Added a check for
1257 colon(s) after square braces, if so then handle it like an array
1258 notation. Also, break up array notations in unary op if found.
1259 (c_parser_direct_declarator_inner): Added a check for array
1260 notation.
1261 (c_parser_compound_statement): Added a check for array notation in
1262 a stmt. If one is present, then expand array notation expr.
1263 (c_parser_if_statement): Likewise.
1264 (c_parser_switch_statement): Added a check for array notations in
1265 a switch statement's condition. If true, then output an error.
1266 (c_parser_while_statement): Similarly, but for a while.
1267 (c_parser_do_statement): Similarly, but for a do-while.
1268 (c_parser_for_statement): Similarly, but for a for-loop.
1269 (c_parser_unary_expression): Check if array notation is used in a
1270 pre-increment or pre-decrement expression. If true, then expand
1271 them.
1272 (c_parser_array_notation): New function.
1273 * c-array-notation.c: New file.
1274 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
1275
2c1c8a2c 12762013-05-23 Mike Stump <mikestump@comcast.net>
1277
1278 * c-typeck.c (convert_for_assignment): Handle references to memory
1279 spaces better.
1280
be5f9e46 12812013-05-16 Jason Merrill <jason@redhat.com>
1282
1283 * Make-lang.in (cc1$(exeext)): Use link mutex.
1284
9205a6cc 12852013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
1286
1287 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
1288 to simply use OPT_Wpointer_arith.
1289 (build_unary_op): Likewise.
1290
0b049e15 12912013-04-03 Jakub Jelinek <jakub@redhat.com>
1292
1293 PR c/19449
1294 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
1295 argument. If set, or it temporarily for parsing of the first
1296 argument into force_folding_builtin_constant_p.
1297 (c_parser_postfix_expression): Adjust callers.
1298
8e966116 12992013-03-21 Richard Biener <rguenther@suse.de>
1300
1301 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
1302 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
1303
b862f263 13042013-02-12 Marek Polacek <polacek@redhat.com>
1305
1306 PR c/44938
1307 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
1308 origtypes to NULL.
1309
54550ecb 13102013-01-24 Jakub Jelinek <jakub@redhat.com>
1311
1312 PR c/56078
1313 * c-typeck.c (set_nonincremental_init_from_string): If
1314 constructor_max_index is NULL, treat it as if tree_int_cst_lt
1315 returned false.
1316 (process_init_element): Likewise.
1317
035b65e2 13182012-12-20 Jakub Jelinek <jakub@redhat.com>
1319
1320 PR c++/55619
1321 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
1322 argument, don't call default_function_array_conversion
1323 nor c_fully_fold here.
1324 (c_parser_asm_statement): Adjust callers.
1325 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
1326 and outputs here, and call default_function_array_conversion
1327 on inputs that don't need to be addressable.
1328
7cbb7f1a 13292012-12-18 Jakub Jelinek <jakub@redhat.com>
1330
1331 PR c/39464
1332 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
1333 warning require that both c_common_unsigned_type as well as
1334 c_common_signed_type is the same for both mvl and mvr types.
1335
f1f41a6c 13362012-11-16 Diego Novillo <dnovillo@google.com>
1337
1338 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
1339
1340 * c-common.c: Use new vec API in vec.h.
1341 * c-common.h: Likewise.
1342 * c-gimplify.c: Likewise.
1343 * c-pragma.c: Likewise.
1344 * c-pretty-print.c: Likewise.
1345 * c-pretty-print.h: Likewise.
1346 * c-semantics.c: Likewise.
1347 * c-decl.c: Likewise.
1348 * c-parser.c: Likewise.
1349 * c-tree.h: Likewise.
1350 * c-typeck.c: Likewise.
1351
8b447d3f 13522012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
1353
1354 PR c++/54930
1355 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
1356
08fc5390 13572012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1358
1359 PR c/53066
1360 * c-decl.c (warn_if_shadowing): Do not warn if a variable
1361 shadows a function, unless the variable is a function or a
1362 pointer-to-function.
1363
57f872a2 13642012-10-12 Jakub Jelinek <jakub@redhat.com>
1365
1366 PR c/54381
1367 * c-parser.c (struct c_tree_loc_pair): Removed.
1368 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
1369 add location_t * and tree * arguments, fill in array of 3
1370 sizeof_arg trees and corresponding locs.
1371 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
1372 c_parser_expr_list callers.
1373 (c_parser_postfix_expression_after_primary): Likewise. Pass
1374 array of 3 sizeof_arg trees and locs (corresponding to first
1375 3 arguments) to sizeof_pointer_memaccess_warning.
1376
d1455aa3 13772012-10-09 Lawrence Crowl <crowl@google.com>
1378
1379 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
1380 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
1381 hash table.
1382
b0e7825e 13832012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
1384
1385 PR c++/54194
1386 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
1387 call.
1388
41ed701a 13892012-10-09 Marc Glisse <marc.glisse@inria.fr>
1390
1391 PR c++/54427
1392 * c-typeck.c: Include c-common.h.
1393 (enum stv_conv): Moved to c-common.h.
1394 (scalar_to_vector): Moved to c-common.c.
1395 (build_binary_op): Adapt to scalar_to_vector's new prototype.
1396 * Make-lang.in: c-typeck.c depends on c-common.h.
1397
ef34afc1 13982012-10-04 Arnaud Charlet <charlet@adacore.com>
1399
1400 * c-decl.c (c_write_global_declarations): Fix handling of
1401 -fdump-ada-spec*.
1402
7bd765d4 14032012-09-30 Sharad Singhai <singhai@google.com>
1404
1405 * c-decl.c (c_write_global_declarations): Use a different method
1406 to determine if the dump has ben initialized.
1407
c4b1a13a 14082012-09-14 Joseph Myers <joseph@codesourcery.com>
1409
1410 PR c/54552
1411 * c-typeck.c (c_cast_expr): When casting to a type requiring
1412 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
1413 c_fully_fold first.
1414
bb554051 14152012-09-14 Joseph Myers <joseph@codesourcery.com>
1416
1417 PR c/54103
1418 * c-typeck.c (build_unary_op): Pass original argument of
1419 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
1420 any C_MAYBE_CONST_EXPR, if it has integer operands.
1421 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
1422 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
1423 to c_objc_common_truthvalue_conversion, then remove any
1424 C_MAYBE_CONST_EXPR, if they have integer operands. Use
1425 c_objc_common_truthvalue_conversion not
1426 c_common_truthvalue_conversion.
1427 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
1428 call note_integer_operands for arguments with integer operands
1429 that are not integer constants.
1430
c708c6ef 14312012-09-13 Jakub Jelinek <jakub@redhat.com>
1432
1433 PR c/54559
1434 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
1435 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
1436
cce20430 14372012-08-31 Jakub Jelinek <jakub@redhat.com>
1438
1439 PR c/54428
1440 * c-convert.c (convert): Don't call fold_convert_loc if
1441 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
1442 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
1443 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
1444
a90d57ed 14452012-08-24 Jakub Jelinek <jakub@redhat.com>
1446
1447 PR c/54355
1448 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
1449 for nested and empty_ok arguments in the call to
1450 c_parser_declaration_or_fndef.
1451
f003f5dc 14522012-08-17 Jakub Jelinek <jakub@redhat.com>
1453
1454 * c-tree.h (c_last_sizeof_arg): Declare.
1455 * c-parser.c (struct c_tree_loc_pair): New type.
1456 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
1457 non-NULL.
1458 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
1459 (c_parser_postfix_expression_after_primary): Likewise. Call
1460 sizeof_pointer_memaccess_warning if needed.
1461 (sizeof_ptr_memacc_comptypes): New function.
1462 * c-typeck.c (c_last_sizeof_arg): New global variable.
1463 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
1464
a5656b73 14652012-07-24 Uros Bizjak <ubizjak@gmail.com>
1466
1467 * c-lang.h (lang_decl): Add variable_size GTY option.
1468
b9ed1410 14692012-07-16 Steven Bosscher <steven@gcc.gnu.org>
1470
1471 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
1472 * Make-lang.in: Fix dependencies.
1473
e53d55e7 14742012-06-29 Steven Bosscher <steven@gcc.gnu.org>
1475
1476 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
1477 and add language Makefile hooks.
1478 * config-lang.in: New file.
1479 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
1480 add the required "normal" config-lang.in rules.
1481 * c-lang.h: Moved from gcc/ to here.
1482 * c-tree.h: Likewise.
1483 * c-objc-common.c: Likewise.
1484 * c-objc-common.h: Likewise.
1485 * c-typeck.c: Likewise.
1486 * c-convert.c: Likewise.
1487 * c-lang.c: Likewise.
1488 * c-aux-info.c: Likewise.
1489 * c-errors.c: Likewise.
1490 * gccspec.c: Likewise.
1491 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
1492 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
1493\f
3aea1f79 1494Copyright (C) 2012-2014 Free Software Foundation, Inc.
e53d55e7 1495
1496Copying and distribution of this file, with or without modification,
1497are permitted in any medium without royalty provided the copyright
1498notice and this notice are preserved.