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