re PR c/69798 (ICE on invalid code on x86_64-linux-gnu in c_parser_braced_init, at...
[platform/upstream/gcc.git] / gcc / c / ChangeLog
1 2016-03-04  Marek Polacek  <polacek@redhat.com>
2
3         PR c/69798
4         * c-parser.c (c_parser_postfix_expression): Call
5         c_parser_cast_expression rather than c_parser_postfix_expression.
6
7 2016-03-01  Jakub Jelinek  <jakub@redhat.com>
8
9         PR c/69796
10         PR c/69974
11         * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
12         of incomplete decls to error_mark_node.
13
14 2016-02-24  Marek Polacek  <polacek@redhat.com>
15
16         PR c/69819
17         * c-decl.c (finish_decl): Don't update the copy of the type of a
18         different decl type.
19
20 2016-02-23  Jakub Jelinek  <jakub@redhat.com>
21
22         PR objc/69844
23         * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
24         in id_kind reclassification.
25
26 2016-02-16  Jakub Jelinek  <jakub@redhat.com>
27
28         PR c/69835
29         * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
30
31 2016-02-16  James Norris  <jnorris@codesourcery.com>
32
33         PR c/64748
34         * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
35
36 2016-02-12  Bernd Schmidt  <bschmidt@redhat.com>
37
38         * c-decl.c (build_null_declspecs): Zero the entire struct.
39
40         PR c/69522
41         * c-parser.c (c_parser_braced_init): New arg outer_obstack.  All
42         callers changed.  If nested_p is true, use it to call
43         finish_implicit_inits.
44         * c-tree.h (finish_implicit_inits): Declare.
45         * c-typeck.c (finish_implicit_inits): New function.  Move code
46         from ...
47         (push_init_level): ... here.
48         (set_designator, process_init_element): Call finish_implicit_inits.
49
50 2016-02-11  Jakub Jelinek  <jakub@redhat.com>
51
52         PR c/69768
53         * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
54         arguments for -Waddress warning.
55
56 2016-02-04  Jakub Jelinek  <jakub@redhat.com>
57
58         PR c/69669
59         * c-decl.c (finish_enum): When honoring mode attribute,
60         make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
61
62 2016-01-29  Jakub Jelinek  <jakub@redhat.com>
63
64         PR debug/69518
65         * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
66         all type variants, not just TYPE_MAIN_VARIANT.
67
68 2016-01-27  Jakub Jelinek  <jakub@redhat.com>
69
70         PR debug/66869
71         * c-decl.c (c_write_global_declarations_1): Warn with
72         warn_unused_function if static prototype without definition
73         is not C_DECL_USED.
74
75 2016-01-27  Marek Polacek  <polacek@redhat.com>
76
77         PR c/68062
78         * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
79         to unsigned, if needed.  Add -Wsign-compare warning.
80
81 2016-01-26  Jakub Jelinek  <jakub@redhat.com>
82
83         PR tree-optimization/69483
84         * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
85
86 2016-01-20  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
87
88         PR c/24293
89         * c-tree.h (incomplete_record_decls): Declare.
90         * c-parser.c (incomplete_record_decls): Define.
91         (c_parser_translation_unit): Iterate through incomplete_record_decls and
92         report error if any decl has zero size.
93         * c-decl.c (finish_decl): Append static decl with incomplete struct/union
94         or enum type to incomplete_record_decls.
95
96 2016-01-14  Tom de Vries  <tom@codesourcery.com>
97
98         PR tree-optimization/68773
99         * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
100         set force_output.
101
102 2016-01-14  Marek Polacek  <polacek@redhat.com>
103
104         PR c/69262
105         * c-decl.c (grokdeclarator): Provide more information for invalid
106         array declarations.
107
108 2016-01-06  David Malcolm  <dmalcolm@redhat.com>
109
110         * c-parser.c (c_parser_unary_expression): For dereferences, build
111         a combined location before calling build_indirect_ref, so that
112         error reports cover the full range, manually updating the c_expr
113         src_range.
114
115 2016-01-06  Marek Polacek  <polacek@redhat.com>
116
117         PR sanitizer/69099
118         * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG.  Don't pass ARG to
119         ubsan_instrument_float_cast.  Fold EXPR.  Use NULL_TREE instead of
120         NULL.
121
122 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
123
124         Update copyright years.
125
126 2016-01-04  Marek Polacek  <polacek@redhat.com>
127
128         PR c/68908
129         * c-typeck.c (build_atomic_assign): Improve commentary.  Add
130         optimization to use __atomic_fetch_* built-in if possible.
131
132 2015-12-23  Thomas Schwinge  <thomas@codesourcery.com>
133
134         * c-parser.c (c_parser_oacc_clause_use_device): Merge function
135         into...
136         (c_parser_omp_clause_use_device_ptr): ... this function.  Adjust
137         all users.
138
139 2015-12-22  Marek Polacek  <polacek@redhat.com>
140
141         PR c/69002
142         * c-typeck.c (build_component_ref): Warn when acessing elements of
143         atomic structures or unions.
144
145 2015-12-21  David Malcolm  <dmalcolm@redhat.com>
146
147         * c-typeck.c: Include "gcc-rich-location.h".
148         (build_binary_op): In the two places that call binary_op_error,
149         create a gcc_rich_location and populate it with the location of
150         the binary op and its two operands.
151
152 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
153
154         * c-parser.c (c_parser_statement_after_labels): When calling
155         c_finish_return, Use the return expression's location if it has
156         one, falling back to the location of the first token within it.
157         * c-typeck.c (c_finish_return): When issuing warnings about
158         the incorrect presence/absence of a return value, issue a note
159         showing the declaration of the function.
160
161 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
162
163         * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
164         to 4.
165         (c_parser_peek_nth_token): New function.
166         (c_parser_peek_conflict_marker): New function.
167         (c_parser_error): Detect conflict markers and report them as such.
168
169 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
170
171         * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
172         to preserve range information for the primary expression
173         in the call to c_parser_postfix_expression_after_primary.
174
175 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
176
177         * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
178         expression location, falling back on the first token location,
179         rather than always using the latter.
180
181 2015-12-16  Marek Polacek  <polacek@redhat.com>
182
183         PR c/64637
184         * c-typeck.c (c_process_expr_stmt): Use location of the expression if
185         available.
186
187 2015-12-15  Marek Polacek  <polacek@redhat.com>
188
189         PR c/68907
190         * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
191         artificial decl.
192
193 2015-12-08  David Malcolm  <dmalcolm@redhat.com>
194
195         * c-parser.c (c_parser_alignof_expression): Capture location of
196         closing parenthesis (if any), or of end of unary expression, and
197         use it to build a src_range for the expression.
198
199 2015-12-08  David Malcolm  <dmalcolm@redhat.com>
200
201         PR c/68757
202         * c-parser.c (c_parser_get_builtin_args): Add
203         "out_close_paren_loc" param, and write back to it.
204         (c_parser_postfix_expression): Capture the closing
205         parenthesis location for RID_CHOOSE_EXPR,
206         RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
207         RID_BUILTIN_SHUFFLE and use it to set the source range
208         for such expressions; within RID_BUILTIN_COMPLEX set
209         the underlying location.
210
211 2015-12-07  Marek Polacek  <polacek@redhat.com>
212
213         PR c/68668
214         * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
215         TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
216
217 2015-12-04  Eric Botcazou  <ebotcazou@adacore.com>
218
219         * c-tree.h (c_build_va_arg): Adjust prototype.
220         * c-parser.c (c_parser_postfix_expression): Adjust call to above.
221         * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
222         parameter, adjust throughout and issue an error if EXPR is a component
223         with reverse storage order.
224
225 2015-12-02  Jason Merrill  <jason@redhat.com>
226
227         * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
228         (c_fully_fold_internal, decl_constant_value_for_optimization):
229         Move from c-common.c.
230         * c-tree.h: Declare decl_constant_value_for_optimization.
231         * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
232
233 2015-12-02  Joseph Myers  <joseph@codesourcery.com>
234
235         PR c/68162
236         * c-decl.c (grokdeclarator): Set first_non_attr_kind before
237         following link from declarator to next declarator.  Track original
238         qualified type and pass it to c_build_qualified_type.
239         * c-typeck.c (c_build_qualified_type): Add arguments
240         orig_qual_type and orig_qual_indirect.
241
242 2015-12-02  Thomas Schwinge  <thomas@codesourcery.com>
243
244         * c-parser.c (c_parser_omp_clause_name)
245         (c_parser_oacc_all_clauses): Alphabetical sorting.
246
247 2015-12-02  Jakub Jelinek  <jakub@redhat.com>
248
249         PR c/68533
250         * c-decl.c (get_parm_info): Use b->locus instead of input_location
251         for diagnostics.
252
253 2015-12-01  Julian Brown  <julian@codesourcery.com>
254             Cesar Philippidis  <cesar@codesourcery.com>
255             James Norris  <James_Norris@mentor.com>
256
257         * c-parser.c (c_parser_omp_clause_name): Add use_device support.
258         (c_parser_oacc_clause_use_device): New function.
259         (c_parser_oacc_all_clauses): Add use_device support.
260         (OACC_HOST_DATA_CLAUSE_MASK): New macro.
261         (c_parser_oacc_host_data): New function.
262         (c_parser_omp_construct): Add host_data support.
263         * c-tree.h (c_finish_oacc_host_data): Add prototype.
264         * c-typeck.c (c_finish_oacc_host_data): New function.
265         (c_finish_omp_clauses): Add use_device support.
266
267 2015-11-29  Jan Hubicka  <hubicka@ucw.cz>
268
269         PR c/67106
270         * c-decl.c: Set TYPE_PACKED in variants.
271
272 2015-11-27  Martin Liska  <mliska@suse.cz>
273
274         PR c++/68312
275         * c-array-notation.c (fix_builtin_array_notation_fn):
276         Use release_vec_vec instead of vec::release.
277         (build_array_notation_expr): Likewise.
278         (fix_conditional_array_notations_1): Likewise.
279         (fix_array_notation_expr): Likewise.
280         (fix_array_notation_call_expr): Likewise.
281
282 2015-11-27  Jakub Jelinek  <jakub@redhat.com>
283
284         PR c/63326
285         * c-parser.c (c_parser_compound_statement_nostart): If
286         last_label is true, use pragma_stmt instead of pragma_compound
287         as second c_parser_pragma argument.
288         (c_parser_omp_ordered, c_parser_omp_target_update,
289         c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
290         false as second argument to c_parser_skip_to_pragma_eol after
291         diagnosing standalone directives used in pragma_stmt context.
292
293 2015-11-24  Ilya Verbin  <ilya.verbin@intel.com>
294
295         * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
296         with "if (ENABLE_OFFLOADING)".
297
298 2015-11-23  David Malcolm  <dmalcolm@redhat.com>
299
300         PR objc/68438
301         * c-parser.c (c_parser_postfix_expression): Set up source ranges
302         for various Objective-C constructs: Class.name syntax,
303         @selector(), @protocol(), @encode(), and [] message syntax.
304
305 2015-11-20  David Malcolm  <dmalcolm@redhat.com>
306
307         PR 62314
308         * c-typeck.c (should_suggest_deref_p): New function.
309         (build_component_ref): Special-case POINTER_TYPE when
310         generating a "not a structure of union"  error message, and
311         suggest a "->" rather than a ".", providing a fix-it hint.
312
313 2015-11-19  David Malcolm  <dmalcolm@redhat.com>
314
315         * c-typeck.c (lookup_field_fuzzy): Move determination of closest
316         candidate into a new function, find_closest_identifier.
317
318 2015-11-19  Marek Polacek  <polacek@redhat.com>
319
320         PR c/68412
321         * c-typeck.c (parser_build_binary_op): Properly handle
322         C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
323
324 2015-11-17  David Malcolm  <dmalcolm@redhat.com>
325
326         * c-parser.c (set_c_expr_source_range): Bulletproof both
327         overloaded implementations against NULL expr->value.
328         (c_parser_braced_init): Set src_range for "ret" to a sane pair of
329         values.
330         (c_parser_unary_expression): Likewise when handling addresses of
331         labels.
332         (c_parser_postfix_expression): Likewise for statement expressions,
333         for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
334         __builtin_va_arg, and for __builtin_offset_of.
335         (c_parser_postfix_expression_after_paren_type): Initialize expr's
336         src_range using the range of the braced initializer.
337         (c_parser_transaction_expression): Set src_range for "ret" to a
338         sane pair of values.
339
340 2015-11-16  Kirill Yukhin  <kirill.yukhin@intel.com>
341
342         * c-parser.c (c_finish_omp_declare_simd): Look for
343         "simd" attribute as well. Update error message.
344
345 2015-11-14  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
346
347         * c-parser.c (c_parser_omp_declare_target): Adjust.
348
349 2015-11-14  Jakub Jelinek  <jakub@redhat.com>
350
351         * c-typeck.c (c_finish_omp_clauses): Don't mark
352         GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
353
354 2015-11-14  Marek Polacek  <polacek@redhat.com>
355
356         * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
357         * c-typeck.c: Likewise.
358
359 2015-11-13  David Malcolm  <dmalcolm@redhat.com>
360
361         * c-decl.c (warn_defaults_to): Pass line_table to
362         rich_location ctor.
363         * c-errors.c (pedwarn_c99): Likewise.
364         (pedwarn_c90): Likewise.
365         * c-parser.c (set_c_expr_source_range): New functions.
366         (c_token::get_range): New method.
367         (c_token::get_finish): New method.
368         (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
369         based on the range from the start of the LHS to the end of the
370         RHS.
371         (c_parser_conditional_expression): Likewise, based on the range
372         from the start of the cond.value to the end of exp2.value.
373         (c_parser_binary_expression): Call set_c_expr_source_range on
374         the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
375         (c_parser_cast_expression): Call set_c_expr_source_range on ret
376         based on the cast_loc through to the end of the expr.
377         (c_parser_unary_expression): Likewise, based on the
378         op_loc through to the end of op.
379         (c_parser_sizeof_expression) Likewise, based on the start of the
380         sizeof token through to either the closing paren or the end of
381         expr.
382         (c_parser_postfix_expression): Likewise, using the token range,
383         or from the open paren through to the close paren for
384         parenthesized expressions.
385         (c_parser_postfix_expression_after_primary): Likewise, for
386         various kinds of expression.
387         * c-tree.h (struct c_expr): Add field "src_range".
388         (c_expr::get_start): New method.
389         (c_expr::get_finish): New method.
390         (set_c_expr_source_range): New decls.
391         * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
392         on ret for prefix unary ops.
393         (parser_build_binary_op): Likewise, running from the start of
394         arg1.value through to the end of arg2.value.
395
396 2015-11-13  Marek Polacek  <polacek@redhat.com>
397
398         PR c/68320
399         * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
400
401 2015-11-13  David Malcolm  <dmalcolm@redhat.com>
402
403         * c-typeck.c: Include spellcheck.h.
404         (lookup_field_fuzzy_find_candidates): New function.
405         (lookup_field_fuzzy): New function.
406         (build_component_ref): If the field was not found, try using
407         lookup_field_fuzzy and potentially offer a suggestion.
408
409 2015-11-12  James Norris  <jnorris@codesourcery.com>
410             Joseph Myers  <joseph@codesourcery.com>
411
412         * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
413         (c_parser_omp_clause_name): Handle 'device_resident' clause.
414         (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
415         and PRAGMA_OMP_CLAUSE_LINK.
416         (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
417         and PRAGMA_OACC_CLAUSE_LINK.
418         (OACC_DECLARE_CLAUSE_MASK): New definition.
419         (c_parser_oacc_declare): New function.
420
421 2015-11-12  Marek Polacek  <polacek@redhat.com>
422
423         PR c/67784
424         * c-parser.c (c_parser_for_statement): Reclassify the token in
425         a correct scope.
426
427 2015-11-11  Marek Polacek  <polacek@redhat.com>
428
429         PR c/68107
430         PR c++/68266
431         * c-decl.c (grokdeclarator): Call valid_array_size_p.  Remove code
432         checking the size of an array.
433
434 2015-11-11  Andrew MacLeod  <amacleod@redhat.com>
435
436         * c-array-notation.c: Remove unused header files.
437         * c-aux-info.c: Likewise.
438         * c-convert.c: Likewise.
439         * c-decl.c: Likewise.
440         * c-errors.c: Likewise.
441         * c-lang.c: Likewise.
442         * c-objc-common.c: Likewise.
443         * c-parser.c: Likewise.
444         * c-typeck.c: Likewise.
445         * gccspec.c: Likewise.
446
447 2015-11-09  Thomas Schwinge  <thomas@codesourcery.com>
448             Cesar Philippidis  <cesar@codesourcery.com>
449             James Norris  <jnorris@codesourcery.com>
450             Julian Brown  <julian@codesourcery.com>
451             Nathan Sidwell  <nathan@codesourcery.com>
452
453         c/
454         * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
455         routine arg.
456         (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
457         (c_parser_pragma): Parse 'acc routine'.
458         (OACC_ROUTINE_CLAUSE_MARK): Define.
459         (c_parser_oacc_routine, (c_finish_oacc_routine): New.
460
461 2015-11-09  Andreas Arnez  <arnez@linux.vnet.ibm.com>
462
463         PR debug/67192
464         * c-typeck.c (c_finish_loop): For unconditional loops, set the
465         location of the backward-goto to the start of the loop body.
466
467 2015-11-09  Andreas Arnez  <arnez@linux.vnet.ibm.com>
468
469         PR debug/67192
470         * c-parser.c (c_parser_while_statement): Finish the loop before
471         parsing ahead for misleading indentation.
472         (c_parser_for_statement): Likewise.
473
474 2015-11-08  Eric Botcazou  <ebotcazou@adacore.com>
475
476         * c-decl.c (finish_struct): If the structure has reverse storage
477         order, rewrite the type of array fields with scalar component.  Call
478         maybe_apply_pragma_scalar_storage_order on entry.
479         * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs.  Issue
480         errors on bit-fields and reverse SSO here and not...
481         (c_mark_addressable): ...here.
482         (output_init_element): Adjust call to initializer_constant_valid_p.
483         (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
484
485 2015-11-06  David Malcolm  <dmalcolm@redhat.com>
486
487         * c-decl.c (warn_defaults_to): Update for change in signature
488         of diagnostic_set_info.
489         * c-errors.c (pedwarn_c99): Likewise.
490         (pedwarn_c90): Likewise.
491         * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
492         for textinfo::set_location.
493
494 2015-11-05  Cesar Philippidis  <cesar@codesourcery.com>
495             Thomas Schwinge  <thomas@codesourcery.com>
496             James Norris  <jnorris@codesourcery.com>
497
498         * c-parser.c (c_parser_omp_clause_name): Add support for
499         PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
500         (c_parser_omp_clause_default): Add is_oacc argument. Handle
501         default(none) in OpenACC.
502         (c_parser_oacc_shape_clause): Allow pointer variables as gang static
503         arguments.
504         (c_parser_oacc_clause_tile): New function.
505         (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
506         OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
507         (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
508         TILE}.
509         (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
510         (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
511         FIRSTPRIVATE}.
512         (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
513         (c_parser_oacc_update): Update the error message for missing clauses.
514         * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
515         and OMP_CLAUSE_INDEPENDENT.
516
517 2015-11-05  Marek Polacek  <polacek@redhat.com>
518
519         PR c/68090
520         * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
521         deal with pre-evaluation on invalid types.
522
523 2015-11-05  Jakub Jelinek  <jakub@redhat.com>
524             Ilya Verbin  <ilya.verbin@intel.com>
525
526         * c-parser.c: Include context.h and gimple-expr.h.
527         (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
528         monotonic together with nonmonotonic.
529         (c_parser_omp_for_loop): Call c_omp_check_loop_iv.  Call add_stmt here.
530         (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
531         (c_parser_omp_target_data, c_parser_omp_target_enter_data,
532         c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
533         (c_parser_omp_target): Likewise.  Evaluate num_teams and thread_limit
534         expressions on combined target teams before the target.
535         (c_parser_omp_declare_target): If decl has "omp declare target" or
536         "omp declare target link" attribute, and cgraph or varpool node already
537         exists, then set corresponding flags.  Call c_finish_omp_clauses
538         in the parenthesized extended-list syntax case.
539         * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
540         declare target.
541         * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
542         on OMP_CLAUSE_REDUCTION array sections.
543         (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
544         into the constant offset, or for variable low-bound using
545         POINTER_PLUS_EXPR.  For structure element based array sections use
546         GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
547         (c_finish_omp_clauses): Drop generic_field_head, structure
548         elements are now always mapped even as array section bases,
549         diagnose same var in data sharing and mapping clauses.  Diagnose if
550         linear step on declare simd is neither a constant nor a uniform
551         parameter.  Look through POINTER_PLUS_EXPR for array section
552         reductions.  Diagnose the same var or function appearing multiple
553         times on the same directive.  Fix up wording for the to clause if t
554         is neither a FUNCTION_DECL nor a VAR_DECL.  Diagnose nonmonotonic
555         modifier on kinds other than dynamic or guided or nonmonotonic
556         modifier together with ordered clause.
557
558 2015-11-03  Thomas Schwinge  <thomas@codesourcery.com>
559             Chung-Lin Tang  <cltang@codesourcery.com>
560
561         * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
562
563 2015-10-29  Andrew MacLeod  <amacleod@redhat.com>
564
565         * c-array-notation.c: Reorder #include's and remove duplicates.
566         * c-aux-info.c: Likewise.
567         * c-convert.c: Likewise.
568         * c-decl.c: Likewise.
569         * c-errors.c: Likewise.
570         * c-lang.c: Likewise.
571         * c-objc-common.c: Likewise.
572         * c-parser.c: Likewise.
573         * c-typeck.c: Likewise.
574
575 2015-10-26  Jim Wilson  <jim.wilson@linaro.org>
576
577         PR debug/66068
578         * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
579         after calling build_qualified_type.
580
581 2015-10-27  Cesar Philippidis  <cesar@codesourcery.com>
582             Thomas Schwinge  <thomas@codesourcery.com>
583             James Norris  <jnorris@codesourcery.com>
584             Joseph Myers  <joseph@codesourcery.com>
585             Julian Brown  <julian@codesourcery.com>
586             Bernd Schmidt  <bschmidt@redhat.com>
587
588         * c-parser.c (c_parser_oacc_shape_clause): New.
589         (c_parser_oacc_simple_clause): New.
590         (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
591         (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
592
593 2015-10-27  Thomas Schwinge  <thomas@codesourcery.com>
594             James Norris  <jnorris@codesourcery.com>
595             Cesar Philippidis  <cesar@codesourcery.com>
596
597         PR c/64765
598         PR c/64880
599         * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
600         parameters, and handle these.  Adjust all users.
601         (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
602         into...
603         (c_parser_oacc_kernels_parallel): ... this new function.  Adjust
604         all users.
605         * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
606         declare functions.
607         (c_finish_omp_construct): Declare function.
608         * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
609         Merge functions into...
610         (c_finish_omp_construct): ... this new function.
611
612 2015-10-22  Richard Biener  <rguenther@suse.de>
613
614         * c-typeck.c (c_finish_omp_clauses): Properly convert operands
615         before folding a MINUS_EXPR.
616
617 2015-10-21  Marek Polacek  <polacek@redhat.com>
618
619         PR c/68024
620         * c-decl.c (start_function): Warn about vararg functions without
621         a prototype.
622
623 2015-10-21  Ilya Enkovich  <enkovich.gnu@gmail.com>
624
625         * c-typeck.c (build_conditional_expr): Use boolean vector
626         type for vector comparison.
627         (build_vec_cmp): New.
628         (build_binary_op): Use build_vec_cmp for comparison.
629
630 2015-10-20  Marek Polacek  <polacek@redhat.com>
631
632         * c-parser.c (is_cilkplus_vector_p): Don't define here.
633
634 2015-10-20  Marek Polacek  <polacek@redhat.com>
635
636         PR c/67964
637         * c-parser.c (c_parser_attributes): Break out of the loop if the
638         token after an attribute isn't a comma.
639
640 2015-10-13  Jakub Jelinek  <jakub@redhat.com>
641             Aldy Hernandez  <aldyh@redhat.com>
642
643         * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
644         (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
645         (c_parser_omp_variable_list): Handle structure elements for
646         map, to and from clauses.  Handle array sections in reduction
647         clause.  Formatting fixes.
648         (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
649         if clause modifiers.
650         (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
651         c_parser_omp_clause_priority, c_parser_omp_clause_hint,
652         c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
653         c_parser_omp_clause_is_device_ptr): New functions.
654         (c_parser_omp_clause_ordered): Parse optional parameter.
655         (c_parser_omp_clause_reduction): Handle array reductions.
656         (c_parser_omp_clause_schedule): Parse optional simd modifier.
657         (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
658         functions.
659         (c_parser_omp_clause_linear): Parse linear clause modifiers.
660         (c_parser_omp_clause_depend_sink): New function.
661         (c_parser_omp_clause_depend): Parse source/sink depend kinds.
662         (c_parser_omp_clause_map): Parse release/delete map kinds and
663         optional always modifier.
664         (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
665         and c_finish_omp_clauses callers.
666         (c_parser_omp_all_clauses): Likewise.  Parse OpenMP 4.5 clauses.
667         Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
668         (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
669         (OMP_CRITICAL_CLAUSE_MASK): Define.
670         (c_parser_omp_critical): Parse critical clauses.
671         (c_parser_omp_for_loop): Handle doacross loops, adjust
672         c_finish_omp_for and c_finish_omp_clauses callers.
673         (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
674         (c_parser_omp_simd): Allow ordered clause if it has no parameter.
675         (OMP_FOR_CLAUSE_MASK): Add linear clause.
676         (c_parser_omp_for): Disallow ordered clause when combined with
677         distribute.  Disallow linear clause when combined with distribute
678         and not combined with simd.
679         (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
680         (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
681         parse clauses and if depend clause is found, don't parse a body.
682         (c_parser_omp_parallel): Disallow copyin clause on target parallel.
683         Allow target parallel without for after it.
684         (OMP_TASK_CLAUSE_MASK): Add priority clause.
685         (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
686         (c_parser_omp_target_data): Diagnose no map clauses or clauses with
687         invalid kinds.
688         (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
689         (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
690         OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
691         (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
692         functions.
693         (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
694         defaultmap and is_device_ptr clauses.
695         (c_parser_omp_target): Parse target parallel and target simd.  Set
696         OMP_TARGET_COMBINED on combined constructs.  Parse target enter data
697         and target exit data.  Diagnose invalid map kinds.
698         (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
699         (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
700         construct.
701         (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
702         &omp_priv.
703         (OMP_TASKLOOP_CLAUSE_MASK): Define.
704         (c_parser_omp_taskloop): New function.
705         (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
706         handle PRAGMA_OMP_TASKLOOP.
707         (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
708         * c-tree.h (c_finish_omp_clauses): Add two new arguments.
709         * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
710         Add IS_OMP argument, handle structure element bases, diagnose
711         bitfields, pass IS_OMP recursively, diagnose known zero length
712         array sections in depend clauses, handle array sections in reduction
713         clause, diagnose negative length even for pointers.
714         (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
715         types, pass IS_OMP down to handle_omp_array_sections_1, handle
716         array sections in reduction clause, set
717         OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
718         length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
719         (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
720         Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
721
722 2015-10-06  Marek Polacek  <polacek@redhat.com>
723
724         * c-parser.c (c_parser_statement_after_labels): Use
725         protected_set_expr_location.
726         (c_parser_omp_clause_num_gangs): Likewise.
727         (c_parser_omp_clause_num_threads): Likewise.
728         (c_parser_omp_clause_num_workers): Likewise.
729         (c_parser_omp_clause_vector_length): Likewise.
730         (c_parser_omp_clause_num_teams): Likewise.
731         (c_parser_omp_clause_thread_limit): Likewise.
732         * c-typeck.c (build_c_cast): Likewise.
733         (c_cast_expr): Likewise.
734
735 2015-10-05  Richard Sandiford  <richard.sandiford@arm.com>
736
737         * c-typeck.c (c_tree_equal): Use real_equal instead of
738         REAL_VALUES_EQUAL.
739
740 2015-10-04  Jason Merrill  <jason@redhat.com>
741
742         * c-parser.c (c_lex_one_token): Handle @synchronized.
743         * c-decl.c (match_builtin_function_types): A declaration of a built-in
744         can change whether the function is transaction_safe.
745
746 2015-10-02  Marek Polacek  <polacek@redhat.com>
747
748         PR c/67730
749         * c-typeck.c (convert_for_assignment): Use the expansion point
750         location throughout.
751
752 2015-10-02  Marek Polacek  <polacek@redhat.com>
753
754         PR c/64249
755         * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
756         and pass it down to c_parser_if_statement.
757         (c_parser_else_body): Add CHAIN parameter and pass it down to
758         c_parser_statement_after_labels.
759         (c_parser_if_statement): Add CHAIN parameter.  Add code to warn about
760         duplicated if-else-if conditions.
761
762 2015-10-01  Marek Polacek  <polacek@redhat.com>
763
764         * c-typeck.c (convert_for_assignment): Improve commentary.
765
766 2015-09-30  Marek Polacek  <polacek@redhat.com>
767
768         PR c/67730
769         * c-typeck.c (c_finish_return): Use the expansion point location for
770         certain "return with value" warnings.
771
772 2015-09-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
773
774         * c-parser.c (pragma_lex): Add loc argument.
775
776 2015-09-15  Marek Polacek  <polacek@redhat.com>
777
778         PR c/67580
779         * c-decl.c (tag_exists_p): New function.
780         * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
781         struct/union/enum keywords are missing.
782         * c-tree.h (tag_exists_p): Declare.
783
784 2015-09-15  Marek Polacek  <polacek@redhat.com>
785
786         * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
787         (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
788         Return NULL_TREE instead of 0.
789         (lookup_name): Return NULL_TREE instead of 0.
790         (lookup_name_in_scope): Likewise.
791         (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
792         (parser_xref_tag): Use false instead of 0.
793         (start_struct): Use true instead of 1.
794         (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
795
796 2015-09-14  Marek Polacek  <polacek@redhat.com>
797
798         * c-typeck.c (set_nonincremental_init_from_string): Use
799         HOST_WIDE_INT_M1U when shifting a negative value.
800
801 2015-09-09  Mark Wielaard  <mjw@redhat.com>
802
803         * c-typeck.c (build_binary_op): Check and warn when nonnull arg
804         parm against NULL.
805
806 2015-09-10  Jakub Jelinek  <jakub@redhat.com>
807
808         PR c/67502
809         * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
810         into OMP_FOR_PRE_BODY rather than before the loop.
811
812 2015-09-09  Jakub Jelinek  <jakub@redhat.com>
813
814         PR c/67501
815         * c-parser.c (c_parser_oacc_all_clauses,
816         c_parser_omp_all_clauses): Remove invalid clause from
817         list of clauses even if parser->error is set.
818
819         PR c/67500
820         * c-parser.c (c_parser_omp_clause_aligned,
821         c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
822         test for errors.
823         * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
824         error_mark_node.
825
826         PR c/67495
827         * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
828         instead of c_parser_unary_expression.  If the result is !lvalue_p,
829         wrap the result of c_fully_fold into NON_LVALUE_EXPR.
830
831 2015-09-04  Marek Polacek  <polacek@redhat.com>
832
833         PR sanitizer/67279
834         * c-typeck.c (build_binary_op): Don't instrument static initializers.
835
836 2015-09-03  Martin Sebor  <msebor@redhat.com>
837
838         PR c/66516
839         * c-typeck.c (convert_arguments, parser_build_unary_op,
840         build_conditional_expr, c_cast_expr, convert_for_assignment,
841         build_binary_op, _objc_common_truthvalue_conversion): Call
842         reject_gcc_builtin.
843         (c_decl_implicit): Define.
844
845 2015-09-02  Marek Polacek  <polacek@redhat.com>
846
847         PR c/67432
848         * c-parser.c (c_parser_enum_specifier): Give a better error for
849         an empty enum.
850
851 2015-08-18  Trevor Saunders  <tbsaunde@tbsaunde.org>
852
853         * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
854
855 2015-08-12  Marek Polacek  <polacek@redhat.com>
856
857         * c-decl.c (grokdeclarator): Call error_at instead of error and pass
858         LOC to it.
859
860 2015-08-03  Marek Polacek  <polacek@redhat.com>
861
862         PR c/67088
863         * c-decl.c (check_bitfield_type_and_width): Add location parameter.
864         Use it.
865         (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
866
867 2015-08-02  Patrick Palka  <ppalka@gcc.gnu.org>
868
869         * c-parser.c (c_parser_if_body): Take token_indent_info
870         argument. Call warn_for_misleading_indentation even when the
871         body is a semicolon.  Extract token_indent_infos corresponding
872         to the guard, body and next tokens.  Adjust call to
873         warn_for_misleading_indentation accordingly.
874         (c_parser_else_body): Likewise.
875         (c_parser_if_statement): Likewise.
876         (c_parser_while_statement): Likewise.
877         (c_parser_for_statement): Likewise.
878
879 2015-07-28  Luis Felipe Strano Moraes  <luis.strano@gmail.com>
880             Manuel López-Ibáñez  <manu@gcc.gnu.org>
881
882         * c-decl.c (get_parm_info): Remove static var. Update warning
883         message.
884
885 2015-07-27  Marek Polacek  <polacek@redhat.com>
886
887         PR c++/66555
888         PR c/54979
889         * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
890
891 2015-07-20  Marek Polacek  <polacek@redhat.com>
892
893         PR c++/55095
894         * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
895         (build_binary_op): Warn about left shift overflows.
896
897 2015-07-09  Andrew MacLeod  <amacleod@redhat.com>
898
899         * c-array-notation.c: Adjust includes for flags.h changes.
900         * c-objc-common.c: Likewise.
901
902 2015-07-07  Andrew MacLeod  <amacleod@redhat.com>
903
904         * c-array-notation.c: Adjust includes.
905         * c-aux-info.c: Likewise.
906         * c-convert.c: Likewise.
907         * c-decl.c: Likewise.
908         * c-errors.c: Likewise.
909         * c-lang.c: Likewise.
910         * c-objc-common.c: Likewise.
911         * c-parser.c: Likewise.
912         * c-typeck.c: Likewise.
913
914 2015-06-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
915
916         PR fortran/66605
917         * c-decl.c (finish_function): Call do_warn_unused_parameter.
918
919 2015-06-29  Marek Polacek  <polacek@redhat.com>
920
921         PR c/66322
922         * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
923         (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P.  Don't warn
924         about -Wswitch-bool here.
925         (do_case): Update c_add_case_label call.
926         (c_finish_case): Update c_do_switch_warnings call.
927
928 2015-06-27  Marek Polacek  <polacek@redhat.com>
929
930         * c-typeck.c: Use VECTOR_TYPE_P throughout.
931
932 2015-06-26  Marek Polacek  <polacek@redhat.com>
933
934         * c-array-notation.c (fix_builtin_array_notation_fn): Use
935         INDIRECT_REF_P.
936         * c-typeck.c (array_to_pointer_conversion): Likewise.
937         (build_unary_op): Likewise.
938         (c_finish_return): Likewise.
939
940 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
941
942         * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
943         * c-parser.c: Likewise.
944
945 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
946
947         * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
948         instead of pointer_hash.
949         (detect_field_duplicates): Likewise.
950
951 2015-06-25  Marek Polacek  <polacek@redhat.com>
952
953         * c-array-notation.c: Use VAR_P throughout.
954         * c-decl.c: Likewise.
955         * c-objc-common.c: Likewise.
956         * c-parser.c: Likewise.
957         * c-typeck.c: Likewise.
958
959 2015-06-25  Marek Polacek  <polacek@redhat.com>
960
961         * c-decl.c: Use is_global_var throughout.
962         * c-parser.c: Likewise.
963         * c-typeck.c: Likewise.
964
965 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
966
967         * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
968         * c-aux-info.c: Likewise.
969         * c-convert.c: Likewise.
970         * c-decl.c: Likewise.
971         * c-errors.c: Likewise.
972         * c-lang.c: Likewise.
973         * c-objc-common.c: Likewise.
974         * c-parser.c: Likewise.
975         * c-typeck.c: Likewise.
976
977 2015-06-11  Jan Hubicka  <hubicka@ucw.cz>
978
979         PR middle-end/66325
980         * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
981         variants.
982
983 2015-06-11  Pierre-Marie de Rodat  <derodat@adacore.com>
984
985         * c-decl.c (pop_scope): Register the main translation unit
986         through the new debug hook.
987
988 2015-06-08  Andrew MacLeod  <amacleod@redhat.com>
989
990         * c-array-notation.c : Adjust include files.
991         * c-aux-info.c : Likewise.
992         * c-convert.c : Likewise.
993         * c-decl.c : Likewise.
994         * c-errors.c : Likewise.
995         * c-lang.c : Likewise.
996         * c-lang.h : Likewise.
997         * c-objc-common.c : Likewise.
998         * c-parser.c : Likewise.
999         * c-typeck.c : Likewise.
1000
1001 2015-06-05  Aldy Hernandez  <aldyh@redhat.com>
1002
1003         * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
1004         immediately clobber it.
1005         (c_write_global_declarations_1): Remove call to
1006         check_global_declaration_1.
1007         (c_write_global_declarations_2): Remove.
1008         (c_write_final_cleanups): Rename from c_write_global_declarations.
1009         Remove call to finalize_compilation_unit.
1010         Remove calls to debugging hooks.
1011         * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
1012         * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
1013         * c-tree.h: Remove c_write_global_declarations.
1014
1015 2015-06-04  Andrew MacLeod  <amacleod@redhat.com>
1016
1017         * c-array-notation.c: Adjust includes for restructured coretypes.h.
1018         * c-aux-info.c: Likewise.
1019         * c-convert.c: Likewise.
1020         * c-decl.c: Likewise.
1021         * c-errors.c: Likewise.
1022         * c-lang.c: Likewise.
1023         * c-objc-common.c: Likewise.
1024         * c-parser.c: Likewise.
1025         * c-typeck.c: Likewise.
1026
1027 2015-06-04  Marek Polacek  <polacek@redhat.com>
1028
1029         PR c/66341
1030         * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
1031         it is a lvalue.
1032
1033 2015-06-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1034
1035         * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
1036         Warn for empty struct.
1037         (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
1038
1039 2015-06-02  Andres Tiraboschi  <andres.tiraboschi@tallertechnologies.com>
1040
1041         * c-decl.c (start_function): Call plugin before parsing.
1042         (finish_function): Call plugin after parsing.
1043
1044 2015-06-02  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1045
1046         PR c/49551
1047         * c-decl.c (merge_decls): Merge DECL_COMMON.
1048
1049 2015-05-22  Jim Wilson  <jim.wilson@linaro.org>
1050
1051         * Make-lang.in (check_gcc_pallelize): Define.
1052
1053 2015-05-22  Marek Polacek  <polacek@redhat.com>
1054
1055         PR c/47043
1056         * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
1057         attributes.
1058
1059 2015-05-21  Marek Polacek  <polacek@redhat.com>
1060
1061         * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
1062         DECL_BUILT_IN.
1063
1064 2015-05-20  Marek Polacek  <polacek@redhat.com>
1065
1066         * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
1067         * c-typeck.c: Likewise.
1068
1069 2015-05-19  Marek Polacek  <polacek@redhat.com>
1070
1071         * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
1072
1073 2015-05-19  Jakub Jelinek  <jakub@redhat.com>
1074
1075         PR middle-end/66199
1076         * c-parser.c (c_parser_omp_for_loop): Don't add
1077         OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
1078         OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
1079         (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
1080         constructs.
1081
1082 2015-05-19  Mikhail Maltsev  <maltsevm@gmail.com>
1083
1084         * c-typeck.c (build_array_ref): Use std::swap instead of explicit
1085         swaps.
1086
1087 2015-05-16  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1088
1089         PR fortran/44054
1090         * c-objc-common.c (c_tree_printer): Replace locus pointer with
1091         accessor function.
1092
1093 2015-05-14  Marek Polacek  <polacek@redhat.com>
1094
1095         PR c/66066
1096         PR c/66127
1097         * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
1098         rather than with 0.
1099
1100 2015-05-12  David Malcolm  <dmalcolm@redhat.com>
1101
1102         * c-parser.c (c_parser_if_body): Add param "if_loc", use it
1103         to add a call to warn_for_misleading_indentation.
1104         (c_parser_else_body): Likewise, adding param "else_loc".
1105         (c_parser_if_statement): Check for misleading indentation.
1106         (c_parser_while_statement): Likewise.
1107         (c_parser_for_statement): Likewise.
1108
1109 2015-05-08  Marek Polacek  <polacek@redhat.com>
1110
1111         PR c/64918
1112         * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
1113         (output_init_element): Likewise.
1114
1115 2015-05-07  Marek Polacek  <polacek@redhat.com>
1116
1117         PR c/65179
1118         * c-typeck.c (build_binary_op): Warn when left shifting a negative
1119         value.
1120
1121 2015-04-30  Marek Polacek  <polacek@redhat.com>
1122
1123         * c-typeck.c (set_init_label): Call error_at instead of error and
1124         pass LOC to it.
1125
1126         * c-typeck.c (c_incomplete_type_error): Refactor to use %qT.  Print
1127         the type of a decl.
1128
1129         * c-typeck.c (c_build_va_arg): Clarify the error message.
1130
1131 2015-04-29  Thomas Schwinge  <thomas@codesourcery.com>
1132
1133         * c-parser.c (c_parser_oacc_enter_exit_data): Use
1134         OMP_STANDALONE_CLAUSES.
1135
1136 2015-04-28  Marek Polacek  <polacek@redhat.com>
1137
1138         * c-parser.c (c_parser_binary_expression): Remove duplicate line.
1139
1140 2015-04-28  Marek Polacek  <polacek@redhat.com>
1141
1142         PR c/65901
1143         * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
1144
1145 2015-04-25  Marek Polacek  <polacek@redhat.com>
1146
1147         PR c/52085
1148         * c-decl.c (finish_enum): Copy over TYPE_ALIGN.  Also check for "mode"
1149         attribute.
1150
1151 2015-04-23  Marek Polacek  <polacek@redhat.com>
1152
1153         PR c/65345
1154         * c-decl.c (set_labels_context_r): New function.
1155         (store_parm_decls): Call it via walk_tree_without_duplicates.
1156         * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
1157         instead of create_tmp_var.  Build TARGET_EXPR instead of
1158         COMPOUND_EXPR.
1159         (build_atomic_assign): Use create_tmp_var_raw instead of
1160         create_tmp_var.  Build TARGET_EXPRs instead of MODIFY_EXPR.
1161
1162 2015-04-20  Ilya Verbin  <ilya.verbin@intel.com>
1163
1164         * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
1165         (c_parser_omp_target_update): Add missed %> to error_at ().
1166
1167 2015-04-10  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
1168
1169         PR target/55143
1170         * c-decl.c (c_default_pointer_mode): Remove definition.
1171         * c-tree.h (c_default_pointer_mode): Remove declaration.
1172
1173 2015-03-27  Tobias Burnus  <burnus@net-b.de>
1174
1175         PR c/65586
1176         * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
1177         error out.
1178         (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
1179         c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
1180         Update calls to not error for skipped omp pragmas with -fopenmp-simd.
1181
1182 2015-03-19  Jakub Jelinek  <jakub@redhat.com>
1183
1184         * c-decl.c (c_decl_attributes): Also add "omp declare target"
1185         attribute for DECL_EXTERNAL VAR_DECLs.
1186
1187 2015-03-11  Jakub Jelinek  <jakub@redhat.com>
1188
1189         * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
1190         argument.
1191
1192 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
1193
1194         PR c/65120
1195         * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
1196         before preparing arguments to warn_logical_not_parentheses.
1197
1198 2015-03-09  Jakub Jelinek  <jakub@redhat.com>
1199
1200         PR c/65120
1201         * c-typeck.c (parser_build_binary_op): Don't warn for
1202         !!x == y or !b == y where b is _Bool.
1203
1204 2015-03-09  Marek Polacek  <polacek@redhat.com>
1205
1206         * c-convert.c (convert): Make use of do_ubsan_in_current_function.
1207         * c-decl.c (grokdeclarator): Likewise.
1208         * c-typeck.c (build_binary_op): Likewise.
1209
1210 2015-02-27  Marek Polacek  <polacek@redhat.com>
1211
1212         PR c/65228
1213         * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
1214
1215 2015-02-14  Marek Polacek  <polacek@redhat.com>
1216
1217         PR c/64768
1218         * c-decl.c (grokdeclarator): Set the range of a flexible array member
1219         declared through a typedef name.
1220
1221 2015-02-13  Marek Polacek  <polacek@redhat.com>
1222
1223         PR c/65050
1224         * c-decl.c (grokdeclarator): Print also the type when giving
1225         the error message about array's incomplete element type.
1226
1227 2015-02-11  Jakub Jelinek  <jakub@redhat.com>
1228
1229         PR c/64824
1230         * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
1231         check in the POP macro.
1232
1233 2015-02-09  Marek Polacek  <polacek@redhat.com>
1234
1235         PR c/64856
1236         * c-typeck.c (process_init_element): Don't always wrap
1237         COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
1238         initializing a range of elements.
1239
1240 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
1241
1242         PR c/64824
1243         PR c/64868
1244         * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
1245
1246 2015-02-02  Bruno Loff  <bruno.loff@gmail.com>
1247
1248         * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
1249         processing enum declaration.
1250
1251 2015-01-29  Marek Polacek  <polacek@redhat.com>
1252
1253         PR c/64709
1254         * c-typeck.c (pop_init_level): If constructor_elements has
1255         exactly one element with integer_zerop value, set constructor_zeroinit
1256         to 1.  Remove braces around warning_init call.
1257
1258 2015-01-27  Jakub Jelinek  <jakub@redhat.com>
1259
1260         PR c/64766
1261         * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
1262         of FUNCTION_DECLs with error_mark_node.
1263
1264 2015-01-26  Jakub Jelinek  <jakub@redhat.com>
1265
1266         PR c/64778
1267         * c-typeck.c (convert_arguments): Return -1 if there are
1268         error_args, even if we've diagnosed too many arguments.
1269
1270 2015-01-21  Richard Biener  <rguenther@suse.de>
1271
1272         PR middle-end/64313
1273         * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
1274         for builtins the user declared correctly.
1275
1276 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
1277             Bernd Schmidt  <bernds@codesourcery.com>
1278             Cesar Philippidis  <cesar@codesourcery.com>
1279             James Norris  <jnorris@codesourcery.com>
1280             Jakub Jelinek  <jakub@redhat.com>
1281             Ilmir Usmanov  <i.usmanov@samsung.com>
1282
1283         * c-parser.c: Include "gomp-constants.h".
1284         (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1285         omp_clause_map_kind.  Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1286         Use OMP_CLAUSE_SET_MAP_KIND.
1287         (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
1288         PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
1289         (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
1290         PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
1291         PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
1292         (c_parser_omp_clause_name): Handle "auto", "async", "copy",
1293         "copyout", "create", "delete", "deviceptr", "gang", "host",
1294         "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
1295         "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1296         "present_or_create", "pcreate", "seq", "self", "vector",
1297         "vector_length", "wait", "worker".
1298         (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1299         (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
1300         (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1301         (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1302         (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
1303         (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
1304         (c_parser_oacc_data_clause_deviceptr)
1305         (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
1306         (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
1307         (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
1308         (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
1309         (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
1310         (c_parser_oacc_parallel, c_parser_oacc_update)
1311         (c_parser_oacc_wait): New functions.
1312         * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
1313         (c_finish_oacc_data): New prototypes.
1314         * c-typeck.c: Include "gomp-constants.h".
1315         (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR.  Use
1316         GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.  Use
1317         OMP_CLAUSE_SET_MAP_KIND.
1318         (c_finish_oacc_parallel, c_finish_oacc_kernels)
1319         (c_finish_oacc_data): New functions.
1320         (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
1321         OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
1322         OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
1323         OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
1324         OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
1325         GOMP_MAP_FORCE_DEVICEPTR.
1326
1327 2015-01-09  Michael Collison  <michael.collison@linaro.org>
1328
1329         * c-array-notation.c: Include hash-set.h, machmode.h,
1330         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1331         fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
1332         * c-aux-info.c: Ditto.
1333         * c-convert.c: Ditto.
1334         * c-decl.c: Ditto.
1335         * c-errors.c: Ditto.
1336         * c-lang.c: Dittoxs.
1337         * c-objc-common.c: Ditto.
1338         * c-parser.c: Ditto.
1339         * c-typeck.c: Include hash-set.h, machmode.h,
1340         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1341         fold-const.h, wide-int.h, inchash.h, real.h and
1342         fixed-value.h due to flattening of tree.h.
1343
1344 2015-01-07  Marek Polacek  <polacek@redhat.com>
1345
1346         PR c/64417
1347         * c-typeck.c (process_init_element): Disallow initialization of
1348         a flexible array member with a string constant if the structure
1349         is in an array.
1350
1351 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
1352
1353         PR sanitizer/64344
1354         * c-typeck.c (convert_for_assignment, c_finish_return): For
1355         -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
1356         types also set in_late_binary_op around convert call.
1357         * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
1358         to integral type casts, if not in_late_binary_op, pass c_fully_fold
1359         result on expr as last argument to ubsan_instrument_float_cast,
1360         if in_late_binary_op, don't use c_save_expr but save_expr.
1361
1362         Update copyright years.
1363
1364 2015-01-05  Marek Polacek  <polacek@redhat.com>
1365
1366         PR c/64423
1367         * c-typeck.c (build_array_ref): Pass loc down to
1368         warn_array_subscript_with_type_char.
1369
1370 2014-12-20  Martin Uecker <uecker@eecs.berkeley.edu>
1371
1372         * c-typeck.c: New behavious for pointers to arrays with qualifiers
1373         (common-pointer-type): For pointers to arrays take qualifiers from
1374         element type.
1375         (build_conditional_expr): Add warnings for lost qualifiers.
1376         (comp-target-types): Allow pointers to arrays with different qualifiers.
1377         (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
1378         WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
1379         to PEDWARN_FOR_QUALIFIERS.
1380
1381 2014-12-17  Jakub Jelinek  <jakub@redhat.com>
1382
1383         PR sanitizer/64289
1384         * c-convert.c: Include ubsan.h.
1385         (convert): For real -> integral casts and
1386         -fsanitize=float-cast-overflow don't call convert_to_integer, but
1387         instead instrument the float cast directly.
1388
1389 2014-11-29  Jakub Jelinek  <jakub@redhat.com>
1390
1391         * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
1392         c_finish_stmt_expr): Remove NULL last argument from
1393         create_tmp_var_raw and create_tmp_var calls.
1394         * c-array-notation.c (fix_builtin_array_notation_fn,
1395         build_array_notation_expr, fix_conditional_array_notations_1,
1396         fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
1397
1398 2014-11-28  Marek Polacek  <polacek@redhat.com>
1399
1400         PR c/63862
1401         * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
1402         convert the right operand to integer type.
1403
1404 2014-11-25  Marek Polacek  <polacek@redhat.com>
1405
1406         PR c/63877
1407         * c-decl.c (start_function): Disable -Wmissing-declarations warning
1408         for inline functions.
1409
1410 2014-11-21  Jakub Jelinek  <jakub@redhat.com>
1411
1412         PR target/63764
1413         * c-typeck.c (build_array_ref): Adjust
1414         convert_vector_to_pointer_for_subscript caller.  If it returns true,
1415         call non_lvalue_loc on the result.
1416
1417 2014-11-11  Richard Biener  <rguenther@suse.de>
1418
1419         * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
1420         to true.
1421
1422 2014-11-10  Andi Kleen  <ak@linux.intel.com>
1423
1424         PR c/60804
1425         * c-parser.c (c_parser_statement_after_labels): Call
1426         check_no_cilk.
1427         (c_parser_if_statement): Dito.
1428         (c_parser_switch_statement): Dito.
1429         (c_parser_while_statement): Dito.
1430         (c_parser_do_statement): Dito.
1431         (c_parser_for_statement): Dito.
1432         * c-typeck.c (c_finish_loop): Dito.
1433
1434 2014-11-10  Paolo Carlini  <paolo.carlini@oracle.com>
1435
1436         * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
1437         OPT_Wshift_count_overflow in the warnings.
1438
1439 2014-10-30  Marek Polacek  <polacek@redhat.com>
1440
1441         * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
1442         print the stripped version as well, if they're not the same.
1443
1444 2014-10-29  Richard Sandiford  <richard.sandiford@arm.com>
1445
1446         * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
1447         machine_mode.
1448
1449 2014-10-28  Andrew MacLeod  <amacleod@redhat.com>
1450
1451         * c-decl.c: Adjust include files.
1452         * c-parser.c: Ditto.
1453
1454 2014-10-27  Phil Muldoon  <pmuldoon@redhat.com>
1455             Tom Tromey  <tromey@redhat.com>
1456
1457         * c-tree.h (enum c_oracle_request): New.
1458         (c_binding_oracle_function): New typedef.
1459         (c_binding_oracle, c_pushtag, c_bind): Declare.
1460         * c-decl.c (c_binding_oracle): New global.
1461         (I_SYMBOL_CHECKED): New macro.
1462         (i_symbol_binding): New function.
1463         (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
1464         (I_TAG_CHECKED): New macro.
1465         (i_tag_binding): New function.
1466         (I_TAG_BINDING, I_TAG_DECL): Redefine.
1467         (I_LABEL_CHECKED): New macro.
1468         (i_label_binding): New function.
1469         (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
1470         (c_print_identifier): Save and restore c_binding_oracle.
1471         (c_pushtag, c_bind): New functions.
1472
1473 2014-10-27  Andrew MacLeod  <amacleod@redhat.com>
1474
1475         * c-typeck.c: Adjust include files.
1476
1477 2014-10-26  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1478
1479         PR c++/53061
1480         * c-objc-common.c (c_objc_common_init): Do not do diagnostics
1481         initialization here...
1482         (c_initialize_diagnostics): ... but here. Set defaults after
1483         building pretty-printer.
1484
1485 2014-10-23  Marek Polacek  <polacek@redhat.com>
1486
1487         PR c/63626
1488         * c-decl.c (pop_scope): Don't print warning in external_scope.
1489
1490 2014-10-19  Marek Polacek  <polacek@redhat.com>
1491
1492         PR c/63567
1493         * c-typeck.c (output_init_element): Allow initializing objects with
1494         static storage duration with compound literals even in C99 and add
1495         pedwarn for it.
1496
1497 2014-10-17  Marek Polacek  <polacek@redhat.com>
1498
1499         PR c/63567
1500         * c-typeck.c (digest_init): Allow initializing objects with static
1501         storage duration with compound literals even in C99 and add pedwarn
1502         for it.
1503
1504 2014-10-17  Marek Polacek  <polacek@redhat.com>
1505
1506         PR c/63543
1507         * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
1508         * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
1509         error multiple times.  Print the type.
1510
1511 2014-10-17  Marek Polacek  <polacek@redhat.com>
1512
1513         PR c/63549
1514         * c-typeck.c (build_array_ref): Bail if the index in an incomplete
1515         type.
1516
1517 2014-10-17  Marek Polacek  <polacek@redhat.com>
1518
1519         * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
1520         (start_function): Use OPT_Wimplicit_int instead of 0.
1521         (store_parm_decls_oldstyle): Likewise.
1522
1523 2014-10-17  Alan Modra  <amodra@gmail.com>
1524
1525         PR middle-end/61848
1526         * c-decl.c (merge_decls): Don't merge section name or tls model
1527         to newdecl symtab node, instead merge to olddecl.  Override
1528         existing olddecl section name.  Set tls_model for all thread-local
1529         vars, not just OMP thread-private ones.  Remove incorrect comment.
1530
1531 2014-10-16  Andrew MacLeod  <amacleod@redhat.com>
1532
1533         * c-decl.c: Adjust include files.
1534
1535 2014-10-14  DJ Delorie  <dj@redhat.com>
1536
1537         * c-parser.c (c_parse_init): Add RID entries for each __intN.
1538         (c_token_starts_typename): Check all __intN, not just __int128.
1539         (c_token_starts_declspecs): Likewise.
1540         (c_parser_declspecs): Likewise.
1541         (c_parser_attribute_any_word): Likewise.
1542         (c_parser_objc_selector): Likewise.
1543         * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
1544         (struct c_declspecs): Add int_n_idx field to record *which* __intN
1545         is specified.
1546         * c-decl.c (declspecs_add_type): Check for all __intN, not just
1547         __int128.
1548         (finish_declspecs): Likewise.
1549
1550 2014-10-13  Anthony Brandon  <anthony.brandon@gmail.com>
1551
1552         * c-parser.c (c_parser_all_labels): New function to replace
1553         the duplicate code.
1554         (c_parser_statement): Call the new function.
1555
1556 2014-10-09  Marek Polacek  <polacek@redhat.com>
1557
1558         PR c/63480
1559         * c-typeck.c (pop_init_level): Don't warn about initializing
1560         with { }.
1561
1562 2014-10-07  Marek Polacek  <polacek@redhat.com>
1563
1564         PR c/59717
1565         * c-decl.c (header_for_builtin_fn): New function.
1566         (implicitly_declare): Suggest which header to include.
1567
1568 2014-10-07  Marek Polacek  <polacek@redhat.com>
1569
1570         * c-convert.c (convert): Use error_operand_p.
1571         * c-typeck.c (require_complete_type): Likewise.
1572         (really_atomic_lvalue): Likewise.
1573         (digest_init): Likewise.
1574         (handle_omp_array_sections_1): Likewise.
1575
1576 2014-10-03  Marek Polacek  <polacek@redhat.com>
1577
1578         PR c/63453
1579         * c-decl.c (pop_scope): Don't warn about "inline function declared
1580         but never defined" for functions marked with gnu_inline attribute.
1581
1582 2014-09-25  Jakub Jelinek  <jakub@redhat.com>
1583
1584         PR c++/63249
1585         * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
1586         on low_bound and length.
1587
1588 2014-09-24  Marek Polacek  <polacek@redhat.com>
1589
1590         PR c/61405
1591         PR c/53874
1592         * c-parser.c: Don't define CPP_KEYWORD.
1593         (c_parser_switch_statement): Pass original type to c_finish_case.
1594         * c-tree.h (c_finish_case): Update declaration.
1595         * c-typeck.c (c_finish_case): Add TYPE parameter.  Pass it
1596         conditionally to c_do_switch_warnings.
1597
1598 2014-09-03  Marek Polacek  <polacek@redhat.com>
1599
1600         PR c/62024
1601         * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
1602         conversions.
1603
1604 2014-09-02  Jakub Jelinek  <jakub@redhat.com>
1605             Balaji V. Iyer  <balaji.v.iyer@intel.com>
1606             Igor Zamyatin  <igor.zamyatin@intel.com>
1607
1608         * c-parser.c (c_parser_cilk_for): New function.
1609         (c_parser_cilk_grainsize): Likewise.
1610         (c_get_temp_regvar): Likewise.
1611         (c_parser_statement_after_labels): Added RID_CILK_FOR case.
1612         (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
1613         (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
1614         * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
1615         case.
1616
1617 2014-08-27  Chen Gang  <gang.chen.5i5j@gmail.com>
1618
1619         * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
1620         with using HOST_WIDE_INT without truncation to 'int'
1621
1622 2014-08-22  Marek Polacek  <polacek@redhat.com>
1623
1624         PR c++/62199
1625         * c-typeck.c (parser_build_binary_op): Adjust call to
1626         warn_logical_not_parentheses.
1627
1628 2014-08-22  Igor Zamyatin  <igor.zamyatin@intel.com>
1629
1630         PR other/62008
1631         * c-parser.c (c_parser_array_notation): Check for correct
1632         type of an array added.
1633
1634 2014-08-19  Marek Polacek  <polacek@redhat.com>
1635
1636         PR c++/62153
1637         * c-typeck.c (build_binary_op): If either operand of a comparison
1638         is a boolean expression, call maybe_warn_bool_compare.
1639
1640 2014-08-19  Patrick Palka  <ppalka@gcc.gnu.org>
1641
1642         PR c/45584
1643         * c-typeck.c (build_c_cast): Do a conversion even when the
1644         TYPE_MAIN_VARIANTs are the same.
1645
1646 2014-08-19  Marek Polacek  <polacek@redhat.com>
1647
1648         * c-decl.c (diagnose_mismatched_decls): Unconditionally call
1649         pedwarn_c99 instead of pedwarn.
1650         (grokfield): Likewise.
1651         (warn_defaults_to): New function.
1652         (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
1653         Unconditionally call pedwarn_c99 instead of pedwarn.
1654         (start_function): Call warn_defaults_to instead of pedwarn_c99.
1655         (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
1656         check flag_isoc11 before.
1657         * c-errors.c (pedwarn_c99): Change the return type to bool.
1658         Handle -Wc99-c11-compat.
1659         * c-parser.c (disable_extension_diagnostics): Handle
1660         warn_c99_c11_compat.
1661         (restore_extension_diagnostics): Likewise.
1662         (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
1663         instead of pedwarn, don't check flag_isoc11 before.
1664         (c_parser_declspecs): Likewise.
1665         (c_parser_alignas_specifier): Likewise.
1666         (c_parser_alignof_expression): Likewise.
1667         (c_parser_generic_selection): Likewise.
1668         * c-tree.h (pedwarn_c99): Update declaration.
1669         * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
1670         of pedwarn_c99.
1671
1672 2014-08-19  Marek Polacek  <polacek@redhat.com>
1673
1674         * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
1675         to pedwarn_c90.
1676         * c-errors.c: Include "opts.h".
1677         (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
1678         * c-parser.c (disable_extension_diagnostics): Handle negative value
1679         of warn_c90_c99_compat, too.
1680         (restore_extension_diagnostics): Likewise.
1681         (c_parser_compound_statement_nostart): Pass
1682         OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
1683
1684 2014-08-12  Marek Polacek  <polacek@redhat.com>
1685
1686         * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
1687         Add pedwarn.
1688         (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
1689         Likewise.
1690         (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
1691
1692 2014-08-10 Marek Polacek  <polacek@redhat.com>
1693
1694         PR c/51849
1695         * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
1696         Call pedwarn_c90 instead of pedwarn.
1697         (check_bitfield_type_and_width): Likewise.
1698         (declspecs_add_qual): Likewise.
1699         (declspecs_add_type): Likewise.
1700         (warn_variable_length_array): Unify function for -pedantic and -Wvla.
1701         Adjust to only call pedwarn_c90.
1702         (grokdeclarator): Remove pedantic && !flag_isoc99 check.  Call
1703         pedwarn_c90 instead of pedwarn.
1704         * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
1705         * c-parser.c (disable_extension_diagnostics): Handle
1706         warn_c90_c99_compat.
1707         (restore_extension_diagnostics): Likewise.
1708         (c_parser_enum_specifier): Remove check for !flag_isoc99.  Call
1709         pedwarn_c90 instead of pedwarn.
1710         (c_parser_initelt): Likewise.
1711         (c_parser_postfix_expression): Likewise.
1712         (c_parser_postfix_expression_after_paren_type): Likewise.
1713         (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
1714         * c-tree.h: Fix formatting.
1715         * c-typeck.c (build_array_ref): Remove check for !flag_isoc99.  Call
1716         pedwarn_c90 instead of pedwarn.
1717
1718 2014-08-07  Trevor Saunders  <tsaunders@mozilla.com>
1719
1720         * c-typeck.c: Remove include of pointer-set.h.
1721
1722 2014-08-07  Marek Polacek  <polacek@redhat.com>
1723
1724         * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
1725
1726 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
1727
1728         * c-typeck.c: Use hash_map instead of pointer_map.
1729
1730 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
1731
1732         * c-decl.c: Use hash_set instead of pointer_set.
1733
1734 2014-08-01  Igor Zamyatin  <igor.zamyatin@intel.com>
1735
1736         PR middle-end/61455
1737         * c-array-notation.c (expand_array_notations): Handling
1738         of DECL_EXPR added.
1739
1740 2014-07-31  Marc Glisse  <marc.glisse@inria.fr>
1741
1742         PR c++/60517
1743         * c-typeck.c (c_finish_return): Return 0 instead of the address of
1744         a local variable.
1745
1746 2014-07-30  Tom Tromey  <tromey@redhat.com>
1747
1748         * c-typeck.c (struct constructor_stack) <designator_depth>: New
1749         field.
1750         (really_start_incremental_init, push_init_level): Initialize
1751         designator_depth.
1752         (pop_init_level): Set global designator_depth.
1753         (process_init_element): Check for designated_init attribute.
1754
1755 2014-07-20  Marek Polacek  <polacek@redhat.com>
1756
1757         PR c/61852
1758         * c-decl.c (implicit_decl_warning): Add location_t parameter.  Use it.
1759         (implicitly_declare): Pass location to implicit_decl_warning.
1760
1761 2014-07-14  Jakub Jelinek  <jakub@redhat.com>
1762
1763         PR middle-end/61294
1764         * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
1765         If non-NULL, call c_parser_check_literal_zero.
1766         (c_parser_check_literal_zero): New function.
1767         (c_parser_postfix_expression_after_primary): Adjust
1768         c_parser_expr_list caller, handle -Wmemset-transposed-args.
1769
1770 2014-07-06  Marek Polacek  <polacek@redhat.com>
1771
1772         PR c/6940
1773         * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
1774         * c-tree.h (C_ARRAY_PARAMETER): Define.
1775         * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
1776         function parameter.
1777
1778 2014-07-02  Jan Hubicka  <hubicka@ucw.cz>
1779             Chen Gang <gang.chen.5i5j@gmail.com>
1780
1781         * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
1782         releasing symbol.
1783
1784 2014-07-01  Marek Polacek  <polacek@redhat.com>
1785
1786         * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
1787         instead of 0 to WARN_FOR_ASSIGNMENT.
1788
1789 2014-07-01  Marek Polacek  <polacek@redhat.com>
1790
1791         PR c/58286
1792         * c-typeck.c (convert_for_assignment): Pass
1793         OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
1794
1795 2014-06-30  Marek Polacek  <polacek@redhat.com>
1796
1797         * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
1798         has no_sanitize_undefined attribute.
1799
1800 2014-06-30  Igor Zamyatin  <igor.zamyatin@intel.com>
1801
1802         PR middle-end/57541
1803         * c-array-notation.c (fix_builtin_array_notation_fn):
1804         Check for 0 arguments in builtin call. Check that bultin argument is
1805         correct.
1806         * c-parser.c (c_parser_array_notation): Check for incorrect initial
1807         index.
1808
1809 2014-06-27  Sebastian Huber  <sebastian.huber@embedded-brains.de>
1810
1811         * c-parser.c (c_parser_declaration_or_fndef): Discard all type
1812         qualifiers in __auto_type for atomic types.
1813         (c_parser_typeof_specifier): Discard all type qualifiers in
1814         __typeof__ for atomic types.
1815
1816 2014-06-25  Marek Polacek  <polacek@redhat.com>
1817
1818         PR c/61162
1819         * c-parser.c (c_parser_statement_after_labels): Pass the location of
1820         the return expression to c_finish_return.
1821
1822 2014-06-25  Jakub Jelinek  <jakub@redhat.com>
1823
1824         * c-typeck.c (c_finish_omp_clauses): Make sure
1825         OMP_CLAUSE_LINEAR_STEP has correct type.
1826
1827 2014-06-24  Trevor Saunders  <tsaunders@mozilla.com>
1828
1829         * c-decl.c: Adjust.
1830
1831 2014-06-24  Jakub Jelinek  <jakub@redhat.com>
1832
1833         * c-parser.c (c_parser_omp_for_loop): For
1834         #pragma omp parallel for simd move lastprivate clause from parallel
1835         to for rather than simd.
1836
1837 2014-06-23  Marek Polacek  <polacek@redhat.com>
1838
1839         * c-typeck.c (parser_build_binary_op): Don't call
1840         warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
1841
1842 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
1843
1844         * c-parser.c (c_parser_omp_threadprivate): Likewise.
1845         * c-decl.c (merge_decls): Likewise.
1846
1847 2014-06-09  Marek Polacek  <polacek@redhat.com>
1848
1849         PR c/36446
1850         * c-typeck.c (error_init): Call inform instead of error_at.
1851         (pedwarn_init): Call inform instead of pedwarn.
1852         (warning_init): Call inform instead of warning_at.
1853
1854 2014-06-07  Jan Hubicka  <hubicka@ucw.cz>
1855
1856         * c-decl.c (merge_decls): Use set_decl_section_name.
1857         (duplicate_decls): Remove node if it exists.
1858
1859 2014-06-05  S. Gilles  <sgilles@terpmail.umd.edu>
1860
1861         PR c/53119
1862         * c-typeck.c (push_init_level, process_init_element,
1863         pop_init_level): Correct check for zero initialization, move
1864         missing brace warning to respect zero initialization.
1865
1866 2014-06-05  Marek Polacek  <polacek@redhat.com>
1867
1868         PR c/56724
1869         * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
1870
1871 2014-06-05  Marek Polacek  <polacek@redhat.com>
1872
1873         PR c/49706
1874         * c-typeck.c (parser_build_binary_op): Warn when logical not is used
1875         on the left hand side operand of a comparison. 
1876
1877 2014-06-05  Marek Polacek  <polacek@redhat.com>
1878
1879         PR c/48062
1880         * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
1881         Print note only if the warning was printed.
1882
1883 2014-06-04  Igor Zamyatin  <igor.zamyatin@intel.com>
1884
1885         PR c/58942
1886         * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
1887         with a pointer.
1888
1889 2014-06-03  Marek Polacek  <polacek@redhat.com>
1890
1891         PR c/60439
1892         * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
1893         c_start_case.
1894         * c-tree.h (c_start_case): Update.
1895         * c-typeck.c (c_start_case): Add new boolean parameter.  Warn if
1896         switch condition has boolean value.
1897
1898 2014-06-02  Andrew MacLeod  <amacleod@redhat.com>
1899
1900         * c-decl.c: Include builtins.h.
1901         * c-parser.c: Likewise.
1902
1903 2014-05-27  Marek Polacek  <polacek@redhat.com>
1904
1905         PR c/56724
1906         * c-typeck.c (convert_arguments): Get location of a parameter.  Change
1907         error and warning calls to error_at and warning_at.  Pass location of
1908         a parameter to it.  Call warning_at with OPT_Wtraditional_conversion.
1909         (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
1910         WARN_FOR_QUALIFIERS.  Pass expr_loc to those.
1911
1912 2014-05-26  Igor Zamyatin  <igor.zamyatin@intel.com>
1913
1914         PR c/61191
1915         * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
1916         function parameters.
1917
1918 2014-05-23  Jan Hubicka  <hubicka@ucw.cz>
1919
1920         * c-decl.c (merge_decls): Preserve symtab node pointers.
1921         (duplicate_decls): Free new decl.
1922
1923 2014-05-23  Thomas Schwinge  <thomas@codesourcery.com>
1924
1925         * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
1926         initialization.
1927
1928         * c-parser.c (c_parser_omp_target): Return bool values.
1929
1930 2014-05-22  Thomas Schwinge  <thomas@codesourcery.com>
1931
1932         * c-parser.c (c_parser_omp_clause_thread_limit): Rename
1933         num_teams_loc variable to num_thread_limit_loc.
1934
1935 2014-05-21  Richard Sandiford  <rsandifo@linux.vnet.ibm.com>
1936
1937         * c-array-notation.c (expand_array_notations): Use void_node
1938         instead of void_zero_node.
1939
1940 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
1941
1942         * c-decl.c (finish_struct): Adjust.
1943         (finish_enum): Likewise.
1944         (bind): Adjust.
1945         (record_inline_static): Likewise.
1946         (push_scope): Likewise.
1947         (make_label): Likewise.
1948         (lookup_label_for_goto): Likewise.
1949         (finish_struct): Likewise.
1950         (finish_enum): Likewise.
1951         (store_parm_decls): Likewise.
1952         (c_push_function_context): Likewise.
1953         * c-lang.h: Remove usage of variable_size gty attribute.
1954         * c-parser.c (c_parse_init): Adjust.
1955         (c_parse_file): Likewise.
1956
1957 2014-05-13  Marek Polacek  <polacek@redhat.com>
1958
1959         PR c/61162
1960         * c-typeck.c (convert_for_assignment): Pass location to
1961         WARN_FOR_ASSIGNMENT instead of input_location.
1962
1963 2014-05-10  Marek Polacek  <polacek@redhat.com>
1964
1965         * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
1966         maybe_warn_string_init.
1967         (c_parser_postfix_expression_after_paren_type): Pass type_loc to
1968         maybe_warn_string_init.
1969         * c-tree.h (maybe_warn_string_init): Update declaration.
1970         * c-typeck.c (maybe_warn_string_init): Add location parameter.
1971         Call pedwarn_init with loc instead of with input_location.
1972         (digest_init): Pass init_loc to maybe_warn_string_init.
1973         (pop_init_level): Call pedwarn_init with loc instead of with
1974         input_location.
1975         (set_init_index): Likewise.
1976         (process_init_element): Likewise.
1977
1978 2014-05-09  Marek Polacek  <polacek@redhat.com>
1979
1980         PR c/61096
1981         * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
1982         (c_parser_initelt): Pass location to set_init_label.  Pass array index
1983         location to set_init_index.
1984         * c-tree.h (push_init_level): Update declaration.
1985         (pop_init_level): Likewise.
1986         (set_init_index): Likewise.
1987         (set_init_label): Likewise.
1988         * c-typeck.c (error_init): Add location parameter.  Call error_at
1989         instead of error.
1990         (digest_init): Pass init_loc to error_init.
1991         (really_start_incremental_init):
1992         (push_init_level): Add location parameter.  Pass loc to pop_init_level
1993         and error_init.
1994         (pop_init_level): Likewise.
1995         (set_designator): Add location parameter.  Pass loc to pop_init_level,
1996         push_init_level, and error_init.
1997         (set_init_index): Add location parameter.  Pass loc to error_init and
1998         set_designator.
1999         (set_init_label): Likewise.
2000         (output_init_element): Pass loc to error_init.
2001         (process_init_element): Pass loc to error_init, pop_init_level,
2002         pedwarn_init, and push_init_level.
2003
2004 2014-05-09  Marek Polacek  <polacek@redhat.com>
2005
2006         PR c/50459
2007         * c-parser.c (c_parser_attributes): Parse the arguments as an
2008         expression-list if the attribute takes identifier.
2009
2010 2014-05-08  Marek Polacek  <polacek@redhat.com>
2011
2012         PR c/61053
2013         * c-decl.c (grokdeclarator): Use min_align_of_type instead of
2014         TYPE_ALIGN_UNIT.
2015
2016 2014-05-08  Marek Polacek  <polacek@redhat.com>
2017
2018         PR c/61077
2019         * c-decl.c (start_function): Warn for _Atomic-qualified return type
2020         of main.
2021
2022 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
2023             Mike Stump  <mikestump@comcast.net>
2024             Richard Sandiford  <rdsandiford@googlemail.com>
2025
2026         * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
2027         (finish_enum): Use wide-int interfaces.
2028         * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
2029         * c-typeck.c (build_c_cast): Likewise.
2030         (set_nonincremental_init_from_string): Likewise.
2031         (c_tree_equal): Likewise.
2032
2033 2014-05-02  Marek Polacek  <polacek@redhat.com>
2034
2035         PR c/25801
2036         * c-typeck.c (c_size_in_bytes): Update comment.  Don't call error.
2037         Return size_one_node when the type is not complete.
2038         (pointer_diff): Remove comment.
2039         (build_unary_op): Improve error messages.
2040
2041 2014-05-02  Marek Polacek  <polacek@redhat.com>
2042
2043         * c-typeck.c (c_finish_return): Separate warning_at calls.
2044
2045 2014-05-02  Marek Polacek  <polacek@redhat.com>
2046
2047         * c-tree.h (error_init): Remove declaration.
2048         (pedwarn_init): Likewise.
2049         * c-typeck.c (error_init): Make static and move above.
2050         (pedwarn_init): Likewise.
2051         (warning_init): Move above.
2052         (maybe_warn_string_init): Likewise.
2053
2054 2014-05-01  Jeff Law  <law@redhat.com>
2055
2056         Revert:
2057
2058         2014-04-24  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
2059         * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
2060         avoid goto.
2061
2062 2014-05-02  Marek Polacek  <polacek@redhat.com>
2063
2064         PR c/60784
2065         * c-typeck.c (push_init_level): Set constructor_designated to
2066         p->designated for structures.
2067
2068 2014-05-01  Marek Polacek  <polacek@redhat.com>
2069
2070         PR c/60915
2071         * c-parser.c (c_parser_declaration_or_fndef): Give better error if
2072         function-definition has an attribute after the declarator.
2073
2074 2014-05-01  Marek Polacek  <polacek@redhat.com>
2075
2076         PR c/60257
2077         * c-typeck.c (warning_init): Add location_t parameter.  Call
2078         warning_at instead of warning.
2079         (push_init_level): Pass input_location to warning_init.
2080         (add_pending_init): Add location_t parameter.  Pass loc to
2081         warning_init.
2082         (set_nonincremental_init): Pass input_location to add_pending_init.
2083         (set_nonincremental_init_from_string): Likewise.
2084         (output_init_element): Pass loc to warning_init and to
2085         add_pending_init.
2086
2087 2014-05-01  Marek Polacek  <polacek@redhat.com>
2088
2089         PR c/43395
2090         * c-typeck.c (c_finish_return): Distinguish between label and variable
2091         when warning about returning local address.
2092
2093 2014-05-01  Marek Polacek  <polacek@redhat.com>
2094
2095         PR c/29467
2096         * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
2097         in C89 mode.
2098
2099 2014-05-01  Marek Polacek  <polacek@redhat.com>
2100
2101         PR c/43245
2102         * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
2103         instead of 0 to WARN_FOR_QUALIFIERS.
2104
2105 2014-05-01  Marek Polacek  <polacek@redhat.com>
2106
2107         PR c/56989
2108         * c-typeck.c (default_conversion): Use better location for
2109         error call.
2110
2111 2014-04-30  Marek Polacek  <polacek@redhat.com>
2112
2113         * c-typeck.c (build_binary_op): Call ubsan_instrument_division
2114         also when SANITIZE_FLOAT_DIVIDE is on.
2115
2116 2014-04-30  Marek Polacek  <polacek@redhat.com>
2117
2118         PR c/60139
2119         * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
2120         and pedwarn_init.  Use loc insted of input_location.
2121
2122 2014-04-30  Marek Polacek  <polacek@redhat.com>
2123
2124         PR c/60351
2125         * c-typeck.c (build_binary_op): Use location when warning about
2126         shift count.
2127
2128 2014-04-25  Marek Polacek  <polacek@redhat.com>
2129
2130         PR c/18079
2131         * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
2132         always_inline/noinline and hot/cold attributes.
2133
2134 2014-04-25  Marek Polacek  <polacek@redhat.com>
2135
2136         PR c/60114
2137         * c-parser.c (c_parser_initelt): Pass input_location to
2138         process_init_element.
2139         (c_parser_initval): Pass loc to process_init_element.
2140         * c-tree.h (process_init_element): Adjust declaration.
2141         * c-typeck.c (push_init_level): Pass input_location to
2142         process_init_element.
2143         (pop_init_level): Likewise.
2144         (set_designator): Likewise.
2145         (output_init_element): Add location_t parameter.  Pass loc to
2146         digest_init.
2147         (output_pending_init_elements): Pass input_location to
2148         output_init_element.
2149         (process_init_element): Add location_t parameter.  Pass loc to
2150         output_init_element.
2151
2152 2014-04-24  Jakub Jelinek  <jakub@redhat.com>
2153
2154         * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
2155         atomic-clause, allow comma in between atomic-clause and
2156         seq_cst.
2157
2158 2014-04-22  Jakub Jelinek  <jakub@redhat.com>
2159
2160         PR c/59073
2161         * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
2162         fails, don't set OM_PARALLEL_COMBINED and return NULL.
2163
2164 2014-04-12  Igor Zamyatin  <igor.zamyatin@intel.com>
2165
2166         PR middle-end/60469
2167         * c-array-notation.c (fix_builtin_array_notation_fn): Use
2168         create_tmp_var instead build_decl for creating temps.
2169         (build_array_notation_expr): Likewise.
2170         (fix_conditional_array_notations_1): Likewise.
2171         (fix_array_notation_expr): Likewise.
2172         (fix_array_notation_call_expr): Likewise.
2173
2174 2014-03-28  Jakub Jelinek  <jakub@redhat.com>
2175
2176         PR c++/60689
2177         * c-tree.h (c_build_function_call_vec): New prototype.
2178         * c-typeck.c (build_function_call_vec): Don't call
2179         resolve_overloaded_builtin here.
2180         (c_build_function_call_vec): New wrapper function around
2181         build_function_call_vec.  Call resolve_overloaded_builtin here.
2182         (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
2183         Call c_build_function_call_vec instead of build_function_call_vec.
2184         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2185         * c-decl.c (finish_decl): Likewise.
2186
2187 2014-03-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
2188
2189         PR c/55383
2190         * c-typeck.c: Use correct format string in cast-qual warning
2191
2192 2014-03-07  Thomas Schwinge  <thomas@codesourcery.com>
2193
2194         * c-decl.c (c_decl_attributes): Use
2195         lang_hooks.types.omp_mappable_type.
2196         * c-typeck.c (c_finish_omp_clauses): Likewise.
2197
2198 2014-03-06  Marek Polacek  <polacek@redhat.com>
2199
2200         PR c/60197
2201         * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
2202         of checking tree code.
2203
2204 2014-02-19  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
2205
2206         * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
2207         (c_parser_parameter_declaration): Likewise.
2208
2209 2014-02-19  Marek Polacek  <polacek@redhat.com>
2210
2211         PR c/60195
2212         * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
2213         Call mark_exp_read on exp.value.
2214         (build_atomic_assign): Set TREE_NO_WARNING on val and old.  Set
2215         TREE_ADDRESSABLE on old instead of val.
2216         (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
2217
2218 2014-02-07  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
2219
2220         * c-parser.c (c_parser_get_builtin_args): Replace calls to
2221         C_EXPR_APPEND by vec_safe_push.
2222         * c-tree.h (C_EXPR_APPEND): Remove.
2223
2224 2014-01-31  Marek Polacek  <polacek@redhat.com>
2225
2226         PR c/59963
2227         * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
2228         build_function_call_vec.
2229         (build_function_call): Likewise.
2230         (build_atomic_assign): Likewise.
2231         (build_function_call_vec): Add arg_loc parameter.  Use it.
2232         (convert_arguments): Likewise.
2233         (convert_for_assignment): Rename rhs_loc to expr_loc.
2234         * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
2235         (c_parser_objc_keywordexpr): Likewise.
2236         (c_parser_postfix_expression_after_primary): Call
2237         build_function_call_vec with expr_loc rather than op_loc.
2238         Call c_parser_expr_list to fill arg_loc.  Pass arg_loc to
2239         build_function_call_vec.
2240         (c_parser_expr_list): Add locations parameter.  Fill it with locations
2241         of function arguments.
2242         * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
2243
2244 2014-01-30  Marek Polacek  <polacek@redhat.com>
2245
2246         PR c/59940
2247         * c-typeck.c (build_function_call_vec): Use loc parameter.
2248         (convert_arguments): Add location parameter.  Use it.
2249         (ep_convert_and_check): Likewise.
2250         (build_atomic_assign): Adjust convert_for_assignment call.
2251         (build_modify_expr): Likewise.
2252         (digest_init): Likewise.
2253         (c_finish_return): Likewise.
2254         (build_conditional_expr): Adjust ep_convert_and_check calls.
2255         (convert_for_assignment): Add rhs_loc parameter.  Use it.
2256         (build_binary_op): Adjust convert_and_check and ep_convert_and_check
2257         calls.
2258
2259 2014-01-30  Richard Biener  <rguenther@suse.de>
2260
2261         PR c/59905
2262         * c-typeck.c (build_function_call_vec): Do not replace calls
2263         to a function via an incompatible type with a runtime abort.
2264
2265 2014-01-24  Balaji V. Iyer  <balaji.v.iyer@intel.com>
2266
2267         * c-parser.c (c_parser_declaration_or_fndef): Replaced
2268         flag_enable_cilkplus with flag_cilkplus.
2269         (c_parser_direct_declarator_inner): Likewise.
2270         (c_parser_attribute_any_word): Likewise.
2271         (c_parser_attributes): Likewise.
2272         (c_parser_compound_statement): Likewise.
2273         (c_parser_statement_after_labels): Likewise.
2274         (c_parser_if_statement): Likewise.
2275         (c_parser_switch_statement): Likewise.
2276         (c_parser_do_statement): Likewise.
2277         (c_parser_for_statement): Likewise.
2278         (c_parser_unary_expression): Likewise.
2279         (c_parser_postfix_expression): Likewise.
2280         (c_parser_postfix_expression_after_primary): Likewise.
2281         (c_parser_postfix_expression_after_primary): Likewise.
2282         (c_parser_omp_clause_name): Likewise.
2283         (c_finish_omp_declare_simd): Likewise.
2284         (c_parser_cilk_verify_simd): Likewise.
2285         * c-typeck.c (build_array_ref): Likewise.
2286         (build_function_call_vec): Likewise.
2287         (convert_arguments): Likewise.
2288         (build_compound_expr): Likewise.
2289         (c_finish_return): Likewise.
2290         (c_finish_if_stmt): Likewise.
2291         (c_finish_loop): Likewise.
2292         (build_binary_op): Likewise.
2293
2294 2014-01-23  Marek Polacek  <polacek@redhat.com>
2295
2296         PR c/59846
2297         * c-typeck.c (parser_build_binary_op): Use location instead of
2298         input_location.
2299         (build_binary_op): Pass location to shorten_compare.
2300
2301 2014-01-23  Marek Polacek  <polacek@redhat.com>
2302
2303         PR c/58346
2304         * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
2305         an empty aggregate.
2306
2307 2014-01-23  Marek Polacek  <polacek@redhat.com>
2308
2309         PR c/59871
2310         * c-typeck.c (build_compound_expr): Warn even for right-hand operand
2311         of a comma expression.
2312         (emit_side_effect_warnings): Likewise.
2313
2314 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
2315
2316         PR c/59825
2317         * c-array-notation.c (expand_array_notation_exprs): Rewrote this
2318         function to use walk_tree and moved a lot of its functionality to
2319         expand_array_notations.
2320         (expand_array_notations): New function.
2321
2322 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
2323
2324         * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
2325         attribute an attribute without value.
2326
2327 2014-01-23  Jakub Jelinek  <jakub@redhat.com>
2328
2329         PR middle-end/58809
2330         * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
2331         BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
2332
2333 2014-01-22  Marek Polacek  <polacek@redhat.com>
2334
2335         PR c/59891
2336         * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
2337         of remove_c_maybe_const_expr on op1 and op2.
2338
2339 2014-01-15  Jakub Jelinek  <jakub@redhat.com>
2340
2341         PR c/58943
2342         * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
2343         effects, preevaluate rhs using SAVE_EXPR first.
2344
2345 2014-01-09  Balaji V. Iyer  <balaji.v.iyer@intel.com>
2346
2347         PR c++/59631
2348         * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
2349         statements with if-elseif statements.
2350
2351 2014-01-06  Marek Polacek  <polacek@redhat.com>
2352
2353         PR c/57773
2354         * c-decl.c (check_bitfield_type_and_width): Warn for implementation
2355         defined bit-field types only in ISO C.
2356
2357 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
2358
2359         Update copyright years
2360
2361 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
2362
2363         * c-array-notation.c: Use the standard form for the copyright notice.
2364
2365 2013-12-18  Balaji V. Iyer  <balaji.v.iyer@intel.com>
2366
2367         * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
2368         (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
2369         field in parser is not empty.  If not-empty, call the function
2370         c_parser_finish_omp_declare_simd.
2371         (c_parser_cilk_clause_vectorlength): Modified function to be shared
2372         between SIMD-enabled functions and #pragma simd.  Added new parameter.
2373         (c_parser_cilk_all_clauses): Modified the usage of the function
2374         c_parser_cilk_clause_vectorlength as mentioned above.
2375         (c_parser_cilk_simd_fn_vector_attrs): New function.
2376         (c_finish_cilk_simd_fn_tokens): Likewise.
2377         (is_cilkplus_vector_p): Likewise.
2378         (c_parser_omp_clause_name): Added checking for "vectorlength,"
2379         "nomask," and "mask" strings in clause name.
2380         (c_parser_omp_all_clauses): Added 3 new case statements:
2381         PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
2382         PRAGMA_CILK_CLAUSE_NOMASK.
2383         (c_parser_attributes): Added a cilk_simd_fn_tokens parameter.  Added a
2384         check for vector attribute and if so call the function
2385         c_parser_cilk_simd_fn_vector_attrs.  Also, when Cilk plus is enabled,
2386         called the function c_finish_cilk_simd_fn_tokens.
2387         (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
2388         parser field is non-empty.  If so, parse them as you would parse
2389         the omp declare simd pragma.
2390         (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
2391         Added a check when step is a parameter and flag it as error.
2392         (CILK_SIMD_FN_CLAUSE_MASK): New #define.
2393         (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
2394         pragma_omp_clause.
2395
2396 2013-12-17  Thomas Schwinge  <thomas@codesourcery.com>
2397
2398         * c-parser.c (c_parser_omp_parallel): Fix description.
2399
2400 2013-12-11  Balaji V. Iyer  <balaji.v.iyer@intel.com>
2401
2402         * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
2403         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2404         (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
2405         * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
2406
2407 2013-12-04  Joseph Myers  <joseph@codesourcery.com>
2408
2409         PR c/52023
2410         * c-parser.c (c_parser_alignas_specifier): Use
2411         c_sizeof_or_alignof_type instead of c_alignof.
2412         (c_parser_alignof_expression): Likewise, with min_alignof
2413         parameter depending on alignof spelling used.
2414
2415 2013-12-04  Marek Polacek  <polacek@redhat.com>
2416
2417         PR c/54113
2418         * c-decl.c (start_function): Don't warn for missing prototype for
2419         inline functions.
2420
2421 2013-12-03  Marek Polacek  <polacek@redhat.com>
2422
2423         PR c/59351
2424         * c-decl.c (build_compound_literal): Allow compound literals with
2425         empty initial value.
2426
2427 2013-12-02  Joseph Myers  <joseph@codesourcery.com>
2428
2429         PR c/58235
2430         * c-typeck.c (build_modify_expr): Diagnose assignment to
2431         expression with array type.
2432
2433 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
2434
2435         PR c/42262
2436         * c-typeck.c (process_init_element): Do not treat a string as
2437         initializing a whole array when used with a designator for an
2438         individual element.
2439
2440 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
2441
2442         PR c/57574
2443         * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
2444         an inline function following a static declaration.
2445
2446 2013-11-28  Jakub Jelinek  <jakub@redhat.com>
2447
2448         PR c/59310
2449         * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
2450         to p_name before calling c_parser_omp_teams instead of after.
2451         (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
2452         argument.  Remove unused p_name variable.
2453
2454 2013-11-27  Aldy Hernandez  <aldyh@redhat.com>
2455             Jakub Jelinek  <jakub@redhat.com>
2456
2457         * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
2458         external_scope is NULL.
2459
2460 2013-11-27  Tom de Vries  <tom@codesourcery.com>
2461             Marc Glisse  <marc.glisse@inria.fr>
2462
2463         PR c++/59032
2464         * c-typeck.c (build_unary_op): Allow vector increment and decrement.
2465
2466 2013-11-22  Andrew MacLeod  <amacleod@redhat.com>
2467
2468         * c-typeck.c: Add required include files from gimple.h.
2469
2470 2013-11-22  David Malcolm  <dmalcolm@redhat.com>
2471
2472         * c-decl.c (define_label, shadow_tag_warned)
2473         (check_bitfield_type_and_width, grokdeclarator, grokparms,
2474         store_parm_decls_newstyle, store_parm_decls_oldstyle)
2475         (declspecs_add_type): Remove use of in_system_header macro.
2476         * c-parser.c (c_parser_unary_expression): Likewise.
2477         * c-typeck.c (store_init_value, process_init_element)
2478         (c_start_case): Likewise.
2479
2480         * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
2481         macro.
2482
2483         * c-parser.c (c_parser_set_source_position_from_token): Remove
2484         reference to in_system_header from comment.
2485
2486 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
2487
2488         * c-decl.c (grokdeclarator): Update comment to refer to
2489         tree_to_[su]hwi rather than tree_low_cst.
2490
2491 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
2492
2493         * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
2494         tree_to_uhwi throughout.
2495
2496 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
2497
2498         * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
2499         throughout.
2500
2501 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
2502
2503         * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
2504         throughout.
2505
2506 2013-11-15  Aldy Hernandez  <aldyh@redhat.com>
2507
2508         * c-parser.c (c_parser_cilk_simd): New.
2509         (c_parser_cilk_verify_simd): New.
2510         (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
2511         (c_parser_omp_for_loop): Add case for NE_EXPR.
2512         Set c_break_label for CILK_SIMD.
2513         (c_parser_cilk_clause_vectorlength): New.
2514         (c_parser_cilk_clause_linear): New.
2515         (c_parser_cilk_clause_name): New.
2516         (c_parser_cilk_all_clauses): New.
2517         * c-typeck.c (build_unary_op): Pass location argument to
2518         readonly_error.
2519         (build_modify_expr): Same.
2520         (build_asm_expr): Same.
2521         (c_finish_bc_stmt): Error on break/continue in loops.
2522
2523 2013-11-14  Andrew MacLeod  <amacleod@redhat.com>
2524
2525         * c-typeck.c: Include only gimplify.h and gimple.h as needed.
2526
2527 2013-11-14  Diego Novillo  <dnovillo@google.com>
2528
2529         * c-decl.c: Include print-tree.h.
2530         Include stor-layout.h.
2531         Include varasm.h.
2532         Include attribs.h.
2533         Include stringpool.h.
2534         * c-lang.c: Include fold-const.h.
2535         * c-parser.c: Include stringpool.h.
2536         Include attribs.h.
2537         Include stor-layout.h.
2538         Include varasm.h.
2539         Include trans-mem.h.
2540         * c-typeck.c: Include stor-layout.h.
2541         Include trans-mem.h.
2542         Include varasm.h.
2543         Include stmt.h.
2544
2545 2013-11-13  Joseph Myers  <joseph@codesourcery.com>
2546
2547         * c-tree.h (c_typespec_keyword): Add cts_auto_type.
2548         * c-decl.c (declspecs_add_type, finish_declspecs): Handle
2549         __auto_type.
2550         * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
2551         (c_parser_attribute_any_word, c_parser_objc_selector): Handle
2552         RID_AUTO_TYPE.
2553         (c_parser_declspecs): Take argument AUTO_TYPE_OK.
2554         (c_parser_declaration_or_fndef, c_parser_struct_declaration)
2555         (c_parser_declarator, c_parser_direct_declarator_inner)
2556         (c_parser_parameter_declaration, c_parser_type_name): All callers
2557         changed.
2558         (c_parser_declaration_or_fndef): Handle declarations with type
2559         determined from the initializer.
2560
2561 2013-11-12  Andrew MacLeod  <amacleod@redhat.com>
2562
2563         * c-typeck.c: Include gimplify.h.
2564
2565 2013-11-12  Joseph Myers  <joseph@codesourcery.com>
2566
2567         * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
2568         * c-parser.c (c_parser_declspecs): Mention _Thread_local in
2569         comment.
2570         * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
2571         or _Thread_local as appropriate in diagnostics.
2572         (build_null_declspecs): Initialize ret->thread_gnu_p.
2573         (declspecs_add_scspec): Handle either __thread or _Thread_local
2574         for RID_THREAD.  Diagnose _Thread_local for pre-C11 standards if
2575         pedantic.  Do not disallow _Thread_local extern and _Thread_local
2576         static.
2577
2578 2013-11-07  Joseph Myers  <joseph@codesourcery.com>
2579             Andrew MacLeod  <amacleod@redhat.com>
2580
2581         * c-aux-info.c (gen_type): Handle atomic qualifier.
2582         * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
2583         qualifiers when compating types.
2584         (shadow_tag_warned): Handle atomic_p in declspecs.
2585         (quals_from_declspecs): Likewise.
2586         (start_decl): Use c_type_promotes_to when promoting argument
2587         types.
2588         (grokdeclarator): Handle _Atomic.
2589         (get_parm_info): Diagnose any qualifier on "void" as only
2590         parameter.
2591         (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
2592         comparing types.  Use c_type_promotes_to when promoting argument
2593         types.
2594         (finish_function): Use c_type_promotes_to when promoting argument
2595         types.
2596         (build_null_declspecs): Handle atomic_p in declspecs.
2597         (declspecs_add_qual): Handle RID_ATOMIC.
2598         * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
2599         (c_token_starts_declspecs): Handle RID_ATOMIC.
2600         (c_parser_declspecs): Handle atomic type specifiers and
2601         qualifiers.
2602         (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
2603         from types of expressions with atomic type.
2604         (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
2605         (c_parser_attribute_any_word): Handle RID_ATOMIC.
2606         (c_parser_initializer, c_parser_initelt, c_parser_initval)
2607         (c_parser_statement_after_labels, c_parser_switch_statement)
2608         (c_parser_for_statement, c_parser_expr_no_commas)
2609         (c_parser_conditional_expression, c_parser_binary_expression)
2610         (c_parser_cast_expression, c_parser_unary_expression)
2611         (c_parser_postfix_expression)
2612         (c_parser_postfix_expression_after_primary, c_parser_expression):
2613         Use convert_lvalue_to_rvalue.
2614         (c_parser_expression_conv, c_parser_expr_list): Document
2615         conversion of lvalues to rvalues.  Use convert_lvalue_to_rvalue.
2616         (c_parser_objc_synchronized_statement): Use
2617         convert_lvalue_to_rvalue.
2618         (c_parser_objc_selector): Handle RID_ATOMIC.
2619         (c_parser_objc_receiver, c_parser_array_notation): Use
2620         convert_lvalue_to_rvalue.
2621         * c-tree.h (ctsk_typeof): Adjust comment to mention use for
2622         _Atomic (type-name).
2623         (struct c_declspecs): Add atomic_p field.
2624         (convert_lvalue_to_rvalue): Declare.
2625         * c-typeck.c (c_type_promotes_to): Promote atomic types to
2626         corresponding atomic types.
2627         (qualify_type): Don't add _Atomic qualifiers from second argument.
2628         (comp_target_types): Do not allow _Atomic mismatches.
2629         (type_lists_compatible_p): Do not remove atomic qualifiers when
2630         comparing types.
2631         (really_atomic_lvalue, convert_lvalue_to_rvalue)
2632         (build_atomic_assign): New functions.
2633         (build_unary_op): Use build_atomic_assign for atomic increment and
2634         decrement.
2635         (build_conditional_expr): Do not treat _Atomic void as a qualified
2636         version of void.
2637         (build_modify_expr): Use build_atomic_assign for atomic LHS.
2638         (find_anonymous_field_with_type, convert_to_anonymous_field)
2639         (convert_for_assignment): Do not remove atomic qualifiers when
2640         comparing types.
2641         (digest_init): Do not accept initialization of arrays of atomic
2642         elements by string constants.
2643         (build_asm_expr): Use convert_lvalue_to_rvalue.
2644         (build_binary_op): Do not treat _Atomic void as a qualified
2645         version of void.
2646
2647 2013-11-06  DJ Delorie  <dj@redhat.com>
2648
2649         * c-decl.c (locate_old_decl): If a previous conflicting decl is
2650         both explicit and builtin, print the location of the explicit one.
2651
2652 2013-11-05  Tobias Burnus  <burnus@net-b.de>
2653
2654         * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
2655         c_parser_omp_distribute, c_parser_omp_teams,
2656         c_parser_omp_target, c_parser_omp_declare): Handle
2657         -fopenmp-simd.
2658
2659 2013-11-03  Marek Polacek  <polacek@redhat.com>
2660
2661         * c-decl.c (grokdeclarator): Add VLA instrumentation.
2662
2663 2013-11-01  Jakub Jelinek  <jakub@redhat.com>
2664
2665         * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
2666         check_dup_generic at the end, unless remove is true.
2667         (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
2668         remove = true;.
2669         (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
2670
2671 2013-10-31  Jakub Jelinek  <jakub@redhat.com>
2672
2673         * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
2674         with decl that is not pointer nor array.
2675
2676 2013-10-29  Balaji V. Iyer  <balaji.v.iyer@intel.com>
2677
2678         * c-decl.c (finish_function): Added a call for insert_cilk_frame when
2679         a spawning function is found.
2680         * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
2681         (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
2682         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2683         * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
2684         case.
2685         (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
2686         * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
2687         expr.
2688         (c_finish_return): Added a check to reject _Cilk_spawn in return
2689         expression.
2690         (build_cilk_spawn): New function.
2691         (build_cilk_sync): Likewise.
2692         * Makefile.in (c-decl.o): Added cilk.h in dependency list.
2693         
2694 2013-10-27  Tobias Burnus  <burnus@net-b.de>
2695
2696         PR other/33426
2697         * c-parser.c (c_parser_while_statement, c_parser_while_statement,
2698         c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
2699         (c_parser_statement_after_labels): Update calls.
2700
2701 2013-10-24  Tobias Burnus  <burnus@net-b.de>
2702
2703         PR other/33426
2704         * c-parser.c (c_parser_pragma, c_parser_for_statement):
2705         Handle PRAGMA_IVDEP.
2706         (c_parser_statement_after_labels): Update call.
2707
2708 2013-10-24  Marek Polacek  <polacek@redhat.com>
2709
2710         * c-parser.c (c_parser_struct_declaration): Add a comment.
2711         (c_parser_declarator): Don't allow _Alignas here.
2712
2713 2013-10-17  Andrew MacLeod  <amacleod@redhat.com>
2714
2715         * c-parser.c: Include omp-low.h.
2716         * c-typeck.c: Likewise.
2717
2718 2013-10-17  Marek Polacek  <polacek@redhat.com>
2719
2720         PR c/58267
2721         * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
2722         Document syntax of the array-declarator.
2723         (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
2724         are not permitted.
2725         (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
2726         (c_parser_struct_declaration): Likewise.
2727         (c_parser_declarator): Likewise.
2728         (c_parser_direct_declarator_inner): Likewise.
2729         (c_parser_parameter_declaration): Likewise.
2730         (c_parser_type_name): Likewise.
2731
2732 2013-10-11  Jakub Jelinek  <jakub@redhat.com>
2733
2734         * c-lang.h (current_omp_declare_target_attribute): New extern
2735         decl.
2736         * c-parser.c: Include c-lang.h.
2737         (struct c_parser): Change tokens to c_token *.
2738         Add tokens_buf field.  Change tokens_avail type to unsigned int.
2739         (c_parser_consume_token): If parser->tokens isn't
2740         &parser->tokens_buf[0], increment parser->tokens.
2741         (c_parser_consume_pragma): Likewise.
2742         (enum pragma_context): Add pragma_struct and pragma_param.
2743         (c_parser_external_declaration): Adjust
2744         c_parser_declaration_or_fndef caller.
2745         (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
2746         argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
2747         Adjust recursive call.
2748         (c_parser_struct_or_union_specifier): Use pragma_struct instead
2749         of pragma_external.
2750         (c_parser_parameter_declaration): Use pragma_param instead of
2751         pragma_external.
2752         (c_parser_compound_statement_nostart, c_parser_label,
2753         c_parser_for_statement): Adjust
2754         c_parser_declaration_or_fndef callers.
2755         (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
2756         it through to c_parser_conditional_expression.
2757         (c_parser_conditional_expression): Add omp_atomic_lhs argument,
2758         pass it through to c_parser_binary_expression.  Adjust recursive
2759         call.
2760         (c_parser_binary_expression): Remove prec argument, add
2761         omp_atomic_lhs argument instead.  Always start from PREC_NONE, if
2762         omp_atomic_lhs is non-NULL and one of the arguments of toplevel
2763         binop matches it, use build2 instead of parser_build_binary_op.
2764         (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
2765         PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
2766         PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
2767         Handle pragma_struct and pragma_param the same as pragma_external.
2768         (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
2769         (c_parser_omp_variable_list): Parse array sections for
2770         OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
2771         (c_parser_omp_clause_collapse): Fully fold collapse expression.
2772         (c_parser_omp_clause_reduction): Handle user defined reductions.
2773         (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
2774         c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
2775         c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
2776         c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
2777         c_parser_omp_clause_depend, c_parser_omp_clause_map,
2778         c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
2779         c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
2780         c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
2781         (c_parser_omp_all_clauses): Add finish_p argument.  Don't call
2782         c_finish_omp_clauses if it is false.  Handle new OpenMP 4.0 clauses.
2783         (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
2784         present to c_finish_omp_atomic.  Handle OpenMP 4.0 atomic forms.
2785         (c_parser_omp_for_loop): Add CODE argument, pass it through
2786         to c_finish_omp_for.  Change last argument to cclauses,
2787         and adjust uses to grab parallel clauses from the array of all
2788         the split clauses.  Adjust c_parser_binary_expression,
2789         c_parser_declaration_or_fndef and c_finish_omp_for callers.
2790         (omp_split_clauses): New function.
2791         (c_parser_omp_simd): New function.
2792         (c_parser_omp_for): Add p_name, mask and cclauses arguments.
2793         Allow the function to be called also when parsing combined constructs,
2794         and call c_parser_omp_simd when parsing for simd.
2795         (c_parser_omp_sections_scope): If section-sequence doesn't start with
2796         #pragma omp section, require exactly one structured-block instead of
2797         sequence of statements.
2798         (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
2799         Allow the function to be called also when parsing combined constructs.
2800         (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
2801         Allow the function to be called also when parsing combined
2802         constructs.
2803         (c_parser_omp_taskgroup, c_parser_omp_cancel,
2804         c_parser_omp_cancellation_point, c_parser_omp_distribute,
2805         c_parser_omp_teams, c_parser_omp_target_data,
2806         c_parser_omp_target_update, c_parser_omp_target,
2807         c_parser_omp_declare_simd, c_finish_omp_declare_simd,
2808         c_parser_omp_declare_target, c_parser_omp_end_declare_target,
2809         c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
2810         (c_parser_omp_construct): Add p_name and mask vars.  Handle
2811         PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
2812         PRAGMA_OMP_TEAMS.  Adjust c_parser_omp_for, c_parser_omp_parallel
2813         and c_parser_omp_sections callers.
2814         (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
2815         (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
2816         OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
2817         (OMP_PARALLEL_CLAUSE_MASK): Likewise.  Add OMP_CLAUSE_PROC_BIND.
2818         (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.  Add
2819         OMP_CLAUSE_DEPEND.
2820         (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
2821         OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
2822         OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
2823         OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
2824         OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
2825         * c-typeck.c: Include tree-inline.h.
2826         (c_finish_omp_cancel, c_finish_omp_cancellation_point,
2827         handle_omp_array_sections_1, handle_omp_array_sections,
2828         c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
2829         (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
2830         user defined reductions.
2831         (c_tree_equal): New function.
2832         * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
2833         c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
2834         c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
2835         c_check_omp_declare_reduction_r): New prototypes.
2836         * c-decl.c (current_omp_declare_target_attribute): New variable.
2837         (c_decl_attributes): New function.
2838         (start_decl, start_function): Use it instead of decl_attributes.
2839         (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
2840         c_omp_reduction_decl, c_omp_reduction_lookup,
2841         c_check_omp_declare_reduction_r): New functions.
2842
2843 2013-09-25  Tom Tromey  <tromey@redhat.com>
2844
2845         * Make-lang.in (c/gccspec.o): Remove.
2846         (CFLAGS-c/gccspec.o): New variable.
2847         (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
2848         (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
2849         (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
2850
2851 2013-09-25  Tom Tromey  <tromey@redhat.com>
2852
2853         * Make-lang.in (c/gccspec.o): Don't use subshell.
2854
2855 2013-09-18  Marek Polacek  <polacek@redhat.com>
2856
2857         PR sanitize/58443
2858         * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
2859         Remove unnecessary check.
2860
2861 2013-09-18  Marek Polacek  <polacek@redhat.com>
2862
2863         PR sanitizer/58411
2864         * c-typeck.c (build_binary_op): Don't sanitize function if it has the
2865         no_sanitize_undefined attribute.
2866
2867 2013-09-13  Kai Tietz  <ktietz@redhat.com>
2868
2869         PR target/57848
2870         * c-decl.c (c_builtin_function_ext_scope): Remove
2871         wrong assumption that it is never called on prexisting
2872         symbol.
2873
2874 2013-09-08  Joern Rennecke  <joern.rennecke@embecosm.com>
2875
2876         * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
2877
2878 2013-09-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2879
2880         * c-objc-common.c (c_tree_printer): Tidy.
2881
2882 2013-08-30  Marek Polacek  <polacek@redhat.com>
2883
2884         * c-typeck.c (build_binary_op): Add division by zero and shift
2885         instrumentation.
2886
2887 2013-08-26  Joern Rennecke  <joern.rennecke@embecosm.com>
2888             Joseph Myers  <joseph@codesourcery.com>
2889
2890         PR c/35649
2891         * c-typeck.c (c_common_type): Prefer double_type_node over
2892         other REAL_TYPE types with the same precision.
2893         (convert_arguments): Likewise.
2894
2895 2013-08-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2896
2897         * c-objc-common.c (c_tree_printer): Document the nature of the cast.
2898         (c_initialize_diagnostics): Call a destructor for the early printer.
2899
2900 2013-08-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2901
2902         * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
2903         printer initialization.
2904
2905 2013-08-19  Balaji V. Iyer  <balaji.v.iyer@intel.com>
2906
2907         PR c/57490
2908         * c-array-notation.c (fix_conditional_array_notations_1): Added a
2909         check for truth values.
2910         (expand_array_notation_exprs): Added truth values case.  Removed an
2911         unwanted else.  Added for-loop to walk through subtrees in default
2912         case.
2913
2914 2013-08-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2915
2916         * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
2917
2918 2013-07-23  Joseph Myers  <joseph@codesourcery.com>
2919
2920         * c-parser.c (struct c_generic_association): Fix typo.
2921
2922 2013-07-23  Tom Tromey  <tromey@redhat.com>
2923             Joseph Myers  <joseph@codesourcery.com>
2924
2925         * c-parser.c (struct c_generic_association): New.
2926         (c_generic_association_d): New typedef.
2927         (c_parser_generic_selection): New function.
2928         (c_parser_postfix_expression): Handle RID_GENERIC.
2929
2930 2013-07-13  Jason Merrill  <jason@redhat.com>
2931
2932         PR c++/57793
2933         * c-decl.c (finish_struct): Check for too-large class.
2934
2935 2013-07-04  Joern Rennecke  <joern.rennecke@embecosm.com>
2936
2937         PR c/57821
2938         * c-typeck.c (set_init_index): When folding, check for index overflow.
2939
2940 2013-06-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
2941
2942         * c-parser.c (c_parser_array_notation): Removed rejection of array
2943         notations in an array of function pointers.
2944
2945 2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
2946
2947         * c-array-notation.c (make_triplet_val_inv): New function.
2948         (create_cmp_incr): Likewise.
2949         (create_array_refs): Likewise.
2950         (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
2951         Also modularized common parts between functions and called the function.
2952         (build_array_notation_expr): Likewise.
2953         (fix_conditional_array_notations_1): Likewise.
2954         (fix_array_notation_expr): Likewise.
2955         (fix_array_notation_call_expr): Likewise.
2956
2957 2013-06-18  Marek Polacek  <polacek@redhat.com>
2958
2959         PR c/57630
2960         * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
2961
2962 2013-06-12  Balaji V. Iyer  <balaji.v.iyer@intel.com>
2963
2964         * c-array-notation.c (build_array_notation_expr): Reject array notation
2965         mismatch between LHS and RHS even inside a call_expr.  Also, removed
2966         a couple while statements that were dead code.
2967
2968 2013-06-10  Balaji V. Iyer  <balaji.v.iyer@intel.com>
2969
2970         * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
2971         excessive precision expressions in function parameters.  Also removed
2972         couple unwanted while statements.
2973
2974 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
2975
2976         * c-array-notation.c (expand_array_notation_exprs): Added
2977         ARRAY_NOTATION_REF case.
2978         
2979 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
2980
2981         * c-array-notation.c (length_mismatch_in_expr_p): Moved this
2982         function to c-family/array-notation-common.c.
2983         (is_cilkplus_reduce_builtin): Likewise.
2984         (find_rank): Likewise.
2985         (extract_array_notation_exprs): Likewise.
2986         (replace_array_notations): Likewise.
2987         (find_inv_trees): Likewise.
2988         (replace_inv_trees): Likewise.
2989         (contains_array_notation_expr): Likewise.
2990         (find_correct_array_notation_type): Likewise.
2991         (replace_invariant_exprs): Initialized additional_tcodes to NULL.
2992         (struct inv_list): Moved this to c-family/array-notation-common.c.
2993         * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
2994         
2995 2013-06-05  Balaji V. Iyer  <balaji.v.iyer@intel.com>
2996
2997         * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
2998         reduction functions outside the for-loop.  Added a check if the fundecl
2999         is non-NULL.  Finally, removed an unwanted if-statement, and made the
3000         body unconditional.
3001
3002 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3003
3004         * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
3005         condition of the if-statement matches the rank of else-block and then-
3006         block when array notations are used.
3007         * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
3008         expression after the entire function body is parsed.
3009         (c_parser_expr_no_commas): Delayed creating array notation expressions
3010         to the end of function parsing.
3011         * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
3012         whole if-statement instead of just the condition.
3013         (expand_array_notation_exprs): Added MODIFY_EXPR case.  
3014
3015 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3016
3017         PR c/57474
3018         * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
3019         array to NULL_TREE if they are unused.  Also added a check for the
3020         field to be NULL before its fields are used in future.
3021         
3022 2013-05-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3023
3024         PR bootstrap/57450
3025         * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
3026         (build_array_notation_expr): Likewise.
3027
3028 2013-05-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3029
3030         * c-typeck.c (build_array_ref): Added a check to see if array's
3031         index is greater than one.  If true, then emit an error.
3032         (build_function_call_vec): Exclude error reporting and checking
3033         for builtin array-notation functions.
3034         (convert_arguments): Likewise.
3035         (c_finish_return): Added a check for array notations as a return
3036         expression.  If true, then emit an error.
3037         (c_finish_loop): Added a check for array notations in a loop
3038         condition.  If true then emit an error.
3039         (lvalue_p): Added a ARRAY_NOTATION_REF case.
3040         (build_binary_op): Added a check for array notation expr inside
3041         op1 and op0.  If present, we call another function to find correct
3042         type.
3043         * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
3044         * c-parser.c (c_parser_compound_statement): Check if array
3045         notation code is used in tree, if so, then transform them into
3046         appropriate C code.
3047         (c_parser_expr_no_commas): Check if array notation is used in LHS
3048         or RHS, if so, then build array notation expression instead of
3049         regular modify.
3050         (c_parser_postfix_expression_after_primary): Added a check for
3051         colon(s) after square braces, if so then handle it like an array
3052         notation.  Also, break up array notations in unary op if found.
3053         (c_parser_direct_declarator_inner): Added a check for array
3054         notation.
3055         (c_parser_compound_statement): Added a check for array notation in
3056         a stmt.  If one is present, then expand array notation expr.
3057         (c_parser_if_statement): Likewise.
3058         (c_parser_switch_statement): Added a check for array notations in
3059         a switch statement's condition.  If true, then output an error.
3060         (c_parser_while_statement): Similarly, but for a while.
3061         (c_parser_do_statement): Similarly, but for a do-while.
3062         (c_parser_for_statement): Similarly, but for a for-loop.
3063         (c_parser_unary_expression): Check if array notation is used in a
3064         pre-increment or pre-decrement expression.  If true, then expand
3065         them.
3066         (c_parser_array_notation): New function.
3067         * c-array-notation.c: New file.
3068         * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
3069         
3070 2013-05-23  Mike Stump  <mikestump@comcast.net>
3071
3072         * c-typeck.c (convert_for_assignment): Handle references to memory
3073         spaces better.
3074
3075 2013-05-16  Jason Merrill  <jason@redhat.com>
3076
3077         * Make-lang.in (cc1$(exeext)): Use link mutex.
3078
3079 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
3080
3081         * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
3082         to simply use OPT_Wpointer_arith.
3083         (build_unary_op): Likewise.
3084
3085 2013-04-03  Jakub Jelinek  <jakub@redhat.com>
3086
3087         PR c/19449
3088         * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
3089         argument.  If set, or it temporarily for parsing of the first
3090         argument into force_folding_builtin_constant_p.
3091         (c_parser_postfix_expression): Adjust callers.
3092
3093 2013-03-21  Richard Biener  <rguenther@suse.de>
3094
3095         * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
3096         instead of DECL_DEBUG_EXPR_IS_FROM.  Guard properly.
3097
3098 2013-02-12  Marek Polacek  <polacek@redhat.com>
3099
3100         PR c/44938
3101         * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
3102         origtypes to NULL.
3103
3104 2013-01-24  Jakub Jelinek  <jakub@redhat.com>
3105
3106         PR c/56078
3107         * c-typeck.c (set_nonincremental_init_from_string): If
3108         constructor_max_index is NULL, treat it as if tree_int_cst_lt
3109         returned false.
3110         (process_init_element): Likewise.
3111
3112 2012-12-20  Jakub Jelinek  <jakub@redhat.com>
3113
3114         PR c++/55619
3115         * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
3116         argument, don't call default_function_array_conversion
3117         nor c_fully_fold here.
3118         (c_parser_asm_statement): Adjust callers.
3119         * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
3120         and outputs here, and call default_function_array_conversion
3121         on inputs that don't need to be addressable.
3122
3123 2012-12-18  Jakub Jelinek  <jakub@redhat.com>
3124
3125         PR c/39464
3126         * c-typeck.c (convert_for_assignment): For -Wpointer-sign
3127         warning require that both c_common_unsigned_type as well as
3128         c_common_signed_type is the same for both mvl and mvr types.
3129
3130 2012-11-16  Diego Novillo  <dnovillo@google.com>
3131
3132         Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
3133
3134         * c-common.c: Use new vec API in vec.h.
3135         * c-common.h: Likewise.
3136         * c-gimplify.c: Likewise.
3137         * c-pragma.c: Likewise.
3138         * c-pretty-print.c: Likewise.
3139         * c-pretty-print.h: Likewise.
3140         * c-semantics.c: Likewise.
3141         * c-decl.c: Likewise.
3142         * c-parser.c: Likewise.
3143         * c-tree.h: Likewise.
3144         * c-typeck.c: Likewise.
3145
3146 2012-10-29  Jonathan Wakely  <jwakely.gcc@gmail.com>
3147
3148         PR c++/54930
3149         * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
3150
3151 2012-10-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
3152
3153         PR c/53066
3154         * c-decl.c (warn_if_shadowing): Do not warn if a variable
3155         shadows a function, unless the variable is a function or a
3156         pointer-to-function.
3157
3158 2012-10-12  Jakub Jelinek  <jakub@redhat.com>
3159
3160         PR c/54381
3161         * c-parser.c (struct c_tree_loc_pair): Removed.
3162         (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
3163         add location_t * and tree * arguments, fill in array of 3
3164         sizeof_arg trees and corresponding locs.
3165         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
3166         c_parser_expr_list callers.
3167         (c_parser_postfix_expression_after_primary): Likewise.  Pass
3168         array of 3 sizeof_arg trees and locs (corresponding to first
3169         3 arguments) to sizeof_pointer_memaccess_warning.
3170
3171 2012-10-09  Lawrence Crowl  <crowl@google.com>
3172
3173         * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
3174         * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
3175         hash table.
3176
3177 2012-10-09  Paolo Carlini  <paolo.carlini@oracle.com>
3178
3179         PR c++/54194
3180         * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
3181         call.
3182
3183 2012-10-09  Marc Glisse  <marc.glisse@inria.fr>
3184
3185         PR c++/54427
3186         * c-typeck.c: Include c-common.h.
3187         (enum stv_conv): Moved to c-common.h.
3188         (scalar_to_vector): Moved to c-common.c.
3189         (build_binary_op): Adapt to scalar_to_vector's new prototype.
3190         * Make-lang.in: c-typeck.c depends on c-common.h.
3191
3192 2012-10-04  Arnaud Charlet  <charlet@adacore.com>
3193
3194         * c-decl.c (c_write_global_declarations): Fix handling of
3195         -fdump-ada-spec*.
3196
3197 2012-09-30  Sharad Singhai  <singhai@google.com>
3198
3199         * c-decl.c (c_write_global_declarations): Use a different method
3200         to determine if the dump has ben initialized.
3201
3202 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
3203
3204         PR c/54552
3205         * c-typeck.c (c_cast_expr): When casting to a type requiring
3206         C_MAYBE_CONST_EXPR to be created, pass the inner expression to
3207         c_fully_fold first.
3208
3209 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
3210
3211         PR c/54103
3212         * c-typeck.c (build_unary_op): Pass original argument of
3213         TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
3214         any C_MAYBE_CONST_EXPR, if it has integer operands.
3215         (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
3216         TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
3217         to c_objc_common_truthvalue_conversion, then remove any
3218         C_MAYBE_CONST_EXPR, if they have integer operands.  Use
3219         c_objc_common_truthvalue_conversion not
3220         c_common_truthvalue_conversion.
3221         (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
3222         call note_integer_operands for arguments with integer operands
3223         that are not integer constants.
3224
3225 2012-09-13  Jakub Jelinek  <jakub@redhat.com>
3226
3227         PR c/54559
3228         * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
3229         COMPLEX_TYPE with in_late_binary_op set temporarily to true.
3230
3231 2012-08-31  Jakub Jelinek  <jakub@redhat.com>
3232
3233         PR c/54428
3234         * c-convert.c (convert): Don't call fold_convert_loc if
3235         TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
3236         is a COMPLEX_EXPR.  Remove TYPE_MAIN_VARIANT check from
3237         COMPLEX_TYPE -> COMPLEX_TYPE conversion.
3238
3239 2012-08-24  Jakub Jelinek  <jakub@redhat.com>
3240
3241         PR c/54355
3242         * c-decl.c (c_parser_label): Pass true as nested and fix up comments
3243         for nested and empty_ok arguments in the call to
3244         c_parser_declaration_or_fndef.
3245
3246 2012-08-17  Jakub Jelinek  <jakub@redhat.com>
3247
3248         * c-tree.h (c_last_sizeof_arg): Declare.
3249         * c-parser.c (struct c_tree_loc_pair): New type.
3250         (c_parser_expr_list): Add sizeof_arg argument.  Fill it in if
3251         non-NULL.
3252         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
3253         (c_parser_postfix_expression_after_primary): Likewise.  Call
3254         sizeof_pointer_memaccess_warning if needed.
3255         (sizeof_ptr_memacc_comptypes): New function.
3256         * c-typeck.c (c_last_sizeof_arg): New global variable.
3257         (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
3258
3259 2012-07-24  Uros Bizjak  <ubizjak@gmail.com>
3260
3261         * c-lang.h (lang_decl): Add variable_size GTY option.
3262
3263 2012-07-16  Steven Bosscher  <steven@gcc.gnu.org>
3264
3265         * c-decl.c: Include dumpfile.h instead of tree-dump.h.
3266         * Make-lang.in: Fix dependencies.
3267
3268 2012-06-29  Steven Bosscher  <steven@gcc.gnu.org>
3269
3270         * Make-lang.in: New file, rules migrated from gcc/Makefile.in
3271         and add language Makefile hooks.
3272         * config-lang.in: New file.
3273         * c-config-lang.in: Moved from gcc/config-lang.in to here, and
3274         add the required "normal" config-lang.in rules.
3275         * c-lang.h: Moved from gcc/ to here.
3276         * c-tree.h: Likewise.
3277         * c-objc-common.c: Likewise.
3278         * c-objc-common.h: Likewise.
3279         * c-typeck.c: Likewise.
3280         * c-convert.c: Likewise.
3281         * c-lang.c: Likewise.
3282         * c-aux-info.c: Likewise.
3283         * c-errors.c: Likewise.
3284         * gccspec.c: Likewise.
3285         * c-decl.c: Likewise.  Include gt-c-c-decl.h, not gt-c-decl.h.
3286         * c-parser.c: Likewise.  Include gt-c-c-parser.h, not gt-c-parser.h.
3287 \f
3288 Copyright (C) 2012-2016 Free Software Foundation, Inc.
3289
3290 Copying and distribution of this file, with or without modification,
3291 are permitted in any medium without royalty provided the copyright
3292 notice and this notice are preserved.