c/c++, asm: Use nicer error for duplicate asm qualifiers
[platform/upstream/gcc.git] / gcc / c / ChangeLog
1 2018-12-19  Segher Boessenkool  <segher@kernel.crashing.org>
2
3         * c-parser.c (c_parser_asm_statement): Keep track of the location each
4         asm qualifier is first seen; use that to give nicer "duplicate asm
5         qualifier" messages.  Delete 'quals" variable, instead pass the
6         "is_volatile_ flag to build_asm_stmt directly.
7         * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
8         * c-typeck.c (build_asm_stmt): Ditto; adjust.
9
10 2018-12-19  Segher Boessenkool  <segher@kernel.crashing.org>
11
12         * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
13         "done" boolean variable.
14
15 2018-12-19  David Malcolm  <dmalcolm@redhat.com>
16
17         PR c++/87504
18         * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
19         Move from here to gcc-rich-location.h and gcc-rich-location.c.
20         (build_binary_op): Use struct op_location_t and
21         class binary_op_rich_location.
22
23 2018-12-11  Jakub Jelinek  <jakub@redhat.com>
24
25         PR sanitizer/88426
26         * c-convert.c (convert): Call c_fully_fold before calling
27         ubsan_instrument_float_cast.
28
29 2018-12-08  Segher Boessenkool  <segher@kernel.crashing.org>
30
31         * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
32         setting "quals".
33
34 2018-12-06  Segher Boessenkool  <segher@kernel.crashing.org>
35
36         * c-parser.c (c_parser_asm_statement): Detect the inline keyword
37         after asm.  Pass a flag for it to build_asm_expr.
38         * c-tree.h (build_asm_expr): Update declaration.
39         * c-typeck.c (build_asm_stmt): Add is_inline parameter.  Use it to
40         set ASM_INLINE_P.
41
42 2018-12-06  Segher Boessenkool  <segher@kernel.crashing.org>
43
44         PR inline-asm/55681
45         * c-parser.c (c_parser_asm_statement): Update grammar.  Allow any
46         combination of volatile and goto, in any order, without repetitions.
47
48 2018-12-04  James Norris  <jnorris@codesourcery.com>
49             Cesar Philippidis  <cesar@codesourcery.com>
50             Julian Brown  <julian@codesourcery.com>
51
52         * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
53         code.
54
55 2018-11-30  Richard Biener  <rguenther@suse.de>
56
57         * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
58         _Literal (type) { ... } as empty aggregate or vector constructor.
59
60 2018-11-29  Martin Sebor  <msebor@redhat.com>
61
62         PR c/88091
63         * c-typeck.c (convert_argument): Add a parameter.  Adjust indentation.
64         (convert_arguments): Add comments.  Pass additional argument to
65         the function above.
66
67 2018-11-29  Martin Sebor  <msebor@redhat.com>
68
69         PR c/88172
70         PR testsuite/88208
71         * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
72
73 2018-11-23  Martin Sebor  <msebor@redhat.com>
74
75         PR testsuite/88098
76         * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
77         (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
78
79 2018-11-20  Martin Sebor  <msebor@redhat.com>
80
81         * c-parser.c (c_parser_has_attribute_expression): New function.
82         (c_parser_attribute): New function.
83         (c_parser_attributes): Move code into c_parser_attribute.
84         (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
85
86 2018-11-15  Martin Sebor  <msebor@redhat.com>
87
88         PR c/83656
89         * c-decl.c (header_for_builtin_fn): Declare.
90         (diagnose_mismatched_decls): Diagnose declarations of built-in
91         functions without a prototype.
92         * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
93         (convert_argument): Same.
94         (convert_arguments): Factor code out into convert_argument.
95         Detect mismatches between built-in formal arguments in calls
96         to built-in without prototype.
97         (build_conditional_expr): Same.
98         (type_or_builtin_type): New function.
99         (convert_for_assignment): Add argument.  Conditionally issue
100         warnings instead of errors for mismatches.
101
102 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
103
104         * c-decl.c: Replace "source_location" with "location_t".
105         * c-tree.h: Likewise.
106         * c-typeck.c: Likewise.
107         * gimple-parser.c: Likewise.
108
109 2018-11-09  Jakub Jelinek  <jakub@redhat.com>
110
111         * c-parser.c (c_parser_omp_clause_final): Use
112         c_parser_expr_no_commas, convert_lvalue_to_rvalue,
113         c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
114         parsing instead of c_parser_paren_condition.
115         (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
116         convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
117         c_fully_fold instead of c_parser_condition.
118         (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
119         c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
120         c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
121         c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
122         c_parser_expr_no_commas instead of c_parser_expression.
123
124         * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
125         reduction clause with inscan modifier.
126
127         * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
128         clauses other than atomic_default_mem_order.
129
130 2018-11-08  Jakub Jelinek  <jakub@redhat.com>
131
132         * c-parser.c: Include memmode.h.
133         (c_parser_omp_depobj, c_parser_omp_requires): New functions.
134         (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
135         (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
136         task_reduction clauses.
137         (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
138         For OMP_CLAUSE_DEPEND, parse clause operands as either an array
139         section, or lvalue assignment expression.
140         (c_parser_omp_clause_if): Handle cancel and simd modifiers.
141         (c_parser_omp_clause_lastprivate): Parse optional
142         conditional: modifier.
143         (c_parser_omp_clause_hint): Require constant integer expression rather
144         than just integer expression.
145         (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
146         clause.
147         (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
148         Parse reduction modifiers.  Pass KIND to c_parser_omp_variable_list.
149         (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
150         functions.
151         (c_parser_omp_clause_depend): Parse iterator modifier and handle
152         iterators.  Parse mutexinoutset and depobj kinds.
153         (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
154         callers.
155         (c_parser_omp_all_clauses): Likewise.  Handle
156         PRAGMA_OMP_CLAUSE_NONTEMPORAL and
157         PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
158         (c_parser_omp_atomic): Parse hint and memory order clauses.  Handle
159         default memory order from requires directive if any.  Adjust
160         c_finish_omp_atomic caller.
161         (c_parser_omp_critical): Allow comma in between (name) and hint clause.
162         (c_parser_omp_flush): Parse flush with memory-order-clause.
163         (c_parser_omp_for_loop): Allow NE_EXPR even in
164         OpenMP loops, adjust c_finish_omp_for caller.
165         (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
166         (c_parser_omp_master): Add p_name, mask and cclauses arguments.
167         Allow to be called while parsing combined parallel master.
168         Parse combined master taskloop{, simd}.
169         (c_parser_omp_parallel): Parse combined
170         parallel master{, taskloop{, simd}} constructs.
171         (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
172         (OMP_TASKGROUP_CLAUSE_MASK): Define.
173         (c_parser_omp_taskgroup): Add LOC argument.  Parse taskgroup clauses.
174         (OMP_TASKWAIT_CLAUSE_MASK): Define.
175         (c_parser_omp_taskwait): Handle taskwait with depend clauses.
176         (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
177         around teams body.  Use SET_EXPR_LOCATION.
178         (c_parser_omp_target_data): Allow target data
179         with only use_device_ptr clauses.
180         (c_parser_omp_target): Use SET_EXPR_LOCATION.  Set
181         OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
182         (c_parser_omp_requires): New function.
183         (c_finish_taskloop_clauses): New function.
184         (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
185         (c_parser_omp_taskloop): Use c_finish_taskloop_clauses.  Add forward
186         declaration.  Disallow in_reduction clause when combined with parallel
187         master.
188         (c_parser_omp_construct): Adjust c_parser_omp_master and
189         c_parser_omp_taskgroup callers.
190         * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
191         other than cancel.
192         (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
193         like OMP_CLAUSE_REDUCTION.
194         (handle_omp_array_sections): Likewise.  Call save_expr on array
195         reductions before calling build_index_type.  Handle depend clauses
196         with iterators.
197         (struct c_find_omp_var_s): New type.
198         (c_find_omp_var_r, c_omp_finish_iterators): New functions.
199         (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
200         with static, runtime or auto schedule kinds.  Call save_expr for whole
201         array reduction sizes.  Diagnose reductions with zero sized elements
202         or variable length structures.  Diagnose nogroup clause used with
203         reduction clause(s).  Handle depend clause with
204         OMP_CLAUSE_DEPEND_DEPOBJ.  Diagnose bit-fields.  Require
205         omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
206         some different type for other kinds.  Use build_unary_op with
207         ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
208         Handle depend clauses with iterators.  Remove no longer needed special
209         case that predetermined const qualified vars may be specified in
210         firstprivate clause.  Complain if const qualified vars are mentioned
211         in data-sharing clauses other than firstprivate or shared.  Use
212         error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
213         error.  Formatting fix.  Handle OMP_CLAUSE_NONTEMPORAL and
214         OMP_CLAUSE_{IN,TASK}_REDUCTION.  Allow any lvalue as
215         OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
216
217 2018-10-29  David Malcolm  <dmalcolm@redhat.com>
218
219         * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
220         logic for change to name_hint::operator bool.
221         (undeclared_variable): Likewise.
222         * c-parser.c (c_parser_declaration_or_fndef): Likewise.
223         (c_parser_parameter_declaration): Likewise.
224
225 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
226
227         * c-errors.c (pedwarn_c11): New function.
228         * c-parser.c (disable_extension_diagnostics): Save
229         warn_c11_c2x_compat and set it to 0.
230         (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
231         (c_parser_static_assert_declaration_no_semi): Handle
232         _Static_assert without string constant.
233         * c-tree.h (pedwarn_c11): New prototype.
234
235 2018-10-17  David Malcolm  <dmalcolm@redhat.com>
236
237         * Make-lang.in (selftest-c): New.
238         (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
239         (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
240         from gcc/Makefile.in.
241
242 2018-10-02  Richard Biener  <rguenther@suse.de>
243
244         * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
245
246 2018-09-26  Joseph Myers  <joseph@codesourcery.com>
247
248         PR c/87390
249         * c-typeck.c (build_binary_op): Use excess precision for
250         comparisons of integers and floating-point for C11 and later.
251
252 2018-09-26  Martin Jambor  <mjambor@suse.cz>
253
254         PR c/87347
255         * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL.  Fix
256         comment.
257
258 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
259
260         * c-objc-common.c (range_label_for_type_mismatch::get_text):
261         Update for new param.
262         * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
263         Likewise.
264
265 2018-09-17  Martin Jambor  <mjambor@suse.cz>
266
267         PR c/63886
268         * c-parser.c: (warn_for_abs): New function.
269         (c_parser_postfix_expression_after_primary): Call it.
270
271 2018-09-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>
272
273         * c-typeck.c (digest_init): Shorten overlength strings.
274
275 2018-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
276
277         * c-decl.c (finish_decl): Call complete_flexible_array_elts.
278
279 2018-09-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
280
281         * c-decl.c (finish_decl): Call braced_list_to_string here ...
282         * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
283
284 2018-08-30  Alexander Monakov  <amonakov@ispras.ru>
285
286         * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
287         "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
288
289 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
290
291         PR 87091
292         * c-decl.c (implicitly_declare): Update call to
293         maybe_add_include_fixit to suggest overriding the location, as it
294         is for a note.
295         * c-objc-common.c (c_tree_printer): Update for conversion of
296         show_caret_p to a tri-state.
297
298 2018-08-27  Martin Liska  <mliska@suse.cz>
299
300         * c-decl.c (locate_old_decl): Use new function
301         fndecl_built_in_p and remove check for FUNCTION_DECL if
302         possible.
303         (diagnose_mismatched_decls): Likewise.
304         (merge_decls): Likewise.
305         (warn_if_shadowing): Likewise.
306         (pushdecl): Likewise.
307         (implicitly_declare): Likewise.
308         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
309         * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
310         * c-typeck.c (build_function_call_vec): Likewise.
311         (convert_arguments): Likewise.
312
313 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
314
315         PR other/84889
316         * c-decl.c (pushtag): Add auto_diagnostic_group instance.
317         (diagnose_mismatched_decls): Likewise, in various places.
318         (warn_if_shadowing): Likewise.
319         (implicit_decl_warning): Likewise.
320         (implicitly_declare): Likewise.
321         (undeclared_variable): Likewise.
322         (declare_label): Likewise.
323         (grokdeclarator): Likewise.
324         (start_function): Likewise.
325         * c-parser.c (c_parser_declaration_or_fndef): Likewise.
326         (c_parser_parameter_declaration): Likewise.
327         (c_parser_binary_expression): Likewise.
328         * c-typeck.c (c_expr_sizeof_expr): Likewise.
329         (parser_build_binary_op): Likewise.
330         (build_unary_op): Likewise.
331         (error_init): Likewise.
332         (pedwarn_init): Likewise.
333         (warning_init): Likewise.
334         (convert_for_assignment): Likewise.
335
336 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
337
338         * c-objc-common.c: Include "gcc-rich-location.h".
339         (c_tree_printer): Move implemenation of '%T' to...
340         (print_type): ...this new function.
341         (range_label_for_type_mismatch::get_text): New function.
342         * c-typeck.c (convert_for_assignment): Add type labels to the rhs
343         range for the various ic_argpass cases.
344         (class maybe_range_label_for_tree_type_mismatch): New class.
345         (build_binary_op): Use it when calling binary_op_error.
346
347 2018-08-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
348         
349         * c-decl.c (start_decl): Do not warn if variables is named as main
350         and is a local variable.
351
352 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
353
354         PR c/19315
355         * c-decl.c (finish_decl): Don't add the 'extern' storage class to
356         objects of unknown size.
357
358 2018-08-13  Martin Sebor  <msebor@redhat.com>
359
360         PR tree-optimization/71625
361         * c-parser.c (c_parser_declaration_or_fndef): Call
362         braced_list_to_string.
363
364 2018-08-03  Bogdan Harjoc  <harjoc@gmail.com>
365
366         PR c/86690
367         * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
368         errors.
369
370 2018-08-01  Martin Sebor  <msebor@redhat.com>
371
372         PR tree-optimization/86650
373         * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
374         and TREE_BLOCK (t) from within percent_K_format to this callsite.
375
376 2018-08-01  Jakub Jelinek  <jakub@redhat.com>
377
378         PR c/85704
379         * c-typeck.c (init_field_decl_cmp): New function.
380         (output_pending_init_elements): Use it for field comparisons
381         instead of pure bit_position comparisons.
382
383 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
384
385         * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
386         type here, instead add "omp declare target implicit" attribute.
387         (finish_decl): Diagnose vars without mappable type here.
388
389 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
390             Thomas Schwinge <thomas@codesourcery.com>
391             Cesar Philippidis  <cesar@codesourcery.com>
392
393         * c-parser.c (c_parser_omp_clause_name): Add support for finalize
394         and if_present. Make present_or_{copy,copyin,copyout,create} aliases
395         to their non-present_or_* counterparts. Make 'self' an alias to
396         PRAGMA_OACC_CLAUSE_HOST.
397         (c_parser_oacc_data_clause): Update GOMP mappings for
398         PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
399         PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
400         (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
401         Remove support for present_or_* clauses.
402         (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
403         (OACC_PARALLEL_CLAUSE_MASK): Likewise.
404         (OACC_DECLARE_CLAUSE_MASK): Likewise.
405         (OACC_DATA_CLAUSE_MASK): Likewise.
406         (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
407         (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
408         (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
409         (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
410         * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
411
412 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
413
414         * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
415         * gimple-parser.c (c_parser_gimple_statement): Likewise.
416         (c_parser_gimple_unary_expression): Likewise.
417
418 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
419
420         PR c/86093
421         * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
422         before doing POINTER_DIFF_EXPR.
423
424 2018-06-07  Marek Polacek  <polacek@redhat.com>
425
426         PR c/85318
427         * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
428         for loop initial declarations.
429
430 2018-05-30  David Pagan  <dave.pagan@oracle.com>
431
432         PR c/55976
433         * c-decl.c (grokdeclarator): Update check for return type warnings.
434         (start_function): Likewise.
435         (finish_function): Likewise.
436         * c-typeck.c (c_finish_return): Update check for return type warnings.
437         Pass OPT_Wreturn_type to pedwarn when appropriate.
438
439 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
440
441         * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
442         __FMA_EXPR handlng.
443
444 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
445
446         * gimple-parser.c: Include internal-fn.h.
447         (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
448         (c_parser_gimple_call_internal): New function.
449         (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
450         Fix typos in comment.
451
452 2018-05-10  Jakub Jelinek  <jakub@redhat.com>
453
454         PR c++/85662
455         * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
456         fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
457         fold_convert_loc.
458         * c-typeck.c (build_unary_op): Use fold_offsetof rather than
459         fold_offsetof_1, pass argtype as TYPE to it and drop the
460         fold_convert_loc.
461
462 2018-05-02  David Pagan  <dave.pagan@oracle.com>
463
464         PR c/30552
465         * c-decl.c (old_style_parameter_scope): New function.
466         * c-parser.c (c_parser_postfix_expression): Check for statement
467         expressions in old-style function parameter list declarations.
468         * c-parser.h (old_style_parameter_scope): New extern declaration.
469
470 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
471
472         PR sanitizer/84307
473         * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
474         it is not TREE_STATIC.
475         * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
476         not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
477         its COMPOUND_LITERAL_EXPR_DECL.
478
479 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
480
481         * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
482         where all functions return the same _FloatN or _FloatNx type,
483         treat integer types as _Float64 instead of double.
484
485 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
486
487         PR c/84999
488         * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
489         building vector comparison, diagnose it and return error_mark_node.
490
491 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
492
493         PR c/84853
494         * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
495         If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
496         INTEGER_TYPE element type.
497
498 2018-03-13  David Pagan  <dave.pagan@oracle.com>
499
500         PR c/46921
501         * c-typeck.c (output_init_element): Ensure field initializer
502         expression is always evaluated if there are side effects.
503
504 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
505
506         PR c/84721
507         * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
508         !building_stmt_list_p ().
509
510 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
511
512         PR c/84305
513         * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
514         in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
515         and include the BIND_EXPR in the list of things that need to be
516         pre-evaluated.
517
518 2018-02-09  Nathan Sidwell  <nathan@acm.org>
519
520         PR c/84293
521         * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
522         to strict_aliasing_warning.
523
524 2018-02-02  Paolo Carlini  <paolo.carlini@oracle.com>
525
526         * c-typeck.c (really_start_incremental_init, push_init_level,
527         set_nonincremental_init, output_init_element, process_init_element):
528         Use DECL_UNNAMED_BIT_FIELD.
529
530 2018-01-31  Marek Polacek  <polacek@redhat.com>
531
532         PR c/81779
533         * c-parser.c (c_parser_compound_statement_nostart): Call
534         expansion_point_location_if_in_system_header.
535
536 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
537
538         PR c++/83814
539         * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
540         the C part.
541
542 2018-01-13  Jakub Jelinek  <jakub@redhat.com>
543
544         PR c/83801
545         * c-tree.h (decl_constant_value_1): Add a bool argument.
546         * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
547         returning a CONSTRUCTOR if it is true.  Use error_operand_p.
548         (decl_constant_value): Adjust caller.
549         * c-fold.c (c_fully_fold_internal): If in_init, pass true to
550         decl_constant_value_1 as IN_INIT.  Otherwise, punt if
551         decl_constant_value returns initializer that has BLKmode or
552         array type.
553         (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
554
555 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
556             Alan Hayward  <alan.hayward@arm.com>
557             David Sherwood  <david.sherwood@arm.com>
558
559         * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
560         TYPE_VECTOR_SUBPARTS.
561
562 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
563
564         Update copyright years.
565
566 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
567
568         PR c/83595
569         * c-parser.c (c_parser_braced_init, c_parser_initelt,
570         c_parser_conditional_expression, c_parser_cast_expression,
571         c_parser_sizeof_expression, c_parser_alignof_expression,
572         c_parser_postfix_expression, c_parser_omp_declare_reduction,
573         c_parser_transaction_expression): Use set_error () method instead
574         of setting value member to error_mark_node.
575
576 2017-12-28  Michael Meissner  <meissner@linux.vnet.ibm.com>
577
578         * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
579         and _Float<N>X built-in functions.
580
581 2017-12-22  Jakub Jelinek  <jakub@redhat.com>
582
583         PR debug/83550
584         * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
585         TYPE_STUB_DECL and call rest_of_type_compilation before processing
586         incomplete vars rather than after it.
587
588         PR debug/83547
589         * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
590         indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
591         and consider empty ones if there are no other stmts.  For
592         -Wunused-value walk all statements before the one only followed by
593         DEBUG_BEGIN_STMTs.
594
595 2017-12-22  Mike Stump  <mikestump@comcast.net>
596             Eric Botcazou  <ebotcazou@adacore.com>
597
598         * c-parser.c (c_parser_while_statement): Add unroll parameter and
599         build ANNOTATE_EXPR if present.  Add 3rd operand to ANNOTATE_EXPR.
600         (c_parser_do_statement): Likewise.
601         (c_parser_for_statement): Likewise.
602         (c_parser_statement_after_labels): Adjust calls to above.
603         (c_parse_pragma_ivdep): New static function.
604         (c_parser_pragma_unroll): Likewise.
605         (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
606         <PRAGMA_UNROLL>: New case.
607
608 2017-12-19  Jakub Jelinek  <jakub@redhat.com>
609
610         * c-typeck.c (comptypes_internal, function_types_compatible_p,
611         perform_integral_promotions, digest_init): Replace Yoda conditions
612         with typical order conditions.
613         * c-decl.c (check_bitfield_type_and_width): Likewise.
614
615 2017-12-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
616
617         * c-typeck.c (c_safe_arg_type_equiv_p,
618         c_safe_function_type_cast_p): New function.
619         (build_c_cast): Implement -Wcast-function-type.
620
621 2017-12-14  Richard Biener  <rguenther@suse.de>
622
623         PR c/83415
624         * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
625         like REALPART_EXPR for the behavior of whether its operand
626         is an lvalue.
627
628 2017-12-12  Marek Polacek  <polacek@redhat.com>
629
630         PR c/82679
631         * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
632
633 2017-12-12  Alexandre Oliva <aoliva@redhat.com>
634
635         * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
636         * c-parser.c (add_debug_begin_stmt): New.
637         (c_parser_declaration_or_fndef): Call it.
638         (c_parser_compound_statement_nostart): Likewise.
639         (c_parser_statement_after_labels): Likewise.
640         * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
641
642 2017-12-07  Joseph Myers  <joseph@codesourcery.com>
643
644         * c-decl.c (build_compound_literal): Add parameter alignas_align
645         and set alignment of decl if nonzero.
646         * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
647         (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
648         qualifier.
649         (c_parser_struct_declaration): Update syntax comment.
650         (c_parser_type_name): Add alignas_ok argument and pass it to
651         c_parser_declspecs.
652         (c_parser_cast_expression): Pass true to c_parser_type_name and
653         give error if a cast used an _Alignas specifier.
654         (c_parser_sizeof_expression): Pass true to c_parser_type_name and
655         give error if sizeof (type-name) used an _Alignas specifier.
656         (c_parser_alignof_expression): Pass true to c_parser_type_name and
657         give error if _Alignof (type-name) used an _Alignas specifier.
658         (c_parser_postfix_expression_after_paren_type): Check specified
659         alignment for a compound literal and pass it to
660         build_compound_literal.
661         * c-parser.h (c_parser_type_name): Update prototype.
662         * c-tree.h (build_compound_literal): Update prototype.
663
664 2017-12-07  Martin Sebor  <msebor@redhat.com>
665
666         PR c/81544
667         * c-decl.c (c_decl_attributes): Look up existing declaration and
668         pass it to decl_attributes.
669
670 2017-12-06  David Malcolm  <dmalcolm@redhat.com>
671
672         PR c/83236
673         * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
674         reserved for use by the implementation.
675
676 2017-12-06  David Malcolm  <dmalcolm@redhat.com>
677
678         * c-decl.c: Include "c-family/c-spellcheck.h".
679
680 2017-12-05  Martin Liska  <mliska@suse.cz>
681             Jakub Jelinek  <jakub@redhat.com>
682
683         * c-typeck.c (pointer_diff): Add new argument and instrument
684         pointer subtraction.
685         (build_binary_op): Similar for pointer comparison.
686
687 2017-12-01  Jakub Jelinek  <jakub@redhat.com>
688
689         PR c/79153
690         * c-parser.c: Include tree-iterator.h.
691         (c_parser_switch_statement): Emit LABEL_EXPR for the break label
692         into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
693         on it.
694
695         PR c/83222
696         * c-tree.h (decl_constant_value_1): Declare.
697         * c-typeck.c (decl_constant_value_1): New function.
698         (decl_constant_value): Use it.
699         * c-fold.c (c_fully_fold_internal): If in_init, use
700         decl_constant_value_1 instead of decl_constant_value.
701
702 2017-11-30  Jakub Jelinek  <jakub@redhat.com>
703
704         * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
705
706 2017-11-28  Jakub Jelinek  <jakub@redhat.com>
707
708         PR sanitizer/81275
709         * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
710         c_switch_covers_all_cases_p returns true.
711
712 2017-11-28  Julia Koval  <julia.koval@intel.com>
713             Sebastian Peryt  <sebastian.peryt@intel.com>
714
715         * Make-lang.in (c/c-array-notation.o): Remove.
716         * c-array-notation.c: Delete.
717         * c-decl.c: Remove cilkplus condition.
718         * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
719         c_parser_cilk_verify_simd, c_parser_array_notation,
720         c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
721         c_parser_cilk_simd_fn_vector_attrs,
722         c_finish_cilk_simd_fn_tokens): Delete.
723         (c_parser_declaration_or_fndef): Remove cilkplus condition.
724         (c_parser_direct_declarator_inner): Ditto.
725         (CILK_SIMD_FN_CLAUSE_MASK): Delete.
726         (c_parser_attributes, c_parser_compound_statement,
727         c_parser_statement_after_labels, c_parser_if_statement,
728         c_parser_switch_statement, c_parser_while_statement,
729         c_parser_do_statement, c_parser_for_statement,
730         c_parser_unary_expression, c_parser_postfix_expression,
731         c_parser_postfix_expression_after_primary,
732         c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
733         c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
734         support.
735         * c-typeck.c (build_array_ref, build_function_call_vec,
736         convert_arguments,
737         lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
738         c_finish_loop, build_binary_op): Remove cilkplus support.
739
740 2017-11-28  Jakub Jelinek  <jakub@redhat.com>
741
742         * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
743         of build3.
744
745 2017-11-14 Boris Kolpackov  <boris@codesynthesis.com>
746
747         * Make-lang.in (c.install-plugin): Install backend import library.
748
749 2017-11-23  Jakub Jelinek  <jakub@redhat.com>
750
751         * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
752         pragma_stmt context.
753
754 2017-11-23  Mike Stump  <mikestump@comcast.net>
755             Eric Botcazou  <ebotcazou@adacore.com>
756
757         * c-parser.c (c_parser_while_statement): Pass 3rd operand to
758         ANNOTATE_EXPR.
759         (c_parser_do_statement): Likewise.
760         (c_parser_for_statement): Likewise.
761
762 2017-11-22  David Malcolm  <dmalcolm@redhat.com>
763
764         PR c++/62170
765         * c-objc-common.c (c_tree_printer): Convert penultimate param from
766         bool to bool *.  Within '%T' handling, if showing an "aka", use
767         "quoted" param to add appropriate quoting.
768
769 2017-11-22  Marek Polacek  <polacek@redhat.com>
770
771         PR c++/60336
772         PR middle-end/67239
773         PR target/68355
774         * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
775
776 2017-11-21  David Malcolm  <dmalcolm@redhat.com>
777
778         PR c/83056
779         * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
780         earlier failed lookups.
781
782 2017-11-21  Marc Glisse  <marc.glisse@inria.fr>
783
784         * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
785         * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
786
787 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
788
789         PR c/81404
790         * c-decl.c: Include "c-family/known-headers.h".
791         (get_c_name_hint): Rename to get_stdlib_header_for_name and move
792         to known-headers.cc.
793         (class suggest_missing_header): Move to known-header.h.
794         (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
795         than get_c_name_hint.
796
797 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
798
799         * c-decl.c (get_c_name_hint): New function.
800         (class suggest_missing_header): New class.
801         (lookup_name_fuzzy): Call get_c_name_hint and use it to
802         suggest missing headers to the user.
803
804 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
805
806         * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
807         Include "c-family/name-hint.h"
808         (implicit_decl_warning): Convert "hint" from
809         const char * to name_hint.  Pass location to
810         lookup_name_fuzzy.  Suppress any deferred diagnostic if the
811         warning was not printed.
812         (undeclared_variable): Likewise for "guessed_id".
813         (lookup_name_fuzzy): Convert return type from const char *
814         to name_hint.  Add location_t param.
815         * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
816         Include "c-family/name-hint.h"
817         (c_parser_declaration_or_fndef): Convert "hint" from
818         const char * to name_hint.  Pass location to lookup_name_fuzzy.
819         (c_parser_parameter_declaration): Likewise.
820
821 2017-11-19  Jakub Jelinek  <jakub@redhat.com>
822
823         PR c/66618
824         PR c/69960
825         * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
826         where needed.
827         * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
828         handle_omp_array_sections): Likewise.
829         (digest_init): Don't call decl_constant_value_for_optimization.
830         * c-tree.h (decl_constant_value_for_optimization): Removed.
831         * c-fold.c (c_fold_array_ref): New function.
832         (c_fully_fold_internal): Add LVAL argument, propagate it through
833         recursive calls.  For VAR_P call decl_constant_value and
834         unshare if not LVAL and either optimizing or IN_INIT.  Remove
835         decl_constant_value_for_optimization calls.  If IN_INIT and not LVAL,
836         fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
837         (c_fully_fold): Add LVAL argument, pass it through to
838         c_fully_fold_internal.
839         (decl_constant_value_for_optimization): Removed.
840
841 2017-11-15  Joseph Myers  <joseph@codesourcery.com>
842
843         PR c/81156
844         * c-parser.c (check_tgmath_function): New function.
845         (enum tgmath_parm_kind): New enum.
846         (c_parser_postfix_expression): Handle __builtin_tgmath.
847
848 2017-10-31  David Malcolm  <dmalcolm@redhat.com>
849
850         * c-decl.c (implicit_decl_warning): Update for renaming of
851         pedwarn_at_rich_loc and warning_at_rich_loc.
852         (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
853         (undeclared_variable): Likewise for renaming of error_at_rich_loc.
854         * c-parser.c (c_parser_declaration_or_fndef): Likewise.
855         (c_parser_struct_or_union_specifier): Likewise for renaming of
856         pedwarn_at_rich_loc.
857         (c_parser_parameter_declaration): Likewise for renaming of
858         error_at_rich_loc.
859         * c-typeck.c (build_component_ref): Likewise.
860         (build_unary_op): Likewise for renaming of inform_at_rich_loc.
861         (pop_init_level): Likewise for renaming of warning_at_rich_loc.
862         (set_init_label): Likewise for renaming of error_at_rich_loc.
863
864 2017-10-30  Richard Biener  <rguenther@suse.de>
865
866         * gimple-parser.c (c_parser_gimple_statement): Parse conditional
867         stmts.
868
869 2017-10-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
870
871         * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
872         fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
873
874 2017-10-25  David Malcolm  <dmalcolm@redhat.com>
875
876         PR c/7356
877         * c-parser.c (c_parser_declaration_or_fndef): Detect missing
878         semicolons.
879
880 2017-10-25  Jakub Jelinek  <jakub@redhat.com>
881
882         PR libstdc++/81706
883         * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
884         newdecl to corresponding __builtin_ if any.
885
886 2017-10-24  Paolo Carlini  <paolo.carlini@oracle.com>
887
888         PR c++/82466
889         * c-decl.c (diagnose_mismatched_decls): Use
890         OPT_Wbuiltin_declaration_mismatch.
891
892 2017-10-12  David Malcolm  <dmalcolm@redhat.com>
893
894         * c-parser.c (c_parser_require): Add "type_is_unique" param and
895         use it to guard calls to maybe_suggest_missing_token_insertion.
896         (c_parser_parms_list_declarator): Override default value of new
897         "type_is_unique" param to c_parser_require.
898         (c_parser_asm_statement): Likewise.
899         * c-parser.h (c_parser_require): Add "type_is_unique" param,
900         defaulting to true.
901
902 2017-10-11  Nathan Sidwell  <nathan@acm.org>
903
904         * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
905
906 2017-10-10  Richard Sandiford  <richard.sandiford@linaro.org>
907
908         * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
909         operating on trees as wide_ints.
910         * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
911         (c_tree_equal): Likewise.
912
913 2017-10-04  David Malcolm  <dmalcolm@redhat.com>
914
915         * c-decl.c (push_parm_decl): Store c_parm's location into the
916         PARAM_DECL.
917         (build_c_parm): Add "loc" param and store it within the c_parm.
918         * c-parser.c (struct c_parser): Add "last_token_location" field.
919         (c_parser_consume_token): Store location of the token into the
920         new field.
921         (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
922         when handling a FUNCTION_DECL, if it doesn't already have them.
923         (c_parser_parameter_declaration): Generate a location for the
924         parameter, and pass it to the call to build_c_parm.
925         * c-tree.h (struct c_parm): Add field "loc".
926         (build_c_parm): Add location_t param.
927         * c-typeck.c (get_fndecl_argument_location): New function.
928         (inform_for_arg): New function.
929         (convert_for_assignment): Use inform_for_arg when dealing with
930         ic_argpass.
931
932 2017-09-29  Jakub Jelinek  <jakub@redhat.com>
933
934         * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
935         width is non-NULL.
936         (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
937         don't SET_DECL_C_BIT_FIELD here.
938
939         PR c/82340
940         * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
941         instead of trying to set just TREE_READONLY manually.
942
943 2017-09-16  Tom de Vries  <tom@codesourcery.com>
944
945         PR c/81875
946         * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
947         cond itself.
948
949 2017-09-15  Joseph Myers  <joseph@codesourcery.com>
950
951         PR c/82071
952         * c-typeck.c (ep_convert_and_check): Just call convert_and_check
953         for C11.
954         (build_conditional_expr): For C11, generate result with excess
955         precision when one argument is an integer and the other is of a
956         type using excess precision.
957
958 2017-09-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
959
960         * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
961
962 2017-09-13  Marek Polacek  <polacek@redhat.com>
963
964         PR c/82167
965         * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
966         than expr.original_type.
967
968 2017-09-12  Nathan Sidwell  <nathan@acm.org>
969
970         * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
971         resort_sorted_fields): Moved from c-family/c-common.c.
972         * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
973
974 2017-09-01  Joseph Myers  <joseph@codesourcery.com>
975
976         PR c/82071
977         * c-typeck.c (build_atomic_assign): Handle argument with excess
978         precision.  Ensure any EXCESS_PRECISION_EXPR is present in
979         argument passed to build_binary_op and convert_for_assignment but
980         not for call to c_fully_fold.
981         (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
982         Ensure build_binary_op is called with argument with original
983         semantic type.  Avoid calling c_fully_fold with an
984         EXCESS_PRECISION_EXPR from build_binary_op.
985
986 2017-09-01  Jakub Jelinek  <jakub@redhat.com>
987
988         PR c/81887
989         * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
990
991 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
992             Alan Hayward  <alan.hayward@arm.com>
993             David Sherwood  <david.sherwood@arm.com>
994
995         * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
996         (c_common_type): Likewise.  Use as_a <scalar_mode> when setting
997         m1 and m2 to the signed equivalent of a fixed-point
998         SCALAR_TYPE_MODE.
999
1000 2017-08-24  David Malcolm  <dmalcolm@redhat.com>
1001
1002         * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
1003         than CAN_HAVE_LOCATION_P when determining whether to use the
1004         location_t value within "value".
1005
1006 2017-08-21  David Malcolm  <dmalcolm@redhat.com>
1007
1008         * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
1009         rather than peeking the location of the first token.
1010         * c-tree.h (c_expr::get_location): New method.
1011
1012 2017-08-21  David Malcolm  <dmalcolm@redhat.com>
1013
1014         * c-typeck.c (build_function_call_vec): Pass arg_loc to call
1015         to check_function_arguments.
1016
1017 2017-08-18  Marek Polacek  <polacek@redhat.com>
1018
1019         * c-parser.c (c_parser_postfix_expression): Remove unused code.  Update
1020         commentary.
1021
1022 2017-08-18  H.J. Lu  <hongjiu.lu@intel.com>
1023
1024         PR c/53037
1025         * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
1026         (check_bitfield_type_and_width): Don't allow bit-field with
1027         warn_if_not_aligned type.
1028
1029 2017-08-14  Martin Sebor  <msebor@redhat.com>
1030
1031         PR c/81117
1032         * c-objc-common.c (c_objc_common_init): Handle 'G'.
1033
1034 2017-08-11  Marek Polacek  <polacek@redhat.com>
1035
1036         PR c/81795
1037         * c-decl.c (pushtag): Only print inform if the warning was printed.
1038         (grokdeclarator): Likewise.
1039
1040 2017-08-10  David Malcolm  <dmalcolm@redhat.com>
1041
1042         * c-parser.c (c_parser_error): Rename to...
1043         (c_parser_error_richloc): ...this, making static, and adding
1044         "richloc" parameter, passing it to the c_parse_error call,
1045         rather than calling c_parser_set_source_position_from_token.
1046         (c_parser_error): Reintroduce, reimplementing in terms of the
1047         above, converting return type from void to bool.
1048         (class token_pair): New class.
1049         (struct matching_paren_traits): New struct.
1050         (matching_parens): New typedef.
1051         (struct matching_brace_traits): New struct.
1052         (matching_braces): New typedef.
1053         (get_matching_symbol): New function.
1054         (c_parser_require): Add param MATCHING_LOCATION, using it to
1055         highlight matching "opening" tokens for missing "closing" tokens.
1056         (c_parser_skip_until_found): Likewise.
1057         (c_parser_static_assert_declaration_no_semi): Convert explicit
1058         parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
1059         class matching_parens, so that the pertinent open parenthesis is
1060         highlighted when there are problems locating the close
1061         parenthesis.
1062         (c_parser_struct_or_union_specifier): Likewise.
1063         (c_parser_typeof_specifier): Likewise.
1064         (c_parser_alignas_specifier): Likewise.
1065         (c_parser_simple_asm_expr): Likewise.
1066         (c_parser_braced_init): Likewise, for matching_braces.
1067         (c_parser_paren_condition): Likewise, for matching_parens.
1068         (c_parser_switch_statement): Likewise.
1069         (c_parser_for_statement): Likewise.
1070         (c_parser_asm_statement): Likewise.
1071         (c_parser_asm_operands): Likewise.
1072         (c_parser_cast_expression): Likewise.
1073         (c_parser_sizeof_expression): Likewise.
1074         (c_parser_alignof_expression): Likewise.
1075         (c_parser_generic_selection): Likewise.
1076         (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
1077         RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
1078         RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
1079         In case CPP_OPEN_PAREN, pass loc_open_paren to the
1080         c_parser_skip_until_found call.
1081         (c_parser_objc_class_definition): Use class matching_parens as
1082         above.
1083         (c_parser_objc_method_decl): Likewise.
1084         (c_parser_objc_try_catch_finally_statement): Likewise.
1085         (c_parser_objc_synchronized_statement): Likewise.
1086         (c_parser_objc_at_property_declaration): Likewise.
1087         (c_parser_oacc_wait_list): Likewise.
1088         (c_parser_omp_var_list_parens): Likewise.
1089         (c_parser_omp_clause_collapse): Likewise.
1090         (c_parser_omp_clause_default): Likewise.
1091         (c_parser_omp_clause_if): Likewise.
1092         (c_parser_omp_clause_num_threads): Likewise.
1093         (c_parser_omp_clause_num_tasks): Likewise.
1094         (c_parser_omp_clause_grainsize): Likewise.
1095         (c_parser_omp_clause_priority): Likewise.
1096         (c_parser_omp_clause_hint): Likewise.
1097         (c_parser_omp_clause_defaultmap): Likewise.
1098         (c_parser_oacc_single_int_clause): Likewise.
1099         (c_parser_omp_clause_ordered): Likewise.
1100         (c_parser_omp_clause_reduction): Likewise.
1101         (c_parser_omp_clause_schedule): Likewise.
1102         (c_parser_omp_clause_num_teams): Likewise.
1103         (c_parser_omp_clause_thread_limit): Likewise.
1104         (c_parser_omp_clause_aligned): Likewise.
1105         (c_parser_omp_clause_linear): Likewise.
1106         (c_parser_omp_clause_safelen): Likewise.
1107         (c_parser_omp_clause_simdlen): Likewise.
1108         (c_parser_omp_clause_depend): Likewise.
1109         (c_parser_omp_clause_map): Likewise.
1110         (c_parser_omp_clause_device): Likewise.
1111         (c_parser_omp_clause_dist_schedule): Likewise.
1112         (c_parser_omp_clause_proc_bind): Likewise.
1113         (c_parser_omp_clause_uniform): Likewise.
1114         (c_parser_omp_for_loop): Likewise.
1115         (c_parser_cilk_clause_vectorlength): Likewise.
1116         (c_parser_cilk_clause_linear): Likewise.
1117         (c_parser_transaction_expression): Likewise.
1118         * c-parser.h (c_parser_require): Add param matching_location with
1119         default UNKNOWN_LOCATION.
1120         (c_parser_error): Convert return type from void to bool.
1121         (c_parser_skip_until_found): Add param matching_location with
1122         default UNKNOWN_LOCATION.
1123
1124 2017-08-09  Marek Polacek  <polacek@redhat.com>
1125
1126         * c-decl.c (build_enumerator): Use true/false instead of 1/0.
1127         * c-tree.h (build_external_ref): Update declaration.
1128         * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
1129         (build_external_ref): Change the type of a parameter to bool.
1130         (parser_build_binary_op): Use true/false instead of 1/0.
1131         (pointer_diff): Likewise.
1132         (build_modify_expr): Likewise.
1133         (set_designator): Change the type of a parameter to bool.
1134         (set_init_index): Use true/false instead of 1/0.
1135         (set_init_label): Likewise.
1136         (output_init_element): Change the type of a parameter to bool.
1137         (output_pending_init_elements): Use true/false instead of 1/0.
1138         (process_init_element): Likewise.
1139         (build_binary_op): Change the type of a parameter to bool.
1140
1141 2017-08-09  Marek Polacek  <polacek@redhat.com>
1142
1143         PR c/81233
1144         * c-typeck.c (pedwarn_init): Make the function take a variable list.
1145         Call emit_diagnostic_valist instead of pedwarn.
1146         (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
1147         Print the relevant types in diagnostics.
1148
1149 2017-08-09  Marek Polacek  <polacek@redhat.com>
1150
1151         PR c/81417
1152         * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
1153         build_conditional_expr. 
1154         * c-parser.c (c_parser_conditional_expression): Create locations for
1155         EXP1 and EXP2 from their source ranges.  Pass the locations down to
1156         build_conditional_expr.
1157         * c-tree.h (build_conditional_expr): Update declaration.
1158         * c-typeck.c (build_conditional_expr): Add location_t parameters.
1159         For -Wsign-compare, also print the types.
1160
1161 2017-08-08  Martin Liska  <mliska@suse.cz>
1162
1163         * c-convert.c: Include header files.
1164         * c-typeck.c: Likewise.
1165
1166 2017-08-07  Martin Liska  <mliska@suse.cz>
1167
1168         * c-parser.c (c_parser_attributes): Canonicalize name of an
1169         attribute.
1170
1171 2017-08-02  Marek Polacek  <polacek@redhat.com>
1172
1173         PR c/81289
1174         * c-parser.c (c_parser_unary_expression): Use set_error.
1175
1176         PR c/81448
1177         PR c/81306
1178         * c-warn.c (warn_for_multistatement_macros): Prevent bogus
1179         warnings.  Avoid walking MACRO_MAP_LOCATIONS.
1180
1181 2017-07-31  Jan Hubicka <hubicka@ucw.cz>
1182             Martin Liska  <mliska@suse.cz>
1183
1184         * c-typeck.c (c_finish_goto_label): Build gimple predict
1185         statement.
1186
1187 2017-07-31  Martin Liska  <mliska@suse.cz>
1188
1189         PR sanitize/81530
1190         * c-convert.c (convert): Guard condition with flag_sanitize_p
1191         also with current_function_decl non-null equality.
1192         * c-decl.c (grokdeclarator): Likewise.
1193         * c-typeck.c (build_binary_op): Likewise.
1194
1195 2017-07-25  Marek Polacek  <polacek@redhat.com>
1196
1197         * c-decl.c (grokfield): Remove local variable.
1198
1199 2017-07-25  Marek Polacek  <polacek@redhat.com>
1200
1201         PR c/81364
1202         * c-parser.c (c_parser_else_body): Don't warn about multistatement
1203         macro expansion if the body is in { }.
1204         (c_parser_while_statement): Likewise.
1205         (c_parser_for_statement): Likewise.
1206
1207 2017-07-18  Nathan Sidwell  <nathan@acm.org>
1208
1209         * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
1210
1211 2017-07-14  David Malcolm  <dmalcolm@redhat.com>
1212
1213         * c-decl.c (implicitly_declare): When suggesting a missing
1214         #include, provide a fix-it hint.
1215
1216 2017-07-06  David Malcolm  <dmalcolm@redhat.com>
1217
1218         * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
1219         and call that instead.
1220         * c-tree.h (selftest::run_c_tests): New decl.
1221
1222 2017-06-26  Marek Polacek  <polacek@redhat.com>
1223
1224         PR c/80116
1225         * c-parser.c (c_parser_if_body): Set the location of the
1226         body of the conditional after parsing all the labels.  Call
1227         warn_for_multistatement_macros.
1228         (c_parser_else_body): Likewise.
1229         (c_parser_switch_statement): Likewise.
1230         (c_parser_while_statement): Likewise.
1231         (c_parser_for_statement): Likewise.
1232         (c_parser_statement): Add a default argument.  Save the location
1233         after labels have been parsed.
1234         (c_parser_c99_block_statement): Likewise.
1235
1236 2017-06-19  Richard Biener  <rguenther@suse.de>
1237
1238         * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1239         negated _Literals to parse _Literal (int) -1.
1240
1241 2017-06-13  Martin Liska  <mliska@suse.cz>
1242
1243         PR sanitize/78204
1244         * c-convert.c (convert): Use sanitize_flags_p.
1245         * c-decl.c (grokdeclarator): Likewise.
1246         * c-typeck.c (convert_for_assignment): Likewise.
1247         (c_finish_return): Likewise.
1248         (build_binary_op): Likewise.
1249
1250 2017-06-08  Jakub Jelinek  <jakub@redhat.com>
1251
1252         PR c/81006
1253         * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
1254         to sizetype before size_binop.
1255
1256 2017-06-07  Jakub Jelinek  <jakub@redhat.com>
1257
1258         * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
1259         of TDI_generic.
1260
1261 2017-06-06  Marek Polacek  <polacek@redhat.com>
1262
1263         PR c/79983
1264         * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
1265         ref.
1266         (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
1267
1268 2017-06-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1269
1270         * c-parser.c (c_parser_binary_expression): Implement the
1271         -Wsizeof_pointer_div warning.
1272         (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
1273         from a parenthesized expression.
1274         (c_parser_expr_list): Use c_last_sizeof_loc.
1275         * c-tree.h (c_last_sizeof_loc): New external.
1276         * c-typeck.c (c_last_sizeof_loc): New variable.
1277         (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
1278
1279 2017-05-31  Mikhail Maltsev  <maltsevm@gmail.com>
1280
1281         PR testsuite/80580
1282         * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
1283
1284 2017-05-30  David Malcolm  <dmalcolm@redhat.com>
1285
1286         * c-objc-common.c (c_tree_printer): Gain bool and const char **
1287         parameters.
1288
1289 2017-05-24  Martin Sebor  <msebor@redhat.com>
1290
1291         PR c/80731
1292         * c-fold.c (c_fully_fold_internal): Adjust.
1293         * c-typeck.c (parser_build_unary_op): Adjust.
1294
1295 2017-05-23  Thomas Schwinge  <thomas@codesourcery.com>
1296
1297         * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
1298         "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
1299         "VECTOR_LENGTH".
1300
1301 2017-05-23  Marek Polacek  <polacek@redhat.com>
1302
1303         * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
1304         quotes.
1305
1306 2017-05-22  Jakub Jelinek  <jakub@redhat.com>
1307
1308         * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
1309         result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
1310         it returned invariant.  Call tree_invariant_p unconditionally
1311         afterwards to decide whether to return expr or op0.
1312
1313 2017-05-22  Nathan Sidwell  <nathan@acm.org>
1314
1315         * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
1316
1317 2017-05-19  Thomas Schwinge  <thomas@codesourcery.com>
1318
1319         * c-parser.c (c_parser_omp_clause_default): Handle
1320         "OMP_CLAUSE_DEFAULT_PRESENT".
1321
1322 2017-05-18  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1323
1324         * config-lang.in (gtfiles): Add c-family/c-format.c.
1325
1326 2017-05-18  Nathan Sidwell  <nathan@acm.org>
1327
1328         * c-decl.c (pushdecl_top_level): Delete unused function.
1329
1330 2017-05-18  Marek Polacek  <polacek@redhat.com>
1331
1332         * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
1333         (check_earlier_gotos): Likewise.
1334         (define_label): Likewise.
1335         (pending_xref_error): Likewise.
1336         (smallest_type_quals_location): Likewise.
1337         (grokdeclarator): Likewise.
1338         (grokparms): Likewise.
1339         (identifier_global_value): Likewise.
1340         * c-typeck.c (set_nonincremental_init_from_string): Likewise.
1341         (find_init_member): Likewise.
1342
1343 2017-05-18  Marek Polacek  <polacek@redhat.com>
1344
1345         * c-decl.c (start_decl): Use false/true instead of 0/1.
1346         (grokdeclarator): Likewise.
1347         (finish_struct): Likewise.
1348         (start_function): Change the return type to bool.  Use false/true
1349         instead of 0/1.
1350         (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
1351         * c-tree.h (start_function): Update.
1352         * c-typeck.c (same_translation_unit_p): Change the return type to bool.
1353         (set_designator): Change the return type to bool.  Use false/true
1354         instead of 0/1.
1355
1356 2017-05-17  Marek Polacek  <polacek@redhat.com>
1357
1358         * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
1359         * c-typeck.c: Likewise.
1360
1361 2017-05-17  Marek Polacek  <polacek@redhat.com>
1362
1363         PR sanitizer/80659
1364         * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
1365         DECL_IGNORED_P even for non-static compound literals.
1366
1367 2017-05-17  Martin Liska  <mliska@suse.cz>
1368
1369         * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1370         use it instead of int type.
1371
1372 2017-05-17  Marek Polacek  <polacek@redhat.com>
1373
1374         * c-convert.c (convert): Replace c_save_expr with save_expr.  Don't
1375         call c_fully_fold.
1376         (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
1377         * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr. 
1378         * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1379         * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1380         save_expr.
1381         (c_parser_conditional_expression): Likewise.
1382         * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1383         * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1384         (process_init_element): Likewise.
1385         (build_binary_op): Likewise.
1386         (handle_omp_array_sections_1): Likewise.
1387
1388 2017-05-12  Thomas Schwinge  <thomas@codesourcery.com>
1389
1390         * c-parser.c (c_parser_omp_clause_num_gangs)
1391         (c_parser_omp_clause_num_workers)
1392         (c_parser_omp_clause_vector_length): Merge functions into...
1393         (c_parser_oacc_single_int_clause): ... this new function.  Adjust
1394         all users.
1395
1396 2017-05-11  Nathan Sidwell  <nathan@acm.org>
1397
1398         * gimple-parser.c: Don't #include tree-dump.h.
1399
1400 2017-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
1401
1402         PR testsuite/80580
1403         * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
1404
1405 2017-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
1406
1407         PR testsuite/80580
1408         * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1409         incorrect __MEM syntax.
1410
1411 2017-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
1412
1413         PR testsuite/80580
1414         * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1415         type of unary '*'.
1416
1417 2017-05-09  Nathan Sidwell  <nathan@acm.org>
1418
1419         * c-tree.h (pushdecl): Declare.
1420
1421 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
1422
1423         * c-decl.c (warn_defaults_to): Replace report_diagnostic
1424         with diagnostic_report_diagnostic.
1425         * c-errors.c (pedwarn_c99): Likewise.
1426         (pedwarn_c90): Likewise.
1427
1428 2017-05-01  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>
1429
1430         PR c++/80038
1431         * c-gimplify.c (c_gimplify_expr): Remove calls to
1432         cilk_gimplifY_call_params_in_spawned_fn.
1433
1434 2017-04-25  David Malcolm  <dmalcolm@redhat.com>
1435
1436         * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1437         hint for removing extra semicolon.
1438
1439 2017-04-21  Jakub Jelinek  <jakub@redhat.com>
1440
1441         PR c/80468
1442         * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
1443         enabled, set specs->type to integer_type_node.
1444
1445 2017-04-03  Jonathan Wakely  <jwakely@redhat.com>
1446
1447         * c-array-notation.c: Fix typo in comment.
1448
1449 2017-03-29  Marek Polacek  <polacek@redhat.com>
1450
1451         PR c/79730
1452         * c-decl.c (finish_decl): Check VAR_P.
1453
1454 2017-03-27  Jakub Jelinek  <jakub@redhat.com>
1455
1456         PR middle-end/80162
1457         * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1458         * c-typeck.c (c_mark_addressable): Likewise.  Look through
1459         VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1460         to ARRAY_TYPE.
1461         (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
1462
1463 2017-03-23  Marek Polacek  <polacek@redhat.com>
1464
1465         * c-tree.h: Remove a C_RID_YYCODE reference.
1466
1467 2017-03-21  Jakub Jelinek  <jakub@redhat.com>
1468
1469         PR c/80097
1470         * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
1471         optional COMPOUND_EXPR with ubsan instrumentation.
1472
1473 2017-03-17  Marek Polacek  <polacek@redhat.com>
1474
1475         * c-parser.c: Add C11 references.
1476
1477 2017-03-15  Marek Polacek  <polacek@redhat.com>
1478
1479         * c-parser.c (c_parser_enum_specifier): Remove redundant line.
1480
1481 2017-03-11  Marek Polacek  <polacek@redhat.com>
1482
1483         * c-decl.c (implicit_decl_warning): Add a comment.  Fix formatting.
1484
1485 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
1486
1487         PR translation/79848
1488         * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1489         "%qs".
1490         * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1491
1492 2017-03-09  Marek Polacek  <polacek@redhat.com>
1493
1494         PR sanitizer/79757
1495         * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1496         parameter declarations with initializers.
1497
1498 2017-03-09  Jakub Jelinek  <jakub@redhat.com>
1499
1500         PR c/79969
1501         * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
1502         TYPE_STUB_DECL.
1503
1504 2017-03-07  Jakub Jelinek  <jakub@redhat.com>
1505
1506         PR c/79834
1507         * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1508         for "may only be used in compound statements" diagnostics, change it
1509         such that the same translatable string is used for all pragmas.  For
1510         PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1511         diagnostics.
1512         (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1513         c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1514         "may only be used in compound statements" diagnostics, such that the
1515         same translatable string is used for all pragmas.
1516
1517 2017-03-04  Marek Polacek  <polacek@redhat.com>
1518
1519         PR c/79847
1520         * c-decl.c (implicit_decl_warning): Add missing space.
1521
1522 2017-03-03  Marek Polacek  <polacek@redhat.com>
1523
1524         PR c/79758
1525         * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1526         current_function_prototype_arg_types is error_mark_node.  Fix
1527         formatting.  Use TREE_VALUE instead of TREE_TYPE.
1528
1529 2017-03-03  Jakub Jelinek  <jakub@redhat.com>
1530
1531         PR c/79837
1532         * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1533         %<min%> or %<max%> in the diagnostics, instead mention identifier.
1534         (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1535         diagnostics.
1536
1537         PR c/79836
1538         * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1539         instead of %<_Generic>.
1540         (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1541         (c_parser_omp_target_exit_data): Use %<release%> instead of
1542         %<release>.
1543
1544 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
1545
1546         * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1547         instead of just cond ? "..." : "...".
1548         (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1549         for "enter"/"exit" keyword.
1550         (c_finish_oacc_routine): Don't use %s to supply portions of the
1551         message.
1552
1553 2017-02-24  Jakub Jelinek  <jakub@redhat.com>
1554
1555         PR c++/79588
1556         * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1557         handle -Wrestrict here.
1558         * c-typeck.c (build_function_call_vec): Adjust
1559         check_function_arguments caller.
1560
1561 2017-02-23  Richard Biener  <rguenther@suse.de>
1562
1563         PR c/79684
1564         * gimple-parser.c (c_parser_gimple_statement): Use set_error
1565         to initialize c_exprs to return.
1566         (c_parser_gimple_binary_expression): Likewise.
1567         (c_parser_gimple_unary_expression): Likewise.
1568         (c_parser_gimple_postfix_expression): Likewise.
1569
1570 2017-02-22  Marek Polacek  <polacek@redhat.com>
1571
1572         PR c/79662
1573         * c-typeck.c (convert_arguments): Handle error_mark_node.
1574
1575 2017-02-19  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1576
1577         * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1578         value of c_parser_parse_ssa_name against error_mark_node and emit
1579         error if ssa name is anonymous and written as default definition.
1580
1581 2017-02-19  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1582
1583         * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1584         FMA_EXPR.
1585
1586 2017-02-16  Jakub Jelinek  <jakub@redhat.com>
1587
1588         PR c++/79512
1589         * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1590         ignore #pragma omp target even when not followed by identifier.
1591
1592 2017-02-14  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1593
1594         * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1595         (c_parser_gimple_unary_expression): Likewise.
1596
1597 2017-02-13  Jakub Jelinek  <jakub@redhat.com>
1598
1599         * c-parser.c (c_parser_oacc_declare): Add missing space in
1600         diagnostics.
1601
1602 2017-02-13  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1603
1604         PR c/79478
1605         * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1606         set_c_expr_source_range when parsing ssa-name.
1607
1608 2017-02-10  Prasad Ghangal  <prasad.ghangal@gmail.com>
1609         Richard Biener  <rguenther@suse.de>
1610
1611         * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1612         building IL when arguments are error_mark_node.
1613         (c_parser_gimple_unary_expression): Likewise.
1614         (c_parser_gimple_if_stmt): Likewise.
1615         (c_parser_gimple_switch_stmt): Likewise.
1616         (c_parser_gimple_return_stmt): Likewise.
1617         (c_parser_parse_ssa_name): When name lookup fails do not build
1618         an SSA name.  Use undeclared rather than not declared in error
1619         reporting.
1620
1621 2017-02-09  Marek Polacek  <polacek@redhat.com>
1622
1623         PR c/79428
1624         * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1625         instead of c_parser_skip_until_found.
1626
1627 2017-02-09  Jakub Jelinek  <jakub@redhat.com>
1628
1629         PR c/79431
1630         * c-parser.c (c_parser_omp_declare_target): Don't invoke
1631         symtab_node::get on automatic variables.
1632
1633 2016-02-09  Nathan Sidwell  <nathan@codesourcery.com>
1634             Chung-Lin Tang  <cltang@codesourcery.com>
1635
1636         * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1637         (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1638         semantic checking.
1639         * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1640
1641 2017-02-07  Richard Biener  <rguenther@suse.de>
1642
1643         * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1644         (c_parser_gimple_postfix_expression_after_primary):
1645         Do not use c_build_function_call_vec to avoid folding and promotion.
1646         Simplify.
1647
1648 2017-01-25  Maxim Ostapenko  <m.ostapenko@samsung.com>
1649
1650         PR lto/79061
1651         * c-decl.c (pop_scope): Pass main_input_filename to
1652         build_translation_unit_decl.
1653
1654 2017-01-24  David Malcolm  <dmalcolm@redhat.com>
1655
1656         * c-parser.c: Include "read-rtl-function.h" and
1657         "run-rtl-passes.h".
1658         (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
1659         grammar to gimple-or-rtl-pass-list.  Add rtl-function-definition
1660         production.  Update for renaming of field "gimple_pass" to
1661         "gimple_or_rtl_pass".  If __RTL was seen, call
1662         c_parser_parse_rtl_body.  Convert a timevar_push/pop pair
1663         to an auto_timevar, to cope with early exit.
1664         (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1665         field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1666         c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1667         Handle RID_RTL.
1668         (c_parser_parse_rtl_body): New function.
1669         * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1670         (struct c_declspecs): Rename field "gimple_pass" to
1671         "gimple_or_rtl_pass".  Add field "rtl_p".
1672         * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1673         (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1674         * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1675         (c_parser_gimple_or_rtl_pass_list): ...this.
1676
1677 2017-01-20  Marek Polacek  <polacek@redhat.com>
1678
1679         PR c/64279
1680         * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1681
1682 2017-01-13  Richard Biener  <rguenther@suse.de>
1683
1684         * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1685         nops.
1686
1687 2017-01-13  Richard Biener  <rguenther@suse.de>
1688
1689         * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1690         _Literal ( type-name ) number.
1691
1692 2017-01-12  Richard Biener  <rguenther@suse.de>
1693
1694         * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1695         __MEM.
1696
1697 2017-01-11  Jakub Jelinek  <jakub@redhat.com>
1698
1699         PR c++/72813
1700         * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
1701         PCH file.
1702
1703 2017-01-11  Richard Biener  <rguenther@suse.de>
1704
1705         PR bootstrap/79052
1706         * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
1707         returns on parse errors.
1708
1709 2017-01-04  Marek Polacek  <polacek@redhat.com>
1710
1711         PR c++/64767
1712         * c-parser.c (c_parser_postfix_expression): Mark zero character
1713         constants by setting original_type in c_expr.
1714         * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
1715         with a zero character constant.
1716         (char_type_p): New function.
1717
1718 2017-01-04  David Malcolm  <dmalcolm@redhat.com>
1719
1720         * c-parser.c (c_parser_declaration_or_fndef): Create a
1721         rich_location at init_loc and parse it to start_init.
1722         (last_init_list_comma): New global.
1723         (c_parser_braced_init): Update last_init_list_comma when parsing
1724         commas.  Pass it to pop_init_level.  Pass location of closing
1725         brace to pop_init_level.
1726         (c_parser_postfix_expression_after_paren_type): Create a
1727         rich_location at type_loc and parse it to start_init.
1728         (c_parser_omp_declare_reduction): Likewise for loc.
1729         * c-tree.h (start_init): Add rich_location * param.
1730         (pop_init_level): Add location_t param.
1731         * c-typeck.c (struct initializer_stack): Add field
1732         "missing_brace_richloc".
1733         (start_init): Add richloc param, use it to initialize
1734         the stack node's missing_brace_richloc.
1735         (last_init_list_comma): New decl.
1736         (finish_implicit_inits): Pass last_init_list_comma to
1737         pop_init_level.
1738         (push_init_level): When finding missing open braces, add fix-it
1739         hints to the richloc.
1740         (pop_init_level): Add "insert_before" param and pass it
1741         when calling pop_init_level.  Add fixits about missing
1742         close braces to any richloc.  Use the richloc for the
1743         -Wmissing-braces warning.
1744         (set_designator): Pass last_init_list_comma to pop_init_level.
1745         (process_init_element): Likewise.
1746
1747 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
1748
1749         Update copyright years.
1750
1751 2016-12-21  Jakub Jelinek  <jakub@redhat.com>
1752
1753         PR bootstrap/78817
1754         * c-typeck.c (build_function_call_vec): If check_function_arguments
1755         returns true, set TREE_NO_WARNING on CALL_EXPR.
1756
1757         PR c/77767
1758         * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
1759         to *expr instead of overwriting it.
1760
1761 2016-12-20  Richard Biener  <rguenther@suse.de>
1762
1763         * gimple-parser.c (c_parser_gimple_compound_statement): Improve
1764         error recovery.
1765         (c_parser_gimple_statement): Only build assigns for non-error
1766         stmts.
1767         (c_parser_gimple_postfix_expression_after): Improve error recovery.
1768
1769 2016-12-14  Martin Jambor  <mjambor@suse.cz>
1770
1771         * c-parser.c: Include omp-general.h and omp-offload.h instead of
1772         omp-low.h.
1773         (c_finish_oacc_routine): Adjusted call to
1774         get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
1775         to use their new names.
1776         (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
1777         use its new name.
1778         (c_parser_oacc_update): Likewise.
1779         (c_parser_omp_simd): Likewise.
1780         (c_parser_omp_target_update): Likewise.
1781         * c-typeck.c: Include omp-general.h instead of omp-low.h.
1782         (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
1783         name.
1784         (c_finish_omp_cancellation_point): Likewise.
1785         * gimple-parser.c: Do not include omp-low.h
1786
1787 2016-12-02  Cesar Philippidis  <cesar@codesourcery.com>
1788             James Norris  <jnorris@codesourcery.com>
1789
1790         * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
1791         EXIT_DATA,WAIT} are not used in compound statements.
1792         (c_parser_oacc_enter_exit_data): Update diagnostics.
1793
1794 2016-11-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1795
1796         PR c++/71973
1797         * c-decl.c (diagnose_mismatched_decls): Use
1798         OPT_Wbuiltin_declaration_mismatch here too.
1799
1800 2016-11-18  Richard Sandiford  <richard.sandiford@arm.com>
1801             Alan Hayward  <alan.hayward@arm.com>
1802             David Sherwood  <david.sherwood@arm.com>
1803
1804         * c-decl.c (merge_decls): Use SET_DECL_MODE.
1805         (make_label, finish_struct): Likewise.
1806
1807 2016-11-14  Prasad Ghangal  <prasad.ghangal@gmail.com>
1808             Richard Biener  <rguenther@suse.de>
1809
1810         * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
1811         * config-lang.in (gtfiles): Add c/c-parser.h.
1812         * c-tree.h (enum c_declspec_word): Add cdw_gimple.
1813         (struct c_declspecs): Add gimple_pass member and gimple_p flag.
1814         * c-parser.c (enum c_id_kind, struct c_token,
1815         c_parser_next_token_is, c_parser_next_token_is_not,
1816         c_parser_next_token_is_keyword,
1817         enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
1818         Split out to ...
1819         * c-parser.h: ... new header.
1820         * c-parser.c: Include c-parser.h and gimple-parser.h.
1821         (c_parser_peek_token, c_parser_peek_2nd_token,
1822         c_token_starts_typename, c_parser_next_token_starts_declspecs,
1823         c_parser_next_tokens_start_declaration, c_parser_consume_token,
1824         c_parser_error, c_parser_require, c_parser_skip_until_found,
1825         c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1826         c_parser_type_name): Export.
1827         (c_parser_tokens_buf): New function.
1828         (c_parser_error): Likewise.
1829         (c_parser_set_error): Likewise.
1830         (c_parser_declspecs): Handle RID_GIMPLE.
1831         (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
1832         via c_parser_parse_gimple_body.
1833         * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
1834         c_token_starts_typename, c_parser_next_token_starts_declspecs,
1835         c_parser_next_tokens_start_declaration, c_parser_consume_token,
1836         c_parser_error, c_parser_require, c_parser_skip_until_found,
1837         c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1838         c_parser_type_name): Declare.
1839         (struct c_parser): Declare forward.
1840         (c_parser_tokens_buf): Declare.
1841         (c_parser_error): Likewise.
1842         (c_parser_set_error): Likewise.
1843         * gimple-parser.c: New file.
1844         * gimple-parser.h: Likewise.
1845
1846 2016-11-13  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1847
1848         PR c/35503
1849         * c-parser.c (c_parser_postfix_expression_after_primary): Call
1850         warn_for_restrict.
1851
1852 2016-09-11  Le-Chun Wu  <lcwu@google.com>
1853             Mark Wielaard  <mjw@redhat.com>
1854
1855         * c-decl.c (warn_if_shadowing): Use the warning code corresponding
1856         to the given -Wshadow= variant.
1857
1858 2016-10-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
1859
1860         * c-typeck.c: Include memmodel.h.
1861
1862 2016-10-13  Jakub Jelinek  <jakub@redhat.com>
1863
1864         PR target/77957
1865         * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
1866         instead of lhd_return_null_tree_v.
1867
1868 2016-10-07  Bernd Schmidt  <bschmidt@redhat.com>
1869
1870         PR c++/69733
1871         * c-decl.c (smallest_type_quals_location): New static function.
1872         (grokdeclarator): Try to find the correct location for an ignored
1873         qualifier.
1874
1875 2016-09-26  Marek Polacek  <polacek@redhat.com>
1876
1877         PR c/7652
1878         * c-decl.c (pop_scope): Add gcc_fallthrough.
1879
1880 2016-09-26  Marek Polacek  <polacek@redhat.com>
1881
1882         PR c/7652
1883         * c-parser.c (struct c_token): Add flags field.
1884         (c_lex_one_token): Pass it to c_lex_with_flags.
1885         (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
1886         into IFN_FALLTHROUGH.
1887         (c_parser_label): Set FALLTHROUGH_LABEL_P on labels.  Handle
1888         attribute fallthrough after a case label or default label.
1889         (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
1890
1891 2016-09-24  Marek Polacek  <polacek@redhat.com>
1892
1893         PR c/77490
1894         * c-typeck.c (build_unary_op): Warn about bit not on expressions that
1895         have boolean value.  Warn about ++/-- on booleans.
1896
1897 2016-09-23  Jakub Jelinek  <jakub@redhat.com>
1898
1899         * c-parser.c (incomplete_record_decls): Remove unnecessary
1900         = vNULL initialization of file scope vec.
1901
1902 2016-09-16  Marek Polacek  <polacek@redhat.com>
1903
1904         * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
1905
1906 2016-09-14  Marek Polacek  <polacek@redhat.com>
1907
1908         * c-array-notation.c (create_cmp_incr): Use false instead of 0.
1909         (fix_array_notation_expr): Likewise.
1910         * c-decl.c (finish_decl): Likewise.
1911         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1912         * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
1913         (function_to_pointer_conversion): Use false instead of 0.
1914         (convert_lvalue_to_rvalue): Likewise.
1915         (parser_build_unary_op): Likewise.
1916         (build_atomic_assign): Likewise.
1917         (build_unary_op): Change nonconvert parameter type to bool, use
1918         true/false instead of 1/0.
1919         (build_binary_op): Use true instead of 1.
1920
1921 2016-09-13  David Malcolm  <dmalcolm@redhat.com>
1922
1923         * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
1924         of add_fixit_insert to add_fixit_insert_before.
1925
1926 2016-09-13  Marek Polacek  <polacek@redhat.com>
1927
1928         * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT.  Use
1929         it.
1930
1931 2016-09-12  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1932
1933         PR c++/77496
1934         * c-parser.c (c_parser_conditional_expression): Pass the rightmost
1935         COMPOUND_EXPR to warn_for_omitted_condop.
1936
1937 2016-09-07  David Malcolm  <dmalcolm@redhat.com>
1938
1939         * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
1940         c_get_substring_location for this new langhook.
1941
1942 2016-09-02  Jakub Jelinek  <jakub@redhat.com>
1943
1944         PR c/65467
1945         * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
1946         flag_openmp.
1947         (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
1948         instead of mark_exp_read on low_bound/length expression.
1949         (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
1950         c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1951         c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1952         c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
1953         c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
1954         c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
1955         c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
1956         c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
1957         c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
1958         c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
1959         instead of mark_expr_read.
1960         (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
1961         * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1962         LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
1963         * c-tree.h (c_omp_clause_copy_ctor): New prototype.
1964         * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
1965         array section bases outside of depend clause, for depend clause
1966         use convert_lvalue_to_rvalue on the base.
1967         (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
1968         linear, aligned, map, to and from clauses.
1969         (c_omp_clause_copy_ctor): New function.
1970
1971 2016-09-01  Marek Polacek  <polacek@redhat.com>
1972
1973         PR c/7652
1974         * c-typeck.c (composite_type): Add FALLTHRU comment.
1975
1976 2016-08-31  David Malcolm  <dmalcolm@redhat.com>
1977
1978         * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
1979         to the insertion fixits for "struct", "union", and "enum".
1980
1981 2016-08-30  David Malcolm  <dmalcolm@redhat.com>
1982
1983         * c-decl.c (implicit_decl_warning): Use add_fixit_replace
1984         rather than add_fixit_misspelled_id.
1985         (undeclared_variable): Likewise.
1986         * c-parser.c (c_parser_declaration_or_fndef): Likewise.  Remove
1987         now-redundant "here" params from add_fixit_insert method calls.
1988         (c_parser_parameter_declaration): Likewise.
1989         * c-typeck.c (build_component_ref): Remove now-redundant range
1990         param from add_fixit_replace method calls.
1991
1992 2016-08-25  Marek Polacek  <polacek@redhat.com>
1993
1994         * c-typeck.c (parser_build_binary_op): Pass LHS to
1995         warn_logical_not_parentheses.
1996
1997 2016-08-25  Marek Polacek  <polacek@redhat.com>
1998
1999         PR c/77323
2000         * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
2001         or _FloatN or _FloatNx is not supported.
2002         (finish_declspecs): Set type to integer_type_node when _FloatN or
2003         _FloatNx is not supported.
2004
2005 2016-08-19  Joseph Myers  <joseph@codesourcery.com>
2006
2007         PR c/32187
2008         * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
2009         (struct c_declspecs): Add field floatn_nx_idx.
2010         * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
2011         and _FloatNx type specifiers.
2012         * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
2013         (c_parser_declspecs, c_parser_attribute_any_word)
2014         (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
2015         * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
2016         (convert_arguments): Avoid promoting _FloatN and _FloatNx types
2017         narrower than double.
2018
2019 2016-08-12  Jakub Jelinek  <jakub@redhat.com>
2020             Martin Liska  <mliska@suse.cz>
2021
2022         PR c/67410
2023         * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
2024         % to determine val element to change.  Assert that
2025         wchar_bytes * charwidth fits into val array.
2026
2027 2016-08-12  Marek Polacek  <polacek@redhat.com>
2028
2029         PR c/7652
2030         * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
2031         (c_parser_postfix_expression): Likewise.
2032         * c-typeck.c (build_unary_op): Adjust fall through comment.
2033         (c_mark_addressable): Likewise.
2034
2035 2016-08-11  Jakub Jelinek  <jakub@redhat.com>
2036
2037         PR c/72816
2038         * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
2039         array member through typedef, for orig_qual_indirect == 0 clear
2040         orig_qual_type.
2041
2042 2016-08-08  David Malcolm  <dmalcolm@redhat.com>
2043
2044         PR c/64955
2045         * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
2046         this up to selftest::run_c_tests.
2047         (selftest::run_c_tests): New function.
2048
2049 2016-08-04  Thomas Schwinge  <thomas@codesourcery.com>
2050
2051         * c-parser.c (struct oacc_routine_data): Add error_seen and
2052         fndecl_seen members.
2053         (c_finish_oacc_routine): Use these.
2054         (c_parser_declaration_or_fndef): Adjust.
2055         (c_parser_oacc_routine): Likewise.  Support more C language
2056         constructs, and improve diagnostics.  Move pragma context
2057         checking...
2058         (c_parser_pragma): ... here.
2059
2060         * c-parser.c (struct oacc_routine_data): New.
2061         (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
2062         Simplify code.
2063         (c_finish_oacc_routine): Likewise.  Don't attach clauses to "omp
2064         declare target" attribute.
2065
2066 2016-08-01  Jan Beulich  <jbeulich@suse.com>
2067
2068         * c-fold.c (c_fully_fold_internal): Also emit shift count
2069         warnings for vector types.
2070         * c-typeck.c (build_binary_op): Likewise.
2071
2072 2016-07-29  Marek Polacek  <polacek@redhat.com>
2073
2074         PR c/71742
2075         * c-decl.c (finish_struct): Rephrase an error message.
2076
2077         PR c/71853
2078         * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
2079         to error node for invalid code.
2080
2081         PR c/71573
2082         * c-decl.c (implicitly_declare): Return decl early not only for
2083         error_mark_nodes, but for anything that is not a FUNCTION_DECL.
2084
2085 2016-07-29  Jakub Jelinek  <jakub@redhat.com>
2086
2087         PR c/71969
2088         * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
2089         on GNU extern inline functions.
2090
2091 2016-07-29  Marek Polacek  <polacek@redhat.com>
2092
2093         PR c/71583
2094         * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
2095         check expr.value.
2096
2097 2016-07-22  Uros Bizjak  <ubizjak@gmail.com>
2098
2099         * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
2100
2101 2016-07-20  David Malcolm  <dmalcolm@redhat.com>
2102
2103         * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
2104         spellcheck-tree.h
2105         (best_macro_match): Likewise, converting from a typedef to a
2106         subclass.
2107         (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
2108         (lookup_name_fuzzy): Update for change of best_macro_match to a
2109         subclass with a ctor that calls cpp_forall_identifiers.
2110
2111 2016-07-20  David Malcolm  <dmalcolm@redhat.com>
2112
2113         * c-decl.c (implicit_decl_warning): Update for conversion of
2114         return type of lookup_name_fuzzy to const char *.
2115         (undeclared_variable): Likewise.
2116         (lookup_name_fuzzy): Convert return type from tree to
2117         const char *.
2118         * c-parser.c (c_parser_declaration_or_fndef): Update for
2119         conversion of return type of lookup_name_fuzzy to const char *.
2120         (c_parser_parameter_declaration): Likewise.
2121
2122 2016-07-15  Cesar Philippidis  <cesar@codesourcery.com>
2123
2124         * c-parser.c (c_parser_oacc_declare): Don't scan for
2125         GOMP_MAP_POINTER.
2126         * c-typeck.c (handle_omp_array_sections): Mark data clauses with
2127         GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
2128         zero-length subarrays.
2129
2130 2016-07-15  Jakub Jelinek  <jakub@redhat.com>
2131
2132         PR c/71858
2133         * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
2134         instead of FUZZY_LOOKUP_NAME.
2135         (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
2136         FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
2137
2138 2016-07-14  Jakub Jelinek  <jakub@redhat.com>
2139
2140         PR c/71858
2141         * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
2142
2143 2016-07-12  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
2144
2145         * c-parser.c (c_parser_generic_selection): Make type of variable
2146         auto_vec.
2147         (c_parser_omp_declare_simd): Likewise.
2148
2149 2016-07-12  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
2150
2151         * c-decl.c (struct c_struct_parse_info): Change member types
2152         from vec to auto_vec.
2153         (start_struct): Adjust.
2154         (finish_struct): Likewise.
2155
2156 2016-07-02  Jakub Jelinek  <jakub@redhat.com>
2157
2158         PR c/71719
2159         * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
2160
2161 2016-06-29  Thomas Schwinge  <thomas@codesourcery.com>
2162
2163         * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
2164         Move pragma context checking into...
2165         (c_parser_omp_cancellation_point): ... here, and improve
2166         diagnostic messages.
2167         * c-typeck.c (c_finish_omp_cancel)
2168         (c_finish_omp_cancellation_point): Improve diagnostic messages.
2169
2170 2016-06-29  Jakub Jelinek  <jakub@redhat.com>
2171
2172         PR c/71685
2173         * c-typeck.c (c_build_qualified_type): Don't clear
2174         C_TYPE_INCOMPLETE_VARS for the main variant.
2175
2176 2016-06-28  Martin Sebor  <msebor@redhat.com>
2177
2178         PR c/71552
2179         * c-typeck.c (output_init_element): Diagnose incompatible types
2180         before non-constant initializers.
2181
2182 2016-06-28  Jakub Jelinek  <jakub@redhat.com>
2183
2184         * Make-lang.in: Don't cat ../stage_current if it does not exist.
2185
2186 2016-06-23  Andi Kleen  <ak@linux.intel.com>
2187
2188         * Make-lang.in: Add support for autofdo.
2189
2190 2016-06-22  David Malcolm  <dmalcolm@redhat.com>
2191
2192         PR c/70339
2193         * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
2194         (implicit_decl_warning): When issuing warnings for implicit
2195         declarations, attempt to provide a suggestion via
2196         lookup_name_fuzzy.
2197         (undeclared_variable): Likewise when issuing errors.
2198         (lookup_name_in_scope): Likewise.
2199         (struct edit_distance_traits<cpp_hashnode *>): New struct.
2200         (best_macro_match): New typedef.
2201         (find_closest_macro_cpp_cb): New function.
2202         (lookup_name_fuzzy): New function.
2203         * c-parser.c: Include gcc-rich-location.h.
2204         (c_token_starts_typename): Split out case CPP_KEYWORD into...
2205         (c_keyword_starts_typename): ...this new function.
2206         (c_parser_declaration_or_fndef): When issuing errors about
2207         missing "struct" etc, add a fixit.  For other kinds of errors,
2208         attempt to provide a suggestion via lookup_name_fuzzy.
2209         (c_parser_parms_declarator): When looking ahead to detect typos in
2210         type names, also reject CPP_KEYWORD.
2211         (c_parser_parameter_declaration): When issuing errors about
2212         unknown type names, attempt to provide a suggestion via
2213         lookup_name_fuzzy.
2214         * c-tree.h (c_keyword_starts_typename): New prototype.
2215
2216 2016-06-20  Joseph Myers  <joseph@codesourcery.com>
2217
2218         PR c/71601
2219         * c-typeck.c (build_conditional_expr): Return error_mark_node if
2220         c_common_type returns error_mark_node.
2221
2222 2016-06-19  Martin Sebor  <msebor@redhat.com>
2223
2224         PR c/69507
2225         * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
2226         __alignof__ (expression).
2227
2228 2016-06-14  David Malcolm  <dmalcolm@redhat.com>
2229
2230         * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
2231
2232 2016-06-14  David Malcolm  <dmalcolm@redhat.com>
2233
2234         * c-typeck.c (build_component_ref): Simplify fixit code by
2235         using gcc_rich_location::add_fixit_misspelled_id.
2236         (set_init_label): Likewise.
2237
2238 2016-06-13  David Malcolm  <dmalcolm@redhat.com>
2239
2240         * c-parser.c (c_parser_initelt): Provide location of name for new
2241         location_t param of set_init_label.
2242         * c-tree.h (set_init_label): Add location_t param.
2243         * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
2244         param and use it when issuing error messages about unrecognized
2245         field names.  Attempt to provide a fixit hint if appropriate,
2246         otherwise update the error message to provide the type name.
2247
2248 2016-06-10  Thomas Schwinge  <thomas@codesourcery.com>
2249
2250         PR c/71381
2251         * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
2252         Loosen checking.
2253
2254 2016-06-08  Martin Sebor  <msebor@redhat.com>
2255             Jakub Jelinek  <jakub@redhat.com>
2256
2257         PR c++/70507
2258         PR c/68120
2259         * c-typeck.c (convert_arguments): Don't promote last argument
2260         of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2261
2262 2016-06-08  Marek Polacek  <polacek@redhat.com>
2263
2264         PR c/71418
2265         * c-decl.c (grokdeclarator): Check TYPE_P.
2266
2267         PR c/71426
2268         * c-decl.c (get_parm_info): Don't crash on an assert on invalid
2269         code.
2270
2271 2016-06-07  David Malcolm  <dmalcolm@redhat.com>
2272
2273         * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
2274         and structure element reference, capture the location of the
2275         element name token and pass it to build_component_ref.
2276         (c_parser_postfix_expression_after_primary): Likewise for
2277         structure element dereference.
2278         (c_parser_omp_variable_list): Likewise for
2279         OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
2280         * c-tree.h (build_component_ref): Add location_t param.
2281         * c-typeck.c (build_component_ref): Add location_t param
2282         COMPONENT_LOC.  Use it, if available, when issuing hints about
2283         mispelled member names to provide a fixit replacement hint.
2284
2285 2016-06-06  Marek Polacek  <polacek@redhat.com>
2286
2287         PR c/71362
2288         * c-parser.c (c_parser_direct_declarator): Set location.
2289
2290 2016-06-06  Marek Polacek  <polacek@redhat.com>
2291
2292         * c-typeck.c (comptypes_internal): Handle comparisons of
2293         INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes.  Don't check
2294         TYPE_REF_CAN_ALIAS_ALL.
2295
2296 2016-06-03  Chung-Lin Tang  <cltang@codesourcery.com>
2297
2298         * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
2299         arguments as addressable when async clause exists.
2300
2301 2016-05-30  Jakub Jelinek  <jakub@redhat.com>
2302
2303         PR c++/71349
2304         * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
2305         when combined with target construct.
2306
2307 2016-05-26  Jakub Jelinek  <jakub@redhat.com>
2308
2309         * c-parser.c (c_parser_omp_clause_schedule): Warn if
2310         OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
2311
2312 2016-05-25  Marek Polacek  <polacek@redhat.com>
2313
2314         PR c/71265
2315         * c-decl.c (c_make_fname_decl): Don't check seen_error.
2316
2317         PR c/71266
2318         * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
2319
2320 2016-05-24  Cesar Philippidis  <cesar@codesourcery.com>
2321
2322         * c-parser.c (c_parser_oacc_declare): Add support for
2323         GOMP_MAP_FIRSTPRIVATE_POINTER.
2324         * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
2325         argument with enum c_omp_region_type ort.
2326         (handle_omp_array_sections): Likewise.  Update call to
2327         handle_omp_array_sections_1.
2328         (c_finish_omp_clauses): Add specific errors and warning messages for
2329         OpenACC.  Use firsrtprivate pointers for OpenACC subarrays.  Update
2330         call to handle_omp_array_sections.
2331
2332 2016-05-24  Thomas Schwinge  <thomas@codesourcery.com>
2333
2334         * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
2335
2336 2016-05-24  Richard Biener  <rguenther@suse.de>
2337
2338         PR middle-end/70434
2339         PR c/69504
2340         * c-typeck.c (build_array_ref): Do not complain about indexing
2341         non-lvalue vectors.  Adjust for function name change.
2342
2343 2016-05-20  Martin Sebor  <msebor@redhat.com>
2344
2345         PR c/71115
2346         * c-typeck.c (error_init): Use
2347         expansion_point_location_if_in_system_header.
2348         (warning_init): Same.
2349
2350 2016-05-19  David Malcolm  <dmalcolm@redhat.com>
2351
2352         PR c/71171
2353         * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
2354         in error-handling.
2355         (c_parser_postfix_expression): Likewise.
2356         * c-tree.h (c_expr::set_error): New method.
2357         * c-typeck.c (parser_build_binary_op): In error-handling, ensure
2358         that result's range is initialized.
2359
2360 2016-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
2361
2362         * c-typeck.c (parser_build_unary_op): Fix formatting.
2363
2364 2016-05-16  Matthew Wahab  <matthew.wahab@arm.com>
2365
2366         * c-decl.c (grokdeclarator): Remove errmsg and use of
2367         targetm.invalid_return_type.
2368         (grokparms): Remove errmsg and use of
2369         targetm.invalid_parameter_type.
2370
2371 2016-05-13  Joseph Myers  <joseph@codesourcery.com>
2372
2373         * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2374         function return type.
2375
2376 2016-05-12  Marek Polacek  <polacek@redhat.com>
2377
2378         PR c/70756
2379         * c-decl.c (build_compound_literal): Pass LOC down to
2380         c_incomplete_type_error.
2381         * c-tree.h (require_complete_type): Adjust declaration.
2382         (c_incomplete_type_error): Likewise.
2383         * c-typeck.c (require_complete_type): Add location parameter, pass it
2384         down to c_incomplete_type_error.
2385         (c_incomplete_type_error): Add location parameter, pass it down to
2386         error_at.
2387         (build_component_ref): Pass location down to c_incomplete_type_error.
2388         (default_conversion): Pass location down to require_complete_type.
2389         (build_array_ref): Likewise.
2390         (build_function_call_vec): Likewise.
2391         (convert_arguments): Likewise.
2392         (build_unary_op): Likewise.
2393         (build_c_cast): Likewise.
2394         (build_modify_expr): Likewise.
2395         (convert_for_assignment): Likewise.
2396         (c_finish_omp_clauses): Likewise.
2397
2398 2016-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
2399
2400         PR c/43651
2401         * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
2402         is enabled.
2403         * c-errors.c (pedwarn_c90): Return true if warned.
2404         * c-tree.h (pedwarn_c90): Change return type to bool.
2405         (enum c_declspec_word): Add new enumerator cdw_atomic.
2406
2407 2016-05-11  Marek Polacek  <polacek@redhat.com>
2408
2409         PR c++/71024
2410         * c-decl.c (diagnose_mismatched_decls): Factor out code to
2411         diagnose_mismatched_attributes and call it.
2412
2413 2016-05-10  Marek Polacek  <polacek@redhat.com>
2414
2415         PR c/70255
2416         * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2417         on a declaration following the definition.
2418
2419 2016-05-05  Jakub Jelinek  <jakub@redhat.com>
2420
2421         * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2422         parse it through to c_parser_c99_block_statement.
2423         (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2424         caller.
2425
2426 2016-05-04  Marek Polacek  <polacek@redhat.com>
2427
2428         * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2429         OPT_Wdangling_else.
2430
2431 2016-05-04  Marek Polacek  <polacek@redhat.com>
2432
2433         PR c/48778
2434         * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2435         for macro expansions.
2436
2437 2016-05-03  Marek Polacek  <polacek@redhat.com>
2438
2439         PR c/70859
2440         * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
2441         check_builtin_function_arguments.
2442
2443 2016-05-03  Richard Biener  <rguenther@suse.de>
2444
2445         * Make-lang.in (cc1-checksum.c): For stage-final re-use
2446         the checksum from the previous stage.
2447
2448 2016-05-02  Cesar Philippidis  <cesar@codesourcery.com>
2449
2450         * c-parser.c (c_parser_oacc_all_clauses): Update call to
2451         c_finish_omp_clauses.
2452         (c_parser_omp_all_clauses): Likewise.
2453         (c_parser_oacc_cache): Likewise.
2454         (c_parser_oacc_loop): Likewise.
2455         (omp_split_clauses): Likewise.
2456         (c_parser_omp_declare_target): Likewise.
2457         (c_parser_cilk_all_clauses): Likewise.
2458         (c_parser_cilk_for): Likewise.
2459         * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
2460         is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2461
2462 2016-05-02  Marek Polacek  <polacek@redhat.com>
2463
2464         PR c/70851
2465         * c-decl.c (grokdeclarator): Diagnose when array's size has an
2466         incomplete type.
2467
2468 2016-04-29  Cesar Philippidis  <cesar@codesourcery.com>
2469
2470         PR middle-end/70626
2471         * c-parser.c (c_parser_oacc_loop): Don't augment mask with
2472         OACC_LOOP_CLAUSE_MASK.
2473         (c_parser_oacc_kernels_parallel): Update call to
2474         c_oacc_split_loop_clauses.
2475
2476 2016-04-28  Andrew MacLeod  <amacleod@redhat.com>
2477
2478         * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
2479         argument to build_modify_expr in two cases.
2480
2481 2016-04-27  Bernd Schmidt  <bschmidt@redhat.com>
2482
2483         * c-parser.c (c_parser_postfix_expression_after_primary): Call
2484         warn_for_memset instead of warning directly here.
2485
2486 2016-04-26  Marek Polacek  <polacek@redhat.com>
2487
2488         PR c/67784
2489         * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2490         out of ...
2491         (c_parser_for_statement): ... here.
2492         (c_parser_if_statement): Use it.
2493         (c_parser_switch_statement): Use it.
2494         (c_parser_while_statement): Use it.
2495
2496         PR c/70791
2497         * c-decl.c (pushdecl): Pass LOCUS down to warning.
2498
2499 2016-04-20  Ilya Verbin  <ilya.verbin@intel.com>
2500
2501         PR c++/69363
2502         * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2503         instead of c_finish_cilk_clauses.
2504         * c-tree.h (c_finish_omp_clauses): Add new default argument.
2505         * c-typeck.c (c_finish_omp_clauses): Add new argument.  Allow
2506         floating-point variables in the linear clause for Cilk Plus.
2507
2508 2016-04-18  Michael Matz  <matz@suse.de>
2509
2510         * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2511         (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2512
2513 2016-04-15  Marek Polacek  <polacek@redhat.com>
2514
2515         PR c/70671
2516         * c-typeck.c (build_unary_op): Pass location down to error and
2517         warning call.
2518
2519 2016-04-15  Jakub Jelinek  <jakub@redhat.com>
2520
2521         PR c/70436
2522         * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2523         where needed.
2524         (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2525         c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2526         c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2527         Adjust c_parser_pragma callers.
2528         (c_parser_statement_after_labels): Likewise.  Adjust c_parser_cilk_for
2529         caller.
2530         (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2531         c_parser_statement.
2532         (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2533         c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2534         c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2535         c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2536         c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2537         c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2538         c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2539         c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2540         down where needed.
2541         (c_parser_omp_for_loop): Likewise.  Clear IF_P if nbraces.
2542         (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2543         calls.
2544
2545 2016-04-13  Marek Polacek  <polacek@redhat.com>
2546
2547         PR c/70436
2548         * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2549         adjust callers.
2550         (c_parser_statement): Likewise.
2551         (c_parser_c99_block_statement): Likewise.
2552         (c_parser_while_statement): Likewise.
2553         (c_parser_for_statement): Likewise.
2554         (c_parser_if_body): Don't set IF_P here.
2555         (c_parser_if_statement): Add IF_P argument.  Set IF_P here.  Warn
2556         about dangling else here.
2557         * c-tree.h (c_finish_if_stmt): Adjust declaration.
2558         * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter.  Don't
2559         warn about dangling else here.
2560
2561 2016-04-04  Marek Polacek  <polacek@redhat.com>
2562
2563         PR c/70307
2564         * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2565
2566 2016-03-31  Marek Polacek  <polacek@redhat.com>
2567
2568         PR c/70297
2569         * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2570
2571 2016-03-18  David Malcolm  <dmalcolm@redhat.com>
2572
2573         PR c/70281
2574         * c-parser.c (c_parser_postfix_expression): Set the source range
2575         for uses of "__builtin_types_compatible_p".
2576
2577 2016-03-17  Jakub Jelinek  <jakub@redhat.com>
2578
2579         PR c/70280
2580         * c-typeck.c (composite_type): Don't count void_list_node
2581         into len, if the list is terminated by void_list_node, start
2582         with void_list_node instead of NULL for newargs.  Stop
2583         at void_list_node.
2584
2585 2016-03-16  Marek Polacek  <polacek@redhat.com>
2586
2587         PR c/70093
2588         * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2589         nested functions returning VM types.
2590
2591 2016-03-09  Cesar Philippidis  <cesar@codesourcery.com>
2592
2593         * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2594         when calling c_finish_omp_clauses.
2595
2596 2016-03-04  Bernd Schmidt  <bschmidt@redhat.com>
2597
2598         PR c/69824
2599         * c-decl.c (get_parm_info): Don't queue implicit function declarations
2600         for later.
2601
2602 2016-03-04  Marek Polacek  <polacek@redhat.com>
2603
2604         PR c/69798
2605         * c-parser.c (c_parser_postfix_expression): Call
2606         c_parser_cast_expression rather than c_parser_postfix_expression.
2607
2608 2016-03-01  Jakub Jelinek  <jakub@redhat.com>
2609
2610         PR c/69796
2611         PR c/69974
2612         * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2613         of incomplete decls to error_mark_node.
2614
2615 2016-02-24  Marek Polacek  <polacek@redhat.com>
2616
2617         PR c/69819
2618         * c-decl.c (finish_decl): Don't update the copy of the type of a
2619         different decl type.
2620
2621 2016-02-23  Jakub Jelinek  <jakub@redhat.com>
2622
2623         PR objc/69844
2624         * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2625         in id_kind reclassification.
2626
2627 2016-02-16  Jakub Jelinek  <jakub@redhat.com>
2628
2629         PR c/69835
2630         * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2631
2632 2016-02-16  James Norris  <jnorris@codesourcery.com>
2633
2634         PR c/64748
2635         * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2636
2637 2016-02-12  Bernd Schmidt  <bschmidt@redhat.com>
2638
2639         * c-decl.c (build_null_declspecs): Zero the entire struct.
2640
2641         PR c/69522
2642         * c-parser.c (c_parser_braced_init): New arg outer_obstack.  All
2643         callers changed.  If nested_p is true, use it to call
2644         finish_implicit_inits.
2645         * c-tree.h (finish_implicit_inits): Declare.
2646         * c-typeck.c (finish_implicit_inits): New function.  Move code
2647         from ...
2648         (push_init_level): ... here.
2649         (set_designator, process_init_element): Call finish_implicit_inits.
2650
2651 2016-02-11  Jakub Jelinek  <jakub@redhat.com>
2652
2653         PR c/69768
2654         * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
2655         arguments for -Waddress warning.
2656
2657 2016-02-04  Jakub Jelinek  <jakub@redhat.com>
2658
2659         PR c/69669
2660         * c-decl.c (finish_enum): When honoring mode attribute,
2661         make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2662
2663 2016-01-29  Jakub Jelinek  <jakub@redhat.com>
2664
2665         PR debug/69518
2666         * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2667         all type variants, not just TYPE_MAIN_VARIANT.
2668
2669 2016-01-27  Jakub Jelinek  <jakub@redhat.com>
2670
2671         PR debug/66869
2672         * c-decl.c (c_write_global_declarations_1): Warn with
2673         warn_unused_function if static prototype without definition
2674         is not C_DECL_USED.
2675
2676 2016-01-27  Marek Polacek  <polacek@redhat.com>
2677
2678         PR c/68062
2679         * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2680         to unsigned, if needed.  Add -Wsign-compare warning.
2681
2682 2016-01-26  Jakub Jelinek  <jakub@redhat.com>
2683
2684         PR tree-optimization/69483
2685         * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2686
2687 2016-01-20  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2688
2689         PR c/24293
2690         * c-tree.h (incomplete_record_decls): Declare.
2691         * c-parser.c (incomplete_record_decls): Define.
2692         (c_parser_translation_unit): Iterate through incomplete_record_decls and
2693         report error if any decl has zero size.
2694         * c-decl.c (finish_decl): Append static decl with incomplete struct/union
2695         or enum type to incomplete_record_decls.
2696
2697 2016-01-14  Tom de Vries  <tom@codesourcery.com>
2698
2699         PR tree-optimization/68773
2700         * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
2701         set force_output.
2702
2703 2016-01-14  Marek Polacek  <polacek@redhat.com>
2704
2705         PR c/69262
2706         * c-decl.c (grokdeclarator): Provide more information for invalid
2707         array declarations.
2708
2709 2016-01-06  David Malcolm  <dmalcolm@redhat.com>
2710
2711         * c-parser.c (c_parser_unary_expression): For dereferences, build
2712         a combined location before calling build_indirect_ref, so that
2713         error reports cover the full range, manually updating the c_expr
2714         src_range.
2715
2716 2016-01-06  Marek Polacek  <polacek@redhat.com>
2717
2718         PR sanitizer/69099
2719         * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG.  Don't pass ARG to
2720         ubsan_instrument_float_cast.  Fold EXPR.  Use NULL_TREE instead of
2721         NULL.
2722
2723 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
2724
2725         Update copyright years.
2726
2727 2016-01-04  Marek Polacek  <polacek@redhat.com>
2728
2729         PR c/68908
2730         * c-typeck.c (build_atomic_assign): Improve commentary.  Add
2731         optimization to use __atomic_fetch_* built-in if possible.
2732
2733 2015-12-23  Thomas Schwinge  <thomas@codesourcery.com>
2734
2735         * c-parser.c (c_parser_oacc_clause_use_device): Merge function
2736         into...
2737         (c_parser_omp_clause_use_device_ptr): ... this function.  Adjust
2738         all users.
2739
2740 2015-12-22  Marek Polacek  <polacek@redhat.com>
2741
2742         PR c/69002
2743         * c-typeck.c (build_component_ref): Warn when acessing elements of
2744         atomic structures or unions.
2745
2746 2015-12-21  David Malcolm  <dmalcolm@redhat.com>
2747
2748         * c-typeck.c: Include "gcc-rich-location.h".
2749         (build_binary_op): In the two places that call binary_op_error,
2750         create a gcc_rich_location and populate it with the location of
2751         the binary op and its two operands.
2752
2753 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
2754
2755         * c-parser.c (c_parser_statement_after_labels): When calling
2756         c_finish_return, Use the return expression's location if it has
2757         one, falling back to the location of the first token within it.
2758         * c-typeck.c (c_finish_return): When issuing warnings about
2759         the incorrect presence/absence of a return value, issue a note
2760         showing the declaration of the function.
2761
2762 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
2763
2764         * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
2765         to 4.
2766         (c_parser_peek_nth_token): New function.
2767         (c_parser_peek_conflict_marker): New function.
2768         (c_parser_error): Detect conflict markers and report them as such.
2769
2770 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
2771
2772         * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
2773         to preserve range information for the primary expression
2774         in the call to c_parser_postfix_expression_after_primary.
2775
2776 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
2777
2778         * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
2779         expression location, falling back on the first token location,
2780         rather than always using the latter.
2781
2782 2015-12-16  Marek Polacek  <polacek@redhat.com>
2783
2784         PR c/64637
2785         * c-typeck.c (c_process_expr_stmt): Use location of the expression if
2786         available.
2787
2788 2015-12-15  Marek Polacek  <polacek@redhat.com>
2789
2790         PR c/68907
2791         * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
2792         artificial decl.
2793
2794 2015-12-08  David Malcolm  <dmalcolm@redhat.com>
2795
2796         * c-parser.c (c_parser_alignof_expression): Capture location of
2797         closing parenthesis (if any), or of end of unary expression, and
2798         use it to build a src_range for the expression.
2799
2800 2015-12-08  David Malcolm  <dmalcolm@redhat.com>
2801
2802         PR c/68757
2803         * c-parser.c (c_parser_get_builtin_args): Add
2804         "out_close_paren_loc" param, and write back to it.
2805         (c_parser_postfix_expression): Capture the closing
2806         parenthesis location for RID_CHOOSE_EXPR,
2807         RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
2808         RID_BUILTIN_SHUFFLE and use it to set the source range
2809         for such expressions; within RID_BUILTIN_COMPLEX set
2810         the underlying location.
2811
2812 2015-12-07  Marek Polacek  <polacek@redhat.com>
2813
2814         PR c/68668
2815         * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
2816         TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
2817
2818 2015-12-04  Eric Botcazou  <ebotcazou@adacore.com>
2819
2820         * c-tree.h (c_build_va_arg): Adjust prototype.
2821         * c-parser.c (c_parser_postfix_expression): Adjust call to above.
2822         * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
2823         parameter, adjust throughout and issue an error if EXPR is a component
2824         with reverse storage order.
2825
2826 2015-12-02  Jason Merrill  <jason@redhat.com>
2827
2828         * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
2829         (c_fully_fold_internal, decl_constant_value_for_optimization):
2830         Move from c-common.c.
2831         * c-tree.h: Declare decl_constant_value_for_optimization.
2832         * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
2833
2834 2015-12-02  Joseph Myers  <joseph@codesourcery.com>
2835
2836         PR c/68162
2837         * c-decl.c (grokdeclarator): Set first_non_attr_kind before
2838         following link from declarator to next declarator.  Track original
2839         qualified type and pass it to c_build_qualified_type.
2840         * c-typeck.c (c_build_qualified_type): Add arguments
2841         orig_qual_type and orig_qual_indirect.
2842
2843 2015-12-02  Thomas Schwinge  <thomas@codesourcery.com>
2844
2845         * c-parser.c (c_parser_omp_clause_name)
2846         (c_parser_oacc_all_clauses): Alphabetical sorting.
2847
2848 2015-12-02  Jakub Jelinek  <jakub@redhat.com>
2849
2850         PR c/68533
2851         * c-decl.c (get_parm_info): Use b->locus instead of input_location
2852         for diagnostics.
2853
2854 2015-12-01  Julian Brown  <julian@codesourcery.com>
2855             Cesar Philippidis  <cesar@codesourcery.com>
2856             James Norris  <James_Norris@mentor.com>
2857
2858         * c-parser.c (c_parser_omp_clause_name): Add use_device support.
2859         (c_parser_oacc_clause_use_device): New function.
2860         (c_parser_oacc_all_clauses): Add use_device support.
2861         (OACC_HOST_DATA_CLAUSE_MASK): New macro.
2862         (c_parser_oacc_host_data): New function.
2863         (c_parser_omp_construct): Add host_data support.
2864         * c-tree.h (c_finish_oacc_host_data): Add prototype.
2865         * c-typeck.c (c_finish_oacc_host_data): New function.
2866         (c_finish_omp_clauses): Add use_device support.
2867
2868 2015-11-29  Jan Hubicka  <hubicka@ucw.cz>
2869
2870         PR c/67106
2871         * c-decl.c: Set TYPE_PACKED in variants.
2872
2873 2015-11-27  Martin Liska  <mliska@suse.cz>
2874
2875         PR c++/68312
2876         * c-array-notation.c (fix_builtin_array_notation_fn):
2877         Use release_vec_vec instead of vec::release.
2878         (build_array_notation_expr): Likewise.
2879         (fix_conditional_array_notations_1): Likewise.
2880         (fix_array_notation_expr): Likewise.
2881         (fix_array_notation_call_expr): Likewise.
2882
2883 2015-11-27  Jakub Jelinek  <jakub@redhat.com>
2884
2885         PR c/63326
2886         * c-parser.c (c_parser_compound_statement_nostart): If
2887         last_label is true, use pragma_stmt instead of pragma_compound
2888         as second c_parser_pragma argument.
2889         (c_parser_omp_ordered, c_parser_omp_target_update,
2890         c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
2891         false as second argument to c_parser_skip_to_pragma_eol after
2892         diagnosing standalone directives used in pragma_stmt context.
2893
2894 2015-11-24  Ilya Verbin  <ilya.verbin@intel.com>
2895
2896         * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
2897         with "if (ENABLE_OFFLOADING)".
2898
2899 2015-11-23  David Malcolm  <dmalcolm@redhat.com>
2900
2901         PR objc/68438
2902         * c-parser.c (c_parser_postfix_expression): Set up source ranges
2903         for various Objective-C constructs: Class.name syntax,
2904         @selector(), @protocol(), @encode(), and [] message syntax.
2905
2906 2015-11-20  David Malcolm  <dmalcolm@redhat.com>
2907
2908         PR 62314
2909         * c-typeck.c (should_suggest_deref_p): New function.
2910         (build_component_ref): Special-case POINTER_TYPE when
2911         generating a "not a structure of union"  error message, and
2912         suggest a "->" rather than a ".", providing a fix-it hint.
2913
2914 2015-11-19  David Malcolm  <dmalcolm@redhat.com>
2915
2916         * c-typeck.c (lookup_field_fuzzy): Move determination of closest
2917         candidate into a new function, find_closest_identifier.
2918
2919 2015-11-19  Marek Polacek  <polacek@redhat.com>
2920
2921         PR c/68412
2922         * c-typeck.c (parser_build_binary_op): Properly handle
2923         C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
2924
2925 2015-11-17  David Malcolm  <dmalcolm@redhat.com>
2926
2927         * c-parser.c (set_c_expr_source_range): Bulletproof both
2928         overloaded implementations against NULL expr->value.
2929         (c_parser_braced_init): Set src_range for "ret" to a sane pair of
2930         values.
2931         (c_parser_unary_expression): Likewise when handling addresses of
2932         labels.
2933         (c_parser_postfix_expression): Likewise for statement expressions,
2934         for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
2935         __builtin_va_arg, and for __builtin_offset_of.
2936         (c_parser_postfix_expression_after_paren_type): Initialize expr's
2937         src_range using the range of the braced initializer.
2938         (c_parser_transaction_expression): Set src_range for "ret" to a
2939         sane pair of values.
2940
2941 2015-11-16  Kirill Yukhin  <kirill.yukhin@intel.com>
2942
2943         * c-parser.c (c_finish_omp_declare_simd): Look for
2944         "simd" attribute as well. Update error message.
2945
2946 2015-11-14  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
2947
2948         * c-parser.c (c_parser_omp_declare_target): Adjust.
2949
2950 2015-11-14  Jakub Jelinek  <jakub@redhat.com>
2951
2952         * c-typeck.c (c_finish_omp_clauses): Don't mark
2953         GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
2954
2955 2015-11-14  Marek Polacek  <polacek@redhat.com>
2956
2957         * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
2958         * c-typeck.c: Likewise.
2959
2960 2015-11-13  David Malcolm  <dmalcolm@redhat.com>
2961
2962         * c-decl.c (warn_defaults_to): Pass line_table to
2963         rich_location ctor.
2964         * c-errors.c (pedwarn_c99): Likewise.
2965         (pedwarn_c90): Likewise.
2966         * c-parser.c (set_c_expr_source_range): New functions.
2967         (c_token::get_range): New method.
2968         (c_token::get_finish): New method.
2969         (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
2970         based on the range from the start of the LHS to the end of the
2971         RHS.
2972         (c_parser_conditional_expression): Likewise, based on the range
2973         from the start of the cond.value to the end of exp2.value.
2974         (c_parser_binary_expression): Call set_c_expr_source_range on
2975         the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
2976         (c_parser_cast_expression): Call set_c_expr_source_range on ret
2977         based on the cast_loc through to the end of the expr.
2978         (c_parser_unary_expression): Likewise, based on the
2979         op_loc through to the end of op.
2980         (c_parser_sizeof_expression) Likewise, based on the start of the
2981         sizeof token through to either the closing paren or the end of
2982         expr.
2983         (c_parser_postfix_expression): Likewise, using the token range,
2984         or from the open paren through to the close paren for
2985         parenthesized expressions.
2986         (c_parser_postfix_expression_after_primary): Likewise, for
2987         various kinds of expression.
2988         * c-tree.h (struct c_expr): Add field "src_range".
2989         (c_expr::get_start): New method.
2990         (c_expr::get_finish): New method.
2991         (set_c_expr_source_range): New decls.
2992         * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
2993         on ret for prefix unary ops.
2994         (parser_build_binary_op): Likewise, running from the start of
2995         arg1.value through to the end of arg2.value.
2996
2997 2015-11-13  Marek Polacek  <polacek@redhat.com>
2998
2999         PR c/68320
3000         * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
3001
3002 2015-11-13  David Malcolm  <dmalcolm@redhat.com>
3003
3004         * c-typeck.c: Include spellcheck.h.
3005         (lookup_field_fuzzy_find_candidates): New function.
3006         (lookup_field_fuzzy): New function.
3007         (build_component_ref): If the field was not found, try using
3008         lookup_field_fuzzy and potentially offer a suggestion.
3009
3010 2015-11-12  James Norris  <jnorris@codesourcery.com>
3011             Joseph Myers  <joseph@codesourcery.com>
3012
3013         * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
3014         (c_parser_omp_clause_name): Handle 'device_resident' clause.
3015         (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3016         and PRAGMA_OMP_CLAUSE_LINK.
3017         (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3018         and PRAGMA_OACC_CLAUSE_LINK.
3019         (OACC_DECLARE_CLAUSE_MASK): New definition.
3020         (c_parser_oacc_declare): New function.
3021
3022 2015-11-12  Marek Polacek  <polacek@redhat.com>
3023
3024         PR c/67784
3025         * c-parser.c (c_parser_for_statement): Reclassify the token in
3026         a correct scope.
3027
3028 2015-11-11  Marek Polacek  <polacek@redhat.com>
3029
3030         PR c/68107
3031         PR c++/68266
3032         * c-decl.c (grokdeclarator): Call valid_array_size_p.  Remove code
3033         checking the size of an array.
3034
3035 2015-11-11  Andrew MacLeod  <amacleod@redhat.com>
3036
3037         * c-array-notation.c: Remove unused header files.
3038         * c-aux-info.c: Likewise.
3039         * c-convert.c: Likewise.
3040         * c-decl.c: Likewise.
3041         * c-errors.c: Likewise.
3042         * c-lang.c: Likewise.
3043         * c-objc-common.c: Likewise.
3044         * c-parser.c: Likewise.
3045         * c-typeck.c: Likewise.
3046         * gccspec.c: Likewise.
3047
3048 2015-11-09  Thomas Schwinge  <thomas@codesourcery.com>
3049             Cesar Philippidis  <cesar@codesourcery.com>
3050             James Norris  <jnorris@codesourcery.com>
3051             Julian Brown  <julian@codesourcery.com>
3052             Nathan Sidwell  <nathan@codesourcery.com>
3053
3054         c/
3055         * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
3056         routine arg.
3057         (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
3058         (c_parser_pragma): Parse 'acc routine'.
3059         (OACC_ROUTINE_CLAUSE_MARK): Define.
3060         (c_parser_oacc_routine, (c_finish_oacc_routine): New.
3061
3062 2015-11-09  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3063
3064         PR debug/67192
3065         * c-typeck.c (c_finish_loop): For unconditional loops, set the
3066         location of the backward-goto to the start of the loop body.
3067
3068 2015-11-09  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3069
3070         PR debug/67192
3071         * c-parser.c (c_parser_while_statement): Finish the loop before
3072         parsing ahead for misleading indentation.
3073         (c_parser_for_statement): Likewise.
3074
3075 2015-11-08  Eric Botcazou  <ebotcazou@adacore.com>
3076
3077         * c-decl.c (finish_struct): If the structure has reverse storage
3078         order, rewrite the type of array fields with scalar component.  Call
3079         maybe_apply_pragma_scalar_storage_order on entry.
3080         * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs.  Issue
3081         errors on bit-fields and reverse SSO here and not...
3082         (c_mark_addressable): ...here.
3083         (output_init_element): Adjust call to initializer_constant_valid_p.
3084         (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
3085
3086 2015-11-06  David Malcolm  <dmalcolm@redhat.com>
3087
3088         * c-decl.c (warn_defaults_to): Update for change in signature
3089         of diagnostic_set_info.
3090         * c-errors.c (pedwarn_c99): Likewise.
3091         (pedwarn_c90): Likewise.
3092         * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
3093         for textinfo::set_location.
3094
3095 2015-11-05  Cesar Philippidis  <cesar@codesourcery.com>
3096             Thomas Schwinge  <thomas@codesourcery.com>
3097             James Norris  <jnorris@codesourcery.com>
3098
3099         * c-parser.c (c_parser_omp_clause_name): Add support for
3100         PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
3101         (c_parser_omp_clause_default): Add is_oacc argument. Handle
3102         default(none) in OpenACC.
3103         (c_parser_oacc_shape_clause): Allow pointer variables as gang static
3104         arguments.
3105         (c_parser_oacc_clause_tile): New function.
3106         (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
3107         OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
3108         (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
3109         TILE}.
3110         (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
3111         (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
3112         FIRSTPRIVATE}.
3113         (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
3114         (c_parser_oacc_update): Update the error message for missing clauses.
3115         * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
3116         and OMP_CLAUSE_INDEPENDENT.
3117
3118 2015-11-05  Marek Polacek  <polacek@redhat.com>
3119
3120         PR c/68090
3121         * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
3122         deal with pre-evaluation on invalid types.
3123
3124 2015-11-05  Jakub Jelinek  <jakub@redhat.com>
3125             Ilya Verbin  <ilya.verbin@intel.com>
3126
3127         * c-parser.c: Include context.h and gimple-expr.h.
3128         (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
3129         monotonic together with nonmonotonic.
3130         (c_parser_omp_for_loop): Call c_omp_check_loop_iv.  Call add_stmt here.
3131         (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
3132         (c_parser_omp_target_data, c_parser_omp_target_enter_data,
3133         c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
3134         (c_parser_omp_target): Likewise.  Evaluate num_teams and thread_limit
3135         expressions on combined target teams before the target.
3136         (c_parser_omp_declare_target): If decl has "omp declare target" or
3137         "omp declare target link" attribute, and cgraph or varpool node already
3138         exists, then set corresponding flags.  Call c_finish_omp_clauses
3139         in the parenthesized extended-list syntax case.
3140         * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
3141         declare target.
3142         * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
3143         on OMP_CLAUSE_REDUCTION array sections.
3144         (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
3145         into the constant offset, or for variable low-bound using
3146         POINTER_PLUS_EXPR.  For structure element based array sections use
3147         GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
3148         (c_finish_omp_clauses): Drop generic_field_head, structure
3149         elements are now always mapped even as array section bases,
3150         diagnose same var in data sharing and mapping clauses.  Diagnose if
3151         linear step on declare simd is neither a constant nor a uniform
3152         parameter.  Look through POINTER_PLUS_EXPR for array section
3153         reductions.  Diagnose the same var or function appearing multiple
3154         times on the same directive.  Fix up wording for the to clause if t
3155         is neither a FUNCTION_DECL nor a VAR_DECL.  Diagnose nonmonotonic
3156         modifier on kinds other than dynamic or guided or nonmonotonic
3157         modifier together with ordered clause.
3158
3159 2015-11-03  Thomas Schwinge  <thomas@codesourcery.com>
3160             Chung-Lin Tang  <cltang@codesourcery.com>
3161
3162         * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
3163
3164 2015-10-29  Andrew MacLeod  <amacleod@redhat.com>
3165
3166         * c-array-notation.c: Reorder #include's and remove duplicates.
3167         * c-aux-info.c: Likewise.
3168         * c-convert.c: Likewise.
3169         * c-decl.c: Likewise.
3170         * c-errors.c: Likewise.
3171         * c-lang.c: Likewise.
3172         * c-objc-common.c: Likewise.
3173         * c-parser.c: Likewise.
3174         * c-typeck.c: Likewise.
3175
3176 2015-10-26  Jim Wilson  <jim.wilson@linaro.org>
3177
3178         PR debug/66068
3179         * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
3180         after calling build_qualified_type.
3181
3182 2015-10-27  Cesar Philippidis  <cesar@codesourcery.com>
3183             Thomas Schwinge  <thomas@codesourcery.com>
3184             James Norris  <jnorris@codesourcery.com>
3185             Joseph Myers  <joseph@codesourcery.com>
3186             Julian Brown  <julian@codesourcery.com>
3187             Bernd Schmidt  <bschmidt@redhat.com>
3188
3189         * c-parser.c (c_parser_oacc_shape_clause): New.
3190         (c_parser_oacc_simple_clause): New.
3191         (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
3192         (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
3193
3194 2015-10-27  Thomas Schwinge  <thomas@codesourcery.com>
3195             James Norris  <jnorris@codesourcery.com>
3196             Cesar Philippidis  <cesar@codesourcery.com>
3197
3198         PR c/64765
3199         PR c/64880
3200         * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
3201         parameters, and handle these.  Adjust all users.
3202         (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
3203         into...
3204         (c_parser_oacc_kernels_parallel): ... this new function.  Adjust
3205         all users.
3206         * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
3207         declare functions.
3208         (c_finish_omp_construct): Declare function.
3209         * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
3210         Merge functions into...
3211         (c_finish_omp_construct): ... this new function.
3212
3213 2015-10-22  Richard Biener  <rguenther@suse.de>
3214
3215         * c-typeck.c (c_finish_omp_clauses): Properly convert operands
3216         before folding a MINUS_EXPR.
3217
3218 2015-10-21  Marek Polacek  <polacek@redhat.com>
3219
3220         PR c/68024
3221         * c-decl.c (start_function): Warn about vararg functions without
3222         a prototype.
3223
3224 2015-10-21  Ilya Enkovich  <enkovich.gnu@gmail.com>
3225
3226         * c-typeck.c (build_conditional_expr): Use boolean vector
3227         type for vector comparison.
3228         (build_vec_cmp): New.
3229         (build_binary_op): Use build_vec_cmp for comparison.
3230
3231 2015-10-20  Marek Polacek  <polacek@redhat.com>
3232
3233         * c-parser.c (is_cilkplus_vector_p): Don't define here.
3234
3235 2015-10-20  Marek Polacek  <polacek@redhat.com>
3236
3237         PR c/67964
3238         * c-parser.c (c_parser_attributes): Break out of the loop if the
3239         token after an attribute isn't a comma.
3240
3241 2015-10-13  Jakub Jelinek  <jakub@redhat.com>
3242             Aldy Hernandez  <aldyh@redhat.com>
3243
3244         * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
3245         (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
3246         (c_parser_omp_variable_list): Handle structure elements for
3247         map, to and from clauses.  Handle array sections in reduction
3248         clause.  Formatting fixes.
3249         (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
3250         if clause modifiers.
3251         (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3252         c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3253         c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
3254         c_parser_omp_clause_is_device_ptr): New functions.
3255         (c_parser_omp_clause_ordered): Parse optional parameter.
3256         (c_parser_omp_clause_reduction): Handle array reductions.
3257         (c_parser_omp_clause_schedule): Parse optional simd modifier.
3258         (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
3259         functions.
3260         (c_parser_omp_clause_linear): Parse linear clause modifiers.
3261         (c_parser_omp_clause_depend_sink): New function.
3262         (c_parser_omp_clause_depend): Parse source/sink depend kinds.
3263         (c_parser_omp_clause_map): Parse release/delete map kinds and
3264         optional always modifier.
3265         (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
3266         and c_finish_omp_clauses callers.
3267         (c_parser_omp_all_clauses): Likewise.  Parse OpenMP 4.5 clauses.
3268         Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
3269         (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
3270         (OMP_CRITICAL_CLAUSE_MASK): Define.
3271         (c_parser_omp_critical): Parse critical clauses.
3272         (c_parser_omp_for_loop): Handle doacross loops, adjust
3273         c_finish_omp_for and c_finish_omp_clauses callers.
3274         (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
3275         (c_parser_omp_simd): Allow ordered clause if it has no parameter.
3276         (OMP_FOR_CLAUSE_MASK): Add linear clause.
3277         (c_parser_omp_for): Disallow ordered clause when combined with
3278         distribute.  Disallow linear clause when combined with distribute
3279         and not combined with simd.
3280         (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
3281         (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
3282         parse clauses and if depend clause is found, don't parse a body.
3283         (c_parser_omp_parallel): Disallow copyin clause on target parallel.
3284         Allow target parallel without for after it.
3285         (OMP_TASK_CLAUSE_MASK): Add priority clause.
3286         (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
3287         (c_parser_omp_target_data): Diagnose no map clauses or clauses with
3288         invalid kinds.
3289         (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
3290         (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
3291         OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
3292         (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
3293         functions.
3294         (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
3295         defaultmap and is_device_ptr clauses.
3296         (c_parser_omp_target): Parse target parallel and target simd.  Set
3297         OMP_TARGET_COMBINED on combined constructs.  Parse target enter data
3298         and target exit data.  Diagnose invalid map kinds.
3299         (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
3300         (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
3301         construct.
3302         (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
3303         &omp_priv.
3304         (OMP_TASKLOOP_CLAUSE_MASK): Define.
3305         (c_parser_omp_taskloop): New function.
3306         (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
3307         handle PRAGMA_OMP_TASKLOOP.
3308         (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
3309         * c-tree.h (c_finish_omp_clauses): Add two new arguments.
3310         * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
3311         Add IS_OMP argument, handle structure element bases, diagnose
3312         bitfields, pass IS_OMP recursively, diagnose known zero length
3313         array sections in depend clauses, handle array sections in reduction
3314         clause, diagnose negative length even for pointers.
3315         (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
3316         types, pass IS_OMP down to handle_omp_array_sections_1, handle
3317         array sections in reduction clause, set
3318         OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
3319         length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
3320         (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
3321         Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
3322
3323 2015-10-06  Marek Polacek  <polacek@redhat.com>
3324
3325         * c-parser.c (c_parser_statement_after_labels): Use
3326         protected_set_expr_location.
3327         (c_parser_omp_clause_num_gangs): Likewise.
3328         (c_parser_omp_clause_num_threads): Likewise.
3329         (c_parser_omp_clause_num_workers): Likewise.
3330         (c_parser_omp_clause_vector_length): Likewise.
3331         (c_parser_omp_clause_num_teams): Likewise.
3332         (c_parser_omp_clause_thread_limit): Likewise.
3333         * c-typeck.c (build_c_cast): Likewise.
3334         (c_cast_expr): Likewise.
3335
3336 2015-10-05  Richard Sandiford  <richard.sandiford@arm.com>
3337
3338         * c-typeck.c (c_tree_equal): Use real_equal instead of
3339         REAL_VALUES_EQUAL.
3340
3341 2015-10-04  Jason Merrill  <jason@redhat.com>
3342
3343         * c-parser.c (c_lex_one_token): Handle @synchronized.
3344         * c-decl.c (match_builtin_function_types): A declaration of a built-in
3345         can change whether the function is transaction_safe.
3346
3347 2015-10-02  Marek Polacek  <polacek@redhat.com>
3348
3349         PR c/67730
3350         * c-typeck.c (convert_for_assignment): Use the expansion point
3351         location throughout.
3352
3353 2015-10-02  Marek Polacek  <polacek@redhat.com>
3354
3355         PR c/64249
3356         * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
3357         and pass it down to c_parser_if_statement.
3358         (c_parser_else_body): Add CHAIN parameter and pass it down to
3359         c_parser_statement_after_labels.
3360         (c_parser_if_statement): Add CHAIN parameter.  Add code to warn about
3361         duplicated if-else-if conditions.
3362
3363 2015-10-01  Marek Polacek  <polacek@redhat.com>
3364
3365         * c-typeck.c (convert_for_assignment): Improve commentary.
3366
3367 2015-09-30  Marek Polacek  <polacek@redhat.com>
3368
3369         PR c/67730
3370         * c-typeck.c (c_finish_return): Use the expansion point location for
3371         certain "return with value" warnings.
3372
3373 2015-09-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
3374
3375         * c-parser.c (pragma_lex): Add loc argument.
3376
3377 2015-09-15  Marek Polacek  <polacek@redhat.com>
3378
3379         PR c/67580
3380         * c-decl.c (tag_exists_p): New function.
3381         * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3382         struct/union/enum keywords are missing.
3383         * c-tree.h (tag_exists_p): Declare.
3384
3385 2015-09-15  Marek Polacek  <polacek@redhat.com>
3386
3387         * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3388         (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3389         Return NULL_TREE instead of 0.
3390         (lookup_name): Return NULL_TREE instead of 0.
3391         (lookup_name_in_scope): Likewise.
3392         (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3393         (parser_xref_tag): Use false instead of 0.
3394         (start_struct): Use true instead of 1.
3395         (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3396
3397 2015-09-14  Marek Polacek  <polacek@redhat.com>
3398
3399         * c-typeck.c (set_nonincremental_init_from_string): Use
3400         HOST_WIDE_INT_M1U when shifting a negative value.
3401
3402 2015-09-09  Mark Wielaard  <mjw@redhat.com>
3403
3404         * c-typeck.c (build_binary_op): Check and warn when nonnull arg
3405         parm against NULL.
3406
3407 2015-09-10  Jakub Jelinek  <jakub@redhat.com>
3408
3409         PR c/67502
3410         * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
3411         into OMP_FOR_PRE_BODY rather than before the loop.
3412
3413 2015-09-09  Jakub Jelinek  <jakub@redhat.com>
3414
3415         PR c/67501
3416         * c-parser.c (c_parser_oacc_all_clauses,
3417         c_parser_omp_all_clauses): Remove invalid clause from
3418         list of clauses even if parser->error is set.
3419
3420         PR c/67500
3421         * c-parser.c (c_parser_omp_clause_aligned,
3422         c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3423         test for errors.
3424         * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3425         error_mark_node.
3426
3427         PR c/67495
3428         * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3429         instead of c_parser_unary_expression.  If the result is !lvalue_p,
3430         wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3431
3432 2015-09-04  Marek Polacek  <polacek@redhat.com>
3433
3434         PR sanitizer/67279
3435         * c-typeck.c (build_binary_op): Don't instrument static initializers.
3436
3437 2015-09-03  Martin Sebor  <msebor@redhat.com>
3438
3439         PR c/66516
3440         * c-typeck.c (convert_arguments, parser_build_unary_op,
3441         build_conditional_expr, c_cast_expr, convert_for_assignment,
3442         build_binary_op, _objc_common_truthvalue_conversion): Call
3443         reject_gcc_builtin.
3444         (c_decl_implicit): Define.
3445
3446 2015-09-02  Marek Polacek  <polacek@redhat.com>
3447
3448         PR c/67432
3449         * c-parser.c (c_parser_enum_specifier): Give a better error for
3450         an empty enum.
3451
3452 2015-08-18  Trevor Saunders  <tbsaunde@tbsaunde.org>
3453
3454         * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3455
3456 2015-08-12  Marek Polacek  <polacek@redhat.com>
3457
3458         * c-decl.c (grokdeclarator): Call error_at instead of error and pass
3459         LOC to it.
3460
3461 2015-08-03  Marek Polacek  <polacek@redhat.com>
3462
3463         PR c/67088
3464         * c-decl.c (check_bitfield_type_and_width): Add location parameter.
3465         Use it.
3466         (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
3467
3468 2015-08-02  Patrick Palka  <ppalka@gcc.gnu.org>
3469
3470         * c-parser.c (c_parser_if_body): Take token_indent_info
3471         argument. Call warn_for_misleading_indentation even when the
3472         body is a semicolon.  Extract token_indent_infos corresponding
3473         to the guard, body and next tokens.  Adjust call to
3474         warn_for_misleading_indentation accordingly.
3475         (c_parser_else_body): Likewise.
3476         (c_parser_if_statement): Likewise.
3477         (c_parser_while_statement): Likewise.
3478         (c_parser_for_statement): Likewise.
3479
3480 2015-07-28  Luis Felipe Strano Moraes  <luis.strano@gmail.com>
3481             Manuel López-Ibáñez  <manu@gcc.gnu.org>
3482
3483         * c-decl.c (get_parm_info): Remove static var. Update warning
3484         message.
3485
3486 2015-07-27  Marek Polacek  <polacek@redhat.com>
3487
3488         PR c++/66555
3489         PR c/54979
3490         * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3491
3492 2015-07-20  Marek Polacek  <polacek@redhat.com>
3493
3494         PR c++/55095
3495         * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3496         (build_binary_op): Warn about left shift overflows.
3497
3498 2015-07-09  Andrew MacLeod  <amacleod@redhat.com>
3499
3500         * c-array-notation.c: Adjust includes for flags.h changes.
3501         * c-objc-common.c: Likewise.
3502
3503 2015-07-07  Andrew MacLeod  <amacleod@redhat.com>
3504
3505         * c-array-notation.c: Adjust includes.
3506         * c-aux-info.c: Likewise.
3507         * c-convert.c: Likewise.
3508         * c-decl.c: Likewise.
3509         * c-errors.c: Likewise.
3510         * c-lang.c: Likewise.
3511         * c-objc-common.c: Likewise.
3512         * c-parser.c: Likewise.
3513         * c-typeck.c: Likewise.
3514
3515 2015-06-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
3516
3517         PR fortran/66605
3518         * c-decl.c (finish_function): Call do_warn_unused_parameter.
3519
3520 2015-06-29  Marek Polacek  <polacek@redhat.com>
3521
3522         PR c/66322
3523         * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3524         (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P.  Don't warn
3525         about -Wswitch-bool here.
3526         (do_case): Update c_add_case_label call.
3527         (c_finish_case): Update c_do_switch_warnings call.
3528
3529 2015-06-27  Marek Polacek  <polacek@redhat.com>
3530
3531         * c-typeck.c: Use VECTOR_TYPE_P throughout.
3532
3533 2015-06-26  Marek Polacek  <polacek@redhat.com>
3534
3535         * c-array-notation.c (fix_builtin_array_notation_fn): Use
3536         INDIRECT_REF_P.
3537         * c-typeck.c (array_to_pointer_conversion): Likewise.
3538         (build_unary_op): Likewise.
3539         (c_finish_return): Likewise.
3540
3541 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
3542
3543         * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3544         * c-parser.c: Likewise.
3545
3546 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
3547
3548         * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3549         instead of pointer_hash.
3550         (detect_field_duplicates): Likewise.
3551
3552 2015-06-25  Marek Polacek  <polacek@redhat.com>
3553
3554         * c-array-notation.c: Use VAR_P throughout.
3555         * c-decl.c: Likewise.
3556         * c-objc-common.c: Likewise.
3557         * c-parser.c: Likewise.
3558         * c-typeck.c: Likewise.
3559
3560 2015-06-25  Marek Polacek  <polacek@redhat.com>
3561
3562         * c-decl.c: Use is_global_var throughout.
3563         * c-parser.c: Likewise.
3564         * c-typeck.c: Likewise.
3565
3566 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
3567
3568         * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3569         * c-aux-info.c: Likewise.
3570         * c-convert.c: Likewise.
3571         * c-decl.c: Likewise.
3572         * c-errors.c: Likewise.
3573         * c-lang.c: Likewise.
3574         * c-objc-common.c: Likewise.
3575         * c-parser.c: Likewise.
3576         * c-typeck.c: Likewise.
3577
3578 2015-06-11  Jan Hubicka  <hubicka@ucw.cz>
3579
3580         PR middle-end/66325
3581         * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3582         variants.
3583
3584 2015-06-11  Pierre-Marie de Rodat  <derodat@adacore.com>
3585
3586         * c-decl.c (pop_scope): Register the main translation unit
3587         through the new debug hook.
3588
3589 2015-06-08  Andrew MacLeod  <amacleod@redhat.com>
3590
3591         * c-array-notation.c : Adjust include files.
3592         * c-aux-info.c : Likewise.
3593         * c-convert.c : Likewise.
3594         * c-decl.c : Likewise.
3595         * c-errors.c : Likewise.
3596         * c-lang.c : Likewise.
3597         * c-lang.h : Likewise.
3598         * c-objc-common.c : Likewise.
3599         * c-parser.c : Likewise.
3600         * c-typeck.c : Likewise.
3601
3602 2015-06-05  Aldy Hernandez  <aldyh@redhat.com>
3603
3604         * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3605         immediately clobber it.
3606         (c_write_global_declarations_1): Remove call to
3607         check_global_declaration_1.
3608         (c_write_global_declarations_2): Remove.
3609         (c_write_final_cleanups): Rename from c_write_global_declarations.
3610         Remove call to finalize_compilation_unit.
3611         Remove calls to debugging hooks.
3612         * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3613         * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3614         * c-tree.h: Remove c_write_global_declarations.
3615
3616 2015-06-04  Andrew MacLeod  <amacleod@redhat.com>
3617
3618         * c-array-notation.c: Adjust includes for restructured coretypes.h.
3619         * c-aux-info.c: Likewise.
3620         * c-convert.c: Likewise.
3621         * c-decl.c: Likewise.
3622         * c-errors.c: Likewise.
3623         * c-lang.c: Likewise.
3624         * c-objc-common.c: Likewise.
3625         * c-parser.c: Likewise.
3626         * c-typeck.c: Likewise.
3627
3628 2015-06-04  Marek Polacek  <polacek@redhat.com>
3629
3630         PR c/66341
3631         * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3632         it is a lvalue.
3633
3634 2015-06-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
3635
3636         * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3637         Warn for empty struct.
3638         (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3639
3640 2015-06-02  Andres Tiraboschi  <andres.tiraboschi@tallertechnologies.com>
3641
3642         * c-decl.c (start_function): Call plugin before parsing.
3643         (finish_function): Call plugin after parsing.
3644
3645 2015-06-02  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
3646
3647         PR c/49551
3648         * c-decl.c (merge_decls): Merge DECL_COMMON.
3649
3650 2015-05-22  Jim Wilson  <jim.wilson@linaro.org>
3651
3652         * Make-lang.in (check_gcc_pallelize): Define.
3653
3654 2015-05-22  Marek Polacek  <polacek@redhat.com>
3655
3656         PR c/47043
3657         * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
3658         attributes.
3659
3660 2015-05-21  Marek Polacek  <polacek@redhat.com>
3661
3662         * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3663         DECL_BUILT_IN.
3664
3665 2015-05-20  Marek Polacek  <polacek@redhat.com>
3666
3667         * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3668         * c-typeck.c: Likewise.
3669
3670 2015-05-19  Marek Polacek  <polacek@redhat.com>
3671
3672         * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3673
3674 2015-05-19  Jakub Jelinek  <jakub@redhat.com>
3675
3676         PR middle-end/66199
3677         * c-parser.c (c_parser_omp_for_loop): Don't add
3678         OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3679         OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3680         (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3681         constructs.
3682
3683 2015-05-19  Mikhail Maltsev  <maltsevm@gmail.com>
3684
3685         * c-typeck.c (build_array_ref): Use std::swap instead of explicit
3686         swaps.
3687
3688 2015-05-16  Manuel López-Ibáñez  <manu@gcc.gnu.org>
3689
3690         PR fortran/44054
3691         * c-objc-common.c (c_tree_printer): Replace locus pointer with
3692         accessor function.
3693
3694 2015-05-14  Marek Polacek  <polacek@redhat.com>
3695
3696         PR c/66066
3697         PR c/66127
3698         * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
3699         rather than with 0.
3700
3701 2015-05-12  David Malcolm  <dmalcolm@redhat.com>
3702
3703         * c-parser.c (c_parser_if_body): Add param "if_loc", use it
3704         to add a call to warn_for_misleading_indentation.
3705         (c_parser_else_body): Likewise, adding param "else_loc".
3706         (c_parser_if_statement): Check for misleading indentation.
3707         (c_parser_while_statement): Likewise.
3708         (c_parser_for_statement): Likewise.
3709
3710 2015-05-08  Marek Polacek  <polacek@redhat.com>
3711
3712         PR c/64918
3713         * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
3714         (output_init_element): Likewise.
3715
3716 2015-05-07  Marek Polacek  <polacek@redhat.com>
3717
3718         PR c/65179
3719         * c-typeck.c (build_binary_op): Warn when left shifting a negative
3720         value.
3721
3722 2015-04-30  Marek Polacek  <polacek@redhat.com>
3723
3724         * c-typeck.c (set_init_label): Call error_at instead of error and
3725         pass LOC to it.
3726
3727         * c-typeck.c (c_incomplete_type_error): Refactor to use %qT.  Print
3728         the type of a decl.
3729
3730         * c-typeck.c (c_build_va_arg): Clarify the error message.
3731
3732 2015-04-29  Thomas Schwinge  <thomas@codesourcery.com>
3733
3734         * c-parser.c (c_parser_oacc_enter_exit_data): Use
3735         OMP_STANDALONE_CLAUSES.
3736
3737 2015-04-28  Marek Polacek  <polacek@redhat.com>
3738
3739         * c-parser.c (c_parser_binary_expression): Remove duplicate line.
3740
3741 2015-04-28  Marek Polacek  <polacek@redhat.com>
3742
3743         PR c/65901
3744         * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
3745
3746 2015-04-25  Marek Polacek  <polacek@redhat.com>
3747
3748         PR c/52085
3749         * c-decl.c (finish_enum): Copy over TYPE_ALIGN.  Also check for "mode"
3750         attribute.
3751
3752 2015-04-23  Marek Polacek  <polacek@redhat.com>
3753
3754         PR c/65345
3755         * c-decl.c (set_labels_context_r): New function.
3756         (store_parm_decls): Call it via walk_tree_without_duplicates.
3757         * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
3758         instead of create_tmp_var.  Build TARGET_EXPR instead of
3759         COMPOUND_EXPR.
3760         (build_atomic_assign): Use create_tmp_var_raw instead of
3761         create_tmp_var.  Build TARGET_EXPRs instead of MODIFY_EXPR.
3762
3763 2015-04-20  Ilya Verbin  <ilya.verbin@intel.com>
3764
3765         * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
3766         (c_parser_omp_target_update): Add missed %> to error_at ().
3767
3768 2015-04-10  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
3769
3770         PR target/55143
3771         * c-decl.c (c_default_pointer_mode): Remove definition.
3772         * c-tree.h (c_default_pointer_mode): Remove declaration.
3773
3774 2015-03-27  Tobias Burnus  <burnus@net-b.de>
3775
3776         PR c/65586
3777         * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
3778         error out.
3779         (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
3780         c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
3781         Update calls to not error for skipped omp pragmas with -fopenmp-simd.
3782
3783 2015-03-19  Jakub Jelinek  <jakub@redhat.com>
3784
3785         * c-decl.c (c_decl_attributes): Also add "omp declare target"
3786         attribute for DECL_EXTERNAL VAR_DECLs.
3787
3788 2015-03-11  Jakub Jelinek  <jakub@redhat.com>
3789
3790         * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
3791         argument.
3792
3793 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
3794
3795         PR c/65120
3796         * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
3797         before preparing arguments to warn_logical_not_parentheses.
3798
3799 2015-03-09  Jakub Jelinek  <jakub@redhat.com>
3800
3801         PR c/65120
3802         * c-typeck.c (parser_build_binary_op): Don't warn for
3803         !!x == y or !b == y where b is _Bool.
3804
3805 2015-03-09  Marek Polacek  <polacek@redhat.com>
3806
3807         * c-convert.c (convert): Make use of do_ubsan_in_current_function.
3808         * c-decl.c (grokdeclarator): Likewise.
3809         * c-typeck.c (build_binary_op): Likewise.
3810
3811 2015-02-27  Marek Polacek  <polacek@redhat.com>
3812
3813         PR c/65228
3814         * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
3815
3816 2015-02-14  Marek Polacek  <polacek@redhat.com>
3817
3818         PR c/64768
3819         * c-decl.c (grokdeclarator): Set the range of a flexible array member
3820         declared through a typedef name.
3821
3822 2015-02-13  Marek Polacek  <polacek@redhat.com>
3823
3824         PR c/65050
3825         * c-decl.c (grokdeclarator): Print also the type when giving
3826         the error message about array's incomplete element type.
3827
3828 2015-02-11  Jakub Jelinek  <jakub@redhat.com>
3829
3830         PR c/64824
3831         * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
3832         check in the POP macro.
3833
3834 2015-02-09  Marek Polacek  <polacek@redhat.com>
3835
3836         PR c/64856
3837         * c-typeck.c (process_init_element): Don't always wrap
3838         COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
3839         initializing a range of elements.
3840
3841 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
3842
3843         PR c/64824
3844         PR c/64868
3845         * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
3846
3847 2015-02-02  Bruno Loff  <bruno.loff@gmail.com>
3848
3849         * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
3850         processing enum declaration.
3851
3852 2015-01-29  Marek Polacek  <polacek@redhat.com>
3853
3854         PR c/64709
3855         * c-typeck.c (pop_init_level): If constructor_elements has
3856         exactly one element with integer_zerop value, set constructor_zeroinit
3857         to 1.  Remove braces around warning_init call.
3858
3859 2015-01-27  Jakub Jelinek  <jakub@redhat.com>
3860
3861         PR c/64766
3862         * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
3863         of FUNCTION_DECLs with error_mark_node.
3864
3865 2015-01-26  Jakub Jelinek  <jakub@redhat.com>
3866
3867         PR c/64778
3868         * c-typeck.c (convert_arguments): Return -1 if there are
3869         error_args, even if we've diagnosed too many arguments.
3870
3871 2015-01-21  Richard Biener  <rguenther@suse.de>
3872
3873         PR middle-end/64313
3874         * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
3875         for builtins the user declared correctly.
3876
3877 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
3878             Bernd Schmidt  <bernds@codesourcery.com>
3879             Cesar Philippidis  <cesar@codesourcery.com>
3880             James Norris  <jnorris@codesourcery.com>
3881             Jakub Jelinek  <jakub@redhat.com>
3882             Ilmir Usmanov  <i.usmanov@samsung.com>
3883
3884         * c-parser.c: Include "gomp-constants.h".
3885         (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3886         omp_clause_map_kind.  Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3887         Use OMP_CLAUSE_SET_MAP_KIND.
3888         (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
3889         PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
3890         (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
3891         PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
3892         PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
3893         (c_parser_omp_clause_name): Handle "auto", "async", "copy",
3894         "copyout", "create", "delete", "deviceptr", "gang", "host",
3895         "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
3896         "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3897         "present_or_create", "pcreate", "seq", "self", "vector",
3898         "vector_length", "wait", "worker".
3899         (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3900         (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
3901         (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3902         (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3903         (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
3904         (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
3905         (c_parser_oacc_data_clause_deviceptr)
3906         (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
3907         (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
3908         (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
3909         (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
3910         (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
3911         (c_parser_oacc_parallel, c_parser_oacc_update)
3912         (c_parser_oacc_wait): New functions.
3913         * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
3914         (c_finish_oacc_data): New prototypes.
3915         * c-typeck.c: Include "gomp-constants.h".
3916         (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR.  Use
3917         GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.  Use
3918         OMP_CLAUSE_SET_MAP_KIND.
3919         (c_finish_oacc_parallel, c_finish_oacc_kernels)
3920         (c_finish_oacc_data): New functions.
3921         (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
3922         OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
3923         OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
3924         OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
3925         OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
3926         GOMP_MAP_FORCE_DEVICEPTR.
3927
3928 2015-01-09  Michael Collison  <michael.collison@linaro.org>
3929
3930         * c-array-notation.c: Include hash-set.h, machmode.h,
3931         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3932         fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
3933         * c-aux-info.c: Ditto.
3934         * c-convert.c: Ditto.
3935         * c-decl.c: Ditto.
3936         * c-errors.c: Ditto.
3937         * c-lang.c: Dittoxs.
3938         * c-objc-common.c: Ditto.
3939         * c-parser.c: Ditto.
3940         * c-typeck.c: Include hash-set.h, machmode.h,
3941         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3942         fold-const.h, wide-int.h, inchash.h, real.h and
3943         fixed-value.h due to flattening of tree.h.
3944
3945 2015-01-07  Marek Polacek  <polacek@redhat.com>
3946
3947         PR c/64417
3948         * c-typeck.c (process_init_element): Disallow initialization of
3949         a flexible array member with a string constant if the structure
3950         is in an array.
3951
3952 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
3953
3954         PR sanitizer/64344
3955         * c-typeck.c (convert_for_assignment, c_finish_return): For
3956         -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
3957         types also set in_late_binary_op around convert call.
3958         * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
3959         to integral type casts, if not in_late_binary_op, pass c_fully_fold
3960         result on expr as last argument to ubsan_instrument_float_cast,
3961         if in_late_binary_op, don't use c_save_expr but save_expr.
3962
3963         Update copyright years.
3964
3965 2015-01-05  Marek Polacek  <polacek@redhat.com>
3966
3967         PR c/64423
3968         * c-typeck.c (build_array_ref): Pass loc down to
3969         warn_array_subscript_with_type_char.
3970
3971 2014-12-20  Martin Uecker  <uecker@eecs.berkeley.edu>
3972
3973         * c-typeck.c: New behavious for pointers to arrays with qualifiers
3974         (common-pointer-type): For pointers to arrays take qualifiers from
3975         element type.
3976         (build_conditional_expr): Add warnings for lost qualifiers.
3977         (comp-target-types): Allow pointers to arrays with different qualifiers.
3978         (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
3979         WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
3980         to PEDWARN_FOR_QUALIFIERS.
3981
3982 2014-12-17  Jakub Jelinek  <jakub@redhat.com>
3983
3984         PR sanitizer/64289
3985         * c-convert.c: Include ubsan.h.
3986         (convert): For real -> integral casts and
3987         -fsanitize=float-cast-overflow don't call convert_to_integer, but
3988         instead instrument the float cast directly.
3989
3990 2014-11-29  Jakub Jelinek  <jakub@redhat.com>
3991
3992         * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
3993         c_finish_stmt_expr): Remove NULL last argument from
3994         create_tmp_var_raw and create_tmp_var calls.
3995         * c-array-notation.c (fix_builtin_array_notation_fn,
3996         build_array_notation_expr, fix_conditional_array_notations_1,
3997         fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
3998
3999 2014-11-28  Marek Polacek  <polacek@redhat.com>
4000
4001         PR c/63862
4002         * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
4003         convert the right operand to integer type.
4004
4005 2014-11-25  Marek Polacek  <polacek@redhat.com>
4006
4007         PR c/63877
4008         * c-decl.c (start_function): Disable -Wmissing-declarations warning
4009         for inline functions.
4010
4011 2014-11-21  Jakub Jelinek  <jakub@redhat.com>
4012
4013         PR target/63764
4014         * c-typeck.c (build_array_ref): Adjust
4015         convert_vector_to_pointer_for_subscript caller.  If it returns true,
4016         call non_lvalue_loc on the result.
4017
4018 2014-11-11  Richard Biener  <rguenther@suse.de>
4019
4020         * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
4021         to true.
4022
4023 2014-11-10  Andi Kleen  <ak@linux.intel.com>
4024
4025         PR c/60804
4026         * c-parser.c (c_parser_statement_after_labels): Call
4027         check_no_cilk.
4028         (c_parser_if_statement): Dito.
4029         (c_parser_switch_statement): Dito.
4030         (c_parser_while_statement): Dito.
4031         (c_parser_do_statement): Dito.
4032         (c_parser_for_statement): Dito.
4033         * c-typeck.c (c_finish_loop): Dito.
4034
4035 2014-11-10  Paolo Carlini  <paolo.carlini@oracle.com>
4036
4037         * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
4038         OPT_Wshift_count_overflow in the warnings.
4039
4040 2014-10-30  Marek Polacek  <polacek@redhat.com>
4041
4042         * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
4043         print the stripped version as well, if they're not the same.
4044
4045 2014-10-29  Richard Sandiford  <richard.sandiford@arm.com>
4046
4047         * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
4048         machine_mode.
4049
4050 2014-10-28  Andrew MacLeod  <amacleod@redhat.com>
4051
4052         * c-decl.c: Adjust include files.
4053         * c-parser.c: Ditto.
4054
4055 2014-10-27  Phil Muldoon  <pmuldoon@redhat.com>
4056             Tom Tromey  <tromey@redhat.com>
4057
4058         * c-tree.h (enum c_oracle_request): New.
4059         (c_binding_oracle_function): New typedef.
4060         (c_binding_oracle, c_pushtag, c_bind): Declare.
4061         * c-decl.c (c_binding_oracle): New global.
4062         (I_SYMBOL_CHECKED): New macro.
4063         (i_symbol_binding): New function.
4064         (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
4065         (I_TAG_CHECKED): New macro.
4066         (i_tag_binding): New function.
4067         (I_TAG_BINDING, I_TAG_DECL): Redefine.
4068         (I_LABEL_CHECKED): New macro.
4069         (i_label_binding): New function.
4070         (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
4071         (c_print_identifier): Save and restore c_binding_oracle.
4072         (c_pushtag, c_bind): New functions.
4073
4074 2014-10-27  Andrew MacLeod  <amacleod@redhat.com>
4075
4076         * c-typeck.c: Adjust include files.
4077
4078 2014-10-26  Manuel López-Ibáñez  <manu@gcc.gnu.org>
4079
4080         PR c++/53061
4081         * c-objc-common.c (c_objc_common_init): Do not do diagnostics
4082         initialization here...
4083         (c_initialize_diagnostics): ... but here. Set defaults after
4084         building pretty-printer.
4085
4086 2014-10-23  Marek Polacek  <polacek@redhat.com>
4087
4088         PR c/63626
4089         * c-decl.c (pop_scope): Don't print warning in external_scope.
4090
4091 2014-10-19  Marek Polacek  <polacek@redhat.com>
4092
4093         PR c/63567
4094         * c-typeck.c (output_init_element): Allow initializing objects with
4095         static storage duration with compound literals even in C99 and add
4096         pedwarn for it.
4097
4098 2014-10-17  Marek Polacek  <polacek@redhat.com>
4099
4100         PR c/63567
4101         * c-typeck.c (digest_init): Allow initializing objects with static
4102         storage duration with compound literals even in C99 and add pedwarn
4103         for it.
4104
4105 2014-10-17  Marek Polacek  <polacek@redhat.com>
4106
4107         PR c/63543
4108         * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
4109         * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
4110         error multiple times.  Print the type.
4111
4112 2014-10-17  Marek Polacek  <polacek@redhat.com>
4113
4114         PR c/63549
4115         * c-typeck.c (build_array_ref): Bail if the index in an incomplete
4116         type.
4117
4118 2014-10-17  Marek Polacek  <polacek@redhat.com>
4119
4120         * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
4121         (start_function): Use OPT_Wimplicit_int instead of 0.
4122         (store_parm_decls_oldstyle): Likewise.
4123
4124 2014-10-17  Alan Modra  <amodra@gmail.com>
4125
4126         PR middle-end/61848
4127         * c-decl.c (merge_decls): Don't merge section name or tls model
4128         to newdecl symtab node, instead merge to olddecl.  Override
4129         existing olddecl section name.  Set tls_model for all thread-local
4130         vars, not just OMP thread-private ones.  Remove incorrect comment.
4131
4132 2014-10-16  Andrew MacLeod  <amacleod@redhat.com>
4133
4134         * c-decl.c: Adjust include files.
4135
4136 2014-10-14  DJ Delorie  <dj@redhat.com>
4137
4138         * c-parser.c (c_parse_init): Add RID entries for each __intN.
4139         (c_token_starts_typename): Check all __intN, not just __int128.
4140         (c_token_starts_declspecs): Likewise.
4141         (c_parser_declspecs): Likewise.
4142         (c_parser_attribute_any_word): Likewise.
4143         (c_parser_objc_selector): Likewise.
4144         * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
4145         (struct c_declspecs): Add int_n_idx field to record *which* __intN
4146         is specified.
4147         * c-decl.c (declspecs_add_type): Check for all __intN, not just
4148         __int128.
4149         (finish_declspecs): Likewise.
4150
4151 2014-10-13  Anthony Brandon  <anthony.brandon@gmail.com>
4152
4153         * c-parser.c (c_parser_all_labels): New function to replace
4154         the duplicate code.
4155         (c_parser_statement): Call the new function.
4156
4157 2014-10-09  Marek Polacek  <polacek@redhat.com>
4158
4159         PR c/63480
4160         * c-typeck.c (pop_init_level): Don't warn about initializing
4161         with { }.
4162
4163 2014-10-07  Marek Polacek  <polacek@redhat.com>
4164
4165         PR c/59717
4166         * c-decl.c (header_for_builtin_fn): New function.
4167         (implicitly_declare): Suggest which header to include.
4168
4169 2014-10-07  Marek Polacek  <polacek@redhat.com>
4170
4171         * c-convert.c (convert): Use error_operand_p.
4172         * c-typeck.c (require_complete_type): Likewise.
4173         (really_atomic_lvalue): Likewise.
4174         (digest_init): Likewise.
4175         (handle_omp_array_sections_1): Likewise.
4176
4177 2014-10-03  Marek Polacek  <polacek@redhat.com>
4178
4179         PR c/63453
4180         * c-decl.c (pop_scope): Don't warn about "inline function declared
4181         but never defined" for functions marked with gnu_inline attribute.
4182
4183 2014-09-25  Jakub Jelinek  <jakub@redhat.com>
4184
4185         PR c++/63249
4186         * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
4187         on low_bound and length.
4188
4189 2014-09-24  Marek Polacek  <polacek@redhat.com>
4190
4191         PR c/61405
4192         PR c/53874
4193         * c-parser.c: Don't define CPP_KEYWORD.
4194         (c_parser_switch_statement): Pass original type to c_finish_case.
4195         * c-tree.h (c_finish_case): Update declaration.
4196         * c-typeck.c (c_finish_case): Add TYPE parameter.  Pass it
4197         conditionally to c_do_switch_warnings.
4198
4199 2014-09-03  Marek Polacek  <polacek@redhat.com>
4200
4201         PR c/62024
4202         * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
4203         conversions.
4204
4205 2014-09-02  Jakub Jelinek  <jakub@redhat.com>
4206             Balaji V. Iyer  <balaji.v.iyer@intel.com>
4207             Igor Zamyatin  <igor.zamyatin@intel.com>
4208
4209         * c-parser.c (c_parser_cilk_for): New function.
4210         (c_parser_cilk_grainsize): Likewise.
4211         (c_get_temp_regvar): Likewise.
4212         (c_parser_statement_after_labels): Added RID_CILK_FOR case.
4213         (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
4214         (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
4215         * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
4216         case.
4217
4218 2014-08-27  Chen Gang  <gang.chen.5i5j@gmail.com>
4219
4220         * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
4221         with using HOST_WIDE_INT without truncation to 'int'
4222
4223 2014-08-22  Marek Polacek  <polacek@redhat.com>
4224
4225         PR c++/62199
4226         * c-typeck.c (parser_build_binary_op): Adjust call to
4227         warn_logical_not_parentheses.
4228
4229 2014-08-22  Igor Zamyatin  <igor.zamyatin@intel.com>
4230
4231         PR other/62008
4232         * c-parser.c (c_parser_array_notation): Check for correct
4233         type of an array added.
4234
4235 2014-08-19  Marek Polacek  <polacek@redhat.com>
4236
4237         PR c++/62153
4238         * c-typeck.c (build_binary_op): If either operand of a comparison
4239         is a boolean expression, call maybe_warn_bool_compare.
4240
4241 2014-08-19  Patrick Palka  <ppalka@gcc.gnu.org>
4242
4243         PR c/45584
4244         * c-typeck.c (build_c_cast): Do a conversion even when the
4245         TYPE_MAIN_VARIANTs are the same.
4246
4247 2014-08-19  Marek Polacek  <polacek@redhat.com>
4248
4249         * c-decl.c (diagnose_mismatched_decls): Unconditionally call
4250         pedwarn_c99 instead of pedwarn.
4251         (grokfield): Likewise.
4252         (warn_defaults_to): New function.
4253         (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
4254         Unconditionally call pedwarn_c99 instead of pedwarn.
4255         (start_function): Call warn_defaults_to instead of pedwarn_c99.
4256         (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
4257         check flag_isoc11 before.
4258         * c-errors.c (pedwarn_c99): Change the return type to bool.
4259         Handle -Wc99-c11-compat.
4260         * c-parser.c (disable_extension_diagnostics): Handle
4261         warn_c99_c11_compat.
4262         (restore_extension_diagnostics): Likewise.
4263         (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
4264         instead of pedwarn, don't check flag_isoc11 before.
4265         (c_parser_declspecs): Likewise.
4266         (c_parser_alignas_specifier): Likewise.
4267         (c_parser_alignof_expression): Likewise.
4268         (c_parser_generic_selection): Likewise.
4269         * c-tree.h (pedwarn_c99): Update declaration.
4270         * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
4271         of pedwarn_c99.
4272
4273 2014-08-19  Marek Polacek  <polacek@redhat.com>
4274
4275         * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
4276         to pedwarn_c90.
4277         * c-errors.c: Include "opts.h".
4278         (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
4279         * c-parser.c (disable_extension_diagnostics): Handle negative value
4280         of warn_c90_c99_compat, too.
4281         (restore_extension_diagnostics): Likewise.
4282         (c_parser_compound_statement_nostart): Pass
4283         OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
4284
4285 2014-08-12  Marek Polacek  <polacek@redhat.com>
4286
4287         * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
4288         Add pedwarn.
4289         (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
4290         Likewise.
4291         (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
4292
4293 2014-08-10  Marek Polacek  <polacek@redhat.com>
4294
4295         PR c/51849
4296         * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
4297         Call pedwarn_c90 instead of pedwarn.
4298         (check_bitfield_type_and_width): Likewise.
4299         (declspecs_add_qual): Likewise.
4300         (declspecs_add_type): Likewise.
4301         (warn_variable_length_array): Unify function for -pedantic and -Wvla.
4302         Adjust to only call pedwarn_c90.
4303         (grokdeclarator): Remove pedantic && !flag_isoc99 check.  Call
4304         pedwarn_c90 instead of pedwarn.
4305         * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
4306         * c-parser.c (disable_extension_diagnostics): Handle
4307         warn_c90_c99_compat.
4308         (restore_extension_diagnostics): Likewise.
4309         (c_parser_enum_specifier): Remove check for !flag_isoc99.  Call
4310         pedwarn_c90 instead of pedwarn.
4311         (c_parser_initelt): Likewise.
4312         (c_parser_postfix_expression): Likewise.
4313         (c_parser_postfix_expression_after_paren_type): Likewise.
4314         (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
4315         * c-tree.h: Fix formatting.
4316         * c-typeck.c (build_array_ref): Remove check for !flag_isoc99.  Call
4317         pedwarn_c90 instead of pedwarn.
4318
4319 2014-08-07  Trevor Saunders  <tsaunders@mozilla.com>
4320
4321         * c-typeck.c: Remove include of pointer-set.h.
4322
4323 2014-08-07  Marek Polacek  <polacek@redhat.com>
4324
4325         * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
4326
4327 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
4328
4329         * c-typeck.c: Use hash_map instead of pointer_map.
4330
4331 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
4332
4333         * c-decl.c: Use hash_set instead of pointer_set.
4334
4335 2014-08-01  Igor Zamyatin  <igor.zamyatin@intel.com>
4336
4337         PR middle-end/61455
4338         * c-array-notation.c (expand_array_notations): Handling
4339         of DECL_EXPR added.
4340
4341 2014-07-31  Marc Glisse  <marc.glisse@inria.fr>
4342
4343         PR c++/60517
4344         * c-typeck.c (c_finish_return): Return 0 instead of the address of
4345         a local variable.
4346
4347 2014-07-30  Tom Tromey  <tromey@redhat.com>
4348
4349         * c-typeck.c (struct constructor_stack) <designator_depth>: New
4350         field.
4351         (really_start_incremental_init, push_init_level): Initialize
4352         designator_depth.
4353         (pop_init_level): Set global designator_depth.
4354         (process_init_element): Check for designated_init attribute.
4355
4356 2014-07-20  Marek Polacek  <polacek@redhat.com>
4357
4358         PR c/61852
4359         * c-decl.c (implicit_decl_warning): Add location_t parameter.  Use it.
4360         (implicitly_declare): Pass location to implicit_decl_warning.
4361
4362 2014-07-14  Jakub Jelinek  <jakub@redhat.com>
4363
4364         PR middle-end/61294
4365         * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
4366         If non-NULL, call c_parser_check_literal_zero.
4367         (c_parser_check_literal_zero): New function.
4368         (c_parser_postfix_expression_after_primary): Adjust
4369         c_parser_expr_list caller, handle -Wmemset-transposed-args.
4370
4371 2014-07-06  Marek Polacek  <polacek@redhat.com>
4372
4373         PR c/6940
4374         * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4375         * c-tree.h (C_ARRAY_PARAMETER): Define.
4376         * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4377         function parameter.
4378
4379 2014-07-02  Jan Hubicka  <hubicka@ucw.cz>
4380             Chen Gang  <gang.chen.5i5j@gmail.com>
4381
4382         * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4383         releasing symbol.
4384
4385 2014-07-01  Marek Polacek  <polacek@redhat.com>
4386
4387         * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4388         instead of 0 to WARN_FOR_ASSIGNMENT.
4389
4390 2014-07-01  Marek Polacek  <polacek@redhat.com>
4391
4392         PR c/58286
4393         * c-typeck.c (convert_for_assignment): Pass
4394         OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4395
4396 2014-06-30  Marek Polacek  <polacek@redhat.com>
4397
4398         * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4399         has no_sanitize_undefined attribute.
4400
4401 2014-06-30  Igor Zamyatin  <igor.zamyatin@intel.com>
4402
4403         PR middle-end/57541
4404         * c-array-notation.c (fix_builtin_array_notation_fn):
4405         Check for 0 arguments in builtin call. Check that bultin argument is
4406         correct.
4407         * c-parser.c (c_parser_array_notation): Check for incorrect initial
4408         index.
4409
4410 2014-06-27  Sebastian Huber  <sebastian.huber@embedded-brains.de>
4411
4412         * c-parser.c (c_parser_declaration_or_fndef): Discard all type
4413         qualifiers in __auto_type for atomic types.
4414         (c_parser_typeof_specifier): Discard all type qualifiers in
4415         __typeof__ for atomic types.
4416
4417 2014-06-25  Marek Polacek  <polacek@redhat.com>
4418
4419         PR c/61162
4420         * c-parser.c (c_parser_statement_after_labels): Pass the location of
4421         the return expression to c_finish_return.
4422
4423 2014-06-25  Jakub Jelinek  <jakub@redhat.com>
4424
4425         * c-typeck.c (c_finish_omp_clauses): Make sure
4426         OMP_CLAUSE_LINEAR_STEP has correct type.
4427
4428 2014-06-24  Trevor Saunders  <tsaunders@mozilla.com>
4429
4430         * c-decl.c: Adjust.
4431
4432 2014-06-24  Jakub Jelinek  <jakub@redhat.com>
4433
4434         * c-parser.c (c_parser_omp_for_loop): For
4435         #pragma omp parallel for simd move lastprivate clause from parallel
4436         to for rather than simd.
4437
4438 2014-06-23  Marek Polacek  <polacek@redhat.com>
4439
4440         * c-typeck.c (parser_build_binary_op): Don't call
4441         warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
4442
4443 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
4444
4445         * c-parser.c (c_parser_omp_threadprivate): Likewise.
4446         * c-decl.c (merge_decls): Likewise.
4447
4448 2014-06-09  Marek Polacek  <polacek@redhat.com>
4449
4450         PR c/36446
4451         * c-typeck.c (error_init): Call inform instead of error_at.
4452         (pedwarn_init): Call inform instead of pedwarn.
4453         (warning_init): Call inform instead of warning_at.
4454
4455 2014-06-07  Jan Hubicka  <hubicka@ucw.cz>
4456
4457         * c-decl.c (merge_decls): Use set_decl_section_name.
4458         (duplicate_decls): Remove node if it exists.
4459
4460 2014-06-05  S. Gilles  <sgilles@terpmail.umd.edu>
4461
4462         PR c/53119
4463         * c-typeck.c (push_init_level, process_init_element,
4464         pop_init_level): Correct check for zero initialization, move
4465         missing brace warning to respect zero initialization.
4466
4467 2014-06-05  Marek Polacek  <polacek@redhat.com>
4468
4469         PR c/56724
4470         * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
4471
4472 2014-06-05  Marek Polacek  <polacek@redhat.com>
4473
4474         PR c/49706
4475         * c-typeck.c (parser_build_binary_op): Warn when logical not is used
4476         on the left hand side operand of a comparison. 
4477
4478 2014-06-05  Marek Polacek  <polacek@redhat.com>
4479
4480         PR c/48062
4481         * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
4482         Print note only if the warning was printed.
4483
4484 2014-06-04  Igor Zamyatin  <igor.zamyatin@intel.com>
4485
4486         PR c/58942
4487         * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4488         with a pointer.
4489
4490 2014-06-03  Marek Polacek  <polacek@redhat.com>
4491
4492         PR c/60439
4493         * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4494         c_start_case.
4495         * c-tree.h (c_start_case): Update.
4496         * c-typeck.c (c_start_case): Add new boolean parameter.  Warn if
4497         switch condition has boolean value.
4498
4499 2014-06-02  Andrew MacLeod  <amacleod@redhat.com>
4500
4501         * c-decl.c: Include builtins.h.
4502         * c-parser.c: Likewise.
4503
4504 2014-05-27  Marek Polacek  <polacek@redhat.com>
4505
4506         PR c/56724
4507         * c-typeck.c (convert_arguments): Get location of a parameter.  Change
4508         error and warning calls to error_at and warning_at.  Pass location of
4509         a parameter to it.  Call warning_at with OPT_Wtraditional_conversion.
4510         (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4511         WARN_FOR_QUALIFIERS.  Pass expr_loc to those.
4512
4513 2014-05-26  Igor Zamyatin  <igor.zamyatin@intel.com>
4514
4515         PR c/61191
4516         * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4517         function parameters.
4518
4519 2014-05-23  Jan Hubicka  <hubicka@ucw.cz>
4520
4521         * c-decl.c (merge_decls): Preserve symtab node pointers.
4522         (duplicate_decls): Free new decl.
4523
4524 2014-05-23  Thomas Schwinge  <thomas@codesourcery.com>
4525
4526         * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4527         initialization.
4528
4529         * c-parser.c (c_parser_omp_target): Return bool values.
4530
4531 2014-05-22  Thomas Schwinge  <thomas@codesourcery.com>
4532
4533         * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4534         num_teams_loc variable to num_thread_limit_loc.
4535
4536 2014-05-21  Richard Sandiford  <rsandifo@linux.vnet.ibm.com>
4537
4538         * c-array-notation.c (expand_array_notations): Use void_node
4539         instead of void_zero_node.
4540
4541 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
4542
4543         * c-decl.c (finish_struct): Adjust.
4544         (finish_enum): Likewise.
4545         (bind): Adjust.
4546         (record_inline_static): Likewise.
4547         (push_scope): Likewise.
4548         (make_label): Likewise.
4549         (lookup_label_for_goto): Likewise.
4550         (finish_struct): Likewise.
4551         (finish_enum): Likewise.
4552         (store_parm_decls): Likewise.
4553         (c_push_function_context): Likewise.
4554         * c-lang.h: Remove usage of variable_size gty attribute.
4555         * c-parser.c (c_parse_init): Adjust.
4556         (c_parse_file): Likewise.
4557
4558 2014-05-13  Marek Polacek  <polacek@redhat.com>
4559
4560         PR c/61162
4561         * c-typeck.c (convert_for_assignment): Pass location to
4562         WARN_FOR_ASSIGNMENT instead of input_location.
4563
4564 2014-05-10  Marek Polacek  <polacek@redhat.com>
4565
4566         * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4567         maybe_warn_string_init.
4568         (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4569         maybe_warn_string_init.
4570         * c-tree.h (maybe_warn_string_init): Update declaration.
4571         * c-typeck.c (maybe_warn_string_init): Add location parameter.
4572         Call pedwarn_init with loc instead of with input_location.
4573         (digest_init): Pass init_loc to maybe_warn_string_init.
4574         (pop_init_level): Call pedwarn_init with loc instead of with
4575         input_location.
4576         (set_init_index): Likewise.
4577         (process_init_element): Likewise.
4578
4579 2014-05-09  Marek Polacek  <polacek@redhat.com>
4580
4581         PR c/61096
4582         * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4583         (c_parser_initelt): Pass location to set_init_label.  Pass array index
4584         location to set_init_index.
4585         * c-tree.h (push_init_level): Update declaration.
4586         (pop_init_level): Likewise.
4587         (set_init_index): Likewise.
4588         (set_init_label): Likewise.
4589         * c-typeck.c (error_init): Add location parameter.  Call error_at
4590         instead of error.
4591         (digest_init): Pass init_loc to error_init.
4592         (really_start_incremental_init):
4593         (push_init_level): Add location parameter.  Pass loc to pop_init_level
4594         and error_init.
4595         (pop_init_level): Likewise.
4596         (set_designator): Add location parameter.  Pass loc to pop_init_level,
4597         push_init_level, and error_init.
4598         (set_init_index): Add location parameter.  Pass loc to error_init and
4599         set_designator.
4600         (set_init_label): Likewise.
4601         (output_init_element): Pass loc to error_init.
4602         (process_init_element): Pass loc to error_init, pop_init_level,
4603         pedwarn_init, and push_init_level.
4604
4605 2014-05-09  Marek Polacek  <polacek@redhat.com>
4606
4607         PR c/50459
4608         * c-parser.c (c_parser_attributes): Parse the arguments as an
4609         expression-list if the attribute takes identifier.
4610
4611 2014-05-08  Marek Polacek  <polacek@redhat.com>
4612
4613         PR c/61053
4614         * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4615         TYPE_ALIGN_UNIT.
4616
4617 2014-05-08  Marek Polacek  <polacek@redhat.com>
4618
4619         PR c/61077
4620         * c-decl.c (start_function): Warn for _Atomic-qualified return type
4621         of main.
4622
4623 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
4624             Mike Stump  <mikestump@comcast.net>
4625             Richard Sandiford  <rdsandiford@googlemail.com>
4626
4627         * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4628         (finish_enum): Use wide-int interfaces.
4629         * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4630         * c-typeck.c (build_c_cast): Likewise.
4631         (set_nonincremental_init_from_string): Likewise.
4632         (c_tree_equal): Likewise.
4633
4634 2014-05-02  Marek Polacek  <polacek@redhat.com>
4635
4636         PR c/25801
4637         * c-typeck.c (c_size_in_bytes): Update comment.  Don't call error.
4638         Return size_one_node when the type is not complete.
4639         (pointer_diff): Remove comment.
4640         (build_unary_op): Improve error messages.
4641
4642 2014-05-02  Marek Polacek  <polacek@redhat.com>
4643
4644         * c-typeck.c (c_finish_return): Separate warning_at calls.
4645
4646 2014-05-02  Marek Polacek  <polacek@redhat.com>
4647
4648         * c-tree.h (error_init): Remove declaration.
4649         (pedwarn_init): Likewise.
4650         * c-typeck.c (error_init): Make static and move above.
4651         (pedwarn_init): Likewise.
4652         (warning_init): Move above.
4653         (maybe_warn_string_init): Likewise.
4654
4655 2014-05-01  Jeff Law  <law@redhat.com>
4656
4657         Revert:
4658
4659         2014-04-24  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
4660         * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
4661         avoid goto.
4662
4663 2014-05-02  Marek Polacek  <polacek@redhat.com>
4664
4665         PR c/60784
4666         * c-typeck.c (push_init_level): Set constructor_designated to
4667         p->designated for structures.
4668
4669 2014-05-01  Marek Polacek  <polacek@redhat.com>
4670
4671         PR c/60915
4672         * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4673         function-definition has an attribute after the declarator.
4674
4675 2014-05-01  Marek Polacek  <polacek@redhat.com>
4676
4677         PR c/60257
4678         * c-typeck.c (warning_init): Add location_t parameter.  Call
4679         warning_at instead of warning.
4680         (push_init_level): Pass input_location to warning_init.
4681         (add_pending_init): Add location_t parameter.  Pass loc to
4682         warning_init.
4683         (set_nonincremental_init): Pass input_location to add_pending_init.
4684         (set_nonincremental_init_from_string): Likewise.
4685         (output_init_element): Pass loc to warning_init and to
4686         add_pending_init.
4687
4688 2014-05-01  Marek Polacek  <polacek@redhat.com>
4689
4690         PR c/43395
4691         * c-typeck.c (c_finish_return): Distinguish between label and variable
4692         when warning about returning local address.
4693
4694 2014-05-01  Marek Polacek  <polacek@redhat.com>
4695
4696         PR c/29467
4697         * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
4698         in C89 mode.
4699
4700 2014-05-01  Marek Polacek  <polacek@redhat.com>
4701
4702         PR c/43245
4703         * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
4704         instead of 0 to WARN_FOR_QUALIFIERS.
4705
4706 2014-05-01  Marek Polacek  <polacek@redhat.com>
4707
4708         PR c/56989
4709         * c-typeck.c (default_conversion): Use better location for
4710         error call.
4711
4712 2014-04-30  Marek Polacek  <polacek@redhat.com>
4713
4714         * c-typeck.c (build_binary_op): Call ubsan_instrument_division
4715         also when SANITIZE_FLOAT_DIVIDE is on.
4716
4717 2014-04-30  Marek Polacek  <polacek@redhat.com>
4718
4719         PR c/60139
4720         * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
4721         and pedwarn_init.  Use loc insted of input_location.
4722
4723 2014-04-30  Marek Polacek  <polacek@redhat.com>
4724
4725         PR c/60351
4726         * c-typeck.c (build_binary_op): Use location when warning about
4727         shift count.
4728
4729 2014-04-25  Marek Polacek  <polacek@redhat.com>
4730
4731         PR c/18079
4732         * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
4733         always_inline/noinline and hot/cold attributes.
4734
4735 2014-04-25  Marek Polacek  <polacek@redhat.com>
4736
4737         PR c/60114
4738         * c-parser.c (c_parser_initelt): Pass input_location to
4739         process_init_element.
4740         (c_parser_initval): Pass loc to process_init_element.
4741         * c-tree.h (process_init_element): Adjust declaration.
4742         * c-typeck.c (push_init_level): Pass input_location to
4743         process_init_element.
4744         (pop_init_level): Likewise.
4745         (set_designator): Likewise.
4746         (output_init_element): Add location_t parameter.  Pass loc to
4747         digest_init.
4748         (output_pending_init_elements): Pass input_location to
4749         output_init_element.
4750         (process_init_element): Add location_t parameter.  Pass loc to
4751         output_init_element.
4752
4753 2014-04-24  Jakub Jelinek  <jakub@redhat.com>
4754
4755         * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
4756         atomic-clause, allow comma in between atomic-clause and
4757         seq_cst.
4758
4759 2014-04-22  Jakub Jelinek  <jakub@redhat.com>
4760
4761         PR c/59073
4762         * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
4763         fails, don't set OM_PARALLEL_COMBINED and return NULL.
4764
4765 2014-04-12  Igor Zamyatin  <igor.zamyatin@intel.com>
4766
4767         PR middle-end/60469
4768         * c-array-notation.c (fix_builtin_array_notation_fn): Use
4769         create_tmp_var instead build_decl for creating temps.
4770         (build_array_notation_expr): Likewise.
4771         (fix_conditional_array_notations_1): Likewise.
4772         (fix_array_notation_expr): Likewise.
4773         (fix_array_notation_call_expr): Likewise.
4774
4775 2014-03-28  Jakub Jelinek  <jakub@redhat.com>
4776
4777         PR c++/60689
4778         * c-tree.h (c_build_function_call_vec): New prototype.
4779         * c-typeck.c (build_function_call_vec): Don't call
4780         resolve_overloaded_builtin here.
4781         (c_build_function_call_vec): New wrapper function around
4782         build_function_call_vec.  Call resolve_overloaded_builtin here.
4783         (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
4784         Call c_build_function_call_vec instead of build_function_call_vec.
4785         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4786         * c-decl.c (finish_decl): Likewise.
4787
4788 2014-03-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
4789
4790         PR c/55383
4791         * c-typeck.c: Use correct format string in cast-qual warning
4792
4793 2014-03-07  Thomas Schwinge  <thomas@codesourcery.com>
4794
4795         * c-decl.c (c_decl_attributes): Use
4796         lang_hooks.types.omp_mappable_type.
4797         * c-typeck.c (c_finish_omp_clauses): Likewise.
4798
4799 2014-03-06  Marek Polacek  <polacek@redhat.com>
4800
4801         PR c/60197
4802         * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
4803         of checking tree code.
4804
4805 2014-02-19  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
4806
4807         * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
4808         (c_parser_parameter_declaration): Likewise.
4809
4810 2014-02-19  Marek Polacek  <polacek@redhat.com>
4811
4812         PR c/60195
4813         * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
4814         Call mark_exp_read on exp.value.
4815         (build_atomic_assign): Set TREE_NO_WARNING on val and old.  Set
4816         TREE_ADDRESSABLE on old instead of val.
4817         (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
4818
4819 2014-02-07  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
4820
4821         * c-parser.c (c_parser_get_builtin_args): Replace calls to
4822         C_EXPR_APPEND by vec_safe_push.
4823         * c-tree.h (C_EXPR_APPEND): Remove.
4824
4825 2014-01-31  Marek Polacek  <polacek@redhat.com>
4826
4827         PR c/59963
4828         * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
4829         build_function_call_vec.
4830         (build_function_call): Likewise.
4831         (build_atomic_assign): Likewise.
4832         (build_function_call_vec): Add arg_loc parameter.  Use it.
4833         (convert_arguments): Likewise.
4834         (convert_for_assignment): Rename rhs_loc to expr_loc.
4835         * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
4836         (c_parser_objc_keywordexpr): Likewise.
4837         (c_parser_postfix_expression_after_primary): Call
4838         build_function_call_vec with expr_loc rather than op_loc.
4839         Call c_parser_expr_list to fill arg_loc.  Pass arg_loc to
4840         build_function_call_vec.
4841         (c_parser_expr_list): Add locations parameter.  Fill it with locations
4842         of function arguments.
4843         * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
4844
4845 2014-01-30  Marek Polacek  <polacek@redhat.com>
4846
4847         PR c/59940
4848         * c-typeck.c (build_function_call_vec): Use loc parameter.
4849         (convert_arguments): Add location parameter.  Use it.
4850         (ep_convert_and_check): Likewise.
4851         (build_atomic_assign): Adjust convert_for_assignment call.
4852         (build_modify_expr): Likewise.
4853         (digest_init): Likewise.
4854         (c_finish_return): Likewise.
4855         (build_conditional_expr): Adjust ep_convert_and_check calls.
4856         (convert_for_assignment): Add rhs_loc parameter.  Use it.
4857         (build_binary_op): Adjust convert_and_check and ep_convert_and_check
4858         calls.
4859
4860 2014-01-30  Richard Biener  <rguenther@suse.de>
4861
4862         PR c/59905
4863         * c-typeck.c (build_function_call_vec): Do not replace calls
4864         to a function via an incompatible type with a runtime abort.
4865
4866 2014-01-24  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4867
4868         * c-parser.c (c_parser_declaration_or_fndef): Replaced
4869         flag_enable_cilkplus with flag_cilkplus.
4870         (c_parser_direct_declarator_inner): Likewise.
4871         (c_parser_attribute_any_word): Likewise.
4872         (c_parser_attributes): Likewise.
4873         (c_parser_compound_statement): Likewise.
4874         (c_parser_statement_after_labels): Likewise.
4875         (c_parser_if_statement): Likewise.
4876         (c_parser_switch_statement): Likewise.
4877         (c_parser_do_statement): Likewise.
4878         (c_parser_for_statement): Likewise.
4879         (c_parser_unary_expression): Likewise.
4880         (c_parser_postfix_expression): Likewise.
4881         (c_parser_postfix_expression_after_primary): Likewise.
4882         (c_parser_postfix_expression_after_primary): Likewise.
4883         (c_parser_omp_clause_name): Likewise.
4884         (c_finish_omp_declare_simd): Likewise.
4885         (c_parser_cilk_verify_simd): Likewise.
4886         * c-typeck.c (build_array_ref): Likewise.
4887         (build_function_call_vec): Likewise.
4888         (convert_arguments): Likewise.
4889         (build_compound_expr): Likewise.
4890         (c_finish_return): Likewise.
4891         (c_finish_if_stmt): Likewise.
4892         (c_finish_loop): Likewise.
4893         (build_binary_op): Likewise.
4894
4895 2014-01-23  Marek Polacek  <polacek@redhat.com>
4896
4897         PR c/59846
4898         * c-typeck.c (parser_build_binary_op): Use location instead of
4899         input_location.
4900         (build_binary_op): Pass location to shorten_compare.
4901
4902 2014-01-23  Marek Polacek  <polacek@redhat.com>
4903
4904         PR c/58346
4905         * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
4906         an empty aggregate.
4907
4908 2014-01-23  Marek Polacek  <polacek@redhat.com>
4909
4910         PR c/59871
4911         * c-typeck.c (build_compound_expr): Warn even for right-hand operand
4912         of a comma expression.
4913         (emit_side_effect_warnings): Likewise.
4914
4915 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4916
4917         PR c/59825
4918         * c-array-notation.c (expand_array_notation_exprs): Rewrote this
4919         function to use walk_tree and moved a lot of its functionality to
4920         expand_array_notations.
4921         (expand_array_notations): New function.
4922
4923 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4924
4925         * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
4926         attribute an attribute without value.
4927
4928 2014-01-23  Jakub Jelinek  <jakub@redhat.com>
4929
4930         PR middle-end/58809
4931         * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
4932         BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
4933
4934 2014-01-22  Marek Polacek  <polacek@redhat.com>
4935
4936         PR c/59891
4937         * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
4938         of remove_c_maybe_const_expr on op1 and op2.
4939
4940 2014-01-15  Jakub Jelinek  <jakub@redhat.com>
4941
4942         PR c/58943
4943         * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
4944         effects, preevaluate rhs using SAVE_EXPR first.
4945
4946 2014-01-09  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4947
4948         PR c++/59631
4949         * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
4950         statements with if-elseif statements.
4951
4952 2014-01-06  Marek Polacek  <polacek@redhat.com>
4953
4954         PR c/57773
4955         * c-decl.c (check_bitfield_type_and_width): Warn for implementation
4956         defined bit-field types only in ISO C.
4957
4958 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
4959
4960         Update copyright years
4961
4962 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
4963
4964         * c-array-notation.c: Use the standard form for the copyright notice.
4965
4966 2013-12-18  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4967
4968         * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
4969         (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
4970         field in parser is not empty.  If not-empty, call the function
4971         c_parser_finish_omp_declare_simd.
4972         (c_parser_cilk_clause_vectorlength): Modified function to be shared
4973         between SIMD-enabled functions and #pragma simd.  Added new parameter.
4974         (c_parser_cilk_all_clauses): Modified the usage of the function
4975         c_parser_cilk_clause_vectorlength as mentioned above.
4976         (c_parser_cilk_simd_fn_vector_attrs): New function.
4977         (c_finish_cilk_simd_fn_tokens): Likewise.
4978         (is_cilkplus_vector_p): Likewise.
4979         (c_parser_omp_clause_name): Added checking for "vectorlength,"
4980         "nomask," and "mask" strings in clause name.
4981         (c_parser_omp_all_clauses): Added 3 new case statements:
4982         PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
4983         PRAGMA_CILK_CLAUSE_NOMASK.
4984         (c_parser_attributes): Added a cilk_simd_fn_tokens parameter.  Added a
4985         check for vector attribute and if so call the function
4986         c_parser_cilk_simd_fn_vector_attrs.  Also, when Cilk plus is enabled,
4987         called the function c_finish_cilk_simd_fn_tokens.
4988         (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
4989         parser field is non-empty.  If so, parse them as you would parse
4990         the omp declare simd pragma.
4991         (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
4992         Added a check when step is a parameter and flag it as error.
4993         (CILK_SIMD_FN_CLAUSE_MASK): New #define.
4994         (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
4995         pragma_omp_clause.
4996
4997 2013-12-17  Thomas Schwinge  <thomas@codesourcery.com>
4998
4999         * c-parser.c (c_parser_omp_parallel): Fix description.
5000
5001 2013-12-11  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5002
5003         * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
5004         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5005         (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
5006         * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
5007
5008 2013-12-04  Joseph Myers  <joseph@codesourcery.com>
5009
5010         PR c/52023
5011         * c-parser.c (c_parser_alignas_specifier): Use
5012         c_sizeof_or_alignof_type instead of c_alignof.
5013         (c_parser_alignof_expression): Likewise, with min_alignof
5014         parameter depending on alignof spelling used.
5015
5016 2013-12-04  Marek Polacek  <polacek@redhat.com>
5017
5018         PR c/54113
5019         * c-decl.c (start_function): Don't warn for missing prototype for
5020         inline functions.
5021
5022 2013-12-03  Marek Polacek  <polacek@redhat.com>
5023
5024         PR c/59351
5025         * c-decl.c (build_compound_literal): Allow compound literals with
5026         empty initial value.
5027
5028 2013-12-02  Joseph Myers  <joseph@codesourcery.com>
5029
5030         PR c/58235
5031         * c-typeck.c (build_modify_expr): Diagnose assignment to
5032         expression with array type.
5033
5034 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
5035
5036         PR c/42262
5037         * c-typeck.c (process_init_element): Do not treat a string as
5038         initializing a whole array when used with a designator for an
5039         individual element.
5040
5041 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
5042
5043         PR c/57574
5044         * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
5045         an inline function following a static declaration.
5046
5047 2013-11-28  Jakub Jelinek  <jakub@redhat.com>
5048
5049         PR c/59310
5050         * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
5051         to p_name before calling c_parser_omp_teams instead of after.
5052         (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
5053         argument.  Remove unused p_name variable.
5054
5055 2013-11-27  Aldy Hernandez  <aldyh@redhat.com>
5056             Jakub Jelinek  <jakub@redhat.com>
5057
5058         * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
5059         external_scope is NULL.
5060
5061 2013-11-27  Tom de Vries  <tom@codesourcery.com>
5062             Marc Glisse  <marc.glisse@inria.fr>
5063
5064         PR c++/59032
5065         * c-typeck.c (build_unary_op): Allow vector increment and decrement.
5066
5067 2013-11-22  Andrew MacLeod  <amacleod@redhat.com>
5068
5069         * c-typeck.c: Add required include files from gimple.h.
5070
5071 2013-11-22  David Malcolm  <dmalcolm@redhat.com>
5072
5073         * c-decl.c (define_label, shadow_tag_warned)
5074         (check_bitfield_type_and_width, grokdeclarator, grokparms,
5075         store_parm_decls_newstyle, store_parm_decls_oldstyle)
5076         (declspecs_add_type): Remove use of in_system_header macro.
5077         * c-parser.c (c_parser_unary_expression): Likewise.
5078         * c-typeck.c (store_init_value, process_init_element)
5079         (c_start_case): Likewise.
5080
5081         * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
5082         macro.
5083
5084         * c-parser.c (c_parser_set_source_position_from_token): Remove
5085         reference to in_system_header from comment.
5086
5087 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
5088
5089         * c-decl.c (grokdeclarator): Update comment to refer to
5090         tree_to_[su]hwi rather than tree_low_cst.
5091
5092 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
5093
5094         * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
5095         tree_to_uhwi throughout.
5096
5097 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
5098
5099         * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
5100         throughout.
5101
5102 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
5103
5104         * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
5105         throughout.
5106
5107 2013-11-15  Aldy Hernandez  <aldyh@redhat.com>
5108
5109         * c-parser.c (c_parser_cilk_simd): New.
5110         (c_parser_cilk_verify_simd): New.
5111         (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
5112         (c_parser_omp_for_loop): Add case for NE_EXPR.
5113         Set c_break_label for CILK_SIMD.
5114         (c_parser_cilk_clause_vectorlength): New.
5115         (c_parser_cilk_clause_linear): New.
5116         (c_parser_cilk_clause_name): New.
5117         (c_parser_cilk_all_clauses): New.
5118         * c-typeck.c (build_unary_op): Pass location argument to
5119         readonly_error.
5120         (build_modify_expr): Same.
5121         (build_asm_expr): Same.
5122         (c_finish_bc_stmt): Error on break/continue in loops.
5123
5124 2013-11-14  Andrew MacLeod  <amacleod@redhat.com>
5125
5126         * c-typeck.c: Include only gimplify.h and gimple.h as needed.
5127
5128 2013-11-14  Diego Novillo  <dnovillo@google.com>
5129
5130         * c-decl.c: Include print-tree.h.
5131         Include stor-layout.h.
5132         Include varasm.h.
5133         Include attribs.h.
5134         Include stringpool.h.
5135         * c-lang.c: Include fold-const.h.
5136         * c-parser.c: Include stringpool.h.
5137         Include attribs.h.
5138         Include stor-layout.h.
5139         Include varasm.h.
5140         Include trans-mem.h.
5141         * c-typeck.c: Include stor-layout.h.
5142         Include trans-mem.h.
5143         Include varasm.h.
5144         Include stmt.h.
5145
5146 2013-11-13  Joseph Myers  <joseph@codesourcery.com>
5147
5148         * c-tree.h (c_typespec_keyword): Add cts_auto_type.
5149         * c-decl.c (declspecs_add_type, finish_declspecs): Handle
5150         __auto_type.
5151         * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
5152         (c_parser_attribute_any_word, c_parser_objc_selector): Handle
5153         RID_AUTO_TYPE.
5154         (c_parser_declspecs): Take argument AUTO_TYPE_OK.
5155         (c_parser_declaration_or_fndef, c_parser_struct_declaration)
5156         (c_parser_declarator, c_parser_direct_declarator_inner)
5157         (c_parser_parameter_declaration, c_parser_type_name): All callers
5158         changed.
5159         (c_parser_declaration_or_fndef): Handle declarations with type
5160         determined from the initializer.
5161
5162 2013-11-12  Andrew MacLeod  <amacleod@redhat.com>
5163
5164         * c-typeck.c: Include gimplify.h.
5165
5166 2013-11-12  Joseph Myers  <joseph@codesourcery.com>
5167
5168         * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
5169         * c-parser.c (c_parser_declspecs): Mention _Thread_local in
5170         comment.
5171         * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
5172         or _Thread_local as appropriate in diagnostics.
5173         (build_null_declspecs): Initialize ret->thread_gnu_p.
5174         (declspecs_add_scspec): Handle either __thread or _Thread_local
5175         for RID_THREAD.  Diagnose _Thread_local for pre-C11 standards if
5176         pedantic.  Do not disallow _Thread_local extern and _Thread_local
5177         static.
5178
5179 2013-11-07  Joseph Myers  <joseph@codesourcery.com>
5180             Andrew MacLeod  <amacleod@redhat.com>
5181
5182         * c-aux-info.c (gen_type): Handle atomic qualifier.
5183         * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
5184         qualifiers when compating types.
5185         (shadow_tag_warned): Handle atomic_p in declspecs.
5186         (quals_from_declspecs): Likewise.
5187         (start_decl): Use c_type_promotes_to when promoting argument
5188         types.
5189         (grokdeclarator): Handle _Atomic.
5190         (get_parm_info): Diagnose any qualifier on "void" as only
5191         parameter.
5192         (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
5193         comparing types.  Use c_type_promotes_to when promoting argument
5194         types.
5195         (finish_function): Use c_type_promotes_to when promoting argument
5196         types.
5197         (build_null_declspecs): Handle atomic_p in declspecs.
5198         (declspecs_add_qual): Handle RID_ATOMIC.
5199         * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
5200         (c_token_starts_declspecs): Handle RID_ATOMIC.
5201         (c_parser_declspecs): Handle atomic type specifiers and
5202         qualifiers.
5203         (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
5204         from types of expressions with atomic type.
5205         (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
5206         (c_parser_attribute_any_word): Handle RID_ATOMIC.
5207         (c_parser_initializer, c_parser_initelt, c_parser_initval)
5208         (c_parser_statement_after_labels, c_parser_switch_statement)
5209         (c_parser_for_statement, c_parser_expr_no_commas)
5210         (c_parser_conditional_expression, c_parser_binary_expression)
5211         (c_parser_cast_expression, c_parser_unary_expression)
5212         (c_parser_postfix_expression)
5213         (c_parser_postfix_expression_after_primary, c_parser_expression):
5214         Use convert_lvalue_to_rvalue.
5215         (c_parser_expression_conv, c_parser_expr_list): Document
5216         conversion of lvalues to rvalues.  Use convert_lvalue_to_rvalue.
5217         (c_parser_objc_synchronized_statement): Use
5218         convert_lvalue_to_rvalue.
5219         (c_parser_objc_selector): Handle RID_ATOMIC.
5220         (c_parser_objc_receiver, c_parser_array_notation): Use
5221         convert_lvalue_to_rvalue.
5222         * c-tree.h (ctsk_typeof): Adjust comment to mention use for
5223         _Atomic (type-name).
5224         (struct c_declspecs): Add atomic_p field.
5225         (convert_lvalue_to_rvalue): Declare.
5226         * c-typeck.c (c_type_promotes_to): Promote atomic types to
5227         corresponding atomic types.
5228         (qualify_type): Don't add _Atomic qualifiers from second argument.
5229         (comp_target_types): Do not allow _Atomic mismatches.
5230         (type_lists_compatible_p): Do not remove atomic qualifiers when
5231         comparing types.
5232         (really_atomic_lvalue, convert_lvalue_to_rvalue)
5233         (build_atomic_assign): New functions.
5234         (build_unary_op): Use build_atomic_assign for atomic increment and
5235         decrement.
5236         (build_conditional_expr): Do not treat _Atomic void as a qualified
5237         version of void.
5238         (build_modify_expr): Use build_atomic_assign for atomic LHS.
5239         (find_anonymous_field_with_type, convert_to_anonymous_field)
5240         (convert_for_assignment): Do not remove atomic qualifiers when
5241         comparing types.
5242         (digest_init): Do not accept initialization of arrays of atomic
5243         elements by string constants.
5244         (build_asm_expr): Use convert_lvalue_to_rvalue.
5245         (build_binary_op): Do not treat _Atomic void as a qualified
5246         version of void.
5247
5248 2013-11-06  DJ Delorie  <dj@redhat.com>
5249
5250         * c-decl.c (locate_old_decl): If a previous conflicting decl is
5251         both explicit and builtin, print the location of the explicit one.
5252
5253 2013-11-05  Tobias Burnus  <burnus@net-b.de>
5254
5255         * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
5256         c_parser_omp_distribute, c_parser_omp_teams,
5257         c_parser_omp_target, c_parser_omp_declare): Handle
5258         -fopenmp-simd.
5259
5260 2013-11-03  Marek Polacek  <polacek@redhat.com>
5261
5262         * c-decl.c (grokdeclarator): Add VLA instrumentation.
5263
5264 2013-11-01  Jakub Jelinek  <jakub@redhat.com>
5265
5266         * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
5267         check_dup_generic at the end, unless remove is true.
5268         (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
5269         remove = true;.
5270         (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
5271
5272 2013-10-31  Jakub Jelinek  <jakub@redhat.com>
5273
5274         * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
5275         with decl that is not pointer nor array.
5276
5277 2013-10-29  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5278
5279         * c-decl.c (finish_function): Added a call for insert_cilk_frame when
5280         a spawning function is found.
5281         * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
5282         (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
5283         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5284         * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
5285         case.
5286         (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
5287         * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
5288         expr.
5289         (c_finish_return): Added a check to reject _Cilk_spawn in return
5290         expression.
5291         (build_cilk_spawn): New function.
5292         (build_cilk_sync): Likewise.
5293         * Makefile.in (c-decl.o): Added cilk.h in dependency list.
5294         
5295 2013-10-27  Tobias Burnus  <burnus@net-b.de>
5296
5297         PR other/33426
5298         * c-parser.c (c_parser_while_statement, c_parser_while_statement,
5299         c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
5300         (c_parser_statement_after_labels): Update calls.
5301
5302 2013-10-24  Tobias Burnus  <burnus@net-b.de>
5303
5304         PR other/33426
5305         * c-parser.c (c_parser_pragma, c_parser_for_statement):
5306         Handle PRAGMA_IVDEP.
5307         (c_parser_statement_after_labels): Update call.
5308
5309 2013-10-24  Marek Polacek  <polacek@redhat.com>
5310
5311         * c-parser.c (c_parser_struct_declaration): Add a comment.
5312         (c_parser_declarator): Don't allow _Alignas here.
5313
5314 2013-10-17  Andrew MacLeod  <amacleod@redhat.com>
5315
5316         * c-parser.c: Include omp-low.h.
5317         * c-typeck.c: Likewise.
5318
5319 2013-10-17  Marek Polacek  <polacek@redhat.com>
5320
5321         PR c/58267
5322         * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
5323         Document syntax of the array-declarator.
5324         (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
5325         are not permitted.
5326         (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
5327         (c_parser_struct_declaration): Likewise.
5328         (c_parser_declarator): Likewise.
5329         (c_parser_direct_declarator_inner): Likewise.
5330         (c_parser_parameter_declaration): Likewise.
5331         (c_parser_type_name): Likewise.
5332
5333 2013-10-11  Jakub Jelinek  <jakub@redhat.com>
5334
5335         * c-lang.h (current_omp_declare_target_attribute): New extern
5336         decl.
5337         * c-parser.c: Include c-lang.h.
5338         (struct c_parser): Change tokens to c_token *.
5339         Add tokens_buf field.  Change tokens_avail type to unsigned int.
5340         (c_parser_consume_token): If parser->tokens isn't
5341         &parser->tokens_buf[0], increment parser->tokens.
5342         (c_parser_consume_pragma): Likewise.
5343         (enum pragma_context): Add pragma_struct and pragma_param.
5344         (c_parser_external_declaration): Adjust
5345         c_parser_declaration_or_fndef caller.
5346         (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
5347         argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
5348         Adjust recursive call.
5349         (c_parser_struct_or_union_specifier): Use pragma_struct instead
5350         of pragma_external.
5351         (c_parser_parameter_declaration): Use pragma_param instead of
5352         pragma_external.
5353         (c_parser_compound_statement_nostart, c_parser_label,
5354         c_parser_for_statement): Adjust
5355         c_parser_declaration_or_fndef callers.
5356         (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
5357         it through to c_parser_conditional_expression.
5358         (c_parser_conditional_expression): Add omp_atomic_lhs argument,
5359         pass it through to c_parser_binary_expression.  Adjust recursive
5360         call.
5361         (c_parser_binary_expression): Remove prec argument, add
5362         omp_atomic_lhs argument instead.  Always start from PREC_NONE, if
5363         omp_atomic_lhs is non-NULL and one of the arguments of toplevel
5364         binop matches it, use build2 instead of parser_build_binary_op.
5365         (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
5366         PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
5367         PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
5368         Handle pragma_struct and pragma_param the same as pragma_external.
5369         (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5370         (c_parser_omp_variable_list): Parse array sections for
5371         OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5372         (c_parser_omp_clause_collapse): Fully fold collapse expression.
5373         (c_parser_omp_clause_reduction): Handle user defined reductions.
5374         (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5375         c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5376         c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5377         c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5378         c_parser_omp_clause_depend, c_parser_omp_clause_map,
5379         c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5380         c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5381         c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5382         (c_parser_omp_all_clauses): Add finish_p argument.  Don't call
5383         c_finish_omp_clauses if it is false.  Handle new OpenMP 4.0 clauses.
5384         (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5385         present to c_finish_omp_atomic.  Handle OpenMP 4.0 atomic forms.
5386         (c_parser_omp_for_loop): Add CODE argument, pass it through
5387         to c_finish_omp_for.  Change last argument to cclauses,
5388         and adjust uses to grab parallel clauses from the array of all
5389         the split clauses.  Adjust c_parser_binary_expression,
5390         c_parser_declaration_or_fndef and c_finish_omp_for callers.
5391         (omp_split_clauses): New function.
5392         (c_parser_omp_simd): New function.
5393         (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5394         Allow the function to be called also when parsing combined constructs,
5395         and call c_parser_omp_simd when parsing for simd.
5396         (c_parser_omp_sections_scope): If section-sequence doesn't start with
5397         #pragma omp section, require exactly one structured-block instead of
5398         sequence of statements.
5399         (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5400         Allow the function to be called also when parsing combined constructs.
5401         (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
5402         Allow the function to be called also when parsing combined
5403         constructs.
5404         (c_parser_omp_taskgroup, c_parser_omp_cancel,
5405         c_parser_omp_cancellation_point, c_parser_omp_distribute,
5406         c_parser_omp_teams, c_parser_omp_target_data,
5407         c_parser_omp_target_update, c_parser_omp_target,
5408         c_parser_omp_declare_simd, c_finish_omp_declare_simd,
5409         c_parser_omp_declare_target, c_parser_omp_end_declare_target,
5410         c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
5411         (c_parser_omp_construct): Add p_name and mask vars.  Handle
5412         PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
5413         PRAGMA_OMP_TEAMS.  Adjust c_parser_omp_for, c_parser_omp_parallel
5414         and c_parser_omp_sections callers.
5415         (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
5416         (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5417         OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5418         (OMP_PARALLEL_CLAUSE_MASK): Likewise.  Add OMP_CLAUSE_PROC_BIND.
5419         (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.  Add
5420         OMP_CLAUSE_DEPEND.
5421         (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5422         OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5423         OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5424         OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5425         OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5426         * c-typeck.c: Include tree-inline.h.
5427         (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5428         handle_omp_array_sections_1, handle_omp_array_sections,
5429         c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5430         (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5431         user defined reductions.
5432         (c_tree_equal): New function.
5433         * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5434         c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5435         c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5436         c_check_omp_declare_reduction_r): New prototypes.
5437         * c-decl.c (current_omp_declare_target_attribute): New variable.
5438         (c_decl_attributes): New function.
5439         (start_decl, start_function): Use it instead of decl_attributes.
5440         (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5441         c_omp_reduction_decl, c_omp_reduction_lookup,
5442         c_check_omp_declare_reduction_r): New functions.
5443
5444 2013-09-25  Tom Tromey  <tromey@redhat.com>
5445
5446         * Make-lang.in (c/gccspec.o): Remove.
5447         (CFLAGS-c/gccspec.o): New variable.
5448         (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
5449         (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
5450         (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5451
5452 2013-09-25  Tom Tromey  <tromey@redhat.com>
5453
5454         * Make-lang.in (c/gccspec.o): Don't use subshell.
5455
5456 2013-09-18  Marek Polacek  <polacek@redhat.com>
5457
5458         PR sanitize/58443
5459         * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5460         Remove unnecessary check.
5461
5462 2013-09-18  Marek Polacek  <polacek@redhat.com>
5463
5464         PR sanitizer/58411
5465         * c-typeck.c (build_binary_op): Don't sanitize function if it has the
5466         no_sanitize_undefined attribute.
5467
5468 2013-09-13  Kai Tietz  <ktietz@redhat.com>
5469
5470         PR target/57848
5471         * c-decl.c (c_builtin_function_ext_scope): Remove
5472         wrong assumption that it is never called on prexisting
5473         symbol.
5474
5475 2013-09-08  Joern Rennecke  <joern.rennecke@embecosm.com>
5476
5477         * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
5478
5479 2013-09-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5480
5481         * c-objc-common.c (c_tree_printer): Tidy.
5482
5483 2013-08-30  Marek Polacek  <polacek@redhat.com>
5484
5485         * c-typeck.c (build_binary_op): Add division by zero and shift
5486         instrumentation.
5487
5488 2013-08-26  Joern Rennecke  <joern.rennecke@embecosm.com>
5489             Joseph Myers  <joseph@codesourcery.com>
5490
5491         PR c/35649
5492         * c-typeck.c (c_common_type): Prefer double_type_node over
5493         other REAL_TYPE types with the same precision.
5494         (convert_arguments): Likewise.
5495
5496 2013-08-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5497
5498         * c-objc-common.c (c_tree_printer): Document the nature of the cast.
5499         (c_initialize_diagnostics): Call a destructor for the early printer.
5500
5501 2013-08-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5502
5503         * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5504         printer initialization.
5505
5506 2013-08-19  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5507
5508         PR c/57490
5509         * c-array-notation.c (fix_conditional_array_notations_1): Added a
5510         check for truth values.
5511         (expand_array_notation_exprs): Added truth values case.  Removed an
5512         unwanted else.  Added for-loop to walk through subtrees in default
5513         case.
5514
5515 2013-08-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5516
5517         * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5518
5519 2013-07-23  Joseph Myers  <joseph@codesourcery.com>
5520
5521         * c-parser.c (struct c_generic_association): Fix typo.
5522
5523 2013-07-23  Tom Tromey  <tromey@redhat.com>
5524             Joseph Myers  <joseph@codesourcery.com>
5525
5526         * c-parser.c (struct c_generic_association): New.
5527         (c_generic_association_d): New typedef.
5528         (c_parser_generic_selection): New function.
5529         (c_parser_postfix_expression): Handle RID_GENERIC.
5530
5531 2013-07-13  Jason Merrill  <jason@redhat.com>
5532
5533         PR c++/57793
5534         * c-decl.c (finish_struct): Check for too-large class.
5535
5536 2013-07-04  Joern Rennecke  <joern.rennecke@embecosm.com>
5537
5538         PR c/57821
5539         * c-typeck.c (set_init_index): When folding, check for index overflow.
5540
5541 2013-06-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5542
5543         * c-parser.c (c_parser_array_notation): Removed rejection of array
5544         notations in an array of function pointers.
5545
5546 2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5547
5548         * c-array-notation.c (make_triplet_val_inv): New function.
5549         (create_cmp_incr): Likewise.
5550         (create_array_refs): Likewise.
5551         (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5552         Also modularized common parts between functions and called the function.
5553         (build_array_notation_expr): Likewise.
5554         (fix_conditional_array_notations_1): Likewise.
5555         (fix_array_notation_expr): Likewise.
5556         (fix_array_notation_call_expr): Likewise.
5557
5558 2013-06-18  Marek Polacek  <polacek@redhat.com>
5559
5560         PR c/57630
5561         * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5562
5563 2013-06-12  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5564
5565         * c-array-notation.c (build_array_notation_expr): Reject array notation
5566         mismatch between LHS and RHS even inside a call_expr.  Also, removed
5567         a couple while statements that were dead code.
5568
5569 2013-06-10  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5570
5571         * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5572         excessive precision expressions in function parameters.  Also removed
5573         couple unwanted while statements.
5574
5575 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5576
5577         * c-array-notation.c (expand_array_notation_exprs): Added
5578         ARRAY_NOTATION_REF case.
5579         
5580 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5581
5582         * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5583         function to c-family/array-notation-common.c.
5584         (is_cilkplus_reduce_builtin): Likewise.
5585         (find_rank): Likewise.
5586         (extract_array_notation_exprs): Likewise.
5587         (replace_array_notations): Likewise.
5588         (find_inv_trees): Likewise.
5589         (replace_inv_trees): Likewise.
5590         (contains_array_notation_expr): Likewise.
5591         (find_correct_array_notation_type): Likewise.
5592         (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5593         (struct inv_list): Moved this to c-family/array-notation-common.c.
5594         * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5595         
5596 2013-06-05  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5597
5598         * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5599         reduction functions outside the for-loop.  Added a check if the fundecl
5600         is non-NULL.  Finally, removed an unwanted if-statement, and made the
5601         body unconditional.
5602
5603 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5604
5605         * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5606         condition of the if-statement matches the rank of else-block and then-
5607         block when array notations are used.
5608         * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5609         expression after the entire function body is parsed.
5610         (c_parser_expr_no_commas): Delayed creating array notation expressions
5611         to the end of function parsing.
5612         * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5613         whole if-statement instead of just the condition.
5614         (expand_array_notation_exprs): Added MODIFY_EXPR case.  
5615
5616 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5617
5618         PR c/57474
5619         * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5620         array to NULL_TREE if they are unused.  Also added a check for the
5621         field to be NULL before its fields are used in future.
5622         
5623 2013-05-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5624
5625         PR bootstrap/57450
5626         * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5627         (build_array_notation_expr): Likewise.
5628
5629 2013-05-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5630
5631         * c-typeck.c (build_array_ref): Added a check to see if array's
5632         index is greater than one.  If true, then emit an error.
5633         (build_function_call_vec): Exclude error reporting and checking
5634         for builtin array-notation functions.
5635         (convert_arguments): Likewise.
5636         (c_finish_return): Added a check for array notations as a return
5637         expression.  If true, then emit an error.
5638         (c_finish_loop): Added a check for array notations in a loop
5639         condition.  If true then emit an error.
5640         (lvalue_p): Added a ARRAY_NOTATION_REF case.
5641         (build_binary_op): Added a check for array notation expr inside
5642         op1 and op0.  If present, we call another function to find correct
5643         type.
5644         * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
5645         * c-parser.c (c_parser_compound_statement): Check if array
5646         notation code is used in tree, if so, then transform them into
5647         appropriate C code.
5648         (c_parser_expr_no_commas): Check if array notation is used in LHS
5649         or RHS, if so, then build array notation expression instead of
5650         regular modify.
5651         (c_parser_postfix_expression_after_primary): Added a check for
5652         colon(s) after square braces, if so then handle it like an array
5653         notation.  Also, break up array notations in unary op if found.
5654         (c_parser_direct_declarator_inner): Added a check for array
5655         notation.
5656         (c_parser_compound_statement): Added a check for array notation in
5657         a stmt.  If one is present, then expand array notation expr.
5658         (c_parser_if_statement): Likewise.
5659         (c_parser_switch_statement): Added a check for array notations in
5660         a switch statement's condition.  If true, then output an error.
5661         (c_parser_while_statement): Similarly, but for a while.
5662         (c_parser_do_statement): Similarly, but for a do-while.
5663         (c_parser_for_statement): Similarly, but for a for-loop.
5664         (c_parser_unary_expression): Check if array notation is used in a
5665         pre-increment or pre-decrement expression.  If true, then expand
5666         them.
5667         (c_parser_array_notation): New function.
5668         * c-array-notation.c: New file.
5669         * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5670         
5671 2013-05-23  Mike Stump  <mikestump@comcast.net>
5672
5673         * c-typeck.c (convert_for_assignment): Handle references to memory
5674         spaces better.
5675
5676 2013-05-16  Jason Merrill  <jason@redhat.com>
5677
5678         * Make-lang.in (cc1$(exeext)): Use link mutex.
5679
5680 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
5681
5682         * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5683         to simply use OPT_Wpointer_arith.
5684         (build_unary_op): Likewise.
5685
5686 2013-04-03  Jakub Jelinek  <jakub@redhat.com>
5687
5688         PR c/19449
5689         * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
5690         argument.  If set, or it temporarily for parsing of the first
5691         argument into force_folding_builtin_constant_p.
5692         (c_parser_postfix_expression): Adjust callers.
5693
5694 2013-03-21  Richard Biener  <rguenther@suse.de>
5695
5696         * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
5697         instead of DECL_DEBUG_EXPR_IS_FROM.  Guard properly.
5698
5699 2013-02-12  Marek Polacek  <polacek@redhat.com>
5700
5701         PR c/44938
5702         * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
5703         origtypes to NULL.
5704
5705 2013-01-24  Jakub Jelinek  <jakub@redhat.com>
5706
5707         PR c/56078
5708         * c-typeck.c (set_nonincremental_init_from_string): If
5709         constructor_max_index is NULL, treat it as if tree_int_cst_lt
5710         returned false.
5711         (process_init_element): Likewise.
5712
5713 2012-12-20  Jakub Jelinek  <jakub@redhat.com>
5714
5715         PR c++/55619
5716         * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
5717         argument, don't call default_function_array_conversion
5718         nor c_fully_fold here.
5719         (c_parser_asm_statement): Adjust callers.
5720         * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
5721         and outputs here, and call default_function_array_conversion
5722         on inputs that don't need to be addressable.
5723
5724 2012-12-18  Jakub Jelinek  <jakub@redhat.com>
5725
5726         PR c/39464
5727         * c-typeck.c (convert_for_assignment): For -Wpointer-sign
5728         warning require that both c_common_unsigned_type as well as
5729         c_common_signed_type is the same for both mvl and mvr types.
5730
5731 2012-11-16  Diego Novillo  <dnovillo@google.com>
5732
5733         Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
5734
5735         * c-common.c: Use new vec API in vec.h.
5736         * c-common.h: Likewise.
5737         * c-gimplify.c: Likewise.
5738         * c-pragma.c: Likewise.
5739         * c-pretty-print.c: Likewise.
5740         * c-pretty-print.h: Likewise.
5741         * c-semantics.c: Likewise.
5742         * c-decl.c: Likewise.
5743         * c-parser.c: Likewise.
5744         * c-tree.h: Likewise.
5745         * c-typeck.c: Likewise.
5746
5747 2012-10-29  Jonathan Wakely  <jwakely.gcc@gmail.com>
5748
5749         PR c++/54930
5750         * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
5751
5752 2012-10-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
5753
5754         PR c/53066
5755         * c-decl.c (warn_if_shadowing): Do not warn if a variable
5756         shadows a function, unless the variable is a function or a
5757         pointer-to-function.
5758
5759 2012-10-12  Jakub Jelinek  <jakub@redhat.com>
5760
5761         PR c/54381
5762         * c-parser.c (struct c_tree_loc_pair): Removed.
5763         (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
5764         add location_t * and tree * arguments, fill in array of 3
5765         sizeof_arg trees and corresponding locs.
5766         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
5767         c_parser_expr_list callers.
5768         (c_parser_postfix_expression_after_primary): Likewise.  Pass
5769         array of 3 sizeof_arg trees and locs (corresponding to first
5770         3 arguments) to sizeof_pointer_memaccess_warning.
5771
5772 2012-10-09  Lawrence Crowl  <crowl@google.com>
5773
5774         * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
5775         * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
5776         hash table.
5777
5778 2012-10-09  Paolo Carlini  <paolo.carlini@oracle.com>
5779
5780         PR c++/54194
5781         * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
5782         call.
5783
5784 2012-10-09  Marc Glisse  <marc.glisse@inria.fr>
5785
5786         PR c++/54427
5787         * c-typeck.c: Include c-common.h.
5788         (enum stv_conv): Moved to c-common.h.
5789         (scalar_to_vector): Moved to c-common.c.
5790         (build_binary_op): Adapt to scalar_to_vector's new prototype.
5791         * Make-lang.in: c-typeck.c depends on c-common.h.
5792
5793 2012-10-04  Arnaud Charlet  <charlet@adacore.com>
5794
5795         * c-decl.c (c_write_global_declarations): Fix handling of
5796         -fdump-ada-spec*.
5797
5798 2012-09-30  Sharad Singhai  <singhai@google.com>
5799
5800         * c-decl.c (c_write_global_declarations): Use a different method
5801         to determine if the dump has ben initialized.
5802
5803 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
5804
5805         PR c/54552
5806         * c-typeck.c (c_cast_expr): When casting to a type requiring
5807         C_MAYBE_CONST_EXPR to be created, pass the inner expression to
5808         c_fully_fold first.
5809
5810 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
5811
5812         PR c/54103
5813         * c-typeck.c (build_unary_op): Pass original argument of
5814         TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
5815         any C_MAYBE_CONST_EXPR, if it has integer operands.
5816         (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
5817         TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
5818         to c_objc_common_truthvalue_conversion, then remove any
5819         C_MAYBE_CONST_EXPR, if they have integer operands.  Use
5820         c_objc_common_truthvalue_conversion not
5821         c_common_truthvalue_conversion.
5822         (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
5823         call note_integer_operands for arguments with integer operands
5824         that are not integer constants.
5825
5826 2012-09-13  Jakub Jelinek  <jakub@redhat.com>
5827
5828         PR c/54559
5829         * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
5830         COMPLEX_TYPE with in_late_binary_op set temporarily to true.
5831
5832 2012-08-31  Jakub Jelinek  <jakub@redhat.com>
5833
5834         PR c/54428
5835         * c-convert.c (convert): Don't call fold_convert_loc if
5836         TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
5837         is a COMPLEX_EXPR.  Remove TYPE_MAIN_VARIANT check from
5838         COMPLEX_TYPE -> COMPLEX_TYPE conversion.
5839
5840 2012-08-24  Jakub Jelinek  <jakub@redhat.com>
5841
5842         PR c/54355
5843         * c-decl.c (c_parser_label): Pass true as nested and fix up comments
5844         for nested and empty_ok arguments in the call to
5845         c_parser_declaration_or_fndef.
5846
5847 2012-08-17  Jakub Jelinek  <jakub@redhat.com>
5848
5849         * c-tree.h (c_last_sizeof_arg): Declare.
5850         * c-parser.c (struct c_tree_loc_pair): New type.
5851         (c_parser_expr_list): Add sizeof_arg argument.  Fill it in if
5852         non-NULL.
5853         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
5854         (c_parser_postfix_expression_after_primary): Likewise.  Call
5855         sizeof_pointer_memaccess_warning if needed.
5856         (sizeof_ptr_memacc_comptypes): New function.
5857         * c-typeck.c (c_last_sizeof_arg): New global variable.
5858         (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
5859
5860 2012-07-24  Uros Bizjak  <ubizjak@gmail.com>
5861
5862         * c-lang.h (lang_decl): Add variable_size GTY option.
5863
5864 2012-07-16  Steven Bosscher  <steven@gcc.gnu.org>
5865
5866         * c-decl.c: Include dumpfile.h instead of tree-dump.h.
5867         * Make-lang.in: Fix dependencies.
5868
5869 2012-06-29  Steven Bosscher  <steven@gcc.gnu.org>
5870
5871         * Make-lang.in: New file, rules migrated from gcc/Makefile.in
5872         and add language Makefile hooks.
5873         * config-lang.in: New file.
5874         * c-config-lang.in: Moved from gcc/config-lang.in to here, and
5875         add the required "normal" config-lang.in rules.
5876         * c-lang.h: Moved from gcc/ to here.
5877         * c-tree.h: Likewise.
5878         * c-objc-common.c: Likewise.
5879         * c-objc-common.h: Likewise.
5880         * c-typeck.c: Likewise.
5881         * c-convert.c: Likewise.
5882         * c-lang.c: Likewise.
5883         * c-aux-info.c: Likewise.
5884         * c-errors.c: Likewise.
5885         * gccspec.c: Likewise.
5886         * c-decl.c: Likewise.  Include gt-c-c-decl.h, not gt-c-decl.h.
5887         * c-parser.c: Likewise.  Include gt-c-c-parser.h, not gt-c-parser.h.
5888 \f
5889 Copyright (C) 2012-2018 Free Software Foundation, Inc.
5890
5891 Copying and distribution of this file, with or without modification,
5892 are permitted in any medium without royalty provided the copyright
5893 notice and this notice are preserved.