]> gcc.gnu.org Git - gcc.git/blame - gcc/c/ChangeLog
re PR fortran/61109 (ICE in fortran/trans-array.c on dimension 0 arrays)
[gcc.git] / gcc / c / ChangeLog
CommitLineData
661a0813
MP
12014-05-09 Marek Polacek <polacek@redhat.com>
2
3 PR c/50459
4 * c-parser.c (c_parser_attributes): Parse the arguments as an
5 expression-list if the attribute takes identifier.
6
2793eeab
MP
72014-05-08 Marek Polacek <polacek@redhat.com>
8
9 PR c/61053
10 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
11 TYPE_ALIGN_UNIT.
12
f827930a
MP
132014-05-08 Marek Polacek <polacek@redhat.com>
14
15 PR c/61077
16 * c-decl.c (start_function): Warn for _Atomic-qualified return type
17 of main.
18
1d60af08
KZ
192014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
20 Mike Stump <mikestump@comcast.net>
21 Richard Sandiford <rdsandiford@googlemail.com>
22
23 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
24 (finish_enum): Use wide-int interfaces.
25 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
26 * c-typeck.c (build_c_cast): Likewise.
27 (set_nonincremental_init_from_string): Likewise.
28 (c_tree_equal): Likewise.
29
a0e24419
MP
302014-05-02 Marek Polacek <polacek@redhat.com>
31
32 PR c/25801
33 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
34 Return size_one_node when the type is not complete.
35 (pointer_diff): Remove comment.
36 (build_unary_op): Improve error messages.
37
19fc9faa
MP
382014-05-02 Marek Polacek <polacek@redhat.com>
39
40 * c-typeck.c (c_finish_return): Separate warning_at calls.
41
63bc4e87
MP
422014-05-02 Marek Polacek <polacek@redhat.com>
43
44 * c-tree.h (error_init): Remove declaration.
45 (pedwarn_init): Likewise.
46 * c-typeck.c (error_init): Make static and move above.
47 (pedwarn_init): Likewise.
48 (warning_init): Move above.
49 (maybe_warn_string_init): Likewise.
50
4bd2511b
JL
512014-05-01 Jeff Law <law@redhat.com>
52
53 Revert:
54
55 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
56 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
57 avoid goto.
58
6a358dcb
MP
592014-05-02 Marek Polacek <polacek@redhat.com>
60
61 PR c/60784
62 * c-typeck.c (push_init_level): Set constructor_designated to
63 p->designated for structures.
64
ae5ebda4
MP
652014-05-01 Marek Polacek <polacek@redhat.com>
66
67 PR c/60915
68 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
69 function-definition has an attribute after the declarator.
70
96b40f8d
MP
712014-05-01 Marek Polacek <polacek@redhat.com>
72
73 PR c/60257
74 * c-typeck.c (warning_init): Add location_t parameter. Call
75 warning_at instead of warning.
76 (push_init_level): Pass input_location to warning_init.
77 (add_pending_init): Add location_t parameter. Pass loc to
78 warning_init.
79 (set_nonincremental_init): Pass input_location to add_pending_init.
80 (set_nonincremental_init_from_string): Likewise.
81 (output_init_element): Pass loc to warning_init and to
82 add_pending_init.
83
32e00768
MP
842014-05-01 Marek Polacek <polacek@redhat.com>
85
86 PR c/43395
87 * c-typeck.c (c_finish_return): Distinguish between label and variable
88 when warning about returning local address.
89
c9379ce2
MP
902014-05-01 Marek Polacek <polacek@redhat.com>
91
92 PR c/29467
93 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
94 in C89 mode.
95
d00887e8
MP
962014-05-01 Marek Polacek <polacek@redhat.com>
97
98 PR c/43245
99 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
100 instead of 0 to WARN_FOR_QUALIFIERS.
101
5436fa2e
MP
1022014-05-01 Marek Polacek <polacek@redhat.com>
103
104 PR c/56989
105 * c-typeck.c (default_conversion): Use better location for
106 error call.
107
f8ed5150
MP
1082014-04-30 Marek Polacek <polacek@redhat.com>
109
110 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
111 also when SANITIZE_FLOAT_DIVIDE is on.
112
8337d1db
MP
1132014-04-30 Marek Polacek <polacek@redhat.com>
114
115 PR c/60139
116 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
117 and pedwarn_init. Use loc insted of input_location.
118
c4bdc42f
MP
1192014-04-30 Marek Polacek <polacek@redhat.com>
120
121 PR c/60351
122 * c-typeck.c (build_binary_op): Use location when warning about
123 shift count.
124
45484dcf
MP
1252014-04-25 Marek Polacek <polacek@redhat.com>
126
127 PR c/18079
128 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
129 always_inline/noinline and hot/cold attributes.
130
34cf811f
MP
1312014-04-25 Marek Polacek <polacek@redhat.com>
132
133 PR c/60114
134 * c-parser.c (c_parser_initelt): Pass input_location to
135 process_init_element.
136 (c_parser_initval): Pass loc to process_init_element.
137 * c-tree.h (process_init_element): Adjust declaration.
138 * c-typeck.c (push_init_level): Pass input_location to
139 process_init_element.
140 (pop_init_level): Likewise.
141 (set_designator): Likewise.
142 (output_init_element): Add location_t parameter. Pass loc to
143 digest_init.
144 (output_pending_init_elements): Pass input_location to
145 output_init_element.
146 (process_init_element): Add location_t parameter. Pass loc to
147 output_init_element.
148
42056eac
JJ
1492014-04-24 Jakub Jelinek <jakub@redhat.com>
150
151 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
152 atomic-clause, allow comma in between atomic-clause and
153 seq_cst.
154
e162a134
JJ
1552014-04-22 Jakub Jelinek <jakub@redhat.com>
156
157 PR c/59073
158 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
159 fails, don't set OM_PARALLEL_COMBINED and return NULL.
160
2f6babac
IZ
1612014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
162
163 PR middle-end/60469
164 * c-array-notation.c (fix_builtin_array_notation_fn): Use
165 create_tmp_var instead build_decl for creating temps.
166 (build_array_notation_expr): Likewise.
167 (fix_conditional_array_notations_1): Likewise.
168 (fix_array_notation_expr): Likewise.
169 (fix_array_notation_call_expr): Likewise.
170
8edbfaa6
JJ
1712014-03-28 Jakub Jelinek <jakub@redhat.com>
172
173 PR c++/60689
174 * c-tree.h (c_build_function_call_vec): New prototype.
175 * c-typeck.c (build_function_call_vec): Don't call
176 resolve_overloaded_builtin here.
177 (c_build_function_call_vec): New wrapper function around
178 build_function_call_vec. Call resolve_overloaded_builtin here.
179 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
180 Call c_build_function_call_vec instead of build_function_call_vec.
181 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
182 * c-decl.c (finish_decl): Likewise.
183
7485aeea
MLI
1842014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
185
186 PR c/55383
187 * c-typeck.c: Use correct format string in cast-qual warning
188
b17a8b07
TS
1892014-03-07 Thomas Schwinge <thomas@codesourcery.com>
190
191 * c-decl.c (c_decl_attributes): Use
192 lang_hooks.types.omp_mappable_type.
193 * c-typeck.c (c_finish_omp_clauses): Likewise.
194
3af9c5e9
MP
1952014-03-06 Marek Polacek <polacek@redhat.com>
196
197 PR c/60197
198 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
199 of checking tree code.
200
1c9f5f33
PK
2012014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
202
203 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
204 (c_parser_parameter_declaration): Likewise.
205
cc28fc7f
MP
2062014-02-19 Marek Polacek <polacek@redhat.com>
207
208 PR c/60195
209 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
210 Call mark_exp_read on exp.value.
211 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
212 TREE_ADDRESSABLE on old instead of val.
213 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
214
b581c05c
PK
2152014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
216
217 * c-parser.c (c_parser_get_builtin_args): Replace calls to
218 C_EXPR_APPEND by vec_safe_push.
219 * c-tree.h (C_EXPR_APPEND): Remove.
220
81e5eca8
MP
2212014-01-31 Marek Polacek <polacek@redhat.com>
222
223 PR c/59963
224 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
225 build_function_call_vec.
226 (build_function_call): Likewise.
227 (build_atomic_assign): Likewise.
228 (build_function_call_vec): Add arg_loc parameter. Use it.
229 (convert_arguments): Likewise.
230 (convert_for_assignment): Rename rhs_loc to expr_loc.
231 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
232 (c_parser_objc_keywordexpr): Likewise.
233 (c_parser_postfix_expression_after_primary): Call
234 build_function_call_vec with expr_loc rather than op_loc.
235 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
236 build_function_call_vec.
237 (c_parser_expr_list): Add locations parameter. Fill it with locations
238 of function arguments.
239 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
240
68fca595
MP
2412014-01-30 Marek Polacek <polacek@redhat.com>
242
243 PR c/59940
244 * c-typeck.c (build_function_call_vec): Use loc parameter.
245 (convert_arguments): Add location parameter. Use it.
246 (ep_convert_and_check): Likewise.
247 (build_atomic_assign): Adjust convert_for_assignment call.
248 (build_modify_expr): Likewise.
249 (digest_init): Likewise.
250 (c_finish_return): Likewise.
251 (build_conditional_expr): Adjust ep_convert_and_check calls.
252 (convert_for_assignment): Add rhs_loc parameter. Use it.
253 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
254 calls.
255
fa337f3a
RB
2562014-01-30 Richard Biener <rguenther@suse.de>
257
258 PR c/59905
259 * c-typeck.c (build_function_call_vec): Do not replace calls
260 to a function via an incompatible type with a runtime abort.
261
b72271b9
BI
2622014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
263
264 * c-parser.c (c_parser_declaration_or_fndef): Replaced
265 flag_enable_cilkplus with flag_cilkplus.
266 (c_parser_direct_declarator_inner): Likewise.
267 (c_parser_attribute_any_word): Likewise.
268 (c_parser_attributes): Likewise.
269 (c_parser_compound_statement): Likewise.
270 (c_parser_statement_after_labels): Likewise.
271 (c_parser_if_statement): Likewise.
272 (c_parser_switch_statement): Likewise.
273 (c_parser_do_statement): Likewise.
274 (c_parser_for_statement): Likewise.
275 (c_parser_unary_expression): Likewise.
276 (c_parser_postfix_expression): Likewise.
277 (c_parser_postfix_expression_after_primary): Likewise.
278 (c_parser_postfix_expression_after_primary): Likewise.
279 (c_parser_omp_clause_name): Likewise.
280 (c_finish_omp_declare_simd): Likewise.
281 (c_parser_cilk_verify_simd): Likewise.
282 * c-typeck.c (build_array_ref): Likewise.
283 (build_function_call_vec): Likewise.
284 (convert_arguments): Likewise.
285 (build_compound_expr): Likewise.
286 (c_finish_return): Likewise.
287 (c_finish_if_stmt): Likewise.
288 (c_finish_loop): Likewise.
289 (build_binary_op): Likewise.
290
393e8e8b
MP
2912014-01-23 Marek Polacek <polacek@redhat.com>
292
293 PR c/59846
294 * c-typeck.c (parser_build_binary_op): Use location instead of
295 input_location.
296 (build_binary_op): Pass location to shorten_compare.
297
f04dda30
MP
2982014-01-23 Marek Polacek <polacek@redhat.com>
299
300 PR c/58346
301 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
302 an empty aggregate.
303
789eadcd
MP
3042014-01-23 Marek Polacek <polacek@redhat.com>
305
306 PR c/59871
307 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
308 of a comma expression.
309 (emit_side_effect_warnings): Likewise.
310
40f14e9f
BI
3112014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
312
313 PR c/59825
314 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
315 function to use walk_tree and moved a lot of its functionality to
316 expand_array_notations.
317 (expand_array_notations): New function.
318
74558dd9
BI
3192014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
320
321 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
322 attribute an attribute without value.
323
652fea39
JJ
3242014-01-23 Jakub Jelinek <jakub@redhat.com>
325
326 PR middle-end/58809
327 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
328 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
329
f34f1c87
MP
3302014-01-22 Marek Polacek <polacek@redhat.com>
331
332 PR c/59891
333 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
334 of remove_c_maybe_const_expr on op1 and op2.
335
241f845a
JJ
3362014-01-15 Jakub Jelinek <jakub@redhat.com>
337
338 PR c/58943
339 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
340 effects, preevaluate rhs using SAVE_EXPR first.
341
9a74f20c
BI
3422014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
343
344 PR c++/59631
345 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
346 statements with if-elseif statements.
347
96066ce1
MP
3482014-01-06 Marek Polacek <polacek@redhat.com>
349
350 PR c/57773
351 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
352 defined bit-field types only in ISO C.
353
23a5b65a
RS
3542014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
355
356 Update copyright years
357
f9030485
RS
3582014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
359
360 * c-array-notation.c: Use the standard form for the copyright notice.
361
41958c28
BI
3622013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
363
364 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
365 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
366 field in parser is not empty. If not-empty, call the function
367 c_parser_finish_omp_declare_simd.
368 (c_parser_cilk_clause_vectorlength): Modified function to be shared
369 between SIMD-enabled functions and #pragma simd. Added new parameter.
370 (c_parser_cilk_all_clauses): Modified the usage of the function
371 c_parser_cilk_clause_vectorlength as mentioned above.
372 (c_parser_cilk_simd_fn_vector_attrs): New function.
373 (c_finish_cilk_simd_fn_tokens): Likewise.
374 (is_cilkplus_vector_p): Likewise.
375 (c_parser_omp_clause_name): Added checking for "vectorlength,"
376 "nomask," and "mask" strings in clause name.
377 (c_parser_omp_all_clauses): Added 3 new case statements:
378 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
379 PRAGMA_CILK_CLAUSE_NOMASK.
380 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
381 check for vector attribute and if so call the function
382 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
383 called the function c_finish_cilk_simd_fn_tokens.
384 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
385 parser field is non-empty. If so, parse them as you would parse
386 the omp declare simd pragma.
387 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
388 Added a check when step is a parameter and flag it as error.
389 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
390 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
391 pragma_omp_clause.
392
cef0fd0e
TS
3932013-12-17 Thomas Schwinge <thomas@codesourcery.com>
394
395 * c-parser.c (c_parser_omp_parallel): Fix description.
396
12893402
BI
3972013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
398
399 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
400 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
401 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
402 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
403
296674db
JM
4042013-12-04 Joseph Myers <joseph@codesourcery.com>
405
406 PR c/52023
407 * c-parser.c (c_parser_alignas_specifier): Use
408 c_sizeof_or_alignof_type instead of c_alignof.
409 (c_parser_alignof_expression): Likewise, with min_alignof
410 parameter depending on alignof spelling used.
411
edd28054
MP
4122013-12-04 Marek Polacek <polacek@redhat.com>
413
414 PR c/54113
415 * c-decl.c (start_function): Don't warn for missing prototype for
416 inline functions.
417
da0fc454
MP
4182013-12-03 Marek Polacek <polacek@redhat.com>
419
420 PR c/59351
421 * c-decl.c (build_compound_literal): Allow compound literals with
422 empty initial value.
423
4c2ecab0
JM
4242013-12-02 Joseph Myers <joseph@codesourcery.com>
425
426 PR c/58235
427 * c-typeck.c (build_modify_expr): Diagnose assignment to
428 expression with array type.
429
340baef7
JM
4302013-11-29 Joseph Myers <joseph@codesourcery.com>
431
432 PR c/42262
433 * c-typeck.c (process_init_element): Do not treat a string as
434 initializing a whole array when used with a designator for an
435 individual element.
436
6763b9f7
JM
4372013-11-29 Joseph Myers <joseph@codesourcery.com>
438
439 PR c/57574
440 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
441 an inline function following a static declaration.
442
e7bd1de1
JJ
4432013-11-28 Jakub Jelinek <jakub@redhat.com>
444
445 PR c/59310
446 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
447 to p_name before calling c_parser_omp_teams instead of after.
448 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
449 argument. Remove unused p_name variable.
450
0136f8f0
AH
4512013-11-27 Aldy Hernandez <aldyh@redhat.com>
452 Jakub Jelinek <jakub@redhat.com>
453
454 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
455 external_scope is NULL.
456
241b71bb
TV
4572013-11-27 Tom de Vries <tom@codesourcery.com>
458 Marc Glisse <marc.glisse@inria.fr>
459
460 PR c++/59032
461 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
462
2fb9a547
AM
4632013-11-22 Andrew MacLeod <amacleod@redhat.com>
464
465 * c-typeck.c: Add required include files from gimple.h.
466
8400e75e
DM
4672013-11-22 David Malcolm <dmalcolm@redhat.com>
468
469 * c-decl.c (define_label, shadow_tag_warned)
470 (check_bitfield_type_and_width, grokdeclarator, grokparms,
471 store_parm_decls_newstyle, store_parm_decls_oldstyle)
472 (declspecs_add_type): Remove use of in_system_header macro.
473 * c-parser.c (c_parser_unary_expression): Likewise.
474 * c-typeck.c (store_init_value, process_init_element)
475 (c_start_case): Likewise.
476
477 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
478 macro.
479
480 * c-parser.c (c_parser_set_source_position_from_token): Remove
481 reference to in_system_header from comment.
482
386b1f1f
RS
4832013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
484
485 * c-decl.c (grokdeclarator): Update comment to refer to
486 tree_to_[su]hwi rather than tree_low_cst.
487
ae7e9ddd
RS
4882013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
489
490 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
491 tree_to_uhwi throughout.
492
9439e9a1
RS
4932013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
494
495 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
496 throughout.
497
9541ffee
RS
4982013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
499
500 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
501 throughout.
502
c02065fc
AH
5032013-11-15 Aldy Hernandez <aldyh@redhat.com>
504
505 * c-parser.c (c_parser_cilk_simd): New.
506 (c_parser_cilk_verify_simd): New.
507 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
508 (c_parser_omp_for_loop): Add case for NE_EXPR.
509 Set c_break_label for CILK_SIMD.
510 (c_parser_cilk_clause_vectorlength): New.
511 (c_parser_cilk_clause_linear): New.
512 (c_parser_cilk_clause_name): New.
513 (c_parser_cilk_all_clauses): New.
514 * c-typeck.c (build_unary_op): Pass location argument to
515 readonly_error.
516 (build_modify_expr): Same.
517 (build_asm_expr): Same.
518 (c_finish_bc_stmt): Error on break/continue in loops.
519
18f429e2
AM
5202013-11-14 Andrew MacLeod <amacleod@redhat.com>
521
522 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
523
d8a2d370
DN
5242013-11-14 Diego Novillo <dnovillo@google.com>
525
526 * c-decl.c: Include print-tree.h.
527 Include stor-layout.h.
528 Include varasm.h.
529 Include attribs.h.
530 Include stringpool.h.
531 * c-lang.c: Include fold-const.h.
532 * c-parser.c: Include stringpool.h.
533 Include attribs.h.
534 Include stor-layout.h.
535 Include varasm.h.
536 Include trans-mem.h.
537 * c-typeck.c: Include stor-layout.h.
538 Include trans-mem.h.
539 Include varasm.h.
540 Include stmt.h.
541
38b7bc7f
JM
5422013-11-13 Joseph Myers <joseph@codesourcery.com>
543
544 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
545 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
546 __auto_type.
547 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
548 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
549 RID_AUTO_TYPE.
550 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
551 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
552 (c_parser_declarator, c_parser_direct_declarator_inner)
553 (c_parser_parameter_declaration, c_parser_type_name): All callers
554 changed.
555 (c_parser_declaration_or_fndef): Handle declarations with type
556 determined from the initializer.
557
45b0be94
AM
5582013-11-12 Andrew MacLeod <amacleod@redhat.com>
559
18f429e2 560 * c-typeck.c: Include gimplify.h.
45b0be94 561
582d9b50
JM
5622013-11-12 Joseph Myers <joseph@codesourcery.com>
563
564 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
565 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
566 comment.
567 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
568 or _Thread_local as appropriate in diagnostics.
569 (build_null_declspecs): Initialize ret->thread_gnu_p.
570 (declspecs_add_scspec): Handle either __thread or _Thread_local
571 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
572 pedantic. Do not disallow _Thread_local extern and _Thread_local
573 static.
574
267bac10
JM
5752013-11-07 Joseph Myers <joseph@codesourcery.com>
576 Andrew MacLeod <amacleod@redhat.com>
577
578 * c-aux-info.c (gen_type): Handle atomic qualifier.
579 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
580 qualifiers when compating types.
581 (shadow_tag_warned): Handle atomic_p in declspecs.
582 (quals_from_declspecs): Likewise.
583 (start_decl): Use c_type_promotes_to when promoting argument
584 types.
585 (grokdeclarator): Handle _Atomic.
586 (get_parm_info): Diagnose any qualifier on "void" as only
587 parameter.
588 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
589 comparing types. Use c_type_promotes_to when promoting argument
590 types.
591 (finish_function): Use c_type_promotes_to when promoting argument
592 types.
593 (build_null_declspecs): Handle atomic_p in declspecs.
594 (declspecs_add_qual): Handle RID_ATOMIC.
595 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
596 (c_token_starts_declspecs): Handle RID_ATOMIC.
597 (c_parser_declspecs): Handle atomic type specifiers and
598 qualifiers.
599 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
600 from types of expressions with atomic type.
601 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
602 (c_parser_attribute_any_word): Handle RID_ATOMIC.
603 (c_parser_initializer, c_parser_initelt, c_parser_initval)
604 (c_parser_statement_after_labels, c_parser_switch_statement)
605 (c_parser_for_statement, c_parser_expr_no_commas)
606 (c_parser_conditional_expression, c_parser_binary_expression)
607 (c_parser_cast_expression, c_parser_unary_expression)
608 (c_parser_postfix_expression)
609 (c_parser_postfix_expression_after_primary, c_parser_expression):
610 Use convert_lvalue_to_rvalue.
611 (c_parser_expression_conv, c_parser_expr_list): Document
612 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
613 (c_parser_objc_synchronized_statement): Use
614 convert_lvalue_to_rvalue.
615 (c_parser_objc_selector): Handle RID_ATOMIC.
616 (c_parser_objc_receiver, c_parser_array_notation): Use
617 convert_lvalue_to_rvalue.
618 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
619 _Atomic (type-name).
620 (struct c_declspecs): Add atomic_p field.
621 (convert_lvalue_to_rvalue): Declare.
622 * c-typeck.c (c_type_promotes_to): Promote atomic types to
623 corresponding atomic types.
624 (qualify_type): Don't add _Atomic qualifiers from second argument.
625 (comp_target_types): Do not allow _Atomic mismatches.
626 (type_lists_compatible_p): Do not remove atomic qualifiers when
627 comparing types.
628 (really_atomic_lvalue, convert_lvalue_to_rvalue)
629 (build_atomic_assign): New functions.
630 (build_unary_op): Use build_atomic_assign for atomic increment and
631 decrement.
632 (build_conditional_expr): Do not treat _Atomic void as a qualified
633 version of void.
634 (build_modify_expr): Use build_atomic_assign for atomic LHS.
635 (find_anonymous_field_with_type, convert_to_anonymous_field)
636 (convert_for_assignment): Do not remove atomic qualifiers when
637 comparing types.
638 (digest_init): Do not accept initialization of arrays of atomic
639 elements by string constants.
640 (build_asm_expr): Use convert_lvalue_to_rvalue.
641 (build_binary_op): Do not treat _Atomic void as a qualified
642 version of void.
643
0c249d4b
DD
6442013-11-06 DJ Delorie <dj@redhat.com>
645
646 * c-decl.c (locate_old_decl): If a previous conflicting decl is
647 both explicit and builtin, print the location of the explicit one.
648
6d7f7e0a
TB
6492013-11-05 Tobias Burnus <burnus@net-b.de>
650
651 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
652 c_parser_omp_distribute, c_parser_omp_teams,
653 c_parser_omp_target, c_parser_omp_declare): Handle
654 -fopenmp-simd.
655
b906f4ca
MP
6562013-11-03 Marek Polacek <polacek@redhat.com>
657
658 * c-decl.c (grokdeclarator): Add VLA instrumentation.
659
ee1d5a02
JJ
6602013-11-01 Jakub Jelinek <jakub@redhat.com>
661
662 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
663 check_dup_generic at the end, unless remove is true.
664 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
665 remove = true;.
666 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
667
5a9785fb
JJ
6682013-10-31 Jakub Jelinek <jakub@redhat.com>
669
670 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
671 with decl that is not pointer nor array.
672
939b37da
BI
6732013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
674
675 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
676 a spawning function is found.
677 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
678 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
679 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
680 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
681 case.
682 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
683 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
684 expr.
685 (c_finish_return): Added a check to reject _Cilk_spawn in return
686 expression.
687 (build_cilk_spawn): New function.
688 (build_cilk_sync): Likewise.
689 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
690
d4af74d4
TB
6912013-10-27 Tobias Burnus <burnus@net-b.de>
692
693 PR other/33426
694 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
695 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
696 (c_parser_statement_after_labels): Update calls.
697
d73749df 6982013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
699
700 PR other/33426
701 * c-parser.c (c_parser_pragma, c_parser_for_statement):
702 Handle PRAGMA_IVDEP.
703 (c_parser_statement_after_labels): Update call.
704
f28aa681
MP
7052013-10-24 Marek Polacek <polacek@redhat.com>
706
707 * c-parser.c (c_parser_struct_declaration): Add a comment.
708 (c_parser_declarator): Don't allow _Alignas here.
709
0645c1a2
AM
7102013-10-17 Andrew MacLeod <amacleod@redhat.com>
711
712 * c-parser.c: Include omp-low.h.
713 * c-typeck.c: Likewise.
714
568a31f2
MP
7152013-10-17 Marek Polacek <polacek@redhat.com>
716
717 PR c/58267
718 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
719 Document syntax of the array-declarator.
720 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
721 are not permitted.
722 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
723 (c_parser_struct_declaration): Likewise.
724 (c_parser_declarator): Likewise.
725 (c_parser_direct_declarator_inner): Likewise.
726 (c_parser_parameter_declaration): Likewise.
727 (c_parser_type_name): Likewise.
728
acf0174b
JJ
7292013-10-11 Jakub Jelinek <jakub@redhat.com>
730
731 * c-lang.h (current_omp_declare_target_attribute): New extern
732 decl.
733 * c-parser.c: Include c-lang.h.
734 (struct c_parser): Change tokens to c_token *.
735 Add tokens_buf field. Change tokens_avail type to unsigned int.
736 (c_parser_consume_token): If parser->tokens isn't
737 &parser->tokens_buf[0], increment parser->tokens.
738 (c_parser_consume_pragma): Likewise.
739 (enum pragma_context): Add pragma_struct and pragma_param.
740 (c_parser_external_declaration): Adjust
741 c_parser_declaration_or_fndef caller.
742 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
743 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
744 Adjust recursive call.
745 (c_parser_struct_or_union_specifier): Use pragma_struct instead
746 of pragma_external.
747 (c_parser_parameter_declaration): Use pragma_param instead of
748 pragma_external.
749 (c_parser_compound_statement_nostart, c_parser_label,
750 c_parser_for_statement): Adjust
751 c_parser_declaration_or_fndef callers.
752 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
753 it through to c_parser_conditional_expression.
754 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
755 pass it through to c_parser_binary_expression. Adjust recursive
756 call.
757 (c_parser_binary_expression): Remove prec argument, add
758 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
759 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
760 binop matches it, use build2 instead of parser_build_binary_op.
761 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
762 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
763 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
764 Handle pragma_struct and pragma_param the same as pragma_external.
765 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
766 (c_parser_omp_variable_list): Parse array sections for
767 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
768 (c_parser_omp_clause_collapse): Fully fold collapse expression.
769 (c_parser_omp_clause_reduction): Handle user defined reductions.
770 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
771 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
772 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
773 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
774 c_parser_omp_clause_depend, c_parser_omp_clause_map,
775 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
776 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
777 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
778 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
779 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
780 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
781 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
782 (c_parser_omp_for_loop): Add CODE argument, pass it through
783 to c_finish_omp_for. Change last argument to cclauses,
784 and adjust uses to grab parallel clauses from the array of all
785 the split clauses. Adjust c_parser_binary_expression,
786 c_parser_declaration_or_fndef and c_finish_omp_for callers.
787 (omp_split_clauses): New function.
788 (c_parser_omp_simd): New function.
789 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
790 Allow the function to be called also when parsing combined constructs,
791 and call c_parser_omp_simd when parsing for simd.
792 (c_parser_omp_sections_scope): If section-sequence doesn't start with
793 #pragma omp section, require exactly one structured-block instead of
794 sequence of statements.
795 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
796 Allow the function to be called also when parsing combined constructs.
797 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
798 Allow the function to be called also when parsing combined
799 constructs.
800 (c_parser_omp_taskgroup, c_parser_omp_cancel,
801 c_parser_omp_cancellation_point, c_parser_omp_distribute,
802 c_parser_omp_teams, c_parser_omp_target_data,
803 c_parser_omp_target_update, c_parser_omp_target,
804 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
805 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
806 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
807 (c_parser_omp_construct): Add p_name and mask vars. Handle
808 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
809 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
810 and c_parser_omp_sections callers.
811 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
812 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
813 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
814 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
815 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
816 OMP_CLAUSE_DEPEND.
817 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
818 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
819 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
820 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
821 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
822 * c-typeck.c: Include tree-inline.h.
823 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
824 handle_omp_array_sections_1, handle_omp_array_sections,
825 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
826 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
827 user defined reductions.
828 (c_tree_equal): New function.
829 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
830 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
831 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
832 c_check_omp_declare_reduction_r): New prototypes.
833 * c-decl.c (current_omp_declare_target_attribute): New variable.
834 (c_decl_attributes): New function.
835 (start_decl, start_function): Use it instead of decl_attributes.
836 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
837 c_omp_reduction_decl, c_omp_reduction_lookup,
838 c_check_omp_declare_reduction_r): New functions.
839
0a6c2227
TT
8402013-09-25 Tom Tromey <tromey@redhat.com>
841
842 * Make-lang.in (c/gccspec.o): Remove.
843 (CFLAGS-c/gccspec.o): New variable.
844 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
845 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
846 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
847
f3bc55f0
TT
8482013-09-25 Tom Tromey <tromey@redhat.com>
849
850 * Make-lang.in (c/gccspec.o): Don't use subshell.
851
a24d975c
MP
8522013-09-18 Marek Polacek <polacek@redhat.com>
853
854 PR sanitize/58443
855 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
856 Remove unnecessary check.
857
ce6923c5
MP
8582013-09-18 Marek Polacek <polacek@redhat.com>
859
860 PR sanitizer/58411
861 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
862 no_sanitize_undefined attribute.
863
a1e51df9
KT
8642013-09-13 Kai Tietz <ktietz@redhat.com>
865
866 PR target/57848
867 * c-decl.c (c_builtin_function_ext_scope): Remove
868 wrong assumption that it is never called on prexisting
869 symbol.
870
0af94e6f
JR
8712013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
872
873 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
874
20059c8b
GDR
8752013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
876
877 * c-objc-common.c (c_tree_printer): Tidy.
878
de5a5fa1
MP
8792013-08-30 Marek Polacek <polacek@redhat.com>
880
881 * c-typeck.c (build_binary_op): Add division by zero and shift
882 instrumentation.
883
2531a1d9 8842013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 885 Joseph Myers <joseph@codesourcery.com>
2531a1d9 886
6e2bcc98 887 PR c/35649
2531a1d9
JR
888 * c-typeck.c (c_common_type): Prefer double_type_node over
889 other REAL_TYPE types with the same precision.
890 (convert_arguments): Likewise.
891
025311c4
GDR
8922013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
893
894 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
895 (c_initialize_diagnostics): Call a destructor for the early printer.
896
da6ca2b5
GDR
8972013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
898
899 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
900 printer initialization.
901
318cda85 9022013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 903
318cda85
BI
904 PR c/57490
905 * c-array-notation.c (fix_conditional_array_notations_1): Added a
906 check for truth values.
907 (expand_array_notation_exprs): Added truth values case. Removed an
908 unwanted else. Added for-loop to walk through subtrees in default
909 case.
910
b066401f
GDR
9112013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
912
913 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
914
fb48aadc
JM
9152013-07-23 Joseph Myers <joseph@codesourcery.com>
916
917 * c-parser.c (struct c_generic_association): Fix typo.
918
433cc7b0
TT
9192013-07-23 Tom Tromey <tromey@redhat.com>
920 Joseph Myers <joseph@codesourcery.com>
921
922 * c-parser.c (struct c_generic_association): New.
923 (c_generic_association_d): New typedef.
924 (c_parser_generic_selection): New function.
925 (c_parser_postfix_expression): Handle RID_GENERIC.
926
26d40c3d
JM
9272013-07-13 Jason Merrill <jason@redhat.com>
928
929 PR c++/57793
930 * c-decl.c (finish_struct): Check for too-large class.
931
ecdbd01a 9322013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
933
934 PR c/57821
935 * c-typeck.c (set_init_index): When folding, check for index overflow.
936
1141ed3f
BI
9372013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
938
939 * c-parser.c (c_parser_array_notation): Removed rejection of array
940 notations in an array of function pointers.
941
713b46fa
BI
9422013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
943
944 * c-array-notation.c (make_triplet_val_inv): New function.
945 (create_cmp_incr): Likewise.
946 (create_array_refs): Likewise.
947 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
948 Also modularized common parts between functions and called the function.
949 (build_array_notation_expr): Likewise.
950 (fix_conditional_array_notations_1): Likewise.
951 (fix_array_notation_expr): Likewise.
952 (fix_array_notation_call_expr): Likewise.
953
92f20202
MP
9542013-06-18 Marek Polacek <polacek@redhat.com>
955
956 PR c/57630
957 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
958
73a23b06
BI
9592013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
960
961 * c-array-notation.c (build_array_notation_expr): Reject array notation
962 mismatch between LHS and RHS even inside a call_expr. Also, removed
963 a couple while statements that were dead code.
964
00b8517d
BI
9652013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
966
967 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
968 excessive precision expressions in function parameters. Also removed
969 couple unwanted while statements.
970
1509bdda
BI
9712013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
972
973 * c-array-notation.c (expand_array_notation_exprs): Added
974 ARRAY_NOTATION_REF case.
975
d60f1706
BI
9762013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
977
978 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
979 function to c-family/array-notation-common.c.
980 (is_cilkplus_reduce_builtin): Likewise.
981 (find_rank): Likewise.
982 (extract_array_notation_exprs): Likewise.
983 (replace_array_notations): Likewise.
984 (find_inv_trees): Likewise.
985 (replace_inv_trees): Likewise.
986 (contains_array_notation_expr): Likewise.
987 (find_correct_array_notation_type): Likewise.
988 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
989 (struct inv_list): Moved this to c-family/array-notation-common.c.
990 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
991
6d6efbb3
BI
9922013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
993
994 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
995 reduction functions outside the for-loop. Added a check if the fundecl
996 is non-NULL. Finally, removed an unwanted if-statement, and made the
997 body unconditional.
998
25c22937
BI
9992013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
1000
1001 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
1002 condition of the if-statement matches the rank of else-block and then-
1003 block when array notations are used.
1004 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
1005 expression after the entire function body is parsed.
1006 (c_parser_expr_no_commas): Delayed creating array notation expressions
1007 to the end of function parsing.
1008 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
1009 whole if-statement instead of just the condition.
1010 (expand_array_notation_exprs): Added MODIFY_EXPR case.
1011
edd25645
BI
10122013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
1013
1014 PR c/57474
1015 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
1016 array to NULL_TREE if they are unused. Also added a check for the
1017 field to be NULL before its fields are used in future.
1018
065ce7f1
RO
10192013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1020
1021 PR bootstrap/57450
1022 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
1023 (build_array_notation_expr): Likewise.
1024
36536d79
BI
10252013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
1026
1027 * c-typeck.c (build_array_ref): Added a check to see if array's
1028 index is greater than one. If true, then emit an error.
1029 (build_function_call_vec): Exclude error reporting and checking
1030 for builtin array-notation functions.
1031 (convert_arguments): Likewise.
1032 (c_finish_return): Added a check for array notations as a return
1033 expression. If true, then emit an error.
1034 (c_finish_loop): Added a check for array notations in a loop
1035 condition. If true then emit an error.
1036 (lvalue_p): Added a ARRAY_NOTATION_REF case.
1037 (build_binary_op): Added a check for array notation expr inside
1038 op1 and op0. If present, we call another function to find correct
1039 type.
1040 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
1041 * c-parser.c (c_parser_compound_statement): Check if array
1042 notation code is used in tree, if so, then transform them into
1043 appropriate C code.
1044 (c_parser_expr_no_commas): Check if array notation is used in LHS
1045 or RHS, if so, then build array notation expression instead of
1046 regular modify.
1047 (c_parser_postfix_expression_after_primary): Added a check for
1048 colon(s) after square braces, if so then handle it like an array
1049 notation. Also, break up array notations in unary op if found.
1050 (c_parser_direct_declarator_inner): Added a check for array
1051 notation.
1052 (c_parser_compound_statement): Added a check for array notation in
1053 a stmt. If one is present, then expand array notation expr.
1054 (c_parser_if_statement): Likewise.
1055 (c_parser_switch_statement): Added a check for array notations in
1056 a switch statement's condition. If true, then output an error.
1057 (c_parser_while_statement): Similarly, but for a while.
1058 (c_parser_do_statement): Similarly, but for a do-while.
1059 (c_parser_for_statement): Similarly, but for a for-loop.
1060 (c_parser_unary_expression): Check if array notation is used in a
1061 pre-increment or pre-decrement expression. If true, then expand
1062 them.
1063 (c_parser_array_notation): New function.
1064 * c-array-notation.c: New file.
1065 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
1066
cd192ccc
MS
10672013-05-23 Mike Stump <mikestump@comcast.net>
1068
1069 * c-typeck.c (convert_for_assignment): Handle references to memory
1070 spaces better.
1071
427b248d
JM
10722013-05-16 Jason Merrill <jason@redhat.com>
1073
1074 * Make-lang.in (cc1$(exeext)): Use link mutex.
1075
44d90fe1
PC
10762013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
1077
1078 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
1079 to simply use OPT_Wpointer_arith.
1080 (build_unary_op): Likewise.
1081
4e7d7b3d
JJ
10822013-04-03 Jakub Jelinek <jakub@redhat.com>
1083
1084 PR c/19449
1085 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
1086 argument. If set, or it temporarily for parsing of the first
1087 argument into force_folding_builtin_constant_p.
1088 (c_parser_postfix_expression): Adjust callers.
1089
839b422f
RB
10902013-03-21 Richard Biener <rguenther@suse.de>
1091
1092 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
1093 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
1094
2ee028f1
MP
10952013-02-12 Marek Polacek <polacek@redhat.com>
1096
1097 PR c/44938
1098 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
1099 origtypes to NULL.
1100
8824edff
JJ
11012013-01-24 Jakub Jelinek <jakub@redhat.com>
1102
1103 PR c/56078
1104 * c-typeck.c (set_nonincremental_init_from_string): If
1105 constructor_max_index is NULL, treat it as if tree_int_cst_lt
1106 returned false.
1107 (process_init_element): Likewise.
1108
eadd3d0d
JJ
11092012-12-20 Jakub Jelinek <jakub@redhat.com>
1110
1111 PR c++/55619
1112 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
1113 argument, don't call default_function_array_conversion
1114 nor c_fully_fold here.
1115 (c_parser_asm_statement): Adjust callers.
1116 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
1117 and outputs here, and call default_function_array_conversion
1118 on inputs that don't need to be addressable.
1119
f8a93a2e
JJ
11202012-12-18 Jakub Jelinek <jakub@redhat.com>
1121
1122 PR c/39464
1123 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
1124 warning require that both c_common_unsigned_type as well as
1125 c_common_signed_type is the same for both mvl and mvr types.
1126
9771b263
DN
11272012-11-16 Diego Novillo <dnovillo@google.com>
1128
1129 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
1130
1131 * c-common.c: Use new vec API in vec.h.
1132 * c-common.h: Likewise.
1133 * c-gimplify.c: Likewise.
1134 * c-pragma.c: Likewise.
1135 * c-pretty-print.c: Likewise.
1136 * c-pretty-print.h: Likewise.
1137 * c-semantics.c: Likewise.
1138 * c-decl.c: Likewise.
1139 * c-parser.c: Likewise.
1140 * c-tree.h: Likewise.
1141 * c-typeck.c: Likewise.
1142
880661a4
JW
11432012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
1144
1145 PR c++/54930
1146 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
1147
077d1abe
MLI
11482012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1149
1150 PR c/53066
1151 * c-decl.c (warn_if_shadowing): Do not warn if a variable
1152 shadows a function, unless the variable is a function or a
1153 pointer-to-function.
1154
3a785c97
JJ
11552012-10-12 Jakub Jelinek <jakub@redhat.com>
1156
1157 PR c/54381
1158 * c-parser.c (struct c_tree_loc_pair): Removed.
1159 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
1160 add location_t * and tree * arguments, fill in array of 3
1161 sizeof_arg trees and corresponding locs.
1162 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
1163 c_parser_expr_list callers.
1164 (c_parser_postfix_expression_after_primary): Likewise. Pass
1165 array of 3 sizeof_arg trees and locs (corresponding to first
1166 3 arguments) to sizeof_pointer_memaccess_warning.
1167
703c8606
LC
11682012-10-09 Lawrence Crowl <crowl@google.com>
1169
1170 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
1171 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
1172 hash table.
1173
5d9de0d0
PC
11742012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
1175
1176 PR c++/54194
1177 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
1178 call.
1179
a212e43f
MG
11802012-10-09 Marc Glisse <marc.glisse@inria.fr>
1181
1182 PR c++/54427
1183 * c-typeck.c: Include c-common.h.
1184 (enum stv_conv): Moved to c-common.h.
1185 (scalar_to_vector): Moved to c-common.c.
1186 (build_binary_op): Adapt to scalar_to_vector's new prototype.
1187 * Make-lang.in: c-typeck.c depends on c-common.h.
1188
3b78de56
AC
11892012-10-04 Arnaud Charlet <charlet@adacore.com>
1190
1191 * c-decl.c (c_write_global_declarations): Fix handling of
1192 -fdump-ada-spec*.
1193
78c60e3d
SS
11942012-09-30 Sharad Singhai <singhai@google.com>
1195
1196 * c-decl.c (c_write_global_declarations): Use a different method
1197 to determine if the dump has ben initialized.
1198
9f33203d
JM
11992012-09-14 Joseph Myers <joseph@codesourcery.com>
1200
1201 PR c/54552
1202 * c-typeck.c (c_cast_expr): When casting to a type requiring
1203 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
1204 c_fully_fold first.
1205
a27d595d
JM
12062012-09-14 Joseph Myers <joseph@codesourcery.com>
1207
1208 PR c/54103
1209 * c-typeck.c (build_unary_op): Pass original argument of
1210 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
1211 any C_MAYBE_CONST_EXPR, if it has integer operands.
1212 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
1213 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
1214 to c_objc_common_truthvalue_conversion, then remove any
1215 C_MAYBE_CONST_EXPR, if they have integer operands. Use
1216 c_objc_common_truthvalue_conversion not
1217 c_common_truthvalue_conversion.
1218 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
1219 call note_integer_operands for arguments with integer operands
1220 that are not integer constants.
1221
9feb29df
JJ
12222012-09-13 Jakub Jelinek <jakub@redhat.com>
1223
1224 PR c/54559
1225 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
1226 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
1227
d409320c
JJ
12282012-08-31 Jakub Jelinek <jakub@redhat.com>
1229
1230 PR c/54428
1231 * c-convert.c (convert): Don't call fold_convert_loc if
1232 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
1233 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
1234 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
1235
6265d07c
JJ
12362012-08-24 Jakub Jelinek <jakub@redhat.com>
1237
1238 PR c/54355
1239 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
1240 for nested and empty_ok arguments in the call to
1241 c_parser_declaration_or_fndef.
1242
1a4049e7
JJ
12432012-08-17 Jakub Jelinek <jakub@redhat.com>
1244
1245 * c-tree.h (c_last_sizeof_arg): Declare.
1246 * c-parser.c (struct c_tree_loc_pair): New type.
1247 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
1248 non-NULL.
1249 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
1250 (c_parser_postfix_expression_after_primary): Likewise. Call
1251 sizeof_pointer_memaccess_warning if needed.
1252 (sizeof_ptr_memacc_comptypes): New function.
1253 * c-typeck.c (c_last_sizeof_arg): New global variable.
1254 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
1255
0229aee9
UB
12562012-07-24 Uros Bizjak <ubizjak@gmail.com>
1257
1258 * c-lang.h (lang_decl): Add variable_size GTY option.
1259
7ee2468b
SB
12602012-07-16 Steven Bosscher <steven@gcc.gnu.org>
1261
1262 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
1263 * Make-lang.in: Fix dependencies.
1264
d4a10d0a
SB
12652012-06-29 Steven Bosscher <steven@gcc.gnu.org>
1266
1267 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
1268 and add language Makefile hooks.
1269 * config-lang.in: New file.
1270 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
1271 add the required "normal" config-lang.in rules.
1272 * c-lang.h: Moved from gcc/ to here.
1273 * c-tree.h: Likewise.
1274 * c-objc-common.c: Likewise.
1275 * c-objc-common.h: Likewise.
1276 * c-typeck.c: Likewise.
1277 * c-convert.c: Likewise.
1278 * c-lang.c: Likewise.
1279 * c-aux-info.c: Likewise.
1280 * c-errors.c: Likewise.
1281 * gccspec.c: Likewise.
1282 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
1283 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
1284\f
23a5b65a 1285Copyright (C) 2012-2014 Free Software Foundation, Inc.
d4a10d0a
SB
1286
1287Copying and distribution of this file, with or without modification,
1288are permitted in any medium without royalty provided the copyright
1289notice and this notice are preserved.
This page took 0.615263 seconds and 5 git commands to generate.