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