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