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