]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
c-family:
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
d184e0c0 12013-11-12 Joseph Myers <joseph@codesourcery.com>
2
3 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
4 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
5 comment.
6 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
7 or _Thread_local as appropriate in diagnostics.
8 (build_null_declspecs): Initialize ret->thread_gnu_p.
9 (declspecs_add_scspec): Handle either __thread or _Thread_local
10 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
11 pedantic. Do not disallow _Thread_local extern and _Thread_local
12 static.
13
b560fabd 142013-11-07 Joseph Myers <joseph@codesourcery.com>
15 Andrew MacLeod <amacleod@redhat.com>
16
17 * c-aux-info.c (gen_type): Handle atomic qualifier.
18 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
19 qualifiers when compating types.
20 (shadow_tag_warned): Handle atomic_p in declspecs.
21 (quals_from_declspecs): Likewise.
22 (start_decl): Use c_type_promotes_to when promoting argument
23 types.
24 (grokdeclarator): Handle _Atomic.
25 (get_parm_info): Diagnose any qualifier on "void" as only
26 parameter.
27 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
28 comparing types. Use c_type_promotes_to when promoting argument
29 types.
30 (finish_function): Use c_type_promotes_to when promoting argument
31 types.
32 (build_null_declspecs): Handle atomic_p in declspecs.
33 (declspecs_add_qual): Handle RID_ATOMIC.
34 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
35 (c_token_starts_declspecs): Handle RID_ATOMIC.
36 (c_parser_declspecs): Handle atomic type specifiers and
37 qualifiers.
38 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
39 from types of expressions with atomic type.
40 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
41 (c_parser_attribute_any_word): Handle RID_ATOMIC.
42 (c_parser_initializer, c_parser_initelt, c_parser_initval)
43 (c_parser_statement_after_labels, c_parser_switch_statement)
44 (c_parser_for_statement, c_parser_expr_no_commas)
45 (c_parser_conditional_expression, c_parser_binary_expression)
46 (c_parser_cast_expression, c_parser_unary_expression)
47 (c_parser_postfix_expression)
48 (c_parser_postfix_expression_after_primary, c_parser_expression):
49 Use convert_lvalue_to_rvalue.
50 (c_parser_expression_conv, c_parser_expr_list): Document
51 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
52 (c_parser_objc_synchronized_statement): Use
53 convert_lvalue_to_rvalue.
54 (c_parser_objc_selector): Handle RID_ATOMIC.
55 (c_parser_objc_receiver, c_parser_array_notation): Use
56 convert_lvalue_to_rvalue.
57 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
58 _Atomic (type-name).
59 (struct c_declspecs): Add atomic_p field.
60 (convert_lvalue_to_rvalue): Declare.
61 * c-typeck.c (c_type_promotes_to): Promote atomic types to
62 corresponding atomic types.
63 (qualify_type): Don't add _Atomic qualifiers from second argument.
64 (comp_target_types): Do not allow _Atomic mismatches.
65 (type_lists_compatible_p): Do not remove atomic qualifiers when
66 comparing types.
67 (really_atomic_lvalue, convert_lvalue_to_rvalue)
68 (build_atomic_assign): New functions.
69 (build_unary_op): Use build_atomic_assign for atomic increment and
70 decrement.
71 (build_conditional_expr): Do not treat _Atomic void as a qualified
72 version of void.
73 (build_modify_expr): Use build_atomic_assign for atomic LHS.
74 (find_anonymous_field_with_type, convert_to_anonymous_field)
75 (convert_for_assignment): Do not remove atomic qualifiers when
76 comparing types.
77 (digest_init): Do not accept initialization of arrays of atomic
78 elements by string constants.
79 (build_asm_expr): Use convert_lvalue_to_rvalue.
80 (build_binary_op): Do not treat _Atomic void as a qualified
81 version of void.
82
8b023e7c 832013-11-06 DJ Delorie <dj@redhat.com>
84
85 * c-decl.c (locate_old_decl): If a previous conflicting decl is
86 both explicit and builtin, print the location of the explicit one.
87
c630ef93 882013-11-05 Tobias Burnus <burnus@net-b.de>
89
90 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
91 c_parser_omp_distribute, c_parser_omp_teams,
92 c_parser_omp_target, c_parser_omp_declare): Handle
93 -fopenmp-simd.
94
2c4c3477 952013-11-03 Marek Polacek <polacek@redhat.com>
96
97 * c-decl.c (grokdeclarator): Add VLA instrumentation.
98
df205251 992013-11-01 Jakub Jelinek <jakub@redhat.com>
100
101 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
102 check_dup_generic at the end, unless remove is true.
103 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
104 remove = true;.
105 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
106
23871d0c 1072013-10-31 Jakub Jelinek <jakub@redhat.com>
108
109 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
110 with decl that is not pointer nor array.
111
d037099f 1122013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
113
114 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
115 a spawning function is found.
116 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
117 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
118 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
119 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
120 case.
121 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
122 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
123 expr.
124 (c_finish_return): Added a check to reject _Cilk_spawn in return
125 expression.
126 (build_cilk_spawn): New function.
127 (build_cilk_sync): Likewise.
128 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
129
4c90c04c 1302013-10-27 Tobias Burnus <burnus@net-b.de>
131
132 PR other/33426
133 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
134 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
135 (c_parser_statement_after_labels): Update calls.
136
48a972c8 1372013-10-24 Tobias Burnus <burnus@net-b.de>
4644b593 138
139 PR other/33426
140 * c-parser.c (c_parser_pragma, c_parser_for_statement):
141 Handle PRAGMA_IVDEP.
142 (c_parser_statement_after_labels): Update call.
143
12f86df0 1442013-10-24 Marek Polacek <polacek@redhat.com>
145
146 * c-parser.c (c_parser_struct_declaration): Add a comment.
147 (c_parser_declarator): Don't allow _Alignas here.
148
7740abd8 1492013-10-17 Andrew MacLeod <amacleod@redhat.com>
150
151 * c-parser.c: Include omp-low.h.
152 * c-typeck.c: Likewise.
153
43d03c23 1542013-10-17 Marek Polacek <polacek@redhat.com>
155
156 PR c/58267
157 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
158 Document syntax of the array-declarator.
159 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
160 are not permitted.
161 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
162 (c_parser_struct_declaration): Likewise.
163 (c_parser_declarator): Likewise.
164 (c_parser_direct_declarator_inner): Likewise.
165 (c_parser_parameter_declaration): Likewise.
166 (c_parser_type_name): Likewise.
167
bc7bff74 1682013-10-11 Jakub Jelinek <jakub@redhat.com>
169
170 * c-lang.h (current_omp_declare_target_attribute): New extern
171 decl.
172 * c-parser.c: Include c-lang.h.
173 (struct c_parser): Change tokens to c_token *.
174 Add tokens_buf field. Change tokens_avail type to unsigned int.
175 (c_parser_consume_token): If parser->tokens isn't
176 &parser->tokens_buf[0], increment parser->tokens.
177 (c_parser_consume_pragma): Likewise.
178 (enum pragma_context): Add pragma_struct and pragma_param.
179 (c_parser_external_declaration): Adjust
180 c_parser_declaration_or_fndef caller.
181 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
182 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
183 Adjust recursive call.
184 (c_parser_struct_or_union_specifier): Use pragma_struct instead
185 of pragma_external.
186 (c_parser_parameter_declaration): Use pragma_param instead of
187 pragma_external.
188 (c_parser_compound_statement_nostart, c_parser_label,
189 c_parser_for_statement): Adjust
190 c_parser_declaration_or_fndef callers.
191 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
192 it through to c_parser_conditional_expression.
193 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
194 pass it through to c_parser_binary_expression. Adjust recursive
195 call.
196 (c_parser_binary_expression): Remove prec argument, add
197 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
198 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
199 binop matches it, use build2 instead of parser_build_binary_op.
200 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
201 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
202 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
203 Handle pragma_struct and pragma_param the same as pragma_external.
204 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
205 (c_parser_omp_variable_list): Parse array sections for
206 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
207 (c_parser_omp_clause_collapse): Fully fold collapse expression.
208 (c_parser_omp_clause_reduction): Handle user defined reductions.
209 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
210 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
211 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
212 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
213 c_parser_omp_clause_depend, c_parser_omp_clause_map,
214 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
215 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
216 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
217 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
218 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
219 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
220 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
221 (c_parser_omp_for_loop): Add CODE argument, pass it through
222 to c_finish_omp_for. Change last argument to cclauses,
223 and adjust uses to grab parallel clauses from the array of all
224 the split clauses. Adjust c_parser_binary_expression,
225 c_parser_declaration_or_fndef and c_finish_omp_for callers.
226 (omp_split_clauses): New function.
227 (c_parser_omp_simd): New function.
228 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
229 Allow the function to be called also when parsing combined constructs,
230 and call c_parser_omp_simd when parsing for simd.
231 (c_parser_omp_sections_scope): If section-sequence doesn't start with
232 #pragma omp section, require exactly one structured-block instead of
233 sequence of statements.
234 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
235 Allow the function to be called also when parsing combined constructs.
236 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
237 Allow the function to be called also when parsing combined
238 constructs.
239 (c_parser_omp_taskgroup, c_parser_omp_cancel,
240 c_parser_omp_cancellation_point, c_parser_omp_distribute,
241 c_parser_omp_teams, c_parser_omp_target_data,
242 c_parser_omp_target_update, c_parser_omp_target,
243 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
244 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
245 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
246 (c_parser_omp_construct): Add p_name and mask vars. Handle
247 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
248 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
249 and c_parser_omp_sections callers.
250 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
251 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
252 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
253 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
254 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
255 OMP_CLAUSE_DEPEND.
256 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
257 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
258 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
259 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
260 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
261 * c-typeck.c: Include tree-inline.h.
262 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
263 handle_omp_array_sections_1, handle_omp_array_sections,
264 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
265 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
266 user defined reductions.
267 (c_tree_equal): New function.
268 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
269 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
270 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
271 c_check_omp_declare_reduction_r): New prototypes.
272 * c-decl.c (current_omp_declare_target_attribute): New variable.
273 (c_decl_attributes): New function.
274 (start_decl, start_function): Use it instead of decl_attributes.
275 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
276 c_omp_reduction_decl, c_omp_reduction_lookup,
277 c_check_omp_declare_reduction_r): New functions.
278
3ce7d1bd 2792013-09-25 Tom Tromey <tromey@redhat.com>
280
281 * Make-lang.in (c/gccspec.o): Remove.
282 (CFLAGS-c/gccspec.o): New variable.
283 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
284 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
285 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
286
96da1c1d 2872013-09-25 Tom Tromey <tromey@redhat.com>
288
289 * Make-lang.in (c/gccspec.o): Don't use subshell.
290
1b309377 2912013-09-18 Marek Polacek <polacek@redhat.com>
292
293 PR sanitize/58443
294 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
295 Remove unnecessary check.
296
05f893e1 2972013-09-18 Marek Polacek <polacek@redhat.com>
298
299 PR sanitizer/58411
300 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
301 no_sanitize_undefined attribute.
302
bda0b9d2 3032013-09-13 Kai Tietz <ktietz@redhat.com>
304
305 PR target/57848
306 * c-decl.c (c_builtin_function_ext_scope): Remove
307 wrong assumption that it is never called on prexisting
308 symbol.
309
73437615 3102013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
311
312 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
313
eaab24b9 3142013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
315
316 * c-objc-common.c (c_tree_printer): Tidy.
317
9e46467d 3182013-08-30 Marek Polacek <polacek@redhat.com>
319
320 * c-typeck.c (build_binary_op): Add division by zero and shift
321 instrumentation.
322
f8234178 3232013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
f9086116 324 Joseph Myers <joseph@codesourcery.com>
f8234178 325
c90a7d10 326 PR c/35649
f8234178 327 * c-typeck.c (c_common_type): Prefer double_type_node over
328 other REAL_TYPE types with the same precision.
329 (convert_arguments): Likewise.
330
6f07f480 3312013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
332
333 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
334 (c_initialize_diagnostics): Call a destructor for the early printer.
335
eed6bc21 3362013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
337
338 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
339 printer initialization.
340
57717943 3412013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
eed6bc21 342
57717943 343 PR c/57490
344 * c-array-notation.c (fix_conditional_array_notations_1): Added a
345 check for truth values.
346 (expand_array_notation_exprs): Added truth values case. Removed an
347 unwanted else. Added for-loop to walk through subtrees in default
348 case.
349
a94db6b0 3502013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
351
352 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
353
e76163a9 3542013-07-23 Joseph Myers <joseph@codesourcery.com>
355
356 * c-parser.c (struct c_generic_association): Fix typo.
357
7aa04c8d 3582013-07-23 Tom Tromey <tromey@redhat.com>
359 Joseph Myers <joseph@codesourcery.com>
360
361 * c-parser.c (struct c_generic_association): New.
362 (c_generic_association_d): New typedef.
363 (c_parser_generic_selection): New function.
364 (c_parser_postfix_expression): Handle RID_GENERIC.
365
76bbe4ca 3662013-07-13 Jason Merrill <jason@redhat.com>
367
368 PR c++/57793
369 * c-decl.c (finish_struct): Check for too-large class.
370
21ebaa24 3712013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
f5298614 372
373 PR c/57821
374 * c-typeck.c (set_init_index): When folding, check for index overflow.
375
936c3081 3762013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
377
378 * c-parser.c (c_parser_array_notation): Removed rejection of array
379 notations in an array of function pointers.
380
50acebe0 3812013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
382
383 * c-array-notation.c (make_triplet_val_inv): New function.
384 (create_cmp_incr): Likewise.
385 (create_array_refs): Likewise.
386 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
387 Also modularized common parts between functions and called the function.
388 (build_array_notation_expr): Likewise.
389 (fix_conditional_array_notations_1): Likewise.
390 (fix_array_notation_expr): Likewise.
391 (fix_array_notation_call_expr): Likewise.
392
01e6cdb4 3932013-06-18 Marek Polacek <polacek@redhat.com>
394
395 PR c/57630
396 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
397
6a3adac6 3982013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
399
400 * c-array-notation.c (build_array_notation_expr): Reject array notation
401 mismatch between LHS and RHS even inside a call_expr. Also, removed
402 a couple while statements that were dead code.
403
62aab3f3 4042013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
405
406 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
407 excessive precision expressions in function parameters. Also removed
408 couple unwanted while statements.
409
bfc83720 4102013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
411
412 * c-array-notation.c (expand_array_notation_exprs): Added
413 ARRAY_NOTATION_REF case.
414
09970d67 4152013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
416
417 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
418 function to c-family/array-notation-common.c.
419 (is_cilkplus_reduce_builtin): Likewise.
420 (find_rank): Likewise.
421 (extract_array_notation_exprs): Likewise.
422 (replace_array_notations): Likewise.
423 (find_inv_trees): Likewise.
424 (replace_inv_trees): Likewise.
425 (contains_array_notation_expr): Likewise.
426 (find_correct_array_notation_type): Likewise.
427 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
428 (struct inv_list): Moved this to c-family/array-notation-common.c.
429 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
430
6e13bc01 4312013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
432
433 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
434 reduction functions outside the for-loop. Added a check if the fundecl
435 is non-NULL. Finally, removed an unwanted if-statement, and made the
436 body unconditional.
437
cc92dddc 4382013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
439
440 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
441 condition of the if-statement matches the rank of else-block and then-
442 block when array notations are used.
443 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
444 expression after the entire function body is parsed.
445 (c_parser_expr_no_commas): Delayed creating array notation expressions
446 to the end of function parsing.
447 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
448 whole if-statement instead of just the condition.
449 (expand_array_notation_exprs): Added MODIFY_EXPR case.
450
eddc63fd 4512013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
452
453 PR c/57474
454 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
455 array to NULL_TREE if they are unused. Also added a check for the
456 field to be NULL before its fields are used in future.
457
a2115a4a 4582013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
459
460 PR bootstrap/57450
461 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
462 (build_array_notation_expr): Likewise.
463
3c6d4197 4642013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
465
466 * c-typeck.c (build_array_ref): Added a check to see if array's
467 index is greater than one. If true, then emit an error.
468 (build_function_call_vec): Exclude error reporting and checking
469 for builtin array-notation functions.
470 (convert_arguments): Likewise.
471 (c_finish_return): Added a check for array notations as a return
472 expression. If true, then emit an error.
473 (c_finish_loop): Added a check for array notations in a loop
474 condition. If true then emit an error.
475 (lvalue_p): Added a ARRAY_NOTATION_REF case.
476 (build_binary_op): Added a check for array notation expr inside
477 op1 and op0. If present, we call another function to find correct
478 type.
479 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
480 * c-parser.c (c_parser_compound_statement): Check if array
481 notation code is used in tree, if so, then transform them into
482 appropriate C code.
483 (c_parser_expr_no_commas): Check if array notation is used in LHS
484 or RHS, if so, then build array notation expression instead of
485 regular modify.
486 (c_parser_postfix_expression_after_primary): Added a check for
487 colon(s) after square braces, if so then handle it like an array
488 notation. Also, break up array notations in unary op if found.
489 (c_parser_direct_declarator_inner): Added a check for array
490 notation.
491 (c_parser_compound_statement): Added a check for array notation in
492 a stmt. If one is present, then expand array notation expr.
493 (c_parser_if_statement): Likewise.
494 (c_parser_switch_statement): Added a check for array notations in
495 a switch statement's condition. If true, then output an error.
496 (c_parser_while_statement): Similarly, but for a while.
497 (c_parser_do_statement): Similarly, but for a do-while.
498 (c_parser_for_statement): Similarly, but for a for-loop.
499 (c_parser_unary_expression): Check if array notation is used in a
500 pre-increment or pre-decrement expression. If true, then expand
501 them.
502 (c_parser_array_notation): New function.
503 * c-array-notation.c: New file.
504 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
505
2c1c8a2c 5062013-05-23 Mike Stump <mikestump@comcast.net>
507
508 * c-typeck.c (convert_for_assignment): Handle references to memory
509 spaces better.
510
be5f9e46 5112013-05-16 Jason Merrill <jason@redhat.com>
512
513 * Make-lang.in (cc1$(exeext)): Use link mutex.
514
9205a6cc 5152013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
516
517 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
518 to simply use OPT_Wpointer_arith.
519 (build_unary_op): Likewise.
520
0b049e15 5212013-04-03 Jakub Jelinek <jakub@redhat.com>
522
523 PR c/19449
524 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
525 argument. If set, or it temporarily for parsing of the first
526 argument into force_folding_builtin_constant_p.
527 (c_parser_postfix_expression): Adjust callers.
528
8e966116 5292013-03-21 Richard Biener <rguenther@suse.de>
530
531 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
532 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
533
b862f263 5342013-02-12 Marek Polacek <polacek@redhat.com>
535
536 PR c/44938
537 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
538 origtypes to NULL.
539
54550ecb 5402013-01-24 Jakub Jelinek <jakub@redhat.com>
541
542 PR c/56078
543 * c-typeck.c (set_nonincremental_init_from_string): If
544 constructor_max_index is NULL, treat it as if tree_int_cst_lt
545 returned false.
546 (process_init_element): Likewise.
547
035b65e2 5482012-12-20 Jakub Jelinek <jakub@redhat.com>
549
550 PR c++/55619
551 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
552 argument, don't call default_function_array_conversion
553 nor c_fully_fold here.
554 (c_parser_asm_statement): Adjust callers.
555 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
556 and outputs here, and call default_function_array_conversion
557 on inputs that don't need to be addressable.
558
7cbb7f1a 5592012-12-18 Jakub Jelinek <jakub@redhat.com>
560
561 PR c/39464
562 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
563 warning require that both c_common_unsigned_type as well as
564 c_common_signed_type is the same for both mvl and mvr types.
565
f1f41a6c 5662012-11-16 Diego Novillo <dnovillo@google.com>
567
568 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
569
570 * c-common.c: Use new vec API in vec.h.
571 * c-common.h: Likewise.
572 * c-gimplify.c: Likewise.
573 * c-pragma.c: Likewise.
574 * c-pretty-print.c: Likewise.
575 * c-pretty-print.h: Likewise.
576 * c-semantics.c: Likewise.
577 * c-decl.c: Likewise.
578 * c-parser.c: Likewise.
579 * c-tree.h: Likewise.
580 * c-typeck.c: Likewise.
581
8b447d3f 5822012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
583
584 PR c++/54930
585 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
586
08fc5390 5872012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
588
589 PR c/53066
590 * c-decl.c (warn_if_shadowing): Do not warn if a variable
591 shadows a function, unless the variable is a function or a
592 pointer-to-function.
593
57f872a2 5942012-10-12 Jakub Jelinek <jakub@redhat.com>
595
596 PR c/54381
597 * c-parser.c (struct c_tree_loc_pair): Removed.
598 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
599 add location_t * and tree * arguments, fill in array of 3
600 sizeof_arg trees and corresponding locs.
601 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
602 c_parser_expr_list callers.
603 (c_parser_postfix_expression_after_primary): Likewise. Pass
604 array of 3 sizeof_arg trees and locs (corresponding to first
605 3 arguments) to sizeof_pointer_memaccess_warning.
606
d1455aa3 6072012-10-09 Lawrence Crowl <crowl@google.com>
608
609 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
610 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
611 hash table.
612
b0e7825e 6132012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
614
615 PR c++/54194
616 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
617 call.
618
41ed701a 6192012-10-09 Marc Glisse <marc.glisse@inria.fr>
620
621 PR c++/54427
622 * c-typeck.c: Include c-common.h.
623 (enum stv_conv): Moved to c-common.h.
624 (scalar_to_vector): Moved to c-common.c.
625 (build_binary_op): Adapt to scalar_to_vector's new prototype.
626 * Make-lang.in: c-typeck.c depends on c-common.h.
627
ef34afc1 6282012-10-04 Arnaud Charlet <charlet@adacore.com>
629
630 * c-decl.c (c_write_global_declarations): Fix handling of
631 -fdump-ada-spec*.
632
7bd765d4 6332012-09-30 Sharad Singhai <singhai@google.com>
634
635 * c-decl.c (c_write_global_declarations): Use a different method
636 to determine if the dump has ben initialized.
637
c4b1a13a 6382012-09-14 Joseph Myers <joseph@codesourcery.com>
639
640 PR c/54552
641 * c-typeck.c (c_cast_expr): When casting to a type requiring
642 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
643 c_fully_fold first.
644
bb554051 6452012-09-14 Joseph Myers <joseph@codesourcery.com>
646
647 PR c/54103
648 * c-typeck.c (build_unary_op): Pass original argument of
649 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
650 any C_MAYBE_CONST_EXPR, if it has integer operands.
651 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
652 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
653 to c_objc_common_truthvalue_conversion, then remove any
654 C_MAYBE_CONST_EXPR, if they have integer operands. Use
655 c_objc_common_truthvalue_conversion not
656 c_common_truthvalue_conversion.
657 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
658 call note_integer_operands for arguments with integer operands
659 that are not integer constants.
660
c708c6ef 6612012-09-13 Jakub Jelinek <jakub@redhat.com>
662
663 PR c/54559
664 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
665 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
666
cce20430 6672012-08-31 Jakub Jelinek <jakub@redhat.com>
668
669 PR c/54428
670 * c-convert.c (convert): Don't call fold_convert_loc if
671 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
672 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
673 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
674
a90d57ed 6752012-08-24 Jakub Jelinek <jakub@redhat.com>
676
677 PR c/54355
678 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
679 for nested and empty_ok arguments in the call to
680 c_parser_declaration_or_fndef.
681
f003f5dc 6822012-08-17 Jakub Jelinek <jakub@redhat.com>
683
684 * c-tree.h (c_last_sizeof_arg): Declare.
685 * c-parser.c (struct c_tree_loc_pair): New type.
686 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
687 non-NULL.
688 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
689 (c_parser_postfix_expression_after_primary): Likewise. Call
690 sizeof_pointer_memaccess_warning if needed.
691 (sizeof_ptr_memacc_comptypes): New function.
692 * c-typeck.c (c_last_sizeof_arg): New global variable.
693 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
694
a5656b73 6952012-07-24 Uros Bizjak <ubizjak@gmail.com>
696
697 * c-lang.h (lang_decl): Add variable_size GTY option.
698
b9ed1410 6992012-07-16 Steven Bosscher <steven@gcc.gnu.org>
700
701 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
702 * Make-lang.in: Fix dependencies.
703
e53d55e7 7042012-06-29 Steven Bosscher <steven@gcc.gnu.org>
705
706 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
707 and add language Makefile hooks.
708 * config-lang.in: New file.
709 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
710 add the required "normal" config-lang.in rules.
711 * c-lang.h: Moved from gcc/ to here.
712 * c-tree.h: Likewise.
713 * c-objc-common.c: Likewise.
714 * c-objc-common.h: Likewise.
715 * c-typeck.c: Likewise.
716 * c-convert.c: Likewise.
717 * c-lang.c: Likewise.
718 * c-aux-info.c: Likewise.
719 * c-errors.c: Likewise.
720 * gccspec.c: Likewise.
721 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
722 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
723\f
711789cc 724Copyright (C) 2012-2013 Free Software Foundation, Inc.
e53d55e7 725
726Copying and distribution of this file, with or without modification,
727are permitted in any medium without royalty provided the copyright
728notice and this notice are preserved.