]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
2014-05-01 Jeff Law <law@redhat.com>
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
de548fe5 12014-05-01 Marek Polacek <polacek@redhat.com>
2
3 PR c/60915
4 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
5 function-definition has an attribute after the declarator.
6
053a0ded 72014-05-01 Marek Polacek <polacek@redhat.com>
8
9 PR c/60257
10 * c-typeck.c (warning_init): Add location_t parameter. Call
11 warning_at instead of warning.
12 (push_init_level): Pass input_location to warning_init.
13 (add_pending_init): Add location_t parameter. Pass loc to
14 warning_init.
15 (set_nonincremental_init): Pass input_location to add_pending_init.
16 (set_nonincremental_init_from_string): Likewise.
17 (output_init_element): Pass loc to warning_init and to
18 add_pending_init.
19
694296f2 202014-05-01 Marek Polacek <polacek@redhat.com>
21
22 PR c/43395
23 * c-typeck.c (c_finish_return): Distinguish between label and variable
24 when warning about returning local address.
25
86bbd7f9 262014-05-01 Marek Polacek <polacek@redhat.com>
27
28 PR c/29467
29 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
30 in C89 mode.
31
e4ab2ef3 322014-05-01 Marek Polacek <polacek@redhat.com>
33
34 PR c/43245
35 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
36 instead of 0 to WARN_FOR_QUALIFIERS.
37
ca3999cb 382014-05-01 Marek Polacek <polacek@redhat.com>
39
40 PR c/56989
41 * c-typeck.c (default_conversion): Use better location for
42 error call.
43
52cc0072 442014-04-30 Marek Polacek <polacek@redhat.com>
45
46 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
47 also when SANITIZE_FLOAT_DIVIDE is on.
48
af379dd3 492014-04-30 Marek Polacek <polacek@redhat.com>
50
51 PR c/60139
52 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
53 and pedwarn_init. Use loc insted of input_location.
54
b069c2a0 552014-04-30 Marek Polacek <polacek@redhat.com>
56
57 PR c/60351
58 * c-typeck.c (build_binary_op): Use location when warning about
59 shift count.
60
4a026b48 612014-04-25 Marek Polacek <polacek@redhat.com>
62
63 PR c/18079
64 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
65 always_inline/noinline and hot/cold attributes.
66
adc93f31 672014-04-25 Marek Polacek <polacek@redhat.com>
68
69 PR c/60114
70 * c-parser.c (c_parser_initelt): Pass input_location to
71 process_init_element.
72 (c_parser_initval): Pass loc to process_init_element.
73 * c-tree.h (process_init_element): Adjust declaration.
74 * c-typeck.c (push_init_level): Pass input_location to
75 process_init_element.
76 (pop_init_level): Likewise.
77 (set_designator): Likewise.
78 (output_init_element): Add location_t parameter. Pass loc to
79 digest_init.
80 (output_pending_init_elements): Pass input_location to
81 output_init_element.
82 (process_init_element): Add location_t parameter. Pass loc to
83 output_init_element.
84
85d2d1a8 852014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
86
87 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
88 avoid goto.
89
e1029911 902014-04-24 Jakub Jelinek <jakub@redhat.com>
91
92 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
93 atomic-clause, allow comma in between atomic-clause and
94 seq_cst.
95
9f0a7bc6 962014-04-22 Jakub Jelinek <jakub@redhat.com>
97
98 PR c/59073
99 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
100 fails, don't set OM_PARALLEL_COMBINED and return NULL.
101
094da06d 1022014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
103
104 PR middle-end/60469
105 * c-array-notation.c (fix_builtin_array_notation_fn): Use
106 create_tmp_var instead build_decl for creating temps.
107 (build_array_notation_expr): Likewise.
108 (fix_conditional_array_notations_1): Likewise.
109 (fix_array_notation_expr): Likewise.
110 (fix_array_notation_call_expr): Likewise.
111
5a672e62 1122014-03-28 Jakub Jelinek <jakub@redhat.com>
113
114 PR c++/60689
115 * c-tree.h (c_build_function_call_vec): New prototype.
116 * c-typeck.c (build_function_call_vec): Don't call
117 resolve_overloaded_builtin here.
118 (c_build_function_call_vec): New wrapper function around
119 build_function_call_vec. Call resolve_overloaded_builtin here.
120 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
121 Call c_build_function_call_vec instead of build_function_call_vec.
122 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
123 * c-decl.c (finish_decl): Likewise.
124
f40f5e0e 1252014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
126
127 PR c/55383
128 * c-typeck.c: Use correct format string in cast-qual warning
129
9ec099a3 1302014-03-07 Thomas Schwinge <thomas@codesourcery.com>
131
132 * c-decl.c (c_decl_attributes): Use
133 lang_hooks.types.omp_mappable_type.
134 * c-typeck.c (c_finish_omp_clauses): Likewise.
135
3bfdc94f 1362014-03-06 Marek Polacek <polacek@redhat.com>
137
138 PR c/60197
139 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
140 of checking tree code.
141
8f1128f8 1422014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
143
144 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
145 (c_parser_parameter_declaration): Likewise.
146
977b1853 1472014-02-19 Marek Polacek <polacek@redhat.com>
148
149 PR c/60195
150 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
151 Call mark_exp_read on exp.value.
152 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
153 TREE_ADDRESSABLE on old instead of val.
154 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
155
825cd6ef 1562014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
157
158 * c-parser.c (c_parser_get_builtin_args): Replace calls to
159 C_EXPR_APPEND by vec_safe_push.
160 * c-tree.h (C_EXPR_APPEND): Remove.
161
ec761d5a 1622014-01-31 Marek Polacek <polacek@redhat.com>
163
164 PR c/59963
165 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
166 build_function_call_vec.
167 (build_function_call): Likewise.
168 (build_atomic_assign): Likewise.
169 (build_function_call_vec): Add arg_loc parameter. Use it.
170 (convert_arguments): Likewise.
171 (convert_for_assignment): Rename rhs_loc to expr_loc.
172 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
173 (c_parser_objc_keywordexpr): Likewise.
174 (c_parser_postfix_expression_after_primary): Call
175 build_function_call_vec with expr_loc rather than op_loc.
176 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
177 build_function_call_vec.
178 (c_parser_expr_list): Add locations parameter. Fill it with locations
179 of function arguments.
180 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
181
22a75734 1822014-01-30 Marek Polacek <polacek@redhat.com>
183
184 PR c/59940
185 * c-typeck.c (build_function_call_vec): Use loc parameter.
186 (convert_arguments): Add location parameter. Use it.
187 (ep_convert_and_check): Likewise.
188 (build_atomic_assign): Adjust convert_for_assignment call.
189 (build_modify_expr): Likewise.
190 (digest_init): Likewise.
191 (c_finish_return): Likewise.
192 (build_conditional_expr): Adjust ep_convert_and_check calls.
193 (convert_for_assignment): Add rhs_loc parameter. Use it.
194 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
195 calls.
196
29f580ac 1972014-01-30 Richard Biener <rguenther@suse.de>
198
199 PR c/59905
200 * c-typeck.c (build_function_call_vec): Do not replace calls
201 to a function via an incompatible type with a runtime abort.
202
a89e6c15 2032014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
204
205 * c-parser.c (c_parser_declaration_or_fndef): Replaced
206 flag_enable_cilkplus with flag_cilkplus.
207 (c_parser_direct_declarator_inner): Likewise.
208 (c_parser_attribute_any_word): Likewise.
209 (c_parser_attributes): Likewise.
210 (c_parser_compound_statement): Likewise.
211 (c_parser_statement_after_labels): Likewise.
212 (c_parser_if_statement): Likewise.
213 (c_parser_switch_statement): Likewise.
214 (c_parser_do_statement): Likewise.
215 (c_parser_for_statement): Likewise.
216 (c_parser_unary_expression): Likewise.
217 (c_parser_postfix_expression): Likewise.
218 (c_parser_postfix_expression_after_primary): Likewise.
219 (c_parser_postfix_expression_after_primary): Likewise.
220 (c_parser_omp_clause_name): Likewise.
221 (c_finish_omp_declare_simd): Likewise.
222 (c_parser_cilk_verify_simd): Likewise.
223 * c-typeck.c (build_array_ref): Likewise.
224 (build_function_call_vec): Likewise.
225 (convert_arguments): Likewise.
226 (build_compound_expr): Likewise.
227 (c_finish_return): Likewise.
228 (c_finish_if_stmt): Likewise.
229 (c_finish_loop): Likewise.
230 (build_binary_op): Likewise.
231
2623625f 2322014-01-23 Marek Polacek <polacek@redhat.com>
233
234 PR c/59846
235 * c-typeck.c (parser_build_binary_op): Use location instead of
236 input_location.
237 (build_binary_op): Pass location to shorten_compare.
238
46da3601 2392014-01-23 Marek Polacek <polacek@redhat.com>
240
241 PR c/58346
242 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
243 an empty aggregate.
244
9a9db3c1 2452014-01-23 Marek Polacek <polacek@redhat.com>
246
247 PR c/59871
248 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
249 of a comma expression.
250 (emit_side_effect_warnings): Likewise.
251
69c9b607 2522014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
253
254 PR c/59825
255 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
256 function to use walk_tree and moved a lot of its functionality to
257 expand_array_notations.
258 (expand_array_notations): New function.
259
7e005ab5 2602014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
261
262 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
263 attribute an attribute without value.
264
d6779b5f 2652014-01-23 Jakub Jelinek <jakub@redhat.com>
266
267 PR middle-end/58809
268 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
269 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
270
ec431042 2712014-01-22 Marek Polacek <polacek@redhat.com>
272
273 PR c/59891
274 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
275 of remove_c_maybe_const_expr on op1 and op2.
276
1248c663 2772014-01-15 Jakub Jelinek <jakub@redhat.com>
278
279 PR c/58943
280 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
281 effects, preevaluate rhs using SAVE_EXPR first.
282
0bc789fc 2832014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
284
285 PR c++/59631
286 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
287 statements with if-elseif statements.
288
6685d11c 2892014-01-06 Marek Polacek <polacek@redhat.com>
290
291 PR c/57773
292 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
293 defined bit-field types only in ISO C.
294
3aea1f79 2952014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
296
297 Update copyright years
298
e4f22041 2992014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
300
301 * c-array-notation.c: Use the standard form for the copyright notice.
302
74acc703 3032013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
304
305 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
306 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
307 field in parser is not empty. If not-empty, call the function
308 c_parser_finish_omp_declare_simd.
309 (c_parser_cilk_clause_vectorlength): Modified function to be shared
310 between SIMD-enabled functions and #pragma simd. Added new parameter.
311 (c_parser_cilk_all_clauses): Modified the usage of the function
312 c_parser_cilk_clause_vectorlength as mentioned above.
313 (c_parser_cilk_simd_fn_vector_attrs): New function.
314 (c_finish_cilk_simd_fn_tokens): Likewise.
315 (is_cilkplus_vector_p): Likewise.
316 (c_parser_omp_clause_name): Added checking for "vectorlength,"
317 "nomask," and "mask" strings in clause name.
318 (c_parser_omp_all_clauses): Added 3 new case statements:
319 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
320 PRAGMA_CILK_CLAUSE_NOMASK.
321 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
322 check for vector attribute and if so call the function
323 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
324 called the function c_finish_cilk_simd_fn_tokens.
325 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
326 parser field is non-empty. If so, parse them as you would parse
327 the omp declare simd pragma.
328 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
329 Added a check when step is a parameter and flag it as error.
330 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
331 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
332 pragma_omp_clause.
333
395dc01c 3342013-12-17 Thomas Schwinge <thomas@codesourcery.com>
335
336 * c-parser.c (c_parser_omp_parallel): Fix description.
337
433e804e 3382013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
339
340 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
341 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
342 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
343 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
344
a179a7dc 3452013-12-04 Joseph Myers <joseph@codesourcery.com>
346
347 PR c/52023
348 * c-parser.c (c_parser_alignas_specifier): Use
349 c_sizeof_or_alignof_type instead of c_alignof.
350 (c_parser_alignof_expression): Likewise, with min_alignof
351 parameter depending on alignof spelling used.
352
bdf1e3c7 3532013-12-04 Marek Polacek <polacek@redhat.com>
354
355 PR c/54113
356 * c-decl.c (start_function): Don't warn for missing prototype for
357 inline functions.
358
05e8f674 3592013-12-03 Marek Polacek <polacek@redhat.com>
360
361 PR c/59351
362 * c-decl.c (build_compound_literal): Allow compound literals with
363 empty initial value.
364
39f74d66 3652013-12-02 Joseph Myers <joseph@codesourcery.com>
366
367 PR c/58235
368 * c-typeck.c (build_modify_expr): Diagnose assignment to
369 expression with array type.
370
f221adca 3712013-11-29 Joseph Myers <joseph@codesourcery.com>
372
373 PR c/42262
374 * c-typeck.c (process_init_element): Do not treat a string as
375 initializing a whole array when used with a designator for an
376 individual element.
377
75bce827 3782013-11-29 Joseph Myers <joseph@codesourcery.com>
379
380 PR c/57574
381 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
382 an inline function following a static declaration.
383
dc133326 3842013-11-28 Jakub Jelinek <jakub@redhat.com>
385
386 PR c/59310
387 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
388 to p_name before calling c_parser_omp_teams instead of after.
389 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
390 argument. Remove unused p_name variable.
391
d09768a4 3922013-11-27 Aldy Hernandez <aldyh@redhat.com>
393 Jakub Jelinek <jakub@redhat.com>
394
395 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
396 external_scope is NULL.
397
73fd9cbe 3982013-11-27 Tom de Vries <tom@codesourcery.com>
399 Marc Glisse <marc.glisse@inria.fr>
400
401 PR c++/59032
402 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
403
bc61cadb 4042013-11-22 Andrew MacLeod <amacleod@redhat.com>
405
406 * c-typeck.c: Add required include files from gimple.h.
407
3df42822 4082013-11-22 David Malcolm <dmalcolm@redhat.com>
409
410 * c-decl.c (define_label, shadow_tag_warned)
411 (check_bitfield_type_and_width, grokdeclarator, grokparms,
412 store_parm_decls_newstyle, store_parm_decls_oldstyle)
413 (declspecs_add_type): Remove use of in_system_header macro.
414 * c-parser.c (c_parser_unary_expression): Likewise.
415 * c-typeck.c (store_init_value, process_init_element)
416 (c_start_case): Likewise.
417
418 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
419 macro.
420
421 * c-parser.c (c_parser_set_source_position_from_token): Remove
422 reference to in_system_header from comment.
423
08f817b3 4242013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
425
426 * c-decl.c (grokdeclarator): Update comment to refer to
427 tree_to_[su]hwi rather than tree_low_cst.
428
6a0712d4 4292013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
430
431 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
432 tree_to_uhwi throughout.
433
fcb97e84 4342013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
435
436 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
437 throughout.
438
35ec552a 4392013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
440
441 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
442 throughout.
443
f2697631 4442013-11-15 Aldy Hernandez <aldyh@redhat.com>
445
446 * c-parser.c (c_parser_cilk_simd): New.
447 (c_parser_cilk_verify_simd): New.
448 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
449 (c_parser_omp_for_loop): Add case for NE_EXPR.
450 Set c_break_label for CILK_SIMD.
451 (c_parser_cilk_clause_vectorlength): New.
452 (c_parser_cilk_clause_linear): New.
453 (c_parser_cilk_clause_name): New.
454 (c_parser_cilk_all_clauses): New.
455 * c-typeck.c (build_unary_op): Pass location argument to
456 readonly_error.
457 (build_modify_expr): Same.
458 (build_asm_expr): Same.
459 (c_finish_bc_stmt): Error on break/continue in loops.
460
e795d6e1 4612013-11-14 Andrew MacLeod <amacleod@redhat.com>
462
463 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
464
9ed99284 4652013-11-14 Diego Novillo <dnovillo@google.com>
466
467 * c-decl.c: Include print-tree.h.
468 Include stor-layout.h.
469 Include varasm.h.
470 Include attribs.h.
471 Include stringpool.h.
472 * c-lang.c: Include fold-const.h.
473 * c-parser.c: Include stringpool.h.
474 Include attribs.h.
475 Include stor-layout.h.
476 Include varasm.h.
477 Include trans-mem.h.
478 * c-typeck.c: Include stor-layout.h.
479 Include trans-mem.h.
480 Include varasm.h.
481 Include stmt.h.
482
4fba5eb9 4832013-11-13 Joseph Myers <joseph@codesourcery.com>
484
485 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
486 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
487 __auto_type.
488 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
489 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
490 RID_AUTO_TYPE.
491 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
492 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
493 (c_parser_declarator, c_parser_direct_declarator_inner)
494 (c_parser_parameter_declaration, c_parser_type_name): All callers
495 changed.
496 (c_parser_declaration_or_fndef): Handle declarations with type
497 determined from the initializer.
498
a8783bee 4992013-11-12 Andrew MacLeod <amacleod@redhat.com>
500
e795d6e1 501 * c-typeck.c: Include gimplify.h.
a8783bee 502
d184e0c0 5032013-11-12 Joseph Myers <joseph@codesourcery.com>
504
505 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
506 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
507 comment.
508 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
509 or _Thread_local as appropriate in diagnostics.
510 (build_null_declspecs): Initialize ret->thread_gnu_p.
511 (declspecs_add_scspec): Handle either __thread or _Thread_local
512 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
513 pedantic. Do not disallow _Thread_local extern and _Thread_local
514 static.
515
b560fabd 5162013-11-07 Joseph Myers <joseph@codesourcery.com>
517 Andrew MacLeod <amacleod@redhat.com>
518
519 * c-aux-info.c (gen_type): Handle atomic qualifier.
520 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
521 qualifiers when compating types.
522 (shadow_tag_warned): Handle atomic_p in declspecs.
523 (quals_from_declspecs): Likewise.
524 (start_decl): Use c_type_promotes_to when promoting argument
525 types.
526 (grokdeclarator): Handle _Atomic.
527 (get_parm_info): Diagnose any qualifier on "void" as only
528 parameter.
529 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
530 comparing types. Use c_type_promotes_to when promoting argument
531 types.
532 (finish_function): Use c_type_promotes_to when promoting argument
533 types.
534 (build_null_declspecs): Handle atomic_p in declspecs.
535 (declspecs_add_qual): Handle RID_ATOMIC.
536 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
537 (c_token_starts_declspecs): Handle RID_ATOMIC.
538 (c_parser_declspecs): Handle atomic type specifiers and
539 qualifiers.
540 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
541 from types of expressions with atomic type.
542 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
543 (c_parser_attribute_any_word): Handle RID_ATOMIC.
544 (c_parser_initializer, c_parser_initelt, c_parser_initval)
545 (c_parser_statement_after_labels, c_parser_switch_statement)
546 (c_parser_for_statement, c_parser_expr_no_commas)
547 (c_parser_conditional_expression, c_parser_binary_expression)
548 (c_parser_cast_expression, c_parser_unary_expression)
549 (c_parser_postfix_expression)
550 (c_parser_postfix_expression_after_primary, c_parser_expression):
551 Use convert_lvalue_to_rvalue.
552 (c_parser_expression_conv, c_parser_expr_list): Document
553 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
554 (c_parser_objc_synchronized_statement): Use
555 convert_lvalue_to_rvalue.
556 (c_parser_objc_selector): Handle RID_ATOMIC.
557 (c_parser_objc_receiver, c_parser_array_notation): Use
558 convert_lvalue_to_rvalue.
559 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
560 _Atomic (type-name).
561 (struct c_declspecs): Add atomic_p field.
562 (convert_lvalue_to_rvalue): Declare.
563 * c-typeck.c (c_type_promotes_to): Promote atomic types to
564 corresponding atomic types.
565 (qualify_type): Don't add _Atomic qualifiers from second argument.
566 (comp_target_types): Do not allow _Atomic mismatches.
567 (type_lists_compatible_p): Do not remove atomic qualifiers when
568 comparing types.
569 (really_atomic_lvalue, convert_lvalue_to_rvalue)
570 (build_atomic_assign): New functions.
571 (build_unary_op): Use build_atomic_assign for atomic increment and
572 decrement.
573 (build_conditional_expr): Do not treat _Atomic void as a qualified
574 version of void.
575 (build_modify_expr): Use build_atomic_assign for atomic LHS.
576 (find_anonymous_field_with_type, convert_to_anonymous_field)
577 (convert_for_assignment): Do not remove atomic qualifiers when
578 comparing types.
579 (digest_init): Do not accept initialization of arrays of atomic
580 elements by string constants.
581 (build_asm_expr): Use convert_lvalue_to_rvalue.
582 (build_binary_op): Do not treat _Atomic void as a qualified
583 version of void.
584
8b023e7c 5852013-11-06 DJ Delorie <dj@redhat.com>
586
587 * c-decl.c (locate_old_decl): If a previous conflicting decl is
588 both explicit and builtin, print the location of the explicit one.
589
c630ef93 5902013-11-05 Tobias Burnus <burnus@net-b.de>
591
592 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
593 c_parser_omp_distribute, c_parser_omp_teams,
594 c_parser_omp_target, c_parser_omp_declare): Handle
595 -fopenmp-simd.
596
2c4c3477 5972013-11-03 Marek Polacek <polacek@redhat.com>
598
599 * c-decl.c (grokdeclarator): Add VLA instrumentation.
600
df205251 6012013-11-01 Jakub Jelinek <jakub@redhat.com>
602
603 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
604 check_dup_generic at the end, unless remove is true.
605 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
606 remove = true;.
607 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
608
23871d0c 6092013-10-31 Jakub Jelinek <jakub@redhat.com>
610
611 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
612 with decl that is not pointer nor array.
613
d037099f 6142013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
615
616 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
617 a spawning function is found.
618 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
619 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
620 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
621 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
622 case.
623 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
624 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
625 expr.
626 (c_finish_return): Added a check to reject _Cilk_spawn in return
627 expression.
628 (build_cilk_spawn): New function.
629 (build_cilk_sync): Likewise.
630 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
631
4c90c04c 6322013-10-27 Tobias Burnus <burnus@net-b.de>
633
634 PR other/33426
635 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
636 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
637 (c_parser_statement_after_labels): Update calls.
638
48a972c8 6392013-10-24 Tobias Burnus <burnus@net-b.de>
4644b593 640
641 PR other/33426
642 * c-parser.c (c_parser_pragma, c_parser_for_statement):
643 Handle PRAGMA_IVDEP.
644 (c_parser_statement_after_labels): Update call.
645
12f86df0 6462013-10-24 Marek Polacek <polacek@redhat.com>
647
648 * c-parser.c (c_parser_struct_declaration): Add a comment.
649 (c_parser_declarator): Don't allow _Alignas here.
650
7740abd8 6512013-10-17 Andrew MacLeod <amacleod@redhat.com>
652
653 * c-parser.c: Include omp-low.h.
654 * c-typeck.c: Likewise.
655
43d03c23 6562013-10-17 Marek Polacek <polacek@redhat.com>
657
658 PR c/58267
659 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
660 Document syntax of the array-declarator.
661 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
662 are not permitted.
663 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
664 (c_parser_struct_declaration): Likewise.
665 (c_parser_declarator): Likewise.
666 (c_parser_direct_declarator_inner): Likewise.
667 (c_parser_parameter_declaration): Likewise.
668 (c_parser_type_name): Likewise.
669
bc7bff74 6702013-10-11 Jakub Jelinek <jakub@redhat.com>
671
672 * c-lang.h (current_omp_declare_target_attribute): New extern
673 decl.
674 * c-parser.c: Include c-lang.h.
675 (struct c_parser): Change tokens to c_token *.
676 Add tokens_buf field. Change tokens_avail type to unsigned int.
677 (c_parser_consume_token): If parser->tokens isn't
678 &parser->tokens_buf[0], increment parser->tokens.
679 (c_parser_consume_pragma): Likewise.
680 (enum pragma_context): Add pragma_struct and pragma_param.
681 (c_parser_external_declaration): Adjust
682 c_parser_declaration_or_fndef caller.
683 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
684 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
685 Adjust recursive call.
686 (c_parser_struct_or_union_specifier): Use pragma_struct instead
687 of pragma_external.
688 (c_parser_parameter_declaration): Use pragma_param instead of
689 pragma_external.
690 (c_parser_compound_statement_nostart, c_parser_label,
691 c_parser_for_statement): Adjust
692 c_parser_declaration_or_fndef callers.
693 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
694 it through to c_parser_conditional_expression.
695 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
696 pass it through to c_parser_binary_expression. Adjust recursive
697 call.
698 (c_parser_binary_expression): Remove prec argument, add
699 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
700 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
701 binop matches it, use build2 instead of parser_build_binary_op.
702 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
703 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
704 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
705 Handle pragma_struct and pragma_param the same as pragma_external.
706 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
707 (c_parser_omp_variable_list): Parse array sections for
708 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
709 (c_parser_omp_clause_collapse): Fully fold collapse expression.
710 (c_parser_omp_clause_reduction): Handle user defined reductions.
711 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
712 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
713 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
714 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
715 c_parser_omp_clause_depend, c_parser_omp_clause_map,
716 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
717 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
718 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
719 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
720 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
721 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
722 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
723 (c_parser_omp_for_loop): Add CODE argument, pass it through
724 to c_finish_omp_for. Change last argument to cclauses,
725 and adjust uses to grab parallel clauses from the array of all
726 the split clauses. Adjust c_parser_binary_expression,
727 c_parser_declaration_or_fndef and c_finish_omp_for callers.
728 (omp_split_clauses): New function.
729 (c_parser_omp_simd): New function.
730 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
731 Allow the function to be called also when parsing combined constructs,
732 and call c_parser_omp_simd when parsing for simd.
733 (c_parser_omp_sections_scope): If section-sequence doesn't start with
734 #pragma omp section, require exactly one structured-block instead of
735 sequence of statements.
736 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
737 Allow the function to be called also when parsing combined constructs.
738 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
739 Allow the function to be called also when parsing combined
740 constructs.
741 (c_parser_omp_taskgroup, c_parser_omp_cancel,
742 c_parser_omp_cancellation_point, c_parser_omp_distribute,
743 c_parser_omp_teams, c_parser_omp_target_data,
744 c_parser_omp_target_update, c_parser_omp_target,
745 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
746 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
747 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
748 (c_parser_omp_construct): Add p_name and mask vars. Handle
749 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
750 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
751 and c_parser_omp_sections callers.
752 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
753 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
754 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
755 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
756 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
757 OMP_CLAUSE_DEPEND.
758 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
759 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
760 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
761 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
762 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
763 * c-typeck.c: Include tree-inline.h.
764 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
765 handle_omp_array_sections_1, handle_omp_array_sections,
766 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
767 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
768 user defined reductions.
769 (c_tree_equal): New function.
770 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
771 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
772 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
773 c_check_omp_declare_reduction_r): New prototypes.
774 * c-decl.c (current_omp_declare_target_attribute): New variable.
775 (c_decl_attributes): New function.
776 (start_decl, start_function): Use it instead of decl_attributes.
777 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
778 c_omp_reduction_decl, c_omp_reduction_lookup,
779 c_check_omp_declare_reduction_r): New functions.
780
3ce7d1bd 7812013-09-25 Tom Tromey <tromey@redhat.com>
782
783 * Make-lang.in (c/gccspec.o): Remove.
784 (CFLAGS-c/gccspec.o): New variable.
785 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
786 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
787 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
788
96da1c1d 7892013-09-25 Tom Tromey <tromey@redhat.com>
790
791 * Make-lang.in (c/gccspec.o): Don't use subshell.
792
1b309377 7932013-09-18 Marek Polacek <polacek@redhat.com>
794
795 PR sanitize/58443
796 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
797 Remove unnecessary check.
798
05f893e1 7992013-09-18 Marek Polacek <polacek@redhat.com>
800
801 PR sanitizer/58411
802 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
803 no_sanitize_undefined attribute.
804
bda0b9d2 8052013-09-13 Kai Tietz <ktietz@redhat.com>
806
807 PR target/57848
808 * c-decl.c (c_builtin_function_ext_scope): Remove
809 wrong assumption that it is never called on prexisting
810 symbol.
811
73437615 8122013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
813
814 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
815
eaab24b9 8162013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
817
818 * c-objc-common.c (c_tree_printer): Tidy.
819
9e46467d 8202013-08-30 Marek Polacek <polacek@redhat.com>
821
822 * c-typeck.c (build_binary_op): Add division by zero and shift
823 instrumentation.
824
f8234178 8252013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
f9086116 826 Joseph Myers <joseph@codesourcery.com>
f8234178 827
c90a7d10 828 PR c/35649
f8234178 829 * c-typeck.c (c_common_type): Prefer double_type_node over
830 other REAL_TYPE types with the same precision.
831 (convert_arguments): Likewise.
832
6f07f480 8332013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
834
835 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
836 (c_initialize_diagnostics): Call a destructor for the early printer.
837
eed6bc21 8382013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
839
840 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
841 printer initialization.
842
57717943 8432013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
eed6bc21 844
57717943 845 PR c/57490
846 * c-array-notation.c (fix_conditional_array_notations_1): Added a
847 check for truth values.
848 (expand_array_notation_exprs): Added truth values case. Removed an
849 unwanted else. Added for-loop to walk through subtrees in default
850 case.
851
a94db6b0 8522013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
853
854 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
855
e76163a9 8562013-07-23 Joseph Myers <joseph@codesourcery.com>
857
858 * c-parser.c (struct c_generic_association): Fix typo.
859
7aa04c8d 8602013-07-23 Tom Tromey <tromey@redhat.com>
861 Joseph Myers <joseph@codesourcery.com>
862
863 * c-parser.c (struct c_generic_association): New.
864 (c_generic_association_d): New typedef.
865 (c_parser_generic_selection): New function.
866 (c_parser_postfix_expression): Handle RID_GENERIC.
867
76bbe4ca 8682013-07-13 Jason Merrill <jason@redhat.com>
869
870 PR c++/57793
871 * c-decl.c (finish_struct): Check for too-large class.
872
21ebaa24 8732013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
f5298614 874
875 PR c/57821
876 * c-typeck.c (set_init_index): When folding, check for index overflow.
877
936c3081 8782013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
879
880 * c-parser.c (c_parser_array_notation): Removed rejection of array
881 notations in an array of function pointers.
882
50acebe0 8832013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
884
885 * c-array-notation.c (make_triplet_val_inv): New function.
886 (create_cmp_incr): Likewise.
887 (create_array_refs): Likewise.
888 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
889 Also modularized common parts between functions and called the function.
890 (build_array_notation_expr): Likewise.
891 (fix_conditional_array_notations_1): Likewise.
892 (fix_array_notation_expr): Likewise.
893 (fix_array_notation_call_expr): Likewise.
894
01e6cdb4 8952013-06-18 Marek Polacek <polacek@redhat.com>
896
897 PR c/57630
898 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
899
6a3adac6 9002013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
901
902 * c-array-notation.c (build_array_notation_expr): Reject array notation
903 mismatch between LHS and RHS even inside a call_expr. Also, removed
904 a couple while statements that were dead code.
905
62aab3f3 9062013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
907
908 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
909 excessive precision expressions in function parameters. Also removed
910 couple unwanted while statements.
911
bfc83720 9122013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
913
914 * c-array-notation.c (expand_array_notation_exprs): Added
915 ARRAY_NOTATION_REF case.
916
09970d67 9172013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
918
919 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
920 function to c-family/array-notation-common.c.
921 (is_cilkplus_reduce_builtin): Likewise.
922 (find_rank): Likewise.
923 (extract_array_notation_exprs): Likewise.
924 (replace_array_notations): Likewise.
925 (find_inv_trees): Likewise.
926 (replace_inv_trees): Likewise.
927 (contains_array_notation_expr): Likewise.
928 (find_correct_array_notation_type): Likewise.
929 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
930 (struct inv_list): Moved this to c-family/array-notation-common.c.
931 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
932
6e13bc01 9332013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
934
935 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
936 reduction functions outside the for-loop. Added a check if the fundecl
937 is non-NULL. Finally, removed an unwanted if-statement, and made the
938 body unconditional.
939
cc92dddc 9402013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
941
942 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
943 condition of the if-statement matches the rank of else-block and then-
944 block when array notations are used.
945 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
946 expression after the entire function body is parsed.
947 (c_parser_expr_no_commas): Delayed creating array notation expressions
948 to the end of function parsing.
949 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
950 whole if-statement instead of just the condition.
951 (expand_array_notation_exprs): Added MODIFY_EXPR case.
952
eddc63fd 9532013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
954
955 PR c/57474
956 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
957 array to NULL_TREE if they are unused. Also added a check for the
958 field to be NULL before its fields are used in future.
959
a2115a4a 9602013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
961
962 PR bootstrap/57450
963 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
964 (build_array_notation_expr): Likewise.
965
3c6d4197 9662013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
967
968 * c-typeck.c (build_array_ref): Added a check to see if array's
969 index is greater than one. If true, then emit an error.
970 (build_function_call_vec): Exclude error reporting and checking
971 for builtin array-notation functions.
972 (convert_arguments): Likewise.
973 (c_finish_return): Added a check for array notations as a return
974 expression. If true, then emit an error.
975 (c_finish_loop): Added a check for array notations in a loop
976 condition. If true then emit an error.
977 (lvalue_p): Added a ARRAY_NOTATION_REF case.
978 (build_binary_op): Added a check for array notation expr inside
979 op1 and op0. If present, we call another function to find correct
980 type.
981 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
982 * c-parser.c (c_parser_compound_statement): Check if array
983 notation code is used in tree, if so, then transform them into
984 appropriate C code.
985 (c_parser_expr_no_commas): Check if array notation is used in LHS
986 or RHS, if so, then build array notation expression instead of
987 regular modify.
988 (c_parser_postfix_expression_after_primary): Added a check for
989 colon(s) after square braces, if so then handle it like an array
990 notation. Also, break up array notations in unary op if found.
991 (c_parser_direct_declarator_inner): Added a check for array
992 notation.
993 (c_parser_compound_statement): Added a check for array notation in
994 a stmt. If one is present, then expand array notation expr.
995 (c_parser_if_statement): Likewise.
996 (c_parser_switch_statement): Added a check for array notations in
997 a switch statement's condition. If true, then output an error.
998 (c_parser_while_statement): Similarly, but for a while.
999 (c_parser_do_statement): Similarly, but for a do-while.
1000 (c_parser_for_statement): Similarly, but for a for-loop.
1001 (c_parser_unary_expression): Check if array notation is used in a
1002 pre-increment or pre-decrement expression. If true, then expand
1003 them.
1004 (c_parser_array_notation): New function.
1005 * c-array-notation.c: New file.
1006 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
1007
2c1c8a2c 10082013-05-23 Mike Stump <mikestump@comcast.net>
1009
1010 * c-typeck.c (convert_for_assignment): Handle references to memory
1011 spaces better.
1012
be5f9e46 10132013-05-16 Jason Merrill <jason@redhat.com>
1014
1015 * Make-lang.in (cc1$(exeext)): Use link mutex.
1016
9205a6cc 10172013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
1018
1019 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
1020 to simply use OPT_Wpointer_arith.
1021 (build_unary_op): Likewise.
1022
0b049e15 10232013-04-03 Jakub Jelinek <jakub@redhat.com>
1024
1025 PR c/19449
1026 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
1027 argument. If set, or it temporarily for parsing of the first
1028 argument into force_folding_builtin_constant_p.
1029 (c_parser_postfix_expression): Adjust callers.
1030
8e966116 10312013-03-21 Richard Biener <rguenther@suse.de>
1032
1033 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
1034 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
1035
b862f263 10362013-02-12 Marek Polacek <polacek@redhat.com>
1037
1038 PR c/44938
1039 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
1040 origtypes to NULL.
1041
54550ecb 10422013-01-24 Jakub Jelinek <jakub@redhat.com>
1043
1044 PR c/56078
1045 * c-typeck.c (set_nonincremental_init_from_string): If
1046 constructor_max_index is NULL, treat it as if tree_int_cst_lt
1047 returned false.
1048 (process_init_element): Likewise.
1049
035b65e2 10502012-12-20 Jakub Jelinek <jakub@redhat.com>
1051
1052 PR c++/55619
1053 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
1054 argument, don't call default_function_array_conversion
1055 nor c_fully_fold here.
1056 (c_parser_asm_statement): Adjust callers.
1057 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
1058 and outputs here, and call default_function_array_conversion
1059 on inputs that don't need to be addressable.
1060
7cbb7f1a 10612012-12-18 Jakub Jelinek <jakub@redhat.com>
1062
1063 PR c/39464
1064 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
1065 warning require that both c_common_unsigned_type as well as
1066 c_common_signed_type is the same for both mvl and mvr types.
1067
f1f41a6c 10682012-11-16 Diego Novillo <dnovillo@google.com>
1069
1070 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
1071
1072 * c-common.c: Use new vec API in vec.h.
1073 * c-common.h: Likewise.
1074 * c-gimplify.c: Likewise.
1075 * c-pragma.c: Likewise.
1076 * c-pretty-print.c: Likewise.
1077 * c-pretty-print.h: Likewise.
1078 * c-semantics.c: Likewise.
1079 * c-decl.c: Likewise.
1080 * c-parser.c: Likewise.
1081 * c-tree.h: Likewise.
1082 * c-typeck.c: Likewise.
1083
8b447d3f 10842012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
1085
1086 PR c++/54930
1087 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
1088
08fc5390 10892012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1090
1091 PR c/53066
1092 * c-decl.c (warn_if_shadowing): Do not warn if a variable
1093 shadows a function, unless the variable is a function or a
1094 pointer-to-function.
1095
57f872a2 10962012-10-12 Jakub Jelinek <jakub@redhat.com>
1097
1098 PR c/54381
1099 * c-parser.c (struct c_tree_loc_pair): Removed.
1100 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
1101 add location_t * and tree * arguments, fill in array of 3
1102 sizeof_arg trees and corresponding locs.
1103 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
1104 c_parser_expr_list callers.
1105 (c_parser_postfix_expression_after_primary): Likewise. Pass
1106 array of 3 sizeof_arg trees and locs (corresponding to first
1107 3 arguments) to sizeof_pointer_memaccess_warning.
1108
d1455aa3 11092012-10-09 Lawrence Crowl <crowl@google.com>
1110
1111 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
1112 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
1113 hash table.
1114
b0e7825e 11152012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
1116
1117 PR c++/54194
1118 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
1119 call.
1120
41ed701a 11212012-10-09 Marc Glisse <marc.glisse@inria.fr>
1122
1123 PR c++/54427
1124 * c-typeck.c: Include c-common.h.
1125 (enum stv_conv): Moved to c-common.h.
1126 (scalar_to_vector): Moved to c-common.c.
1127 (build_binary_op): Adapt to scalar_to_vector's new prototype.
1128 * Make-lang.in: c-typeck.c depends on c-common.h.
1129
ef34afc1 11302012-10-04 Arnaud Charlet <charlet@adacore.com>
1131
1132 * c-decl.c (c_write_global_declarations): Fix handling of
1133 -fdump-ada-spec*.
1134
7bd765d4 11352012-09-30 Sharad Singhai <singhai@google.com>
1136
1137 * c-decl.c (c_write_global_declarations): Use a different method
1138 to determine if the dump has ben initialized.
1139
c4b1a13a 11402012-09-14 Joseph Myers <joseph@codesourcery.com>
1141
1142 PR c/54552
1143 * c-typeck.c (c_cast_expr): When casting to a type requiring
1144 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
1145 c_fully_fold first.
1146
bb554051 11472012-09-14 Joseph Myers <joseph@codesourcery.com>
1148
1149 PR c/54103
1150 * c-typeck.c (build_unary_op): Pass original argument of
1151 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
1152 any C_MAYBE_CONST_EXPR, if it has integer operands.
1153 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
1154 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
1155 to c_objc_common_truthvalue_conversion, then remove any
1156 C_MAYBE_CONST_EXPR, if they have integer operands. Use
1157 c_objc_common_truthvalue_conversion not
1158 c_common_truthvalue_conversion.
1159 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
1160 call note_integer_operands for arguments with integer operands
1161 that are not integer constants.
1162
c708c6ef 11632012-09-13 Jakub Jelinek <jakub@redhat.com>
1164
1165 PR c/54559
1166 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
1167 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
1168
cce20430 11692012-08-31 Jakub Jelinek <jakub@redhat.com>
1170
1171 PR c/54428
1172 * c-convert.c (convert): Don't call fold_convert_loc if
1173 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
1174 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
1175 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
1176
a90d57ed 11772012-08-24 Jakub Jelinek <jakub@redhat.com>
1178
1179 PR c/54355
1180 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
1181 for nested and empty_ok arguments in the call to
1182 c_parser_declaration_or_fndef.
1183
f003f5dc 11842012-08-17 Jakub Jelinek <jakub@redhat.com>
1185
1186 * c-tree.h (c_last_sizeof_arg): Declare.
1187 * c-parser.c (struct c_tree_loc_pair): New type.
1188 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
1189 non-NULL.
1190 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
1191 (c_parser_postfix_expression_after_primary): Likewise. Call
1192 sizeof_pointer_memaccess_warning if needed.
1193 (sizeof_ptr_memacc_comptypes): New function.
1194 * c-typeck.c (c_last_sizeof_arg): New global variable.
1195 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
1196
a5656b73 11972012-07-24 Uros Bizjak <ubizjak@gmail.com>
1198
1199 * c-lang.h (lang_decl): Add variable_size GTY option.
1200
b9ed1410 12012012-07-16 Steven Bosscher <steven@gcc.gnu.org>
1202
1203 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
1204 * Make-lang.in: Fix dependencies.
1205
e53d55e7 12062012-06-29 Steven Bosscher <steven@gcc.gnu.org>
1207
1208 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
1209 and add language Makefile hooks.
1210 * config-lang.in: New file.
1211 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
1212 add the required "normal" config-lang.in rules.
1213 * c-lang.h: Moved from gcc/ to here.
1214 * c-tree.h: Likewise.
1215 * c-objc-common.c: Likewise.
1216 * c-objc-common.h: Likewise.
1217 * c-typeck.c: Likewise.
1218 * c-convert.c: Likewise.
1219 * c-lang.c: Likewise.
1220 * c-aux-info.c: Likewise.
1221 * c-errors.c: Likewise.
1222 * gccspec.c: Likewise.
1223 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
1224 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
1225\f
3aea1f79 1226Copyright (C) 2012-2014 Free Software Foundation, Inc.
e53d55e7 1227
1228Copying and distribution of this file, with or without modification,
1229are permitted in any medium without royalty provided the copyright
1230notice and this notice are preserved.