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