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