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