]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
go-backend.c: #include "diagnostics.h".
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
f8ed5150
MP
12014-04-30 Marek Polacek <polacek@redhat.com>
2
3 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
4 also when SANITIZE_FLOAT_DIVIDE is on.
5
8337d1db
MP
62014-04-30 Marek Polacek <polacek@redhat.com>
7
8 PR c/60139
9 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
10 and pedwarn_init. Use loc insted of input_location.
11
c4bdc42f
MP
122014-04-30 Marek Polacek <polacek@redhat.com>
13
14 PR c/60351
15 * c-typeck.c (build_binary_op): Use location when warning about
16 shift count.
17
45484dcf
MP
182014-04-25 Marek Polacek <polacek@redhat.com>
19
20 PR c/18079
21 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
22 always_inline/noinline and hot/cold attributes.
23
34cf811f
MP
242014-04-25 Marek Polacek <polacek@redhat.com>
25
26 PR c/60114
27 * c-parser.c (c_parser_initelt): Pass input_location to
28 process_init_element.
29 (c_parser_initval): Pass loc to process_init_element.
30 * c-tree.h (process_init_element): Adjust declaration.
31 * c-typeck.c (push_init_level): Pass input_location to
32 process_init_element.
33 (pop_init_level): Likewise.
34 (set_designator): Likewise.
35 (output_init_element): Add location_t parameter. Pass loc to
36 digest_init.
37 (output_pending_init_elements): Pass input_location to
38 output_init_element.
39 (process_init_element): Add location_t parameter. Pass loc to
40 output_init_element.
41
3e4fbd91
PK
422014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
43
44 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
45 avoid goto.
46
42056eac
JJ
472014-04-24 Jakub Jelinek <jakub@redhat.com>
48
49 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
50 atomic-clause, allow comma in between atomic-clause and
51 seq_cst.
52
e162a134
JJ
532014-04-22 Jakub Jelinek <jakub@redhat.com>
54
55 PR c/59073
56 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
57 fails, don't set OM_PARALLEL_COMBINED and return NULL.
58
2f6babac
IZ
592014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
60
61 PR middle-end/60469
62 * c-array-notation.c (fix_builtin_array_notation_fn): Use
63 create_tmp_var instead build_decl for creating temps.
64 (build_array_notation_expr): Likewise.
65 (fix_conditional_array_notations_1): Likewise.
66 (fix_array_notation_expr): Likewise.
67 (fix_array_notation_call_expr): Likewise.
68
8edbfaa6
JJ
692014-03-28 Jakub Jelinek <jakub@redhat.com>
70
71 PR c++/60689
72 * c-tree.h (c_build_function_call_vec): New prototype.
73 * c-typeck.c (build_function_call_vec): Don't call
74 resolve_overloaded_builtin here.
75 (c_build_function_call_vec): New wrapper function around
76 build_function_call_vec. Call resolve_overloaded_builtin here.
77 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
78 Call c_build_function_call_vec instead of build_function_call_vec.
79 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
80 * c-decl.c (finish_decl): Likewise.
81
7485aeea
MLI
822014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
83
84 PR c/55383
85 * c-typeck.c: Use correct format string in cast-qual warning
86
b17a8b07
TS
872014-03-07 Thomas Schwinge <thomas@codesourcery.com>
88
89 * c-decl.c (c_decl_attributes): Use
90 lang_hooks.types.omp_mappable_type.
91 * c-typeck.c (c_finish_omp_clauses): Likewise.
92
3af9c5e9
MP
932014-03-06 Marek Polacek <polacek@redhat.com>
94
95 PR c/60197
96 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
97 of checking tree code.
98
1c9f5f33
PK
992014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
100
101 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
102 (c_parser_parameter_declaration): Likewise.
103
cc28fc7f
MP
1042014-02-19 Marek Polacek <polacek@redhat.com>
105
106 PR c/60195
107 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
108 Call mark_exp_read on exp.value.
109 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
110 TREE_ADDRESSABLE on old instead of val.
111 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
112
b581c05c
PK
1132014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
114
115 * c-parser.c (c_parser_get_builtin_args): Replace calls to
116 C_EXPR_APPEND by vec_safe_push.
117 * c-tree.h (C_EXPR_APPEND): Remove.
118
81e5eca8
MP
1192014-01-31 Marek Polacek <polacek@redhat.com>
120
121 PR c/59963
122 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
123 build_function_call_vec.
124 (build_function_call): Likewise.
125 (build_atomic_assign): Likewise.
126 (build_function_call_vec): Add arg_loc parameter. Use it.
127 (convert_arguments): Likewise.
128 (convert_for_assignment): Rename rhs_loc to expr_loc.
129 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
130 (c_parser_objc_keywordexpr): Likewise.
131 (c_parser_postfix_expression_after_primary): Call
132 build_function_call_vec with expr_loc rather than op_loc.
133 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
134 build_function_call_vec.
135 (c_parser_expr_list): Add locations parameter. Fill it with locations
136 of function arguments.
137 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
138
68fca595
MP
1392014-01-30 Marek Polacek <polacek@redhat.com>
140
141 PR c/59940
142 * c-typeck.c (build_function_call_vec): Use loc parameter.
143 (convert_arguments): Add location parameter. Use it.
144 (ep_convert_and_check): Likewise.
145 (build_atomic_assign): Adjust convert_for_assignment call.
146 (build_modify_expr): Likewise.
147 (digest_init): Likewise.
148 (c_finish_return): Likewise.
149 (build_conditional_expr): Adjust ep_convert_and_check calls.
150 (convert_for_assignment): Add rhs_loc parameter. Use it.
151 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
152 calls.
153
fa337f3a
RB
1542014-01-30 Richard Biener <rguenther@suse.de>
155
156 PR c/59905
157 * c-typeck.c (build_function_call_vec): Do not replace calls
158 to a function via an incompatible type with a runtime abort.
159
b72271b9
BI
1602014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
161
162 * c-parser.c (c_parser_declaration_or_fndef): Replaced
163 flag_enable_cilkplus with flag_cilkplus.
164 (c_parser_direct_declarator_inner): Likewise.
165 (c_parser_attribute_any_word): Likewise.
166 (c_parser_attributes): Likewise.
167 (c_parser_compound_statement): Likewise.
168 (c_parser_statement_after_labels): Likewise.
169 (c_parser_if_statement): Likewise.
170 (c_parser_switch_statement): Likewise.
171 (c_parser_do_statement): Likewise.
172 (c_parser_for_statement): Likewise.
173 (c_parser_unary_expression): Likewise.
174 (c_parser_postfix_expression): Likewise.
175 (c_parser_postfix_expression_after_primary): Likewise.
176 (c_parser_postfix_expression_after_primary): Likewise.
177 (c_parser_omp_clause_name): Likewise.
178 (c_finish_omp_declare_simd): Likewise.
179 (c_parser_cilk_verify_simd): Likewise.
180 * c-typeck.c (build_array_ref): Likewise.
181 (build_function_call_vec): Likewise.
182 (convert_arguments): Likewise.
183 (build_compound_expr): Likewise.
184 (c_finish_return): Likewise.
185 (c_finish_if_stmt): Likewise.
186 (c_finish_loop): Likewise.
187 (build_binary_op): Likewise.
188
393e8e8b
MP
1892014-01-23 Marek Polacek <polacek@redhat.com>
190
191 PR c/59846
192 * c-typeck.c (parser_build_binary_op): Use location instead of
193 input_location.
194 (build_binary_op): Pass location to shorten_compare.
195
f04dda30
MP
1962014-01-23 Marek Polacek <polacek@redhat.com>
197
198 PR c/58346
199 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
200 an empty aggregate.
201
789eadcd
MP
2022014-01-23 Marek Polacek <polacek@redhat.com>
203
204 PR c/59871
205 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
206 of a comma expression.
207 (emit_side_effect_warnings): Likewise.
208
40f14e9f
BI
2092014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
210
211 PR c/59825
212 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
213 function to use walk_tree and moved a lot of its functionality to
214 expand_array_notations.
215 (expand_array_notations): New function.
216
74558dd9
BI
2172014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
218
219 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
220 attribute an attribute without value.
221
652fea39
JJ
2222014-01-23 Jakub Jelinek <jakub@redhat.com>
223
224 PR middle-end/58809
225 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
226 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
227
f34f1c87
MP
2282014-01-22 Marek Polacek <polacek@redhat.com>
229
230 PR c/59891
231 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
232 of remove_c_maybe_const_expr on op1 and op2.
233
241f845a
JJ
2342014-01-15 Jakub Jelinek <jakub@redhat.com>
235
236 PR c/58943
237 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
238 effects, preevaluate rhs using SAVE_EXPR first.
239
9a74f20c
BI
2402014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
241
242 PR c++/59631
243 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
244 statements with if-elseif statements.
245
96066ce1
MP
2462014-01-06 Marek Polacek <polacek@redhat.com>
247
248 PR c/57773
249 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
250 defined bit-field types only in ISO C.
251
23a5b65a
RS
2522014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
253
254 Update copyright years
255
f9030485
RS
2562014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
257
258 * c-array-notation.c: Use the standard form for the copyright notice.
259
41958c28
BI
2602013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
261
262 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
263 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
264 field in parser is not empty. If not-empty, call the function
265 c_parser_finish_omp_declare_simd.
266 (c_parser_cilk_clause_vectorlength): Modified function to be shared
267 between SIMD-enabled functions and #pragma simd. Added new parameter.
268 (c_parser_cilk_all_clauses): Modified the usage of the function
269 c_parser_cilk_clause_vectorlength as mentioned above.
270 (c_parser_cilk_simd_fn_vector_attrs): New function.
271 (c_finish_cilk_simd_fn_tokens): Likewise.
272 (is_cilkplus_vector_p): Likewise.
273 (c_parser_omp_clause_name): Added checking for "vectorlength,"
274 "nomask," and "mask" strings in clause name.
275 (c_parser_omp_all_clauses): Added 3 new case statements:
276 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
277 PRAGMA_CILK_CLAUSE_NOMASK.
278 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
279 check for vector attribute and if so call the function
280 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
281 called the function c_finish_cilk_simd_fn_tokens.
282 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
283 parser field is non-empty. If so, parse them as you would parse
284 the omp declare simd pragma.
285 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
286 Added a check when step is a parameter and flag it as error.
287 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
288 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
289 pragma_omp_clause.
290
cef0fd0e
TS
2912013-12-17 Thomas Schwinge <thomas@codesourcery.com>
292
293 * c-parser.c (c_parser_omp_parallel): Fix description.
294
12893402
BI
2952013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
296
297 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
298 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
299 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
300 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
301
296674db
JM
3022013-12-04 Joseph Myers <joseph@codesourcery.com>
303
304 PR c/52023
305 * c-parser.c (c_parser_alignas_specifier): Use
306 c_sizeof_or_alignof_type instead of c_alignof.
307 (c_parser_alignof_expression): Likewise, with min_alignof
308 parameter depending on alignof spelling used.
309
edd28054
MP
3102013-12-04 Marek Polacek <polacek@redhat.com>
311
312 PR c/54113
313 * c-decl.c (start_function): Don't warn for missing prototype for
314 inline functions.
315
da0fc454
MP
3162013-12-03 Marek Polacek <polacek@redhat.com>
317
318 PR c/59351
319 * c-decl.c (build_compound_literal): Allow compound literals with
320 empty initial value.
321
4c2ecab0
JM
3222013-12-02 Joseph Myers <joseph@codesourcery.com>
323
324 PR c/58235
325 * c-typeck.c (build_modify_expr): Diagnose assignment to
326 expression with array type.
327
340baef7
JM
3282013-11-29 Joseph Myers <joseph@codesourcery.com>
329
330 PR c/42262
331 * c-typeck.c (process_init_element): Do not treat a string as
332 initializing a whole array when used with a designator for an
333 individual element.
334
6763b9f7
JM
3352013-11-29 Joseph Myers <joseph@codesourcery.com>
336
337 PR c/57574
338 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
339 an inline function following a static declaration.
340
e7bd1de1
JJ
3412013-11-28 Jakub Jelinek <jakub@redhat.com>
342
343 PR c/59310
344 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
345 to p_name before calling c_parser_omp_teams instead of after.
346 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
347 argument. Remove unused p_name variable.
348
0136f8f0
AH
3492013-11-27 Aldy Hernandez <aldyh@redhat.com>
350 Jakub Jelinek <jakub@redhat.com>
351
352 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
353 external_scope is NULL.
354
241b71bb
TV
3552013-11-27 Tom de Vries <tom@codesourcery.com>
356 Marc Glisse <marc.glisse@inria.fr>
357
358 PR c++/59032
359 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
360
2fb9a547
AM
3612013-11-22 Andrew MacLeod <amacleod@redhat.com>
362
363 * c-typeck.c: Add required include files from gimple.h.
364
8400e75e
DM
3652013-11-22 David Malcolm <dmalcolm@redhat.com>
366
367 * c-decl.c (define_label, shadow_tag_warned)
368 (check_bitfield_type_and_width, grokdeclarator, grokparms,
369 store_parm_decls_newstyle, store_parm_decls_oldstyle)
370 (declspecs_add_type): Remove use of in_system_header macro.
371 * c-parser.c (c_parser_unary_expression): Likewise.
372 * c-typeck.c (store_init_value, process_init_element)
373 (c_start_case): Likewise.
374
375 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
376 macro.
377
378 * c-parser.c (c_parser_set_source_position_from_token): Remove
379 reference to in_system_header from comment.
380
386b1f1f
RS
3812013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
382
383 * c-decl.c (grokdeclarator): Update comment to refer to
384 tree_to_[su]hwi rather than tree_low_cst.
385
ae7e9ddd
RS
3862013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
387
388 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
389 tree_to_uhwi throughout.
390
9439e9a1
RS
3912013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
392
393 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
394 throughout.
395
9541ffee
RS
3962013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
397
398 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
399 throughout.
400
c02065fc
AH
4012013-11-15 Aldy Hernandez <aldyh@redhat.com>
402
403 * c-parser.c (c_parser_cilk_simd): New.
404 (c_parser_cilk_verify_simd): New.
405 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
406 (c_parser_omp_for_loop): Add case for NE_EXPR.
407 Set c_break_label for CILK_SIMD.
408 (c_parser_cilk_clause_vectorlength): New.
409 (c_parser_cilk_clause_linear): New.
410 (c_parser_cilk_clause_name): New.
411 (c_parser_cilk_all_clauses): New.
412 * c-typeck.c (build_unary_op): Pass location argument to
413 readonly_error.
414 (build_modify_expr): Same.
415 (build_asm_expr): Same.
416 (c_finish_bc_stmt): Error on break/continue in loops.
417
18f429e2
AM
4182013-11-14 Andrew MacLeod <amacleod@redhat.com>
419
420 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
421
d8a2d370
DN
4222013-11-14 Diego Novillo <dnovillo@google.com>
423
424 * c-decl.c: Include print-tree.h.
425 Include stor-layout.h.
426 Include varasm.h.
427 Include attribs.h.
428 Include stringpool.h.
429 * c-lang.c: Include fold-const.h.
430 * c-parser.c: Include stringpool.h.
431 Include attribs.h.
432 Include stor-layout.h.
433 Include varasm.h.
434 Include trans-mem.h.
435 * c-typeck.c: Include stor-layout.h.
436 Include trans-mem.h.
437 Include varasm.h.
438 Include stmt.h.
439
38b7bc7f
JM
4402013-11-13 Joseph Myers <joseph@codesourcery.com>
441
442 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
443 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
444 __auto_type.
445 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
446 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
447 RID_AUTO_TYPE.
448 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
449 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
450 (c_parser_declarator, c_parser_direct_declarator_inner)
451 (c_parser_parameter_declaration, c_parser_type_name): All callers
452 changed.
453 (c_parser_declaration_or_fndef): Handle declarations with type
454 determined from the initializer.
455
45b0be94
AM
4562013-11-12 Andrew MacLeod <amacleod@redhat.com>
457
18f429e2 458 * c-typeck.c: Include gimplify.h.
45b0be94 459
582d9b50
JM
4602013-11-12 Joseph Myers <joseph@codesourcery.com>
461
462 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
463 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
464 comment.
465 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
466 or _Thread_local as appropriate in diagnostics.
467 (build_null_declspecs): Initialize ret->thread_gnu_p.
468 (declspecs_add_scspec): Handle either __thread or _Thread_local
469 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
470 pedantic. Do not disallow _Thread_local extern and _Thread_local
471 static.
472
267bac10
JM
4732013-11-07 Joseph Myers <joseph@codesourcery.com>
474 Andrew MacLeod <amacleod@redhat.com>
475
476 * c-aux-info.c (gen_type): Handle atomic qualifier.
477 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
478 qualifiers when compating types.
479 (shadow_tag_warned): Handle atomic_p in declspecs.
480 (quals_from_declspecs): Likewise.
481 (start_decl): Use c_type_promotes_to when promoting argument
482 types.
483 (grokdeclarator): Handle _Atomic.
484 (get_parm_info): Diagnose any qualifier on "void" as only
485 parameter.
486 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
487 comparing types. Use c_type_promotes_to when promoting argument
488 types.
489 (finish_function): Use c_type_promotes_to when promoting argument
490 types.
491 (build_null_declspecs): Handle atomic_p in declspecs.
492 (declspecs_add_qual): Handle RID_ATOMIC.
493 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
494 (c_token_starts_declspecs): Handle RID_ATOMIC.
495 (c_parser_declspecs): Handle atomic type specifiers and
496 qualifiers.
497 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
498 from types of expressions with atomic type.
499 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
500 (c_parser_attribute_any_word): Handle RID_ATOMIC.
501 (c_parser_initializer, c_parser_initelt, c_parser_initval)
502 (c_parser_statement_after_labels, c_parser_switch_statement)
503 (c_parser_for_statement, c_parser_expr_no_commas)
504 (c_parser_conditional_expression, c_parser_binary_expression)
505 (c_parser_cast_expression, c_parser_unary_expression)
506 (c_parser_postfix_expression)
507 (c_parser_postfix_expression_after_primary, c_parser_expression):
508 Use convert_lvalue_to_rvalue.
509 (c_parser_expression_conv, c_parser_expr_list): Document
510 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
511 (c_parser_objc_synchronized_statement): Use
512 convert_lvalue_to_rvalue.
513 (c_parser_objc_selector): Handle RID_ATOMIC.
514 (c_parser_objc_receiver, c_parser_array_notation): Use
515 convert_lvalue_to_rvalue.
516 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
517 _Atomic (type-name).
518 (struct c_declspecs): Add atomic_p field.
519 (convert_lvalue_to_rvalue): Declare.
520 * c-typeck.c (c_type_promotes_to): Promote atomic types to
521 corresponding atomic types.
522 (qualify_type): Don't add _Atomic qualifiers from second argument.
523 (comp_target_types): Do not allow _Atomic mismatches.
524 (type_lists_compatible_p): Do not remove atomic qualifiers when
525 comparing types.
526 (really_atomic_lvalue, convert_lvalue_to_rvalue)
527 (build_atomic_assign): New functions.
528 (build_unary_op): Use build_atomic_assign for atomic increment and
529 decrement.
530 (build_conditional_expr): Do not treat _Atomic void as a qualified
531 version of void.
532 (build_modify_expr): Use build_atomic_assign for atomic LHS.
533 (find_anonymous_field_with_type, convert_to_anonymous_field)
534 (convert_for_assignment): Do not remove atomic qualifiers when
535 comparing types.
536 (digest_init): Do not accept initialization of arrays of atomic
537 elements by string constants.
538 (build_asm_expr): Use convert_lvalue_to_rvalue.
539 (build_binary_op): Do not treat _Atomic void as a qualified
540 version of void.
541
0c249d4b
DD
5422013-11-06 DJ Delorie <dj@redhat.com>
543
544 * c-decl.c (locate_old_decl): If a previous conflicting decl is
545 both explicit and builtin, print the location of the explicit one.
546
6d7f7e0a
TB
5472013-11-05 Tobias Burnus <burnus@net-b.de>
548
549 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
550 c_parser_omp_distribute, c_parser_omp_teams,
551 c_parser_omp_target, c_parser_omp_declare): Handle
552 -fopenmp-simd.
553
b906f4ca
MP
5542013-11-03 Marek Polacek <polacek@redhat.com>
555
556 * c-decl.c (grokdeclarator): Add VLA instrumentation.
557
ee1d5a02
JJ
5582013-11-01 Jakub Jelinek <jakub@redhat.com>
559
560 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
561 check_dup_generic at the end, unless remove is true.
562 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
563 remove = true;.
564 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
565
5a9785fb
JJ
5662013-10-31 Jakub Jelinek <jakub@redhat.com>
567
568 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
569 with decl that is not pointer nor array.
570
939b37da
BI
5712013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
572
573 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
574 a spawning function is found.
575 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
576 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
577 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
578 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
579 case.
580 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
581 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
582 expr.
583 (c_finish_return): Added a check to reject _Cilk_spawn in return
584 expression.
585 (build_cilk_spawn): New function.
586 (build_cilk_sync): Likewise.
587 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
588
d4af74d4
TB
5892013-10-27 Tobias Burnus <burnus@net-b.de>
590
591 PR other/33426
592 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
593 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
594 (c_parser_statement_after_labels): Update calls.
595
d73749df 5962013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
597
598 PR other/33426
599 * c-parser.c (c_parser_pragma, c_parser_for_statement):
600 Handle PRAGMA_IVDEP.
601 (c_parser_statement_after_labels): Update call.
602
f28aa681
MP
6032013-10-24 Marek Polacek <polacek@redhat.com>
604
605 * c-parser.c (c_parser_struct_declaration): Add a comment.
606 (c_parser_declarator): Don't allow _Alignas here.
607
0645c1a2
AM
6082013-10-17 Andrew MacLeod <amacleod@redhat.com>
609
610 * c-parser.c: Include omp-low.h.
611 * c-typeck.c: Likewise.
612
568a31f2
MP
6132013-10-17 Marek Polacek <polacek@redhat.com>
614
615 PR c/58267
616 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
617 Document syntax of the array-declarator.
618 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
619 are not permitted.
620 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
621 (c_parser_struct_declaration): Likewise.
622 (c_parser_declarator): Likewise.
623 (c_parser_direct_declarator_inner): Likewise.
624 (c_parser_parameter_declaration): Likewise.
625 (c_parser_type_name): Likewise.
626
acf0174b
JJ
6272013-10-11 Jakub Jelinek <jakub@redhat.com>
628
629 * c-lang.h (current_omp_declare_target_attribute): New extern
630 decl.
631 * c-parser.c: Include c-lang.h.
632 (struct c_parser): Change tokens to c_token *.
633 Add tokens_buf field. Change tokens_avail type to unsigned int.
634 (c_parser_consume_token): If parser->tokens isn't
635 &parser->tokens_buf[0], increment parser->tokens.
636 (c_parser_consume_pragma): Likewise.
637 (enum pragma_context): Add pragma_struct and pragma_param.
638 (c_parser_external_declaration): Adjust
639 c_parser_declaration_or_fndef caller.
640 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
641 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
642 Adjust recursive call.
643 (c_parser_struct_or_union_specifier): Use pragma_struct instead
644 of pragma_external.
645 (c_parser_parameter_declaration): Use pragma_param instead of
646 pragma_external.
647 (c_parser_compound_statement_nostart, c_parser_label,
648 c_parser_for_statement): Adjust
649 c_parser_declaration_or_fndef callers.
650 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
651 it through to c_parser_conditional_expression.
652 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
653 pass it through to c_parser_binary_expression. Adjust recursive
654 call.
655 (c_parser_binary_expression): Remove prec argument, add
656 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
657 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
658 binop matches it, use build2 instead of parser_build_binary_op.
659 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
660 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
661 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
662 Handle pragma_struct and pragma_param the same as pragma_external.
663 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
664 (c_parser_omp_variable_list): Parse array sections for
665 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
666 (c_parser_omp_clause_collapse): Fully fold collapse expression.
667 (c_parser_omp_clause_reduction): Handle user defined reductions.
668 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
669 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
670 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
671 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
672 c_parser_omp_clause_depend, c_parser_omp_clause_map,
673 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
674 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
675 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
676 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
677 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
678 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
679 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
680 (c_parser_omp_for_loop): Add CODE argument, pass it through
681 to c_finish_omp_for. Change last argument to cclauses,
682 and adjust uses to grab parallel clauses from the array of all
683 the split clauses. Adjust c_parser_binary_expression,
684 c_parser_declaration_or_fndef and c_finish_omp_for callers.
685 (omp_split_clauses): New function.
686 (c_parser_omp_simd): New function.
687 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
688 Allow the function to be called also when parsing combined constructs,
689 and call c_parser_omp_simd when parsing for simd.
690 (c_parser_omp_sections_scope): If section-sequence doesn't start with
691 #pragma omp section, require exactly one structured-block instead of
692 sequence of statements.
693 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
694 Allow the function to be called also when parsing combined constructs.
695 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
696 Allow the function to be called also when parsing combined
697 constructs.
698 (c_parser_omp_taskgroup, c_parser_omp_cancel,
699 c_parser_omp_cancellation_point, c_parser_omp_distribute,
700 c_parser_omp_teams, c_parser_omp_target_data,
701 c_parser_omp_target_update, c_parser_omp_target,
702 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
703 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
704 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
705 (c_parser_omp_construct): Add p_name and mask vars. Handle
706 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
707 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
708 and c_parser_omp_sections callers.
709 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
710 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
711 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
712 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
713 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
714 OMP_CLAUSE_DEPEND.
715 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
716 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
717 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
718 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
719 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
720 * c-typeck.c: Include tree-inline.h.
721 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
722 handle_omp_array_sections_1, handle_omp_array_sections,
723 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
724 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
725 user defined reductions.
726 (c_tree_equal): New function.
727 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
728 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
729 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
730 c_check_omp_declare_reduction_r): New prototypes.
731 * c-decl.c (current_omp_declare_target_attribute): New variable.
732 (c_decl_attributes): New function.
733 (start_decl, start_function): Use it instead of decl_attributes.
734 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
735 c_omp_reduction_decl, c_omp_reduction_lookup,
736 c_check_omp_declare_reduction_r): New functions.
737
0a6c2227
TT
7382013-09-25 Tom Tromey <tromey@redhat.com>
739
740 * Make-lang.in (c/gccspec.o): Remove.
741 (CFLAGS-c/gccspec.o): New variable.
742 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
743 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
744 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
745
f3bc55f0
TT
7462013-09-25 Tom Tromey <tromey@redhat.com>
747
748 * Make-lang.in (c/gccspec.o): Don't use subshell.
749
a24d975c
MP
7502013-09-18 Marek Polacek <polacek@redhat.com>
751
752 PR sanitize/58443
753 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
754 Remove unnecessary check.
755
ce6923c5
MP
7562013-09-18 Marek Polacek <polacek@redhat.com>
757
758 PR sanitizer/58411
759 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
760 no_sanitize_undefined attribute.
761
a1e51df9
KT
7622013-09-13 Kai Tietz <ktietz@redhat.com>
763
764 PR target/57848
765 * c-decl.c (c_builtin_function_ext_scope): Remove
766 wrong assumption that it is never called on prexisting
767 symbol.
768
0af94e6f
JR
7692013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
770
771 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
772
20059c8b
GDR
7732013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
774
775 * c-objc-common.c (c_tree_printer): Tidy.
776
de5a5fa1
MP
7772013-08-30 Marek Polacek <polacek@redhat.com>
778
779 * c-typeck.c (build_binary_op): Add division by zero and shift
780 instrumentation.
781
2531a1d9 7822013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 783 Joseph Myers <joseph@codesourcery.com>
2531a1d9 784
6e2bcc98 785 PR c/35649
2531a1d9
JR
786 * c-typeck.c (c_common_type): Prefer double_type_node over
787 other REAL_TYPE types with the same precision.
788 (convert_arguments): Likewise.
789
025311c4
GDR
7902013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
791
792 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
793 (c_initialize_diagnostics): Call a destructor for the early printer.
794
da6ca2b5
GDR
7952013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
796
797 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
798 printer initialization.
799
318cda85 8002013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 801
318cda85
BI
802 PR c/57490
803 * c-array-notation.c (fix_conditional_array_notations_1): Added a
804 check for truth values.
805 (expand_array_notation_exprs): Added truth values case. Removed an
806 unwanted else. Added for-loop to walk through subtrees in default
807 case.
808
b066401f
GDR
8092013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
810
811 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
812
fb48aadc
JM
8132013-07-23 Joseph Myers <joseph@codesourcery.com>
814
815 * c-parser.c (struct c_generic_association): Fix typo.
816
433cc7b0
TT
8172013-07-23 Tom Tromey <tromey@redhat.com>
818 Joseph Myers <joseph@codesourcery.com>
819
820 * c-parser.c (struct c_generic_association): New.
821 (c_generic_association_d): New typedef.
822 (c_parser_generic_selection): New function.
823 (c_parser_postfix_expression): Handle RID_GENERIC.
824
26d40c3d
JM
8252013-07-13 Jason Merrill <jason@redhat.com>
826
827 PR c++/57793
828 * c-decl.c (finish_struct): Check for too-large class.
829
ecdbd01a 8302013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
831
832 PR c/57821
833 * c-typeck.c (set_init_index): When folding, check for index overflow.
834
1141ed3f
BI
8352013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
836
837 * c-parser.c (c_parser_array_notation): Removed rejection of array
838 notations in an array of function pointers.
839
713b46fa
BI
8402013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
841
842 * c-array-notation.c (make_triplet_val_inv): New function.
843 (create_cmp_incr): Likewise.
844 (create_array_refs): Likewise.
845 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
846 Also modularized common parts between functions and called the function.
847 (build_array_notation_expr): Likewise.
848 (fix_conditional_array_notations_1): Likewise.
849 (fix_array_notation_expr): Likewise.
850 (fix_array_notation_call_expr): Likewise.
851
92f20202
MP
8522013-06-18 Marek Polacek <polacek@redhat.com>
853
854 PR c/57630
855 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
856
73a23b06
BI
8572013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
858
859 * c-array-notation.c (build_array_notation_expr): Reject array notation
860 mismatch between LHS and RHS even inside a call_expr. Also, removed
861 a couple while statements that were dead code.
862
00b8517d
BI
8632013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
864
865 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
866 excessive precision expressions in function parameters. Also removed
867 couple unwanted while statements.
868
1509bdda
BI
8692013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
870
871 * c-array-notation.c (expand_array_notation_exprs): Added
872 ARRAY_NOTATION_REF case.
873
d60f1706
BI
8742013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
875
876 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
877 function to c-family/array-notation-common.c.
878 (is_cilkplus_reduce_builtin): Likewise.
879 (find_rank): Likewise.
880 (extract_array_notation_exprs): Likewise.
881 (replace_array_notations): Likewise.
882 (find_inv_trees): Likewise.
883 (replace_inv_trees): Likewise.
884 (contains_array_notation_expr): Likewise.
885 (find_correct_array_notation_type): Likewise.
886 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
887 (struct inv_list): Moved this to c-family/array-notation-common.c.
888 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
889
6d6efbb3
BI
8902013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
891
892 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
893 reduction functions outside the for-loop. Added a check if the fundecl
894 is non-NULL. Finally, removed an unwanted if-statement, and made the
895 body unconditional.
896
25c22937
BI
8972013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
898
899 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
900 condition of the if-statement matches the rank of else-block and then-
901 block when array notations are used.
902 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
903 expression after the entire function body is parsed.
904 (c_parser_expr_no_commas): Delayed creating array notation expressions
905 to the end of function parsing.
906 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
907 whole if-statement instead of just the condition.
908 (expand_array_notation_exprs): Added MODIFY_EXPR case.
909
edd25645
BI
9102013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
911
912 PR c/57474
913 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
914 array to NULL_TREE if they are unused. Also added a check for the
915 field to be NULL before its fields are used in future.
916
065ce7f1
RO
9172013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
918
919 PR bootstrap/57450
920 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
921 (build_array_notation_expr): Likewise.
922
36536d79
BI
9232013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
924
925 * c-typeck.c (build_array_ref): Added a check to see if array's
926 index is greater than one. If true, then emit an error.
927 (build_function_call_vec): Exclude error reporting and checking
928 for builtin array-notation functions.
929 (convert_arguments): Likewise.
930 (c_finish_return): Added a check for array notations as a return
931 expression. If true, then emit an error.
932 (c_finish_loop): Added a check for array notations in a loop
933 condition. If true then emit an error.
934 (lvalue_p): Added a ARRAY_NOTATION_REF case.
935 (build_binary_op): Added a check for array notation expr inside
936 op1 and op0. If present, we call another function to find correct
937 type.
938 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
939 * c-parser.c (c_parser_compound_statement): Check if array
940 notation code is used in tree, if so, then transform them into
941 appropriate C code.
942 (c_parser_expr_no_commas): Check if array notation is used in LHS
943 or RHS, if so, then build array notation expression instead of
944 regular modify.
945 (c_parser_postfix_expression_after_primary): Added a check for
946 colon(s) after square braces, if so then handle it like an array
947 notation. Also, break up array notations in unary op if found.
948 (c_parser_direct_declarator_inner): Added a check for array
949 notation.
950 (c_parser_compound_statement): Added a check for array notation in
951 a stmt. If one is present, then expand array notation expr.
952 (c_parser_if_statement): Likewise.
953 (c_parser_switch_statement): Added a check for array notations in
954 a switch statement's condition. If true, then output an error.
955 (c_parser_while_statement): Similarly, but for a while.
956 (c_parser_do_statement): Similarly, but for a do-while.
957 (c_parser_for_statement): Similarly, but for a for-loop.
958 (c_parser_unary_expression): Check if array notation is used in a
959 pre-increment or pre-decrement expression. If true, then expand
960 them.
961 (c_parser_array_notation): New function.
962 * c-array-notation.c: New file.
963 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
964
cd192ccc
MS
9652013-05-23 Mike Stump <mikestump@comcast.net>
966
967 * c-typeck.c (convert_for_assignment): Handle references to memory
968 spaces better.
969
427b248d
JM
9702013-05-16 Jason Merrill <jason@redhat.com>
971
972 * Make-lang.in (cc1$(exeext)): Use link mutex.
973
44d90fe1
PC
9742013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
975
976 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
977 to simply use OPT_Wpointer_arith.
978 (build_unary_op): Likewise.
979
4e7d7b3d
JJ
9802013-04-03 Jakub Jelinek <jakub@redhat.com>
981
982 PR c/19449
983 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
984 argument. If set, or it temporarily for parsing of the first
985 argument into force_folding_builtin_constant_p.
986 (c_parser_postfix_expression): Adjust callers.
987
839b422f
RB
9882013-03-21 Richard Biener <rguenther@suse.de>
989
990 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
991 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
992
2ee028f1
MP
9932013-02-12 Marek Polacek <polacek@redhat.com>
994
995 PR c/44938
996 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
997 origtypes to NULL.
998
8824edff
JJ
9992013-01-24 Jakub Jelinek <jakub@redhat.com>
1000
1001 PR c/56078
1002 * c-typeck.c (set_nonincremental_init_from_string): If
1003 constructor_max_index is NULL, treat it as if tree_int_cst_lt
1004 returned false.
1005 (process_init_element): Likewise.
1006
eadd3d0d
JJ
10072012-12-20 Jakub Jelinek <jakub@redhat.com>
1008
1009 PR c++/55619
1010 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
1011 argument, don't call default_function_array_conversion
1012 nor c_fully_fold here.
1013 (c_parser_asm_statement): Adjust callers.
1014 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
1015 and outputs here, and call default_function_array_conversion
1016 on inputs that don't need to be addressable.
1017
f8a93a2e
JJ
10182012-12-18 Jakub Jelinek <jakub@redhat.com>
1019
1020 PR c/39464
1021 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
1022 warning require that both c_common_unsigned_type as well as
1023 c_common_signed_type is the same for both mvl and mvr types.
1024
9771b263
DN
10252012-11-16 Diego Novillo <dnovillo@google.com>
1026
1027 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
1028
1029 * c-common.c: Use new vec API in vec.h.
1030 * c-common.h: Likewise.
1031 * c-gimplify.c: Likewise.
1032 * c-pragma.c: Likewise.
1033 * c-pretty-print.c: Likewise.
1034 * c-pretty-print.h: Likewise.
1035 * c-semantics.c: Likewise.
1036 * c-decl.c: Likewise.
1037 * c-parser.c: Likewise.
1038 * c-tree.h: Likewise.
1039 * c-typeck.c: Likewise.
1040
880661a4
JW
10412012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
1042
1043 PR c++/54930
1044 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
1045
077d1abe
MLI
10462012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1047
1048 PR c/53066
1049 * c-decl.c (warn_if_shadowing): Do not warn if a variable
1050 shadows a function, unless the variable is a function or a
1051 pointer-to-function.
1052
3a785c97
JJ
10532012-10-12 Jakub Jelinek <jakub@redhat.com>
1054
1055 PR c/54381
1056 * c-parser.c (struct c_tree_loc_pair): Removed.
1057 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
1058 add location_t * and tree * arguments, fill in array of 3
1059 sizeof_arg trees and corresponding locs.
1060 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
1061 c_parser_expr_list callers.
1062 (c_parser_postfix_expression_after_primary): Likewise. Pass
1063 array of 3 sizeof_arg trees and locs (corresponding to first
1064 3 arguments) to sizeof_pointer_memaccess_warning.
1065
703c8606
LC
10662012-10-09 Lawrence Crowl <crowl@google.com>
1067
1068 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
1069 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
1070 hash table.
1071
5d9de0d0
PC
10722012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
1073
1074 PR c++/54194
1075 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
1076 call.
1077
a212e43f
MG
10782012-10-09 Marc Glisse <marc.glisse@inria.fr>
1079
1080 PR c++/54427
1081 * c-typeck.c: Include c-common.h.
1082 (enum stv_conv): Moved to c-common.h.
1083 (scalar_to_vector): Moved to c-common.c.
1084 (build_binary_op): Adapt to scalar_to_vector's new prototype.
1085 * Make-lang.in: c-typeck.c depends on c-common.h.
1086
3b78de56
AC
10872012-10-04 Arnaud Charlet <charlet@adacore.com>
1088
1089 * c-decl.c (c_write_global_declarations): Fix handling of
1090 -fdump-ada-spec*.
1091
78c60e3d
SS
10922012-09-30 Sharad Singhai <singhai@google.com>
1093
1094 * c-decl.c (c_write_global_declarations): Use a different method
1095 to determine if the dump has ben initialized.
1096
9f33203d
JM
10972012-09-14 Joseph Myers <joseph@codesourcery.com>
1098
1099 PR c/54552
1100 * c-typeck.c (c_cast_expr): When casting to a type requiring
1101 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
1102 c_fully_fold first.
1103
a27d595d
JM
11042012-09-14 Joseph Myers <joseph@codesourcery.com>
1105
1106 PR c/54103
1107 * c-typeck.c (build_unary_op): Pass original argument of
1108 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
1109 any C_MAYBE_CONST_EXPR, if it has integer operands.
1110 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
1111 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
1112 to c_objc_common_truthvalue_conversion, then remove any
1113 C_MAYBE_CONST_EXPR, if they have integer operands. Use
1114 c_objc_common_truthvalue_conversion not
1115 c_common_truthvalue_conversion.
1116 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
1117 call note_integer_operands for arguments with integer operands
1118 that are not integer constants.
1119
9feb29df
JJ
11202012-09-13 Jakub Jelinek <jakub@redhat.com>
1121
1122 PR c/54559
1123 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
1124 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
1125
d409320c
JJ
11262012-08-31 Jakub Jelinek <jakub@redhat.com>
1127
1128 PR c/54428
1129 * c-convert.c (convert): Don't call fold_convert_loc if
1130 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
1131 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
1132 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
1133
6265d07c
JJ
11342012-08-24 Jakub Jelinek <jakub@redhat.com>
1135
1136 PR c/54355
1137 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
1138 for nested and empty_ok arguments in the call to
1139 c_parser_declaration_or_fndef.
1140
1a4049e7
JJ
11412012-08-17 Jakub Jelinek <jakub@redhat.com>
1142
1143 * c-tree.h (c_last_sizeof_arg): Declare.
1144 * c-parser.c (struct c_tree_loc_pair): New type.
1145 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
1146 non-NULL.
1147 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
1148 (c_parser_postfix_expression_after_primary): Likewise. Call
1149 sizeof_pointer_memaccess_warning if needed.
1150 (sizeof_ptr_memacc_comptypes): New function.
1151 * c-typeck.c (c_last_sizeof_arg): New global variable.
1152 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
1153
0229aee9
UB
11542012-07-24 Uros Bizjak <ubizjak@gmail.com>
1155
1156 * c-lang.h (lang_decl): Add variable_size GTY option.
1157
7ee2468b
SB
11582012-07-16 Steven Bosscher <steven@gcc.gnu.org>
1159
1160 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
1161 * Make-lang.in: Fix dependencies.
1162
d4a10d0a
SB
11632012-06-29 Steven Bosscher <steven@gcc.gnu.org>
1164
1165 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
1166 and add language Makefile hooks.
1167 * config-lang.in: New file.
1168 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
1169 add the required "normal" config-lang.in rules.
1170 * c-lang.h: Moved from gcc/ to here.
1171 * c-tree.h: Likewise.
1172 * c-objc-common.c: Likewise.
1173 * c-objc-common.h: Likewise.
1174 * c-typeck.c: Likewise.
1175 * c-convert.c: Likewise.
1176 * c-lang.c: Likewise.
1177 * c-aux-info.c: Likewise.
1178 * c-errors.c: Likewise.
1179 * gccspec.c: Likewise.
1180 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
1181 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
1182\f
23a5b65a 1183Copyright (C) 2012-2014 Free Software Foundation, Inc.
d4a10d0a
SB
1184
1185Copying and distribution of this file, with or without modification,
1186are permitted in any medium without royalty provided the copyright
1187notice and this notice are preserved.