]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
Small ChangeLog fixes.
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
41958c28
BI
12013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
2
3 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
4 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
5 field in parser is not empty. If not-empty, call the function
6 c_parser_finish_omp_declare_simd.
7 (c_parser_cilk_clause_vectorlength): Modified function to be shared
8 between SIMD-enabled functions and #pragma simd. Added new parameter.
9 (c_parser_cilk_all_clauses): Modified the usage of the function
10 c_parser_cilk_clause_vectorlength as mentioned above.
11 (c_parser_cilk_simd_fn_vector_attrs): New function.
12 (c_finish_cilk_simd_fn_tokens): Likewise.
13 (is_cilkplus_vector_p): Likewise.
14 (c_parser_omp_clause_name): Added checking for "vectorlength,"
15 "nomask," and "mask" strings in clause name.
16 (c_parser_omp_all_clauses): Added 3 new case statements:
17 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
18 PRAGMA_CILK_CLAUSE_NOMASK.
19 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
20 check for vector attribute and if so call the function
21 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
22 called the function c_finish_cilk_simd_fn_tokens.
23 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
24 parser field is non-empty. If so, parse them as you would parse
25 the omp declare simd pragma.
26 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
27 Added a check when step is a parameter and flag it as error.
28 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
29 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
30 pragma_omp_clause.
31
cef0fd0e
TS
322013-12-17 Thomas Schwinge <thomas@codesourcery.com>
33
34 * c-parser.c (c_parser_omp_parallel): Fix description.
35
12893402
BI
362013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
37
38 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
39 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
40 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
41 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
42
296674db
JM
432013-12-04 Joseph Myers <joseph@codesourcery.com>
44
45 PR c/52023
46 * c-parser.c (c_parser_alignas_specifier): Use
47 c_sizeof_or_alignof_type instead of c_alignof.
48 (c_parser_alignof_expression): Likewise, with min_alignof
49 parameter depending on alignof spelling used.
50
edd28054
MP
512013-12-04 Marek Polacek <polacek@redhat.com>
52
53 PR c/54113
54 * c-decl.c (start_function): Don't warn for missing prototype for
55 inline functions.
56
da0fc454
MP
572013-12-03 Marek Polacek <polacek@redhat.com>
58
59 PR c/59351
60 * c-decl.c (build_compound_literal): Allow compound literals with
61 empty initial value.
62
4c2ecab0
JM
632013-12-02 Joseph Myers <joseph@codesourcery.com>
64
65 PR c/58235
66 * c-typeck.c (build_modify_expr): Diagnose assignment to
67 expression with array type.
68
340baef7
JM
692013-11-29 Joseph Myers <joseph@codesourcery.com>
70
71 PR c/42262
72 * c-typeck.c (process_init_element): Do not treat a string as
73 initializing a whole array when used with a designator for an
74 individual element.
75
6763b9f7
JM
762013-11-29 Joseph Myers <joseph@codesourcery.com>
77
78 PR c/57574
79 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
80 an inline function following a static declaration.
81
e7bd1de1
JJ
822013-11-28 Jakub Jelinek <jakub@redhat.com>
83
84 PR c/59310
85 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
86 to p_name before calling c_parser_omp_teams instead of after.
87 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
88 argument. Remove unused p_name variable.
89
0136f8f0
AH
902013-11-27 Aldy Hernandez <aldyh@redhat.com>
91 Jakub Jelinek <jakub@redhat.com>
92
93 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
94 external_scope is NULL.
95
241b71bb
TV
962013-11-27 Tom de Vries <tom@codesourcery.com>
97 Marc Glisse <marc.glisse@inria.fr>
98
99 PR c++/59032
100 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
101
2fb9a547
AM
1022013-11-22 Andrew MacLeod <amacleod@redhat.com>
103
104 * c-typeck.c: Add required include files from gimple.h.
105
8400e75e
DM
1062013-11-22 David Malcolm <dmalcolm@redhat.com>
107
108 * c-decl.c (define_label, shadow_tag_warned)
109 (check_bitfield_type_and_width, grokdeclarator, grokparms,
110 store_parm_decls_newstyle, store_parm_decls_oldstyle)
111 (declspecs_add_type): Remove use of in_system_header macro.
112 * c-parser.c (c_parser_unary_expression): Likewise.
113 * c-typeck.c (store_init_value, process_init_element)
114 (c_start_case): Likewise.
115
116 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
117 macro.
118
119 * c-parser.c (c_parser_set_source_position_from_token): Remove
120 reference to in_system_header from comment.
121
386b1f1f
RS
1222013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
123
124 * c-decl.c (grokdeclarator): Update comment to refer to
125 tree_to_[su]hwi rather than tree_low_cst.
126
ae7e9ddd
RS
1272013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
128
129 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
130 tree_to_uhwi throughout.
131
9439e9a1
RS
1322013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
133
134 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
135 throughout.
136
9541ffee
RS
1372013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
138
139 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
140 throughout.
141
c02065fc
AH
1422013-11-15 Aldy Hernandez <aldyh@redhat.com>
143
144 * c-parser.c (c_parser_cilk_simd): New.
145 (c_parser_cilk_verify_simd): New.
146 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
147 (c_parser_omp_for_loop): Add case for NE_EXPR.
148 Set c_break_label for CILK_SIMD.
149 (c_parser_cilk_clause_vectorlength): New.
150 (c_parser_cilk_clause_linear): New.
151 (c_parser_cilk_clause_name): New.
152 (c_parser_cilk_all_clauses): New.
153 * c-typeck.c (build_unary_op): Pass location argument to
154 readonly_error.
155 (build_modify_expr): Same.
156 (build_asm_expr): Same.
157 (c_finish_bc_stmt): Error on break/continue in loops.
158
18f429e2
AM
1592013-11-14 Andrew MacLeod <amacleod@redhat.com>
160
161 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
162
d8a2d370
DN
1632013-11-14 Diego Novillo <dnovillo@google.com>
164
165 * c-decl.c: Include print-tree.h.
166 Include stor-layout.h.
167 Include varasm.h.
168 Include attribs.h.
169 Include stringpool.h.
170 * c-lang.c: Include fold-const.h.
171 * c-parser.c: Include stringpool.h.
172 Include attribs.h.
173 Include stor-layout.h.
174 Include varasm.h.
175 Include trans-mem.h.
176 * c-typeck.c: Include stor-layout.h.
177 Include trans-mem.h.
178 Include varasm.h.
179 Include stmt.h.
180
38b7bc7f
JM
1812013-11-13 Joseph Myers <joseph@codesourcery.com>
182
183 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
184 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
185 __auto_type.
186 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
187 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
188 RID_AUTO_TYPE.
189 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
190 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
191 (c_parser_declarator, c_parser_direct_declarator_inner)
192 (c_parser_parameter_declaration, c_parser_type_name): All callers
193 changed.
194 (c_parser_declaration_or_fndef): Handle declarations with type
195 determined from the initializer.
196
45b0be94
AM
1972013-11-12 Andrew MacLeod <amacleod@redhat.com>
198
18f429e2 199 * c-typeck.c: Include gimplify.h.
45b0be94 200
582d9b50
JM
2012013-11-12 Joseph Myers <joseph@codesourcery.com>
202
203 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
204 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
205 comment.
206 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
207 or _Thread_local as appropriate in diagnostics.
208 (build_null_declspecs): Initialize ret->thread_gnu_p.
209 (declspecs_add_scspec): Handle either __thread or _Thread_local
210 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
211 pedantic. Do not disallow _Thread_local extern and _Thread_local
212 static.
213
267bac10
JM
2142013-11-07 Joseph Myers <joseph@codesourcery.com>
215 Andrew MacLeod <amacleod@redhat.com>
216
217 * c-aux-info.c (gen_type): Handle atomic qualifier.
218 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
219 qualifiers when compating types.
220 (shadow_tag_warned): Handle atomic_p in declspecs.
221 (quals_from_declspecs): Likewise.
222 (start_decl): Use c_type_promotes_to when promoting argument
223 types.
224 (grokdeclarator): Handle _Atomic.
225 (get_parm_info): Diagnose any qualifier on "void" as only
226 parameter.
227 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
228 comparing types. Use c_type_promotes_to when promoting argument
229 types.
230 (finish_function): Use c_type_promotes_to when promoting argument
231 types.
232 (build_null_declspecs): Handle atomic_p in declspecs.
233 (declspecs_add_qual): Handle RID_ATOMIC.
234 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
235 (c_token_starts_declspecs): Handle RID_ATOMIC.
236 (c_parser_declspecs): Handle atomic type specifiers and
237 qualifiers.
238 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
239 from types of expressions with atomic type.
240 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
241 (c_parser_attribute_any_word): Handle RID_ATOMIC.
242 (c_parser_initializer, c_parser_initelt, c_parser_initval)
243 (c_parser_statement_after_labels, c_parser_switch_statement)
244 (c_parser_for_statement, c_parser_expr_no_commas)
245 (c_parser_conditional_expression, c_parser_binary_expression)
246 (c_parser_cast_expression, c_parser_unary_expression)
247 (c_parser_postfix_expression)
248 (c_parser_postfix_expression_after_primary, c_parser_expression):
249 Use convert_lvalue_to_rvalue.
250 (c_parser_expression_conv, c_parser_expr_list): Document
251 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
252 (c_parser_objc_synchronized_statement): Use
253 convert_lvalue_to_rvalue.
254 (c_parser_objc_selector): Handle RID_ATOMIC.
255 (c_parser_objc_receiver, c_parser_array_notation): Use
256 convert_lvalue_to_rvalue.
257 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
258 _Atomic (type-name).
259 (struct c_declspecs): Add atomic_p field.
260 (convert_lvalue_to_rvalue): Declare.
261 * c-typeck.c (c_type_promotes_to): Promote atomic types to
262 corresponding atomic types.
263 (qualify_type): Don't add _Atomic qualifiers from second argument.
264 (comp_target_types): Do not allow _Atomic mismatches.
265 (type_lists_compatible_p): Do not remove atomic qualifiers when
266 comparing types.
267 (really_atomic_lvalue, convert_lvalue_to_rvalue)
268 (build_atomic_assign): New functions.
269 (build_unary_op): Use build_atomic_assign for atomic increment and
270 decrement.
271 (build_conditional_expr): Do not treat _Atomic void as a qualified
272 version of void.
273 (build_modify_expr): Use build_atomic_assign for atomic LHS.
274 (find_anonymous_field_with_type, convert_to_anonymous_field)
275 (convert_for_assignment): Do not remove atomic qualifiers when
276 comparing types.
277 (digest_init): Do not accept initialization of arrays of atomic
278 elements by string constants.
279 (build_asm_expr): Use convert_lvalue_to_rvalue.
280 (build_binary_op): Do not treat _Atomic void as a qualified
281 version of void.
282
0c249d4b
DD
2832013-11-06 DJ Delorie <dj@redhat.com>
284
285 * c-decl.c (locate_old_decl): If a previous conflicting decl is
286 both explicit and builtin, print the location of the explicit one.
287
6d7f7e0a
TB
2882013-11-05 Tobias Burnus <burnus@net-b.de>
289
290 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
291 c_parser_omp_distribute, c_parser_omp_teams,
292 c_parser_omp_target, c_parser_omp_declare): Handle
293 -fopenmp-simd.
294
b906f4ca
MP
2952013-11-03 Marek Polacek <polacek@redhat.com>
296
297 * c-decl.c (grokdeclarator): Add VLA instrumentation.
298
ee1d5a02
JJ
2992013-11-01 Jakub Jelinek <jakub@redhat.com>
300
301 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
302 check_dup_generic at the end, unless remove is true.
303 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
304 remove = true;.
305 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
306
5a9785fb
JJ
3072013-10-31 Jakub Jelinek <jakub@redhat.com>
308
309 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
310 with decl that is not pointer nor array.
311
939b37da
BI
3122013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
313
314 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
315 a spawning function is found.
316 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
317 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
318 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
319 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
320 case.
321 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
322 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
323 expr.
324 (c_finish_return): Added a check to reject _Cilk_spawn in return
325 expression.
326 (build_cilk_spawn): New function.
327 (build_cilk_sync): Likewise.
328 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
329
d4af74d4
TB
3302013-10-27 Tobias Burnus <burnus@net-b.de>
331
332 PR other/33426
333 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
334 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
335 (c_parser_statement_after_labels): Update calls.
336
d73749df 3372013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
338
339 PR other/33426
340 * c-parser.c (c_parser_pragma, c_parser_for_statement):
341 Handle PRAGMA_IVDEP.
342 (c_parser_statement_after_labels): Update call.
343
f28aa681
MP
3442013-10-24 Marek Polacek <polacek@redhat.com>
345
346 * c-parser.c (c_parser_struct_declaration): Add a comment.
347 (c_parser_declarator): Don't allow _Alignas here.
348
0645c1a2
AM
3492013-10-17 Andrew MacLeod <amacleod@redhat.com>
350
351 * c-parser.c: Include omp-low.h.
352 * c-typeck.c: Likewise.
353
568a31f2
MP
3542013-10-17 Marek Polacek <polacek@redhat.com>
355
356 PR c/58267
357 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
358 Document syntax of the array-declarator.
359 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
360 are not permitted.
361 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
362 (c_parser_struct_declaration): Likewise.
363 (c_parser_declarator): Likewise.
364 (c_parser_direct_declarator_inner): Likewise.
365 (c_parser_parameter_declaration): Likewise.
366 (c_parser_type_name): Likewise.
367
acf0174b
JJ
3682013-10-11 Jakub Jelinek <jakub@redhat.com>
369
370 * c-lang.h (current_omp_declare_target_attribute): New extern
371 decl.
372 * c-parser.c: Include c-lang.h.
373 (struct c_parser): Change tokens to c_token *.
374 Add tokens_buf field. Change tokens_avail type to unsigned int.
375 (c_parser_consume_token): If parser->tokens isn't
376 &parser->tokens_buf[0], increment parser->tokens.
377 (c_parser_consume_pragma): Likewise.
378 (enum pragma_context): Add pragma_struct and pragma_param.
379 (c_parser_external_declaration): Adjust
380 c_parser_declaration_or_fndef caller.
381 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
382 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
383 Adjust recursive call.
384 (c_parser_struct_or_union_specifier): Use pragma_struct instead
385 of pragma_external.
386 (c_parser_parameter_declaration): Use pragma_param instead of
387 pragma_external.
388 (c_parser_compound_statement_nostart, c_parser_label,
389 c_parser_for_statement): Adjust
390 c_parser_declaration_or_fndef callers.
391 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
392 it through to c_parser_conditional_expression.
393 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
394 pass it through to c_parser_binary_expression. Adjust recursive
395 call.
396 (c_parser_binary_expression): Remove prec argument, add
397 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
398 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
399 binop matches it, use build2 instead of parser_build_binary_op.
400 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
401 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
402 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
403 Handle pragma_struct and pragma_param the same as pragma_external.
404 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
405 (c_parser_omp_variable_list): Parse array sections for
406 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
407 (c_parser_omp_clause_collapse): Fully fold collapse expression.
408 (c_parser_omp_clause_reduction): Handle user defined reductions.
409 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
410 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
411 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
412 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
413 c_parser_omp_clause_depend, c_parser_omp_clause_map,
414 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
415 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
416 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
417 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
418 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
419 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
420 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
421 (c_parser_omp_for_loop): Add CODE argument, pass it through
422 to c_finish_omp_for. Change last argument to cclauses,
423 and adjust uses to grab parallel clauses from the array of all
424 the split clauses. Adjust c_parser_binary_expression,
425 c_parser_declaration_or_fndef and c_finish_omp_for callers.
426 (omp_split_clauses): New function.
427 (c_parser_omp_simd): New function.
428 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
429 Allow the function to be called also when parsing combined constructs,
430 and call c_parser_omp_simd when parsing for simd.
431 (c_parser_omp_sections_scope): If section-sequence doesn't start with
432 #pragma omp section, require exactly one structured-block instead of
433 sequence of statements.
434 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
435 Allow the function to be called also when parsing combined constructs.
436 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
437 Allow the function to be called also when parsing combined
438 constructs.
439 (c_parser_omp_taskgroup, c_parser_omp_cancel,
440 c_parser_omp_cancellation_point, c_parser_omp_distribute,
441 c_parser_omp_teams, c_parser_omp_target_data,
442 c_parser_omp_target_update, c_parser_omp_target,
443 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
444 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
445 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
446 (c_parser_omp_construct): Add p_name and mask vars. Handle
447 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
448 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
449 and c_parser_omp_sections callers.
450 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
451 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
452 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
453 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
454 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
455 OMP_CLAUSE_DEPEND.
456 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
457 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
458 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
459 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
460 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
461 * c-typeck.c: Include tree-inline.h.
462 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
463 handle_omp_array_sections_1, handle_omp_array_sections,
464 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
465 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
466 user defined reductions.
467 (c_tree_equal): New function.
468 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
469 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
470 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
471 c_check_omp_declare_reduction_r): New prototypes.
472 * c-decl.c (current_omp_declare_target_attribute): New variable.
473 (c_decl_attributes): New function.
474 (start_decl, start_function): Use it instead of decl_attributes.
475 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
476 c_omp_reduction_decl, c_omp_reduction_lookup,
477 c_check_omp_declare_reduction_r): New functions.
478
0a6c2227
TT
4792013-09-25 Tom Tromey <tromey@redhat.com>
480
481 * Make-lang.in (c/gccspec.o): Remove.
482 (CFLAGS-c/gccspec.o): New variable.
483 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
484 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
485 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
486
f3bc55f0
TT
4872013-09-25 Tom Tromey <tromey@redhat.com>
488
489 * Make-lang.in (c/gccspec.o): Don't use subshell.
490
a24d975c
MP
4912013-09-18 Marek Polacek <polacek@redhat.com>
492
493 PR sanitize/58443
494 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
495 Remove unnecessary check.
496
ce6923c5
MP
4972013-09-18 Marek Polacek <polacek@redhat.com>
498
499 PR sanitizer/58411
500 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
501 no_sanitize_undefined attribute.
502
a1e51df9
KT
5032013-09-13 Kai Tietz <ktietz@redhat.com>
504
505 PR target/57848
506 * c-decl.c (c_builtin_function_ext_scope): Remove
507 wrong assumption that it is never called on prexisting
508 symbol.
509
0af94e6f
JR
5102013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
511
512 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
513
20059c8b
GDR
5142013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
515
516 * c-objc-common.c (c_tree_printer): Tidy.
517
de5a5fa1
MP
5182013-08-30 Marek Polacek <polacek@redhat.com>
519
520 * c-typeck.c (build_binary_op): Add division by zero and shift
521 instrumentation.
522
2531a1d9 5232013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 524 Joseph Myers <joseph@codesourcery.com>
2531a1d9 525
6e2bcc98 526 PR c/35649
2531a1d9
JR
527 * c-typeck.c (c_common_type): Prefer double_type_node over
528 other REAL_TYPE types with the same precision.
529 (convert_arguments): Likewise.
530
025311c4
GDR
5312013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
532
533 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
534 (c_initialize_diagnostics): Call a destructor for the early printer.
535
da6ca2b5
GDR
5362013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
537
538 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
539 printer initialization.
540
318cda85 5412013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 542
318cda85
BI
543 PR c/57490
544 * c-array-notation.c (fix_conditional_array_notations_1): Added a
545 check for truth values.
546 (expand_array_notation_exprs): Added truth values case. Removed an
547 unwanted else. Added for-loop to walk through subtrees in default
548 case.
549
b066401f
GDR
5502013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
551
552 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
553
fb48aadc
JM
5542013-07-23 Joseph Myers <joseph@codesourcery.com>
555
556 * c-parser.c (struct c_generic_association): Fix typo.
557
433cc7b0
TT
5582013-07-23 Tom Tromey <tromey@redhat.com>
559 Joseph Myers <joseph@codesourcery.com>
560
561 * c-parser.c (struct c_generic_association): New.
562 (c_generic_association_d): New typedef.
563 (c_parser_generic_selection): New function.
564 (c_parser_postfix_expression): Handle RID_GENERIC.
565
26d40c3d
JM
5662013-07-13 Jason Merrill <jason@redhat.com>
567
568 PR c++/57793
569 * c-decl.c (finish_struct): Check for too-large class.
570
ecdbd01a 5712013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
572
573 PR c/57821
574 * c-typeck.c (set_init_index): When folding, check for index overflow.
575
1141ed3f
BI
5762013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
577
578 * c-parser.c (c_parser_array_notation): Removed rejection of array
579 notations in an array of function pointers.
580
713b46fa
BI
5812013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
582
583 * c-array-notation.c (make_triplet_val_inv): New function.
584 (create_cmp_incr): Likewise.
585 (create_array_refs): Likewise.
586 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
587 Also modularized common parts between functions and called the function.
588 (build_array_notation_expr): Likewise.
589 (fix_conditional_array_notations_1): Likewise.
590 (fix_array_notation_expr): Likewise.
591 (fix_array_notation_call_expr): Likewise.
592
92f20202
MP
5932013-06-18 Marek Polacek <polacek@redhat.com>
594
595 PR c/57630
596 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
597
73a23b06
BI
5982013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
599
600 * c-array-notation.c (build_array_notation_expr): Reject array notation
601 mismatch between LHS and RHS even inside a call_expr. Also, removed
602 a couple while statements that were dead code.
603
00b8517d
BI
6042013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
605
606 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
607 excessive precision expressions in function parameters. Also removed
608 couple unwanted while statements.
609
1509bdda
BI
6102013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
611
612 * c-array-notation.c (expand_array_notation_exprs): Added
613 ARRAY_NOTATION_REF case.
614
d60f1706
BI
6152013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
616
617 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
618 function to c-family/array-notation-common.c.
619 (is_cilkplus_reduce_builtin): Likewise.
620 (find_rank): Likewise.
621 (extract_array_notation_exprs): Likewise.
622 (replace_array_notations): Likewise.
623 (find_inv_trees): Likewise.
624 (replace_inv_trees): Likewise.
625 (contains_array_notation_expr): Likewise.
626 (find_correct_array_notation_type): Likewise.
627 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
628 (struct inv_list): Moved this to c-family/array-notation-common.c.
629 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
630
6d6efbb3
BI
6312013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
632
633 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
634 reduction functions outside the for-loop. Added a check if the fundecl
635 is non-NULL. Finally, removed an unwanted if-statement, and made the
636 body unconditional.
637
25c22937
BI
6382013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
639
640 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
641 condition of the if-statement matches the rank of else-block and then-
642 block when array notations are used.
643 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
644 expression after the entire function body is parsed.
645 (c_parser_expr_no_commas): Delayed creating array notation expressions
646 to the end of function parsing.
647 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
648 whole if-statement instead of just the condition.
649 (expand_array_notation_exprs): Added MODIFY_EXPR case.
650
edd25645
BI
6512013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
652
653 PR c/57474
654 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
655 array to NULL_TREE if they are unused. Also added a check for the
656 field to be NULL before its fields are used in future.
657
065ce7f1
RO
6582013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
659
660 PR bootstrap/57450
661 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
662 (build_array_notation_expr): Likewise.
663
36536d79
BI
6642013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
665
666 * c-typeck.c (build_array_ref): Added a check to see if array's
667 index is greater than one. If true, then emit an error.
668 (build_function_call_vec): Exclude error reporting and checking
669 for builtin array-notation functions.
670 (convert_arguments): Likewise.
671 (c_finish_return): Added a check for array notations as a return
672 expression. If true, then emit an error.
673 (c_finish_loop): Added a check for array notations in a loop
674 condition. If true then emit an error.
675 (lvalue_p): Added a ARRAY_NOTATION_REF case.
676 (build_binary_op): Added a check for array notation expr inside
677 op1 and op0. If present, we call another function to find correct
678 type.
679 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
680 * c-parser.c (c_parser_compound_statement): Check if array
681 notation code is used in tree, if so, then transform them into
682 appropriate C code.
683 (c_parser_expr_no_commas): Check if array notation is used in LHS
684 or RHS, if so, then build array notation expression instead of
685 regular modify.
686 (c_parser_postfix_expression_after_primary): Added a check for
687 colon(s) after square braces, if so then handle it like an array
688 notation. Also, break up array notations in unary op if found.
689 (c_parser_direct_declarator_inner): Added a check for array
690 notation.
691 (c_parser_compound_statement): Added a check for array notation in
692 a stmt. If one is present, then expand array notation expr.
693 (c_parser_if_statement): Likewise.
694 (c_parser_switch_statement): Added a check for array notations in
695 a switch statement's condition. If true, then output an error.
696 (c_parser_while_statement): Similarly, but for a while.
697 (c_parser_do_statement): Similarly, but for a do-while.
698 (c_parser_for_statement): Similarly, but for a for-loop.
699 (c_parser_unary_expression): Check if array notation is used in a
700 pre-increment or pre-decrement expression. If true, then expand
701 them.
702 (c_parser_array_notation): New function.
703 * c-array-notation.c: New file.
704 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
705
cd192ccc
MS
7062013-05-23 Mike Stump <mikestump@comcast.net>
707
708 * c-typeck.c (convert_for_assignment): Handle references to memory
709 spaces better.
710
427b248d
JM
7112013-05-16 Jason Merrill <jason@redhat.com>
712
713 * Make-lang.in (cc1$(exeext)): Use link mutex.
714
44d90fe1
PC
7152013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
716
717 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
718 to simply use OPT_Wpointer_arith.
719 (build_unary_op): Likewise.
720
4e7d7b3d
JJ
7212013-04-03 Jakub Jelinek <jakub@redhat.com>
722
723 PR c/19449
724 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
725 argument. If set, or it temporarily for parsing of the first
726 argument into force_folding_builtin_constant_p.
727 (c_parser_postfix_expression): Adjust callers.
728
839b422f
RB
7292013-03-21 Richard Biener <rguenther@suse.de>
730
731 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
732 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
733
2ee028f1
MP
7342013-02-12 Marek Polacek <polacek@redhat.com>
735
736 PR c/44938
737 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
738 origtypes to NULL.
739
8824edff
JJ
7402013-01-24 Jakub Jelinek <jakub@redhat.com>
741
742 PR c/56078
743 * c-typeck.c (set_nonincremental_init_from_string): If
744 constructor_max_index is NULL, treat it as if tree_int_cst_lt
745 returned false.
746 (process_init_element): Likewise.
747
eadd3d0d
JJ
7482012-12-20 Jakub Jelinek <jakub@redhat.com>
749
750 PR c++/55619
751 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
752 argument, don't call default_function_array_conversion
753 nor c_fully_fold here.
754 (c_parser_asm_statement): Adjust callers.
755 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
756 and outputs here, and call default_function_array_conversion
757 on inputs that don't need to be addressable.
758
f8a93a2e
JJ
7592012-12-18 Jakub Jelinek <jakub@redhat.com>
760
761 PR c/39464
762 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
763 warning require that both c_common_unsigned_type as well as
764 c_common_signed_type is the same for both mvl and mvr types.
765
9771b263
DN
7662012-11-16 Diego Novillo <dnovillo@google.com>
767
768 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
769
770 * c-common.c: Use new vec API in vec.h.
771 * c-common.h: Likewise.
772 * c-gimplify.c: Likewise.
773 * c-pragma.c: Likewise.
774 * c-pretty-print.c: Likewise.
775 * c-pretty-print.h: Likewise.
776 * c-semantics.c: Likewise.
777 * c-decl.c: Likewise.
778 * c-parser.c: Likewise.
779 * c-tree.h: Likewise.
780 * c-typeck.c: Likewise.
781
880661a4
JW
7822012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
783
784 PR c++/54930
785 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
786
077d1abe
MLI
7872012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
788
789 PR c/53066
790 * c-decl.c (warn_if_shadowing): Do not warn if a variable
791 shadows a function, unless the variable is a function or a
792 pointer-to-function.
793
3a785c97
JJ
7942012-10-12 Jakub Jelinek <jakub@redhat.com>
795
796 PR c/54381
797 * c-parser.c (struct c_tree_loc_pair): Removed.
798 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
799 add location_t * and tree * arguments, fill in array of 3
800 sizeof_arg trees and corresponding locs.
801 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
802 c_parser_expr_list callers.
803 (c_parser_postfix_expression_after_primary): Likewise. Pass
804 array of 3 sizeof_arg trees and locs (corresponding to first
805 3 arguments) to sizeof_pointer_memaccess_warning.
806
703c8606
LC
8072012-10-09 Lawrence Crowl <crowl@google.com>
808
809 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
810 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
811 hash table.
812
5d9de0d0
PC
8132012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
814
815 PR c++/54194
816 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
817 call.
818
a212e43f
MG
8192012-10-09 Marc Glisse <marc.glisse@inria.fr>
820
821 PR c++/54427
822 * c-typeck.c: Include c-common.h.
823 (enum stv_conv): Moved to c-common.h.
824 (scalar_to_vector): Moved to c-common.c.
825 (build_binary_op): Adapt to scalar_to_vector's new prototype.
826 * Make-lang.in: c-typeck.c depends on c-common.h.
827
3b78de56
AC
8282012-10-04 Arnaud Charlet <charlet@adacore.com>
829
830 * c-decl.c (c_write_global_declarations): Fix handling of
831 -fdump-ada-spec*.
832
78c60e3d
SS
8332012-09-30 Sharad Singhai <singhai@google.com>
834
835 * c-decl.c (c_write_global_declarations): Use a different method
836 to determine if the dump has ben initialized.
837
9f33203d
JM
8382012-09-14 Joseph Myers <joseph@codesourcery.com>
839
840 PR c/54552
841 * c-typeck.c (c_cast_expr): When casting to a type requiring
842 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
843 c_fully_fold first.
844
a27d595d
JM
8452012-09-14 Joseph Myers <joseph@codesourcery.com>
846
847 PR c/54103
848 * c-typeck.c (build_unary_op): Pass original argument of
849 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
850 any C_MAYBE_CONST_EXPR, if it has integer operands.
851 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
852 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
853 to c_objc_common_truthvalue_conversion, then remove any
854 C_MAYBE_CONST_EXPR, if they have integer operands. Use
855 c_objc_common_truthvalue_conversion not
856 c_common_truthvalue_conversion.
857 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
858 call note_integer_operands for arguments with integer operands
859 that are not integer constants.
860
9feb29df
JJ
8612012-09-13 Jakub Jelinek <jakub@redhat.com>
862
863 PR c/54559
864 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
865 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
866
d409320c
JJ
8672012-08-31 Jakub Jelinek <jakub@redhat.com>
868
869 PR c/54428
870 * c-convert.c (convert): Don't call fold_convert_loc if
871 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
872 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
873 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
874
6265d07c
JJ
8752012-08-24 Jakub Jelinek <jakub@redhat.com>
876
877 PR c/54355
878 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
879 for nested and empty_ok arguments in the call to
880 c_parser_declaration_or_fndef.
881
1a4049e7
JJ
8822012-08-17 Jakub Jelinek <jakub@redhat.com>
883
884 * c-tree.h (c_last_sizeof_arg): Declare.
885 * c-parser.c (struct c_tree_loc_pair): New type.
886 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
887 non-NULL.
888 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
889 (c_parser_postfix_expression_after_primary): Likewise. Call
890 sizeof_pointer_memaccess_warning if needed.
891 (sizeof_ptr_memacc_comptypes): New function.
892 * c-typeck.c (c_last_sizeof_arg): New global variable.
893 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
894
0229aee9
UB
8952012-07-24 Uros Bizjak <ubizjak@gmail.com>
896
897 * c-lang.h (lang_decl): Add variable_size GTY option.
898
7ee2468b
SB
8992012-07-16 Steven Bosscher <steven@gcc.gnu.org>
900
901 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
902 * Make-lang.in: Fix dependencies.
903
d4a10d0a
SB
9042012-06-29 Steven Bosscher <steven@gcc.gnu.org>
905
906 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
907 and add language Makefile hooks.
908 * config-lang.in: New file.
909 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
910 add the required "normal" config-lang.in rules.
911 * c-lang.h: Moved from gcc/ to here.
912 * c-tree.h: Likewise.
913 * c-objc-common.c: Likewise.
914 * c-objc-common.h: Likewise.
915 * c-typeck.c: Likewise.
916 * c-convert.c: Likewise.
917 * c-lang.c: Likewise.
918 * c-aux-info.c: Likewise.
919 * c-errors.c: Likewise.
920 * gccspec.c: Likewise.
921 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
922 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
923\f
d1e082c2 924Copyright (C) 2012-2013 Free Software Foundation, Inc.
d4a10d0a
SB
925
926Copying and distribution of this file, with or without modification,
927are permitted in any medium without royalty provided the copyright
928notice and this notice are preserved.