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