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