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