]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
PR c++/86740, ICE with constexpr if and nested generic lambdas.
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
5f07d78a
JJ
12019-01-12 Jakub Jelinek <jakub@redhat.com>
2
3 * c-typeck.c (convert_for_assignment): Fix a comment typo.
4
c4581bbf
JJ
52019-01-07 Jakub Jelinek <jakub@redhat.com>
6
7 PR c/88701
8 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
9 if current_function_decl is non-NULL.
10
65c5b1eb
JM
112019-01-07 Joseph Myers <joseph@codesourcery.com>
12
13 PR c/88720
14 PR c/88726
15 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
16 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
17 functions declared but never defined only for external scope, not
18 for other scopes.
19
d8fcab68
JJ
202019-01-07 Jakub Jelinek <jakub@redhat.com>
21
22 PR c++/85052
23 * c-parser.c (c_parser_postfix_expression): Parse
24 __builtin_convertvector.
25
a5544970
JJ
262019-01-01 Jakub Jelinek <jakub@redhat.com>
27
28 Update copyright years.
29
da77eace
L
302018-12-20 H.J. Lu <hongjiu.lu@intel.com>
31
32 PR c/51628
33 * c-typeck.c (convert_for_assignment): Call
34 warn_for_address_or_pointer_of_packed_member.
35
1edf8866
SB
362018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
37
38 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
39 a more specific error message (instead of just falling through).
40
db4fd626
SB
412018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
42
43 * c-parser.c (c_parser_asm_statement): Keep track of the location each
44 asm qualifier is first seen; use that to give nicer "duplicate asm
45 qualifier" messages. Delete 'quals" variable, instead pass the
46 "is_volatile_ flag to build_asm_stmt directly.
47 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
48 * c-typeck.c (build_asm_stmt): Ditto; adjust.
49
9c9cfcbb
SB
502018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
51
52 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
53 "done" boolean variable.
54
a14feb3c
DM
552018-12-19 David Malcolm <dmalcolm@redhat.com>
56
57 PR c++/87504
58 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
59 Move from here to gcc-rich-location.h and gcc-rich-location.c.
60 (build_binary_op): Use struct op_location_t and
61 class binary_op_rich_location.
62
6d939173
JJ
632018-12-11 Jakub Jelinek <jakub@redhat.com>
64
65 PR sanitizer/88426
66 * c-convert.c (convert): Call c_fully_fold before calling
67 ubsan_instrument_float_cast.
68
b7055028
SB
692018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
70
71 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
72 setting "quals".
73
5b76e75f
SB
742018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
75
76 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
77 after asm. Pass a flag for it to build_asm_expr.
78 * c-tree.h (build_asm_expr): Update declaration.
79 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
80 set ASM_INLINE_P.
81
30bd42b9
SB
822018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
83
84 PR inline-asm/55681
85 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
86 combination of volatile and goto, in any order, without repetitions.
87
9df6c0e4
JB
882018-12-04 James Norris <jnorris@codesourcery.com>
89 Cesar Philippidis <cesar@codesourcery.com>
90 Julian Brown <julian@codesourcery.com>
91
92 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
93 code.
94
f44697b7
RB
952018-11-30 Richard Biener <rguenther@suse.de>
96
97 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
98 _Literal (type) { ... } as empty aggregate or vector constructor.
99
550dfbdc
MS
1002018-11-29 Martin Sebor <msebor@redhat.com>
101
102 PR c/88091
103 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
104 (convert_arguments): Add comments. Pass additional argument to
105 the function above.
106
673670da
MS
1072018-11-29 Martin Sebor <msebor@redhat.com>
108
109 PR c/88172
110 PR testsuite/88208
111 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
112
db1d09b0
MS
1132018-11-23 Martin Sebor <msebor@redhat.com>
114
115 PR testsuite/88098
116 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
117 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
118
98f08eb8
MS
1192018-11-20 Martin Sebor <msebor@redhat.com>
120
121 * c-parser.c (c_parser_has_attribute_expression): New function.
122 (c_parser_attribute): New function.
123 (c_parser_attributes): Move code into c_parser_attribute.
124 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
125
cd5da983
MS
1262018-11-15 Martin Sebor <msebor@redhat.com>
127
128 PR c/83656
129 * c-decl.c (header_for_builtin_fn): Declare.
130 (diagnose_mismatched_decls): Diagnose declarations of built-in
131 functions without a prototype.
132 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
133 (convert_argument): Same.
134 (convert_arguments): Factor code out into convert_argument.
135 Detect mismatches between built-in formal arguments in calls
136 to built-in without prototype.
137 (build_conditional_expr): Same.
138 (type_or_builtin_type): New function.
139 (convert_for_assignment): Add argument. Conditionally issue
140 warnings instead of errors for mismatches.
141
620e594b
DM
1422018-11-13 David Malcolm <dmalcolm@redhat.com>
143
144 * c-decl.c: Replace "source_location" with "location_t".
145 * c-tree.h: Likewise.
146 * c-typeck.c: Likewise.
147 * gimple-parser.c: Likewise.
148
3179ebae
JJ
1492018-11-09 Jakub Jelinek <jakub@redhat.com>
150
81a227c6
JJ
151 * c-parser.c (c_parser_omp_clause_final): Use
152 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
153 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
154 parsing instead of c_parser_paren_condition.
155 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
156 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
157 c_fully_fold instead of c_parser_condition.
158 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
159 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
160 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
161 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
162 c_parser_expr_no_commas instead of c_parser_expression.
163
98c91c56
JJ
164 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
165 reduction clause with inscan modifier.
166
3179ebae
JJ
167 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
168 clauses other than atomic_default_mem_order.
169
28567c40
JJ
1702018-11-08 Jakub Jelinek <jakub@redhat.com>
171
172 * c-parser.c: Include memmode.h.
173 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
174 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
175 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
176 task_reduction clauses.
177 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
178 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
179 section, or lvalue assignment expression.
180 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
181 (c_parser_omp_clause_lastprivate): Parse optional
182 conditional: modifier.
183 (c_parser_omp_clause_hint): Require constant integer expression rather
184 than just integer expression.
185 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
186 clause.
187 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
188 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
189 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
190 functions.
191 (c_parser_omp_clause_depend): Parse iterator modifier and handle
192 iterators. Parse mutexinoutset and depobj kinds.
193 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
194 callers.
195 (c_parser_omp_all_clauses): Likewise. Handle
196 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
197 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
198 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
199 default memory order from requires directive if any. Adjust
200 c_finish_omp_atomic caller.
201 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
202 (c_parser_omp_flush): Parse flush with memory-order-clause.
203 (c_parser_omp_for_loop): Allow NE_EXPR even in
204 OpenMP loops, adjust c_finish_omp_for caller.
205 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
206 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
207 Allow to be called while parsing combined parallel master.
208 Parse combined master taskloop{, simd}.
209 (c_parser_omp_parallel): Parse combined
210 parallel master{, taskloop{, simd}} constructs.
211 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
212 (OMP_TASKGROUP_CLAUSE_MASK): Define.
213 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
214 (OMP_TASKWAIT_CLAUSE_MASK): Define.
215 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
216 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
217 around teams body. Use SET_EXPR_LOCATION.
218 (c_parser_omp_target_data): Allow target data
219 with only use_device_ptr clauses.
220 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
221 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
222 (c_parser_omp_requires): New function.
223 (c_finish_taskloop_clauses): New function.
224 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
225 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
226 declaration. Disallow in_reduction clause when combined with parallel
227 master.
228 (c_parser_omp_construct): Adjust c_parser_omp_master and
229 c_parser_omp_taskgroup callers.
230 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
231 other than cancel.
232 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
233 like OMP_CLAUSE_REDUCTION.
234 (handle_omp_array_sections): Likewise. Call save_expr on array
235 reductions before calling build_index_type. Handle depend clauses
236 with iterators.
237 (struct c_find_omp_var_s): New type.
238 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
239 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
240 with static, runtime or auto schedule kinds. Call save_expr for whole
241 array reduction sizes. Diagnose reductions with zero sized elements
242 or variable length structures. Diagnose nogroup clause used with
243 reduction clause(s). Handle depend clause with
244 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
245 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
246 some different type for other kinds. Use build_unary_op with
247 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
248 Handle depend clauses with iterators. Remove no longer needed special
249 case that predetermined const qualified vars may be specified in
250 firstprivate clause. Complain if const qualified vars are mentioned
251 in data-sharing clauses other than firstprivate or shared. Use
252 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
253 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
254 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
255 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
256
7e2de6df
DM
2572018-10-29 David Malcolm <dmalcolm@redhat.com>
258
259 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
260 logic for change to name_hint::operator bool.
261 (undeclared_variable): Likewise.
262 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
263 (c_parser_parameter_declaration): Likewise.
264
9f936c86
JM
2652018-10-17 Joseph Myers <joseph@codesourcery.com>
266
267 * c-errors.c (pedwarn_c11): New function.
268 * c-parser.c (disable_extension_diagnostics): Save
269 warn_c11_c2x_compat and set it to 0.
270 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
271 (c_parser_static_assert_declaration_no_semi): Handle
272 _Static_assert without string constant.
273 * c-tree.h (pedwarn_c11): New prototype.
274
033eb567
DM
2752018-10-17 David Malcolm <dmalcolm@redhat.com>
276
277 * Make-lang.in (selftest-c): New.
278 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
279 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
280 from gcc/Makefile.in.
281
0edf3afe
RB
2822018-10-02 Richard Biener <rguenther@suse.de>
283
284 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
285
8313a764
JM
2862018-09-26 Joseph Myers <joseph@codesourcery.com>
287
288 PR c/87390
289 * c-typeck.c (build_binary_op): Use excess precision for
290 comparisons of integers and floating-point for C11 and later.
291
ce6f0888
MJ
2922018-09-26 Martin Jambor <mjambor@suse.cz>
293
294 PR c/87347
295 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
296 comment.
297
9c4a4b3c
DM
2982018-09-17 David Malcolm <dmalcolm@redhat.com>
299
300 * c-objc-common.c (range_label_for_type_mismatch::get_text):
301 Update for new param.
302 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
303 Likewise.
304
80c6d1f4
MJ
3052018-09-17 Martin Jambor <mjambor@suse.cz>
306
307 PR c/63886
308 * c-parser.c: (warn_for_abs): New function.
309 (c_parser_postfix_expression_after_primary): Call it.
310
4a426e36
BE
3112018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
312
313 * c-typeck.c (digest_init): Shorten overlength strings.
314
6d900107
BE
3152018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
316
317 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
318
b5764229
BE
3192018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
320
321 * c-decl.c (finish_decl): Call braced_list_to_string here ...
322 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
323
22eea6b2
AM
3242018-08-30 Alexander Monakov <amonakov@ispras.ru>
325
326 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
327 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
328
85204e23
DM
3292018-08-27 David Malcolm <dmalcolm@redhat.com>
330
331 PR 87091
332 * c-decl.c (implicitly_declare): Update call to
333 maybe_add_include_fixit to suggest overriding the location, as it
334 is for a note.
335 * c-objc-common.c (c_tree_printer): Update for conversion of
336 show_caret_p to a tri-state.
337
3d78e008
ML
3382018-08-27 Martin Liska <mliska@suse.cz>
339
340 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
341 fndecl_built_in_p and remove check for FUNCTION_DECL if
342 possible.
3d78e008
ML
343 (diagnose_mismatched_decls): Likewise.
344 (merge_decls): Likewise.
345 (warn_if_shadowing): Likewise.
346 (pushdecl): Likewise.
347 (implicitly_declare): Likewise.
348 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
349 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
350 * c-typeck.c (build_function_call_vec): Likewise.
351 (convert_arguments): Likewise.
352
097f82ec
DM
3532018-08-20 David Malcolm <dmalcolm@redhat.com>
354
355 PR other/84889
356 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
357 (diagnose_mismatched_decls): Likewise, in various places.
358 (warn_if_shadowing): Likewise.
359 (implicit_decl_warning): Likewise.
360 (implicitly_declare): Likewise.
361 (undeclared_variable): Likewise.
362 (declare_label): Likewise.
363 (grokdeclarator): Likewise.
364 (start_function): Likewise.
365 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
366 (c_parser_parameter_declaration): Likewise.
367 (c_parser_binary_expression): Likewise.
368 * c-typeck.c (c_expr_sizeof_expr): Likewise.
369 (parser_build_binary_op): Likewise.
370 (build_unary_op): Likewise.
371 (error_init): Likewise.
372 (pedwarn_init): Likewise.
373 (warning_init): Likewise.
374 (convert_for_assignment): Likewise.
375
96e6ae57
DM
3762018-08-15 David Malcolm <dmalcolm@redhat.com>
377
378 * c-objc-common.c: Include "gcc-rich-location.h".
379 (c_tree_printer): Move implemenation of '%T' to...
380 (print_type): ...this new function.
381 (range_label_for_type_mismatch::get_text): New function.
382 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
383 range for the various ic_argpass cases.
384 (class maybe_range_label_for_tree_type_mismatch): New class.
385 (build_binary_op): Use it when calling binary_op_error.
386
0cd020ae
PK
3872018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
388
389 * c-decl.c (start_decl): Do not warn if variables is named as main
390 and is a local variable.
391
72733314
IS
3922018-08-15 Iain Sandoe <iain@sandoe.co.uk>
393
394 PR c/19315
395 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
396 objects of unknown size.
397
23aa9f7c
MS
3982018-08-13 Martin Sebor <msebor@redhat.com>
399
400 PR tree-optimization/71625
401 * c-parser.c (c_parser_declaration_or_fndef): Call
402 braced_list_to_string.
403
e5e7e50d
BH
4042018-08-03 Bogdan Harjoc <harjoc@gmail.com>
405
406 PR c/86690
407 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
408 errors.
409
8a45b051
MS
4102018-08-01 Martin Sebor <msebor@redhat.com>
411
412 PR tree-optimization/86650
413 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
414 and TREE_BLOCK (t) from within percent_K_format to this callsite.
415
5922dcb5
JJ
4162018-08-01 Jakub Jelinek <jakub@redhat.com>
417
418 PR c/85704
419 * c-typeck.c (init_field_decl_cmp): New function.
420 (output_pending_init_elements): Use it for field comparisons
421 instead of pure bit_position comparisons.
422
9b452033
JJ
4232018-07-12 Jakub Jelinek <jakub@redhat.com>
424
425 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
426 type here, instead add "omp declare target implicit" attribute.
427 (finish_decl): Diagnose vars without mappable type here.
428
829c6349
CLT
4292018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
430 Thomas Schwinge <thomas@codesourcery.com>
431 Cesar Philippidis <cesar@codesourcery.com>
432
433 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
434 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
435 to their non-present_or_* counterparts. Make 'self' an alias to
436 PRAGMA_OACC_CLAUSE_HOST.
437 (c_parser_oacc_data_clause): Update GOMP mappings for
438 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
439 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
440 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
441 Remove support for present_or_* clauses.
442 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
443 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
444 (OACC_DECLARE_CLAUSE_MASK): Likewise.
445 (OACC_DATA_CLAUSE_MASK): Likewise.
446 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
447 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
448 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
449 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
450 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
451
e197e64e
KV
4522018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
453
454 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
455 * gimple-parser.c (c_parser_gimple_statement): Likewise.
456 (c_parser_gimple_unary_expression): Likewise.
457
487f2f61
JJ
4582018-06-15 Jakub Jelinek <jakub@redhat.com>
459
460 PR c/86093
461 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
462 before doing POINTER_DIFF_EXPR.
463
e4d44a37
MP
4642018-06-07 Marek Polacek <polacek@redhat.com>
465
466 PR c/85318
467 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
468 for loop initial declarations.
469
b67b9225
DP
4702018-05-30 David Pagan <dave.pagan@oracle.com>
471
472 PR c/55976
473 * c-decl.c (grokdeclarator): Update check for return type warnings.
474 (start_function): Likewise.
475 (finish_function): Likewise.
476 * c-typeck.c (c_finish_return): Update check for return type warnings.
477 Pass OPT_Wreturn_type to pedwarn when appropriate.
478
c566cc9f
RS
4792018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
480
481 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
482 __FMA_EXPR handlng.
483
e4f81565
RS
4842018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
485
486 * gimple-parser.c: Include internal-fn.h.
487 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
488 (c_parser_gimple_call_internal): New function.
489 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
490 Fix typos in comment.
491
79e7b1fe
JJ
4922018-05-10 Jakub Jelinek <jakub@redhat.com>
493
494 PR c++/85662
495 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
496 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
497 fold_convert_loc.
498 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
499 fold_offsetof_1, pass argtype as TYPE to it and drop the
500 fold_convert_loc.
501
f7584c81
DP
5022018-05-02 David Pagan <dave.pagan@oracle.com>
503
504 PR c/30552
505 * c-decl.c (old_style_parameter_scope): New function.
506 * c-parser.c (c_parser_postfix_expression): Check for statement
507 expressions in old-style function parameter list declarations.
508 * c-parser.h (old_style_parameter_scope): New extern declaration.
509
b33a0cb3
JJ
5102018-04-25 Jakub Jelinek <jakub@redhat.com>
511
512 PR sanitizer/84307
513 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
514 it is not TREE_STATIC.
515 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
516 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
517 its COMPOUND_LITERAL_EXPR_DECL.
518
c5c5822a
JM
5192018-03-21 Joseph Myers <joseph@codesourcery.com>
520
521 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
522 where all functions return the same _FloatN or _FloatNx type,
523 treat integer types as _Float64 instead of double.
524
aa1c9429
JJ
5252018-03-21 Jakub Jelinek <jakub@redhat.com>
526
527 PR c/84999
528 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
529 building vector comparison, diagnose it and return error_mark_node.
530
9bb45a95
JJ
5312018-03-15 Jakub Jelinek <jakub@redhat.com>
532
533 PR c/84853
534 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
535 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
536 INTEGER_TYPE element type.
537
ada6bad9
DP
5382018-03-13 David Pagan <dave.pagan@oracle.com>
539
540 PR c/46921
541 * c-typeck.c (output_init_element): Ensure field initializer
542 expression is always evaluated if there are side effects.
543
849bbdb9
JJ
5442018-03-06 Jakub Jelinek <jakub@redhat.com>
545
546 PR c/84721
547 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
548 !building_stmt_list_p ().
549
d74641bd
RS
5502018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
551
552 PR c/84305
553 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
554 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
555 and include the BIND_EXPR in the list of things that need to be
556 pre-evaluated.
557
0444aa9c
NS
5582018-02-09 Nathan Sidwell <nathan@acm.org>
559
560 PR c/84293
561 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
562 to strict_aliasing_warning.
563
7c30b12a
PC
5642018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
565
566 * c-typeck.c (really_start_incremental_init, push_init_level,
567 set_nonincremental_init, output_init_element, process_init_element):
568 Use DECL_UNNAMED_BIT_FIELD.
569
2be4dfcb
MP
5702018-01-31 Marek Polacek <polacek@redhat.com>
571
572 PR c/81779
573 * c-parser.c (c_parser_compound_statement_nostart): Call
574 expansion_point_location_if_in_system_header.
575
bb9869d5
DM
5762018-01-17 David Malcolm <dmalcolm@redhat.com>
577
578 PR c++/83814
579 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
580 the C part.
581
b4923738
JJ
5822018-01-13 Jakub Jelinek <jakub@redhat.com>
583
584 PR c/83801
585 * c-tree.h (decl_constant_value_1): Add a bool argument.
586 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
587 returning a CONSTRUCTOR if it is true. Use error_operand_p.
588 (decl_constant_value): Adjust caller.
589 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
590 decl_constant_value_1 as IN_INIT. Otherwise, punt if
591 decl_constant_value returns initializer that has BLKmode or
592 array type.
593 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
594
928686b1
RS
5952018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
596 Alan Hayward <alan.hayward@arm.com>
597 David Sherwood <david.sherwood@arm.com>
598
599 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
600 TYPE_VECTOR_SUBPARTS.
601
85ec4feb
JJ
6022018-01-03 Jakub Jelinek <jakub@redhat.com>
603
604 Update copyright years.
605
913884f7
JJ
6062018-01-01 Jakub Jelinek <jakub@redhat.com>
607
608 PR c/83595
609 * c-parser.c (c_parser_braced_init, c_parser_initelt,
610 c_parser_conditional_expression, c_parser_cast_expression,
611 c_parser_sizeof_expression, c_parser_alignof_expression,
612 c_parser_postfix_expression, c_parser_omp_declare_reduction,
613 c_parser_transaction_expression): Use set_error () method instead
614 of setting value member to error_mark_node.
615
c6cfa2bf
MM
6162017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
617
618 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
619 and _Float<N>X built-in functions.
620
11d29d63
JJ
6212017-12-22 Jakub Jelinek <jakub@redhat.com>
622
14ec014e
JJ
623 PR debug/83550
624 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
625 TYPE_STUB_DECL and call rest_of_type_compilation before processing
626 incomplete vars rather than after it.
627
11d29d63
JJ
628 PR debug/83547
629 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
630 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
631 and consider empty ones if there are no other stmts. For
632 -Wunused-value walk all statements before the one only followed by
633 DEBUG_BEGIN_STMTs.
634
170a8bd6 6352017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 636 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
637
638 * c-parser.c (c_parser_while_statement): Add unroll parameter and
639 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
640 (c_parser_do_statement): Likewise.
641 (c_parser_for_statement): Likewise.
642 (c_parser_statement_after_labels): Adjust calls to above.
643 (c_parse_pragma_ivdep): New static function.
644 (c_parser_pragma_unroll): Likewise.
645 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
646 <PRAGMA_UNROLL>: New case.
647
01512446
JJ
6482017-12-19 Jakub Jelinek <jakub@redhat.com>
649
650 * c-typeck.c (comptypes_internal, function_types_compatible_p,
651 perform_integral_promotions, digest_init): Replace Yoda conditions
652 with typical order conditions.
653 * c-decl.c (check_bitfield_type_and_width): Likewise.
654
c65e18d3
BE
6552017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
656
657 * c-typeck.c (c_safe_arg_type_equiv_p,
658 c_safe_function_type_cast_p): New function.
659 (build_c_cast): Implement -Wcast-function-type.
660
b7280579
RB
6612017-12-14 Richard Biener <rguenther@suse.de>
662
663 PR c/83415
664 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
665 like REALPART_EXPR for the behavior of whether its operand
666 is an lvalue.
667
49e6a6c0
MP
6682017-12-12 Marek Polacek <polacek@redhat.com>
669
670 PR c/82679
671 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
672
96a95ac1
AO
6732017-12-12 Alexandre Oliva <aoliva@redhat.com>
674
675 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
676 * c-parser.c (add_debug_begin_stmt): New.
677 (c_parser_declaration_or_fndef): Call it.
678 (c_parser_compound_statement_nostart): Likewise.
679 (c_parser_statement_after_labels): Likewise.
680 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
681
4b2b493f
JM
6822017-12-07 Joseph Myers <joseph@codesourcery.com>
683
684 * c-decl.c (build_compound_literal): Add parameter alignas_align
685 and set alignment of decl if nonzero.
686 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
687 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
688 qualifier.
689 (c_parser_struct_declaration): Update syntax comment.
690 (c_parser_type_name): Add alignas_ok argument and pass it to
691 c_parser_declspecs.
692 (c_parser_cast_expression): Pass true to c_parser_type_name and
693 give error if a cast used an _Alignas specifier.
694 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
695 give error if sizeof (type-name) used an _Alignas specifier.
696 (c_parser_alignof_expression): Pass true to c_parser_type_name and
697 give error if _Alignof (type-name) used an _Alignas specifier.
698 (c_parser_postfix_expression_after_paren_type): Check specified
699 alignment for a compound literal and pass it to
700 build_compound_literal.
701 * c-parser.h (c_parser_type_name): Update prototype.
702 * c-tree.h (build_compound_literal): Update prototype.
703
5d9ae53d
MS
7042017-12-07 Martin Sebor <msebor@redhat.com>
705
706 PR c/81544
707 * c-decl.c (c_decl_attributes): Look up existing declaration and
708 pass it to decl_attributes.
709
c79144f8
DM
7102017-12-06 David Malcolm <dmalcolm@redhat.com>
711
712 PR c/83236
713 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
714 reserved for use by the implementation.
715
613bc14f
DM
7162017-12-06 David Malcolm <dmalcolm@redhat.com>
717
718 * c-decl.c: Include "c-family/c-spellcheck.h".
719
05abad4c
ML
7202017-12-05 Martin Liska <mliska@suse.cz>
721 Jakub Jelinek <jakub@redhat.com>
722
723 * c-typeck.c (pointer_diff): Add new argument and instrument
724 pointer subtraction.
725 (build_binary_op): Similar for pointer comparison.
726
cc6534d4
JJ
7272017-12-01 Jakub Jelinek <jakub@redhat.com>
728
65791f42
JJ
729 PR c/79153
730 * c-parser.c: Include tree-iterator.h.
731 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
732 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
733 on it.
734
cc6534d4
JJ
735 PR c/83222
736 * c-tree.h (decl_constant_value_1): Declare.
737 * c-typeck.c (decl_constant_value_1): New function.
738 (decl_constant_value): Use it.
739 * c-fold.c (c_fully_fold_internal): If in_init, use
740 decl_constant_value_1 instead of decl_constant_value.
741
5de73c05
JJ
7422017-11-30 Jakub Jelinek <jakub@redhat.com>
743
744 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
745
058f0b9e
JJ
7462017-11-28 Jakub Jelinek <jakub@redhat.com>
747
748 PR sanitizer/81275
749 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
750 c_switch_covers_all_cases_p returns true.
751
5e9d6aa4 7522017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 753 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
754
755 * Make-lang.in (c/c-array-notation.o): Remove.
756 * c-array-notation.c: Delete.
757 * c-decl.c: Remove cilkplus condition.
758 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
759 c_parser_cilk_verify_simd, c_parser_array_notation,
760 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
761 c_parser_cilk_simd_fn_vector_attrs,
762 c_finish_cilk_simd_fn_tokens): Delete.
763 (c_parser_declaration_or_fndef): Remove cilkplus condition.
764 (c_parser_direct_declarator_inner): Ditto.
765 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
766 (c_parser_attributes, c_parser_compound_statement,
767 c_parser_statement_after_labels, c_parser_if_statement,
768 c_parser_switch_statement, c_parser_while_statement,
769 c_parser_do_statement, c_parser_for_statement,
770 c_parser_unary_expression, c_parser_postfix_expression,
771 c_parser_postfix_expression_after_primary,
772 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
773 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
774 support.
775 * c-typeck.c (build_array_ref, build_function_call_vec,
776 convert_arguments,
777 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
778 c_finish_loop, build_binary_op): Remove cilkplus support.
779
9e851845
JJ
7802017-11-28 Jakub Jelinek <jakub@redhat.com>
781
782 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
783 of build3.
784
8c7dbea9
BK
7852017-11-14 Boris Kolpackov <boris@codesynthesis.com>
786
787 * Make-lang.in (c.install-plugin): Install backend import library.
788
41521dee
JJ
7892017-11-23 Jakub Jelinek <jakub@redhat.com>
790
791 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
792 pragma_stmt context.
793
ac9effed
EB
7942017-11-23 Mike Stump <mikestump@comcast.net>
795 Eric Botcazou <ebotcazou@adacore.com>
796
797 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
798 ANNOTATE_EXPR.
799 (c_parser_do_statement): Likewise.
800 (c_parser_for_statement): Likewise.
801
ce95abc4
DM
8022017-11-22 David Malcolm <dmalcolm@redhat.com>
803
804 PR c++/62170
805 * c-objc-common.c (c_tree_printer): Convert penultimate param from
806 bool to bool *. Within '%T' handling, if showing an "aka", use
807 "quoted" param to add appropriate quoting.
808
974aedcc
MP
8092017-11-22 Marek Polacek <polacek@redhat.com>
810
811 PR c++/60336
812 PR middle-end/67239
813 PR target/68355
814 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
815
d4300cc6
DM
8162017-11-21 David Malcolm <dmalcolm@redhat.com>
817
818 PR c/83056
819 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
820 earlier failed lookups.
821
1af4ebf5
MG
8222017-11-21 Marc Glisse <marc.glisse@inria.fr>
823
824 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
825 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
826
26edace6
DM
8272017-11-20 David Malcolm <dmalcolm@redhat.com>
828
829 PR c/81404
830 * c-decl.c: Include "c-family/known-headers.h".
831 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
832 to known-headers.cc.
833 (class suggest_missing_header): Move to known-header.h.
834 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
835 than get_c_name_hint.
836
b1212255
DM
8372017-11-20 David Malcolm <dmalcolm@redhat.com>
838
839 * c-decl.c (get_c_name_hint): New function.
840 (class suggest_missing_header): New class.
841 (lookup_name_fuzzy): Call get_c_name_hint and use it to
842 suggest missing headers to the user.
843
6c7a259b
DM
8442017-11-20 David Malcolm <dmalcolm@redhat.com>
845
846 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
847 Include "c-family/name-hint.h"
848 (implicit_decl_warning): Convert "hint" from
849 const char * to name_hint. Pass location to
850 lookup_name_fuzzy. Suppress any deferred diagnostic if the
851 warning was not printed.
852 (undeclared_variable): Likewise for "guessed_id".
853 (lookup_name_fuzzy): Convert return type from const char *
854 to name_hint. Add location_t param.
855 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
856 Include "c-family/name-hint.h"
857 (c_parser_declaration_or_fndef): Convert "hint" from
858 const char * to name_hint. Pass location to lookup_name_fuzzy.
859 (c_parser_parameter_declaration): Likewise.
860
f9c59f7e
JJ
8612017-11-19 Jakub Jelinek <jakub@redhat.com>
862
863 PR c/66618
864 PR c/69960
865 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
866 where needed.
867 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
868 handle_omp_array_sections): Likewise.
869 (digest_init): Don't call decl_constant_value_for_optimization.
870 * c-tree.h (decl_constant_value_for_optimization): Removed.
871 * c-fold.c (c_fold_array_ref): New function.
872 (c_fully_fold_internal): Add LVAL argument, propagate it through
873 recursive calls. For VAR_P call decl_constant_value and
874 unshare if not LVAL and either optimizing or IN_INIT. Remove
875 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
876 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
877 (c_fully_fold): Add LVAL argument, pass it through to
878 c_fully_fold_internal.
879 (decl_constant_value_for_optimization): Removed.
880
3ca0dc60
JM
8812017-11-15 Joseph Myers <joseph@codesourcery.com>
882
883 PR c/81156
884 * c-parser.c (check_tgmath_function): New function.
885 (enum tgmath_parm_kind): New enum.
886 (c_parser_postfix_expression): Handle __builtin_tgmath.
887
64a5912c
DM
8882017-10-31 David Malcolm <dmalcolm@redhat.com>
889
890 * c-decl.c (implicit_decl_warning): Update for renaming of
891 pedwarn_at_rich_loc and warning_at_rich_loc.
892 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
893 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
894 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
895 (c_parser_struct_or_union_specifier): Likewise for renaming of
896 pedwarn_at_rich_loc.
897 (c_parser_parameter_declaration): Likewise for renaming of
898 error_at_rich_loc.
899 * c-typeck.c (build_component_ref): Likewise.
900 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
901 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
902 (set_init_label): Likewise for renaming of error_at_rich_loc.
903
c1136864
RB
9042017-10-30 Richard Biener <rguenther@suse.de>
905
906 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
907 stmts.
908
ee5fd23a
MM
9092017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
910
911 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
912 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
913
1a59ccf2
DM
9142017-10-25 David Malcolm <dmalcolm@redhat.com>
915
916 PR c/7356
917 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
918 semicolons.
919
bc1a75dd
JJ
9202017-10-25 Jakub Jelinek <jakub@redhat.com>
921
922 PR libstdc++/81706
923 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
924 newdecl to corresponding __builtin_ if any.
925
ff1ff960
PC
9262017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
927
928 PR c++/82466
929 * c-decl.c (diagnose_mismatched_decls): Use
930 OPT_Wbuiltin_declaration_mismatch.
931
62e1c678
DM
9322017-10-12 David Malcolm <dmalcolm@redhat.com>
933
934 * c-parser.c (c_parser_require): Add "type_is_unique" param and
935 use it to guard calls to maybe_suggest_missing_token_insertion.
936 (c_parser_parms_list_declarator): Override default value of new
937 "type_is_unique" param to c_parser_require.
938 (c_parser_asm_statement): Likewise.
939 * c-parser.h (c_parser_require): Add "type_is_unique" param,
940 defaulting to true.
941
a92f6726
NS
9422017-10-11 Nathan Sidwell <nathan@acm.org>
943
944 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
945
8e6cdc90
RS
9462017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
947
948 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
949 operating on trees as wide_ints.
950 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
951 (c_tree_equal): Likewise.
952
8139a48e
DM
9532017-10-04 David Malcolm <dmalcolm@redhat.com>
954
955 * c-decl.c (push_parm_decl): Store c_parm's location into the
956 PARAM_DECL.
957 (build_c_parm): Add "loc" param and store it within the c_parm.
958 * c-parser.c (struct c_parser): Add "last_token_location" field.
959 (c_parser_consume_token): Store location of the token into the
960 new field.
961 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
962 when handling a FUNCTION_DECL, if it doesn't already have them.
963 (c_parser_parameter_declaration): Generate a location for the
964 parameter, and pass it to the call to build_c_parm.
965 * c-tree.h (struct c_parm): Add field "loc".
966 (build_c_parm): Add location_t param.
967 * c-typeck.c (get_fndecl_argument_location): New function.
968 (inform_for_arg): New function.
969 (convert_for_assignment): Use inform_for_arg when dealing with
970 ic_argpass.
971
2a389958
JJ
9722017-09-29 Jakub Jelinek <jakub@redhat.com>
973
7d386d45
JJ
974 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
975 width is non-NULL.
976 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
977 don't SET_DECL_C_BIT_FIELD here.
978
2a389958
JJ
979 PR c/82340
980 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
981 instead of trying to set just TREE_READONLY manually.
982
ebc6a85e
TV
9832017-09-16 Tom de Vries <tom@codesourcery.com>
984
985 PR c/81875
986 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
987 cond itself.
988
bb75facd
JM
9892017-09-15 Joseph Myers <joseph@codesourcery.com>
990
991 PR c/82071
992 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
993 for C11.
994 (build_conditional_expr): For C11, generate result with excess
995 precision when one argument is an integer and the other is of a
996 type using excess precision.
997
1d933576
BE
9982017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
999
1000 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
1001
267bbb6f
MP
10022017-09-13 Marek Polacek <polacek@redhat.com>
1003
1004 PR c/82167
1005 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
1006 than expr.original_type.
1007
6836632e
NS
10082017-09-12 Nathan Sidwell <nathan@acm.org>
1009
1010 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1011 resort_sorted_fields): Moved from c-family/c-common.c.
1012 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
1013
e035be33
JM
10142017-09-01 Joseph Myers <joseph@codesourcery.com>
1015
1016 PR c/82071
1017 * c-typeck.c (build_atomic_assign): Handle argument with excess
1018 precision. Ensure any EXCESS_PRECISION_EXPR is present in
1019 argument passed to build_binary_op and convert_for_assignment but
1020 not for call to c_fully_fold.
1021 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
1022 Ensure build_binary_op is called with argument with original
1023 semantic type. Avoid calling c_fully_fold with an
1024 EXCESS_PRECISION_EXPR from build_binary_op.
1025
d2e05fcb
JJ
10262017-09-01 Jakub Jelinek <jakub@redhat.com>
1027
1028 PR c/81887
1029 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
1030
b397965c
RS
10312017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1032 Alan Hayward <alan.hayward@arm.com>
1033 David Sherwood <david.sherwood@arm.com>
1034
1035 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
1036 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
1037 m1 and m2 to the signed equivalent of a fixed-point
1038 SCALAR_TYPE_MODE.
1039
14e18d71
DM
10402017-08-24 David Malcolm <dmalcolm@redhat.com>
1041
1042 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
1043 than CAN_HAVE_LOCATION_P when determining whether to use the
1044 location_t value within "value".
1045
7f204c0f
DM
10462017-08-21 David Malcolm <dmalcolm@redhat.com>
1047
1048 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
1049 rather than peeking the location of the first token.
1050 * c-tree.h (c_expr::get_location): New method.
1051
2f687306
DM
10522017-08-21 David Malcolm <dmalcolm@redhat.com>
1053
1054 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
1055 to check_function_arguments.
1056
3e7b80d7
MP
10572017-08-18 Marek Polacek <polacek@redhat.com>
1058
1059 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
1060 commentary.
1061
00aa1fa2
L
10622017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1063
1064 PR c/53037
1065 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
1066 (check_bitfield_type_and_width): Don't allow bit-field with
1067 warn_if_not_aligned type.
1068
da67acb9
MS
10692017-08-14 Martin Sebor <msebor@redhat.com>
1070
1071 PR c/81117
1072 * c-objc-common.c (c_objc_common_init): Handle 'G'.
1073
bb85aa74
MP
10742017-08-11 Marek Polacek <polacek@redhat.com>
1075
1076 PR c/81795
1077 * c-decl.c (pushtag): Only print inform if the warning was printed.
1078 (grokdeclarator): Likewise.
1079
32129a17
DM
10802017-08-10 David Malcolm <dmalcolm@redhat.com>
1081
1082 * c-parser.c (c_parser_error): Rename to...
1083 (c_parser_error_richloc): ...this, making static, and adding
1084 "richloc" parameter, passing it to the c_parse_error call,
1085 rather than calling c_parser_set_source_position_from_token.
1086 (c_parser_error): Reintroduce, reimplementing in terms of the
1087 above, converting return type from void to bool.
1088 (class token_pair): New class.
1089 (struct matching_paren_traits): New struct.
1090 (matching_parens): New typedef.
1091 (struct matching_brace_traits): New struct.
1092 (matching_braces): New typedef.
1093 (get_matching_symbol): New function.
1094 (c_parser_require): Add param MATCHING_LOCATION, using it to
1095 highlight matching "opening" tokens for missing "closing" tokens.
1096 (c_parser_skip_until_found): Likewise.
1097 (c_parser_static_assert_declaration_no_semi): Convert explicit
1098 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
1099 class matching_parens, so that the pertinent open parenthesis is
1100 highlighted when there are problems locating the close
1101 parenthesis.
1102 (c_parser_struct_or_union_specifier): Likewise.
1103 (c_parser_typeof_specifier): Likewise.
1104 (c_parser_alignas_specifier): Likewise.
1105 (c_parser_simple_asm_expr): Likewise.
1106 (c_parser_braced_init): Likewise, for matching_braces.
1107 (c_parser_paren_condition): Likewise, for matching_parens.
1108 (c_parser_switch_statement): Likewise.
1109 (c_parser_for_statement): Likewise.
1110 (c_parser_asm_statement): Likewise.
1111 (c_parser_asm_operands): Likewise.
1112 (c_parser_cast_expression): Likewise.
1113 (c_parser_sizeof_expression): Likewise.
1114 (c_parser_alignof_expression): Likewise.
1115 (c_parser_generic_selection): Likewise.
1116 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
1117 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
1118 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
1119 In case CPP_OPEN_PAREN, pass loc_open_paren to the
1120 c_parser_skip_until_found call.
1121 (c_parser_objc_class_definition): Use class matching_parens as
1122 above.
1123 (c_parser_objc_method_decl): Likewise.
1124 (c_parser_objc_try_catch_finally_statement): Likewise.
1125 (c_parser_objc_synchronized_statement): Likewise.
1126 (c_parser_objc_at_property_declaration): Likewise.
1127 (c_parser_oacc_wait_list): Likewise.
1128 (c_parser_omp_var_list_parens): Likewise.
1129 (c_parser_omp_clause_collapse): Likewise.
1130 (c_parser_omp_clause_default): Likewise.
1131 (c_parser_omp_clause_if): Likewise.
1132 (c_parser_omp_clause_num_threads): Likewise.
1133 (c_parser_omp_clause_num_tasks): Likewise.
1134 (c_parser_omp_clause_grainsize): Likewise.
1135 (c_parser_omp_clause_priority): Likewise.
1136 (c_parser_omp_clause_hint): Likewise.
1137 (c_parser_omp_clause_defaultmap): Likewise.
1138 (c_parser_oacc_single_int_clause): Likewise.
1139 (c_parser_omp_clause_ordered): Likewise.
1140 (c_parser_omp_clause_reduction): Likewise.
1141 (c_parser_omp_clause_schedule): Likewise.
1142 (c_parser_omp_clause_num_teams): Likewise.
1143 (c_parser_omp_clause_thread_limit): Likewise.
1144 (c_parser_omp_clause_aligned): Likewise.
1145 (c_parser_omp_clause_linear): Likewise.
1146 (c_parser_omp_clause_safelen): Likewise.
1147 (c_parser_omp_clause_simdlen): Likewise.
1148 (c_parser_omp_clause_depend): Likewise.
1149 (c_parser_omp_clause_map): Likewise.
1150 (c_parser_omp_clause_device): Likewise.
1151 (c_parser_omp_clause_dist_schedule): Likewise.
1152 (c_parser_omp_clause_proc_bind): Likewise.
1153 (c_parser_omp_clause_uniform): Likewise.
1154 (c_parser_omp_for_loop): Likewise.
1155 (c_parser_cilk_clause_vectorlength): Likewise.
1156 (c_parser_cilk_clause_linear): Likewise.
1157 (c_parser_transaction_expression): Likewise.
1158 * c-parser.h (c_parser_require): Add param matching_location with
1159 default UNKNOWN_LOCATION.
1160 (c_parser_error): Convert return type from void to bool.
1161 (c_parser_skip_until_found): Add param matching_location with
1162 default UNKNOWN_LOCATION.
1163
30af3a2b
MP
11642017-08-09 Marek Polacek <polacek@redhat.com>
1165
1166 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
1167 * c-tree.h (build_external_ref): Update declaration.
1168 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
1169 (build_external_ref): Change the type of a parameter to bool.
1170 (parser_build_binary_op): Use true/false instead of 1/0.
1171 (pointer_diff): Likewise.
1172 (build_modify_expr): Likewise.
1173 (set_designator): Change the type of a parameter to bool.
1174 (set_init_index): Use true/false instead of 1/0.
1175 (set_init_label): Likewise.
1176 (output_init_element): Change the type of a parameter to bool.
1177 (output_pending_init_elements): Use true/false instead of 1/0.
1178 (process_init_element): Likewise.
1179 (build_binary_op): Change the type of a parameter to bool.
1180
296c53ac
MP
11812017-08-09 Marek Polacek <polacek@redhat.com>
1182
1183 PR c/81233
1184 * c-typeck.c (pedwarn_init): Make the function take a variable list.
1185 Call emit_diagnostic_valist instead of pedwarn.
1186 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
1187 Print the relevant types in diagnostics.
1188
a32c8316
MP
11892017-08-09 Marek Polacek <polacek@redhat.com>
1190
1191 PR c/81417
1192 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
1193 build_conditional_expr.
1194 * c-parser.c (c_parser_conditional_expression): Create locations for
1195 EXP1 and EXP2 from their source ranges. Pass the locations down to
1196 build_conditional_expr.
1197 * c-tree.h (build_conditional_expr): Update declaration.
1198 * c-typeck.c (build_conditional_expr): Add location_t parameters.
1199 For -Wsign-compare, also print the types.
1200
314e6352
ML
12012017-08-08 Martin Liska <mliska@suse.cz>
1202
1203 * c-convert.c: Include header files.
1204 * c-typeck.c: Likewise.
1205
577eec56
ML
12062017-08-07 Martin Liska <mliska@suse.cz>
1207
1208 * c-parser.c (c_parser_attributes): Canonicalize name of an
1209 attribute.
1210
f7b6353a
MP
12112017-08-02 Marek Polacek <polacek@redhat.com>
1212
1213 PR c/81289
1214 * c-parser.c (c_parser_unary_expression): Use set_error.
1215
8a6eab34
MP
1216 PR c/81448
1217 PR c/81306
1218 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
1219 warnings. Avoid walking MACRO_MAP_LOCATIONS.
1220
7fef86d3
JH
12212017-07-31 Jan Hubicka <hubicka@ucw.cz>
1222 Martin Liska <mliska@suse.cz>
1223
1224 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 1225 statement.
7fef86d3 1226
f34ebeb2
ML
12272017-07-31 Martin Liska <mliska@suse.cz>
1228
1229 PR sanitize/81530
1230 * c-convert.c (convert): Guard condition with flag_sanitize_p
1231 also with current_function_decl non-null equality.
1232 * c-decl.c (grokdeclarator): Likewise.
1233 * c-typeck.c (build_binary_op): Likewise.
1234
8595f67b
MP
12352017-07-25 Marek Polacek <polacek@redhat.com>
1236
1237 * c-decl.c (grokfield): Remove local variable.
1238
d49718d6
MP
12392017-07-25 Marek Polacek <polacek@redhat.com>
1240
1241 PR c/81364
1242 * c-parser.c (c_parser_else_body): Don't warn about multistatement
1243 macro expansion if the body is in { }.
1244 (c_parser_while_statement): Likewise.
1245 (c_parser_for_statement): Likewise.
1246
ff22eb12
NS
12472017-07-18 Nathan Sidwell <nathan@acm.org>
1248
1249 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
1250
eea77d1f
DM
12512017-07-14 David Malcolm <dmalcolm@redhat.com>
1252
1253 * c-decl.c (implicitly_declare): When suggesting a missing
1254 #include, provide a fix-it hint.
1255
b6f43128
DM
12562017-07-06 David Malcolm <dmalcolm@redhat.com>
1257
1258 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
1259 and call that instead.
1260 * c-tree.h (selftest::run_c_tests): New decl.
1261
3e2becc4
MP
12622017-06-26 Marek Polacek <polacek@redhat.com>
1263
1264 PR c/80116
1265 * c-parser.c (c_parser_if_body): Set the location of the
1266 body of the conditional after parsing all the labels. Call
1267 warn_for_multistatement_macros.
1268 (c_parser_else_body): Likewise.
1269 (c_parser_switch_statement): Likewise.
1270 (c_parser_while_statement): Likewise.
1271 (c_parser_for_statement): Likewise.
1272 (c_parser_statement): Add a default argument. Save the location
1273 after labels have been parsed.
1274 (c_parser_c99_block_statement): Likewise.
1275
343ae898
RB
12762017-06-19 Richard Biener <rguenther@suse.de>
1277
1278 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1279 negated _Literals to parse _Literal (int) -1.
1280
45b2222a
ML
12812017-06-13 Martin Liska <mliska@suse.cz>
1282
1283 PR sanitize/78204
1284 * c-convert.c (convert): Use sanitize_flags_p.
1285 * c-decl.c (grokdeclarator): Likewise.
1286 * c-typeck.c (convert_for_assignment): Likewise.
1287 (c_finish_return): Likewise.
1288 (build_binary_op): Likewise.
1289
8ab7005b
JJ
12902017-06-08 Jakub Jelinek <jakub@redhat.com>
1291
1292 PR c/81006
1293 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
1294 to sizetype before size_binop.
1295
363dc72c
JJ
12962017-06-07 Jakub Jelinek <jakub@redhat.com>
1297
1298 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
1299 of TDI_generic.
1300
dc949728
MP
13012017-06-06 Marek Polacek <polacek@redhat.com>
1302
1303 PR c/79983
1304 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
1305 ref.
1306 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
1307
40ffd95f
BE
13082017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1309
1310 * c-parser.c (c_parser_binary_expression): Implement the
1311 -Wsizeof_pointer_div warning.
1312 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
1313 from a parenthesized expression.
1314 (c_parser_expr_list): Use c_last_sizeof_loc.
1315 * c-tree.h (c_last_sizeof_loc): New external.
1316 * c-typeck.c (c_last_sizeof_loc): New variable.
1317 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
1318
9fc5e7a4
MM
13192017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
1320
1321 PR testsuite/80580
1322 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
1323
f012c8ef
DM
13242017-05-30 David Malcolm <dmalcolm@redhat.com>
1325
1326 * c-objc-common.c (c_tree_printer): Gain bool and const char **
1327 parameters.
1328
3cd211af
MS
13292017-05-24 Martin Sebor <msebor@redhat.com>
1330
1331 PR c/80731
1332 * c-fold.c (c_fully_fold_internal): Adjust.
1333 * c-typeck.c (parser_build_unary_op): Adjust.
1334
fd71a9a2
TS
13352017-05-23 Thomas Schwinge <thomas@codesourcery.com>
1336
1337 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
1338 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
1339 "VECTOR_LENGTH".
1340
92fa0f9e
MP
13412017-05-23 Marek Polacek <polacek@redhat.com>
1342
1343 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
1344 quotes.
1345
d11c168a
JJ
13462017-05-22 Jakub Jelinek <jakub@redhat.com>
1347
1348 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
1349 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
1350 it returned invariant. Call tree_invariant_p unconditionally
1351 afterwards to decide whether to return expr or op0.
1352
58aca9d9
NS
13532017-05-22 Nathan Sidwell <nathan@acm.org>
1354
1355 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
1356
7fd549d2
TS
13572017-05-19 Thomas Schwinge <thomas@codesourcery.com>
1358
1359 * c-parser.c (c_parser_omp_clause_default): Handle
1360 "OMP_CLAUSE_DEFAULT_PRESENT".
1361
6ecd2339
BE
13622017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1363
1364 * config-lang.in (gtfiles): Add c-family/c-format.c.
1365
8a57ecff
NS
13662017-05-18 Nathan Sidwell <nathan@acm.org>
1367
1368 * c-decl.c (pushdecl_top_level): Delete unused function.
1369
6574d78e
MP
13702017-05-18 Marek Polacek <polacek@redhat.com>
1371
1372 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
1373 (check_earlier_gotos): Likewise.
1374 (define_label): Likewise.
1375 (pending_xref_error): Likewise.
1376 (smallest_type_quals_location): Likewise.
1377 (grokdeclarator): Likewise.
1378 (grokparms): Likewise.
1379 (identifier_global_value): Likewise.
1380 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
1381 (find_init_member): Likewise.
1382
e3455240
MP
13832017-05-18 Marek Polacek <polacek@redhat.com>
1384
1385 * c-decl.c (start_decl): Use false/true instead of 0/1.
1386 (grokdeclarator): Likewise.
1387 (finish_struct): Likewise.
1388 (start_function): Change the return type to bool. Use false/true
1389 instead of 0/1.
1390 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
1391 * c-tree.h (start_function): Update.
1392 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
1393 (set_designator): Change the return type to bool. Use false/true
1394 instead of 0/1.
1395
3fa8871b
MP
13962017-05-17 Marek Polacek <polacek@redhat.com>
1397
1398 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
1399 * c-typeck.c: Likewise.
1400
142473df
MP
14012017-05-17 Marek Polacek <polacek@redhat.com>
1402
1403 PR sanitizer/80659
1404 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
1405 DECL_IGNORED_P even for non-static compound literals.
1406
1a817418
ML
14072017-05-17 Martin Liska <mliska@suse.cz>
1408
1409 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1410 use it instead of int type.
1411
b2fa0a8b
MP
14122017-05-17 Marek Polacek <polacek@redhat.com>
1413
1414 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
1415 call c_fully_fold.
1416 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
1417 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
1418 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1419 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1420 save_expr.
1421 (c_parser_conditional_expression): Likewise.
1422 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1423 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1424 (process_init_element): Likewise.
1425 (build_binary_op): Likewise.
1426 (handle_omp_array_sections_1): Likewise.
1427
1e47f02b
TS
14282017-05-12 Thomas Schwinge <thomas@codesourcery.com>
1429
1430 * c-parser.c (c_parser_omp_clause_num_gangs)
1431 (c_parser_omp_clause_num_workers)
1432 (c_parser_omp_clause_vector_length): Merge functions into...
1433 (c_parser_oacc_single_int_clause): ... this new function. Adjust
1434 all users.
1435
c24e924f
NS
14362017-05-11 Nathan Sidwell <nathan@acm.org>
1437
1438 * gimple-parser.c: Don't #include tree-dump.h.
1439
c587104e
MM
14402017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1441
1442 PR testsuite/80580
1443 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
1444
67ac9a9d
MM
14452017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1446
1447 PR testsuite/80580
1448 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1449 incorrect __MEM syntax.
1450
ac4eb40f
MM
14512017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1452
1453 PR testsuite/80580
1454 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1455 type of unary '*'.
1456
641da50a
NS
14572017-05-09 Nathan Sidwell <nathan@acm.org>
1458
1459 * c-tree.h (pushdecl): Declare.
1460
56d35585
DM
14612017-05-05 David Malcolm <dmalcolm@redhat.com>
1462
1463 * c-decl.c (warn_defaults_to): Replace report_diagnostic
1464 with diagnostic_report_diagnostic.
1465 * c-errors.c (pedwarn_c99): Likewise.
1466 (pedwarn_c90): Likewise.
1467
815d9cc6
XR
14682017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1469
92a285c1 1470 PR c++/80038
815d9cc6
XR
1471 * c-gimplify.c (c_gimplify_expr): Remove calls to
1472 cilk_gimplifY_call_params_in_spawned_fn.
1473
1c4ea66f
DM
14742017-04-25 David Malcolm <dmalcolm@redhat.com>
1475
1476 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1477 hint for removing extra semicolon.
1478
666f7903
JJ
14792017-04-21 Jakub Jelinek <jakub@redhat.com>
1480
1481 PR c/80468
1482 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
1483 enabled, set specs->type to integer_type_node.
1484
5764ee3c
JW
14852017-04-03 Jonathan Wakely <jwakely@redhat.com>
1486
1487 * c-array-notation.c: Fix typo in comment.
1488
10fa8dfb
MP
14892017-03-29 Marek Polacek <polacek@redhat.com>
1490
1491 PR c/79730
1492 * c-decl.c (finish_decl): Check VAR_P.
1493
a9e4a1a5
JJ
14942017-03-27 Jakub Jelinek <jakub@redhat.com>
1495
1496 PR middle-end/80162
1497 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1498 * c-typeck.c (c_mark_addressable): Likewise. Look through
1499 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1500 to ARRAY_TYPE.
1501 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
1502
ee3ff394
MP
15032017-03-23 Marek Polacek <polacek@redhat.com>
1504
1505 * c-tree.h: Remove a C_RID_YYCODE reference.
1506
4d1b8e70
JJ
15072017-03-21 Jakub Jelinek <jakub@redhat.com>
1508
1509 PR c/80097
1510 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
1511 optional COMPOUND_EXPR with ubsan instrumentation.
1512
31dc71a8
MP
15132017-03-17 Marek Polacek <polacek@redhat.com>
1514
1515 * c-parser.c: Add C11 references.
1516
d579c385
MP
15172017-03-15 Marek Polacek <polacek@redhat.com>
1518
1519 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
1520
85059a38
MP
15212017-03-11 Marek Polacek <polacek@redhat.com>
1522
1523 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
1524
2f6f187a
DM
15252017-03-10 David Malcolm <dmalcolm@redhat.com>
1526
1527 PR translation/79848
1528 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1529 "%qs".
1530 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1531
36618428
MP
15322017-03-09 Marek Polacek <polacek@redhat.com>
1533
1534 PR sanitizer/79757
1535 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1536 parameter declarations with initializers.
1537
01e5af5a
JJ
15382017-03-09 Jakub Jelinek <jakub@redhat.com>
1539
1540 PR c/79969
1541 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
1542 TYPE_STUB_DECL.
1543
a71dbc63
JJ
15442017-03-07 Jakub Jelinek <jakub@redhat.com>
1545
1546 PR c/79834
1547 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1548 for "may only be used in compound statements" diagnostics, change it
1549 such that the same translatable string is used for all pragmas. For
1550 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1551 diagnostics.
1552 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1553 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1554 "may only be used in compound statements" diagnostics, such that the
1555 same translatable string is used for all pragmas.
1556
1ff4bae6
MP
15572017-03-04 Marek Polacek <polacek@redhat.com>
1558
1559 PR c/79847
1560 * c-decl.c (implicit_decl_warning): Add missing space.
1561
7f5a7d78
MP
15622017-03-03 Marek Polacek <polacek@redhat.com>
1563
1564 PR c/79758
1565 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1566 current_function_prototype_arg_types is error_mark_node. Fix
1567 formatting. Use TREE_VALUE instead of TREE_TYPE.
1568
883c8f06
JJ
15692017-03-03 Jakub Jelinek <jakub@redhat.com>
1570
79c9b7a8
JJ
1571 PR c/79837
1572 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1573 %<min%> or %<max%> in the diagnostics, instead mention identifier.
1574 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1575 diagnostics.
1576
883c8f06
JJ
1577 PR c/79836
1578 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1579 instead of %<_Generic>.
1580 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1581 (c_parser_omp_target_exit_data): Use %<release%> instead of
1582 %<release>.
1583
324ff1a0
JJ
15842017-02-28 Jakub Jelinek <jakub@redhat.com>
1585
1586 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1587 instead of just cond ? "..." : "...".
1588 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1589 for "enter"/"exit" keyword.
1590 (c_finish_oacc_routine): Don't use %s to supply portions of the
1591 message.
1592
4227c9ad
JJ
15932017-02-24 Jakub Jelinek <jakub@redhat.com>
1594
1595 PR c++/79588
1596 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1597 handle -Wrestrict here.
1598 * c-typeck.c (build_function_call_vec): Adjust
1599 check_function_arguments caller.
1600
5d972e66
RB
16012017-02-23 Richard Biener <rguenther@suse.de>
1602
1603 PR c/79684
1604 * gimple-parser.c (c_parser_gimple_statement): Use set_error
1605 to initialize c_exprs to return.
1606 (c_parser_gimple_binary_expression): Likewise.
1607 (c_parser_gimple_unary_expression): Likewise.
1608 (c_parser_gimple_postfix_expression): Likewise.
1609
61ac5ebe
MP
16102017-02-22 Marek Polacek <polacek@redhat.com>
1611
1612 PR c/79662
1613 * c-typeck.c (convert_arguments): Handle error_mark_node.
1614
41d1b0b1
PK
16152017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1616
1617 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1618 value of c_parser_parse_ssa_name against error_mark_node and emit
1619 error if ssa name is anonymous and written as default definition.
1620
eab1f169
PK
16212017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1622
1623 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1624 FMA_EXPR.
1625
bcac0b4d
JJ
16262017-02-16 Jakub Jelinek <jakub@redhat.com>
1627
1628 PR c++/79512
1629 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1630 ignore #pragma omp target even when not followed by identifier.
1631
1be33173
PK
16322017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1633
1634 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1635 (c_parser_gimple_unary_expression): Likewise.
1636
aa326bfb
JJ
16372017-02-13 Jakub Jelinek <jakub@redhat.com>
1638
1639 * c-parser.c (c_parser_oacc_declare): Add missing space in
1640 diagnostics.
1641
8a398bc5
PK
16422017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1643
1644 PR c/79478
1645 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1646 set_c_expr_source_range when parsing ssa-name.
1647
3dcde5ef
PG
16482017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
1649 Richard Biener <rguenther@suse.de>
1650
1651 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1652 building IL when arguments are error_mark_node.
1653 (c_parser_gimple_unary_expression): Likewise.
1654 (c_parser_gimple_if_stmt): Likewise.
1655 (c_parser_gimple_switch_stmt): Likewise.
1656 (c_parser_gimple_return_stmt): Likewise.
1657 (c_parser_parse_ssa_name): When name lookup fails do not build
1658 an SSA name. Use undeclared rather than not declared in error
1659 reporting.
1660
192b048b
MP
16612017-02-09 Marek Polacek <polacek@redhat.com>
1662
1663 PR c/79428
1664 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1665 instead of c_parser_skip_until_found.
1666
56f71478
JJ
16672017-02-09 Jakub Jelinek <jakub@redhat.com>
1668
1669 PR c/79431
1670 * c-parser.c (c_parser_omp_declare_target): Don't invoke
1671 symtab_node::get on automatic variables.
1672
02889d23
CLT
16732016-02-09 Nathan Sidwell <nathan@codesourcery.com>
1674 Chung-Lin Tang <cltang@codesourcery.com>
1675
1676 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1677 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1678 semantic checking.
1679 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1680
7af4b20d
RB
16812017-02-07 Richard Biener <rguenther@suse.de>
1682
1683 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1684 (c_parser_gimple_postfix_expression_after_primary):
1685 Do not use c_build_function_call_vec to avoid folding and promotion.
1686 Simplify.
1687
e5e391d6
MO
16882017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1689
1690 PR lto/79061
1691 * c-decl.c (pop_scope): Pass main_input_filename to
1692 build_translation_unit_decl.
1693
c2e84327
DM
16942017-01-24 David Malcolm <dmalcolm@redhat.com>
1695
1696 * c-parser.c: Include "read-rtl-function.h" and
1697 "run-rtl-passes.h".
1698 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
1699 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
1700 production. Update for renaming of field "gimple_pass" to
1701 "gimple_or_rtl_pass". If __RTL was seen, call
1702 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
1703 to an auto_timevar, to cope with early exit.
1704 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1705 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1706 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1707 Handle RID_RTL.
1708 (c_parser_parse_rtl_body): New function.
1709 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1710 (struct c_declspecs): Rename field "gimple_pass" to
1711 "gimple_or_rtl_pass". Add field "rtl_p".
1712 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1713 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1714 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1715 (c_parser_gimple_or_rtl_pass_list): ...this.
1716
2ebd93e1
MP
17172017-01-20 Marek Polacek <polacek@redhat.com>
1718
1719 PR c/64279
1720 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1721
b1c95bb5
RB
17222017-01-13 Richard Biener <rguenther@suse.de>
1723
1724 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1725 nops.
1726
25329913
RB
17272017-01-13 Richard Biener <rguenther@suse.de>
1728
1729 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1730 _Literal ( type-name ) number.
1731
6bb4ea5c
RB
17322017-01-12 Richard Biener <rguenther@suse.de>
1733
1734 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1735 __MEM.
1736
6b5b4e9c
JJ
17372017-01-11 Jakub Jelinek <jakub@redhat.com>
1738
1739 PR c++/72813
1740 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
1741 PCH file.
1742
e3252775
RB
17432017-01-11 Richard Biener <rguenther@suse.de>
1744
1745 PR bootstrap/79052
1746 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
1747 returns on parse errors.
1748
a9342885
MP
17492017-01-04 Marek Polacek <polacek@redhat.com>
1750
1751 PR c++/64767
1752 * c-parser.c (c_parser_postfix_expression): Mark zero character
1753 constants by setting original_type in c_expr.
1754 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
1755 with a zero character constant.
1756 (char_type_p): New function.
1757
5dd9a9d0
DM
17582017-01-04 David Malcolm <dmalcolm@redhat.com>
1759
1760 * c-parser.c (c_parser_declaration_or_fndef): Create a
1761 rich_location at init_loc and parse it to start_init.
1762 (last_init_list_comma): New global.
1763 (c_parser_braced_init): Update last_init_list_comma when parsing
1764 commas. Pass it to pop_init_level. Pass location of closing
1765 brace to pop_init_level.
1766 (c_parser_postfix_expression_after_paren_type): Create a
1767 rich_location at type_loc and parse it to start_init.
1768 (c_parser_omp_declare_reduction): Likewise for loc.
1769 * c-tree.h (start_init): Add rich_location * param.
1770 (pop_init_level): Add location_t param.
1771 * c-typeck.c (struct initializer_stack): Add field
1772 "missing_brace_richloc".
1773 (start_init): Add richloc param, use it to initialize
1774 the stack node's missing_brace_richloc.
1775 (last_init_list_comma): New decl.
1776 (finish_implicit_inits): Pass last_init_list_comma to
1777 pop_init_level.
1778 (push_init_level): When finding missing open braces, add fix-it
1779 hints to the richloc.
1780 (pop_init_level): Add "insert_before" param and pass it
1781 when calling pop_init_level. Add fixits about missing
1782 close braces to any richloc. Use the richloc for the
1783 -Wmissing-braces warning.
1784 (set_designator): Pass last_init_list_comma to pop_init_level.
1785 (process_init_element): Likewise.
1786
cbe34bb5
JJ
17872017-01-01 Jakub Jelinek <jakub@redhat.com>
1788
1789 Update copyright years.
1790
d17680f3
JJ
17912016-12-21 Jakub Jelinek <jakub@redhat.com>
1792
0dba7960
JJ
1793 PR bootstrap/78817
1794 * c-typeck.c (build_function_call_vec): If check_function_arguments
1795 returns true, set TREE_NO_WARNING on CALL_EXPR.
1796
d17680f3
JJ
1797 PR c/77767
1798 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
1799 to *expr instead of overwriting it.
1800
aa90531e
RB
18012016-12-20 Richard Biener <rguenther@suse.de>
1802
1803 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
1804 error recovery.
1805 (c_parser_gimple_statement): Only build assigns for non-error
1806 stmts.
1807 (c_parser_gimple_postfix_expression_after): Improve error recovery.
1808
629b3d75
MJ
18092016-12-14 Martin Jambor <mjambor@suse.cz>
1810
1811 * c-parser.c: Include omp-general.h and omp-offload.h instead of
1812 omp-low.h.
1813 (c_finish_oacc_routine): Adjusted call to
1814 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
1815 to use their new names.
1816 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
1817 use its new name.
1818 (c_parser_oacc_update): Likewise.
1819 (c_parser_omp_simd): Likewise.
1820 (c_parser_omp_target_update): Likewise.
1821 * c-typeck.c: Include omp-general.h instead of omp-low.h.
1822 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
1823 name.
1824 (c_finish_omp_cancellation_point): Likewise.
1825 * gimple-parser.c: Do not include omp-low.h
1826
c5af52eb
CP
18272016-12-02 Cesar Philippidis <cesar@codesourcery.com>
1828 James Norris <jnorris@codesourcery.com>
1829
1830 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
1831 EXIT_DATA,WAIT} are not used in compound statements.
1832 (c_parser_oacc_enter_exit_data): Update diagnostics.
1833
48330c93
BE
18342016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1835
1836 PR c++/71973
1837 * c-decl.c (diagnose_mismatched_decls): Use
1838 OPT_Wbuiltin_declaration_mismatch here too.
1839
899ca90e 18402016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
1841 Alan Hayward <alan.hayward@arm.com>
1842 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
1843
1844 * c-decl.c (merge_decls): Use SET_DECL_MODE.
1845 (make_label, finish_struct): Likewise.
1846
1ee62b92 18472016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 1848 Richard Biener <rguenther@suse.de>
22b15758 1849
8e745a17
JJ
1850 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
1851 * config-lang.in (gtfiles): Add c/c-parser.h.
1852 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
1853 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
1854 * c-parser.c (enum c_id_kind, struct c_token,
1855 c_parser_next_token_is, c_parser_next_token_is_not,
1856 c_parser_next_token_is_keyword,
1857 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
1858 Split out to ...
1859 * c-parser.h: ... new header.
1860 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 1861 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
1862 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1863 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1864 c_parser_error, c_parser_require, c_parser_skip_until_found,
1865 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1866 c_parser_type_name): Export.
1867 (c_parser_tokens_buf): New function.
1868 (c_parser_error): Likewise.
1869 (c_parser_set_error): Likewise.
1870 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
1871 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
1872 via c_parser_parse_gimple_body.
8e745a17
JJ
1873 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
1874 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1875 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1876 c_parser_error, c_parser_require, c_parser_skip_until_found,
1877 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1878 c_parser_type_name): Declare.
1ee62b92
PG
1879 (struct c_parser): Declare forward.
1880 (c_parser_tokens_buf): Declare.
8e745a17
JJ
1881 (c_parser_error): Likewise.
1882 (c_parser_set_error): Likewise.
1883 * gimple-parser.c: New file.
1884 * gimple-parser.h: Likewise.
1ee62b92 1885
22b15758
UB
18862016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1887
1888 PR c/35503
1889 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1890 warn_for_restrict.
1891
84ff4775
LCW
18922016-09-11 Le-Chun Wu <lcwu@google.com>
1893 Mark Wielaard <mjw@redhat.com>
1894
1895 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
1896 to the given -Wshadow= variant.
1897
4d0cdd0c
TP
18982016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
1899
1900 * c-typeck.c: Include memmodel.h.
1901
1202f33e
JJ
19022016-10-13 Jakub Jelinek <jakub@redhat.com>
1903
1904 PR target/77957
1905 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
1906 instead of lhd_return_null_tree_v.
1907
8a14afd0
BS
19082016-10-07 Bernd Schmidt <bschmidt@redhat.com>
1909
1910 PR c++/69733
1911 * c-decl.c (smallest_type_quals_location): New static function.
1912 (grokdeclarator): Try to find the correct location for an ignored
1913 qualifier.
1914
81fea426
MP
19152016-09-26 Marek Polacek <polacek@redhat.com>
1916
1917 PR c/7652
1918 * c-decl.c (pop_scope): Add gcc_fallthrough.
1919
19202016-09-26 Marek Polacek <polacek@redhat.com>
1921
1922 PR c/7652
1923 * c-parser.c (struct c_token): Add flags field.
1924 (c_lex_one_token): Pass it to c_lex_with_flags.
1925 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
1926 into IFN_FALLTHROUGH.
1927 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
1928 attribute fallthrough after a case label or default label.
1929 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
1930
9a2300e9
MP
19312016-09-24 Marek Polacek <polacek@redhat.com>
1932
1933 PR c/77490
1934 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
1935 have boolean value. Warn about ++/-- on booleans.
1936
7de76362
JJ
19372016-09-23 Jakub Jelinek <jakub@redhat.com>
1938
1939 * c-parser.c (incomplete_record_decls): Remove unnecessary
1940 = vNULL initialization of file scope vec.
1941
5b73d2ab
MP
19422016-09-16 Marek Polacek <polacek@redhat.com>
1943
1944 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
1945
e51fbec3
MP
19462016-09-14 Marek Polacek <polacek@redhat.com>
1947
1948 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
1949 (fix_array_notation_expr): Likewise.
1950 * c-decl.c (finish_decl): Likewise.
1951 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1952 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
1953 (function_to_pointer_conversion): Use false instead of 0.
1954 (convert_lvalue_to_rvalue): Likewise.
1955 (parser_build_unary_op): Likewise.
1956 (build_atomic_assign): Likewise.
1957 (build_unary_op): Change nonconvert parameter type to bool, use
1958 true/false instead of 1/0.
1959 (build_binary_op): Use true instead of 1.
1960
254830ba
DM
19612016-09-13 David Malcolm <dmalcolm@redhat.com>
1962
1963 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
1964 of add_fixit_insert to add_fixit_insert_before.
1965
4c13ba17
MP
19662016-09-13 Marek Polacek <polacek@redhat.com>
1967
1968 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
1969 it.
1970
54dcdb88
BE
19712016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
1972
1973 PR c++/77496
1974 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
1975 COMPOUND_EXPR to warn_for_omitted_condop.
1976
e5106e27
DM
19772016-09-07 David Malcolm <dmalcolm@redhat.com>
1978
1979 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
1980 c_get_substring_location for this new langhook.
1981
9dc5773f
JJ
19822016-09-02 Jakub Jelinek <jakub@redhat.com>
1983
1984 PR c/65467
1985 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
1986 flag_openmp.
1987 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
1988 instead of mark_exp_read on low_bound/length expression.
1989 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
1990 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1991 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1992 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
1993 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
1994 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
1995 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
1996 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
1997 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
1998 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
1999 instead of mark_expr_read.
2000 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
2001 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
2002 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
2003 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
2004 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
2005 array section bases outside of depend clause, for depend clause
2006 use convert_lvalue_to_rvalue on the base.
2007 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
2008 linear, aligned, map, to and from clauses.
2009 (c_omp_clause_copy_ctor): New function.
2010
295844f6
MP
20112016-09-01 Marek Polacek <polacek@redhat.com>
2012
2013 PR c/7652
2014 * c-typeck.c (composite_type): Add FALLTHRU comment.
2015
089af25c
DM
20162016-08-31 David Malcolm <dmalcolm@redhat.com>
2017
2018 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
2019 to the insertion fixits for "struct", "union", and "enum".
2020
f9087798
DM
20212016-08-30 David Malcolm <dmalcolm@redhat.com>
2022
2023 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
2024 rather than add_fixit_misspelled_id.
2025 (undeclared_variable): Likewise.
2026 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
2027 now-redundant "here" params from add_fixit_insert method calls.
2028 (c_parser_parameter_declaration): Likewise.
2029 * c-typeck.c (build_component_ref): Remove now-redundant range
2030 param from add_fixit_replace method calls.
2031
ebef225f
MP
20322016-08-25 Marek Polacek <polacek@redhat.com>
2033
2034 * c-typeck.c (parser_build_binary_op): Pass LHS to
2035 warn_logical_not_parentheses.
2036
fe377a48
MP
20372016-08-25 Marek Polacek <polacek@redhat.com>
2038
2039 PR c/77323
2040 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
2041 or _FloatN or _FloatNx is not supported.
2042 (finish_declspecs): Set type to integer_type_node when _FloatN or
2043 _FloatNx is not supported.
2044
c65699ef
JM
20452016-08-19 Joseph Myers <joseph@codesourcery.com>
2046
2047 PR c/32187
2048 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
2049 (struct c_declspecs): Add field floatn_nx_idx.
2050 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
2051 and _FloatNx type specifiers.
2052 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
2053 (c_parser_declspecs, c_parser_attribute_any_word)
2054 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
2055 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
2056 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
2057 narrower than double.
2058
2f1364c2
JJ
20592016-08-12 Jakub Jelinek <jakub@redhat.com>
2060 Martin Liska <mliska@suse.cz>
2061
2062 PR c/67410
2063 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
2064 % to determine val element to change. Assert that
2065 wchar_bytes * charwidth fits into val array.
2066
191816a3
MP
20672016-08-12 Marek Polacek <polacek@redhat.com>
2068
2069 PR c/7652
2070 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
2071 (c_parser_postfix_expression): Likewise.
2072 * c-typeck.c (build_unary_op): Adjust fall through comment.
2073 (c_mark_addressable): Likewise.
2074
b95a64bb
JJ
20752016-08-11 Jakub Jelinek <jakub@redhat.com>
2076
2077 PR c/72816
2078 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
2079 array member through typedef, for orig_qual_indirect == 0 clear
2080 orig_qual_type.
2081
895aa8e1
DM
20822016-08-08 David Malcolm <dmalcolm@redhat.com>
2083
2084 PR c/64955
2085 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
2086 this up to selftest::run_c_tests.
2087 (selftest::run_c_tests): New function.
2088
0b212d8c
TS
20892016-08-04 Thomas Schwinge <thomas@codesourcery.com>
2090
ae9281fc
TS
2091 * c-parser.c (struct oacc_routine_data): Add error_seen and
2092 fndecl_seen members.
2093 (c_finish_oacc_routine): Use these.
2094 (c_parser_declaration_or_fndef): Adjust.
2095 (c_parser_oacc_routine): Likewise. Support more C language
2096 constructs, and improve diagnostics. Move pragma context
2097 checking...
2098 (c_parser_pragma): ... here.
2099
0b212d8c
TS
2100 * c-parser.c (struct oacc_routine_data): New.
2101 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
2102 Simplify code.
2103 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
2104 declare target" attribute.
2105
76e2c821
JB
21062016-08-01 Jan Beulich <jbeulich@suse.com>
2107
2108 * c-fold.c (c_fully_fold_internal): Also emit shift count
2109 warnings for vector types.
2110 * c-typeck.c (build_binary_op): Likewise.
2111
f618a472
MP
21122016-07-29 Marek Polacek <polacek@redhat.com>
2113
2114 PR c/71742
2115 * c-decl.c (finish_struct): Rephrase an error message.
2116
efd0786f
MP
2117 PR c/71853
2118 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
2119 to error node for invalid code.
2120
e00dceaf
MP
2121 PR c/71573
2122 * c-decl.c (implicitly_declare): Return decl early not only for
2123 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
2124
673a107a
JJ
21252016-07-29 Jakub Jelinek <jakub@redhat.com>
2126
2127 PR c/71969
2128 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
2129 on GNU extern inline functions.
2130
a5b5c8b6
MP
21312016-07-29 Marek Polacek <polacek@redhat.com>
2132
2133 PR c/71583
2134 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
2135 check expr.value.
2136
e3fe09c1
UB
21372016-07-22 Uros Bizjak <ubizjak@gmail.com>
2138
2139 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
2140
7c8f7eaa
DM
21412016-07-20 David Malcolm <dmalcolm@redhat.com>
2142
2143 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
2144 spellcheck-tree.h
2145 (best_macro_match): Likewise, converting from a typedef to a
2146 subclass.
2147 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
2148 (lookup_name_fuzzy): Update for change of best_macro_match to a
2149 subclass with a ctor that calls cpp_forall_identifiers.
2150
de6a69ee
DM
21512016-07-20 David Malcolm <dmalcolm@redhat.com>
2152
2153 * c-decl.c (implicit_decl_warning): Update for conversion of
2154 return type of lookup_name_fuzzy to const char *.
2155 (undeclared_variable): Likewise.
2156 (lookup_name_fuzzy): Convert return type from tree to
2157 const char *.
2158 * c-parser.c (c_parser_declaration_or_fndef): Update for
2159 conversion of return type of lookup_name_fuzzy to const char *.
2160 (c_parser_parameter_declaration): Likewise.
2161
b1c9c068
CP
21622016-07-15 Cesar Philippidis <cesar@codesourcery.com>
2163
2164 * c-parser.c (c_parser_oacc_declare): Don't scan for
2165 GOMP_MAP_POINTER.
2166 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
2167 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
2168 zero-length subarrays.
2169
ddbbcb19
JJ
21702016-07-15 Jakub Jelinek <jakub@redhat.com>
2171
2172 PR c/71858
2173 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
2174 instead of FUZZY_LOOKUP_NAME.
2175 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
2176 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
2177
dd36b877
JJ
21782016-07-14 Jakub Jelinek <jakub@redhat.com>
2179
2180 PR c/71858
2181 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
2182
8c681247
TS
21832016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2184
2185 * c-parser.c (c_parser_generic_selection): Make type of variable
2186 auto_vec.
2187 (c_parser_omp_declare_simd): Likewise.
2188
bf4fa671
TS
21892016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2190
2191 * c-decl.c (struct c_struct_parse_info): Change member types
2192 from vec to auto_vec.
2193 (start_struct): Adjust.
2194 (finish_struct): Likewise.
2195
557e8c49
JJ
21962016-07-02 Jakub Jelinek <jakub@redhat.com>
2197
2198 PR c/71719
2199 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
2200
54d19c3b
TS
22012016-06-29 Thomas Schwinge <thomas@codesourcery.com>
2202
2203 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
2204 Move pragma context checking into...
2205 (c_parser_omp_cancellation_point): ... here, and improve
2206 diagnostic messages.
2207 * c-typeck.c (c_finish_omp_cancel)
2208 (c_finish_omp_cancellation_point): Improve diagnostic messages.
2209
152ef731
JJ
22102016-06-29 Jakub Jelinek <jakub@redhat.com>
2211
2212 PR c/71685
2213 * c-typeck.c (c_build_qualified_type): Don't clear
2214 C_TYPE_INCOMPLETE_VARS for the main variant.
2215
22162016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
2217
2218 PR c/71552
2219 * c-typeck.c (output_init_element): Diagnose incompatible types
2220 before non-constant initializers.
2221
e9ac1f86
JJ
22222016-06-28 Jakub Jelinek <jakub@redhat.com>
2223
2224 * Make-lang.in: Don't cat ../stage_current if it does not exist.
2225
277d7ee0
AK
22262016-06-23 Andi Kleen <ak@linux.intel.com>
2227
2228 * Make-lang.in: Add support for autofdo.
2229
1a4f11c8
DM
22302016-06-22 David Malcolm <dmalcolm@redhat.com>
2231
2232 PR c/70339
2233 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
2234 (implicit_decl_warning): When issuing warnings for implicit
2235 declarations, attempt to provide a suggestion via
2236 lookup_name_fuzzy.
2237 (undeclared_variable): Likewise when issuing errors.
2238 (lookup_name_in_scope): Likewise.
2239 (struct edit_distance_traits<cpp_hashnode *>): New struct.
2240 (best_macro_match): New typedef.
2241 (find_closest_macro_cpp_cb): New function.
2242 (lookup_name_fuzzy): New function.
2243 * c-parser.c: Include gcc-rich-location.h.
2244 (c_token_starts_typename): Split out case CPP_KEYWORD into...
2245 (c_keyword_starts_typename): ...this new function.
2246 (c_parser_declaration_or_fndef): When issuing errors about
2247 missing "struct" etc, add a fixit. For other kinds of errors,
2248 attempt to provide a suggestion via lookup_name_fuzzy.
2249 (c_parser_parms_declarator): When looking ahead to detect typos in
2250 type names, also reject CPP_KEYWORD.
2251 (c_parser_parameter_declaration): When issuing errors about
2252 unknown type names, attempt to provide a suggestion via
2253 lookup_name_fuzzy.
2254 * c-tree.h (c_keyword_starts_typename): New prototype.
2255
5a578671
JM
22562016-06-20 Joseph Myers <joseph@codesourcery.com>
2257
2258 PR c/71601
2259 * c-typeck.c (build_conditional_expr): Return error_mark_node if
2260 c_common_type returns error_mark_node.
2261
3f8257db 22622016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
2263
2264 PR c/69507
2265 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
2266 __alignof__ (expression).
2267
6a3f203c
DM
22682016-06-14 David Malcolm <dmalcolm@redhat.com>
2269
2270 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
2271
264757fb
DM
22722016-06-14 David Malcolm <dmalcolm@redhat.com>
2273
2274 * c-typeck.c (build_component_ref): Simplify fixit code by
2275 using gcc_rich_location::add_fixit_misspelled_id.
2276 (set_init_label): Likewise.
2277
f7e4f2e3
DM
22782016-06-13 David Malcolm <dmalcolm@redhat.com>
2279
2280 * c-parser.c (c_parser_initelt): Provide location of name for new
2281 location_t param of set_init_label.
2282 * c-tree.h (set_init_label): Add location_t param.
2283 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
2284 param and use it when issuing error messages about unrecognized
2285 field names. Attempt to provide a fixit hint if appropriate,
2286 otherwise update the error message to provide the type name.
2287
4b1ffdb1
TS
22882016-06-10 Thomas Schwinge <thomas@codesourcery.com>
2289
2290 PR c/71381
2291 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
2292 Loosen checking.
2293
44a845ca
MS
22942016-06-08 Martin Sebor <msebor@redhat.com>
2295 Jakub Jelinek <jakub@redhat.com>
2296
2297 PR c++/70507
2298 PR c/68120
2299 * c-typeck.c (convert_arguments): Don't promote last argument
2300 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2301
92a5f2ba
MP
23022016-06-08 Marek Polacek <polacek@redhat.com>
2303
2304 PR c/71418
2305 * c-decl.c (grokdeclarator): Check TYPE_P.
2306
08203f73
MP
2307 PR c/71426
2308 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
2309 code.
2310
6ffd47b7
DM
23112016-06-07 David Malcolm <dmalcolm@redhat.com>
2312
2313 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
2314 and structure element reference, capture the location of the
2315 element name token and pass it to build_component_ref.
2316 (c_parser_postfix_expression_after_primary): Likewise for
2317 structure element dereference.
2318 (c_parser_omp_variable_list): Likewise for
2319 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
2320 * c-tree.h (build_component_ref): Add location_t param.
2321 * c-typeck.c (build_component_ref): Add location_t param
2322 COMPONENT_LOC. Use it, if available, when issuing hints about
2323 mispelled member names to provide a fixit replacement hint.
2324
1f40cff3
MP
23252016-06-06 Marek Polacek <polacek@redhat.com>
2326
2327 PR c/71362
2328 * c-parser.c (c_parser_direct_declarator): Set location.
2329
5545a907
MP
23302016-06-06 Marek Polacek <polacek@redhat.com>
2331
2332 * c-typeck.c (comptypes_internal): Handle comparisons of
2333 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
2334 TYPE_REF_CAN_ALIAS_ALL.
2335
b605f663
CLT
23362016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
2337
2338 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
2339 arguments as addressable when async clause exists.
2340
00631022
JJ
23412016-05-30 Jakub Jelinek <jakub@redhat.com>
2342
2343 PR c++/71349
2344 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
2345 when combined with target construct.
2346
7211a097
JJ
23472016-05-26 Jakub Jelinek <jakub@redhat.com>
2348
2349 * c-parser.c (c_parser_omp_clause_schedule): Warn if
2350 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
2351
95efe6b6
MP
23522016-05-25 Marek Polacek <polacek@redhat.com>
2353
2354 PR c/71265
2355 * c-decl.c (c_make_fname_decl): Don't check seen_error.
2356
a23faf7a
MP
2357 PR c/71266
2358 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
2359
e46c7770
CP
23602016-05-24 Cesar Philippidis <cesar@codesourcery.com>
2361
2362 * c-parser.c (c_parser_oacc_declare): Add support for
2363 GOMP_MAP_FIRSTPRIVATE_POINTER.
2364 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
2365 argument with enum c_omp_region_type ort.
2366 (handle_omp_array_sections): Likewise. Update call to
2367 handle_omp_array_sections_1.
2368 (c_finish_omp_clauses): Add specific errors and warning messages for
2369 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
2370 call to handle_omp_array_sections.
2371
a04e69c0
TS
23722016-05-24 Thomas Schwinge <thomas@codesourcery.com>
2373
2374 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
2375
f17a223d
RB
23762016-05-24 Richard Biener <rguenther@suse.de>
2377
2378 PR middle-end/70434
2379 PR c/69504
2380 * c-typeck.c (build_array_ref): Do not complain about indexing
2381 non-lvalue vectors. Adjust for function name change.
2382
79063edd
MS
23832016-05-20 Martin Sebor <msebor@redhat.com>
2384
2385 PR c/71115
2386 * c-typeck.c (error_init): Use
2387 expansion_point_location_if_in_system_header.
2388 (warning_init): Same.
2389
8a40fef3
DM
23902016-05-19 David Malcolm <dmalcolm@redhat.com>
2391
2392 PR c/71171
2393 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
2394 in error-handling.
2395 (c_parser_postfix_expression): Likewise.
2396 * c-tree.h (c_expr::set_error): New method.
2397 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
2398 that result's range is initialized.
2399
e9892350
JG
24002016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
2401
2402 * c-typeck.c (parser_build_unary_op): Fix formatting.
2403
8fad45f5
MW
24042016-05-16 Matthew Wahab <matthew.wahab@arm.com>
2405
2406 * c-decl.c (grokdeclarator): Remove errmsg and use of
2407 targetm.invalid_return_type.
2408 (grokparms): Remove errmsg and use of
2409 targetm.invalid_parameter_type.
2410
aa4b467b
JM
24112016-05-13 Joseph Myers <joseph@codesourcery.com>
2412
2413 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2414 function return type.
2415
4f2e1536
MP
24162016-05-12 Marek Polacek <polacek@redhat.com>
2417
2418 PR c/70756
2419 * c-decl.c (build_compound_literal): Pass LOC down to
2420 c_incomplete_type_error.
2421 * c-tree.h (require_complete_type): Adjust declaration.
2422 (c_incomplete_type_error): Likewise.
2423 * c-typeck.c (require_complete_type): Add location parameter, pass it
2424 down to c_incomplete_type_error.
2425 (c_incomplete_type_error): Add location parameter, pass it down to
2426 error_at.
2427 (build_component_ref): Pass location down to c_incomplete_type_error.
2428 (default_conversion): Pass location down to require_complete_type.
2429 (build_array_ref): Likewise.
2430 (build_function_call_vec): Likewise.
2431 (convert_arguments): Likewise.
2432 (build_unary_op): Likewise.
2433 (build_c_cast): Likewise.
2434 (build_modify_expr): Likewise.
2435 (convert_for_assignment): Likewise.
2436 (c_finish_omp_clauses): Likewise.
2437
d6e83a8d
MM
24382016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2439
2440 PR c/43651
2441 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
2442 is enabled.
2443 * c-errors.c (pedwarn_c90): Return true if warned.
2444 * c-tree.h (pedwarn_c90): Change return type to bool.
2445 (enum c_declspec_word): Add new enumerator cdw_atomic.
2446
5c3a10fb
MP
24472016-05-11 Marek Polacek <polacek@redhat.com>
2448
2449 PR c++/71024
2450 * c-decl.c (diagnose_mismatched_decls): Factor out code to
2451 diagnose_mismatched_attributes and call it.
2452
cf68d92c
MP
24532016-05-10 Marek Polacek <polacek@redhat.com>
2454
2455 PR c/70255
2456 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2457 on a declaration following the definition.
2458
351f85c5
JJ
24592016-05-05 Jakub Jelinek <jakub@redhat.com>
2460
2461 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2462 parse it through to c_parser_c99_block_statement.
2463 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2464 caller.
2465
deef7113
MP
24662016-05-04 Marek Polacek <polacek@redhat.com>
2467
2468 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2469 OPT_Wdangling_else.
2470
de55efd5
MP
24712016-05-04 Marek Polacek <polacek@redhat.com>
2472
2473 PR c/48778
2474 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2475 for macro expansions.
2476
79ce98bc
MP
24772016-05-03 Marek Polacek <polacek@redhat.com>
2478
2479 PR c/70859
2480 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
2481 check_builtin_function_arguments.
2482
fb2647aa
RB
24832016-05-03 Richard Biener <rguenther@suse.de>
2484
2485 * Make-lang.in (cc1-checksum.c): For stage-final re-use
2486 the checksum from the previous stage.
2487
77886428
CP
24882016-05-02 Cesar Philippidis <cesar@codesourcery.com>
2489
2490 * c-parser.c (c_parser_oacc_all_clauses): Update call to
2491 c_finish_omp_clauses.
2492 (c_parser_omp_all_clauses): Likewise.
2493 (c_parser_oacc_cache): Likewise.
2494 (c_parser_oacc_loop): Likewise.
2495 (omp_split_clauses): Likewise.
2496 (c_parser_omp_declare_target): Likewise.
2497 (c_parser_cilk_all_clauses): Likewise.
2498 (c_parser_cilk_for): Likewise.
2499 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
2500 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2501
7176a4a0
MP
25022016-05-02 Marek Polacek <polacek@redhat.com>
2503
2504 PR c/70851
2505 * c-decl.c (grokdeclarator): Diagnose when array's size has an
2506 incomplete type.
2507
e7ff0319
CP
25082016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2509
2510 PR middle-end/70626
2511 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
2512 OACC_LOOP_CLAUSE_MASK.
2513 (c_parser_oacc_kernels_parallel): Update call to
2514 c_oacc_split_loop_clauses.
2515
9f405ce1
AM
25162016-04-28 Andrew MacLeod <amacleod@redhat.com>
2517
2518 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
2519 argument to build_modify_expr in two cases.
2520
c1e1f433
BS
25212016-04-27 Bernd Schmidt <bschmidt@redhat.com>
2522
2523 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2524 warn_for_memset instead of warning directly here.
2525
2448a956
MP
25262016-04-26 Marek Polacek <polacek@redhat.com>
2527
2528 PR c/67784
2529 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2530 out of ...
2531 (c_parser_for_statement): ... here.
2532 (c_parser_if_statement): Use it.
2533 (c_parser_switch_statement): Use it.
2534 (c_parser_while_statement): Use it.
2535
b02a5e26
MP
2536 PR c/70791
2537 * c-decl.c (pushdecl): Pass LOCUS down to warning.
2538
477d4906
IV
25392016-04-20 Ilya Verbin <ilya.verbin@intel.com>
2540
2541 PR c++/69363
2542 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2543 instead of c_finish_cilk_clauses.
2544 * c-tree.h (c_finish_omp_clauses): Add new default argument.
2545 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
2546 floating-point variables in the linear clause for Cilk Plus.
2547
fe37c7af
MM
25482016-04-18 Michael Matz <matz@suse.de>
2549
2550 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2551 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2552
949505a9
MP
25532016-04-15 Marek Polacek <polacek@redhat.com>
2554
2555 PR c/70671
2556 * c-typeck.c (build_unary_op): Pass location down to error and
2557 warning call.
2558
dda1bf61
JJ
25592016-04-15 Jakub Jelinek <jakub@redhat.com>
2560
2561 PR c/70436
2562 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2563 where needed.
2564 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2565 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2566 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2567 Adjust c_parser_pragma callers.
2568 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
2569 caller.
2570 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2571 c_parser_statement.
2572 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2573 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2574 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2575 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2576 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2577 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2578 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2579 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2580 down where needed.
2581 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
2582 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2583 calls.
2584
99cd9857
MP
25852016-04-13 Marek Polacek <polacek@redhat.com>
2586
2587 PR c/70436
2588 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2589 adjust callers.
2590 (c_parser_statement): Likewise.
2591 (c_parser_c99_block_statement): Likewise.
2592 (c_parser_while_statement): Likewise.
2593 (c_parser_for_statement): Likewise.
2594 (c_parser_if_body): Don't set IF_P here.
2595 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
2596 about dangling else here.
2597 * c-tree.h (c_finish_if_stmt): Adjust declaration.
2598 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
2599 warn about dangling else here.
2600
f13355da
MP
26012016-04-04 Marek Polacek <polacek@redhat.com>
2602
2603 PR c/70307
2604 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2605
5fde6a45
MP
26062016-03-31 Marek Polacek <polacek@redhat.com>
2607
2608 PR c/70297
2609 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2610
4bbf545b
DM
26112016-03-18 David Malcolm <dmalcolm@redhat.com>
2612
2613 PR c/70281
2614 * c-parser.c (c_parser_postfix_expression): Set the source range
2615 for uses of "__builtin_types_compatible_p".
2616
fcc2b74f
JJ
26172016-03-17 Jakub Jelinek <jakub@redhat.com>
2618
2619 PR c/70280
2620 * c-typeck.c (composite_type): Don't count void_list_node
2621 into len, if the list is terminated by void_list_node, start
2622 with void_list_node instead of NULL for newargs. Stop
2623 at void_list_node.
2624
ab4c578f
MP
26252016-03-16 Marek Polacek <polacek@redhat.com>
2626
2627 PR c/70093
2628 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2629 nested functions returning VM types.
2630
96b3c82d
CP
26312016-03-09 Cesar Philippidis <cesar@codesourcery.com>
2632
2633 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2634 when calling c_finish_omp_clauses.
2635
29b9828f
BS
26362016-03-04 Bernd Schmidt <bschmidt@redhat.com>
2637
2638 PR c/69824
2639 * c-decl.c (get_parm_info): Don't queue implicit function declarations
2640 for later.
2641
7ff6ca38
MP
26422016-03-04 Marek Polacek <polacek@redhat.com>
2643
2644 PR c/69798
2645 * c-parser.c (c_parser_postfix_expression): Call
2646 c_parser_cast_expression rather than c_parser_postfix_expression.
2647
686e2237
JJ
26482016-03-01 Jakub Jelinek <jakub@redhat.com>
2649
2650 PR c/69796
2651 PR c/69974
2652 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2653 of incomplete decls to error_mark_node.
2654
0b05329b
MP
26552016-02-24 Marek Polacek <polacek@redhat.com>
2656
2657 PR c/69819
2658 * c-decl.c (finish_decl): Don't update the copy of the type of a
2659 different decl type.
2660
067fbd8b
JJ
26612016-02-23 Jakub Jelinek <jakub@redhat.com>
2662
2663 PR objc/69844
2664 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2665 in id_kind reclassification.
2666
bf14eba2
JJ
26672016-02-16 Jakub Jelinek <jakub@redhat.com>
2668
2669 PR c/69835
2670 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2671
ba539195
JN
26722016-02-16 James Norris <jnorris@codesourcery.com>
2673
2674 PR c/64748
2675 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2676
16595a1f
BS
26772016-02-12 Bernd Schmidt <bschmidt@redhat.com>
2678
f48dfe98
BS
2679 * c-decl.c (build_null_declspecs): Zero the entire struct.
2680
16595a1f
BS
2681 PR c/69522
2682 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
2683 callers changed. If nested_p is true, use it to call
2684 finish_implicit_inits.
2685 * c-tree.h (finish_implicit_inits): Declare.
2686 * c-typeck.c (finish_implicit_inits): New function. Move code
2687 from ...
2688 (push_init_level): ... here.
2689 (set_designator, process_init_element): Call finish_implicit_inits.
2690
66756373
JJ
26912016-02-11 Jakub Jelinek <jakub@redhat.com>
2692
2693 PR c/69768
2694 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
2695 arguments for -Waddress warning.
2696
1066e9b5
JJ
26972016-02-04 Jakub Jelinek <jakub@redhat.com>
2698
2699 PR c/69669
2700 * c-decl.c (finish_enum): When honoring mode attribute,
2701 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2702
3a5d2ba4
JJ
27032016-01-29 Jakub Jelinek <jakub@redhat.com>
2704
2705 PR debug/69518
2706 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2707 all type variants, not just TYPE_MAIN_VARIANT.
2708
cbdd8ae0
JJ
27092016-01-27 Jakub Jelinek <jakub@redhat.com>
2710
2711 PR debug/66869
2712 * c-decl.c (c_write_global_declarations_1): Warn with
2713 warn_unused_function if static prototype without definition
2714 is not C_DECL_USED.
2715
fa74a4bc
MP
27162016-01-27 Marek Polacek <polacek@redhat.com>
2717
2718 PR c/68062
2719 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2720 to unsigned, if needed. Add -Wsign-compare warning.
2721
13f92e8d
JJ
27222016-01-26 Jakub Jelinek <jakub@redhat.com>
2723
2724 PR tree-optimization/69483
2725 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2726
cd8e73dc 27272016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
2728
2729 PR c/24293
2730 * c-tree.h (incomplete_record_decls): Declare.
2731 * c-parser.c (incomplete_record_decls): Define.
2732 (c_parser_translation_unit): Iterate through incomplete_record_decls and
2733 report error if any decl has zero size.
2734 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
2735 or enum type to incomplete_record_decls.
2736
e6d6ec9e
TV
27372016-01-14 Tom de Vries <tom@codesourcery.com>
2738
2739 PR tree-optimization/68773
2740 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
2741 set force_output.
2742
00083992
MP
27432016-01-14 Marek Polacek <polacek@redhat.com>
2744
2745 PR c/69262
2746 * c-decl.c (grokdeclarator): Provide more information for invalid
2747 array declarations.
2748
7443cf13
DM
27492016-01-06 David Malcolm <dmalcolm@redhat.com>
2750
2751 * c-parser.c (c_parser_unary_expression): For dereferences, build
2752 a combined location before calling build_indirect_ref, so that
2753 error reports cover the full range, manually updating the c_expr
2754 src_range.
2755
6b131d5b
MP
27562016-01-06 Marek Polacek <polacek@redhat.com>
2757
2758 PR sanitizer/69099
2759 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
2760 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
2761 NULL.
2762
818ab71a
JJ
27632016-01-04 Jakub Jelinek <jakub@redhat.com>
2764
2765 Update copyright years.
2766
2fe0a208
MP
27672016-01-04 Marek Polacek <polacek@redhat.com>
2768
2769 PR c/68908
2770 * c-typeck.c (build_atomic_assign): Improve commentary. Add
2771 optimization to use __atomic_fetch_* built-in if possible.
2772
c7b48c8a
TS
27732015-12-23 Thomas Schwinge <thomas@codesourcery.com>
2774
2775 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
2776 into...
2777 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
2778 all users.
2779
fda5652f
MP
27802015-12-22 Marek Polacek <polacek@redhat.com>
2781
2782 PR c/69002
2783 * c-typeck.c (build_component_ref): Warn when acessing elements of
2784 atomic structures or unions.
2785
745e411d
DM
27862015-12-21 David Malcolm <dmalcolm@redhat.com>
2787
2788 * c-typeck.c: Include "gcc-rich-location.h".
2789 (build_binary_op): In the two places that call binary_op_error,
2790 create a gcc_rich_location and populate it with the location of
2791 the binary op and its two operands.
2792
94c40e19
DM
27932015-12-16 David Malcolm <dmalcolm@redhat.com>
2794
2795 * c-parser.c (c_parser_statement_after_labels): When calling
2796 c_finish_return, Use the return expression's location if it has
2797 one, falling back to the location of the first token within it.
2798 * c-typeck.c (c_finish_return): When issuing warnings about
2799 the incorrect presence/absence of a return value, issue a note
2800 showing the declaration of the function.
2801
de67c4c3
DM
28022015-12-16 David Malcolm <dmalcolm@redhat.com>
2803
2804 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
2805 to 4.
2806 (c_parser_peek_nth_token): New function.
2807 (c_parser_peek_conflict_marker): New function.
2808 (c_parser_error): Detect conflict markers and report them as such.
2809
a10704e1
DM
28102015-12-16 David Malcolm <dmalcolm@redhat.com>
2811
2812 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
2813 to preserve range information for the primary expression
2814 in the call to c_parser_postfix_expression_after_primary.
2815
8062bca6
DM
28162015-12-16 David Malcolm <dmalcolm@redhat.com>
2817
2818 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
2819 expression location, falling back on the first token location,
2820 rather than always using the latter.
2821
d06f8b75
MP
28222015-12-16 Marek Polacek <polacek@redhat.com>
2823
2824 PR c/64637
2825 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
2826 available.
2827
2994fb91
MP
28282015-12-15 Marek Polacek <polacek@redhat.com>
2829
2830 PR c/68907
2831 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
2832 artificial decl.
2833
a1b93f8d
DM
28342015-12-08 David Malcolm <dmalcolm@redhat.com>
2835
2836 * c-parser.c (c_parser_alignof_expression): Capture location of
2837 closing parenthesis (if any), or of end of unary expression, and
2838 use it to build a src_range for the expression.
2839
46c6e1e2
DM
28402015-12-08 David Malcolm <dmalcolm@redhat.com>
2841
2842 PR c/68757
2843 * c-parser.c (c_parser_get_builtin_args): Add
2844 "out_close_paren_loc" param, and write back to it.
2845 (c_parser_postfix_expression): Capture the closing
2846 parenthesis location for RID_CHOOSE_EXPR,
2847 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
2848 RID_BUILTIN_SHUFFLE and use it to set the source range
2849 for such expressions; within RID_BUILTIN_COMPLEX set
2850 the underlying location.
2851
66189108
MP
28522015-12-07 Marek Polacek <polacek@redhat.com>
2853
2854 PR c/68668
2855 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
2856 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
2857
f187980b
EB
28582015-12-04 Eric Botcazou <ebotcazou@adacore.com>
2859
2860 * c-tree.h (c_build_va_arg): Adjust prototype.
2861 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
2862 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
2863 parameter, adjust throughout and issue an error if EXPR is a component
2864 with reverse storage order.
2865
4250754e
JM
28662015-12-02 Jason Merrill <jason@redhat.com>
2867
2868 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
2869 (c_fully_fold_internal, decl_constant_value_for_optimization):
2870 Move from c-common.c.
2871 * c-tree.h: Declare decl_constant_value_for_optimization.
2872 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
2873
e9e32ee6
JM
28742015-12-02 Joseph Myers <joseph@codesourcery.com>
2875
2876 PR c/68162
2877 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
2878 following link from declarator to next declarator. Track original
2879 qualified type and pass it to c_build_qualified_type.
2880 * c-typeck.c (c_build_qualified_type): Add arguments
2881 orig_qual_type and orig_qual_indirect.
2882
ff7a55bf
TS
28832015-12-02 Thomas Schwinge <thomas@codesourcery.com>
2884
2885 * c-parser.c (c_parser_omp_clause_name)
2886 (c_parser_oacc_all_clauses): Alphabetical sorting.
2887
657e4e47
JJ
28882015-12-02 Jakub Jelinek <jakub@redhat.com>
2889
2890 PR c/68533
2891 * c-decl.c (get_parm_info): Use b->locus instead of input_location
2892 for diagnostics.
2893
37d5ad46
JB
28942015-12-01 Julian Brown <julian@codesourcery.com>
2895 Cesar Philippidis <cesar@codesourcery.com>
2896 James Norris <James_Norris@mentor.com>
2897
2898 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
2899 (c_parser_oacc_clause_use_device): New function.
2900 (c_parser_oacc_all_clauses): Add use_device support.
2901 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
2902 (c_parser_oacc_host_data): New function.
2903 (c_parser_omp_construct): Add host_data support.
2904 * c-tree.h (c_finish_oacc_host_data): Add prototype.
2905 * c-typeck.c (c_finish_oacc_host_data): New function.
2906 (c_finish_omp_clauses): Add use_device support.
2907
a4850ce9
JH
29082015-11-29 Jan Hubicka <hubicka@ucw.cz>
2909
2910 PR c/67106
2911 * c-decl.c: Set TYPE_PACKED in variants.
2912
b58d3df2
ML
29132015-11-27 Martin Liska <mliska@suse.cz>
2914
2915 PR c++/68312
2916 * c-array-notation.c (fix_builtin_array_notation_fn):
2917 Use release_vec_vec instead of vec::release.
2918 (build_array_notation_expr): Likewise.
2919 (fix_conditional_array_notations_1): Likewise.
2920 (fix_array_notation_expr): Likewise.
2921 (fix_array_notation_call_expr): Likewise.
2922
aec17bfe
JJ
29232015-11-27 Jakub Jelinek <jakub@redhat.com>
2924
2925 PR c/63326
2926 * c-parser.c (c_parser_compound_statement_nostart): If
2927 last_label is true, use pragma_stmt instead of pragma_compound
2928 as second c_parser_pragma argument.
2929 (c_parser_omp_ordered, c_parser_omp_target_update,
2930 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
2931 false as second argument to c_parser_skip_to_pragma_eol after
2932 diagnosing standalone directives used in pragma_stmt context.
2933
688c4de0
IV
29342015-11-24 Ilya Verbin <ilya.verbin@intel.com>
2935
2936 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
2937 with "if (ENABLE_OFFLOADING)".
2938
cbd03aee
DM
29392015-11-23 David Malcolm <dmalcolm@redhat.com>
2940
2941 PR objc/68438
2942 * c-parser.c (c_parser_postfix_expression): Set up source ranges
2943 for various Objective-C constructs: Class.name syntax,
2944 @selector(), @protocol(), @encode(), and [] message syntax.
2945
a87a86e1
DM
29462015-11-20 David Malcolm <dmalcolm@redhat.com>
2947
2948 PR 62314
2949 * c-typeck.c (should_suggest_deref_p): New function.
2950 (build_component_ref): Special-case POINTER_TYPE when
2951 generating a "not a structure of union" error message, and
2952 suggest a "->" rather than a ".", providing a fix-it hint.
2953
8ece8dfb
DM
29542015-11-19 David Malcolm <dmalcolm@redhat.com>
2955
2956 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
2957 candidate into a new function, find_closest_identifier.
2958
433068cc
MP
29592015-11-19 Marek Polacek <polacek@redhat.com>
2960
2961 PR c/68412
2962 * c-typeck.c (parser_build_binary_op): Properly handle
2963 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
2964
bef08b71
DM
29652015-11-17 David Malcolm <dmalcolm@redhat.com>
2966
2967 * c-parser.c (set_c_expr_source_range): Bulletproof both
2968 overloaded implementations against NULL expr->value.
2969 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
2970 values.
2971 (c_parser_unary_expression): Likewise when handling addresses of
2972 labels.
2973 (c_parser_postfix_expression): Likewise for statement expressions,
2974 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
2975 __builtin_va_arg, and for __builtin_offset_of.
2976 (c_parser_postfix_expression_after_paren_type): Initialize expr's
2977 src_range using the range of the braced initializer.
2978 (c_parser_transaction_expression): Set src_range for "ret" to a
2979 sane pair of values.
2980
fff77217
KY
29812015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
2982
2983 * c-parser.c (c_finish_omp_declare_simd): Look for
2984 "simd" attribute as well. Update error message.
2985
1d899da2
TS
29862015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2987
2988 * c-parser.c (c_parser_omp_declare_target): Adjust.
2989
e4606348
JJ
29902015-11-14 Jakub Jelinek <jakub@redhat.com>
2991
2992 * c-typeck.c (c_finish_omp_clauses): Don't mark
2993 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
2994
3e636daf
MP
29952015-11-14 Marek Polacek <polacek@redhat.com>
2996
2997 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
2998 * c-typeck.c: Likewise.
2999
ebedc9a3
DM
30002015-11-13 David Malcolm <dmalcolm@redhat.com>
3001
3002 * c-decl.c (warn_defaults_to): Pass line_table to
3003 rich_location ctor.
3004 * c-errors.c (pedwarn_c99): Likewise.
3005 (pedwarn_c90): Likewise.
3006 * c-parser.c (set_c_expr_source_range): New functions.
3007 (c_token::get_range): New method.
3008 (c_token::get_finish): New method.
3009 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
3010 based on the range from the start of the LHS to the end of the
3011 RHS.
3012 (c_parser_conditional_expression): Likewise, based on the range
3013 from the start of the cond.value to the end of exp2.value.
3014 (c_parser_binary_expression): Call set_c_expr_source_range on
3015 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
3016 (c_parser_cast_expression): Call set_c_expr_source_range on ret
3017 based on the cast_loc through to the end of the expr.
3018 (c_parser_unary_expression): Likewise, based on the
3019 op_loc through to the end of op.
3020 (c_parser_sizeof_expression) Likewise, based on the start of the
3021 sizeof token through to either the closing paren or the end of
3022 expr.
3023 (c_parser_postfix_expression): Likewise, using the token range,
3024 or from the open paren through to the close paren for
3025 parenthesized expressions.
3026 (c_parser_postfix_expression_after_primary): Likewise, for
3027 various kinds of expression.
3028 * c-tree.h (struct c_expr): Add field "src_range".
3029 (c_expr::get_start): New method.
3030 (c_expr::get_finish): New method.
3031 (set_c_expr_source_range): New decls.
3032 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
3033 on ret for prefix unary ops.
3034 (parser_build_binary_op): Likewise, running from the start of
3035 arg1.value through to the end of arg2.value.
3036
ec8b536f
MP
30372015-11-13 Marek Polacek <polacek@redhat.com>
3038
3039 PR c/68320
3040 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
3041
277fe616
DM
30422015-11-13 David Malcolm <dmalcolm@redhat.com>
3043
3044 * c-typeck.c: Include spellcheck.h.
3045 (lookup_field_fuzzy_find_candidates): New function.
3046 (lookup_field_fuzzy): New function.
3047 (build_component_ref): If the field was not found, try using
3048 lookup_field_fuzzy and potentially offer a suggestion.
3049
6e232ba4
JN
30502015-11-12 James Norris <jnorris@codesourcery.com>
3051 Joseph Myers <joseph@codesourcery.com>
3052
3053 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
3054 (c_parser_omp_clause_name): Handle 'device_resident' clause.
3055 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3056 and PRAGMA_OMP_CLAUSE_LINK.
3057 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3058 and PRAGMA_OACC_CLAUSE_LINK.
3059 (OACC_DECLARE_CLAUSE_MASK): New definition.
3060 (c_parser_oacc_declare): New function.
3061
9be4f715
MP
30622015-11-12 Marek Polacek <polacek@redhat.com>
3063
3064 PR c/67784
3065 * c-parser.c (c_parser_for_statement): Reclassify the token in
3066 a correct scope.
3067
e78bede6
MP
30682015-11-11 Marek Polacek <polacek@redhat.com>
3069
3070 PR c/68107
3071 PR c++/68266
3072 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
3073 checking the size of an array.
3074
69f293c9
AM
30752015-11-11 Andrew MacLeod <amacleod@redhat.com>
3076
3077 * c-array-notation.c: Remove unused header files.
3078 * c-aux-info.c: Likewise.
3079 * c-convert.c: Likewise.
3080 * c-decl.c: Likewise.
3081 * c-errors.c: Likewise.
3082 * c-lang.c: Likewise.
3083 * c-objc-common.c: Likewise.
3084 * c-parser.c: Likewise.
3085 * c-typeck.c: Likewise.
3086 * gccspec.c: Likewise.
3087
3a40d81d
NS
30882015-11-09 Thomas Schwinge <thomas@codesourcery.com>
3089 Cesar Philippidis <cesar@codesourcery.com>
3090 James Norris <jnorris@codesourcery.com>
3091 Julian Brown <julian@codesourcery.com>
3092 Nathan Sidwell <nathan@codesourcery.com>
3093
3094 c/
3095 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
3096 routine arg.
3097 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
3098 (c_parser_pragma): Parse 'acc routine'.
3099 (OACC_ROUTINE_CLAUSE_MARK): Define.
3100 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
3101
fc402eec
AA
31022015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3103
3104 PR debug/67192
3105 * c-typeck.c (c_finish_loop): For unconditional loops, set the
3106 location of the backward-goto to the start of the loop body.
3107
f6b0b3db
AA
31082015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3109
3110 PR debug/67192
3111 * c-parser.c (c_parser_while_statement): Finish the loop before
3112 parsing ahead for misleading indentation.
3113 (c_parser_for_statement): Likewise.
3114
ee45a32d
EB
31152015-11-08 Eric Botcazou <ebotcazou@adacore.com>
3116
3117 * c-decl.c (finish_struct): If the structure has reverse storage
3118 order, rewrite the type of array fields with scalar component. Call
3119 maybe_apply_pragma_scalar_storage_order on entry.
3120 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
3121 errors on bit-fields and reverse SSO here and not...
3122 (c_mark_addressable): ...here.
3123 (output_init_element): Adjust call to initializer_constant_valid_p.
3124 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
3125
8a645150
DM
31262015-11-06 David Malcolm <dmalcolm@redhat.com>
3127
3128 * c-decl.c (warn_defaults_to): Update for change in signature
3129 of diagnostic_set_info.
3130 * c-errors.c (pedwarn_c99): Likewise.
3131 (pedwarn_c90): Likewise.
3132 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
3133 for textinfo::set_location.
3134
7a5e4956
CP
31352015-11-05 Cesar Philippidis <cesar@codesourcery.com>
3136 Thomas Schwinge <thomas@codesourcery.com>
3137 James Norris <jnorris@codesourcery.com>
3138
3139 * c-parser.c (c_parser_omp_clause_name): Add support for
3140 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
3141 (c_parser_omp_clause_default): Add is_oacc argument. Handle
3142 default(none) in OpenACC.
3143 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
3144 arguments.
3145 (c_parser_oacc_clause_tile): New function.
3146 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
3147 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
3148 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
3149 TILE}.
3150 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
3151 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
3152 FIRSTPRIVATE}.
3153 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
3154 (c_parser_oacc_update): Update the error message for missing clauses.
3155 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
3156 and OMP_CLAUSE_INDEPENDENT.
3157
bfcfbfa0
MP
31582015-11-05 Marek Polacek <polacek@redhat.com>
3159
3160 PR c/68090
3161 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
3162 deal with pre-evaluation on invalid types.
3163
e01d41e5
JJ
31642015-11-05 Jakub Jelinek <jakub@redhat.com>
3165 Ilya Verbin <ilya.verbin@intel.com>
3166
3167 * c-parser.c: Include context.h and gimple-expr.h.
3168 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
3169 monotonic together with nonmonotonic.
3170 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
3171 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
3172 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
3173 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
3174 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
3175 expressions on combined target teams before the target.
3176 (c_parser_omp_declare_target): If decl has "omp declare target" or
3177 "omp declare target link" attribute, and cgraph or varpool node already
3178 exists, then set corresponding flags. Call c_finish_omp_clauses
3179 in the parenthesized extended-list syntax case.
3180 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
3181 declare target.
3182 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
3183 on OMP_CLAUSE_REDUCTION array sections.
3184 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
3185 into the constant offset, or for variable low-bound using
3186 POINTER_PLUS_EXPR. For structure element based array sections use
3187 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
3188 (c_finish_omp_clauses): Drop generic_field_head, structure
3189 elements are now always mapped even as array section bases,
3190 diagnose same var in data sharing and mapping clauses. Diagnose if
3191 linear step on declare simd is neither a constant nor a uniform
3192 parameter. Look through POINTER_PLUS_EXPR for array section
3193 reductions. Diagnose the same var or function appearing multiple
3194 times on the same directive. Fix up wording for the to clause if t
3195 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
3196 modifier on kinds other than dynamic or guided or nonmonotonic
3197 modifier together with ordered clause.
3198
4bf9e5a8
TS
31992015-11-03 Thomas Schwinge <thomas@codesourcery.com>
3200 Chung-Lin Tang <cltang@codesourcery.com>
3201
3202 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
3203
2adfab87
AM
32042015-10-29 Andrew MacLeod <amacleod@redhat.com>
3205
3206 * c-array-notation.c: Reorder #include's and remove duplicates.
3207 * c-aux-info.c: Likewise.
3208 * c-convert.c: Likewise.
3209 * c-decl.c: Likewise.
3210 * c-errors.c: Likewise.
3211 * c-lang.c: Likewise.
3212 * c-objc-common.c: Likewise.
3213 * c-parser.c: Likewise.
3214 * c-typeck.c: Likewise.
3215
e922069e
JW
32162015-10-26 Jim Wilson <jim.wilson@linaro.org>
3217
3218 PR debug/66068
3219 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
3220 after calling build_qualified_type.
3221
765dd391
CP
32222015-10-27 Cesar Philippidis <cesar@codesourcery.com>
3223 Thomas Schwinge <thomas@codesourcery.com>
3224 James Norris <jnorris@codesourcery.com>
3225 Joseph Myers <joseph@codesourcery.com>
3226 Julian Brown <julian@codesourcery.com>
3227 Bernd Schmidt <bschmidt@redhat.com>
3228
3229 * c-parser.c (c_parser_oacc_shape_clause): New.
3230 (c_parser_oacc_simple_clause): New.
3231 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
3232 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
3233
88bae6f4
TS
32342015-10-27 Thomas Schwinge <thomas@codesourcery.com>
3235 James Norris <jnorris@codesourcery.com>
3236 Cesar Philippidis <cesar@codesourcery.com>
3237
3238 PR c/64765
3239 PR c/64880
3240 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
3241 parameters, and handle these. Adjust all users.
3242 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
3243 into...
3244 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
3245 all users.
3246 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
3247 declare functions.
3248 (c_finish_omp_construct): Declare function.
3249 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
3250 Merge functions into...
3251 (c_finish_omp_construct): ... this new function.
3252
a8fc2579
RB
32532015-10-22 Richard Biener <rguenther@suse.de>
3254
3255 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
3256 before folding a MINUS_EXPR.
3257
e9122ef6
MP
32582015-10-21 Marek Polacek <polacek@redhat.com>
3259
3260 PR c/68024
3261 * c-decl.c (start_function): Warn about vararg functions without
3262 a prototype.
3263
9f47c7e5
IE
32642015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
3265
3266 * c-typeck.c (build_conditional_expr): Use boolean vector
3267 type for vector comparison.
3268 (build_vec_cmp): New.
3269 (build_binary_op): Use build_vec_cmp for comparison.
3270
fa60eeb9
MP
32712015-10-20 Marek Polacek <polacek@redhat.com>
3272
3273 * c-parser.c (is_cilkplus_vector_p): Don't define here.
3274
2c7020eb
MP
32752015-10-20 Marek Polacek <polacek@redhat.com>
3276
3277 PR c/67964
3278 * c-parser.c (c_parser_attributes): Break out of the loop if the
3279 token after an attribute isn't a comma.
3280
d9a6bd32
JJ
32812015-10-13 Jakub Jelinek <jakub@redhat.com>
3282 Aldy Hernandez <aldyh@redhat.com>
3283
3284 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
3285 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
3286 (c_parser_omp_variable_list): Handle structure elements for
3287 map, to and from clauses. Handle array sections in reduction
3288 clause. Formatting fixes.
3289 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
3290 if clause modifiers.
3291 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3292 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3293 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
3294 c_parser_omp_clause_is_device_ptr): New functions.
3295 (c_parser_omp_clause_ordered): Parse optional parameter.
3296 (c_parser_omp_clause_reduction): Handle array reductions.
3297 (c_parser_omp_clause_schedule): Parse optional simd modifier.
3298 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
3299 functions.
3300 (c_parser_omp_clause_linear): Parse linear clause modifiers.
3301 (c_parser_omp_clause_depend_sink): New function.
3302 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
3303 (c_parser_omp_clause_map): Parse release/delete map kinds and
3304 optional always modifier.
3305 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
3306 and c_finish_omp_clauses callers.
3307 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
3308 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
3309 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
3310 (OMP_CRITICAL_CLAUSE_MASK): Define.
3311 (c_parser_omp_critical): Parse critical clauses.
3312 (c_parser_omp_for_loop): Handle doacross loops, adjust
3313 c_finish_omp_for and c_finish_omp_clauses callers.
3314 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
3315 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
3316 (OMP_FOR_CLAUSE_MASK): Add linear clause.
3317 (c_parser_omp_for): Disallow ordered clause when combined with
3318 distribute. Disallow linear clause when combined with distribute
3319 and not combined with simd.
3320 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
3321 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
3322 parse clauses and if depend clause is found, don't parse a body.
3323 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
3324 Allow target parallel without for after it.
3325 (OMP_TASK_CLAUSE_MASK): Add priority clause.
3326 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
3327 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
3328 invalid kinds.
3329 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
3330 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
3331 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
3332 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
3333 functions.
3334 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
3335 defaultmap and is_device_ptr clauses.
3336 (c_parser_omp_target): Parse target parallel and target simd. Set
3337 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
3338 and target exit data. Diagnose invalid map kinds.
3339 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
3340 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
3341 construct.
3342 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
3343 &omp_priv.
3344 (OMP_TASKLOOP_CLAUSE_MASK): Define.
3345 (c_parser_omp_taskloop): New function.
3346 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
3347 handle PRAGMA_OMP_TASKLOOP.
3348 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
3349 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
3350 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
3351 Add IS_OMP argument, handle structure element bases, diagnose
3352 bitfields, pass IS_OMP recursively, diagnose known zero length
3353 array sections in depend clauses, handle array sections in reduction
3354 clause, diagnose negative length even for pointers.
3355 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
3356 types, pass IS_OMP down to handle_omp_array_sections_1, handle
3357 array sections in reduction clause, set
3358 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
3359 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
3360 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
3361 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
3362
21ba0cea
MP
33632015-10-06 Marek Polacek <polacek@redhat.com>
3364
3365 * c-parser.c (c_parser_statement_after_labels): Use
3366 protected_set_expr_location.
3367 (c_parser_omp_clause_num_gangs): Likewise.
3368 (c_parser_omp_clause_num_threads): Likewise.
3369 (c_parser_omp_clause_num_workers): Likewise.
3370 (c_parser_omp_clause_vector_length): Likewise.
3371 (c_parser_omp_clause_num_teams): Likewise.
3372 (c_parser_omp_clause_thread_limit): Likewise.
3373 * c-typeck.c (build_c_cast): Likewise.
3374 (c_cast_expr): Likewise.
3375
624d31fe
RS
33762015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3377
3378 * c-typeck.c (c_tree_equal): Use real_equal instead of
3379 REAL_VALUES_EQUAL.
3380
b8fd7909
JM
33812015-10-04 Jason Merrill <jason@redhat.com>
3382
3383 * c-parser.c (c_lex_one_token): Handle @synchronized.
3384 * c-decl.c (match_builtin_function_types): A declaration of a built-in
3385 can change whether the function is transaction_safe.
3386
1c7485af
MP
33872015-10-02 Marek Polacek <polacek@redhat.com>
3388
3389 PR c/67730
3390 * c-typeck.c (convert_for_assignment): Use the expansion point
3391 location throughout.
3392
3e3b8d63
MP
33932015-10-02 Marek Polacek <polacek@redhat.com>
3394
3395 PR c/64249
3396 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
3397 and pass it down to c_parser_if_statement.
3398 (c_parser_else_body): Add CHAIN parameter and pass it down to
3399 c_parser_statement_after_labels.
3400 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
3401 duplicated if-else-if conditions.
3402
aabef2de
MP
34032015-10-01 Marek Polacek <polacek@redhat.com>
3404
3405 * c-typeck.c (convert_for_assignment): Improve commentary.
3406
de8ddd5f
MP
34072015-09-30 Marek Polacek <polacek@redhat.com>
3408
3409 PR c/67730
3410 * c-typeck.c (c_finish_return): Use the expansion point location for
3411 certain "return with value" warnings.
3412
c4914de6
MLI
34132015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3414
3415 * c-parser.c (pragma_lex): Add loc argument.
3416
0e36f5c7
MP
34172015-09-15 Marek Polacek <polacek@redhat.com>
3418
3419 PR c/67580
3420 * c-decl.c (tag_exists_p): New function.
3421 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3422 struct/union/enum keywords are missing.
3423 * c-tree.h (tag_exists_p): Declare.
3424
2f3bb934
MP
34252015-09-15 Marek Polacek <polacek@redhat.com>
3426
3427 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3428 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3429 Return NULL_TREE instead of 0.
3430 (lookup_name): Return NULL_TREE instead of 0.
3431 (lookup_name_in_scope): Likewise.
3432 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3433 (parser_xref_tag): Use false instead of 0.
3434 (start_struct): Use true instead of 1.
3435 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3436
aa256c4a
MP
34372015-09-14 Marek Polacek <polacek@redhat.com>
3438
3439 * c-typeck.c (set_nonincremental_init_from_string): Use
3440 HOST_WIDE_INT_M1U when shifting a negative value.
3441
dbb68221
MW
34422015-09-09 Mark Wielaard <mjw@redhat.com>
3443
3444 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
3445 parm against NULL.
3446
a8a098ac
JJ
34472015-09-10 Jakub Jelinek <jakub@redhat.com>
3448
3449 PR c/67502
3450 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
3451 into OMP_FOR_PRE_BODY rather than before the loop.
3452
f4b189d5
JJ
34532015-09-09 Jakub Jelinek <jakub@redhat.com>
3454
0bb99c11
JJ
3455 PR c/67501
3456 * c-parser.c (c_parser_oacc_all_clauses,
3457 c_parser_omp_all_clauses): Remove invalid clause from
3458 list of clauses even if parser->error is set.
3459
fce5e5e3
JJ
3460 PR c/67500
3461 * c-parser.c (c_parser_omp_clause_aligned,
3462 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3463 test for errors.
3464 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3465 error_mark_node.
3466
f4b189d5
JJ
3467 PR c/67495
3468 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3469 instead of c_parser_unary_expression. If the result is !lvalue_p,
3470 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3471
b2aaf235
MP
34722015-09-04 Marek Polacek <polacek@redhat.com>
3473
3474 PR sanitizer/67279
3475 * c-typeck.c (build_binary_op): Don't instrument static initializers.
3476
1807ffc1
MS
34772015-09-03 Martin Sebor <msebor@redhat.com>
3478
3479 PR c/66516
8b652e65
JJ
3480 * c-typeck.c (convert_arguments, parser_build_unary_op,
3481 build_conditional_expr, c_cast_expr, convert_for_assignment,
3482 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
3483 reject_gcc_builtin.
3484 (c_decl_implicit): Define.
3485
d04ff417
MP
34862015-09-02 Marek Polacek <polacek@redhat.com>
3487
3488 PR c/67432
3489 * c-parser.c (c_parser_enum_specifier): Give a better error for
3490 an empty enum.
3491
a79683d5
TS
34922015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3493
3494 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3495
191a6b94
MP
34962015-08-12 Marek Polacek <polacek@redhat.com>
3497
3498 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
3499 LOC to it.
3500
420a9d9b
MP
35012015-08-03 Marek Polacek <polacek@redhat.com>
3502
3503 PR c/67088
3504 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
3505 Use it.
3506 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
3507
992118a1
PP
35082015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3509
3510 * c-parser.c (c_parser_if_body): Take token_indent_info
3511 argument. Call warn_for_misleading_indentation even when the
3512 body is a semicolon. Extract token_indent_infos corresponding
3513 to the guard, body and next tokens. Adjust call to
3514 warn_for_misleading_indentation accordingly.
3515 (c_parser_else_body): Likewise.
3516 (c_parser_if_statement): Likewise.
3517 (c_parser_while_statement): Likewise.
3518 (c_parser_for_statement): Likewise.
3519
46308474
LFSM
35202015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
3521 Manuel López-Ibáñez <manu@gcc.gnu.org>
3522
3523 * c-decl.c (get_parm_info): Remove static var. Update warning
3524 message.
3525
05b28fd6
MP
35262015-07-27 Marek Polacek <polacek@redhat.com>
3527
3528 PR c++/66555
3529 PR c/54979
3530 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3531
451b5e48
MP
35322015-07-20 Marek Polacek <polacek@redhat.com>
3533
3534 PR c++/55095
3535 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3536 (build_binary_op): Warn about left shift overflows.
3537
1916bcb5
AM
35382015-07-09 Andrew MacLeod <amacleod@redhat.com>
3539
3540 * c-array-notation.c: Adjust includes for flags.h changes.
3541 * c-objc-common.c: Likewise.
3542
c7131fb2
AM
35432015-07-07 Andrew MacLeod <amacleod@redhat.com>
3544
3545 * c-array-notation.c: Adjust includes.
3546 * c-aux-info.c: Likewise.
3547 * c-convert.c: Likewise.
3548 * c-decl.c: Likewise.
3549 * c-errors.c: Likewise.
3550 * c-lang.c: Likewise.
3551 * c-objc-common.c: Likewise.
3552 * c-parser.c: Likewise.
3553 * c-typeck.c: Likewise.
3554
da2e71c9
MLI
35552015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3556
3557 PR fortran/66605
3558 * c-decl.c (finish_function): Call do_warn_unused_parameter.
3559
b155cfd9
MP
35602015-06-29 Marek Polacek <polacek@redhat.com>
3561
3562 PR c/66322
3563 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3564 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
3565 about -Wswitch-bool here.
3566 (do_case): Update c_add_case_label call.
3567 (c_finish_case): Update c_do_switch_warnings call.
3568
31521951
MP
35692015-06-27 Marek Polacek <polacek@redhat.com>
3570
3571 * c-typeck.c: Use VECTOR_TYPE_P throughout.
3572
22d03525
MP
35732015-06-26 Marek Polacek <polacek@redhat.com>
3574
3575 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3576 INDIRECT_REF_P.
3577 * c-typeck.c (array_to_pointer_conversion): Likewise.
3578 (build_unary_op): Likewise.
3579 (c_finish_return): Likewise.
3580
f0889939
AM
35812015-06-25 Andrew MacLeod <amacleod@redhat.com>
3582
3583 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3584 * c-parser.c: Likewise.
3585
8d67ee55
RS
35862015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3587
3588 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3589 instead of pointer_hash.
3590 (detect_field_duplicates): Likewise.
3591
0ae9bd27
MP
35922015-06-25 Marek Polacek <polacek@redhat.com>
3593
3594 * c-array-notation.c: Use VAR_P throughout.
3595 * c-decl.c: Likewise.
3596 * c-objc-common.c: Likewise.
3597 * c-parser.c: Likewise.
3598 * c-typeck.c: Likewise.
3599
62f9079a
MP
36002015-06-25 Marek Polacek <polacek@redhat.com>
3601
3602 * c-decl.c: Use is_global_var throughout.
3603 * c-parser.c: Likewise.
3604 * c-typeck.c: Likewise.
3605
abb226c9
AM
36062015-06-17 Andrew MacLeod <amacleod@redhat.com>
3607
3608 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3609 * c-aux-info.c: Likewise.
3610 * c-convert.c: Likewise.
3611 * c-decl.c: Likewise.
3612 * c-errors.c: Likewise.
3613 * c-lang.c: Likewise.
3614 * c-objc-common.c: Likewise.
3615 * c-parser.c: Likewise.
3616 * c-typeck.c: Likewise.
3617
8cbababc
JH
36182015-06-11 Jan Hubicka <hubicka@ucw.cz>
3619
3620 PR middle-end/66325
3621 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3622 variants.
3623
a0349665
PMR
36242015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
3625
3626 * c-decl.c (pop_scope): Register the main translation unit
3627 through the new debug hook.
3628
13fdf2e2
AM
36292015-06-08 Andrew MacLeod <amacleod@redhat.com>
3630
3631 * c-array-notation.c : Adjust include files.
3632 * c-aux-info.c : Likewise.
3633 * c-convert.c : Likewise.
3634 * c-decl.c : Likewise.
3635 * c-errors.c : Likewise.
3636 * c-lang.c : Likewise.
3637 * c-lang.h : Likewise.
3638 * c-objc-common.c : Likewise.
3639 * c-parser.c : Likewise.
3640 * c-typeck.c : Likewise.
3641
d7438551
AH
36422015-06-05 Aldy Hernandez <aldyh@redhat.com>
3643
3644 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3645 immediately clobber it.
3646 (c_write_global_declarations_1): Remove call to
3647 check_global_declaration_1.
3648 (c_write_global_declarations_2): Remove.
3649 (c_write_final_cleanups): Rename from c_write_global_declarations.
3650 Remove call to finalize_compilation_unit.
3651 Remove calls to debugging hooks.
3652 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3653 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3654 * c-tree.h: Remove c_write_global_declarations.
3655
ecb9f223
AM
36562015-06-04 Andrew MacLeod <amacleod@redhat.com>
3657
3658 * c-array-notation.c: Adjust includes for restructured coretypes.h.
3659 * c-aux-info.c: Likewise.
3660 * c-convert.c: Likewise.
3661 * c-decl.c: Likewise.
3662 * c-errors.c: Likewise.
3663 * c-lang.c: Likewise.
3664 * c-objc-common.c: Likewise.
3665 * c-parser.c: Likewise.
3666 * c-typeck.c: Likewise.
3667
9482b620
MP
36682015-06-04 Marek Polacek <polacek@redhat.com>
3669
3670 PR c/66341
3671 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3672 it is a lvalue.
3673
bc51ace3
PK
36742015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3675
3676 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3677 Warn for empty struct.
3678 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3679
ea5b45b6
AT
36802015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
3681
3682 * c-decl.c (start_function): Call plugin before parsing.
3683 (finish_function): Call plugin after parsing.
3684
c2d47482
PK
36852015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3686
3687 PR c/49551
3688 * c-decl.c (merge_decls): Merge DECL_COMMON.
3689
a95492ab
JW
36902015-05-22 Jim Wilson <jim.wilson@linaro.org>
3691
3692 * Make-lang.in (check_gcc_pallelize): Define.
3693
fd5c817a
MP
36942015-05-22 Marek Polacek <polacek@redhat.com>
3695
3696 PR c/47043
3697 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
3698 attributes.
3699
c7b70a3c
MP
37002015-05-21 Marek Polacek <polacek@redhat.com>
3701
3702 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3703 DECL_BUILT_IN.
3704
21b634ae
MP
37052015-05-20 Marek Polacek <polacek@redhat.com>
3706
3707 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3708 * c-typeck.c: Likewise.
3709
296a8c2f
MP
37102015-05-19 Marek Polacek <polacek@redhat.com>
3711
3712 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3713
41b37d5e
JJ
37142015-05-19 Jakub Jelinek <jakub@redhat.com>
3715
3716 PR middle-end/66199
3717 * c-parser.c (c_parser_omp_for_loop): Don't add
3718 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3719 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3720 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3721 constructs.
3722
fab27f52
MM
37232015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
3724
3725 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 3726 swaps.
fab27f52 3727
40de31cf
MLI
37282015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3729
3730 PR fortran/44054
3731 * c-objc-common.c (c_tree_printer): Replace locus pointer with
3732 accessor function.
3733
3aa3c9fc
MP
37342015-05-14 Marek Polacek <polacek@redhat.com>
3735
3736 PR c/66066
3737 PR c/66127
3738 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
3739 rather than with 0.
3740
c3388e62
DM
37412015-05-12 David Malcolm <dmalcolm@redhat.com>
3742
3743 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
3744 to add a call to warn_for_misleading_indentation.
3745 (c_parser_else_body): Likewise, adding param "else_loc".
3746 (c_parser_if_statement): Check for misleading indentation.
3747 (c_parser_while_statement): Likewise.
3748 (c_parser_for_statement): Likewise.
3749
755e528f
MP
37502015-05-08 Marek Polacek <polacek@redhat.com>
3751
3752 PR c/64918
3753 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
3754 (output_init_element): Likewise.
3755
0173bd2a
MP
37562015-05-07 Marek Polacek <polacek@redhat.com>
3757
3758 PR c/65179
3759 * c-typeck.c (build_binary_op): Warn when left shifting a negative
3760 value.
3761
9babc352
MP
37622015-04-30 Marek Polacek <polacek@redhat.com>
3763
3764 * c-typeck.c (set_init_label): Call error_at instead of error and
3765 pass LOC to it.
3766
ac9f18db
MP
3767 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
3768 the type of a decl.
3769
ec3fba51
MP
3770 * c-typeck.c (c_build_va_arg): Clarify the error message.
3771
b811915d
TS
37722015-04-29 Thomas Schwinge <thomas@codesourcery.com>
3773
3774 * c-parser.c (c_parser_oacc_enter_exit_data): Use
3775 OMP_STANDALONE_CLAUSES.
3776
f3075008
MP
37772015-04-28 Marek Polacek <polacek@redhat.com>
3778
3779 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
3780
4e81b788
MP
37812015-04-28 Marek Polacek <polacek@redhat.com>
3782
3783 PR c/65901
3784 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
3785
6c1db78e
MP
37862015-04-25 Marek Polacek <polacek@redhat.com>
3787
3788 PR c/52085
3789 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
3790 attribute.
3791
5c4abbb8
MP
37922015-04-23 Marek Polacek <polacek@redhat.com>
3793
3794 PR c/65345
3795 * c-decl.c (set_labels_context_r): New function.
3796 (store_parm_decls): Call it via walk_tree_without_duplicates.
3797 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
3798 instead of create_tmp_var. Build TARGET_EXPR instead of
3799 COMPOUND_EXPR.
3800 (build_atomic_assign): Use create_tmp_var_raw instead of
3801 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
3802
06aca1d5
IV
38032015-04-20 Ilya Verbin <ilya.verbin@intel.com>
3804
3805 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
3806 (c_parser_omp_target_update): Add missed %> to error_at ().
3807
8fba1830
BRF
38082015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
3809
3810 PR target/55143
3811 * c-decl.c (c_default_pointer_mode): Remove definition.
3812 * c-tree.h (c_default_pointer_mode): Remove declaration.
3813
62021f64
TB
38142015-03-27 Tobias Burnus <burnus@net-b.de>
3815
3816 PR c/65586
3817 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
3818 error out.
3819 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
3820 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
3821 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
3822
9b65e171
JJ
38232015-03-19 Jakub Jelinek <jakub@redhat.com>
3824
3825 * c-decl.c (c_decl_attributes): Also add "omp declare target"
3826 attribute for DECL_EXTERNAL VAR_DECLs.
3827
17958621
JJ
38282015-03-11 Jakub Jelinek <jakub@redhat.com>
3829
3830 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
3831 argument.
3832
7ccb1a11
JJ
38332015-03-10 Jakub Jelinek <jakub@redhat.com>
3834
3835 PR c/65120
3836 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
3837 before preparing arguments to warn_logical_not_parentheses.
3838
01177669
JJ
38392015-03-09 Jakub Jelinek <jakub@redhat.com>
3840
3841 PR c/65120
3842 * c-typeck.c (parser_build_binary_op): Don't warn for
3843 !!x == y or !b == y where b is _Bool.
3844
802ac282
MP
38452015-03-09 Marek Polacek <polacek@redhat.com>
3846
3847 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
3848 * c-decl.c (grokdeclarator): Likewise.
3849 * c-typeck.c (build_binary_op): Likewise.
3850
e5165b60
MP
38512015-02-27 Marek Polacek <polacek@redhat.com>
3852
3853 PR c/65228
3854 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
3855
065d214c
MP
38562015-02-14 Marek Polacek <polacek@redhat.com>
3857
3858 PR c/64768
3859 * c-decl.c (grokdeclarator): Set the range of a flexible array member
3860 declared through a typedef name.
3861
e5d9235b
MP
38622015-02-13 Marek Polacek <polacek@redhat.com>
3863
3864 PR c/65050
3865 * c-decl.c (grokdeclarator): Print also the type when giving
3866 the error message about array's incomplete element type.
3867
fa01ffcc
JJ
38682015-02-11 Jakub Jelinek <jakub@redhat.com>
3869
3870 PR c/64824
3871 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
3872 check in the POP macro.
3873
c3e38a03
MP
38742015-02-09 Marek Polacek <polacek@redhat.com>
3875
3876 PR c/64856
3877 * c-typeck.c (process_init_element): Don't always wrap
3878 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
3879 initializing a range of elements.
3880
4886ec8e
JJ
38812015-02-04 Jakub Jelinek <jakub@redhat.com>
3882
3883 PR c/64824
3884 PR c/64868
3885 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
3886
c3e38a03 38872015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
3888
3889 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
3890 processing enum declaration.
3891
7b33f0c8
MP
38922015-01-29 Marek Polacek <polacek@redhat.com>
3893
3894 PR c/64709
3895 * c-typeck.c (pop_init_level): If constructor_elements has
3896 exactly one element with integer_zerop value, set constructor_zeroinit
3897 to 1. Remove braces around warning_init call.
3898
dea63e49
JJ
38992015-01-27 Jakub Jelinek <jakub@redhat.com>
3900
3901 PR c/64766
3902 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
3903 of FUNCTION_DECLs with error_mark_node.
3904
d38f7dce
JJ
39052015-01-26 Jakub Jelinek <jakub@redhat.com>
3906
3907 PR c/64778
3908 * c-typeck.c (convert_arguments): Return -1 if there are
3909 error_args, even if we've diagnosed too many arguments.
3910
cbf5d0e7
RB
39112015-01-21 Richard Biener <rguenther@suse.de>
3912
3913 PR middle-end/64313
3914 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
3915 for builtins the user declared correctly.
3916
41dbbb37
TS
39172015-01-15 Thomas Schwinge <thomas@codesourcery.com>
3918 Bernd Schmidt <bernds@codesourcery.com>
3919 Cesar Philippidis <cesar@codesourcery.com>
3920 James Norris <jnorris@codesourcery.com>
3921 Jakub Jelinek <jakub@redhat.com>
3922 Ilmir Usmanov <i.usmanov@samsung.com>
3923
3924 * c-parser.c: Include "gomp-constants.h".
3925 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3926 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3927 Use OMP_CLAUSE_SET_MAP_KIND.
3928 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
3929 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
3930 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
3931 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
3932 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
3933 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
3934 "copyout", "create", "delete", "deviceptr", "gang", "host",
3935 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
3936 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3937 "present_or_create", "pcreate", "seq", "self", "vector",
3938 "vector_length", "wait", "worker".
3939 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3940 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
3941 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3942 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3943 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
3944 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
3945 (c_parser_oacc_data_clause_deviceptr)
3946 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
3947 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
3948 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
3949 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
3950 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
3951 (c_parser_oacc_parallel, c_parser_oacc_update)
3952 (c_parser_oacc_wait): New functions.
3953 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
3954 (c_finish_oacc_data): New prototypes.
3955 * c-typeck.c: Include "gomp-constants.h".
3956 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
3957 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
3958 OMP_CLAUSE_SET_MAP_KIND.
3959 (c_finish_oacc_parallel, c_finish_oacc_kernels)
3960 (c_finish_oacc_data): New functions.
3961 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
3962 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
3963 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
3964 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
3965 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
3966 GOMP_MAP_FORCE_DEVICEPTR.
3967
adfac8df
JJ
39682015-01-09 Michael Collison <michael.collison@linaro.org>
3969
3970 * c-array-notation.c: Include hash-set.h, machmode.h,
3971 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3972 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
3973 * c-aux-info.c: Ditto.
3974 * c-convert.c: Ditto.
3975 * c-decl.c: Ditto.
3976 * c-errors.c: Ditto.
3977 * c-lang.c: Dittoxs.
3978 * c-objc-common.c: Ditto.
3979 * c-parser.c: Ditto.
3980 * c-typeck.c: Include hash-set.h, machmode.h,
3981 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3982 fold-const.h, wide-int.h, inchash.h, real.h and
3983 fixed-value.h due to flattening of tree.h.
3984
2cc901dc
MP
39852015-01-07 Marek Polacek <polacek@redhat.com>
3986
3987 PR c/64417
3988 * c-typeck.c (process_init_element): Disallow initialization of
3989 a flexible array member with a string constant if the structure
3990 is in an array.
3991
5624e564
JJ
39922015-01-05 Jakub Jelinek <jakub@redhat.com>
3993
e5341100
JJ
3994 PR sanitizer/64344
3995 * c-typeck.c (convert_for_assignment, c_finish_return): For
3996 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
3997 types also set in_late_binary_op around convert call.
3998 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
3999 to integral type casts, if not in_late_binary_op, pass c_fully_fold
4000 result on expr as last argument to ubsan_instrument_float_cast,
4001 if in_late_binary_op, don't use c_save_expr but save_expr.
4002
5624e564
JJ
4003 Update copyright years.
4004
5bd012f8
MP
40052015-01-05 Marek Polacek <polacek@redhat.com>
4006
4007 PR c/64423
4008 * c-typeck.c (build_array_ref): Pass loc down to
4009 warn_array_subscript_with_type_char.
4010
3f8257db 40112014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
4012
4013 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 4014 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 4015 element type.
8e745a17 4016 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 4017 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 4018 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 4019 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 4020 to PEDWARN_FOR_QUALIFIERS.
768952be 4021
8f94a8c4
JJ
40222014-12-17 Jakub Jelinek <jakub@redhat.com>
4023
4024 PR sanitizer/64289
4025 * c-convert.c: Include ubsan.h.
4026 (convert): For real -> integral casts and
4027 -fsanitize=float-cast-overflow don't call convert_to_integer, but
4028 instead instrument the float cast directly.
4029
b731b390
JJ
40302014-11-29 Jakub Jelinek <jakub@redhat.com>
4031
4032 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
4033 c_finish_stmt_expr): Remove NULL last argument from
4034 create_tmp_var_raw and create_tmp_var calls.
4035 * c-array-notation.c (fix_builtin_array_notation_fn,
4036 build_array_notation_expr, fix_conditional_array_notations_1,
4037 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
4038
541e35a6
MP
40392014-11-28 Marek Polacek <polacek@redhat.com>
4040
4041 PR c/63862
4042 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
4043 convert the right operand to integer type.
4044
b286be94
MP
40452014-11-25 Marek Polacek <polacek@redhat.com>
4046
4047 PR c/63877
4048 * c-decl.c (start_function): Disable -Wmissing-declarations warning
4049 for inline functions.
4050
aa7da51a
JJ
40512014-11-21 Jakub Jelinek <jakub@redhat.com>
4052
4053 PR target/63764
4054 * c-typeck.c (build_array_ref): Adjust
4055 convert_vector_to_pointer_for_subscript caller. If it returns true,
4056 call non_lvalue_loc on the result.
4057
d876207f
RB
40582014-11-11 Richard Biener <rguenther@suse.de>
4059
4060 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
4061 to true.
4062
e5e44252
AK
40632014-11-10 Andi Kleen <ak@linux.intel.com>
4064
4065 PR c/60804
4066 * c-parser.c (c_parser_statement_after_labels): Call
4067 check_no_cilk.
4068 (c_parser_if_statement): Dito.
4069 (c_parser_switch_statement): Dito.
4070 (c_parser_while_statement): Dito.
4071 (c_parser_do_statement): Dito.
4072 (c_parser_for_statement): Dito.
4073 * c-typeck.c (c_finish_loop): Dito.
4074
13c21655
PC
40752014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
4076
4077 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
4078 OPT_Wshift_count_overflow in the warnings.
4079
2d51fcef
MP
40802014-10-30 Marek Polacek <polacek@redhat.com>
4081
4082 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
4083 print the stripped version as well, if they're not the same.
4084
ef4bddc2
RS
40852014-10-29 Richard Sandiford <richard.sandiford@arm.com>
4086
4087 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
4088 machine_mode.
4089
c582198b
AM
40902014-10-28 Andrew MacLeod <amacleod@redhat.com>
4091
4092 * c-decl.c: Adjust include files.
4093 * c-parser.c: Ditto.
4094
ddc8de03
PM
40952014-10-27 Phil Muldoon <pmuldoon@redhat.com>
4096 Tom Tromey <tromey@redhat.com>
4097
4098 * c-tree.h (enum c_oracle_request): New.
4099 (c_binding_oracle_function): New typedef.
4100 (c_binding_oracle, c_pushtag, c_bind): Declare.
4101 * c-decl.c (c_binding_oracle): New global.
4102 (I_SYMBOL_CHECKED): New macro.
4103 (i_symbol_binding): New function.
4104 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
4105 (I_TAG_CHECKED): New macro.
4106 (i_tag_binding): New function.
4107 (I_TAG_BINDING, I_TAG_DECL): Redefine.
4108 (I_LABEL_CHECKED): New macro.
4109 (i_label_binding): New function.
4110 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
4111 (c_print_identifier): Save and restore c_binding_oracle.
4112 (c_pushtag, c_bind): New functions.
4113
60393bbc
AM
41142014-10-27 Andrew MacLeod <amacleod@redhat.com>
4115
4116 * c-typeck.c: Adjust include files.
4117
d723bb7c
MLI
41182014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
4119
4120 PR c++/53061
4121 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
4122 initialization here...
4123 (c_initialize_diagnostics): ... but here. Set defaults after
4124 building pretty-printer.
4125
1bc5a451
MP
41262014-10-23 Marek Polacek <polacek@redhat.com>
4127
4128 PR c/63626
4129 * c-decl.c (pop_scope): Don't print warning in external_scope.
4130
4435bb92
MP
41312014-10-19 Marek Polacek <polacek@redhat.com>
4132
4133 PR c/63567
4134 * c-typeck.c (output_init_element): Allow initializing objects with
4135 static storage duration with compound literals even in C99 and add
4136 pedwarn for it.
4137
7278465e
MP
41382014-10-17 Marek Polacek <polacek@redhat.com>
4139
4140 PR c/63567
4141 * c-typeck.c (digest_init): Allow initializing objects with static
4142 storage duration with compound literals even in C99 and add pedwarn
4143 for it.
4144
d9b7be2e
MP
41452014-10-17 Marek Polacek <polacek@redhat.com>
4146
4147 PR c/63543
4148 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
4149 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
4150 error multiple times. Print the type.
4151
f406ae1f
MP
41522014-10-17 Marek Polacek <polacek@redhat.com>
4153
4154 PR c/63549
4155 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
4156 type.
4157
92574c7c
MP
41582014-10-17 Marek Polacek <polacek@redhat.com>
4159
4160 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
4161 (start_function): Use OPT_Wimplicit_int instead of 0.
4162 (store_parm_decls_oldstyle): Likewise.
4163
1bc4a978
MT
41642014-10-17 Alan Modra <amodra@gmail.com>
4165
4166 PR middle-end/61848
4167 * c-decl.c (merge_decls): Don't merge section name or tls model
4168 to newdecl symtab node, instead merge to olddecl. Override
4169 existing olddecl section name. Set tls_model for all thread-local
4170 vars, not just OMP thread-private ones. Remove incorrect comment.
4171
83685514
AM
41722014-10-16 Andrew MacLeod <amacleod@redhat.com>
4173
4174 * c-decl.c: Adjust include files.
4175
78a7c317
DD
41762014-10-14 DJ Delorie <dj@redhat.com>
4177
4178 * c-parser.c (c_parse_init): Add RID entries for each __intN.
4179 (c_token_starts_typename): Check all __intN, not just __int128.
4180 (c_token_starts_declspecs): Likewise.
4181 (c_parser_declspecs): Likewise.
4182 (c_parser_attribute_any_word): Likewise.
4183 (c_parser_objc_selector): Likewise.
4184 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
4185 (struct c_declspecs): Add int_n_idx field to record *which* __intN
4186 is specified.
4187 * c-decl.c (declspecs_add_type): Check for all __intN, not just
4188 __int128.
4189 (finish_declspecs): Likewise.
4190
74d98c1e
AB
41912014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
4192
8e745a17 4193 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 4194 the duplicate code.
8e745a17 4195 (c_parser_statement): Call the new function.
74d98c1e 4196
84937de2
MP
41972014-10-09 Marek Polacek <polacek@redhat.com>
4198
4199 PR c/63480
4200 * c-typeck.c (pop_init_level): Don't warn about initializing
4201 with { }.
4202
0382aaa0
MP
42032014-10-07 Marek Polacek <polacek@redhat.com>
4204
4205 PR c/59717
4206 * c-decl.c (header_for_builtin_fn): New function.
4207 (implicitly_declare): Suggest which header to include.
4208
7a0ca710
MP
42092014-10-07 Marek Polacek <polacek@redhat.com>
4210
4211 * c-convert.c (convert): Use error_operand_p.
4212 * c-typeck.c (require_complete_type): Likewise.
4213 (really_atomic_lvalue): Likewise.
4214 (digest_init): Likewise.
4215 (handle_omp_array_sections_1): Likewise.
4216
6bc8a126
MP
42172014-10-03 Marek Polacek <polacek@redhat.com>
4218
4219 PR c/63453
4220 * c-decl.c (pop_scope): Don't warn about "inline function declared
4221 but never defined" for functions marked with gnu_inline attribute.
4222
d90c0a59
JJ
42232014-09-25 Jakub Jelinek <jakub@redhat.com>
4224
4225 PR c++/63249
4226 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
4227 on low_bound and length.
4228
083e891e
MP
42292014-09-24 Marek Polacek <polacek@redhat.com>
4230
4231 PR c/61405
4232 PR c/53874
4233 * c-parser.c: Don't define CPP_KEYWORD.
4234 (c_parser_switch_statement): Pass original type to c_finish_case.
4235 * c-tree.h (c_finish_case): Update declaration.
4236 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
4237 conditionally to c_do_switch_warnings.
4238
8d95fe25
MP
42392014-09-03 Marek Polacek <polacek@redhat.com>
4240
4241 PR c/62024
4242 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
4243 conversions.
4244
9a771876
JJ
42452014-09-02 Jakub Jelinek <jakub@redhat.com>
4246 Balaji V. Iyer <balaji.v.iyer@intel.com>
4247 Igor Zamyatin <igor.zamyatin@intel.com>
4248
4249 * c-parser.c (c_parser_cilk_for): New function.
4250 (c_parser_cilk_grainsize): Likewise.
4251 (c_get_temp_regvar): Likewise.
4252 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
4253 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
4254 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
4255 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
4256 case.
4257
b7679d96
CG
42582014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
4259
4260 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
4261 with using HOST_WIDE_INT without truncation to 'int'
4262
59ea0364
MP
42632014-08-22 Marek Polacek <polacek@redhat.com>
4264
4265 PR c++/62199
4266 * c-typeck.c (parser_build_binary_op): Adjust call to
4267 warn_logical_not_parentheses.
4268
671a475e
IZ
42692014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
4270
4271 PR other/62008
4272 * c-parser.c (c_parser_array_notation): Check for correct
4273 type of an array added.
4274
04159acf
MP
42752014-08-19 Marek Polacek <polacek@redhat.com>
4276
4277 PR c++/62153
4278 * c-typeck.c (build_binary_op): If either operand of a comparison
4279 is a boolean expression, call maybe_warn_bool_compare.
4280
c77935ee
PP
42812014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
4282
4283 PR c/45584
4284 * c-typeck.c (build_c_cast): Do a conversion even when the
4285 TYPE_MAIN_VARIANTs are the same.
4286
35aff4fb
MP
42872014-08-19 Marek Polacek <polacek@redhat.com>
4288
4289 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
4290 pedwarn_c99 instead of pedwarn.
4291 (grokfield): Likewise.
4292 (warn_defaults_to): New function.
4293 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
4294 Unconditionally call pedwarn_c99 instead of pedwarn.
4295 (start_function): Call warn_defaults_to instead of pedwarn_c99.
4296 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
4297 check flag_isoc11 before.
4298 * c-errors.c (pedwarn_c99): Change the return type to bool.
4299 Handle -Wc99-c11-compat.
4300 * c-parser.c (disable_extension_diagnostics): Handle
4301 warn_c99_c11_compat.
4302 (restore_extension_diagnostics): Likewise.
4303 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
4304 instead of pedwarn, don't check flag_isoc11 before.
4305 (c_parser_declspecs): Likewise.
4306 (c_parser_alignas_specifier): Likewise.
4307 (c_parser_alignof_expression): Likewise.
4308 (c_parser_generic_selection): Likewise.
4309 * c-tree.h (pedwarn_c99): Update declaration.
4310 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
4311 of pedwarn_c99.
4312
177cce46
MP
43132014-08-19 Marek Polacek <polacek@redhat.com>
4314
4315 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
4316 to pedwarn_c90.
4317 * c-errors.c: Include "opts.h".
4318 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
4319 * c-parser.c (disable_extension_diagnostics): Handle negative value
4320 of warn_c90_c99_compat, too.
4321 (restore_extension_diagnostics): Likewise.
4322 (c_parser_compound_statement_nostart): Pass
4323 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
4324
6dc99c33
MP
43252014-08-12 Marek Polacek <polacek@redhat.com>
4326
4327 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
4328 Add pedwarn.
4329 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
4330 Likewise.
4331 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
4332
3f8257db 43332014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
4334
4335 PR c/51849
4336 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
4337 Call pedwarn_c90 instead of pedwarn.
4338 (check_bitfield_type_and_width): Likewise.
4339 (declspecs_add_qual): Likewise.
4340 (declspecs_add_type): Likewise.
4341 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
4342 Adjust to only call pedwarn_c90.
4343 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
4344 pedwarn_c90 instead of pedwarn.
4345 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
4346 * c-parser.c (disable_extension_diagnostics): Handle
4347 warn_c90_c99_compat.
4348 (restore_extension_diagnostics): Likewise.
4349 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
4350 pedwarn_c90 instead of pedwarn.
4351 (c_parser_initelt): Likewise.
4352 (c_parser_postfix_expression): Likewise.
4353 (c_parser_postfix_expression_after_paren_type): Likewise.
4354 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
4355 * c-tree.h: Fix formatting.
4356 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
4357 pedwarn_c90 instead of pedwarn.
4358
9f25a338
TS
43592014-08-07 Trevor Saunders <tsaunders@mozilla.com>
4360
4361 * c-typeck.c: Remove include of pointer-set.h.
4362
044331a8
MP
43632014-08-07 Marek Polacek <polacek@redhat.com>
4364
4365 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
4366
b787e7a2
TS
43672014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4368
4369 * c-typeck.c: Use hash_map instead of pointer_map.
4370
6e2830c3
TS
43712014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4372
4373 * c-decl.c: Use hash_set instead of pointer_set.
4374
a7ee52fb
IZ
43752014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
4376
4377 PR middle-end/61455
4378 * c-array-notation.c (expand_array_notations): Handling
4379 of DECL_EXPR added.
4380
b4dfdc11
MG
43812014-07-31 Marc Glisse <marc.glisse@inria.fr>
4382
4383 PR c++/60517
4384 * c-typeck.c (c_finish_return): Return 0 instead of the address of
4385 a local variable.
4386
976d5a22
TT
43872014-07-30 Tom Tromey <tromey@redhat.com>
4388
4389 * c-typeck.c (struct constructor_stack) <designator_depth>: New
4390 field.
4391 (really_start_incremental_init, push_init_level): Initialize
4392 designator_depth.
4393 (pop_init_level): Set global designator_depth.
4394 (process_init_element): Check for designated_init attribute.
4395
30281de2
MP
43962014-07-20 Marek Polacek <polacek@redhat.com>
4397
4398 PR c/61852
4399 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
4400 (implicitly_declare): Pass location to implicit_decl_warning.
4401
b108f48f
JJ
44022014-07-14 Jakub Jelinek <jakub@redhat.com>
4403
4404 PR middle-end/61294
4405 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
4406 If non-NULL, call c_parser_check_literal_zero.
4407 (c_parser_check_literal_zero): New function.
4408 (c_parser_postfix_expression_after_primary): Adjust
4409 c_parser_expr_list caller, handle -Wmemset-transposed-args.
4410
773ec47f
MP
44112014-07-06 Marek Polacek <polacek@redhat.com>
4412
4413 PR c/6940
4414 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4415 * c-tree.h (C_ARRAY_PARAMETER): Define.
4416 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4417 function parameter.
4418
22e1cf1c 44192014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 4420 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
4421
4422 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4423 releasing symbol.
4424
52ec0ea3
MP
44252014-07-01 Marek Polacek <polacek@redhat.com>
4426
4427 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4428 instead of 0 to WARN_FOR_ASSIGNMENT.
4429
d5c3d343
MP
44302014-07-01 Marek Polacek <polacek@redhat.com>
4431
4432 PR c/58286
4433 * c-typeck.c (convert_for_assignment): Pass
4434 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4435
6a7253a4
MP
44362014-06-30 Marek Polacek <polacek@redhat.com>
4437
4438 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4439 has no_sanitize_undefined attribute.
4440
5e88a8f4
IZ
44412014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
4442
4443 PR middle-end/57541
4444 * c-array-notation.c (fix_builtin_array_notation_fn):
4445 Check for 0 arguments in builtin call. Check that bultin argument is
4446 correct.
4447 * c-parser.c (c_parser_array_notation): Check for incorrect initial
4448 index.
4449
9698b078
SH
44502014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
4451
4452 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
4453 qualifiers in __auto_type for atomic types.
4454 (c_parser_typeof_specifier): Discard all type qualifiers in
4455 __typeof__ for atomic types.
4456
6e07c515
MP
44572014-06-25 Marek Polacek <polacek@redhat.com>
4458
4459 PR c/61162
4460 * c-parser.c (c_parser_statement_after_labels): Pass the location of
4461 the return expression to c_finish_return.
4462
da6f124d
JJ
44632014-06-25 Jakub Jelinek <jakub@redhat.com>
4464
4465 * c-typeck.c (c_finish_omp_clauses): Make sure
4466 OMP_CLAUSE_LINEAR_STEP has correct type.
4467
c203e8a7
TS
44682014-06-24 Trevor Saunders <tsaunders@mozilla.com>
4469
4470 * c-decl.c: Adjust.
4471
56ad0e38
JJ
44722014-06-24 Jakub Jelinek <jakub@redhat.com>
4473
4474 * c-parser.c (c_parser_omp_for_loop): For
4475 #pragma omp parallel for simd move lastprivate clause from parallel
4476 to for rather than simd.
4477
47c2554f
MP
44782014-06-23 Marek Polacek <polacek@redhat.com>
4479
4480 * c-typeck.c (parser_build_binary_op): Don't call
4481 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
4482
56363ffd
JH
44832014-06-15 Jan Hubicka <hubicka@ucw.cz>
4484
4485 * c-parser.c (c_parser_omp_threadprivate): Likewise.
4486 * c-decl.c (merge_decls): Likewise.
4487
d7ff7ae5
MP
44882014-06-09 Marek Polacek <polacek@redhat.com>
4489
4490 PR c/36446
4491 * c-typeck.c (error_init): Call inform instead of error_at.
4492 (pedwarn_init): Call inform instead of pedwarn.
4493 (warning_init): Call inform instead of warning_at.
4494
24d047a3
JH
44952014-06-07 Jan Hubicka <hubicka@ucw.cz>
4496
4497 * c-decl.c (merge_decls): Use set_decl_section_name.
4498 (duplicate_decls): Remove node if it exists.
4499
9bac5cbb
G
45002014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
4501
4502 PR c/53119
4503 * c-typeck.c (push_init_level, process_init_element,
4504 pop_init_level): Correct check for zero initialization, move
4505 missing brace warning to respect zero initialization.
4506
8ffcdea8
MP
45072014-06-05 Marek Polacek <polacek@redhat.com>
4508
4509 PR c/56724
4510 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
4511
742938c9
MP
45122014-06-05 Marek Polacek <polacek@redhat.com>
4513
4514 PR c/49706
4515 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
4516 on the left hand side operand of a comparison.
4517
6447c55d
MP
45182014-06-05 Marek Polacek <polacek@redhat.com>
4519
4520 PR c/48062
4521 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
4522 Print note only if the warning was printed.
4523
9dc7743c
IZ
45242014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
4525
4526 PR c/58942
4527 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4528 with a pointer.
4529
fedfecef
MP
45302014-06-03 Marek Polacek <polacek@redhat.com>
4531
4532 PR c/60439
4533 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4534 c_start_case.
4535 * c-tree.h (c_start_case): Update.
4536 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
4537 switch condition has boolean value.
4538
9b2b7279
AM
45392014-06-02 Andrew MacLeod <amacleod@redhat.com>
4540
4541 * c-decl.c: Include builtins.h.
4542 * c-parser.c: Likewise.
4543
5c1bc275
MP
45442014-05-27 Marek Polacek <polacek@redhat.com>
4545
4546 PR c/56724
4547 * c-typeck.c (convert_arguments): Get location of a parameter. Change
4548 error and warning calls to error_at and warning_at. Pass location of
4549 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
4550 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4551 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
4552
97563bc8
IZ
45532014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
4554
4555 PR c/61191
4556 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4557 function parameters.
4558
aede2c10
JH
45592014-05-23 Jan Hubicka <hubicka@ucw.cz>
4560
4561 * c-decl.c (merge_decls): Preserve symtab node pointers.
4562 (duplicate_decls): Free new decl.
4563
edbba2ce
TS
45642014-05-23 Thomas Schwinge <thomas@codesourcery.com>
4565
f3316c6d
TS
4566 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4567 initialization.
4568
edbba2ce
TS
4569 * c-parser.c (c_parser_omp_target): Return bool values.
4570
68c81f24
TS
45712014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4572
4573 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4574 num_teams_loc variable to num_thread_limit_loc.
4575
632f2871
RS
45762014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4577
4578 * c-array-notation.c (expand_array_notations): Use void_node
4579 instead of void_zero_node.
4580
766090c2
TS
45812014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4582
4583 * c-decl.c (finish_struct): Adjust.
4584 (finish_enum): Likewise.
4585 (bind): Adjust.
4586 (record_inline_static): Likewise.
4587 (push_scope): Likewise.
4588 (make_label): Likewise.
4589 (lookup_label_for_goto): Likewise.
4590 (finish_struct): Likewise.
4591 (finish_enum): Likewise.
4592 (store_parm_decls): Likewise.
4593 (c_push_function_context): Likewise.
4594 * c-lang.h: Remove usage of variable_size gty attribute.
4595 * c-parser.c (c_parse_init): Adjust.
4596 (c_parse_file): Likewise.
4597
2b107f6b
MP
45982014-05-13 Marek Polacek <polacek@redhat.com>
4599
4600 PR c/61162
4601 * c-typeck.c (convert_for_assignment): Pass location to
4602 WARN_FOR_ASSIGNMENT instead of input_location.
4603
d033409e
MP
46042014-05-10 Marek Polacek <polacek@redhat.com>
4605
4606 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4607 maybe_warn_string_init.
4608 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4609 maybe_warn_string_init.
4610 * c-tree.h (maybe_warn_string_init): Update declaration.
4611 * c-typeck.c (maybe_warn_string_init): Add location parameter.
4612 Call pedwarn_init with loc instead of with input_location.
4613 (digest_init): Pass init_loc to maybe_warn_string_init.
4614 (pop_init_level): Call pedwarn_init with loc instead of with
4615 input_location.
4616 (set_init_index): Likewise.
4617 (process_init_element): Likewise.
4618
ea58ef42
MP
46192014-05-09 Marek Polacek <polacek@redhat.com>
4620
4621 PR c/61096
4622 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4623 (c_parser_initelt): Pass location to set_init_label. Pass array index
4624 location to set_init_index.
4625 * c-tree.h (push_init_level): Update declaration.
4626 (pop_init_level): Likewise.
4627 (set_init_index): Likewise.
4628 (set_init_label): Likewise.
4629 * c-typeck.c (error_init): Add location parameter. Call error_at
4630 instead of error.
4631 (digest_init): Pass init_loc to error_init.
4632 (really_start_incremental_init):
4633 (push_init_level): Add location parameter. Pass loc to pop_init_level
4634 and error_init.
4635 (pop_init_level): Likewise.
4636 (set_designator): Add location parameter. Pass loc to pop_init_level,
4637 push_init_level, and error_init.
4638 (set_init_index): Add location parameter. Pass loc to error_init and
4639 set_designator.
4640 (set_init_label): Likewise.
4641 (output_init_element): Pass loc to error_init.
4642 (process_init_element): Pass loc to error_init, pop_init_level,
4643 pedwarn_init, and push_init_level.
4644
661a0813
MP
46452014-05-09 Marek Polacek <polacek@redhat.com>
4646
4647 PR c/50459
4648 * c-parser.c (c_parser_attributes): Parse the arguments as an
4649 expression-list if the attribute takes identifier.
4650
2793eeab
MP
46512014-05-08 Marek Polacek <polacek@redhat.com>
4652
4653 PR c/61053
4654 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4655 TYPE_ALIGN_UNIT.
4656
f827930a
MP
46572014-05-08 Marek Polacek <polacek@redhat.com>
4658
4659 PR c/61077
4660 * c-decl.c (start_function): Warn for _Atomic-qualified return type
4661 of main.
4662
1d60af08
KZ
46632014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4664 Mike Stump <mikestump@comcast.net>
4665 Richard Sandiford <rdsandiford@googlemail.com>
4666
4667 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4668 (finish_enum): Use wide-int interfaces.
4669 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4670 * c-typeck.c (build_c_cast): Likewise.
4671 (set_nonincremental_init_from_string): Likewise.
4672 (c_tree_equal): Likewise.
4673
a0e24419
MP
46742014-05-02 Marek Polacek <polacek@redhat.com>
4675
4676 PR c/25801
4677 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
4678 Return size_one_node when the type is not complete.
4679 (pointer_diff): Remove comment.
4680 (build_unary_op): Improve error messages.
4681
19fc9faa
MP
46822014-05-02 Marek Polacek <polacek@redhat.com>
4683
4684 * c-typeck.c (c_finish_return): Separate warning_at calls.
4685
63bc4e87
MP
46862014-05-02 Marek Polacek <polacek@redhat.com>
4687
4688 * c-tree.h (error_init): Remove declaration.
4689 (pedwarn_init): Likewise.
4690 * c-typeck.c (error_init): Make static and move above.
4691 (pedwarn_init): Likewise.
4692 (warning_init): Move above.
4693 (maybe_warn_string_init): Likewise.
4694
4bd2511b
JL
46952014-05-01 Jeff Law <law@redhat.com>
4696
4697 Revert:
4698
4699 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4700 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
4701 avoid goto.
4702
6a358dcb
MP
47032014-05-02 Marek Polacek <polacek@redhat.com>
4704
4705 PR c/60784
4706 * c-typeck.c (push_init_level): Set constructor_designated to
4707 p->designated for structures.
4708
ae5ebda4
MP
47092014-05-01 Marek Polacek <polacek@redhat.com>
4710
4711 PR c/60915
4712 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4713 function-definition has an attribute after the declarator.
4714
96b40f8d
MP
47152014-05-01 Marek Polacek <polacek@redhat.com>
4716
4717 PR c/60257
4718 * c-typeck.c (warning_init): Add location_t parameter. Call
4719 warning_at instead of warning.
4720 (push_init_level): Pass input_location to warning_init.
4721 (add_pending_init): Add location_t parameter. Pass loc to
4722 warning_init.
4723 (set_nonincremental_init): Pass input_location to add_pending_init.
4724 (set_nonincremental_init_from_string): Likewise.
4725 (output_init_element): Pass loc to warning_init and to
4726 add_pending_init.
4727
32e00768
MP
47282014-05-01 Marek Polacek <polacek@redhat.com>
4729
4730 PR c/43395
4731 * c-typeck.c (c_finish_return): Distinguish between label and variable
4732 when warning about returning local address.
4733
c9379ce2
MP
47342014-05-01 Marek Polacek <polacek@redhat.com>
4735
4736 PR c/29467
4737 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
4738 in C89 mode.
4739
d00887e8
MP
47402014-05-01 Marek Polacek <polacek@redhat.com>
4741
4742 PR c/43245
4743 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
4744 instead of 0 to WARN_FOR_QUALIFIERS.
4745
5436fa2e
MP
47462014-05-01 Marek Polacek <polacek@redhat.com>
4747
4748 PR c/56989
4749 * c-typeck.c (default_conversion): Use better location for
4750 error call.
4751
f8ed5150
MP
47522014-04-30 Marek Polacek <polacek@redhat.com>
4753
4754 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
4755 also when SANITIZE_FLOAT_DIVIDE is on.
4756
8337d1db
MP
47572014-04-30 Marek Polacek <polacek@redhat.com>
4758
4759 PR c/60139
4760 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
4761 and pedwarn_init. Use loc insted of input_location.
4762
c4bdc42f
MP
47632014-04-30 Marek Polacek <polacek@redhat.com>
4764
4765 PR c/60351
4766 * c-typeck.c (build_binary_op): Use location when warning about
4767 shift count.
4768
45484dcf
MP
47692014-04-25 Marek Polacek <polacek@redhat.com>
4770
4771 PR c/18079
4772 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
4773 always_inline/noinline and hot/cold attributes.
4774
34cf811f
MP
47752014-04-25 Marek Polacek <polacek@redhat.com>
4776
4777 PR c/60114
4778 * c-parser.c (c_parser_initelt): Pass input_location to
4779 process_init_element.
4780 (c_parser_initval): Pass loc to process_init_element.
4781 * c-tree.h (process_init_element): Adjust declaration.
4782 * c-typeck.c (push_init_level): Pass input_location to
4783 process_init_element.
4784 (pop_init_level): Likewise.
4785 (set_designator): Likewise.
4786 (output_init_element): Add location_t parameter. Pass loc to
4787 digest_init.
4788 (output_pending_init_elements): Pass input_location to
4789 output_init_element.
4790 (process_init_element): Add location_t parameter. Pass loc to
4791 output_init_element.
4792
42056eac
JJ
47932014-04-24 Jakub Jelinek <jakub@redhat.com>
4794
4795 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
4796 atomic-clause, allow comma in between atomic-clause and
4797 seq_cst.
4798
e162a134
JJ
47992014-04-22 Jakub Jelinek <jakub@redhat.com>
4800
4801 PR c/59073
4802 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
4803 fails, don't set OM_PARALLEL_COMBINED and return NULL.
4804
2f6babac
IZ
48052014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
4806
4807 PR middle-end/60469
4808 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4809 create_tmp_var instead build_decl for creating temps.
4810 (build_array_notation_expr): Likewise.
4811 (fix_conditional_array_notations_1): Likewise.
4812 (fix_array_notation_expr): Likewise.
4813 (fix_array_notation_call_expr): Likewise.
4814
8edbfaa6
JJ
48152014-03-28 Jakub Jelinek <jakub@redhat.com>
4816
4817 PR c++/60689
4818 * c-tree.h (c_build_function_call_vec): New prototype.
4819 * c-typeck.c (build_function_call_vec): Don't call
4820 resolve_overloaded_builtin here.
4821 (c_build_function_call_vec): New wrapper function around
4822 build_function_call_vec. Call resolve_overloaded_builtin here.
4823 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
4824 Call c_build_function_call_vec instead of build_function_call_vec.
4825 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4826 * c-decl.c (finish_decl): Likewise.
4827
7485aeea
MLI
48282014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4829
4830 PR c/55383
4831 * c-typeck.c: Use correct format string in cast-qual warning
4832
b17a8b07
TS
48332014-03-07 Thomas Schwinge <thomas@codesourcery.com>
4834
4835 * c-decl.c (c_decl_attributes): Use
4836 lang_hooks.types.omp_mappable_type.
4837 * c-typeck.c (c_finish_omp_clauses): Likewise.
4838
3af9c5e9
MP
48392014-03-06 Marek Polacek <polacek@redhat.com>
4840
4841 PR c/60197
4842 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
4843 of checking tree code.
4844
1c9f5f33
PK
48452014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4846
4847 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
4848 (c_parser_parameter_declaration): Likewise.
4849
cc28fc7f
MP
48502014-02-19 Marek Polacek <polacek@redhat.com>
4851
4852 PR c/60195
4853 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
4854 Call mark_exp_read on exp.value.
4855 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
4856 TREE_ADDRESSABLE on old instead of val.
4857 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
4858
b581c05c
PK
48592014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4860
4861 * c-parser.c (c_parser_get_builtin_args): Replace calls to
4862 C_EXPR_APPEND by vec_safe_push.
4863 * c-tree.h (C_EXPR_APPEND): Remove.
4864
81e5eca8
MP
48652014-01-31 Marek Polacek <polacek@redhat.com>
4866
4867 PR c/59963
4868 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
4869 build_function_call_vec.
4870 (build_function_call): Likewise.
4871 (build_atomic_assign): Likewise.
4872 (build_function_call_vec): Add arg_loc parameter. Use it.
4873 (convert_arguments): Likewise.
4874 (convert_for_assignment): Rename rhs_loc to expr_loc.
4875 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
4876 (c_parser_objc_keywordexpr): Likewise.
4877 (c_parser_postfix_expression_after_primary): Call
4878 build_function_call_vec with expr_loc rather than op_loc.
4879 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
4880 build_function_call_vec.
4881 (c_parser_expr_list): Add locations parameter. Fill it with locations
4882 of function arguments.
4883 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
4884
68fca595
MP
48852014-01-30 Marek Polacek <polacek@redhat.com>
4886
4887 PR c/59940
4888 * c-typeck.c (build_function_call_vec): Use loc parameter.
4889 (convert_arguments): Add location parameter. Use it.
4890 (ep_convert_and_check): Likewise.
4891 (build_atomic_assign): Adjust convert_for_assignment call.
4892 (build_modify_expr): Likewise.
4893 (digest_init): Likewise.
4894 (c_finish_return): Likewise.
4895 (build_conditional_expr): Adjust ep_convert_and_check calls.
4896 (convert_for_assignment): Add rhs_loc parameter. Use it.
4897 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
4898 calls.
4899
fa337f3a
RB
49002014-01-30 Richard Biener <rguenther@suse.de>
4901
4902 PR c/59905
4903 * c-typeck.c (build_function_call_vec): Do not replace calls
4904 to a function via an incompatible type with a runtime abort.
4905
b72271b9
BI
49062014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
4907
4908 * c-parser.c (c_parser_declaration_or_fndef): Replaced
4909 flag_enable_cilkplus with flag_cilkplus.
4910 (c_parser_direct_declarator_inner): Likewise.
4911 (c_parser_attribute_any_word): Likewise.
4912 (c_parser_attributes): Likewise.
4913 (c_parser_compound_statement): Likewise.
4914 (c_parser_statement_after_labels): Likewise.
4915 (c_parser_if_statement): Likewise.
4916 (c_parser_switch_statement): Likewise.
4917 (c_parser_do_statement): Likewise.
4918 (c_parser_for_statement): Likewise.
4919 (c_parser_unary_expression): Likewise.
4920 (c_parser_postfix_expression): Likewise.
4921 (c_parser_postfix_expression_after_primary): Likewise.
4922 (c_parser_postfix_expression_after_primary): Likewise.
4923 (c_parser_omp_clause_name): Likewise.
4924 (c_finish_omp_declare_simd): Likewise.
4925 (c_parser_cilk_verify_simd): Likewise.
4926 * c-typeck.c (build_array_ref): Likewise.
4927 (build_function_call_vec): Likewise.
4928 (convert_arguments): Likewise.
4929 (build_compound_expr): Likewise.
4930 (c_finish_return): Likewise.
4931 (c_finish_if_stmt): Likewise.
4932 (c_finish_loop): Likewise.
4933 (build_binary_op): Likewise.
4934
393e8e8b
MP
49352014-01-23 Marek Polacek <polacek@redhat.com>
4936
4937 PR c/59846
4938 * c-typeck.c (parser_build_binary_op): Use location instead of
4939 input_location.
4940 (build_binary_op): Pass location to shorten_compare.
4941
f04dda30
MP
49422014-01-23 Marek Polacek <polacek@redhat.com>
4943
4944 PR c/58346
4945 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
4946 an empty aggregate.
4947
789eadcd
MP
49482014-01-23 Marek Polacek <polacek@redhat.com>
4949
4950 PR c/59871
4951 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
4952 of a comma expression.
4953 (emit_side_effect_warnings): Likewise.
4954
40f14e9f
BI
49552014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4956
4957 PR c/59825
4958 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
4959 function to use walk_tree and moved a lot of its functionality to
4960 expand_array_notations.
4961 (expand_array_notations): New function.
4962
74558dd9
BI
49632014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4964
4965 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
4966 attribute an attribute without value.
4967
652fea39
JJ
49682014-01-23 Jakub Jelinek <jakub@redhat.com>
4969
4970 PR middle-end/58809
4971 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
4972 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
4973
f34f1c87
MP
49742014-01-22 Marek Polacek <polacek@redhat.com>
4975
4976 PR c/59891
4977 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
4978 of remove_c_maybe_const_expr on op1 and op2.
4979
241f845a
JJ
49802014-01-15 Jakub Jelinek <jakub@redhat.com>
4981
4982 PR c/58943
4983 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
4984 effects, preevaluate rhs using SAVE_EXPR first.
4985
9a74f20c
BI
49862014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
4987
4988 PR c++/59631
4989 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
4990 statements with if-elseif statements.
4991
96066ce1
MP
49922014-01-06 Marek Polacek <polacek@redhat.com>
4993
4994 PR c/57773
4995 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
4996 defined bit-field types only in ISO C.
4997
23a5b65a
RS
49982014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4999
5000 Update copyright years
5001
f9030485
RS
50022014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5003
5004 * c-array-notation.c: Use the standard form for the copyright notice.
5005
41958c28
BI
50062013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
5007
5008 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
5009 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
5010 field in parser is not empty. If not-empty, call the function
5011 c_parser_finish_omp_declare_simd.
5012 (c_parser_cilk_clause_vectorlength): Modified function to be shared
5013 between SIMD-enabled functions and #pragma simd. Added new parameter.
5014 (c_parser_cilk_all_clauses): Modified the usage of the function
5015 c_parser_cilk_clause_vectorlength as mentioned above.
5016 (c_parser_cilk_simd_fn_vector_attrs): New function.
5017 (c_finish_cilk_simd_fn_tokens): Likewise.
5018 (is_cilkplus_vector_p): Likewise.
5019 (c_parser_omp_clause_name): Added checking for "vectorlength,"
5020 "nomask," and "mask" strings in clause name.
5021 (c_parser_omp_all_clauses): Added 3 new case statements:
5022 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
5023 PRAGMA_CILK_CLAUSE_NOMASK.
5024 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
5025 check for vector attribute and if so call the function
5026 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
5027 called the function c_finish_cilk_simd_fn_tokens.
5028 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
5029 parser field is non-empty. If so, parse them as you would parse
5030 the omp declare simd pragma.
5031 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
5032 Added a check when step is a parameter and flag it as error.
5033 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
5034 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
5035 pragma_omp_clause.
5036
cef0fd0e
TS
50372013-12-17 Thomas Schwinge <thomas@codesourcery.com>
5038
5039 * c-parser.c (c_parser_omp_parallel): Fix description.
5040
12893402
BI
50412013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
5042
5043 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
5044 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5045 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
5046 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
5047
296674db
JM
50482013-12-04 Joseph Myers <joseph@codesourcery.com>
5049
5050 PR c/52023
5051 * c-parser.c (c_parser_alignas_specifier): Use
5052 c_sizeof_or_alignof_type instead of c_alignof.
5053 (c_parser_alignof_expression): Likewise, with min_alignof
5054 parameter depending on alignof spelling used.
5055
edd28054
MP
50562013-12-04 Marek Polacek <polacek@redhat.com>
5057
5058 PR c/54113
5059 * c-decl.c (start_function): Don't warn for missing prototype for
5060 inline functions.
5061
da0fc454
MP
50622013-12-03 Marek Polacek <polacek@redhat.com>
5063
5064 PR c/59351
5065 * c-decl.c (build_compound_literal): Allow compound literals with
5066 empty initial value.
5067
4c2ecab0
JM
50682013-12-02 Joseph Myers <joseph@codesourcery.com>
5069
5070 PR c/58235
5071 * c-typeck.c (build_modify_expr): Diagnose assignment to
5072 expression with array type.
5073
340baef7
JM
50742013-11-29 Joseph Myers <joseph@codesourcery.com>
5075
5076 PR c/42262
5077 * c-typeck.c (process_init_element): Do not treat a string as
5078 initializing a whole array when used with a designator for an
5079 individual element.
5080
6763b9f7
JM
50812013-11-29 Joseph Myers <joseph@codesourcery.com>
5082
5083 PR c/57574
5084 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
5085 an inline function following a static declaration.
5086
e7bd1de1
JJ
50872013-11-28 Jakub Jelinek <jakub@redhat.com>
5088
5089 PR c/59310
5090 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
5091 to p_name before calling c_parser_omp_teams instead of after.
5092 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
5093 argument. Remove unused p_name variable.
5094
0136f8f0
AH
50952013-11-27 Aldy Hernandez <aldyh@redhat.com>
5096 Jakub Jelinek <jakub@redhat.com>
5097
5098 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
5099 external_scope is NULL.
5100
241b71bb
TV
51012013-11-27 Tom de Vries <tom@codesourcery.com>
5102 Marc Glisse <marc.glisse@inria.fr>
5103
5104 PR c++/59032
5105 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
5106
2fb9a547
AM
51072013-11-22 Andrew MacLeod <amacleod@redhat.com>
5108
5109 * c-typeck.c: Add required include files from gimple.h.
5110
8400e75e
DM
51112013-11-22 David Malcolm <dmalcolm@redhat.com>
5112
5113 * c-decl.c (define_label, shadow_tag_warned)
5114 (check_bitfield_type_and_width, grokdeclarator, grokparms,
5115 store_parm_decls_newstyle, store_parm_decls_oldstyle)
5116 (declspecs_add_type): Remove use of in_system_header macro.
5117 * c-parser.c (c_parser_unary_expression): Likewise.
5118 * c-typeck.c (store_init_value, process_init_element)
5119 (c_start_case): Likewise.
5120
5121 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
5122 macro.
5123
5124 * c-parser.c (c_parser_set_source_position_from_token): Remove
5125 reference to in_system_header from comment.
5126
386b1f1f
RS
51272013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5128
5129 * c-decl.c (grokdeclarator): Update comment to refer to
5130 tree_to_[su]hwi rather than tree_low_cst.
5131
ae7e9ddd
RS
51322013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5133
5134 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
5135 tree_to_uhwi throughout.
5136
9439e9a1
RS
51372013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5138
5139 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
5140 throughout.
5141
9541ffee
RS
51422013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5143
5144 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
5145 throughout.
5146
c02065fc
AH
51472013-11-15 Aldy Hernandez <aldyh@redhat.com>
5148
5149 * c-parser.c (c_parser_cilk_simd): New.
5150 (c_parser_cilk_verify_simd): New.
5151 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
5152 (c_parser_omp_for_loop): Add case for NE_EXPR.
5153 Set c_break_label for CILK_SIMD.
5154 (c_parser_cilk_clause_vectorlength): New.
5155 (c_parser_cilk_clause_linear): New.
5156 (c_parser_cilk_clause_name): New.
5157 (c_parser_cilk_all_clauses): New.
5158 * c-typeck.c (build_unary_op): Pass location argument to
5159 readonly_error.
5160 (build_modify_expr): Same.
5161 (build_asm_expr): Same.
5162 (c_finish_bc_stmt): Error on break/continue in loops.
5163
18f429e2
AM
51642013-11-14 Andrew MacLeod <amacleod@redhat.com>
5165
5166 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
5167
d8a2d370
DN
51682013-11-14 Diego Novillo <dnovillo@google.com>
5169
5170 * c-decl.c: Include print-tree.h.
5171 Include stor-layout.h.
5172 Include varasm.h.
5173 Include attribs.h.
5174 Include stringpool.h.
5175 * c-lang.c: Include fold-const.h.
5176 * c-parser.c: Include stringpool.h.
5177 Include attribs.h.
5178 Include stor-layout.h.
5179 Include varasm.h.
5180 Include trans-mem.h.
5181 * c-typeck.c: Include stor-layout.h.
5182 Include trans-mem.h.
5183 Include varasm.h.
5184 Include stmt.h.
5185
38b7bc7f
JM
51862013-11-13 Joseph Myers <joseph@codesourcery.com>
5187
5188 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
5189 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
5190 __auto_type.
5191 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
5192 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
5193 RID_AUTO_TYPE.
5194 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
5195 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
5196 (c_parser_declarator, c_parser_direct_declarator_inner)
5197 (c_parser_parameter_declaration, c_parser_type_name): All callers
5198 changed.
5199 (c_parser_declaration_or_fndef): Handle declarations with type
5200 determined from the initializer.
5201
45b0be94
AM
52022013-11-12 Andrew MacLeod <amacleod@redhat.com>
5203
18f429e2 5204 * c-typeck.c: Include gimplify.h.
45b0be94 5205
582d9b50
JM
52062013-11-12 Joseph Myers <joseph@codesourcery.com>
5207
5208 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
5209 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
5210 comment.
5211 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
5212 or _Thread_local as appropriate in diagnostics.
5213 (build_null_declspecs): Initialize ret->thread_gnu_p.
5214 (declspecs_add_scspec): Handle either __thread or _Thread_local
5215 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
5216 pedantic. Do not disallow _Thread_local extern and _Thread_local
5217 static.
5218
267bac10
JM
52192013-11-07 Joseph Myers <joseph@codesourcery.com>
5220 Andrew MacLeod <amacleod@redhat.com>
5221
5222 * c-aux-info.c (gen_type): Handle atomic qualifier.
5223 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
5224 qualifiers when compating types.
5225 (shadow_tag_warned): Handle atomic_p in declspecs.
5226 (quals_from_declspecs): Likewise.
5227 (start_decl): Use c_type_promotes_to when promoting argument
5228 types.
5229 (grokdeclarator): Handle _Atomic.
5230 (get_parm_info): Diagnose any qualifier on "void" as only
5231 parameter.
5232 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
5233 comparing types. Use c_type_promotes_to when promoting argument
5234 types.
5235 (finish_function): Use c_type_promotes_to when promoting argument
5236 types.
5237 (build_null_declspecs): Handle atomic_p in declspecs.
5238 (declspecs_add_qual): Handle RID_ATOMIC.
5239 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
5240 (c_token_starts_declspecs): Handle RID_ATOMIC.
5241 (c_parser_declspecs): Handle atomic type specifiers and
5242 qualifiers.
5243 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
5244 from types of expressions with atomic type.
5245 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
5246 (c_parser_attribute_any_word): Handle RID_ATOMIC.
5247 (c_parser_initializer, c_parser_initelt, c_parser_initval)
5248 (c_parser_statement_after_labels, c_parser_switch_statement)
5249 (c_parser_for_statement, c_parser_expr_no_commas)
5250 (c_parser_conditional_expression, c_parser_binary_expression)
5251 (c_parser_cast_expression, c_parser_unary_expression)
5252 (c_parser_postfix_expression)
5253 (c_parser_postfix_expression_after_primary, c_parser_expression):
5254 Use convert_lvalue_to_rvalue.
5255 (c_parser_expression_conv, c_parser_expr_list): Document
5256 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
5257 (c_parser_objc_synchronized_statement): Use
5258 convert_lvalue_to_rvalue.
5259 (c_parser_objc_selector): Handle RID_ATOMIC.
5260 (c_parser_objc_receiver, c_parser_array_notation): Use
5261 convert_lvalue_to_rvalue.
5262 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
5263 _Atomic (type-name).
5264 (struct c_declspecs): Add atomic_p field.
5265 (convert_lvalue_to_rvalue): Declare.
5266 * c-typeck.c (c_type_promotes_to): Promote atomic types to
5267 corresponding atomic types.
5268 (qualify_type): Don't add _Atomic qualifiers from second argument.
5269 (comp_target_types): Do not allow _Atomic mismatches.
5270 (type_lists_compatible_p): Do not remove atomic qualifiers when
5271 comparing types.
5272 (really_atomic_lvalue, convert_lvalue_to_rvalue)
5273 (build_atomic_assign): New functions.
5274 (build_unary_op): Use build_atomic_assign for atomic increment and
5275 decrement.
5276 (build_conditional_expr): Do not treat _Atomic void as a qualified
5277 version of void.
5278 (build_modify_expr): Use build_atomic_assign for atomic LHS.
5279 (find_anonymous_field_with_type, convert_to_anonymous_field)
5280 (convert_for_assignment): Do not remove atomic qualifiers when
5281 comparing types.
5282 (digest_init): Do not accept initialization of arrays of atomic
5283 elements by string constants.
5284 (build_asm_expr): Use convert_lvalue_to_rvalue.
5285 (build_binary_op): Do not treat _Atomic void as a qualified
5286 version of void.
5287
0c249d4b
DD
52882013-11-06 DJ Delorie <dj@redhat.com>
5289
5290 * c-decl.c (locate_old_decl): If a previous conflicting decl is
5291 both explicit and builtin, print the location of the explicit one.
5292
6d7f7e0a
TB
52932013-11-05 Tobias Burnus <burnus@net-b.de>
5294
5295 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
5296 c_parser_omp_distribute, c_parser_omp_teams,
5297 c_parser_omp_target, c_parser_omp_declare): Handle
5298 -fopenmp-simd.
5299
b906f4ca
MP
53002013-11-03 Marek Polacek <polacek@redhat.com>
5301
5302 * c-decl.c (grokdeclarator): Add VLA instrumentation.
5303
ee1d5a02
JJ
53042013-11-01 Jakub Jelinek <jakub@redhat.com>
5305
5306 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
5307 check_dup_generic at the end, unless remove is true.
5308 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
5309 remove = true;.
5310 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
5311
5a9785fb
JJ
53122013-10-31 Jakub Jelinek <jakub@redhat.com>
5313
5314 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
5315 with decl that is not pointer nor array.
5316
939b37da
BI
53172013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
5318
5319 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
5320 a spawning function is found.
5321 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
5322 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
5323 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5324 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
5325 case.
5326 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
5327 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
5328 expr.
5329 (c_finish_return): Added a check to reject _Cilk_spawn in return
5330 expression.
5331 (build_cilk_spawn): New function.
5332 (build_cilk_sync): Likewise.
5333 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
5334
d4af74d4
TB
53352013-10-27 Tobias Burnus <burnus@net-b.de>
5336
5337 PR other/33426
5338 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
5339 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
5340 (c_parser_statement_after_labels): Update calls.
5341
d73749df 53422013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
5343
5344 PR other/33426
5345 * c-parser.c (c_parser_pragma, c_parser_for_statement):
5346 Handle PRAGMA_IVDEP.
5347 (c_parser_statement_after_labels): Update call.
5348
f28aa681
MP
53492013-10-24 Marek Polacek <polacek@redhat.com>
5350
5351 * c-parser.c (c_parser_struct_declaration): Add a comment.
5352 (c_parser_declarator): Don't allow _Alignas here.
5353
0645c1a2
AM
53542013-10-17 Andrew MacLeod <amacleod@redhat.com>
5355
5356 * c-parser.c: Include omp-low.h.
5357 * c-typeck.c: Likewise.
5358
568a31f2
MP
53592013-10-17 Marek Polacek <polacek@redhat.com>
5360
5361 PR c/58267
5362 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
5363 Document syntax of the array-declarator.
5364 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
5365 are not permitted.
5366 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
5367 (c_parser_struct_declaration): Likewise.
5368 (c_parser_declarator): Likewise.
5369 (c_parser_direct_declarator_inner): Likewise.
5370 (c_parser_parameter_declaration): Likewise.
5371 (c_parser_type_name): Likewise.
5372
acf0174b
JJ
53732013-10-11 Jakub Jelinek <jakub@redhat.com>
5374
5375 * c-lang.h (current_omp_declare_target_attribute): New extern
5376 decl.
5377 * c-parser.c: Include c-lang.h.
5378 (struct c_parser): Change tokens to c_token *.
5379 Add tokens_buf field. Change tokens_avail type to unsigned int.
5380 (c_parser_consume_token): If parser->tokens isn't
5381 &parser->tokens_buf[0], increment parser->tokens.
5382 (c_parser_consume_pragma): Likewise.
5383 (enum pragma_context): Add pragma_struct and pragma_param.
5384 (c_parser_external_declaration): Adjust
5385 c_parser_declaration_or_fndef caller.
5386 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
5387 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
5388 Adjust recursive call.
5389 (c_parser_struct_or_union_specifier): Use pragma_struct instead
5390 of pragma_external.
5391 (c_parser_parameter_declaration): Use pragma_param instead of
5392 pragma_external.
5393 (c_parser_compound_statement_nostart, c_parser_label,
5394 c_parser_for_statement): Adjust
5395 c_parser_declaration_or_fndef callers.
5396 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
5397 it through to c_parser_conditional_expression.
5398 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
5399 pass it through to c_parser_binary_expression. Adjust recursive
5400 call.
5401 (c_parser_binary_expression): Remove prec argument, add
5402 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
5403 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
5404 binop matches it, use build2 instead of parser_build_binary_op.
5405 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
5406 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
5407 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
5408 Handle pragma_struct and pragma_param the same as pragma_external.
5409 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5410 (c_parser_omp_variable_list): Parse array sections for
5411 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5412 (c_parser_omp_clause_collapse): Fully fold collapse expression.
5413 (c_parser_omp_clause_reduction): Handle user defined reductions.
5414 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5415 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5416 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5417 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5418 c_parser_omp_clause_depend, c_parser_omp_clause_map,
5419 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5420 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5421 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5422 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
5423 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
5424 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5425 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
5426 (c_parser_omp_for_loop): Add CODE argument, pass it through
5427 to c_finish_omp_for. Change last argument to cclauses,
5428 and adjust uses to grab parallel clauses from the array of all
5429 the split clauses. Adjust c_parser_binary_expression,
5430 c_parser_declaration_or_fndef and c_finish_omp_for callers.
5431 (omp_split_clauses): New function.
5432 (c_parser_omp_simd): New function.
5433 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5434 Allow the function to be called also when parsing combined constructs,
5435 and call c_parser_omp_simd when parsing for simd.
5436 (c_parser_omp_sections_scope): If section-sequence doesn't start with
5437 #pragma omp section, require exactly one structured-block instead of
5438 sequence of statements.
5439 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5440 Allow the function to be called also when parsing combined constructs.
5441 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
5442 Allow the function to be called also when parsing combined
5443 constructs.
5444 (c_parser_omp_taskgroup, c_parser_omp_cancel,
5445 c_parser_omp_cancellation_point, c_parser_omp_distribute,
5446 c_parser_omp_teams, c_parser_omp_target_data,
5447 c_parser_omp_target_update, c_parser_omp_target,
5448 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
5449 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
5450 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
5451 (c_parser_omp_construct): Add p_name and mask vars. Handle
5452 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
5453 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
5454 and c_parser_omp_sections callers.
5455 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
5456 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5457 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5458 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
5459 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
5460 OMP_CLAUSE_DEPEND.
5461 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5462 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5463 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5464 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5465 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5466 * c-typeck.c: Include tree-inline.h.
5467 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5468 handle_omp_array_sections_1, handle_omp_array_sections,
5469 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5470 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5471 user defined reductions.
5472 (c_tree_equal): New function.
5473 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5474 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5475 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5476 c_check_omp_declare_reduction_r): New prototypes.
5477 * c-decl.c (current_omp_declare_target_attribute): New variable.
5478 (c_decl_attributes): New function.
5479 (start_decl, start_function): Use it instead of decl_attributes.
5480 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5481 c_omp_reduction_decl, c_omp_reduction_lookup,
5482 c_check_omp_declare_reduction_r): New functions.
5483
0a6c2227
TT
54842013-09-25 Tom Tromey <tromey@redhat.com>
5485
5486 * Make-lang.in (c/gccspec.o): Remove.
5487 (CFLAGS-c/gccspec.o): New variable.
5488 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
5489 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
5490 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5491
f3bc55f0
TT
54922013-09-25 Tom Tromey <tromey@redhat.com>
5493
5494 * Make-lang.in (c/gccspec.o): Don't use subshell.
5495
a24d975c
MP
54962013-09-18 Marek Polacek <polacek@redhat.com>
5497
5498 PR sanitize/58443
5499 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5500 Remove unnecessary check.
5501
ce6923c5
MP
55022013-09-18 Marek Polacek <polacek@redhat.com>
5503
5504 PR sanitizer/58411
5505 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
5506 no_sanitize_undefined attribute.
5507
a1e51df9
KT
55082013-09-13 Kai Tietz <ktietz@redhat.com>
5509
5510 PR target/57848
5511 * c-decl.c (c_builtin_function_ext_scope): Remove
5512 wrong assumption that it is never called on prexisting
5513 symbol.
5514
0af94e6f
JR
55152013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
5516
5517 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
5518
20059c8b
GDR
55192013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5520
5521 * c-objc-common.c (c_tree_printer): Tidy.
5522
de5a5fa1
MP
55232013-08-30 Marek Polacek <polacek@redhat.com>
5524
5525 * c-typeck.c (build_binary_op): Add division by zero and shift
5526 instrumentation.
5527
2531a1d9 55282013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 5529 Joseph Myers <joseph@codesourcery.com>
2531a1d9 5530
6e2bcc98 5531 PR c/35649
2531a1d9
JR
5532 * c-typeck.c (c_common_type): Prefer double_type_node over
5533 other REAL_TYPE types with the same precision.
5534 (convert_arguments): Likewise.
5535
025311c4
GDR
55362013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5537
5538 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
5539 (c_initialize_diagnostics): Call a destructor for the early printer.
5540
da6ca2b5
GDR
55412013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5542
5543 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5544 printer initialization.
5545
318cda85 55462013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 5547
318cda85
BI
5548 PR c/57490
5549 * c-array-notation.c (fix_conditional_array_notations_1): Added a
5550 check for truth values.
5551 (expand_array_notation_exprs): Added truth values case. Removed an
5552 unwanted else. Added for-loop to walk through subtrees in default
5553 case.
5554
b066401f
GDR
55552013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5556
5557 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5558
fb48aadc
JM
55592013-07-23 Joseph Myers <joseph@codesourcery.com>
5560
5561 * c-parser.c (struct c_generic_association): Fix typo.
5562
433cc7b0
TT
55632013-07-23 Tom Tromey <tromey@redhat.com>
5564 Joseph Myers <joseph@codesourcery.com>
5565
5566 * c-parser.c (struct c_generic_association): New.
5567 (c_generic_association_d): New typedef.
5568 (c_parser_generic_selection): New function.
5569 (c_parser_postfix_expression): Handle RID_GENERIC.
5570
26d40c3d
JM
55712013-07-13 Jason Merrill <jason@redhat.com>
5572
5573 PR c++/57793
5574 * c-decl.c (finish_struct): Check for too-large class.
5575
ecdbd01a 55762013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
5577
5578 PR c/57821
5579 * c-typeck.c (set_init_index): When folding, check for index overflow.
5580
1141ed3f
BI
55812013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5582
5583 * c-parser.c (c_parser_array_notation): Removed rejection of array
5584 notations in an array of function pointers.
5585
713b46fa
BI
55862013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5587
5588 * c-array-notation.c (make_triplet_val_inv): New function.
5589 (create_cmp_incr): Likewise.
5590 (create_array_refs): Likewise.
5591 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5592 Also modularized common parts between functions and called the function.
5593 (build_array_notation_expr): Likewise.
5594 (fix_conditional_array_notations_1): Likewise.
5595 (fix_array_notation_expr): Likewise.
5596 (fix_array_notation_call_expr): Likewise.
5597
92f20202
MP
55982013-06-18 Marek Polacek <polacek@redhat.com>
5599
5600 PR c/57630
5601 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5602
73a23b06
BI
56032013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
5604
5605 * c-array-notation.c (build_array_notation_expr): Reject array notation
5606 mismatch between LHS and RHS even inside a call_expr. Also, removed
5607 a couple while statements that were dead code.
5608
00b8517d
BI
56092013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
5610
5611 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5612 excessive precision expressions in function parameters. Also removed
5613 couple unwanted while statements.
5614
1509bdda
BI
56152013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5616
5617 * c-array-notation.c (expand_array_notation_exprs): Added
5618 ARRAY_NOTATION_REF case.
5619
d60f1706
BI
56202013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5621
5622 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5623 function to c-family/array-notation-common.c.
5624 (is_cilkplus_reduce_builtin): Likewise.
5625 (find_rank): Likewise.
5626 (extract_array_notation_exprs): Likewise.
5627 (replace_array_notations): Likewise.
5628 (find_inv_trees): Likewise.
5629 (replace_inv_trees): Likewise.
5630 (contains_array_notation_expr): Likewise.
5631 (find_correct_array_notation_type): Likewise.
5632 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5633 (struct inv_list): Moved this to c-family/array-notation-common.c.
5634 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5635
6d6efbb3
BI
56362013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
5637
5638 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5639 reduction functions outside the for-loop. Added a check if the fundecl
5640 is non-NULL. Finally, removed an unwanted if-statement, and made the
5641 body unconditional.
5642
25c22937
BI
56432013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5644
5645 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5646 condition of the if-statement matches the rank of else-block and then-
5647 block when array notations are used.
5648 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5649 expression after the entire function body is parsed.
5650 (c_parser_expr_no_commas): Delayed creating array notation expressions
5651 to the end of function parsing.
5652 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5653 whole if-statement instead of just the condition.
5654 (expand_array_notation_exprs): Added MODIFY_EXPR case.
5655
edd25645
BI
56562013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5657
5658 PR c/57474
5659 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5660 array to NULL_TREE if they are unused. Also added a check for the
5661 field to be NULL before its fields are used in future.
5662
065ce7f1
RO
56632013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5664
5665 PR bootstrap/57450
5666 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5667 (build_array_notation_expr): Likewise.
5668
36536d79
BI
56692013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5670
5671 * c-typeck.c (build_array_ref): Added a check to see if array's
5672 index is greater than one. If true, then emit an error.
5673 (build_function_call_vec): Exclude error reporting and checking
5674 for builtin array-notation functions.
5675 (convert_arguments): Likewise.
5676 (c_finish_return): Added a check for array notations as a return
5677 expression. If true, then emit an error.
5678 (c_finish_loop): Added a check for array notations in a loop
5679 condition. If true then emit an error.
5680 (lvalue_p): Added a ARRAY_NOTATION_REF case.
5681 (build_binary_op): Added a check for array notation expr inside
5682 op1 and op0. If present, we call another function to find correct
5683 type.
5684 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
5685 * c-parser.c (c_parser_compound_statement): Check if array
5686 notation code is used in tree, if so, then transform them into
5687 appropriate C code.
5688 (c_parser_expr_no_commas): Check if array notation is used in LHS
5689 or RHS, if so, then build array notation expression instead of
5690 regular modify.
5691 (c_parser_postfix_expression_after_primary): Added a check for
5692 colon(s) after square braces, if so then handle it like an array
5693 notation. Also, break up array notations in unary op if found.
5694 (c_parser_direct_declarator_inner): Added a check for array
5695 notation.
5696 (c_parser_compound_statement): Added a check for array notation in
5697 a stmt. If one is present, then expand array notation expr.
5698 (c_parser_if_statement): Likewise.
5699 (c_parser_switch_statement): Added a check for array notations in
5700 a switch statement's condition. If true, then output an error.
5701 (c_parser_while_statement): Similarly, but for a while.
5702 (c_parser_do_statement): Similarly, but for a do-while.
5703 (c_parser_for_statement): Similarly, but for a for-loop.
5704 (c_parser_unary_expression): Check if array notation is used in a
5705 pre-increment or pre-decrement expression. If true, then expand
5706 them.
5707 (c_parser_array_notation): New function.
5708 * c-array-notation.c: New file.
5709 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5710
cd192ccc
MS
57112013-05-23 Mike Stump <mikestump@comcast.net>
5712
5713 * c-typeck.c (convert_for_assignment): Handle references to memory
5714 spaces better.
5715
427b248d
JM
57162013-05-16 Jason Merrill <jason@redhat.com>
5717
5718 * Make-lang.in (cc1$(exeext)): Use link mutex.
5719
44d90fe1
PC
57202013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5721
5722 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5723 to simply use OPT_Wpointer_arith.
5724 (build_unary_op): Likewise.
5725
4e7d7b3d
JJ
57262013-04-03 Jakub Jelinek <jakub@redhat.com>
5727
5728 PR c/19449
5729 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
5730 argument. If set, or it temporarily for parsing of the first
5731 argument into force_folding_builtin_constant_p.
5732 (c_parser_postfix_expression): Adjust callers.
5733
839b422f
RB
57342013-03-21 Richard Biener <rguenther@suse.de>
5735
5736 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
5737 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
5738
2ee028f1
MP
57392013-02-12 Marek Polacek <polacek@redhat.com>
5740
5741 PR c/44938
5742 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
5743 origtypes to NULL.
5744
8824edff
JJ
57452013-01-24 Jakub Jelinek <jakub@redhat.com>
5746
5747 PR c/56078
5748 * c-typeck.c (set_nonincremental_init_from_string): If
5749 constructor_max_index is NULL, treat it as if tree_int_cst_lt
5750 returned false.
5751 (process_init_element): Likewise.
5752
eadd3d0d
JJ
57532012-12-20 Jakub Jelinek <jakub@redhat.com>
5754
5755 PR c++/55619
5756 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
5757 argument, don't call default_function_array_conversion
5758 nor c_fully_fold here.
5759 (c_parser_asm_statement): Adjust callers.
5760 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
5761 and outputs here, and call default_function_array_conversion
5762 on inputs that don't need to be addressable.
5763
f8a93a2e
JJ
57642012-12-18 Jakub Jelinek <jakub@redhat.com>
5765
5766 PR c/39464
5767 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
5768 warning require that both c_common_unsigned_type as well as
5769 c_common_signed_type is the same for both mvl and mvr types.
5770
9771b263
DN
57712012-11-16 Diego Novillo <dnovillo@google.com>
5772
5773 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
5774
5775 * c-common.c: Use new vec API in vec.h.
5776 * c-common.h: Likewise.
5777 * c-gimplify.c: Likewise.
5778 * c-pragma.c: Likewise.
5779 * c-pretty-print.c: Likewise.
5780 * c-pretty-print.h: Likewise.
5781 * c-semantics.c: Likewise.
5782 * c-decl.c: Likewise.
5783 * c-parser.c: Likewise.
5784 * c-tree.h: Likewise.
5785 * c-typeck.c: Likewise.
5786
880661a4
JW
57872012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
5788
5789 PR c++/54930
5790 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
5791
077d1abe
MLI
57922012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5793
5794 PR c/53066
5795 * c-decl.c (warn_if_shadowing): Do not warn if a variable
5796 shadows a function, unless the variable is a function or a
5797 pointer-to-function.
5798
3a785c97
JJ
57992012-10-12 Jakub Jelinek <jakub@redhat.com>
5800
5801 PR c/54381
5802 * c-parser.c (struct c_tree_loc_pair): Removed.
5803 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
5804 add location_t * and tree * arguments, fill in array of 3
5805 sizeof_arg trees and corresponding locs.
5806 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
5807 c_parser_expr_list callers.
5808 (c_parser_postfix_expression_after_primary): Likewise. Pass
5809 array of 3 sizeof_arg trees and locs (corresponding to first
5810 3 arguments) to sizeof_pointer_memaccess_warning.
5811
703c8606
LC
58122012-10-09 Lawrence Crowl <crowl@google.com>
5813
5814 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
5815 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
5816 hash table.
5817
5d9de0d0
PC
58182012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
5819
5820 PR c++/54194
5821 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
5822 call.
5823
a212e43f
MG
58242012-10-09 Marc Glisse <marc.glisse@inria.fr>
5825
5826 PR c++/54427
5827 * c-typeck.c: Include c-common.h.
5828 (enum stv_conv): Moved to c-common.h.
5829 (scalar_to_vector): Moved to c-common.c.
5830 (build_binary_op): Adapt to scalar_to_vector's new prototype.
5831 * Make-lang.in: c-typeck.c depends on c-common.h.
5832
3b78de56
AC
58332012-10-04 Arnaud Charlet <charlet@adacore.com>
5834
5835 * c-decl.c (c_write_global_declarations): Fix handling of
5836 -fdump-ada-spec*.
5837
78c60e3d
SS
58382012-09-30 Sharad Singhai <singhai@google.com>
5839
5840 * c-decl.c (c_write_global_declarations): Use a different method
5841 to determine if the dump has ben initialized.
5842
9f33203d
JM
58432012-09-14 Joseph Myers <joseph@codesourcery.com>
5844
5845 PR c/54552
5846 * c-typeck.c (c_cast_expr): When casting to a type requiring
5847 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
5848 c_fully_fold first.
5849
a27d595d
JM
58502012-09-14 Joseph Myers <joseph@codesourcery.com>
5851
5852 PR c/54103
5853 * c-typeck.c (build_unary_op): Pass original argument of
5854 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
5855 any C_MAYBE_CONST_EXPR, if it has integer operands.
5856 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
5857 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
5858 to c_objc_common_truthvalue_conversion, then remove any
5859 C_MAYBE_CONST_EXPR, if they have integer operands. Use
5860 c_objc_common_truthvalue_conversion not
5861 c_common_truthvalue_conversion.
5862 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
5863 call note_integer_operands for arguments with integer operands
5864 that are not integer constants.
5865
9feb29df
JJ
58662012-09-13 Jakub Jelinek <jakub@redhat.com>
5867
5868 PR c/54559
5869 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
5870 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
5871
d409320c
JJ
58722012-08-31 Jakub Jelinek <jakub@redhat.com>
5873
5874 PR c/54428
5875 * c-convert.c (convert): Don't call fold_convert_loc if
5876 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
5877 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
5878 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
5879
6265d07c
JJ
58802012-08-24 Jakub Jelinek <jakub@redhat.com>
5881
5882 PR c/54355
5883 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
5884 for nested and empty_ok arguments in the call to
5885 c_parser_declaration_or_fndef.
5886
1a4049e7
JJ
58872012-08-17 Jakub Jelinek <jakub@redhat.com>
5888
5889 * c-tree.h (c_last_sizeof_arg): Declare.
5890 * c-parser.c (struct c_tree_loc_pair): New type.
5891 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
5892 non-NULL.
5893 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
5894 (c_parser_postfix_expression_after_primary): Likewise. Call
5895 sizeof_pointer_memaccess_warning if needed.
5896 (sizeof_ptr_memacc_comptypes): New function.
5897 * c-typeck.c (c_last_sizeof_arg): New global variable.
5898 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
5899
0229aee9
UB
59002012-07-24 Uros Bizjak <ubizjak@gmail.com>
5901
5902 * c-lang.h (lang_decl): Add variable_size GTY option.
5903
7ee2468b
SB
59042012-07-16 Steven Bosscher <steven@gcc.gnu.org>
5905
5906 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
5907 * Make-lang.in: Fix dependencies.
5908
d4a10d0a
SB
59092012-06-29 Steven Bosscher <steven@gcc.gnu.org>
5910
5911 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
5912 and add language Makefile hooks.
5913 * config-lang.in: New file.
5914 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
5915 add the required "normal" config-lang.in rules.
5916 * c-lang.h: Moved from gcc/ to here.
5917 * c-tree.h: Likewise.
5918 * c-objc-common.c: Likewise.
5919 * c-objc-common.h: Likewise.
5920 * c-typeck.c: Likewise.
5921 * c-convert.c: Likewise.
5922 * c-lang.c: Likewise.
5923 * c-aux-info.c: Likewise.
5924 * c-errors.c: Likewise.
5925 * gccspec.c: Likewise.
5926 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
5927 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
5928\f
a5544970 5929Copyright (C) 2012-2019 Free Software Foundation, Inc.
d4a10d0a
SB
5930
5931Copying and distribution of this file, with or without modification,
5932are permitted in any medium without royalty provided the copyright
5933notice and this notice are preserved.