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