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