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