]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
PR c/60257
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
053a0ded 12014-05-01 Marek Polacek <polacek@redhat.com>
2
3 PR c/60257
4 * c-typeck.c (warning_init): Add location_t parameter. Call
5 warning_at instead of warning.
6 (push_init_level): Pass input_location to warning_init.
7 (add_pending_init): Add location_t parameter. Pass loc to
8 warning_init.
9 (set_nonincremental_init): Pass input_location to add_pending_init.
10 (set_nonincremental_init_from_string): Likewise.
11 (output_init_element): Pass loc to warning_init and to
12 add_pending_init.
13
694296f2 142014-05-01 Marek Polacek <polacek@redhat.com>
15
16 PR c/43395
17 * c-typeck.c (c_finish_return): Distinguish between label and variable
18 when warning about returning local address.
19
86bbd7f9 202014-05-01 Marek Polacek <polacek@redhat.com>
21
22 PR c/29467
23 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
24 in C89 mode.
25
e4ab2ef3 262014-05-01 Marek Polacek <polacek@redhat.com>
27
28 PR c/43245
29 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
30 instead of 0 to WARN_FOR_QUALIFIERS.
31
ca3999cb 322014-05-01 Marek Polacek <polacek@redhat.com>
33
34 PR c/56989
35 * c-typeck.c (default_conversion): Use better location for
36 error call.
37
52cc0072 382014-04-30 Marek Polacek <polacek@redhat.com>
39
40 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
41 also when SANITIZE_FLOAT_DIVIDE is on.
42
af379dd3 432014-04-30 Marek Polacek <polacek@redhat.com>
44
45 PR c/60139
46 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
47 and pedwarn_init. Use loc insted of input_location.
48
b069c2a0 492014-04-30 Marek Polacek <polacek@redhat.com>
50
51 PR c/60351
52 * c-typeck.c (build_binary_op): Use location when warning about
53 shift count.
54
4a026b48 552014-04-25 Marek Polacek <polacek@redhat.com>
56
57 PR c/18079
58 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
59 always_inline/noinline and hot/cold attributes.
60
adc93f31 612014-04-25 Marek Polacek <polacek@redhat.com>
62
63 PR c/60114
64 * c-parser.c (c_parser_initelt): Pass input_location to
65 process_init_element.
66 (c_parser_initval): Pass loc to process_init_element.
67 * c-tree.h (process_init_element): Adjust declaration.
68 * c-typeck.c (push_init_level): Pass input_location to
69 process_init_element.
70 (pop_init_level): Likewise.
71 (set_designator): Likewise.
72 (output_init_element): Add location_t parameter. Pass loc to
73 digest_init.
74 (output_pending_init_elements): Pass input_location to
75 output_init_element.
76 (process_init_element): Add location_t parameter. Pass loc to
77 output_init_element.
78
85d2d1a8 792014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
80
81 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
82 avoid goto.
83
e1029911 842014-04-24 Jakub Jelinek <jakub@redhat.com>
85
86 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
87 atomic-clause, allow comma in between atomic-clause and
88 seq_cst.
89
9f0a7bc6 902014-04-22 Jakub Jelinek <jakub@redhat.com>
91
92 PR c/59073
93 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
94 fails, don't set OM_PARALLEL_COMBINED and return NULL.
95
094da06d 962014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
97
98 PR middle-end/60469
99 * c-array-notation.c (fix_builtin_array_notation_fn): Use
100 create_tmp_var instead build_decl for creating temps.
101 (build_array_notation_expr): Likewise.
102 (fix_conditional_array_notations_1): Likewise.
103 (fix_array_notation_expr): Likewise.
104 (fix_array_notation_call_expr): Likewise.
105
5a672e62 1062014-03-28 Jakub Jelinek <jakub@redhat.com>
107
108 PR c++/60689
109 * c-tree.h (c_build_function_call_vec): New prototype.
110 * c-typeck.c (build_function_call_vec): Don't call
111 resolve_overloaded_builtin here.
112 (c_build_function_call_vec): New wrapper function around
113 build_function_call_vec. Call resolve_overloaded_builtin here.
114 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
115 Call c_build_function_call_vec instead of build_function_call_vec.
116 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
117 * c-decl.c (finish_decl): Likewise.
118
f40f5e0e 1192014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
120
121 PR c/55383
122 * c-typeck.c: Use correct format string in cast-qual warning
123
9ec099a3 1242014-03-07 Thomas Schwinge <thomas@codesourcery.com>
125
126 * c-decl.c (c_decl_attributes): Use
127 lang_hooks.types.omp_mappable_type.
128 * c-typeck.c (c_finish_omp_clauses): Likewise.
129
3bfdc94f 1302014-03-06 Marek Polacek <polacek@redhat.com>
131
132 PR c/60197
133 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
134 of checking tree code.
135
8f1128f8 1362014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
137
138 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
139 (c_parser_parameter_declaration): Likewise.
140
977b1853 1412014-02-19 Marek Polacek <polacek@redhat.com>
142
143 PR c/60195
144 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
145 Call mark_exp_read on exp.value.
146 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
147 TREE_ADDRESSABLE on old instead of val.
148 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
149
825cd6ef 1502014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
151
152 * c-parser.c (c_parser_get_builtin_args): Replace calls to
153 C_EXPR_APPEND by vec_safe_push.
154 * c-tree.h (C_EXPR_APPEND): Remove.
155
ec761d5a 1562014-01-31 Marek Polacek <polacek@redhat.com>
157
158 PR c/59963
159 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
160 build_function_call_vec.
161 (build_function_call): Likewise.
162 (build_atomic_assign): Likewise.
163 (build_function_call_vec): Add arg_loc parameter. Use it.
164 (convert_arguments): Likewise.
165 (convert_for_assignment): Rename rhs_loc to expr_loc.
166 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
167 (c_parser_objc_keywordexpr): Likewise.
168 (c_parser_postfix_expression_after_primary): Call
169 build_function_call_vec with expr_loc rather than op_loc.
170 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
171 build_function_call_vec.
172 (c_parser_expr_list): Add locations parameter. Fill it with locations
173 of function arguments.
174 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
175
22a75734 1762014-01-30 Marek Polacek <polacek@redhat.com>
177
178 PR c/59940
179 * c-typeck.c (build_function_call_vec): Use loc parameter.
180 (convert_arguments): Add location parameter. Use it.
181 (ep_convert_and_check): Likewise.
182 (build_atomic_assign): Adjust convert_for_assignment call.
183 (build_modify_expr): Likewise.
184 (digest_init): Likewise.
185 (c_finish_return): Likewise.
186 (build_conditional_expr): Adjust ep_convert_and_check calls.
187 (convert_for_assignment): Add rhs_loc parameter. Use it.
188 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
189 calls.
190
29f580ac 1912014-01-30 Richard Biener <rguenther@suse.de>
192
193 PR c/59905
194 * c-typeck.c (build_function_call_vec): Do not replace calls
195 to a function via an incompatible type with a runtime abort.
196
a89e6c15 1972014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
198
199 * c-parser.c (c_parser_declaration_or_fndef): Replaced
200 flag_enable_cilkplus with flag_cilkplus.
201 (c_parser_direct_declarator_inner): Likewise.
202 (c_parser_attribute_any_word): Likewise.
203 (c_parser_attributes): Likewise.
204 (c_parser_compound_statement): Likewise.
205 (c_parser_statement_after_labels): Likewise.
206 (c_parser_if_statement): Likewise.
207 (c_parser_switch_statement): Likewise.
208 (c_parser_do_statement): Likewise.
209 (c_parser_for_statement): Likewise.
210 (c_parser_unary_expression): Likewise.
211 (c_parser_postfix_expression): Likewise.
212 (c_parser_postfix_expression_after_primary): Likewise.
213 (c_parser_postfix_expression_after_primary): Likewise.
214 (c_parser_omp_clause_name): Likewise.
215 (c_finish_omp_declare_simd): Likewise.
216 (c_parser_cilk_verify_simd): Likewise.
217 * c-typeck.c (build_array_ref): Likewise.
218 (build_function_call_vec): Likewise.
219 (convert_arguments): Likewise.
220 (build_compound_expr): Likewise.
221 (c_finish_return): Likewise.
222 (c_finish_if_stmt): Likewise.
223 (c_finish_loop): Likewise.
224 (build_binary_op): Likewise.
225
2623625f 2262014-01-23 Marek Polacek <polacek@redhat.com>
227
228 PR c/59846
229 * c-typeck.c (parser_build_binary_op): Use location instead of
230 input_location.
231 (build_binary_op): Pass location to shorten_compare.
232
46da3601 2332014-01-23 Marek Polacek <polacek@redhat.com>
234
235 PR c/58346
236 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
237 an empty aggregate.
238
9a9db3c1 2392014-01-23 Marek Polacek <polacek@redhat.com>
240
241 PR c/59871
242 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
243 of a comma expression.
244 (emit_side_effect_warnings): Likewise.
245
69c9b607 2462014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
247
248 PR c/59825
249 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
250 function to use walk_tree and moved a lot of its functionality to
251 expand_array_notations.
252 (expand_array_notations): New function.
253
7e005ab5 2542014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
255
256 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
257 attribute an attribute without value.
258
d6779b5f 2592014-01-23 Jakub Jelinek <jakub@redhat.com>
260
261 PR middle-end/58809
262 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
263 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
264
ec431042 2652014-01-22 Marek Polacek <polacek@redhat.com>
266
267 PR c/59891
268 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
269 of remove_c_maybe_const_expr on op1 and op2.
270
1248c663 2712014-01-15 Jakub Jelinek <jakub@redhat.com>
272
273 PR c/58943
274 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
275 effects, preevaluate rhs using SAVE_EXPR first.
276
0bc789fc 2772014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
278
279 PR c++/59631
280 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
281 statements with if-elseif statements.
282
6685d11c 2832014-01-06 Marek Polacek <polacek@redhat.com>
284
285 PR c/57773
286 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
287 defined bit-field types only in ISO C.
288
3aea1f79 2892014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
290
291 Update copyright years
292
e4f22041 2932014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
294
295 * c-array-notation.c: Use the standard form for the copyright notice.
296
74acc703 2972013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
298
299 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
300 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
301 field in parser is not empty. If not-empty, call the function
302 c_parser_finish_omp_declare_simd.
303 (c_parser_cilk_clause_vectorlength): Modified function to be shared
304 between SIMD-enabled functions and #pragma simd. Added new parameter.
305 (c_parser_cilk_all_clauses): Modified the usage of the function
306 c_parser_cilk_clause_vectorlength as mentioned above.
307 (c_parser_cilk_simd_fn_vector_attrs): New function.
308 (c_finish_cilk_simd_fn_tokens): Likewise.
309 (is_cilkplus_vector_p): Likewise.
310 (c_parser_omp_clause_name): Added checking for "vectorlength,"
311 "nomask," and "mask" strings in clause name.
312 (c_parser_omp_all_clauses): Added 3 new case statements:
313 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
314 PRAGMA_CILK_CLAUSE_NOMASK.
315 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
316 check for vector attribute and if so call the function
317 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
318 called the function c_finish_cilk_simd_fn_tokens.
319 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
320 parser field is non-empty. If so, parse them as you would parse
321 the omp declare simd pragma.
322 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
323 Added a check when step is a parameter and flag it as error.
324 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
325 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
326 pragma_omp_clause.
327
395dc01c 3282013-12-17 Thomas Schwinge <thomas@codesourcery.com>
329
330 * c-parser.c (c_parser_omp_parallel): Fix description.
331
433e804e 3322013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
333
334 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
335 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
336 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
337 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
338
a179a7dc 3392013-12-04 Joseph Myers <joseph@codesourcery.com>
340
341 PR c/52023
342 * c-parser.c (c_parser_alignas_specifier): Use
343 c_sizeof_or_alignof_type instead of c_alignof.
344 (c_parser_alignof_expression): Likewise, with min_alignof
345 parameter depending on alignof spelling used.
346
bdf1e3c7 3472013-12-04 Marek Polacek <polacek@redhat.com>
348
349 PR c/54113
350 * c-decl.c (start_function): Don't warn for missing prototype for
351 inline functions.
352
05e8f674 3532013-12-03 Marek Polacek <polacek@redhat.com>
354
355 PR c/59351
356 * c-decl.c (build_compound_literal): Allow compound literals with
357 empty initial value.
358
39f74d66 3592013-12-02 Joseph Myers <joseph@codesourcery.com>
360
361 PR c/58235
362 * c-typeck.c (build_modify_expr): Diagnose assignment to
363 expression with array type.
364
f221adca 3652013-11-29 Joseph Myers <joseph@codesourcery.com>
366
367 PR c/42262
368 * c-typeck.c (process_init_element): Do not treat a string as
369 initializing a whole array when used with a designator for an
370 individual element.
371
75bce827 3722013-11-29 Joseph Myers <joseph@codesourcery.com>
373
374 PR c/57574
375 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
376 an inline function following a static declaration.
377
dc133326 3782013-11-28 Jakub Jelinek <jakub@redhat.com>
379
380 PR c/59310
381 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
382 to p_name before calling c_parser_omp_teams instead of after.
383 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
384 argument. Remove unused p_name variable.
385
d09768a4 3862013-11-27 Aldy Hernandez <aldyh@redhat.com>
387 Jakub Jelinek <jakub@redhat.com>
388
389 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
390 external_scope is NULL.
391
73fd9cbe 3922013-11-27 Tom de Vries <tom@codesourcery.com>
393 Marc Glisse <marc.glisse@inria.fr>
394
395 PR c++/59032
396 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
397
bc61cadb 3982013-11-22 Andrew MacLeod <amacleod@redhat.com>
399
400 * c-typeck.c: Add required include files from gimple.h.
401
3df42822 4022013-11-22 David Malcolm <dmalcolm@redhat.com>
403
404 * c-decl.c (define_label, shadow_tag_warned)
405 (check_bitfield_type_and_width, grokdeclarator, grokparms,
406 store_parm_decls_newstyle, store_parm_decls_oldstyle)
407 (declspecs_add_type): Remove use of in_system_header macro.
408 * c-parser.c (c_parser_unary_expression): Likewise.
409 * c-typeck.c (store_init_value, process_init_element)
410 (c_start_case): Likewise.
411
412 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
413 macro.
414
415 * c-parser.c (c_parser_set_source_position_from_token): Remove
416 reference to in_system_header from comment.
417
08f817b3 4182013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
419
420 * c-decl.c (grokdeclarator): Update comment to refer to
421 tree_to_[su]hwi rather than tree_low_cst.
422
6a0712d4 4232013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
424
425 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
426 tree_to_uhwi throughout.
427
fcb97e84 4282013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
429
430 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
431 throughout.
432
35ec552a 4332013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
434
435 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
436 throughout.
437
f2697631 4382013-11-15 Aldy Hernandez <aldyh@redhat.com>
439
440 * c-parser.c (c_parser_cilk_simd): New.
441 (c_parser_cilk_verify_simd): New.
442 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
443 (c_parser_omp_for_loop): Add case for NE_EXPR.
444 Set c_break_label for CILK_SIMD.
445 (c_parser_cilk_clause_vectorlength): New.
446 (c_parser_cilk_clause_linear): New.
447 (c_parser_cilk_clause_name): New.
448 (c_parser_cilk_all_clauses): New.
449 * c-typeck.c (build_unary_op): Pass location argument to
450 readonly_error.
451 (build_modify_expr): Same.
452 (build_asm_expr): Same.
453 (c_finish_bc_stmt): Error on break/continue in loops.
454
e795d6e1 4552013-11-14 Andrew MacLeod <amacleod@redhat.com>
456
457 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
458
9ed99284 4592013-11-14 Diego Novillo <dnovillo@google.com>
460
461 * c-decl.c: Include print-tree.h.
462 Include stor-layout.h.
463 Include varasm.h.
464 Include attribs.h.
465 Include stringpool.h.
466 * c-lang.c: Include fold-const.h.
467 * c-parser.c: Include stringpool.h.
468 Include attribs.h.
469 Include stor-layout.h.
470 Include varasm.h.
471 Include trans-mem.h.
472 * c-typeck.c: Include stor-layout.h.
473 Include trans-mem.h.
474 Include varasm.h.
475 Include stmt.h.
476
4fba5eb9 4772013-11-13 Joseph Myers <joseph@codesourcery.com>
478
479 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
480 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
481 __auto_type.
482 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
483 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
484 RID_AUTO_TYPE.
485 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
486 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
487 (c_parser_declarator, c_parser_direct_declarator_inner)
488 (c_parser_parameter_declaration, c_parser_type_name): All callers
489 changed.
490 (c_parser_declaration_or_fndef): Handle declarations with type
491 determined from the initializer.
492
a8783bee 4932013-11-12 Andrew MacLeod <amacleod@redhat.com>
494
e795d6e1 495 * c-typeck.c: Include gimplify.h.
a8783bee 496
d184e0c0 4972013-11-12 Joseph Myers <joseph@codesourcery.com>
498
499 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
500 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
501 comment.
502 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
503 or _Thread_local as appropriate in diagnostics.
504 (build_null_declspecs): Initialize ret->thread_gnu_p.
505 (declspecs_add_scspec): Handle either __thread or _Thread_local
506 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
507 pedantic. Do not disallow _Thread_local extern and _Thread_local
508 static.
509
b560fabd 5102013-11-07 Joseph Myers <joseph@codesourcery.com>
511 Andrew MacLeod <amacleod@redhat.com>
512
513 * c-aux-info.c (gen_type): Handle atomic qualifier.
514 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
515 qualifiers when compating types.
516 (shadow_tag_warned): Handle atomic_p in declspecs.
517 (quals_from_declspecs): Likewise.
518 (start_decl): Use c_type_promotes_to when promoting argument
519 types.
520 (grokdeclarator): Handle _Atomic.
521 (get_parm_info): Diagnose any qualifier on "void" as only
522 parameter.
523 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
524 comparing types. Use c_type_promotes_to when promoting argument
525 types.
526 (finish_function): Use c_type_promotes_to when promoting argument
527 types.
528 (build_null_declspecs): Handle atomic_p in declspecs.
529 (declspecs_add_qual): Handle RID_ATOMIC.
530 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
531 (c_token_starts_declspecs): Handle RID_ATOMIC.
532 (c_parser_declspecs): Handle atomic type specifiers and
533 qualifiers.
534 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
535 from types of expressions with atomic type.
536 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
537 (c_parser_attribute_any_word): Handle RID_ATOMIC.
538 (c_parser_initializer, c_parser_initelt, c_parser_initval)
539 (c_parser_statement_after_labels, c_parser_switch_statement)
540 (c_parser_for_statement, c_parser_expr_no_commas)
541 (c_parser_conditional_expression, c_parser_binary_expression)
542 (c_parser_cast_expression, c_parser_unary_expression)
543 (c_parser_postfix_expression)
544 (c_parser_postfix_expression_after_primary, c_parser_expression):
545 Use convert_lvalue_to_rvalue.
546 (c_parser_expression_conv, c_parser_expr_list): Document
547 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
548 (c_parser_objc_synchronized_statement): Use
549 convert_lvalue_to_rvalue.
550 (c_parser_objc_selector): Handle RID_ATOMIC.
551 (c_parser_objc_receiver, c_parser_array_notation): Use
552 convert_lvalue_to_rvalue.
553 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
554 _Atomic (type-name).
555 (struct c_declspecs): Add atomic_p field.
556 (convert_lvalue_to_rvalue): Declare.
557 * c-typeck.c (c_type_promotes_to): Promote atomic types to
558 corresponding atomic types.
559 (qualify_type): Don't add _Atomic qualifiers from second argument.
560 (comp_target_types): Do not allow _Atomic mismatches.
561 (type_lists_compatible_p): Do not remove atomic qualifiers when
562 comparing types.
563 (really_atomic_lvalue, convert_lvalue_to_rvalue)
564 (build_atomic_assign): New functions.
565 (build_unary_op): Use build_atomic_assign for atomic increment and
566 decrement.
567 (build_conditional_expr): Do not treat _Atomic void as a qualified
568 version of void.
569 (build_modify_expr): Use build_atomic_assign for atomic LHS.
570 (find_anonymous_field_with_type, convert_to_anonymous_field)
571 (convert_for_assignment): Do not remove atomic qualifiers when
572 comparing types.
573 (digest_init): Do not accept initialization of arrays of atomic
574 elements by string constants.
575 (build_asm_expr): Use convert_lvalue_to_rvalue.
576 (build_binary_op): Do not treat _Atomic void as a qualified
577 version of void.
578
8b023e7c 5792013-11-06 DJ Delorie <dj@redhat.com>
580
581 * c-decl.c (locate_old_decl): If a previous conflicting decl is
582 both explicit and builtin, print the location of the explicit one.
583
c630ef93 5842013-11-05 Tobias Burnus <burnus@net-b.de>
585
586 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
587 c_parser_omp_distribute, c_parser_omp_teams,
588 c_parser_omp_target, c_parser_omp_declare): Handle
589 -fopenmp-simd.
590
2c4c3477 5912013-11-03 Marek Polacek <polacek@redhat.com>
592
593 * c-decl.c (grokdeclarator): Add VLA instrumentation.
594
df205251 5952013-11-01 Jakub Jelinek <jakub@redhat.com>
596
597 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
598 check_dup_generic at the end, unless remove is true.
599 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
600 remove = true;.
601 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
602
23871d0c 6032013-10-31 Jakub Jelinek <jakub@redhat.com>
604
605 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
606 with decl that is not pointer nor array.
607
d037099f 6082013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
609
610 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
611 a spawning function is found.
612 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
613 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
614 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
615 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
616 case.
617 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
618 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
619 expr.
620 (c_finish_return): Added a check to reject _Cilk_spawn in return
621 expression.
622 (build_cilk_spawn): New function.
623 (build_cilk_sync): Likewise.
624 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
625
4c90c04c 6262013-10-27 Tobias Burnus <burnus@net-b.de>
627
628 PR other/33426
629 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
630 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
631 (c_parser_statement_after_labels): Update calls.
632
48a972c8 6332013-10-24 Tobias Burnus <burnus@net-b.de>
4644b593 634
635 PR other/33426
636 * c-parser.c (c_parser_pragma, c_parser_for_statement):
637 Handle PRAGMA_IVDEP.
638 (c_parser_statement_after_labels): Update call.
639
12f86df0 6402013-10-24 Marek Polacek <polacek@redhat.com>
641
642 * c-parser.c (c_parser_struct_declaration): Add a comment.
643 (c_parser_declarator): Don't allow _Alignas here.
644
7740abd8 6452013-10-17 Andrew MacLeod <amacleod@redhat.com>
646
647 * c-parser.c: Include omp-low.h.
648 * c-typeck.c: Likewise.
649
43d03c23 6502013-10-17 Marek Polacek <polacek@redhat.com>
651
652 PR c/58267
653 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
654 Document syntax of the array-declarator.
655 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
656 are not permitted.
657 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
658 (c_parser_struct_declaration): Likewise.
659 (c_parser_declarator): Likewise.
660 (c_parser_direct_declarator_inner): Likewise.
661 (c_parser_parameter_declaration): Likewise.
662 (c_parser_type_name): Likewise.
663
bc7bff74 6642013-10-11 Jakub Jelinek <jakub@redhat.com>
665
666 * c-lang.h (current_omp_declare_target_attribute): New extern
667 decl.
668 * c-parser.c: Include c-lang.h.
669 (struct c_parser): Change tokens to c_token *.
670 Add tokens_buf field. Change tokens_avail type to unsigned int.
671 (c_parser_consume_token): If parser->tokens isn't
672 &parser->tokens_buf[0], increment parser->tokens.
673 (c_parser_consume_pragma): Likewise.
674 (enum pragma_context): Add pragma_struct and pragma_param.
675 (c_parser_external_declaration): Adjust
676 c_parser_declaration_or_fndef caller.
677 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
678 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
679 Adjust recursive call.
680 (c_parser_struct_or_union_specifier): Use pragma_struct instead
681 of pragma_external.
682 (c_parser_parameter_declaration): Use pragma_param instead of
683 pragma_external.
684 (c_parser_compound_statement_nostart, c_parser_label,
685 c_parser_for_statement): Adjust
686 c_parser_declaration_or_fndef callers.
687 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
688 it through to c_parser_conditional_expression.
689 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
690 pass it through to c_parser_binary_expression. Adjust recursive
691 call.
692 (c_parser_binary_expression): Remove prec argument, add
693 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
694 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
695 binop matches it, use build2 instead of parser_build_binary_op.
696 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
697 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
698 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
699 Handle pragma_struct and pragma_param the same as pragma_external.
700 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
701 (c_parser_omp_variable_list): Parse array sections for
702 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
703 (c_parser_omp_clause_collapse): Fully fold collapse expression.
704 (c_parser_omp_clause_reduction): Handle user defined reductions.
705 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
706 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
707 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
708 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
709 c_parser_omp_clause_depend, c_parser_omp_clause_map,
710 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
711 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
712 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
713 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
714 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
715 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
716 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
717 (c_parser_omp_for_loop): Add CODE argument, pass it through
718 to c_finish_omp_for. Change last argument to cclauses,
719 and adjust uses to grab parallel clauses from the array of all
720 the split clauses. Adjust c_parser_binary_expression,
721 c_parser_declaration_or_fndef and c_finish_omp_for callers.
722 (omp_split_clauses): New function.
723 (c_parser_omp_simd): New function.
724 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
725 Allow the function to be called also when parsing combined constructs,
726 and call c_parser_omp_simd when parsing for simd.
727 (c_parser_omp_sections_scope): If section-sequence doesn't start with
728 #pragma omp section, require exactly one structured-block instead of
729 sequence of statements.
730 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
731 Allow the function to be called also when parsing combined constructs.
732 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
733 Allow the function to be called also when parsing combined
734 constructs.
735 (c_parser_omp_taskgroup, c_parser_omp_cancel,
736 c_parser_omp_cancellation_point, c_parser_omp_distribute,
737 c_parser_omp_teams, c_parser_omp_target_data,
738 c_parser_omp_target_update, c_parser_omp_target,
739 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
740 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
741 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
742 (c_parser_omp_construct): Add p_name and mask vars. Handle
743 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
744 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
745 and c_parser_omp_sections callers.
746 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
747 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
748 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
749 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
750 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
751 OMP_CLAUSE_DEPEND.
752 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
753 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
754 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
755 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
756 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
757 * c-typeck.c: Include tree-inline.h.
758 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
759 handle_omp_array_sections_1, handle_omp_array_sections,
760 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
761 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
762 user defined reductions.
763 (c_tree_equal): New function.
764 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
765 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
766 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
767 c_check_omp_declare_reduction_r): New prototypes.
768 * c-decl.c (current_omp_declare_target_attribute): New variable.
769 (c_decl_attributes): New function.
770 (start_decl, start_function): Use it instead of decl_attributes.
771 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
772 c_omp_reduction_decl, c_omp_reduction_lookup,
773 c_check_omp_declare_reduction_r): New functions.
774
3ce7d1bd 7752013-09-25 Tom Tromey <tromey@redhat.com>
776
777 * Make-lang.in (c/gccspec.o): Remove.
778 (CFLAGS-c/gccspec.o): New variable.
779 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
780 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
781 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
782
96da1c1d 7832013-09-25 Tom Tromey <tromey@redhat.com>
784
785 * Make-lang.in (c/gccspec.o): Don't use subshell.
786
1b309377 7872013-09-18 Marek Polacek <polacek@redhat.com>
788
789 PR sanitize/58443
790 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
791 Remove unnecessary check.
792
05f893e1 7932013-09-18 Marek Polacek <polacek@redhat.com>
794
795 PR sanitizer/58411
796 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
797 no_sanitize_undefined attribute.
798
bda0b9d2 7992013-09-13 Kai Tietz <ktietz@redhat.com>
800
801 PR target/57848
802 * c-decl.c (c_builtin_function_ext_scope): Remove
803 wrong assumption that it is never called on prexisting
804 symbol.
805
73437615 8062013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
807
808 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
809
eaab24b9 8102013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
811
812 * c-objc-common.c (c_tree_printer): Tidy.
813
9e46467d 8142013-08-30 Marek Polacek <polacek@redhat.com>
815
816 * c-typeck.c (build_binary_op): Add division by zero and shift
817 instrumentation.
818
f8234178 8192013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
f9086116 820 Joseph Myers <joseph@codesourcery.com>
f8234178 821
c90a7d10 822 PR c/35649
f8234178 823 * c-typeck.c (c_common_type): Prefer double_type_node over
824 other REAL_TYPE types with the same precision.
825 (convert_arguments): Likewise.
826
6f07f480 8272013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
828
829 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
830 (c_initialize_diagnostics): Call a destructor for the early printer.
831
eed6bc21 8322013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
833
834 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
835 printer initialization.
836
57717943 8372013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
eed6bc21 838
57717943 839 PR c/57490
840 * c-array-notation.c (fix_conditional_array_notations_1): Added a
841 check for truth values.
842 (expand_array_notation_exprs): Added truth values case. Removed an
843 unwanted else. Added for-loop to walk through subtrees in default
844 case.
845
a94db6b0 8462013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
847
848 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
849
e76163a9 8502013-07-23 Joseph Myers <joseph@codesourcery.com>
851
852 * c-parser.c (struct c_generic_association): Fix typo.
853
7aa04c8d 8542013-07-23 Tom Tromey <tromey@redhat.com>
855 Joseph Myers <joseph@codesourcery.com>
856
857 * c-parser.c (struct c_generic_association): New.
858 (c_generic_association_d): New typedef.
859 (c_parser_generic_selection): New function.
860 (c_parser_postfix_expression): Handle RID_GENERIC.
861
76bbe4ca 8622013-07-13 Jason Merrill <jason@redhat.com>
863
864 PR c++/57793
865 * c-decl.c (finish_struct): Check for too-large class.
866
21ebaa24 8672013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
f5298614 868
869 PR c/57821
870 * c-typeck.c (set_init_index): When folding, check for index overflow.
871
936c3081 8722013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
873
874 * c-parser.c (c_parser_array_notation): Removed rejection of array
875 notations in an array of function pointers.
876
50acebe0 8772013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
878
879 * c-array-notation.c (make_triplet_val_inv): New function.
880 (create_cmp_incr): Likewise.
881 (create_array_refs): Likewise.
882 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
883 Also modularized common parts between functions and called the function.
884 (build_array_notation_expr): Likewise.
885 (fix_conditional_array_notations_1): Likewise.
886 (fix_array_notation_expr): Likewise.
887 (fix_array_notation_call_expr): Likewise.
888
01e6cdb4 8892013-06-18 Marek Polacek <polacek@redhat.com>
890
891 PR c/57630
892 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
893
6a3adac6 8942013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
895
896 * c-array-notation.c (build_array_notation_expr): Reject array notation
897 mismatch between LHS and RHS even inside a call_expr. Also, removed
898 a couple while statements that were dead code.
899
62aab3f3 9002013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
901
902 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
903 excessive precision expressions in function parameters. Also removed
904 couple unwanted while statements.
905
bfc83720 9062013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
907
908 * c-array-notation.c (expand_array_notation_exprs): Added
909 ARRAY_NOTATION_REF case.
910
09970d67 9112013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
912
913 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
914 function to c-family/array-notation-common.c.
915 (is_cilkplus_reduce_builtin): Likewise.
916 (find_rank): Likewise.
917 (extract_array_notation_exprs): Likewise.
918 (replace_array_notations): Likewise.
919 (find_inv_trees): Likewise.
920 (replace_inv_trees): Likewise.
921 (contains_array_notation_expr): Likewise.
922 (find_correct_array_notation_type): Likewise.
923 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
924 (struct inv_list): Moved this to c-family/array-notation-common.c.
925 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
926
6e13bc01 9272013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
928
929 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
930 reduction functions outside the for-loop. Added a check if the fundecl
931 is non-NULL. Finally, removed an unwanted if-statement, and made the
932 body unconditional.
933
cc92dddc 9342013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
935
936 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
937 condition of the if-statement matches the rank of else-block and then-
938 block when array notations are used.
939 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
940 expression after the entire function body is parsed.
941 (c_parser_expr_no_commas): Delayed creating array notation expressions
942 to the end of function parsing.
943 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
944 whole if-statement instead of just the condition.
945 (expand_array_notation_exprs): Added MODIFY_EXPR case.
946
eddc63fd 9472013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
948
949 PR c/57474
950 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
951 array to NULL_TREE if they are unused. Also added a check for the
952 field to be NULL before its fields are used in future.
953
a2115a4a 9542013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
955
956 PR bootstrap/57450
957 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
958 (build_array_notation_expr): Likewise.
959
3c6d4197 9602013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
961
962 * c-typeck.c (build_array_ref): Added a check to see if array's
963 index is greater than one. If true, then emit an error.
964 (build_function_call_vec): Exclude error reporting and checking
965 for builtin array-notation functions.
966 (convert_arguments): Likewise.
967 (c_finish_return): Added a check for array notations as a return
968 expression. If true, then emit an error.
969 (c_finish_loop): Added a check for array notations in a loop
970 condition. If true then emit an error.
971 (lvalue_p): Added a ARRAY_NOTATION_REF case.
972 (build_binary_op): Added a check for array notation expr inside
973 op1 and op0. If present, we call another function to find correct
974 type.
975 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
976 * c-parser.c (c_parser_compound_statement): Check if array
977 notation code is used in tree, if so, then transform them into
978 appropriate C code.
979 (c_parser_expr_no_commas): Check if array notation is used in LHS
980 or RHS, if so, then build array notation expression instead of
981 regular modify.
982 (c_parser_postfix_expression_after_primary): Added a check for
983 colon(s) after square braces, if so then handle it like an array
984 notation. Also, break up array notations in unary op if found.
985 (c_parser_direct_declarator_inner): Added a check for array
986 notation.
987 (c_parser_compound_statement): Added a check for array notation in
988 a stmt. If one is present, then expand array notation expr.
989 (c_parser_if_statement): Likewise.
990 (c_parser_switch_statement): Added a check for array notations in
991 a switch statement's condition. If true, then output an error.
992 (c_parser_while_statement): Similarly, but for a while.
993 (c_parser_do_statement): Similarly, but for a do-while.
994 (c_parser_for_statement): Similarly, but for a for-loop.
995 (c_parser_unary_expression): Check if array notation is used in a
996 pre-increment or pre-decrement expression. If true, then expand
997 them.
998 (c_parser_array_notation): New function.
999 * c-array-notation.c: New file.
1000 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
1001
2c1c8a2c 10022013-05-23 Mike Stump <mikestump@comcast.net>
1003
1004 * c-typeck.c (convert_for_assignment): Handle references to memory
1005 spaces better.
1006
be5f9e46 10072013-05-16 Jason Merrill <jason@redhat.com>
1008
1009 * Make-lang.in (cc1$(exeext)): Use link mutex.
1010
9205a6cc 10112013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
1012
1013 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
1014 to simply use OPT_Wpointer_arith.
1015 (build_unary_op): Likewise.
1016
0b049e15 10172013-04-03 Jakub Jelinek <jakub@redhat.com>
1018
1019 PR c/19449
1020 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
1021 argument. If set, or it temporarily for parsing of the first
1022 argument into force_folding_builtin_constant_p.
1023 (c_parser_postfix_expression): Adjust callers.
1024
8e966116 10252013-03-21 Richard Biener <rguenther@suse.de>
1026
1027 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
1028 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
1029
b862f263 10302013-02-12 Marek Polacek <polacek@redhat.com>
1031
1032 PR c/44938
1033 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
1034 origtypes to NULL.
1035
54550ecb 10362013-01-24 Jakub Jelinek <jakub@redhat.com>
1037
1038 PR c/56078
1039 * c-typeck.c (set_nonincremental_init_from_string): If
1040 constructor_max_index is NULL, treat it as if tree_int_cst_lt
1041 returned false.
1042 (process_init_element): Likewise.
1043
035b65e2 10442012-12-20 Jakub Jelinek <jakub@redhat.com>
1045
1046 PR c++/55619
1047 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
1048 argument, don't call default_function_array_conversion
1049 nor c_fully_fold here.
1050 (c_parser_asm_statement): Adjust callers.
1051 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
1052 and outputs here, and call default_function_array_conversion
1053 on inputs that don't need to be addressable.
1054
7cbb7f1a 10552012-12-18 Jakub Jelinek <jakub@redhat.com>
1056
1057 PR c/39464
1058 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
1059 warning require that both c_common_unsigned_type as well as
1060 c_common_signed_type is the same for both mvl and mvr types.
1061
f1f41a6c 10622012-11-16 Diego Novillo <dnovillo@google.com>
1063
1064 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
1065
1066 * c-common.c: Use new vec API in vec.h.
1067 * c-common.h: Likewise.
1068 * c-gimplify.c: Likewise.
1069 * c-pragma.c: Likewise.
1070 * c-pretty-print.c: Likewise.
1071 * c-pretty-print.h: Likewise.
1072 * c-semantics.c: Likewise.
1073 * c-decl.c: Likewise.
1074 * c-parser.c: Likewise.
1075 * c-tree.h: Likewise.
1076 * c-typeck.c: Likewise.
1077
8b447d3f 10782012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
1079
1080 PR c++/54930
1081 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
1082
08fc5390 10832012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1084
1085 PR c/53066
1086 * c-decl.c (warn_if_shadowing): Do not warn if a variable
1087 shadows a function, unless the variable is a function or a
1088 pointer-to-function.
1089
57f872a2 10902012-10-12 Jakub Jelinek <jakub@redhat.com>
1091
1092 PR c/54381
1093 * c-parser.c (struct c_tree_loc_pair): Removed.
1094 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
1095 add location_t * and tree * arguments, fill in array of 3
1096 sizeof_arg trees and corresponding locs.
1097 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
1098 c_parser_expr_list callers.
1099 (c_parser_postfix_expression_after_primary): Likewise. Pass
1100 array of 3 sizeof_arg trees and locs (corresponding to first
1101 3 arguments) to sizeof_pointer_memaccess_warning.
1102
d1455aa3 11032012-10-09 Lawrence Crowl <crowl@google.com>
1104
1105 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
1106 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
1107 hash table.
1108
b0e7825e 11092012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
1110
1111 PR c++/54194
1112 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
1113 call.
1114
41ed701a 11152012-10-09 Marc Glisse <marc.glisse@inria.fr>
1116
1117 PR c++/54427
1118 * c-typeck.c: Include c-common.h.
1119 (enum stv_conv): Moved to c-common.h.
1120 (scalar_to_vector): Moved to c-common.c.
1121 (build_binary_op): Adapt to scalar_to_vector's new prototype.
1122 * Make-lang.in: c-typeck.c depends on c-common.h.
1123
ef34afc1 11242012-10-04 Arnaud Charlet <charlet@adacore.com>
1125
1126 * c-decl.c (c_write_global_declarations): Fix handling of
1127 -fdump-ada-spec*.
1128
7bd765d4 11292012-09-30 Sharad Singhai <singhai@google.com>
1130
1131 * c-decl.c (c_write_global_declarations): Use a different method
1132 to determine if the dump has ben initialized.
1133
c4b1a13a 11342012-09-14 Joseph Myers <joseph@codesourcery.com>
1135
1136 PR c/54552
1137 * c-typeck.c (c_cast_expr): When casting to a type requiring
1138 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
1139 c_fully_fold first.
1140
bb554051 11412012-09-14 Joseph Myers <joseph@codesourcery.com>
1142
1143 PR c/54103
1144 * c-typeck.c (build_unary_op): Pass original argument of
1145 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
1146 any C_MAYBE_CONST_EXPR, if it has integer operands.
1147 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
1148 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
1149 to c_objc_common_truthvalue_conversion, then remove any
1150 C_MAYBE_CONST_EXPR, if they have integer operands. Use
1151 c_objc_common_truthvalue_conversion not
1152 c_common_truthvalue_conversion.
1153 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
1154 call note_integer_operands for arguments with integer operands
1155 that are not integer constants.
1156
c708c6ef 11572012-09-13 Jakub Jelinek <jakub@redhat.com>
1158
1159 PR c/54559
1160 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
1161 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
1162
cce20430 11632012-08-31 Jakub Jelinek <jakub@redhat.com>
1164
1165 PR c/54428
1166 * c-convert.c (convert): Don't call fold_convert_loc if
1167 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
1168 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
1169 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
1170
a90d57ed 11712012-08-24 Jakub Jelinek <jakub@redhat.com>
1172
1173 PR c/54355
1174 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
1175 for nested and empty_ok arguments in the call to
1176 c_parser_declaration_or_fndef.
1177
f003f5dc 11782012-08-17 Jakub Jelinek <jakub@redhat.com>
1179
1180 * c-tree.h (c_last_sizeof_arg): Declare.
1181 * c-parser.c (struct c_tree_loc_pair): New type.
1182 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
1183 non-NULL.
1184 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
1185 (c_parser_postfix_expression_after_primary): Likewise. Call
1186 sizeof_pointer_memaccess_warning if needed.
1187 (sizeof_ptr_memacc_comptypes): New function.
1188 * c-typeck.c (c_last_sizeof_arg): New global variable.
1189 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
1190
a5656b73 11912012-07-24 Uros Bizjak <ubizjak@gmail.com>
1192
1193 * c-lang.h (lang_decl): Add variable_size GTY option.
1194
b9ed1410 11952012-07-16 Steven Bosscher <steven@gcc.gnu.org>
1196
1197 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
1198 * Make-lang.in: Fix dependencies.
1199
e53d55e7 12002012-06-29 Steven Bosscher <steven@gcc.gnu.org>
1201
1202 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
1203 and add language Makefile hooks.
1204 * config-lang.in: New file.
1205 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
1206 add the required "normal" config-lang.in rules.
1207 * c-lang.h: Moved from gcc/ to here.
1208 * c-tree.h: Likewise.
1209 * c-objc-common.c: Likewise.
1210 * c-objc-common.h: Likewise.
1211 * c-typeck.c: Likewise.
1212 * c-convert.c: Likewise.
1213 * c-lang.c: Likewise.
1214 * c-aux-info.c: Likewise.
1215 * c-errors.c: Likewise.
1216 * gccspec.c: Likewise.
1217 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
1218 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
1219\f
3aea1f79 1220Copyright (C) 2012-2014 Free Software Foundation, Inc.
e53d55e7 1221
1222Copying and distribution of this file, with or without modification,
1223are permitted in any medium without royalty provided the copyright
1224notice and this notice are preserved.