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