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