* Makefile.in (C_COMMON_OBJS): Depend on c-cilkplus.o.
[official-gcc.git] / gcc / c / ChangeLog
blobf1b1a4961853c7e4b8a7176caddd93b30c82962c
1 2013-11-15  Aldy Hernandez  <aldyh@redhat.com>
3         * c-parser.c (c_parser_cilk_simd): New.
4         (c_parser_cilk_verify_simd): New.
5         (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
6         (c_parser_omp_for_loop): Add case for NE_EXPR.
7         Set c_break_label for CILK_SIMD.
8         (c_parser_cilk_clause_vectorlength): New.
9         (c_parser_cilk_clause_linear): New.
10         (c_parser_cilk_clause_name): New.
11         (c_parser_cilk_all_clauses): New.
12         * c-typeck.c (build_unary_op): Pass location argument to
13         readonly_error.
14         (build_modify_expr): Same.
15         (build_asm_expr): Same.
16         (c_finish_bc_stmt): Error on break/continue in loops.
18 2013-11-14  Andrew MacLeod  <amacleod@redhat.com>
20         * c-typeck.c: Include only gimplify.h and gimple.h as needed.
22 2013-11-13  Joseph Myers  <joseph@codesourcery.com>
24         * c-tree.h (c_typespec_keyword): Add cts_auto_type.
25         * c-decl.c (declspecs_add_type, finish_declspecs): Handle
26         __auto_type.
27         * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
28         (c_parser_attribute_any_word, c_parser_objc_selector): Handle
29         RID_AUTO_TYPE.
30         (c_parser_declspecs): Take argument AUTO_TYPE_OK.
31         (c_parser_declaration_or_fndef, c_parser_struct_declaration)
32         (c_parser_declarator, c_parser_direct_declarator_inner)
33         (c_parser_parameter_declaration, c_parser_type_name): All callers
34         changed.
35         (c_parser_declaration_or_fndef): Handle declarations with type
36         determined from the initializer.
38 2013-11-12  Andrew MacLeod  <amacleod@redhat.com>
40         * c-typeck.c: Include gimplify.h.
42 2013-11-12  Joseph Myers  <joseph@codesourcery.com>
44         * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
45         * c-parser.c (c_parser_declspecs): Mention _Thread_local in
46         comment.
47         * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
48         or _Thread_local as appropriate in diagnostics.
49         (build_null_declspecs): Initialize ret->thread_gnu_p.
50         (declspecs_add_scspec): Handle either __thread or _Thread_local
51         for RID_THREAD.  Diagnose _Thread_local for pre-C11 standards if
52         pedantic.  Do not disallow _Thread_local extern and _Thread_local
53         static.
55 2013-11-07  Joseph Myers  <joseph@codesourcery.com>
56             Andrew MacLeod  <amacleod@redhat.com>
58         * c-aux-info.c (gen_type): Handle atomic qualifier.
59         * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
60         qualifiers when compating types.
61         (shadow_tag_warned): Handle atomic_p in declspecs.
62         (quals_from_declspecs): Likewise.
63         (start_decl): Use c_type_promotes_to when promoting argument
64         types.
65         (grokdeclarator): Handle _Atomic.
66         (get_parm_info): Diagnose any qualifier on "void" as only
67         parameter.
68         (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
69         comparing types.  Use c_type_promotes_to when promoting argument
70         types.
71         (finish_function): Use c_type_promotes_to when promoting argument
72         types.
73         (build_null_declspecs): Handle atomic_p in declspecs.
74         (declspecs_add_qual): Handle RID_ATOMIC.
75         * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
76         (c_token_starts_declspecs): Handle RID_ATOMIC.
77         (c_parser_declspecs): Handle atomic type specifiers and
78         qualifiers.
79         (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
80         from types of expressions with atomic type.
81         (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
82         (c_parser_attribute_any_word): Handle RID_ATOMIC.
83         (c_parser_initializer, c_parser_initelt, c_parser_initval)
84         (c_parser_statement_after_labels, c_parser_switch_statement)
85         (c_parser_for_statement, c_parser_expr_no_commas)
86         (c_parser_conditional_expression, c_parser_binary_expression)
87         (c_parser_cast_expression, c_parser_unary_expression)
88         (c_parser_postfix_expression)
89         (c_parser_postfix_expression_after_primary, c_parser_expression):
90         Use convert_lvalue_to_rvalue.
91         (c_parser_expression_conv, c_parser_expr_list): Document
92         conversion of lvalues to rvalues.  Use convert_lvalue_to_rvalue.
93         (c_parser_objc_synchronized_statement): Use
94         convert_lvalue_to_rvalue.
95         (c_parser_objc_selector): Handle RID_ATOMIC.
96         (c_parser_objc_receiver, c_parser_array_notation): Use
97         convert_lvalue_to_rvalue.
98         * c-tree.h (ctsk_typeof): Adjust comment to mention use for
99         _Atomic (type-name).
100         (struct c_declspecs): Add atomic_p field.
101         (convert_lvalue_to_rvalue): Declare.
102         * c-typeck.c (c_type_promotes_to): Promote atomic types to
103         corresponding atomic types.
104         (qualify_type): Don't add _Atomic qualifiers from second argument.
105         (comp_target_types): Do not allow _Atomic mismatches.
106         (type_lists_compatible_p): Do not remove atomic qualifiers when
107         comparing types.
108         (really_atomic_lvalue, convert_lvalue_to_rvalue)
109         (build_atomic_assign): New functions.
110         (build_unary_op): Use build_atomic_assign for atomic increment and
111         decrement.
112         (build_conditional_expr): Do not treat _Atomic void as a qualified
113         version of void.
114         (build_modify_expr): Use build_atomic_assign for atomic LHS.
115         (find_anonymous_field_with_type, convert_to_anonymous_field)
116         (convert_for_assignment): Do not remove atomic qualifiers when
117         comparing types.
118         (digest_init): Do not accept initialization of arrays of atomic
119         elements by string constants.
120         (build_asm_expr): Use convert_lvalue_to_rvalue.
121         (build_binary_op): Do not treat _Atomic void as a qualified
122         version of void.
124 2013-11-06  DJ Delorie  <dj@redhat.com>
126         * c-decl.c (locate_old_decl): If a previous conflicting decl is
127         both explicit and builtin, print the location of the explicit one.
129 2013-11-05  Tobias Burnus  <burnus@net-b.de>
131         * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
132         c_parser_omp_distribute, c_parser_omp_teams,
133         c_parser_omp_target, c_parser_omp_declare): Handle
134         -fopenmp-simd.
136 2013-11-03  Marek Polacek  <polacek@redhat.com>
138         * c-decl.c (grokdeclarator): Add VLA instrumentation.
140 2013-11-01  Jakub Jelinek  <jakub@redhat.com>
142         * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
143         check_dup_generic at the end, unless remove is true.
144         (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
145         remove = true;.
146         (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
148 2013-10-31  Jakub Jelinek  <jakub@redhat.com>
150         * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
151         with decl that is not pointer nor array.
153 2013-10-29  Balaji V. Iyer  <balaji.v.iyer@intel.com>
155         * c-decl.c (finish_function): Added a call for insert_cilk_frame when
156         a spawning function is found.
157         * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
158         (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
159         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
160         * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
161         case.
162         (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
163         * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
164         expr.
165         (c_finish_return): Added a check to reject _Cilk_spawn in return
166         expression.
167         (build_cilk_spawn): New function.
168         (build_cilk_sync): Likewise.
169         * Makefile.in (c-decl.o): Added cilk.h in dependency list.
170         
171 2013-10-27  Tobias Burnus  <burnus@net-b.de>
173         PR other/33426
174         * c-parser.c (c_parser_while_statement, c_parser_while_statement,
175         c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
176         (c_parser_statement_after_labels): Update calls.
178 2013-10-24  Tobias Burnus  <burnus@net-b.de>
180         PR other/33426
181         * c-parser.c (c_parser_pragma, c_parser_for_statement):
182         Handle PRAGMA_IVDEP.
183         (c_parser_statement_after_labels): Update call.
185 2013-10-24  Marek Polacek  <polacek@redhat.com>
187         * c-parser.c (c_parser_struct_declaration): Add a comment.
188         (c_parser_declarator): Don't allow _Alignas here.
190 2013-10-17  Andrew MacLeod  <amacleod@redhat.com>
192         * c-parser.c: Include omp-low.h.
193         * c-typeck.c: Likewise.
195 2013-10-17  Marek Polacek  <polacek@redhat.com>
197         PR c/58267
198         * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
199         Document syntax of the array-declarator.
200         (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
201         are not permitted.
202         (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
203         (c_parser_struct_declaration): Likewise.
204         (c_parser_declarator): Likewise.
205         (c_parser_direct_declarator_inner): Likewise.
206         (c_parser_parameter_declaration): Likewise.
207         (c_parser_type_name): Likewise.
209 2013-10-11  Jakub Jelinek  <jakub@redhat.com>
211         * c-lang.h (current_omp_declare_target_attribute): New extern
212         decl.
213         * c-parser.c: Include c-lang.h.
214         (struct c_parser): Change tokens to c_token *.
215         Add tokens_buf field.  Change tokens_avail type to unsigned int.
216         (c_parser_consume_token): If parser->tokens isn't
217         &parser->tokens_buf[0], increment parser->tokens.
218         (c_parser_consume_pragma): Likewise.
219         (enum pragma_context): Add pragma_struct and pragma_param.
220         (c_parser_external_declaration): Adjust
221         c_parser_declaration_or_fndef caller.
222         (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
223         argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
224         Adjust recursive call.
225         (c_parser_struct_or_union_specifier): Use pragma_struct instead
226         of pragma_external.
227         (c_parser_parameter_declaration): Use pragma_param instead of
228         pragma_external.
229         (c_parser_compound_statement_nostart, c_parser_label,
230         c_parser_for_statement): Adjust
231         c_parser_declaration_or_fndef callers.
232         (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
233         it through to c_parser_conditional_expression.
234         (c_parser_conditional_expression): Add omp_atomic_lhs argument,
235         pass it through to c_parser_binary_expression.  Adjust recursive
236         call.
237         (c_parser_binary_expression): Remove prec argument, add
238         omp_atomic_lhs argument instead.  Always start from PREC_NONE, if
239         omp_atomic_lhs is non-NULL and one of the arguments of toplevel
240         binop matches it, use build2 instead of parser_build_binary_op.
241         (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
242         PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
243         PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
244         Handle pragma_struct and pragma_param the same as pragma_external.
245         (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
246         (c_parser_omp_variable_list): Parse array sections for
247         OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
248         (c_parser_omp_clause_collapse): Fully fold collapse expression.
249         (c_parser_omp_clause_reduction): Handle user defined reductions.
250         (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
251         c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
252         c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
253         c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
254         c_parser_omp_clause_depend, c_parser_omp_clause_map,
255         c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
256         c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
257         c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
258         (c_parser_omp_all_clauses): Add finish_p argument.  Don't call
259         c_finish_omp_clauses if it is false.  Handle new OpenMP 4.0 clauses.
260         (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
261         present to c_finish_omp_atomic.  Handle OpenMP 4.0 atomic forms.
262         (c_parser_omp_for_loop): Add CODE argument, pass it through
263         to c_finish_omp_for.  Change last argument to cclauses,
264         and adjust uses to grab parallel clauses from the array of all
265         the split clauses.  Adjust c_parser_binary_expression,
266         c_parser_declaration_or_fndef and c_finish_omp_for callers.
267         (omp_split_clauses): New function.
268         (c_parser_omp_simd): New function.
269         (c_parser_omp_for): Add p_name, mask and cclauses arguments.
270         Allow the function to be called also when parsing combined constructs,
271         and call c_parser_omp_simd when parsing for simd.
272         (c_parser_omp_sections_scope): If section-sequence doesn't start with
273         #pragma omp section, require exactly one structured-block instead of
274         sequence of statements.
275         (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
276         Allow the function to be called also when parsing combined constructs.
277         (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
278         Allow the function to be called also when parsing combined
279         constructs.
280         (c_parser_omp_taskgroup, c_parser_omp_cancel,
281         c_parser_omp_cancellation_point, c_parser_omp_distribute,
282         c_parser_omp_teams, c_parser_omp_target_data,
283         c_parser_omp_target_update, c_parser_omp_target,
284         c_parser_omp_declare_simd, c_finish_omp_declare_simd,
285         c_parser_omp_declare_target, c_parser_omp_end_declare_target,
286         c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
287         (c_parser_omp_construct): Add p_name and mask vars.  Handle
288         PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
289         PRAGMA_OMP_TEAMS.  Adjust c_parser_omp_for, c_parser_omp_parallel
290         and c_parser_omp_sections callers.
291         (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
292         (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
293         OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
294         (OMP_PARALLEL_CLAUSE_MASK): Likewise.  Add OMP_CLAUSE_PROC_BIND.
295         (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.  Add
296         OMP_CLAUSE_DEPEND.
297         (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
298         OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
299         OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
300         OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
301         OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
302         * c-typeck.c: Include tree-inline.h.
303         (c_finish_omp_cancel, c_finish_omp_cancellation_point,
304         handle_omp_array_sections_1, handle_omp_array_sections,
305         c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
306         (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
307         user defined reductions.
308         (c_tree_equal): New function.
309         * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
310         c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
311         c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
312         c_check_omp_declare_reduction_r): New prototypes.
313         * c-decl.c (current_omp_declare_target_attribute): New variable.
314         (c_decl_attributes): New function.
315         (start_decl, start_function): Use it instead of decl_attributes.
316         (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
317         c_omp_reduction_decl, c_omp_reduction_lookup,
318         c_check_omp_declare_reduction_r): New functions.
320 2013-09-25  Tom Tromey  <tromey@redhat.com>
322         * Make-lang.in (c/gccspec.o): Remove.
323         (CFLAGS-c/gccspec.o): New variable.
324         (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
325         (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
326         (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
328 2013-09-25  Tom Tromey  <tromey@redhat.com>
330         * Make-lang.in (c/gccspec.o): Don't use subshell.
332 2013-09-18  Marek Polacek  <polacek@redhat.com>
334         PR sanitize/58443
335         * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
336         Remove unnecessary check.
338 2013-09-18  Marek Polacek  <polacek@redhat.com>
340         PR sanitizer/58411
341         * c-typeck.c (build_binary_op): Don't sanitize function if it has the
342         no_sanitize_undefined attribute.
344 2013-09-13  Kai Tietz  <ktietz@redhat.com>
346         PR target/57848
347         * c-decl.c (c_builtin_function_ext_scope): Remove
348         wrong assumption that it is never called on prexisting
349         symbol.
351 2013-09-08  Joern Rennecke  <joern.rennecke@embecosm.com>
353         * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
355 2013-09-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
357         * c-objc-common.c (c_tree_printer): Tidy.
359 2013-08-30  Marek Polacek  <polacek@redhat.com>
361         * c-typeck.c (build_binary_op): Add division by zero and shift
362         instrumentation.
364 2013-08-26  Joern Rennecke  <joern.rennecke@embecosm.com>
365             Joseph Myers  <joseph@codesourcery.com>
367         PR c/35649
368         * c-typeck.c (c_common_type): Prefer double_type_node over
369         other REAL_TYPE types with the same precision.
370         (convert_arguments): Likewise.
372 2013-08-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
374         * c-objc-common.c (c_tree_printer): Document the nature of the cast.
375         (c_initialize_diagnostics): Call a destructor for the early printer.
377 2013-08-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
379         * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
380         printer initialization.
382 2013-08-19  Balaji V. Iyer  <balaji.v.iyer@intel.com>
384         PR c/57490
385         * c-array-notation.c (fix_conditional_array_notations_1): Added a
386         check for truth values.
387         (expand_array_notation_exprs): Added truth values case.  Removed an
388         unwanted else.  Added for-loop to walk through subtrees in default
389         case.
391 2013-08-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
393         * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
395 2013-07-23  Joseph Myers  <joseph@codesourcery.com>
397         * c-parser.c (struct c_generic_association): Fix typo.
399 2013-07-23  Tom Tromey  <tromey@redhat.com>
400             Joseph Myers  <joseph@codesourcery.com>
402         * c-parser.c (struct c_generic_association): New.
403         (c_generic_association_d): New typedef.
404         (c_parser_generic_selection): New function.
405         (c_parser_postfix_expression): Handle RID_GENERIC.
407 2013-07-13  Jason Merrill  <jason@redhat.com>
409         PR c++/57793
410         * c-decl.c (finish_struct): Check for too-large class.
412 2013-07-04  Joern Rennecke  <joern.rennecke@embecosm.com>
414         PR c/57821
415         * c-typeck.c (set_init_index): When folding, check for index overflow.
417 2013-06-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
419         * c-parser.c (c_parser_array_notation): Removed rejection of array
420         notations in an array of function pointers.
422 2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
424         * c-array-notation.c (make_triplet_val_inv): New function.
425         (create_cmp_incr): Likewise.
426         (create_array_refs): Likewise.
427         (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
428         Also modularized common parts between functions and called the function.
429         (build_array_notation_expr): Likewise.
430         (fix_conditional_array_notations_1): Likewise.
431         (fix_array_notation_expr): Likewise.
432         (fix_array_notation_call_expr): Likewise.
434 2013-06-18  Marek Polacek  <polacek@redhat.com>
436         PR c/57630
437         * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
439 2013-06-12  Balaji V. Iyer  <balaji.v.iyer@intel.com>
441         * c-array-notation.c (build_array_notation_expr): Reject array notation
442         mismatch between LHS and RHS even inside a call_expr.  Also, removed
443         a couple while statements that were dead code.
445 2013-06-10  Balaji V. Iyer  <balaji.v.iyer@intel.com>
447         * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
448         excessive precision expressions in function parameters.  Also removed
449         couple unwanted while statements.
451 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
453         * c-array-notation.c (expand_array_notation_exprs): Added
454         ARRAY_NOTATION_REF case.
455         
456 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
458         * c-array-notation.c (length_mismatch_in_expr_p): Moved this
459         function to c-family/array-notation-common.c.
460         (is_cilkplus_reduce_builtin): Likewise.
461         (find_rank): Likewise.
462         (extract_array_notation_exprs): Likewise.
463         (replace_array_notations): Likewise.
464         (find_inv_trees): Likewise.
465         (replace_inv_trees): Likewise.
466         (contains_array_notation_expr): Likewise.
467         (find_correct_array_notation_type): Likewise.
468         (replace_invariant_exprs): Initialized additional_tcodes to NULL.
469         (struct inv_list): Moved this to c-family/array-notation-common.c.
470         * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
471         
472 2013-06-05  Balaji V. Iyer  <balaji.v.iyer@intel.com>
474         * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
475         reduction functions outside the for-loop.  Added a check if the fundecl
476         is non-NULL.  Finally, removed an unwanted if-statement, and made the
477         body unconditional.
479 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
481         * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
482         condition of the if-statement matches the rank of else-block and then-
483         block when array notations are used.
484         * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
485         expression after the entire function body is parsed.
486         (c_parser_expr_no_commas): Delayed creating array notation expressions
487         to the end of function parsing.
488         * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
489         whole if-statement instead of just the condition.
490         (expand_array_notation_exprs): Added MODIFY_EXPR case.  
492 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
494         PR c/57474
495         * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
496         array to NULL_TREE if they are unused.  Also added a check for the
497         field to be NULL before its fields are used in future.
498         
499 2013-05-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
501         PR bootstrap/57450
502         * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
503         (build_array_notation_expr): Likewise.
505 2013-05-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
507         * c-typeck.c (build_array_ref): Added a check to see if array's
508         index is greater than one.  If true, then emit an error.
509         (build_function_call_vec): Exclude error reporting and checking
510         for builtin array-notation functions.
511         (convert_arguments): Likewise.
512         (c_finish_return): Added a check for array notations as a return
513         expression.  If true, then emit an error.
514         (c_finish_loop): Added a check for array notations in a loop
515         condition.  If true then emit an error.
516         (lvalue_p): Added a ARRAY_NOTATION_REF case.
517         (build_binary_op): Added a check for array notation expr inside
518         op1 and op0.  If present, we call another function to find correct
519         type.
520         * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
521         * c-parser.c (c_parser_compound_statement): Check if array
522         notation code is used in tree, if so, then transform them into
523         appropriate C code.
524         (c_parser_expr_no_commas): Check if array notation is used in LHS
525         or RHS, if so, then build array notation expression instead of
526         regular modify.
527         (c_parser_postfix_expression_after_primary): Added a check for
528         colon(s) after square braces, if so then handle it like an array
529         notation.  Also, break up array notations in unary op if found.
530         (c_parser_direct_declarator_inner): Added a check for array
531         notation.
532         (c_parser_compound_statement): Added a check for array notation in
533         a stmt.  If one is present, then expand array notation expr.
534         (c_parser_if_statement): Likewise.
535         (c_parser_switch_statement): Added a check for array notations in
536         a switch statement's condition.  If true, then output an error.
537         (c_parser_while_statement): Similarly, but for a while.
538         (c_parser_do_statement): Similarly, but for a do-while.
539         (c_parser_for_statement): Similarly, but for a for-loop.
540         (c_parser_unary_expression): Check if array notation is used in a
541         pre-increment or pre-decrement expression.  If true, then expand
542         them.
543         (c_parser_array_notation): New function.
544         * c-array-notation.c: New file.
545         * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
546         
547 2013-05-23  Mike Stump  <mikestump@comcast.net>
549         * c-typeck.c (convert_for_assignment): Handle references to memory
550         spaces better.
552 2013-05-16  Jason Merrill  <jason@redhat.com>
554         * Make-lang.in (cc1$(exeext)): Use link mutex.
556 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
558         * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
559         to simply use OPT_Wpointer_arith.
560         (build_unary_op): Likewise.
562 2013-04-03  Jakub Jelinek  <jakub@redhat.com>
564         PR c/19449
565         * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
566         argument.  If set, or it temporarily for parsing of the first
567         argument into force_folding_builtin_constant_p.
568         (c_parser_postfix_expression): Adjust callers.
570 2013-03-21  Richard Biener  <rguenther@suse.de>
572         * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
573         instead of DECL_DEBUG_EXPR_IS_FROM.  Guard properly.
575 2013-02-12  Marek Polacek  <polacek@redhat.com>
577         PR c/44938
578         * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
579         origtypes to NULL.
581 2013-01-24  Jakub Jelinek  <jakub@redhat.com>
583         PR c/56078
584         * c-typeck.c (set_nonincremental_init_from_string): If
585         constructor_max_index is NULL, treat it as if tree_int_cst_lt
586         returned false.
587         (process_init_element): Likewise.
589 2012-12-20  Jakub Jelinek  <jakub@redhat.com>
591         PR c++/55619
592         * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
593         argument, don't call default_function_array_conversion
594         nor c_fully_fold here.
595         (c_parser_asm_statement): Adjust callers.
596         * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
597         and outputs here, and call default_function_array_conversion
598         on inputs that don't need to be addressable.
600 2012-12-18  Jakub Jelinek  <jakub@redhat.com>
602         PR c/39464
603         * c-typeck.c (convert_for_assignment): For -Wpointer-sign
604         warning require that both c_common_unsigned_type as well as
605         c_common_signed_type is the same for both mvl and mvr types.
607 2012-11-16  Diego Novillo  <dnovillo@google.com>
609         Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
611         * c-common.c: Use new vec API in vec.h.
612         * c-common.h: Likewise.
613         * c-gimplify.c: Likewise.
614         * c-pragma.c: Likewise.
615         * c-pretty-print.c: Likewise.
616         * c-pretty-print.h: Likewise.
617         * c-semantics.c: Likewise.
618         * c-decl.c: Likewise.
619         * c-parser.c: Likewise.
620         * c-tree.h: Likewise.
621         * c-typeck.c: Likewise.
623 2012-10-29  Jonathan Wakely  <jwakely.gcc@gmail.com>
625         PR c++/54930
626         * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
628 2012-10-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
630         PR c/53066
631         * c-decl.c (warn_if_shadowing): Do not warn if a variable
632         shadows a function, unless the variable is a function or a
633         pointer-to-function.
635 2012-10-12  Jakub Jelinek  <jakub@redhat.com>
637         PR c/54381
638         * c-parser.c (struct c_tree_loc_pair): Removed.
639         (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
640         add location_t * and tree * arguments, fill in array of 3
641         sizeof_arg trees and corresponding locs.
642         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
643         c_parser_expr_list callers.
644         (c_parser_postfix_expression_after_primary): Likewise.  Pass
645         array of 3 sizeof_arg trees and locs (corresponding to first
646         3 arguments) to sizeof_pointer_memaccess_warning.
648 2012-10-09  Lawrence Crowl  <crowl@google.com>
650         * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
651         * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
652         hash table.
654 2012-10-09  Paolo Carlini  <paolo.carlini@oracle.com>
656         PR c++/54194
657         * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
658         call.
660 2012-10-09  Marc Glisse  <marc.glisse@inria.fr>
662         PR c++/54427
663         * c-typeck.c: Include c-common.h.
664         (enum stv_conv): Moved to c-common.h.
665         (scalar_to_vector): Moved to c-common.c.
666         (build_binary_op): Adapt to scalar_to_vector's new prototype.
667         * Make-lang.in: c-typeck.c depends on c-common.h.
669 2012-10-04  Arnaud Charlet  <charlet@adacore.com>
671         * c-decl.c (c_write_global_declarations): Fix handling of
672         -fdump-ada-spec*.
674 2012-09-30  Sharad Singhai  <singhai@google.com>
676         * c-decl.c (c_write_global_declarations): Use a different method
677         to determine if the dump has ben initialized.
679 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
681         PR c/54552
682         * c-typeck.c (c_cast_expr): When casting to a type requiring
683         C_MAYBE_CONST_EXPR to be created, pass the inner expression to
684         c_fully_fold first.
686 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
688         PR c/54103
689         * c-typeck.c (build_unary_op): Pass original argument of
690         TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
691         any C_MAYBE_CONST_EXPR, if it has integer operands.
692         (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
693         TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
694         to c_objc_common_truthvalue_conversion, then remove any
695         C_MAYBE_CONST_EXPR, if they have integer operands.  Use
696         c_objc_common_truthvalue_conversion not
697         c_common_truthvalue_conversion.
698         (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
699         call note_integer_operands for arguments with integer operands
700         that are not integer constants.
702 2012-09-13  Jakub Jelinek  <jakub@redhat.com>
704         PR c/54559
705         * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
706         COMPLEX_TYPE with in_late_binary_op set temporarily to true.
708 2012-08-31  Jakub Jelinek  <jakub@redhat.com>
710         PR c/54428
711         * c-convert.c (convert): Don't call fold_convert_loc if
712         TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
713         is a COMPLEX_EXPR.  Remove TYPE_MAIN_VARIANT check from
714         COMPLEX_TYPE -> COMPLEX_TYPE conversion.
716 2012-08-24  Jakub Jelinek  <jakub@redhat.com>
718         PR c/54355
719         * c-decl.c (c_parser_label): Pass true as nested and fix up comments
720         for nested and empty_ok arguments in the call to
721         c_parser_declaration_or_fndef.
723 2012-08-17  Jakub Jelinek  <jakub@redhat.com>
725         * c-tree.h (c_last_sizeof_arg): Declare.
726         * c-parser.c (struct c_tree_loc_pair): New type.
727         (c_parser_expr_list): Add sizeof_arg argument.  Fill it in if
728         non-NULL.
729         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
730         (c_parser_postfix_expression_after_primary): Likewise.  Call
731         sizeof_pointer_memaccess_warning if needed.
732         (sizeof_ptr_memacc_comptypes): New function.
733         * c-typeck.c (c_last_sizeof_arg): New global variable.
734         (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
736 2012-07-24  Uros Bizjak  <ubizjak@gmail.com>
738         * c-lang.h (lang_decl): Add variable_size GTY option.
740 2012-07-16  Steven Bosscher  <steven@gcc.gnu.org>
742         * c-decl.c: Include dumpfile.h instead of tree-dump.h.
743         * Make-lang.in: Fix dependencies.
745 2012-06-29  Steven Bosscher  <steven@gcc.gnu.org>
747         * Make-lang.in: New file, rules migrated from gcc/Makefile.in
748         and add language Makefile hooks.
749         * config-lang.in: New file.
750         * c-config-lang.in: Moved from gcc/config-lang.in to here, and
751         add the required "normal" config-lang.in rules.
752         * c-lang.h: Moved from gcc/ to here.
753         * c-tree.h: Likewise.
754         * c-objc-common.c: Likewise.
755         * c-objc-common.h: Likewise.
756         * c-typeck.c: Likewise.
757         * c-convert.c: Likewise.
758         * c-lang.c: Likewise.
759         * c-aux-info.c: Likewise.
760         * c-errors.c: Likewise.
761         * gccspec.c: Likewise.
762         * c-decl.c: Likewise.  Include gt-c-c-decl.h, not gt-c-decl.h.
763         * c-parser.c: Likewise.  Include gt-c-c-parser.h, not gt-c-parser.h.
765 Copyright (C) 2012-2013 Free Software Foundation, Inc.
767 Copying and distribution of this file, with or without modification,
768 are permitted in any medium without royalty provided the copyright
769 notice and this notice are preserved.