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