1 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
3 * c-decl.c: Include builtins.h.
4 * c-parser.c: Likewise.
6 2014-05-27 Marek Polacek <polacek@redhat.com>
9 * c-typeck.c (convert_arguments): Get location of a parameter. Change
10 error and warning calls to error_at and warning_at. Pass location of
11 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
12 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
13 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
15 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
18 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
21 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
23 * c-decl.c (merge_decls): Preserve symtab node pointers.
24 (duplicate_decls): Free new decl.
26 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
28 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
31 * c-parser.c (c_parser_omp_target): Return bool values.
33 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
35 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
36 num_teams_loc variable to num_thread_limit_loc.
38 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
40 * c-array-notation.c (expand_array_notations): Use void_node
41 instead of void_zero_node.
43 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
45 * c-decl.c (finish_struct): Adjust.
46 (finish_enum): Likewise.
48 (record_inline_static): Likewise.
49 (push_scope): Likewise.
50 (make_label): Likewise.
51 (lookup_label_for_goto): Likewise.
52 (finish_struct): Likewise.
53 (finish_enum): Likewise.
54 (store_parm_decls): Likewise.
55 (c_push_function_context): Likewise.
56 * c-lang.h: Remove usage of variable_size gty attribute.
57 * c-parser.c (c_parse_init): Adjust.
58 (c_parse_file): Likewise.
60 2014-05-13 Marek Polacek <polacek@redhat.com>
63 * c-typeck.c (convert_for_assignment): Pass location to
64 WARN_FOR_ASSIGNMENT instead of input_location.
66 2014-05-10 Marek Polacek <polacek@redhat.com>
68 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
69 maybe_warn_string_init.
70 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
71 maybe_warn_string_init.
72 * c-tree.h (maybe_warn_string_init): Update declaration.
73 * c-typeck.c (maybe_warn_string_init): Add location parameter.
74 Call pedwarn_init with loc instead of with input_location.
75 (digest_init): Pass init_loc to maybe_warn_string_init.
76 (pop_init_level): Call pedwarn_init with loc instead of with
78 (set_init_index): Likewise.
79 (process_init_element): Likewise.
81 2014-05-09 Marek Polacek <polacek@redhat.com>
84 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
85 (c_parser_initelt): Pass location to set_init_label. Pass array index
86 location to set_init_index.
87 * c-tree.h (push_init_level): Update declaration.
88 (pop_init_level): Likewise.
89 (set_init_index): Likewise.
90 (set_init_label): Likewise.
91 * c-typeck.c (error_init): Add location parameter. Call error_at
93 (digest_init): Pass init_loc to error_init.
94 (really_start_incremental_init):
95 (push_init_level): Add location parameter. Pass loc to pop_init_level
97 (pop_init_level): Likewise.
98 (set_designator): Add location parameter. Pass loc to pop_init_level,
99 push_init_level, and error_init.
100 (set_init_index): Add location parameter. Pass loc to error_init and
102 (set_init_label): Likewise.
103 (output_init_element): Pass loc to error_init.
104 (process_init_element): Pass loc to error_init, pop_init_level,
105 pedwarn_init, and push_init_level.
107 2014-05-09 Marek Polacek <polacek@redhat.com>
110 * c-parser.c (c_parser_attributes): Parse the arguments as an
111 expression-list if the attribute takes identifier.
113 2014-05-08 Marek Polacek <polacek@redhat.com>
116 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
119 2014-05-08 Marek Polacek <polacek@redhat.com>
122 * c-decl.c (start_function): Warn for _Atomic-qualified return type
125 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
126 Mike Stump <mikestump@comcast.net>
127 Richard Sandiford <rdsandiford@googlemail.com>
129 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
130 (finish_enum): Use wide-int interfaces.
131 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
132 * c-typeck.c (build_c_cast): Likewise.
133 (set_nonincremental_init_from_string): Likewise.
134 (c_tree_equal): Likewise.
136 2014-05-02 Marek Polacek <polacek@redhat.com>
139 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
140 Return size_one_node when the type is not complete.
141 (pointer_diff): Remove comment.
142 (build_unary_op): Improve error messages.
144 2014-05-02 Marek Polacek <polacek@redhat.com>
146 * c-typeck.c (c_finish_return): Separate warning_at calls.
148 2014-05-02 Marek Polacek <polacek@redhat.com>
150 * c-tree.h (error_init): Remove declaration.
151 (pedwarn_init): Likewise.
152 * c-typeck.c (error_init): Make static and move above.
153 (pedwarn_init): Likewise.
154 (warning_init): Move above.
155 (maybe_warn_string_init): Likewise.
157 2014-05-01 Jeff Law <law@redhat.com>
161 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
162 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
165 2014-05-02 Marek Polacek <polacek@redhat.com>
168 * c-typeck.c (push_init_level): Set constructor_designated to
169 p->designated for structures.
171 2014-05-01 Marek Polacek <polacek@redhat.com>
174 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
175 function-definition has an attribute after the declarator.
177 2014-05-01 Marek Polacek <polacek@redhat.com>
180 * c-typeck.c (warning_init): Add location_t parameter. Call
181 warning_at instead of warning.
182 (push_init_level): Pass input_location to warning_init.
183 (add_pending_init): Add location_t parameter. Pass loc to
185 (set_nonincremental_init): Pass input_location to add_pending_init.
186 (set_nonincremental_init_from_string): Likewise.
187 (output_init_element): Pass loc to warning_init and to
190 2014-05-01 Marek Polacek <polacek@redhat.com>
193 * c-typeck.c (c_finish_return): Distinguish between label and variable
194 when warning about returning local address.
196 2014-05-01 Marek Polacek <polacek@redhat.com>
199 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
202 2014-05-01 Marek Polacek <polacek@redhat.com>
205 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
206 instead of 0 to WARN_FOR_QUALIFIERS.
208 2014-05-01 Marek Polacek <polacek@redhat.com>
211 * c-typeck.c (default_conversion): Use better location for
214 2014-04-30 Marek Polacek <polacek@redhat.com>
216 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
217 also when SANITIZE_FLOAT_DIVIDE is on.
219 2014-04-30 Marek Polacek <polacek@redhat.com>
222 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
223 and pedwarn_init. Use loc insted of input_location.
225 2014-04-30 Marek Polacek <polacek@redhat.com>
228 * c-typeck.c (build_binary_op): Use location when warning about
231 2014-04-25 Marek Polacek <polacek@redhat.com>
234 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
235 always_inline/noinline and hot/cold attributes.
237 2014-04-25 Marek Polacek <polacek@redhat.com>
240 * c-parser.c (c_parser_initelt): Pass input_location to
241 process_init_element.
242 (c_parser_initval): Pass loc to process_init_element.
243 * c-tree.h (process_init_element): Adjust declaration.
244 * c-typeck.c (push_init_level): Pass input_location to
245 process_init_element.
246 (pop_init_level): Likewise.
247 (set_designator): Likewise.
248 (output_init_element): Add location_t parameter. Pass loc to
250 (output_pending_init_elements): Pass input_location to
252 (process_init_element): Add location_t parameter. Pass loc to
255 2014-04-24 Jakub Jelinek <jakub@redhat.com>
257 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
258 atomic-clause, allow comma in between atomic-clause and
261 2014-04-22 Jakub Jelinek <jakub@redhat.com>
264 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
265 fails, don't set OM_PARALLEL_COMBINED and return NULL.
267 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
270 * c-array-notation.c (fix_builtin_array_notation_fn): Use
271 create_tmp_var instead build_decl for creating temps.
272 (build_array_notation_expr): Likewise.
273 (fix_conditional_array_notations_1): Likewise.
274 (fix_array_notation_expr): Likewise.
275 (fix_array_notation_call_expr): Likewise.
277 2014-03-28 Jakub Jelinek <jakub@redhat.com>
280 * c-tree.h (c_build_function_call_vec): New prototype.
281 * c-typeck.c (build_function_call_vec): Don't call
282 resolve_overloaded_builtin here.
283 (c_build_function_call_vec): New wrapper function around
284 build_function_call_vec. Call resolve_overloaded_builtin here.
285 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
286 Call c_build_function_call_vec instead of build_function_call_vec.
287 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
288 * c-decl.c (finish_decl): Likewise.
290 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
293 * c-typeck.c: Use correct format string in cast-qual warning
295 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
297 * c-decl.c (c_decl_attributes): Use
298 lang_hooks.types.omp_mappable_type.
299 * c-typeck.c (c_finish_omp_clauses): Likewise.
301 2014-03-06 Marek Polacek <polacek@redhat.com>
304 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
305 of checking tree code.
307 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
309 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
310 (c_parser_parameter_declaration): Likewise.
312 2014-02-19 Marek Polacek <polacek@redhat.com>
315 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
316 Call mark_exp_read on exp.value.
317 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
318 TREE_ADDRESSABLE on old instead of val.
319 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
321 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
323 * c-parser.c (c_parser_get_builtin_args): Replace calls to
324 C_EXPR_APPEND by vec_safe_push.
325 * c-tree.h (C_EXPR_APPEND): Remove.
327 2014-01-31 Marek Polacek <polacek@redhat.com>
330 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
331 build_function_call_vec.
332 (build_function_call): Likewise.
333 (build_atomic_assign): Likewise.
334 (build_function_call_vec): Add arg_loc parameter. Use it.
335 (convert_arguments): Likewise.
336 (convert_for_assignment): Rename rhs_loc to expr_loc.
337 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
338 (c_parser_objc_keywordexpr): Likewise.
339 (c_parser_postfix_expression_after_primary): Call
340 build_function_call_vec with expr_loc rather than op_loc.
341 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
342 build_function_call_vec.
343 (c_parser_expr_list): Add locations parameter. Fill it with locations
344 of function arguments.
345 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
347 2014-01-30 Marek Polacek <polacek@redhat.com>
350 * c-typeck.c (build_function_call_vec): Use loc parameter.
351 (convert_arguments): Add location parameter. Use it.
352 (ep_convert_and_check): Likewise.
353 (build_atomic_assign): Adjust convert_for_assignment call.
354 (build_modify_expr): Likewise.
355 (digest_init): Likewise.
356 (c_finish_return): Likewise.
357 (build_conditional_expr): Adjust ep_convert_and_check calls.
358 (convert_for_assignment): Add rhs_loc parameter. Use it.
359 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
362 2014-01-30 Richard Biener <rguenther@suse.de>
365 * c-typeck.c (build_function_call_vec): Do not replace calls
366 to a function via an incompatible type with a runtime abort.
368 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
370 * c-parser.c (c_parser_declaration_or_fndef): Replaced
371 flag_enable_cilkplus with flag_cilkplus.
372 (c_parser_direct_declarator_inner): Likewise.
373 (c_parser_attribute_any_word): Likewise.
374 (c_parser_attributes): Likewise.
375 (c_parser_compound_statement): Likewise.
376 (c_parser_statement_after_labels): Likewise.
377 (c_parser_if_statement): Likewise.
378 (c_parser_switch_statement): Likewise.
379 (c_parser_do_statement): Likewise.
380 (c_parser_for_statement): Likewise.
381 (c_parser_unary_expression): Likewise.
382 (c_parser_postfix_expression): Likewise.
383 (c_parser_postfix_expression_after_primary): Likewise.
384 (c_parser_postfix_expression_after_primary): Likewise.
385 (c_parser_omp_clause_name): Likewise.
386 (c_finish_omp_declare_simd): Likewise.
387 (c_parser_cilk_verify_simd): Likewise.
388 * c-typeck.c (build_array_ref): Likewise.
389 (build_function_call_vec): Likewise.
390 (convert_arguments): Likewise.
391 (build_compound_expr): Likewise.
392 (c_finish_return): Likewise.
393 (c_finish_if_stmt): Likewise.
394 (c_finish_loop): Likewise.
395 (build_binary_op): Likewise.
397 2014-01-23 Marek Polacek <polacek@redhat.com>
400 * c-typeck.c (parser_build_binary_op): Use location instead of
402 (build_binary_op): Pass location to shorten_compare.
404 2014-01-23 Marek Polacek <polacek@redhat.com>
407 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
410 2014-01-23 Marek Polacek <polacek@redhat.com>
413 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
414 of a comma expression.
415 (emit_side_effect_warnings): Likewise.
417 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
420 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
421 function to use walk_tree and moved a lot of its functionality to
422 expand_array_notations.
423 (expand_array_notations): New function.
425 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
427 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
428 attribute an attribute without value.
430 2014-01-23 Jakub Jelinek <jakub@redhat.com>
433 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
434 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
436 2014-01-22 Marek Polacek <polacek@redhat.com>
439 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
440 of remove_c_maybe_const_expr on op1 and op2.
442 2014-01-15 Jakub Jelinek <jakub@redhat.com>
445 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
446 effects, preevaluate rhs using SAVE_EXPR first.
448 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
451 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
452 statements with if-elseif statements.
454 2014-01-06 Marek Polacek <polacek@redhat.com>
457 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
458 defined bit-field types only in ISO C.
460 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
462 Update copyright years
464 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
466 * c-array-notation.c: Use the standard form for the copyright notice.
468 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
470 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
471 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
472 field in parser is not empty. If not-empty, call the function
473 c_parser_finish_omp_declare_simd.
474 (c_parser_cilk_clause_vectorlength): Modified function to be shared
475 between SIMD-enabled functions and #pragma simd. Added new parameter.
476 (c_parser_cilk_all_clauses): Modified the usage of the function
477 c_parser_cilk_clause_vectorlength as mentioned above.
478 (c_parser_cilk_simd_fn_vector_attrs): New function.
479 (c_finish_cilk_simd_fn_tokens): Likewise.
480 (is_cilkplus_vector_p): Likewise.
481 (c_parser_omp_clause_name): Added checking for "vectorlength,"
482 "nomask," and "mask" strings in clause name.
483 (c_parser_omp_all_clauses): Added 3 new case statements:
484 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
485 PRAGMA_CILK_CLAUSE_NOMASK.
486 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
487 check for vector attribute and if so call the function
488 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
489 called the function c_finish_cilk_simd_fn_tokens.
490 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
491 parser field is non-empty. If so, parse them as you would parse
492 the omp declare simd pragma.
493 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
494 Added a check when step is a parameter and flag it as error.
495 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
496 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
499 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
501 * c-parser.c (c_parser_omp_parallel): Fix description.
503 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
505 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
506 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
507 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
508 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
510 2013-12-04 Joseph Myers <joseph@codesourcery.com>
513 * c-parser.c (c_parser_alignas_specifier): Use
514 c_sizeof_or_alignof_type instead of c_alignof.
515 (c_parser_alignof_expression): Likewise, with min_alignof
516 parameter depending on alignof spelling used.
518 2013-12-04 Marek Polacek <polacek@redhat.com>
521 * c-decl.c (start_function): Don't warn for missing prototype for
524 2013-12-03 Marek Polacek <polacek@redhat.com>
527 * c-decl.c (build_compound_literal): Allow compound literals with
530 2013-12-02 Joseph Myers <joseph@codesourcery.com>
533 * c-typeck.c (build_modify_expr): Diagnose assignment to
534 expression with array type.
536 2013-11-29 Joseph Myers <joseph@codesourcery.com>
539 * c-typeck.c (process_init_element): Do not treat a string as
540 initializing a whole array when used with a designator for an
543 2013-11-29 Joseph Myers <joseph@codesourcery.com>
546 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
547 an inline function following a static declaration.
549 2013-11-28 Jakub Jelinek <jakub@redhat.com>
552 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
553 to p_name before calling c_parser_omp_teams instead of after.
554 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
555 argument. Remove unused p_name variable.
557 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
558 Jakub Jelinek <jakub@redhat.com>
560 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
561 external_scope is NULL.
563 2013-11-27 Tom de Vries <tom@codesourcery.com>
564 Marc Glisse <marc.glisse@inria.fr>
567 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
569 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
571 * c-typeck.c: Add required include files from gimple.h.
573 2013-11-22 David Malcolm <dmalcolm@redhat.com>
575 * c-decl.c (define_label, shadow_tag_warned)
576 (check_bitfield_type_and_width, grokdeclarator, grokparms,
577 store_parm_decls_newstyle, store_parm_decls_oldstyle)
578 (declspecs_add_type): Remove use of in_system_header macro.
579 * c-parser.c (c_parser_unary_expression): Likewise.
580 * c-typeck.c (store_init_value, process_init_element)
581 (c_start_case): Likewise.
583 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
586 * c-parser.c (c_parser_set_source_position_from_token): Remove
587 reference to in_system_header from comment.
589 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
591 * c-decl.c (grokdeclarator): Update comment to refer to
592 tree_to_[su]hwi rather than tree_low_cst.
594 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
596 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
597 tree_to_uhwi throughout.
599 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
601 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
604 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
606 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
609 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
611 * c-parser.c (c_parser_cilk_simd): New.
612 (c_parser_cilk_verify_simd): New.
613 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
614 (c_parser_omp_for_loop): Add case for NE_EXPR.
615 Set c_break_label for CILK_SIMD.
616 (c_parser_cilk_clause_vectorlength): New.
617 (c_parser_cilk_clause_linear): New.
618 (c_parser_cilk_clause_name): New.
619 (c_parser_cilk_all_clauses): New.
620 * c-typeck.c (build_unary_op): Pass location argument to
622 (build_modify_expr): Same.
623 (build_asm_expr): Same.
624 (c_finish_bc_stmt): Error on break/continue in loops.
626 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
628 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
630 2013-11-14 Diego Novillo <dnovillo@google.com>
632 * c-decl.c: Include print-tree.h.
633 Include stor-layout.h.
636 Include stringpool.h.
637 * c-lang.c: Include fold-const.h.
638 * c-parser.c: Include stringpool.h.
640 Include stor-layout.h.
643 * c-typeck.c: Include stor-layout.h.
648 2013-11-13 Joseph Myers <joseph@codesourcery.com>
650 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
651 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
653 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
654 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
656 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
657 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
658 (c_parser_declarator, c_parser_direct_declarator_inner)
659 (c_parser_parameter_declaration, c_parser_type_name): All callers
661 (c_parser_declaration_or_fndef): Handle declarations with type
662 determined from the initializer.
664 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
666 * c-typeck.c: Include gimplify.h.
668 2013-11-12 Joseph Myers <joseph@codesourcery.com>
670 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
671 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
673 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
674 or _Thread_local as appropriate in diagnostics.
675 (build_null_declspecs): Initialize ret->thread_gnu_p.
676 (declspecs_add_scspec): Handle either __thread or _Thread_local
677 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
678 pedantic. Do not disallow _Thread_local extern and _Thread_local
681 2013-11-07 Joseph Myers <joseph@codesourcery.com>
682 Andrew MacLeod <amacleod@redhat.com>
684 * c-aux-info.c (gen_type): Handle atomic qualifier.
685 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
686 qualifiers when compating types.
687 (shadow_tag_warned): Handle atomic_p in declspecs.
688 (quals_from_declspecs): Likewise.
689 (start_decl): Use c_type_promotes_to when promoting argument
691 (grokdeclarator): Handle _Atomic.
692 (get_parm_info): Diagnose any qualifier on "void" as only
694 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
695 comparing types. Use c_type_promotes_to when promoting argument
697 (finish_function): Use c_type_promotes_to when promoting argument
699 (build_null_declspecs): Handle atomic_p in declspecs.
700 (declspecs_add_qual): Handle RID_ATOMIC.
701 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
702 (c_token_starts_declspecs): Handle RID_ATOMIC.
703 (c_parser_declspecs): Handle atomic type specifiers and
705 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
706 from types of expressions with atomic type.
707 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
708 (c_parser_attribute_any_word): Handle RID_ATOMIC.
709 (c_parser_initializer, c_parser_initelt, c_parser_initval)
710 (c_parser_statement_after_labels, c_parser_switch_statement)
711 (c_parser_for_statement, c_parser_expr_no_commas)
712 (c_parser_conditional_expression, c_parser_binary_expression)
713 (c_parser_cast_expression, c_parser_unary_expression)
714 (c_parser_postfix_expression)
715 (c_parser_postfix_expression_after_primary, c_parser_expression):
716 Use convert_lvalue_to_rvalue.
717 (c_parser_expression_conv, c_parser_expr_list): Document
718 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
719 (c_parser_objc_synchronized_statement): Use
720 convert_lvalue_to_rvalue.
721 (c_parser_objc_selector): Handle RID_ATOMIC.
722 (c_parser_objc_receiver, c_parser_array_notation): Use
723 convert_lvalue_to_rvalue.
724 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
726 (struct c_declspecs): Add atomic_p field.
727 (convert_lvalue_to_rvalue): Declare.
728 * c-typeck.c (c_type_promotes_to): Promote atomic types to
729 corresponding atomic types.
730 (qualify_type): Don't add _Atomic qualifiers from second argument.
731 (comp_target_types): Do not allow _Atomic mismatches.
732 (type_lists_compatible_p): Do not remove atomic qualifiers when
734 (really_atomic_lvalue, convert_lvalue_to_rvalue)
735 (build_atomic_assign): New functions.
736 (build_unary_op): Use build_atomic_assign for atomic increment and
738 (build_conditional_expr): Do not treat _Atomic void as a qualified
740 (build_modify_expr): Use build_atomic_assign for atomic LHS.
741 (find_anonymous_field_with_type, convert_to_anonymous_field)
742 (convert_for_assignment): Do not remove atomic qualifiers when
744 (digest_init): Do not accept initialization of arrays of atomic
745 elements by string constants.
746 (build_asm_expr): Use convert_lvalue_to_rvalue.
747 (build_binary_op): Do not treat _Atomic void as a qualified
750 2013-11-06 DJ Delorie <dj@redhat.com>
752 * c-decl.c (locate_old_decl): If a previous conflicting decl is
753 both explicit and builtin, print the location of the explicit one.
755 2013-11-05 Tobias Burnus <burnus@net-b.de>
757 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
758 c_parser_omp_distribute, c_parser_omp_teams,
759 c_parser_omp_target, c_parser_omp_declare): Handle
762 2013-11-03 Marek Polacek <polacek@redhat.com>
764 * c-decl.c (grokdeclarator): Add VLA instrumentation.
766 2013-11-01 Jakub Jelinek <jakub@redhat.com>
768 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
769 check_dup_generic at the end, unless remove is true.
770 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
772 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
774 2013-10-31 Jakub Jelinek <jakub@redhat.com>
776 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
777 with decl that is not pointer nor array.
779 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
781 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
782 a spawning function is found.
783 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
784 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
785 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
786 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
788 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
789 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
791 (c_finish_return): Added a check to reject _Cilk_spawn in return
793 (build_cilk_spawn): New function.
794 (build_cilk_sync): Likewise.
795 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
797 2013-10-27 Tobias Burnus <burnus@net-b.de>
800 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
801 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
802 (c_parser_statement_after_labels): Update calls.
804 2013-10-24 Tobias Burnus <burnus@net-b.de>
807 * c-parser.c (c_parser_pragma, c_parser_for_statement):
809 (c_parser_statement_after_labels): Update call.
811 2013-10-24 Marek Polacek <polacek@redhat.com>
813 * c-parser.c (c_parser_struct_declaration): Add a comment.
814 (c_parser_declarator): Don't allow _Alignas here.
816 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
818 * c-parser.c: Include omp-low.h.
819 * c-typeck.c: Likewise.
821 2013-10-17 Marek Polacek <polacek@redhat.com>
824 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
825 Document syntax of the array-declarator.
826 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
828 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
829 (c_parser_struct_declaration): Likewise.
830 (c_parser_declarator): Likewise.
831 (c_parser_direct_declarator_inner): Likewise.
832 (c_parser_parameter_declaration): Likewise.
833 (c_parser_type_name): Likewise.
835 2013-10-11 Jakub Jelinek <jakub@redhat.com>
837 * c-lang.h (current_omp_declare_target_attribute): New extern
839 * c-parser.c: Include c-lang.h.
840 (struct c_parser): Change tokens to c_token *.
841 Add tokens_buf field. Change tokens_avail type to unsigned int.
842 (c_parser_consume_token): If parser->tokens isn't
843 &parser->tokens_buf[0], increment parser->tokens.
844 (c_parser_consume_pragma): Likewise.
845 (enum pragma_context): Add pragma_struct and pragma_param.
846 (c_parser_external_declaration): Adjust
847 c_parser_declaration_or_fndef caller.
848 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
849 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
850 Adjust recursive call.
851 (c_parser_struct_or_union_specifier): Use pragma_struct instead
853 (c_parser_parameter_declaration): Use pragma_param instead of
855 (c_parser_compound_statement_nostart, c_parser_label,
856 c_parser_for_statement): Adjust
857 c_parser_declaration_or_fndef callers.
858 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
859 it through to c_parser_conditional_expression.
860 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
861 pass it through to c_parser_binary_expression. Adjust recursive
863 (c_parser_binary_expression): Remove prec argument, add
864 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
865 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
866 binop matches it, use build2 instead of parser_build_binary_op.
867 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
868 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
869 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
870 Handle pragma_struct and pragma_param the same as pragma_external.
871 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
872 (c_parser_omp_variable_list): Parse array sections for
873 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
874 (c_parser_omp_clause_collapse): Fully fold collapse expression.
875 (c_parser_omp_clause_reduction): Handle user defined reductions.
876 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
877 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
878 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
879 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
880 c_parser_omp_clause_depend, c_parser_omp_clause_map,
881 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
882 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
883 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
884 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
885 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
886 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
887 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
888 (c_parser_omp_for_loop): Add CODE argument, pass it through
889 to c_finish_omp_for. Change last argument to cclauses,
890 and adjust uses to grab parallel clauses from the array of all
891 the split clauses. Adjust c_parser_binary_expression,
892 c_parser_declaration_or_fndef and c_finish_omp_for callers.
893 (omp_split_clauses): New function.
894 (c_parser_omp_simd): New function.
895 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
896 Allow the function to be called also when parsing combined constructs,
897 and call c_parser_omp_simd when parsing for simd.
898 (c_parser_omp_sections_scope): If section-sequence doesn't start with
899 #pragma omp section, require exactly one structured-block instead of
900 sequence of statements.
901 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
902 Allow the function to be called also when parsing combined constructs.
903 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
904 Allow the function to be called also when parsing combined
906 (c_parser_omp_taskgroup, c_parser_omp_cancel,
907 c_parser_omp_cancellation_point, c_parser_omp_distribute,
908 c_parser_omp_teams, c_parser_omp_target_data,
909 c_parser_omp_target_update, c_parser_omp_target,
910 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
911 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
912 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
913 (c_parser_omp_construct): Add p_name and mask vars. Handle
914 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
915 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
916 and c_parser_omp_sections callers.
917 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
918 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
919 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
920 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
921 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
923 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
924 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
925 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
926 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
927 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
928 * c-typeck.c: Include tree-inline.h.
929 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
930 handle_omp_array_sections_1, handle_omp_array_sections,
931 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
932 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
933 user defined reductions.
934 (c_tree_equal): New function.
935 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
936 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
937 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
938 c_check_omp_declare_reduction_r): New prototypes.
939 * c-decl.c (current_omp_declare_target_attribute): New variable.
940 (c_decl_attributes): New function.
941 (start_decl, start_function): Use it instead of decl_attributes.
942 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
943 c_omp_reduction_decl, c_omp_reduction_lookup,
944 c_check_omp_declare_reduction_r): New functions.
946 2013-09-25 Tom Tromey <tromey@redhat.com>
948 * Make-lang.in (c/gccspec.o): Remove.
949 (CFLAGS-c/gccspec.o): New variable.
950 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
951 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
952 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
954 2013-09-25 Tom Tromey <tromey@redhat.com>
956 * Make-lang.in (c/gccspec.o): Don't use subshell.
958 2013-09-18 Marek Polacek <polacek@redhat.com>
961 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
962 Remove unnecessary check.
964 2013-09-18 Marek Polacek <polacek@redhat.com>
967 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
968 no_sanitize_undefined attribute.
970 2013-09-13 Kai Tietz <ktietz@redhat.com>
973 * c-decl.c (c_builtin_function_ext_scope): Remove
974 wrong assumption that it is never called on prexisting
977 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
979 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
981 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
983 * c-objc-common.c (c_tree_printer): Tidy.
985 2013-08-30 Marek Polacek <polacek@redhat.com>
987 * c-typeck.c (build_binary_op): Add division by zero and shift
990 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
991 Joseph Myers <joseph@codesourcery.com>
994 * c-typeck.c (c_common_type): Prefer double_type_node over
995 other REAL_TYPE types with the same precision.
996 (convert_arguments): Likewise.
998 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
1000 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
1001 (c_initialize_diagnostics): Call a destructor for the early printer.
1003 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1005 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
1006 printer initialization.
1008 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
1011 * c-array-notation.c (fix_conditional_array_notations_1): Added a
1012 check for truth values.
1013 (expand_array_notation_exprs): Added truth values case. Removed an
1014 unwanted else. Added for-loop to walk through subtrees in default
1017 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
1019 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
1021 2013-07-23 Joseph Myers <joseph@codesourcery.com>
1023 * c-parser.c (struct c_generic_association): Fix typo.
1025 2013-07-23 Tom Tromey <tromey@redhat.com>
1026 Joseph Myers <joseph@codesourcery.com>
1028 * c-parser.c (struct c_generic_association): New.
1029 (c_generic_association_d): New typedef.
1030 (c_parser_generic_selection): New function.
1031 (c_parser_postfix_expression): Handle RID_GENERIC.
1033 2013-07-13 Jason Merrill <jason@redhat.com>
1036 * c-decl.c (finish_struct): Check for too-large class.
1038 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
1041 * c-typeck.c (set_init_index): When folding, check for index overflow.
1043 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
1045 * c-parser.c (c_parser_array_notation): Removed rejection of array
1046 notations in an array of function pointers.
1048 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
1050 * c-array-notation.c (make_triplet_val_inv): New function.
1051 (create_cmp_incr): Likewise.
1052 (create_array_refs): Likewise.
1053 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
1054 Also modularized common parts between functions and called the function.
1055 (build_array_notation_expr): Likewise.
1056 (fix_conditional_array_notations_1): Likewise.
1057 (fix_array_notation_expr): Likewise.
1058 (fix_array_notation_call_expr): Likewise.
1060 2013-06-18 Marek Polacek <polacek@redhat.com>
1063 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
1065 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
1067 * c-array-notation.c (build_array_notation_expr): Reject array notation
1068 mismatch between LHS and RHS even inside a call_expr. Also, removed
1069 a couple while statements that were dead code.
1071 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
1073 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
1074 excessive precision expressions in function parameters. Also removed
1075 couple unwanted while statements.
1077 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
1079 * c-array-notation.c (expand_array_notation_exprs): Added
1080 ARRAY_NOTATION_REF case.
1082 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
1084 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
1085 function to c-family/array-notation-common.c.
1086 (is_cilkplus_reduce_builtin): Likewise.
1087 (find_rank): Likewise.
1088 (extract_array_notation_exprs): Likewise.
1089 (replace_array_notations): Likewise.
1090 (find_inv_trees): Likewise.
1091 (replace_inv_trees): Likewise.
1092 (contains_array_notation_expr): Likewise.
1093 (find_correct_array_notation_type): Likewise.
1094 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
1095 (struct inv_list): Moved this to c-family/array-notation-common.c.
1096 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
1098 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
1100 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
1101 reduction functions outside the for-loop. Added a check if the fundecl
1102 is non-NULL. Finally, removed an unwanted if-statement, and made the
1105 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
1107 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
1108 condition of the if-statement matches the rank of else-block and then-
1109 block when array notations are used.
1110 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
1111 expression after the entire function body is parsed.
1112 (c_parser_expr_no_commas): Delayed creating array notation expressions
1113 to the end of function parsing.
1114 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
1115 whole if-statement instead of just the condition.
1116 (expand_array_notation_exprs): Added MODIFY_EXPR case.
1118 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
1121 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
1122 array to NULL_TREE if they are unused. Also added a check for the
1123 field to be NULL before its fields are used in future.
1125 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1128 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
1129 (build_array_notation_expr): Likewise.
1131 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
1133 * c-typeck.c (build_array_ref): Added a check to see if array's
1134 index is greater than one. If true, then emit an error.
1135 (build_function_call_vec): Exclude error reporting and checking
1136 for builtin array-notation functions.
1137 (convert_arguments): Likewise.
1138 (c_finish_return): Added a check for array notations as a return
1139 expression. If true, then emit an error.
1140 (c_finish_loop): Added a check for array notations in a loop
1141 condition. If true then emit an error.
1142 (lvalue_p): Added a ARRAY_NOTATION_REF case.
1143 (build_binary_op): Added a check for array notation expr inside
1144 op1 and op0. If present, we call another function to find correct
1146 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
1147 * c-parser.c (c_parser_compound_statement): Check if array
1148 notation code is used in tree, if so, then transform them into
1150 (c_parser_expr_no_commas): Check if array notation is used in LHS
1151 or RHS, if so, then build array notation expression instead of
1153 (c_parser_postfix_expression_after_primary): Added a check for
1154 colon(s) after square braces, if so then handle it like an array
1155 notation. Also, break up array notations in unary op if found.
1156 (c_parser_direct_declarator_inner): Added a check for array
1158 (c_parser_compound_statement): Added a check for array notation in
1159 a stmt. If one is present, then expand array notation expr.
1160 (c_parser_if_statement): Likewise.
1161 (c_parser_switch_statement): Added a check for array notations in
1162 a switch statement's condition. If true, then output an error.
1163 (c_parser_while_statement): Similarly, but for a while.
1164 (c_parser_do_statement): Similarly, but for a do-while.
1165 (c_parser_for_statement): Similarly, but for a for-loop.
1166 (c_parser_unary_expression): Check if array notation is used in a
1167 pre-increment or pre-decrement expression. If true, then expand
1169 (c_parser_array_notation): New function.
1170 * c-array-notation.c: New file.
1171 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
1173 2013-05-23 Mike Stump <mikestump@comcast.net>
1175 * c-typeck.c (convert_for_assignment): Handle references to memory
1178 2013-05-16 Jason Merrill <jason@redhat.com>
1180 * Make-lang.in (cc1$(exeext)): Use link mutex.
1182 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
1184 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
1185 to simply use OPT_Wpointer_arith.
1186 (build_unary_op): Likewise.
1188 2013-04-03 Jakub Jelinek <jakub@redhat.com>
1191 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
1192 argument. If set, or it temporarily for parsing of the first
1193 argument into force_folding_builtin_constant_p.
1194 (c_parser_postfix_expression): Adjust callers.
1196 2013-03-21 Richard Biener <rguenther@suse.de>
1198 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
1199 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
1201 2013-02-12 Marek Polacek <polacek@redhat.com>
1204 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
1207 2013-01-24 Jakub Jelinek <jakub@redhat.com>
1210 * c-typeck.c (set_nonincremental_init_from_string): If
1211 constructor_max_index is NULL, treat it as if tree_int_cst_lt
1213 (process_init_element): Likewise.
1215 2012-12-20 Jakub Jelinek <jakub@redhat.com>
1218 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
1219 argument, don't call default_function_array_conversion
1220 nor c_fully_fold here.
1221 (c_parser_asm_statement): Adjust callers.
1222 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
1223 and outputs here, and call default_function_array_conversion
1224 on inputs that don't need to be addressable.
1226 2012-12-18 Jakub Jelinek <jakub@redhat.com>
1229 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
1230 warning require that both c_common_unsigned_type as well as
1231 c_common_signed_type is the same for both mvl and mvr types.
1233 2012-11-16 Diego Novillo <dnovillo@google.com>
1235 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
1237 * c-common.c: Use new vec API in vec.h.
1238 * c-common.h: Likewise.
1239 * c-gimplify.c: Likewise.
1240 * c-pragma.c: Likewise.
1241 * c-pretty-print.c: Likewise.
1242 * c-pretty-print.h: Likewise.
1243 * c-semantics.c: Likewise.
1244 * c-decl.c: Likewise.
1245 * c-parser.c: Likewise.
1246 * c-tree.h: Likewise.
1247 * c-typeck.c: Likewise.
1249 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
1252 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
1254 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1257 * c-decl.c (warn_if_shadowing): Do not warn if a variable
1258 shadows a function, unless the variable is a function or a
1259 pointer-to-function.
1261 2012-10-12 Jakub Jelinek <jakub@redhat.com>
1264 * c-parser.c (struct c_tree_loc_pair): Removed.
1265 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
1266 add location_t * and tree * arguments, fill in array of 3
1267 sizeof_arg trees and corresponding locs.
1268 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
1269 c_parser_expr_list callers.
1270 (c_parser_postfix_expression_after_primary): Likewise. Pass
1271 array of 3 sizeof_arg trees and locs (corresponding to first
1272 3 arguments) to sizeof_pointer_memaccess_warning.
1274 2012-10-09 Lawrence Crowl <crowl@google.com>
1276 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
1277 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
1280 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
1283 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
1286 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
1289 * c-typeck.c: Include c-common.h.
1290 (enum stv_conv): Moved to c-common.h.
1291 (scalar_to_vector): Moved to c-common.c.
1292 (build_binary_op): Adapt to scalar_to_vector's new prototype.
1293 * Make-lang.in: c-typeck.c depends on c-common.h.
1295 2012-10-04 Arnaud Charlet <charlet@adacore.com>
1297 * c-decl.c (c_write_global_declarations): Fix handling of
1300 2012-09-30 Sharad Singhai <singhai@google.com>
1302 * c-decl.c (c_write_global_declarations): Use a different method
1303 to determine if the dump has ben initialized.
1305 2012-09-14 Joseph Myers <joseph@codesourcery.com>
1308 * c-typeck.c (c_cast_expr): When casting to a type requiring
1309 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
1312 2012-09-14 Joseph Myers <joseph@codesourcery.com>
1315 * c-typeck.c (build_unary_op): Pass original argument of
1316 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
1317 any C_MAYBE_CONST_EXPR, if it has integer operands.
1318 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
1319 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
1320 to c_objc_common_truthvalue_conversion, then remove any
1321 C_MAYBE_CONST_EXPR, if they have integer operands. Use
1322 c_objc_common_truthvalue_conversion not
1323 c_common_truthvalue_conversion.
1324 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
1325 call note_integer_operands for arguments with integer operands
1326 that are not integer constants.
1328 2012-09-13 Jakub Jelinek <jakub@redhat.com>
1331 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
1332 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
1334 2012-08-31 Jakub Jelinek <jakub@redhat.com>
1337 * c-convert.c (convert): Don't call fold_convert_loc if
1338 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
1339 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
1340 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
1342 2012-08-24 Jakub Jelinek <jakub@redhat.com>
1345 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
1346 for nested and empty_ok arguments in the call to
1347 c_parser_declaration_or_fndef.
1349 2012-08-17 Jakub Jelinek <jakub@redhat.com>
1351 * c-tree.h (c_last_sizeof_arg): Declare.
1352 * c-parser.c (struct c_tree_loc_pair): New type.
1353 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
1355 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
1356 (c_parser_postfix_expression_after_primary): Likewise. Call
1357 sizeof_pointer_memaccess_warning if needed.
1358 (sizeof_ptr_memacc_comptypes): New function.
1359 * c-typeck.c (c_last_sizeof_arg): New global variable.
1360 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
1362 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
1364 * c-lang.h (lang_decl): Add variable_size GTY option.
1366 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
1368 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
1369 * Make-lang.in: Fix dependencies.
1371 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
1373 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
1374 and add language Makefile hooks.
1375 * config-lang.in: New file.
1376 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
1377 add the required "normal" config-lang.in rules.
1378 * c-lang.h: Moved from gcc/ to here.
1379 * c-tree.h: Likewise.
1380 * c-objc-common.c: Likewise.
1381 * c-objc-common.h: Likewise.
1382 * c-typeck.c: Likewise.
1383 * c-convert.c: Likewise.
1384 * c-lang.c: Likewise.
1385 * c-aux-info.c: Likewise.
1386 * c-errors.c: Likewise.
1387 * gccspec.c: Likewise.
1388 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
1389 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
1391 Copyright (C) 2012-2014 Free Software Foundation, Inc.
1393 Copying and distribution of this file, with or without modification,
1394 are permitted in any medium without royalty provided the copyright
1395 notice and this notice are preserved.