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