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