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