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