]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
Daily bump.
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
baa09dc5
RB
12019-03-14 Richard Biener <rguenther@suse.de>
2
3 * c-tree.h (enum c_declspec_il): New.
4 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
5 enum bitfield.
6 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
7 Pass start pass and declspec_il to c_parser_parse_gimple_body.
8 (c_parser_declspecs): Adjust.
9 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
10 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
11 and bitmap.h.
12 (struct gimple_parser): New.
13 (gimple_parser::push_edge): New method.
14 (c_parser_gimple_parse_bb_spec): New helper.
15 (c_parser_parse_gimple_body): Get start pass and IL specification.
16 Initialize SSA and CFG.
17 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
18 Build a gimple_parser parsing state and pass it along.
19 (c_parser_gimple_statement): Change intermittend __PHI internal
20 function argument for the edge.
21 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
22 (c_parser_gimple_goto_stmt): Record edges to build.
23 (c_parser_gimple_if_stmt): Likewise.
24 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
25 (c_parser_gimple_or_rtl_pass_list): Likewise.
26
a3f9f006
ML
272019-03-11 Martin Liska <mliska@suse.cz>
28
29 * c-decl.c (check_for_loop_decls): Wrap an option name
30 in a string format message and fix GNU coding style.
31 * c-parser.c (c_parser_declspecs): Likewise.
32
1db01ff9
JJ
332019-03-08 Jakub Jelinek <jakub@redhat.com>
34
35 PR tree-optimization/89550
36 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
37 returned true.
38 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
39 or warning returned true.
40
66dcb747
JJ
412019-02-28 Jakub Jelinek <jakub@redhat.com>
42
43 PR c/89525
44 * c-typeck.c (convert_arguments): Call inform_declaration only if
45 the previous warning_at call returned true.
46
2263c9f2
TS
472019-02-22 Thomas Schwinge <thomas@codesourcery.com>
48
49 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
50 parameter. Adjust all users.
51 (c_parser_oacc_simple_clause): Replace parser with loc formal
52 parameter. Adjust all users.
53
19695f4d
CLT
542019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
55
56 PR c/87924
57 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
58 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
59
5f88ba10
JJ
602019-02-15 Jakub Jelinek <jakub@redhat.com>
61
62 PR c/89340
63 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
64 before c_decl_attributes rather than after it.
65
cfc30fd1
JJ
662019-02-06 Jakub Jelinek <jakub@redhat.com>
67
68 PR c/89211
69 * c-parser.c (c_parser_declaration_or_fndef): Don't update
70 DECL_ARGUMENTS of d if it has been defined already. Use a single if
71 instead of 3 nested ifs.
72
fbe83e6b
JM
732019-02-06 Joseph Myers <joseph@codesourcery.com>
74
75 PR c/88584
76 * c-decl.c (finish_decl): Do not complete array types for arrays
77 with external linkage not at file scope.
78
f461f938
RB
792019-02-05 Richard Biener <rguenther@suse.de>
80
81 PR c/88606
82 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
83 all type variants when not supported.
84
fe509359
JJ
852019-01-30 Jakub Jelinek <jakub@redhat.com>
86
87 PR c/89061
88 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
89 * c-decl.c (decl_jump_unsafe): Return false for
90 C_DECL_COMPOUND_LITERAL_P decls.
91 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
92
6a335b96
JJ
932019-01-29 Jakub Jelinek <jakub@redhat.com>
94
f4b7e754
JJ
95 PR c/89045
96 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
97 scope.
98
6a335b96
JJ
99 PR c/86125
100 * c-decl.c (last_fileptr_type): Remove.
101 (last_structptr_types): New variable.
102 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
103 {old,new}rettype instead of the types themselves. Assert
104 last_structptr_types array has the same number of elements
105 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
106 argument oldtype and newtype. Instead of handling
107 just fileptr_type_node specially, handle all builtin_structptr_types
108 pointer nodes. Formatting fix.
109
d8b5a1a0
MS
1102019-01-24 Martin Sebor <msebor@redhat.com>
111
112 PR c/86125
113 PR c/88886
114 PR middle-end/86308
115 * c-decl.c (match_builtin_function_types): Add arguments.
116 (diagnose_mismatched_decls): Diagnose mismatched declarations
117 of built-ins more strictly.
118
e21c4491
JJ
1192019-01-24 Jakub Jelinek <jakub@redhat.com>
120
121 PR c++/88976
122 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
123 on #pragma omp cancel with different modifiers.
124
420183d9
L
1252019-01-18 H.J. Lu <hongjiu.lu@intel.com>
126
127 PR c/51628
128 PR c/88664
129 * c-typeck.c (convert_for_assignment): Upate the
130 warn_for_address_or_pointer_of_packed_member call.
131
17ad43dd
TH
1322019-01-16 Tom Honermann <tom@honermann.net>
133 Jason Merrill <jason@redhat.com>
134
135 * c-typeck.c (digest_init): Revised the error message produced for
136 ill-formed cases of array initialization with a string literal.
137 (error_init): Make variadic.
138
5f07d78a
JJ
1392019-01-12 Jakub Jelinek <jakub@redhat.com>
140
141 * c-typeck.c (convert_for_assignment): Fix a comment typo.
142
c4581bbf
JJ
1432019-01-07 Jakub Jelinek <jakub@redhat.com>
144
145 PR c/88701
146 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
147 if current_function_decl is non-NULL.
148
65c5b1eb
JM
1492019-01-07 Joseph Myers <joseph@codesourcery.com>
150
151 PR c/88720
152 PR c/88726
153 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
154 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
155 functions declared but never defined only for external scope, not
156 for other scopes.
157
d8fcab68
JJ
1582019-01-07 Jakub Jelinek <jakub@redhat.com>
159
160 PR c++/85052
161 * c-parser.c (c_parser_postfix_expression): Parse
162 __builtin_convertvector.
163
a5544970
JJ
1642019-01-01 Jakub Jelinek <jakub@redhat.com>
165
166 Update copyright years.
167
da77eace
L
1682018-12-20 H.J. Lu <hongjiu.lu@intel.com>
169
170 PR c/51628
171 * c-typeck.c (convert_for_assignment): Call
172 warn_for_address_or_pointer_of_packed_member.
173
1edf8866
SB
1742018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
175
176 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
177 a more specific error message (instead of just falling through).
178
db4fd626
SB
1792018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
180
181 * c-parser.c (c_parser_asm_statement): Keep track of the location each
182 asm qualifier is first seen; use that to give nicer "duplicate asm
183 qualifier" messages. Delete 'quals" variable, instead pass the
184 "is_volatile_ flag to build_asm_stmt directly.
185 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
186 * c-typeck.c (build_asm_stmt): Ditto; adjust.
187
9c9cfcbb
SB
1882018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
189
190 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
191 "done" boolean variable.
192
a14feb3c
DM
1932018-12-19 David Malcolm <dmalcolm@redhat.com>
194
195 PR c++/87504
196 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
197 Move from here to gcc-rich-location.h and gcc-rich-location.c.
198 (build_binary_op): Use struct op_location_t and
199 class binary_op_rich_location.
200
6d939173
JJ
2012018-12-11 Jakub Jelinek <jakub@redhat.com>
202
203 PR sanitizer/88426
204 * c-convert.c (convert): Call c_fully_fold before calling
205 ubsan_instrument_float_cast.
206
b7055028
SB
2072018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
208
209 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
210 setting "quals".
211
5b76e75f
SB
2122018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
213
214 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
215 after asm. Pass a flag for it to build_asm_expr.
216 * c-tree.h (build_asm_expr): Update declaration.
217 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
218 set ASM_INLINE_P.
219
30bd42b9
SB
2202018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
221
222 PR inline-asm/55681
223 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
224 combination of volatile and goto, in any order, without repetitions.
225
9df6c0e4
JB
2262018-12-04 James Norris <jnorris@codesourcery.com>
227 Cesar Philippidis <cesar@codesourcery.com>
228 Julian Brown <julian@codesourcery.com>
229
230 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
231 code.
232
f44697b7
RB
2332018-11-30 Richard Biener <rguenther@suse.de>
234
235 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
236 _Literal (type) { ... } as empty aggregate or vector constructor.
237
550dfbdc
MS
2382018-11-29 Martin Sebor <msebor@redhat.com>
239
240 PR c/88091
241 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
242 (convert_arguments): Add comments. Pass additional argument to
243 the function above.
244
673670da
MS
2452018-11-29 Martin Sebor <msebor@redhat.com>
246
247 PR c/88172
248 PR testsuite/88208
249 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
250
db1d09b0
MS
2512018-11-23 Martin Sebor <msebor@redhat.com>
252
253 PR testsuite/88098
254 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
255 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
256
98f08eb8
MS
2572018-11-20 Martin Sebor <msebor@redhat.com>
258
259 * c-parser.c (c_parser_has_attribute_expression): New function.
260 (c_parser_attribute): New function.
261 (c_parser_attributes): Move code into c_parser_attribute.
262 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
263
cd5da983
MS
2642018-11-15 Martin Sebor <msebor@redhat.com>
265
266 PR c/83656
267 * c-decl.c (header_for_builtin_fn): Declare.
268 (diagnose_mismatched_decls): Diagnose declarations of built-in
269 functions without a prototype.
270 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
271 (convert_argument): Same.
272 (convert_arguments): Factor code out into convert_argument.
273 Detect mismatches between built-in formal arguments in calls
274 to built-in without prototype.
275 (build_conditional_expr): Same.
276 (type_or_builtin_type): New function.
277 (convert_for_assignment): Add argument. Conditionally issue
278 warnings instead of errors for mismatches.
279
620e594b
DM
2802018-11-13 David Malcolm <dmalcolm@redhat.com>
281
282 * c-decl.c: Replace "source_location" with "location_t".
283 * c-tree.h: Likewise.
284 * c-typeck.c: Likewise.
285 * gimple-parser.c: Likewise.
286
3179ebae
JJ
2872018-11-09 Jakub Jelinek <jakub@redhat.com>
288
81a227c6
JJ
289 * c-parser.c (c_parser_omp_clause_final): Use
290 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
291 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
292 parsing instead of c_parser_paren_condition.
293 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
294 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
295 c_fully_fold instead of c_parser_condition.
296 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
297 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
298 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
299 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
300 c_parser_expr_no_commas instead of c_parser_expression.
301
98c91c56
JJ
302 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
303 reduction clause with inscan modifier.
304
3179ebae
JJ
305 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
306 clauses other than atomic_default_mem_order.
307
28567c40
JJ
3082018-11-08 Jakub Jelinek <jakub@redhat.com>
309
310 * c-parser.c: Include memmode.h.
311 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
312 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
313 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
314 task_reduction clauses.
315 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
316 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
317 section, or lvalue assignment expression.
318 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
319 (c_parser_omp_clause_lastprivate): Parse optional
320 conditional: modifier.
321 (c_parser_omp_clause_hint): Require constant integer expression rather
322 than just integer expression.
323 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
324 clause.
325 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
326 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
327 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
328 functions.
329 (c_parser_omp_clause_depend): Parse iterator modifier and handle
330 iterators. Parse mutexinoutset and depobj kinds.
331 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
332 callers.
333 (c_parser_omp_all_clauses): Likewise. Handle
334 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
335 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
336 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
337 default memory order from requires directive if any. Adjust
338 c_finish_omp_atomic caller.
339 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
340 (c_parser_omp_flush): Parse flush with memory-order-clause.
341 (c_parser_omp_for_loop): Allow NE_EXPR even in
342 OpenMP loops, adjust c_finish_omp_for caller.
343 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
344 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
345 Allow to be called while parsing combined parallel master.
346 Parse combined master taskloop{, simd}.
347 (c_parser_omp_parallel): Parse combined
348 parallel master{, taskloop{, simd}} constructs.
349 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
350 (OMP_TASKGROUP_CLAUSE_MASK): Define.
351 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
352 (OMP_TASKWAIT_CLAUSE_MASK): Define.
353 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
354 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
355 around teams body. Use SET_EXPR_LOCATION.
356 (c_parser_omp_target_data): Allow target data
357 with only use_device_ptr clauses.
358 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
359 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
360 (c_parser_omp_requires): New function.
361 (c_finish_taskloop_clauses): New function.
362 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
363 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
364 declaration. Disallow in_reduction clause when combined with parallel
365 master.
366 (c_parser_omp_construct): Adjust c_parser_omp_master and
367 c_parser_omp_taskgroup callers.
368 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
369 other than cancel.
370 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
371 like OMP_CLAUSE_REDUCTION.
372 (handle_omp_array_sections): Likewise. Call save_expr on array
373 reductions before calling build_index_type. Handle depend clauses
374 with iterators.
375 (struct c_find_omp_var_s): New type.
376 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
377 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
378 with static, runtime or auto schedule kinds. Call save_expr for whole
379 array reduction sizes. Diagnose reductions with zero sized elements
380 or variable length structures. Diagnose nogroup clause used with
381 reduction clause(s). Handle depend clause with
382 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
383 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
384 some different type for other kinds. Use build_unary_op with
385 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
386 Handle depend clauses with iterators. Remove no longer needed special
387 case that predetermined const qualified vars may be specified in
388 firstprivate clause. Complain if const qualified vars are mentioned
389 in data-sharing clauses other than firstprivate or shared. Use
390 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
391 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
392 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
393 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
394
7e2de6df
DM
3952018-10-29 David Malcolm <dmalcolm@redhat.com>
396
397 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
398 logic for change to name_hint::operator bool.
399 (undeclared_variable): Likewise.
400 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
401 (c_parser_parameter_declaration): Likewise.
402
9f936c86
JM
4032018-10-17 Joseph Myers <joseph@codesourcery.com>
404
405 * c-errors.c (pedwarn_c11): New function.
406 * c-parser.c (disable_extension_diagnostics): Save
407 warn_c11_c2x_compat and set it to 0.
408 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
409 (c_parser_static_assert_declaration_no_semi): Handle
410 _Static_assert without string constant.
411 * c-tree.h (pedwarn_c11): New prototype.
412
033eb567
DM
4132018-10-17 David Malcolm <dmalcolm@redhat.com>
414
415 * Make-lang.in (selftest-c): New.
416 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
417 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
418 from gcc/Makefile.in.
419
0edf3afe
RB
4202018-10-02 Richard Biener <rguenther@suse.de>
421
422 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
423
8313a764
JM
4242018-09-26 Joseph Myers <joseph@codesourcery.com>
425
426 PR c/87390
427 * c-typeck.c (build_binary_op): Use excess precision for
428 comparisons of integers and floating-point for C11 and later.
429
ce6f0888
MJ
4302018-09-26 Martin Jambor <mjambor@suse.cz>
431
432 PR c/87347
433 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
434 comment.
435
9c4a4b3c
DM
4362018-09-17 David Malcolm <dmalcolm@redhat.com>
437
438 * c-objc-common.c (range_label_for_type_mismatch::get_text):
439 Update for new param.
440 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
441 Likewise.
442
80c6d1f4
MJ
4432018-09-17 Martin Jambor <mjambor@suse.cz>
444
445 PR c/63886
446 * c-parser.c: (warn_for_abs): New function.
447 (c_parser_postfix_expression_after_primary): Call it.
448
4a426e36
BE
4492018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
450
451 * c-typeck.c (digest_init): Shorten overlength strings.
452
6d900107
BE
4532018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
454
455 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
456
b5764229
BE
4572018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
458
459 * c-decl.c (finish_decl): Call braced_list_to_string here ...
460 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
461
22eea6b2
AM
4622018-08-30 Alexander Monakov <amonakov@ispras.ru>
463
464 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
465 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
466
85204e23
DM
4672018-08-27 David Malcolm <dmalcolm@redhat.com>
468
469 PR 87091
470 * c-decl.c (implicitly_declare): Update call to
471 maybe_add_include_fixit to suggest overriding the location, as it
472 is for a note.
473 * c-objc-common.c (c_tree_printer): Update for conversion of
474 show_caret_p to a tri-state.
475
3d78e008
ML
4762018-08-27 Martin Liska <mliska@suse.cz>
477
478 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
479 fndecl_built_in_p and remove check for FUNCTION_DECL if
480 possible.
3d78e008
ML
481 (diagnose_mismatched_decls): Likewise.
482 (merge_decls): Likewise.
483 (warn_if_shadowing): Likewise.
484 (pushdecl): Likewise.
485 (implicitly_declare): Likewise.
486 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
487 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
488 * c-typeck.c (build_function_call_vec): Likewise.
489 (convert_arguments): Likewise.
490
097f82ec
DM
4912018-08-20 David Malcolm <dmalcolm@redhat.com>
492
493 PR other/84889
494 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
495 (diagnose_mismatched_decls): Likewise, in various places.
496 (warn_if_shadowing): Likewise.
497 (implicit_decl_warning): Likewise.
498 (implicitly_declare): Likewise.
499 (undeclared_variable): Likewise.
500 (declare_label): Likewise.
501 (grokdeclarator): Likewise.
502 (start_function): Likewise.
503 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
504 (c_parser_parameter_declaration): Likewise.
505 (c_parser_binary_expression): Likewise.
506 * c-typeck.c (c_expr_sizeof_expr): Likewise.
507 (parser_build_binary_op): Likewise.
508 (build_unary_op): Likewise.
509 (error_init): Likewise.
510 (pedwarn_init): Likewise.
511 (warning_init): Likewise.
512 (convert_for_assignment): Likewise.
513
96e6ae57
DM
5142018-08-15 David Malcolm <dmalcolm@redhat.com>
515
516 * c-objc-common.c: Include "gcc-rich-location.h".
517 (c_tree_printer): Move implemenation of '%T' to...
518 (print_type): ...this new function.
519 (range_label_for_type_mismatch::get_text): New function.
520 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
521 range for the various ic_argpass cases.
522 (class maybe_range_label_for_tree_type_mismatch): New class.
523 (build_binary_op): Use it when calling binary_op_error.
524
0cd020ae
PK
5252018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
526
527 * c-decl.c (start_decl): Do not warn if variables is named as main
528 and is a local variable.
529
72733314
IS
5302018-08-15 Iain Sandoe <iain@sandoe.co.uk>
531
532 PR c/19315
533 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
534 objects of unknown size.
535
23aa9f7c
MS
5362018-08-13 Martin Sebor <msebor@redhat.com>
537
538 PR tree-optimization/71625
539 * c-parser.c (c_parser_declaration_or_fndef): Call
540 braced_list_to_string.
541
e5e7e50d
BH
5422018-08-03 Bogdan Harjoc <harjoc@gmail.com>
543
544 PR c/86690
545 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
546 errors.
547
8a45b051
MS
5482018-08-01 Martin Sebor <msebor@redhat.com>
549
550 PR tree-optimization/86650
551 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
552 and TREE_BLOCK (t) from within percent_K_format to this callsite.
553
5922dcb5
JJ
5542018-08-01 Jakub Jelinek <jakub@redhat.com>
555
556 PR c/85704
557 * c-typeck.c (init_field_decl_cmp): New function.
558 (output_pending_init_elements): Use it for field comparisons
559 instead of pure bit_position comparisons.
560
9b452033
JJ
5612018-07-12 Jakub Jelinek <jakub@redhat.com>
562
563 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
564 type here, instead add "omp declare target implicit" attribute.
565 (finish_decl): Diagnose vars without mappable type here.
566
829c6349
CLT
5672018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
568 Thomas Schwinge <thomas@codesourcery.com>
569 Cesar Philippidis <cesar@codesourcery.com>
570
571 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
572 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
573 to their non-present_or_* counterparts. Make 'self' an alias to
574 PRAGMA_OACC_CLAUSE_HOST.
575 (c_parser_oacc_data_clause): Update GOMP mappings for
576 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
577 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
578 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
579 Remove support for present_or_* clauses.
580 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
581 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
582 (OACC_DECLARE_CLAUSE_MASK): Likewise.
583 (OACC_DATA_CLAUSE_MASK): Likewise.
584 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
585 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
586 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
587 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
588 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
589
e197e64e
KV
5902018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
591
592 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
593 * gimple-parser.c (c_parser_gimple_statement): Likewise.
594 (c_parser_gimple_unary_expression): Likewise.
595
487f2f61
JJ
5962018-06-15 Jakub Jelinek <jakub@redhat.com>
597
598 PR c/86093
599 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
600 before doing POINTER_DIFF_EXPR.
601
e4d44a37
MP
6022018-06-07 Marek Polacek <polacek@redhat.com>
603
604 PR c/85318
605 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
606 for loop initial declarations.
607
b67b9225
DP
6082018-05-30 David Pagan <dave.pagan@oracle.com>
609
610 PR c/55976
611 * c-decl.c (grokdeclarator): Update check for return type warnings.
612 (start_function): Likewise.
613 (finish_function): Likewise.
614 * c-typeck.c (c_finish_return): Update check for return type warnings.
615 Pass OPT_Wreturn_type to pedwarn when appropriate.
616
c566cc9f
RS
6172018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
618
619 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
620 __FMA_EXPR handlng.
621
e4f81565
RS
6222018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
623
624 * gimple-parser.c: Include internal-fn.h.
625 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
626 (c_parser_gimple_call_internal): New function.
627 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
628 Fix typos in comment.
629
79e7b1fe
JJ
6302018-05-10 Jakub Jelinek <jakub@redhat.com>
631
632 PR c++/85662
633 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
634 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
635 fold_convert_loc.
636 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
637 fold_offsetof_1, pass argtype as TYPE to it and drop the
638 fold_convert_loc.
639
f7584c81
DP
6402018-05-02 David Pagan <dave.pagan@oracle.com>
641
642 PR c/30552
643 * c-decl.c (old_style_parameter_scope): New function.
644 * c-parser.c (c_parser_postfix_expression): Check for statement
645 expressions in old-style function parameter list declarations.
646 * c-parser.h (old_style_parameter_scope): New extern declaration.
647
b33a0cb3
JJ
6482018-04-25 Jakub Jelinek <jakub@redhat.com>
649
650 PR sanitizer/84307
651 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
652 it is not TREE_STATIC.
653 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
654 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
655 its COMPOUND_LITERAL_EXPR_DECL.
656
c5c5822a
JM
6572018-03-21 Joseph Myers <joseph@codesourcery.com>
658
659 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
660 where all functions return the same _FloatN or _FloatNx type,
661 treat integer types as _Float64 instead of double.
662
aa1c9429
JJ
6632018-03-21 Jakub Jelinek <jakub@redhat.com>
664
665 PR c/84999
666 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
667 building vector comparison, diagnose it and return error_mark_node.
668
9bb45a95
JJ
6692018-03-15 Jakub Jelinek <jakub@redhat.com>
670
671 PR c/84853
672 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
673 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
674 INTEGER_TYPE element type.
675
ada6bad9
DP
6762018-03-13 David Pagan <dave.pagan@oracle.com>
677
678 PR c/46921
679 * c-typeck.c (output_init_element): Ensure field initializer
680 expression is always evaluated if there are side effects.
681
849bbdb9
JJ
6822018-03-06 Jakub Jelinek <jakub@redhat.com>
683
684 PR c/84721
685 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
686 !building_stmt_list_p ().
687
d74641bd
RS
6882018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
689
690 PR c/84305
691 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
692 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
693 and include the BIND_EXPR in the list of things that need to be
694 pre-evaluated.
695
0444aa9c
NS
6962018-02-09 Nathan Sidwell <nathan@acm.org>
697
698 PR c/84293
699 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
700 to strict_aliasing_warning.
701
7c30b12a
PC
7022018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
703
704 * c-typeck.c (really_start_incremental_init, push_init_level,
705 set_nonincremental_init, output_init_element, process_init_element):
706 Use DECL_UNNAMED_BIT_FIELD.
707
2be4dfcb
MP
7082018-01-31 Marek Polacek <polacek@redhat.com>
709
710 PR c/81779
711 * c-parser.c (c_parser_compound_statement_nostart): Call
712 expansion_point_location_if_in_system_header.
713
bb9869d5
DM
7142018-01-17 David Malcolm <dmalcolm@redhat.com>
715
716 PR c++/83814
717 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
718 the C part.
719
b4923738
JJ
7202018-01-13 Jakub Jelinek <jakub@redhat.com>
721
722 PR c/83801
723 * c-tree.h (decl_constant_value_1): Add a bool argument.
724 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
725 returning a CONSTRUCTOR if it is true. Use error_operand_p.
726 (decl_constant_value): Adjust caller.
727 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
728 decl_constant_value_1 as IN_INIT. Otherwise, punt if
729 decl_constant_value returns initializer that has BLKmode or
730 array type.
731 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
732
928686b1
RS
7332018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
734 Alan Hayward <alan.hayward@arm.com>
735 David Sherwood <david.sherwood@arm.com>
736
737 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
738 TYPE_VECTOR_SUBPARTS.
739
85ec4feb
JJ
7402018-01-03 Jakub Jelinek <jakub@redhat.com>
741
742 Update copyright years.
743
913884f7
JJ
7442018-01-01 Jakub Jelinek <jakub@redhat.com>
745
746 PR c/83595
747 * c-parser.c (c_parser_braced_init, c_parser_initelt,
748 c_parser_conditional_expression, c_parser_cast_expression,
749 c_parser_sizeof_expression, c_parser_alignof_expression,
750 c_parser_postfix_expression, c_parser_omp_declare_reduction,
751 c_parser_transaction_expression): Use set_error () method instead
752 of setting value member to error_mark_node.
753
c6cfa2bf
MM
7542017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
755
756 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
757 and _Float<N>X built-in functions.
758
11d29d63
JJ
7592017-12-22 Jakub Jelinek <jakub@redhat.com>
760
14ec014e
JJ
761 PR debug/83550
762 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
763 TYPE_STUB_DECL and call rest_of_type_compilation before processing
764 incomplete vars rather than after it.
765
11d29d63
JJ
766 PR debug/83547
767 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
768 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
769 and consider empty ones if there are no other stmts. For
770 -Wunused-value walk all statements before the one only followed by
771 DEBUG_BEGIN_STMTs.
772
170a8bd6 7732017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 774 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
775
776 * c-parser.c (c_parser_while_statement): Add unroll parameter and
777 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
778 (c_parser_do_statement): Likewise.
779 (c_parser_for_statement): Likewise.
780 (c_parser_statement_after_labels): Adjust calls to above.
781 (c_parse_pragma_ivdep): New static function.
782 (c_parser_pragma_unroll): Likewise.
783 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
784 <PRAGMA_UNROLL>: New case.
785
01512446
JJ
7862017-12-19 Jakub Jelinek <jakub@redhat.com>
787
788 * c-typeck.c (comptypes_internal, function_types_compatible_p,
789 perform_integral_promotions, digest_init): Replace Yoda conditions
790 with typical order conditions.
791 * c-decl.c (check_bitfield_type_and_width): Likewise.
792
c65e18d3
BE
7932017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
794
795 * c-typeck.c (c_safe_arg_type_equiv_p,
796 c_safe_function_type_cast_p): New function.
797 (build_c_cast): Implement -Wcast-function-type.
798
b7280579
RB
7992017-12-14 Richard Biener <rguenther@suse.de>
800
801 PR c/83415
802 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
803 like REALPART_EXPR for the behavior of whether its operand
804 is an lvalue.
805
49e6a6c0
MP
8062017-12-12 Marek Polacek <polacek@redhat.com>
807
808 PR c/82679
809 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
810
96a95ac1
AO
8112017-12-12 Alexandre Oliva <aoliva@redhat.com>
812
813 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
814 * c-parser.c (add_debug_begin_stmt): New.
815 (c_parser_declaration_or_fndef): Call it.
816 (c_parser_compound_statement_nostart): Likewise.
817 (c_parser_statement_after_labels): Likewise.
818 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
819
4b2b493f
JM
8202017-12-07 Joseph Myers <joseph@codesourcery.com>
821
822 * c-decl.c (build_compound_literal): Add parameter alignas_align
823 and set alignment of decl if nonzero.
824 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
825 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
826 qualifier.
827 (c_parser_struct_declaration): Update syntax comment.
828 (c_parser_type_name): Add alignas_ok argument and pass it to
829 c_parser_declspecs.
830 (c_parser_cast_expression): Pass true to c_parser_type_name and
831 give error if a cast used an _Alignas specifier.
832 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
833 give error if sizeof (type-name) used an _Alignas specifier.
834 (c_parser_alignof_expression): Pass true to c_parser_type_name and
835 give error if _Alignof (type-name) used an _Alignas specifier.
836 (c_parser_postfix_expression_after_paren_type): Check specified
837 alignment for a compound literal and pass it to
838 build_compound_literal.
839 * c-parser.h (c_parser_type_name): Update prototype.
840 * c-tree.h (build_compound_literal): Update prototype.
841
5d9ae53d
MS
8422017-12-07 Martin Sebor <msebor@redhat.com>
843
844 PR c/81544
845 * c-decl.c (c_decl_attributes): Look up existing declaration and
846 pass it to decl_attributes.
847
c79144f8
DM
8482017-12-06 David Malcolm <dmalcolm@redhat.com>
849
850 PR c/83236
851 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
852 reserved for use by the implementation.
853
613bc14f
DM
8542017-12-06 David Malcolm <dmalcolm@redhat.com>
855
856 * c-decl.c: Include "c-family/c-spellcheck.h".
857
05abad4c
ML
8582017-12-05 Martin Liska <mliska@suse.cz>
859 Jakub Jelinek <jakub@redhat.com>
860
861 * c-typeck.c (pointer_diff): Add new argument and instrument
862 pointer subtraction.
863 (build_binary_op): Similar for pointer comparison.
864
cc6534d4
JJ
8652017-12-01 Jakub Jelinek <jakub@redhat.com>
866
65791f42
JJ
867 PR c/79153
868 * c-parser.c: Include tree-iterator.h.
869 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
870 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
871 on it.
872
cc6534d4
JJ
873 PR c/83222
874 * c-tree.h (decl_constant_value_1): Declare.
875 * c-typeck.c (decl_constant_value_1): New function.
876 (decl_constant_value): Use it.
877 * c-fold.c (c_fully_fold_internal): If in_init, use
878 decl_constant_value_1 instead of decl_constant_value.
879
5de73c05
JJ
8802017-11-30 Jakub Jelinek <jakub@redhat.com>
881
882 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
883
058f0b9e
JJ
8842017-11-28 Jakub Jelinek <jakub@redhat.com>
885
886 PR sanitizer/81275
887 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
888 c_switch_covers_all_cases_p returns true.
889
5e9d6aa4 8902017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 891 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
892
893 * Make-lang.in (c/c-array-notation.o): Remove.
894 * c-array-notation.c: Delete.
895 * c-decl.c: Remove cilkplus condition.
896 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
897 c_parser_cilk_verify_simd, c_parser_array_notation,
898 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
899 c_parser_cilk_simd_fn_vector_attrs,
900 c_finish_cilk_simd_fn_tokens): Delete.
901 (c_parser_declaration_or_fndef): Remove cilkplus condition.
902 (c_parser_direct_declarator_inner): Ditto.
903 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
904 (c_parser_attributes, c_parser_compound_statement,
905 c_parser_statement_after_labels, c_parser_if_statement,
906 c_parser_switch_statement, c_parser_while_statement,
907 c_parser_do_statement, c_parser_for_statement,
908 c_parser_unary_expression, c_parser_postfix_expression,
909 c_parser_postfix_expression_after_primary,
910 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
911 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
912 support.
913 * c-typeck.c (build_array_ref, build_function_call_vec,
914 convert_arguments,
915 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
916 c_finish_loop, build_binary_op): Remove cilkplus support.
917
9e851845
JJ
9182017-11-28 Jakub Jelinek <jakub@redhat.com>
919
920 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
921 of build3.
922
8c7dbea9
BK
9232017-11-14 Boris Kolpackov <boris@codesynthesis.com>
924
925 * Make-lang.in (c.install-plugin): Install backend import library.
926
41521dee
JJ
9272017-11-23 Jakub Jelinek <jakub@redhat.com>
928
929 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
930 pragma_stmt context.
931
ac9effed
EB
9322017-11-23 Mike Stump <mikestump@comcast.net>
933 Eric Botcazou <ebotcazou@adacore.com>
934
935 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
936 ANNOTATE_EXPR.
937 (c_parser_do_statement): Likewise.
938 (c_parser_for_statement): Likewise.
939
ce95abc4
DM
9402017-11-22 David Malcolm <dmalcolm@redhat.com>
941
942 PR c++/62170
943 * c-objc-common.c (c_tree_printer): Convert penultimate param from
944 bool to bool *. Within '%T' handling, if showing an "aka", use
945 "quoted" param to add appropriate quoting.
946
974aedcc
MP
9472017-11-22 Marek Polacek <polacek@redhat.com>
948
949 PR c++/60336
950 PR middle-end/67239
951 PR target/68355
952 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
953
d4300cc6
DM
9542017-11-21 David Malcolm <dmalcolm@redhat.com>
955
956 PR c/83056
957 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
958 earlier failed lookups.
959
1af4ebf5
MG
9602017-11-21 Marc Glisse <marc.glisse@inria.fr>
961
962 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
963 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
964
26edace6
DM
9652017-11-20 David Malcolm <dmalcolm@redhat.com>
966
967 PR c/81404
968 * c-decl.c: Include "c-family/known-headers.h".
969 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
970 to known-headers.cc.
971 (class suggest_missing_header): Move to known-header.h.
972 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
973 than get_c_name_hint.
974
b1212255
DM
9752017-11-20 David Malcolm <dmalcolm@redhat.com>
976
977 * c-decl.c (get_c_name_hint): New function.
978 (class suggest_missing_header): New class.
979 (lookup_name_fuzzy): Call get_c_name_hint and use it to
980 suggest missing headers to the user.
981
6c7a259b
DM
9822017-11-20 David Malcolm <dmalcolm@redhat.com>
983
984 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
985 Include "c-family/name-hint.h"
986 (implicit_decl_warning): Convert "hint" from
987 const char * to name_hint. Pass location to
988 lookup_name_fuzzy. Suppress any deferred diagnostic if the
989 warning was not printed.
990 (undeclared_variable): Likewise for "guessed_id".
991 (lookup_name_fuzzy): Convert return type from const char *
992 to name_hint. Add location_t param.
993 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
994 Include "c-family/name-hint.h"
995 (c_parser_declaration_or_fndef): Convert "hint" from
996 const char * to name_hint. Pass location to lookup_name_fuzzy.
997 (c_parser_parameter_declaration): Likewise.
998
f9c59f7e
JJ
9992017-11-19 Jakub Jelinek <jakub@redhat.com>
1000
1001 PR c/66618
1002 PR c/69960
1003 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
1004 where needed.
1005 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
1006 handle_omp_array_sections): Likewise.
1007 (digest_init): Don't call decl_constant_value_for_optimization.
1008 * c-tree.h (decl_constant_value_for_optimization): Removed.
1009 * c-fold.c (c_fold_array_ref): New function.
1010 (c_fully_fold_internal): Add LVAL argument, propagate it through
1011 recursive calls. For VAR_P call decl_constant_value and
1012 unshare if not LVAL and either optimizing or IN_INIT. Remove
1013 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
1014 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
1015 (c_fully_fold): Add LVAL argument, pass it through to
1016 c_fully_fold_internal.
1017 (decl_constant_value_for_optimization): Removed.
1018
3ca0dc60
JM
10192017-11-15 Joseph Myers <joseph@codesourcery.com>
1020
1021 PR c/81156
1022 * c-parser.c (check_tgmath_function): New function.
1023 (enum tgmath_parm_kind): New enum.
1024 (c_parser_postfix_expression): Handle __builtin_tgmath.
1025
64a5912c
DM
10262017-10-31 David Malcolm <dmalcolm@redhat.com>
1027
1028 * c-decl.c (implicit_decl_warning): Update for renaming of
1029 pedwarn_at_rich_loc and warning_at_rich_loc.
1030 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
1031 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
1032 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1033 (c_parser_struct_or_union_specifier): Likewise for renaming of
1034 pedwarn_at_rich_loc.
1035 (c_parser_parameter_declaration): Likewise for renaming of
1036 error_at_rich_loc.
1037 * c-typeck.c (build_component_ref): Likewise.
1038 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
1039 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
1040 (set_init_label): Likewise for renaming of error_at_rich_loc.
1041
c1136864
RB
10422017-10-30 Richard Biener <rguenther@suse.de>
1043
1044 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
1045 stmts.
1046
ee5fd23a
MM
10472017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
1048
1049 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
1050 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
1051
1a59ccf2
DM
10522017-10-25 David Malcolm <dmalcolm@redhat.com>
1053
1054 PR c/7356
1055 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
1056 semicolons.
1057
bc1a75dd
JJ
10582017-10-25 Jakub Jelinek <jakub@redhat.com>
1059
1060 PR libstdc++/81706
1061 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
1062 newdecl to corresponding __builtin_ if any.
1063
ff1ff960
PC
10642017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
1065
1066 PR c++/82466
1067 * c-decl.c (diagnose_mismatched_decls): Use
1068 OPT_Wbuiltin_declaration_mismatch.
1069
62e1c678
DM
10702017-10-12 David Malcolm <dmalcolm@redhat.com>
1071
1072 * c-parser.c (c_parser_require): Add "type_is_unique" param and
1073 use it to guard calls to maybe_suggest_missing_token_insertion.
1074 (c_parser_parms_list_declarator): Override default value of new
1075 "type_is_unique" param to c_parser_require.
1076 (c_parser_asm_statement): Likewise.
1077 * c-parser.h (c_parser_require): Add "type_is_unique" param,
1078 defaulting to true.
1079
a92f6726
NS
10802017-10-11 Nathan Sidwell <nathan@acm.org>
1081
1082 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
1083
8e6cdc90
RS
10842017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1085
1086 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
1087 operating on trees as wide_ints.
1088 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
1089 (c_tree_equal): Likewise.
1090
8139a48e
DM
10912017-10-04 David Malcolm <dmalcolm@redhat.com>
1092
1093 * c-decl.c (push_parm_decl): Store c_parm's location into the
1094 PARAM_DECL.
1095 (build_c_parm): Add "loc" param and store it within the c_parm.
1096 * c-parser.c (struct c_parser): Add "last_token_location" field.
1097 (c_parser_consume_token): Store location of the token into the
1098 new field.
1099 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
1100 when handling a FUNCTION_DECL, if it doesn't already have them.
1101 (c_parser_parameter_declaration): Generate a location for the
1102 parameter, and pass it to the call to build_c_parm.
1103 * c-tree.h (struct c_parm): Add field "loc".
1104 (build_c_parm): Add location_t param.
1105 * c-typeck.c (get_fndecl_argument_location): New function.
1106 (inform_for_arg): New function.
1107 (convert_for_assignment): Use inform_for_arg when dealing with
1108 ic_argpass.
1109
2a389958
JJ
11102017-09-29 Jakub Jelinek <jakub@redhat.com>
1111
7d386d45
JJ
1112 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
1113 width is non-NULL.
1114 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
1115 don't SET_DECL_C_BIT_FIELD here.
1116
2a389958
JJ
1117 PR c/82340
1118 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
1119 instead of trying to set just TREE_READONLY manually.
1120
ebc6a85e
TV
11212017-09-16 Tom de Vries <tom@codesourcery.com>
1122
1123 PR c/81875
1124 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
1125 cond itself.
1126
bb75facd
JM
11272017-09-15 Joseph Myers <joseph@codesourcery.com>
1128
1129 PR c/82071
1130 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
1131 for C11.
1132 (build_conditional_expr): For C11, generate result with excess
1133 precision when one argument is an integer and the other is of a
1134 type using excess precision.
1135
1d933576
BE
11362017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
1137
1138 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
1139
267bbb6f
MP
11402017-09-13 Marek Polacek <polacek@redhat.com>
1141
1142 PR c/82167
1143 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
1144 than expr.original_type.
1145
6836632e
NS
11462017-09-12 Nathan Sidwell <nathan@acm.org>
1147
1148 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1149 resort_sorted_fields): Moved from c-family/c-common.c.
1150 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
1151
e035be33
JM
11522017-09-01 Joseph Myers <joseph@codesourcery.com>
1153
1154 PR c/82071
1155 * c-typeck.c (build_atomic_assign): Handle argument with excess
1156 precision. Ensure any EXCESS_PRECISION_EXPR is present in
1157 argument passed to build_binary_op and convert_for_assignment but
1158 not for call to c_fully_fold.
1159 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
1160 Ensure build_binary_op is called with argument with original
1161 semantic type. Avoid calling c_fully_fold with an
1162 EXCESS_PRECISION_EXPR from build_binary_op.
1163
d2e05fcb
JJ
11642017-09-01 Jakub Jelinek <jakub@redhat.com>
1165
1166 PR c/81887
1167 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
1168
b397965c
RS
11692017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1170 Alan Hayward <alan.hayward@arm.com>
1171 David Sherwood <david.sherwood@arm.com>
1172
1173 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
1174 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
1175 m1 and m2 to the signed equivalent of a fixed-point
1176 SCALAR_TYPE_MODE.
1177
14e18d71
DM
11782017-08-24 David Malcolm <dmalcolm@redhat.com>
1179
1180 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
1181 than CAN_HAVE_LOCATION_P when determining whether to use the
1182 location_t value within "value".
1183
7f204c0f
DM
11842017-08-21 David Malcolm <dmalcolm@redhat.com>
1185
1186 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
1187 rather than peeking the location of the first token.
1188 * c-tree.h (c_expr::get_location): New method.
1189
2f687306
DM
11902017-08-21 David Malcolm <dmalcolm@redhat.com>
1191
1192 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
1193 to check_function_arguments.
1194
3e7b80d7
MP
11952017-08-18 Marek Polacek <polacek@redhat.com>
1196
1197 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
1198 commentary.
1199
00aa1fa2
L
12002017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1201
1202 PR c/53037
1203 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
1204 (check_bitfield_type_and_width): Don't allow bit-field with
1205 warn_if_not_aligned type.
1206
da67acb9
MS
12072017-08-14 Martin Sebor <msebor@redhat.com>
1208
1209 PR c/81117
1210 * c-objc-common.c (c_objc_common_init): Handle 'G'.
1211
bb85aa74
MP
12122017-08-11 Marek Polacek <polacek@redhat.com>
1213
1214 PR c/81795
1215 * c-decl.c (pushtag): Only print inform if the warning was printed.
1216 (grokdeclarator): Likewise.
1217
32129a17
DM
12182017-08-10 David Malcolm <dmalcolm@redhat.com>
1219
1220 * c-parser.c (c_parser_error): Rename to...
1221 (c_parser_error_richloc): ...this, making static, and adding
1222 "richloc" parameter, passing it to the c_parse_error call,
1223 rather than calling c_parser_set_source_position_from_token.
1224 (c_parser_error): Reintroduce, reimplementing in terms of the
1225 above, converting return type from void to bool.
1226 (class token_pair): New class.
1227 (struct matching_paren_traits): New struct.
1228 (matching_parens): New typedef.
1229 (struct matching_brace_traits): New struct.
1230 (matching_braces): New typedef.
1231 (get_matching_symbol): New function.
1232 (c_parser_require): Add param MATCHING_LOCATION, using it to
1233 highlight matching "opening" tokens for missing "closing" tokens.
1234 (c_parser_skip_until_found): Likewise.
1235 (c_parser_static_assert_declaration_no_semi): Convert explicit
1236 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
1237 class matching_parens, so that the pertinent open parenthesis is
1238 highlighted when there are problems locating the close
1239 parenthesis.
1240 (c_parser_struct_or_union_specifier): Likewise.
1241 (c_parser_typeof_specifier): Likewise.
1242 (c_parser_alignas_specifier): Likewise.
1243 (c_parser_simple_asm_expr): Likewise.
1244 (c_parser_braced_init): Likewise, for matching_braces.
1245 (c_parser_paren_condition): Likewise, for matching_parens.
1246 (c_parser_switch_statement): Likewise.
1247 (c_parser_for_statement): Likewise.
1248 (c_parser_asm_statement): Likewise.
1249 (c_parser_asm_operands): Likewise.
1250 (c_parser_cast_expression): Likewise.
1251 (c_parser_sizeof_expression): Likewise.
1252 (c_parser_alignof_expression): Likewise.
1253 (c_parser_generic_selection): Likewise.
1254 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
1255 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
1256 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
1257 In case CPP_OPEN_PAREN, pass loc_open_paren to the
1258 c_parser_skip_until_found call.
1259 (c_parser_objc_class_definition): Use class matching_parens as
1260 above.
1261 (c_parser_objc_method_decl): Likewise.
1262 (c_parser_objc_try_catch_finally_statement): Likewise.
1263 (c_parser_objc_synchronized_statement): Likewise.
1264 (c_parser_objc_at_property_declaration): Likewise.
1265 (c_parser_oacc_wait_list): Likewise.
1266 (c_parser_omp_var_list_parens): Likewise.
1267 (c_parser_omp_clause_collapse): Likewise.
1268 (c_parser_omp_clause_default): Likewise.
1269 (c_parser_omp_clause_if): Likewise.
1270 (c_parser_omp_clause_num_threads): Likewise.
1271 (c_parser_omp_clause_num_tasks): Likewise.
1272 (c_parser_omp_clause_grainsize): Likewise.
1273 (c_parser_omp_clause_priority): Likewise.
1274 (c_parser_omp_clause_hint): Likewise.
1275 (c_parser_omp_clause_defaultmap): Likewise.
1276 (c_parser_oacc_single_int_clause): Likewise.
1277 (c_parser_omp_clause_ordered): Likewise.
1278 (c_parser_omp_clause_reduction): Likewise.
1279 (c_parser_omp_clause_schedule): Likewise.
1280 (c_parser_omp_clause_num_teams): Likewise.
1281 (c_parser_omp_clause_thread_limit): Likewise.
1282 (c_parser_omp_clause_aligned): Likewise.
1283 (c_parser_omp_clause_linear): Likewise.
1284 (c_parser_omp_clause_safelen): Likewise.
1285 (c_parser_omp_clause_simdlen): Likewise.
1286 (c_parser_omp_clause_depend): Likewise.
1287 (c_parser_omp_clause_map): Likewise.
1288 (c_parser_omp_clause_device): Likewise.
1289 (c_parser_omp_clause_dist_schedule): Likewise.
1290 (c_parser_omp_clause_proc_bind): Likewise.
1291 (c_parser_omp_clause_uniform): Likewise.
1292 (c_parser_omp_for_loop): Likewise.
1293 (c_parser_cilk_clause_vectorlength): Likewise.
1294 (c_parser_cilk_clause_linear): Likewise.
1295 (c_parser_transaction_expression): Likewise.
1296 * c-parser.h (c_parser_require): Add param matching_location with
1297 default UNKNOWN_LOCATION.
1298 (c_parser_error): Convert return type from void to bool.
1299 (c_parser_skip_until_found): Add param matching_location with
1300 default UNKNOWN_LOCATION.
1301
30af3a2b
MP
13022017-08-09 Marek Polacek <polacek@redhat.com>
1303
1304 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
1305 * c-tree.h (build_external_ref): Update declaration.
1306 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
1307 (build_external_ref): Change the type of a parameter to bool.
1308 (parser_build_binary_op): Use true/false instead of 1/0.
1309 (pointer_diff): Likewise.
1310 (build_modify_expr): Likewise.
1311 (set_designator): Change the type of a parameter to bool.
1312 (set_init_index): Use true/false instead of 1/0.
1313 (set_init_label): Likewise.
1314 (output_init_element): Change the type of a parameter to bool.
1315 (output_pending_init_elements): Use true/false instead of 1/0.
1316 (process_init_element): Likewise.
1317 (build_binary_op): Change the type of a parameter to bool.
1318
296c53ac
MP
13192017-08-09 Marek Polacek <polacek@redhat.com>
1320
1321 PR c/81233
1322 * c-typeck.c (pedwarn_init): Make the function take a variable list.
1323 Call emit_diagnostic_valist instead of pedwarn.
1324 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
1325 Print the relevant types in diagnostics.
1326
a32c8316
MP
13272017-08-09 Marek Polacek <polacek@redhat.com>
1328
1329 PR c/81417
1330 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
1331 build_conditional_expr.
1332 * c-parser.c (c_parser_conditional_expression): Create locations for
1333 EXP1 and EXP2 from their source ranges. Pass the locations down to
1334 build_conditional_expr.
1335 * c-tree.h (build_conditional_expr): Update declaration.
1336 * c-typeck.c (build_conditional_expr): Add location_t parameters.
1337 For -Wsign-compare, also print the types.
1338
314e6352
ML
13392017-08-08 Martin Liska <mliska@suse.cz>
1340
1341 * c-convert.c: Include header files.
1342 * c-typeck.c: Likewise.
1343
577eec56
ML
13442017-08-07 Martin Liska <mliska@suse.cz>
1345
1346 * c-parser.c (c_parser_attributes): Canonicalize name of an
1347 attribute.
1348
f7b6353a
MP
13492017-08-02 Marek Polacek <polacek@redhat.com>
1350
1351 PR c/81289
1352 * c-parser.c (c_parser_unary_expression): Use set_error.
1353
8a6eab34
MP
1354 PR c/81448
1355 PR c/81306
1356 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
1357 warnings. Avoid walking MACRO_MAP_LOCATIONS.
1358
7fef86d3
JH
13592017-07-31 Jan Hubicka <hubicka@ucw.cz>
1360 Martin Liska <mliska@suse.cz>
1361
1362 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 1363 statement.
7fef86d3 1364
f34ebeb2
ML
13652017-07-31 Martin Liska <mliska@suse.cz>
1366
1367 PR sanitize/81530
1368 * c-convert.c (convert): Guard condition with flag_sanitize_p
1369 also with current_function_decl non-null equality.
1370 * c-decl.c (grokdeclarator): Likewise.
1371 * c-typeck.c (build_binary_op): Likewise.
1372
8595f67b
MP
13732017-07-25 Marek Polacek <polacek@redhat.com>
1374
1375 * c-decl.c (grokfield): Remove local variable.
1376
d49718d6
MP
13772017-07-25 Marek Polacek <polacek@redhat.com>
1378
1379 PR c/81364
1380 * c-parser.c (c_parser_else_body): Don't warn about multistatement
1381 macro expansion if the body is in { }.
1382 (c_parser_while_statement): Likewise.
1383 (c_parser_for_statement): Likewise.
1384
ff22eb12
NS
13852017-07-18 Nathan Sidwell <nathan@acm.org>
1386
1387 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
1388
eea77d1f
DM
13892017-07-14 David Malcolm <dmalcolm@redhat.com>
1390
1391 * c-decl.c (implicitly_declare): When suggesting a missing
1392 #include, provide a fix-it hint.
1393
b6f43128
DM
13942017-07-06 David Malcolm <dmalcolm@redhat.com>
1395
1396 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
1397 and call that instead.
1398 * c-tree.h (selftest::run_c_tests): New decl.
1399
3e2becc4
MP
14002017-06-26 Marek Polacek <polacek@redhat.com>
1401
1402 PR c/80116
1403 * c-parser.c (c_parser_if_body): Set the location of the
1404 body of the conditional after parsing all the labels. Call
1405 warn_for_multistatement_macros.
1406 (c_parser_else_body): Likewise.
1407 (c_parser_switch_statement): Likewise.
1408 (c_parser_while_statement): Likewise.
1409 (c_parser_for_statement): Likewise.
1410 (c_parser_statement): Add a default argument. Save the location
1411 after labels have been parsed.
1412 (c_parser_c99_block_statement): Likewise.
1413
343ae898
RB
14142017-06-19 Richard Biener <rguenther@suse.de>
1415
1416 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1417 negated _Literals to parse _Literal (int) -1.
1418
45b2222a
ML
14192017-06-13 Martin Liska <mliska@suse.cz>
1420
1421 PR sanitize/78204
1422 * c-convert.c (convert): Use sanitize_flags_p.
1423 * c-decl.c (grokdeclarator): Likewise.
1424 * c-typeck.c (convert_for_assignment): Likewise.
1425 (c_finish_return): Likewise.
1426 (build_binary_op): Likewise.
1427
8ab7005b
JJ
14282017-06-08 Jakub Jelinek <jakub@redhat.com>
1429
1430 PR c/81006
1431 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
1432 to sizetype before size_binop.
1433
363dc72c
JJ
14342017-06-07 Jakub Jelinek <jakub@redhat.com>
1435
1436 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
1437 of TDI_generic.
1438
dc949728
MP
14392017-06-06 Marek Polacek <polacek@redhat.com>
1440
1441 PR c/79983
1442 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
1443 ref.
1444 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
1445
40ffd95f
BE
14462017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1447
1448 * c-parser.c (c_parser_binary_expression): Implement the
1449 -Wsizeof_pointer_div warning.
1450 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
1451 from a parenthesized expression.
1452 (c_parser_expr_list): Use c_last_sizeof_loc.
1453 * c-tree.h (c_last_sizeof_loc): New external.
1454 * c-typeck.c (c_last_sizeof_loc): New variable.
1455 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
1456
9fc5e7a4
MM
14572017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
1458
1459 PR testsuite/80580
1460 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
1461
f012c8ef
DM
14622017-05-30 David Malcolm <dmalcolm@redhat.com>
1463
1464 * c-objc-common.c (c_tree_printer): Gain bool and const char **
1465 parameters.
1466
3cd211af
MS
14672017-05-24 Martin Sebor <msebor@redhat.com>
1468
1469 PR c/80731
1470 * c-fold.c (c_fully_fold_internal): Adjust.
1471 * c-typeck.c (parser_build_unary_op): Adjust.
1472
fd71a9a2
TS
14732017-05-23 Thomas Schwinge <thomas@codesourcery.com>
1474
1475 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
1476 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
1477 "VECTOR_LENGTH".
1478
92fa0f9e
MP
14792017-05-23 Marek Polacek <polacek@redhat.com>
1480
1481 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
1482 quotes.
1483
d11c168a
JJ
14842017-05-22 Jakub Jelinek <jakub@redhat.com>
1485
1486 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
1487 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
1488 it returned invariant. Call tree_invariant_p unconditionally
1489 afterwards to decide whether to return expr or op0.
1490
58aca9d9
NS
14912017-05-22 Nathan Sidwell <nathan@acm.org>
1492
1493 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
1494
7fd549d2
TS
14952017-05-19 Thomas Schwinge <thomas@codesourcery.com>
1496
1497 * c-parser.c (c_parser_omp_clause_default): Handle
1498 "OMP_CLAUSE_DEFAULT_PRESENT".
1499
6ecd2339
BE
15002017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1501
1502 * config-lang.in (gtfiles): Add c-family/c-format.c.
1503
8a57ecff
NS
15042017-05-18 Nathan Sidwell <nathan@acm.org>
1505
1506 * c-decl.c (pushdecl_top_level): Delete unused function.
1507
6574d78e
MP
15082017-05-18 Marek Polacek <polacek@redhat.com>
1509
1510 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
1511 (check_earlier_gotos): Likewise.
1512 (define_label): Likewise.
1513 (pending_xref_error): Likewise.
1514 (smallest_type_quals_location): Likewise.
1515 (grokdeclarator): Likewise.
1516 (grokparms): Likewise.
1517 (identifier_global_value): Likewise.
1518 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
1519 (find_init_member): Likewise.
1520
e3455240
MP
15212017-05-18 Marek Polacek <polacek@redhat.com>
1522
1523 * c-decl.c (start_decl): Use false/true instead of 0/1.
1524 (grokdeclarator): Likewise.
1525 (finish_struct): Likewise.
1526 (start_function): Change the return type to bool. Use false/true
1527 instead of 0/1.
1528 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
1529 * c-tree.h (start_function): Update.
1530 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
1531 (set_designator): Change the return type to bool. Use false/true
1532 instead of 0/1.
1533
3fa8871b
MP
15342017-05-17 Marek Polacek <polacek@redhat.com>
1535
1536 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
1537 * c-typeck.c: Likewise.
1538
142473df
MP
15392017-05-17 Marek Polacek <polacek@redhat.com>
1540
1541 PR sanitizer/80659
1542 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
1543 DECL_IGNORED_P even for non-static compound literals.
1544
1a817418
ML
15452017-05-17 Martin Liska <mliska@suse.cz>
1546
1547 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1548 use it instead of int type.
1549
b2fa0a8b
MP
15502017-05-17 Marek Polacek <polacek@redhat.com>
1551
1552 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
1553 call c_fully_fold.
1554 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
1555 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
1556 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1557 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1558 save_expr.
1559 (c_parser_conditional_expression): Likewise.
1560 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1561 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1562 (process_init_element): Likewise.
1563 (build_binary_op): Likewise.
1564 (handle_omp_array_sections_1): Likewise.
1565
1e47f02b
TS
15662017-05-12 Thomas Schwinge <thomas@codesourcery.com>
1567
1568 * c-parser.c (c_parser_omp_clause_num_gangs)
1569 (c_parser_omp_clause_num_workers)
1570 (c_parser_omp_clause_vector_length): Merge functions into...
1571 (c_parser_oacc_single_int_clause): ... this new function. Adjust
1572 all users.
1573
c24e924f
NS
15742017-05-11 Nathan Sidwell <nathan@acm.org>
1575
1576 * gimple-parser.c: Don't #include tree-dump.h.
1577
c587104e
MM
15782017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1579
1580 PR testsuite/80580
1581 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
1582
67ac9a9d
MM
15832017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1584
1585 PR testsuite/80580
1586 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1587 incorrect __MEM syntax.
1588
ac4eb40f
MM
15892017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1590
1591 PR testsuite/80580
1592 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1593 type of unary '*'.
1594
641da50a
NS
15952017-05-09 Nathan Sidwell <nathan@acm.org>
1596
1597 * c-tree.h (pushdecl): Declare.
1598
56d35585
DM
15992017-05-05 David Malcolm <dmalcolm@redhat.com>
1600
1601 * c-decl.c (warn_defaults_to): Replace report_diagnostic
1602 with diagnostic_report_diagnostic.
1603 * c-errors.c (pedwarn_c99): Likewise.
1604 (pedwarn_c90): Likewise.
1605
815d9cc6
XR
16062017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1607
92a285c1 1608 PR c++/80038
815d9cc6
XR
1609 * c-gimplify.c (c_gimplify_expr): Remove calls to
1610 cilk_gimplifY_call_params_in_spawned_fn.
1611
1c4ea66f
DM
16122017-04-25 David Malcolm <dmalcolm@redhat.com>
1613
1614 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1615 hint for removing extra semicolon.
1616
666f7903
JJ
16172017-04-21 Jakub Jelinek <jakub@redhat.com>
1618
1619 PR c/80468
1620 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
1621 enabled, set specs->type to integer_type_node.
1622
5764ee3c
JW
16232017-04-03 Jonathan Wakely <jwakely@redhat.com>
1624
1625 * c-array-notation.c: Fix typo in comment.
1626
10fa8dfb
MP
16272017-03-29 Marek Polacek <polacek@redhat.com>
1628
1629 PR c/79730
1630 * c-decl.c (finish_decl): Check VAR_P.
1631
a9e4a1a5
JJ
16322017-03-27 Jakub Jelinek <jakub@redhat.com>
1633
1634 PR middle-end/80162
1635 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1636 * c-typeck.c (c_mark_addressable): Likewise. Look through
1637 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1638 to ARRAY_TYPE.
1639 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
1640
ee3ff394
MP
16412017-03-23 Marek Polacek <polacek@redhat.com>
1642
1643 * c-tree.h: Remove a C_RID_YYCODE reference.
1644
4d1b8e70
JJ
16452017-03-21 Jakub Jelinek <jakub@redhat.com>
1646
1647 PR c/80097
1648 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
1649 optional COMPOUND_EXPR with ubsan instrumentation.
1650
31dc71a8
MP
16512017-03-17 Marek Polacek <polacek@redhat.com>
1652
1653 * c-parser.c: Add C11 references.
1654
d579c385
MP
16552017-03-15 Marek Polacek <polacek@redhat.com>
1656
1657 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
1658
85059a38
MP
16592017-03-11 Marek Polacek <polacek@redhat.com>
1660
1661 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
1662
2f6f187a
DM
16632017-03-10 David Malcolm <dmalcolm@redhat.com>
1664
1665 PR translation/79848
1666 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1667 "%qs".
1668 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1669
36618428
MP
16702017-03-09 Marek Polacek <polacek@redhat.com>
1671
1672 PR sanitizer/79757
1673 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1674 parameter declarations with initializers.
1675
01e5af5a
JJ
16762017-03-09 Jakub Jelinek <jakub@redhat.com>
1677
1678 PR c/79969
1679 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
1680 TYPE_STUB_DECL.
1681
a71dbc63
JJ
16822017-03-07 Jakub Jelinek <jakub@redhat.com>
1683
1684 PR c/79834
1685 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1686 for "may only be used in compound statements" diagnostics, change it
1687 such that the same translatable string is used for all pragmas. For
1688 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1689 diagnostics.
1690 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1691 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1692 "may only be used in compound statements" diagnostics, such that the
1693 same translatable string is used for all pragmas.
1694
1ff4bae6
MP
16952017-03-04 Marek Polacek <polacek@redhat.com>
1696
1697 PR c/79847
1698 * c-decl.c (implicit_decl_warning): Add missing space.
1699
7f5a7d78
MP
17002017-03-03 Marek Polacek <polacek@redhat.com>
1701
1702 PR c/79758
1703 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1704 current_function_prototype_arg_types is error_mark_node. Fix
1705 formatting. Use TREE_VALUE instead of TREE_TYPE.
1706
883c8f06
JJ
17072017-03-03 Jakub Jelinek <jakub@redhat.com>
1708
79c9b7a8
JJ
1709 PR c/79837
1710 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1711 %<min%> or %<max%> in the diagnostics, instead mention identifier.
1712 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1713 diagnostics.
1714
883c8f06
JJ
1715 PR c/79836
1716 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1717 instead of %<_Generic>.
1718 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1719 (c_parser_omp_target_exit_data): Use %<release%> instead of
1720 %<release>.
1721
324ff1a0
JJ
17222017-02-28 Jakub Jelinek <jakub@redhat.com>
1723
1724 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1725 instead of just cond ? "..." : "...".
1726 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1727 for "enter"/"exit" keyword.
1728 (c_finish_oacc_routine): Don't use %s to supply portions of the
1729 message.
1730
4227c9ad
JJ
17312017-02-24 Jakub Jelinek <jakub@redhat.com>
1732
1733 PR c++/79588
1734 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1735 handle -Wrestrict here.
1736 * c-typeck.c (build_function_call_vec): Adjust
1737 check_function_arguments caller.
1738
5d972e66
RB
17392017-02-23 Richard Biener <rguenther@suse.de>
1740
1741 PR c/79684
1742 * gimple-parser.c (c_parser_gimple_statement): Use set_error
1743 to initialize c_exprs to return.
1744 (c_parser_gimple_binary_expression): Likewise.
1745 (c_parser_gimple_unary_expression): Likewise.
1746 (c_parser_gimple_postfix_expression): Likewise.
1747
61ac5ebe
MP
17482017-02-22 Marek Polacek <polacek@redhat.com>
1749
1750 PR c/79662
1751 * c-typeck.c (convert_arguments): Handle error_mark_node.
1752
41d1b0b1
PK
17532017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1754
1755 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1756 value of c_parser_parse_ssa_name against error_mark_node and emit
1757 error if ssa name is anonymous and written as default definition.
1758
eab1f169
PK
17592017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1760
1761 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1762 FMA_EXPR.
1763
bcac0b4d
JJ
17642017-02-16 Jakub Jelinek <jakub@redhat.com>
1765
1766 PR c++/79512
1767 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1768 ignore #pragma omp target even when not followed by identifier.
1769
1be33173
PK
17702017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1771
1772 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1773 (c_parser_gimple_unary_expression): Likewise.
1774
aa326bfb
JJ
17752017-02-13 Jakub Jelinek <jakub@redhat.com>
1776
1777 * c-parser.c (c_parser_oacc_declare): Add missing space in
1778 diagnostics.
1779
8a398bc5
PK
17802017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1781
1782 PR c/79478
1783 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1784 set_c_expr_source_range when parsing ssa-name.
1785
3dcde5ef
PG
17862017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
1787 Richard Biener <rguenther@suse.de>
1788
1789 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1790 building IL when arguments are error_mark_node.
1791 (c_parser_gimple_unary_expression): Likewise.
1792 (c_parser_gimple_if_stmt): Likewise.
1793 (c_parser_gimple_switch_stmt): Likewise.
1794 (c_parser_gimple_return_stmt): Likewise.
1795 (c_parser_parse_ssa_name): When name lookup fails do not build
1796 an SSA name. Use undeclared rather than not declared in error
1797 reporting.
1798
192b048b
MP
17992017-02-09 Marek Polacek <polacek@redhat.com>
1800
1801 PR c/79428
1802 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1803 instead of c_parser_skip_until_found.
1804
56f71478
JJ
18052017-02-09 Jakub Jelinek <jakub@redhat.com>
1806
1807 PR c/79431
1808 * c-parser.c (c_parser_omp_declare_target): Don't invoke
1809 symtab_node::get on automatic variables.
1810
02889d23
CLT
18112016-02-09 Nathan Sidwell <nathan@codesourcery.com>
1812 Chung-Lin Tang <cltang@codesourcery.com>
1813
1814 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1815 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1816 semantic checking.
1817 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1818
7af4b20d
RB
18192017-02-07 Richard Biener <rguenther@suse.de>
1820
1821 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1822 (c_parser_gimple_postfix_expression_after_primary):
1823 Do not use c_build_function_call_vec to avoid folding and promotion.
1824 Simplify.
1825
e5e391d6
MO
18262017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1827
1828 PR lto/79061
1829 * c-decl.c (pop_scope): Pass main_input_filename to
1830 build_translation_unit_decl.
1831
c2e84327
DM
18322017-01-24 David Malcolm <dmalcolm@redhat.com>
1833
1834 * c-parser.c: Include "read-rtl-function.h" and
1835 "run-rtl-passes.h".
1836 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
1837 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
1838 production. Update for renaming of field "gimple_pass" to
1839 "gimple_or_rtl_pass". If __RTL was seen, call
1840 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
1841 to an auto_timevar, to cope with early exit.
1842 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1843 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1844 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1845 Handle RID_RTL.
1846 (c_parser_parse_rtl_body): New function.
1847 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1848 (struct c_declspecs): Rename field "gimple_pass" to
1849 "gimple_or_rtl_pass". Add field "rtl_p".
1850 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1851 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1852 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1853 (c_parser_gimple_or_rtl_pass_list): ...this.
1854
2ebd93e1
MP
18552017-01-20 Marek Polacek <polacek@redhat.com>
1856
1857 PR c/64279
1858 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1859
b1c95bb5
RB
18602017-01-13 Richard Biener <rguenther@suse.de>
1861
1862 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1863 nops.
1864
25329913
RB
18652017-01-13 Richard Biener <rguenther@suse.de>
1866
1867 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1868 _Literal ( type-name ) number.
1869
6bb4ea5c
RB
18702017-01-12 Richard Biener <rguenther@suse.de>
1871
1872 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1873 __MEM.
1874
6b5b4e9c
JJ
18752017-01-11 Jakub Jelinek <jakub@redhat.com>
1876
1877 PR c++/72813
1878 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
1879 PCH file.
1880
e3252775
RB
18812017-01-11 Richard Biener <rguenther@suse.de>
1882
1883 PR bootstrap/79052
1884 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
1885 returns on parse errors.
1886
a9342885
MP
18872017-01-04 Marek Polacek <polacek@redhat.com>
1888
1889 PR c++/64767
1890 * c-parser.c (c_parser_postfix_expression): Mark zero character
1891 constants by setting original_type in c_expr.
1892 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
1893 with a zero character constant.
1894 (char_type_p): New function.
1895
5dd9a9d0
DM
18962017-01-04 David Malcolm <dmalcolm@redhat.com>
1897
1898 * c-parser.c (c_parser_declaration_or_fndef): Create a
1899 rich_location at init_loc and parse it to start_init.
1900 (last_init_list_comma): New global.
1901 (c_parser_braced_init): Update last_init_list_comma when parsing
1902 commas. Pass it to pop_init_level. Pass location of closing
1903 brace to pop_init_level.
1904 (c_parser_postfix_expression_after_paren_type): Create a
1905 rich_location at type_loc and parse it to start_init.
1906 (c_parser_omp_declare_reduction): Likewise for loc.
1907 * c-tree.h (start_init): Add rich_location * param.
1908 (pop_init_level): Add location_t param.
1909 * c-typeck.c (struct initializer_stack): Add field
1910 "missing_brace_richloc".
1911 (start_init): Add richloc param, use it to initialize
1912 the stack node's missing_brace_richloc.
1913 (last_init_list_comma): New decl.
1914 (finish_implicit_inits): Pass last_init_list_comma to
1915 pop_init_level.
1916 (push_init_level): When finding missing open braces, add fix-it
1917 hints to the richloc.
1918 (pop_init_level): Add "insert_before" param and pass it
1919 when calling pop_init_level. Add fixits about missing
1920 close braces to any richloc. Use the richloc for the
1921 -Wmissing-braces warning.
1922 (set_designator): Pass last_init_list_comma to pop_init_level.
1923 (process_init_element): Likewise.
1924
cbe34bb5
JJ
19252017-01-01 Jakub Jelinek <jakub@redhat.com>
1926
1927 Update copyright years.
1928
d17680f3
JJ
19292016-12-21 Jakub Jelinek <jakub@redhat.com>
1930
0dba7960
JJ
1931 PR bootstrap/78817
1932 * c-typeck.c (build_function_call_vec): If check_function_arguments
1933 returns true, set TREE_NO_WARNING on CALL_EXPR.
1934
d17680f3
JJ
1935 PR c/77767
1936 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
1937 to *expr instead of overwriting it.
1938
aa90531e
RB
19392016-12-20 Richard Biener <rguenther@suse.de>
1940
1941 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
1942 error recovery.
1943 (c_parser_gimple_statement): Only build assigns for non-error
1944 stmts.
1945 (c_parser_gimple_postfix_expression_after): Improve error recovery.
1946
629b3d75
MJ
19472016-12-14 Martin Jambor <mjambor@suse.cz>
1948
1949 * c-parser.c: Include omp-general.h and omp-offload.h instead of
1950 omp-low.h.
1951 (c_finish_oacc_routine): Adjusted call to
1952 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
1953 to use their new names.
1954 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
1955 use its new name.
1956 (c_parser_oacc_update): Likewise.
1957 (c_parser_omp_simd): Likewise.
1958 (c_parser_omp_target_update): Likewise.
1959 * c-typeck.c: Include omp-general.h instead of omp-low.h.
1960 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
1961 name.
1962 (c_finish_omp_cancellation_point): Likewise.
1963 * gimple-parser.c: Do not include omp-low.h
1964
c5af52eb
CP
19652016-12-02 Cesar Philippidis <cesar@codesourcery.com>
1966 James Norris <jnorris@codesourcery.com>
1967
1968 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
1969 EXIT_DATA,WAIT} are not used in compound statements.
1970 (c_parser_oacc_enter_exit_data): Update diagnostics.
1971
48330c93
BE
19722016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1973
1974 PR c++/71973
1975 * c-decl.c (diagnose_mismatched_decls): Use
1976 OPT_Wbuiltin_declaration_mismatch here too.
1977
899ca90e 19782016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
1979 Alan Hayward <alan.hayward@arm.com>
1980 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
1981
1982 * c-decl.c (merge_decls): Use SET_DECL_MODE.
1983 (make_label, finish_struct): Likewise.
1984
1ee62b92 19852016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 1986 Richard Biener <rguenther@suse.de>
22b15758 1987
8e745a17
JJ
1988 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
1989 * config-lang.in (gtfiles): Add c/c-parser.h.
1990 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
1991 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
1992 * c-parser.c (enum c_id_kind, struct c_token,
1993 c_parser_next_token_is, c_parser_next_token_is_not,
1994 c_parser_next_token_is_keyword,
1995 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
1996 Split out to ...
1997 * c-parser.h: ... new header.
1998 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 1999 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
2000 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2001 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2002 c_parser_error, c_parser_require, c_parser_skip_until_found,
2003 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2004 c_parser_type_name): Export.
2005 (c_parser_tokens_buf): New function.
2006 (c_parser_error): Likewise.
2007 (c_parser_set_error): Likewise.
2008 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
2009 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
2010 via c_parser_parse_gimple_body.
8e745a17
JJ
2011 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
2012 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2013 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2014 c_parser_error, c_parser_require, c_parser_skip_until_found,
2015 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2016 c_parser_type_name): Declare.
1ee62b92
PG
2017 (struct c_parser): Declare forward.
2018 (c_parser_tokens_buf): Declare.
8e745a17
JJ
2019 (c_parser_error): Likewise.
2020 (c_parser_set_error): Likewise.
2021 * gimple-parser.c: New file.
2022 * gimple-parser.h: Likewise.
1ee62b92 2023
22b15758
UB
20242016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2025
2026 PR c/35503
2027 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2028 warn_for_restrict.
2029
84ff4775
LCW
20302016-09-11 Le-Chun Wu <lcwu@google.com>
2031 Mark Wielaard <mjw@redhat.com>
2032
2033 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
2034 to the given -Wshadow= variant.
2035
4d0cdd0c
TP
20362016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2037
2038 * c-typeck.c: Include memmodel.h.
2039
1202f33e
JJ
20402016-10-13 Jakub Jelinek <jakub@redhat.com>
2041
2042 PR target/77957
2043 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
2044 instead of lhd_return_null_tree_v.
2045
8a14afd0
BS
20462016-10-07 Bernd Schmidt <bschmidt@redhat.com>
2047
2048 PR c++/69733
2049 * c-decl.c (smallest_type_quals_location): New static function.
2050 (grokdeclarator): Try to find the correct location for an ignored
2051 qualifier.
2052
81fea426
MP
20532016-09-26 Marek Polacek <polacek@redhat.com>
2054
2055 PR c/7652
2056 * c-decl.c (pop_scope): Add gcc_fallthrough.
2057
20582016-09-26 Marek Polacek <polacek@redhat.com>
2059
2060 PR c/7652
2061 * c-parser.c (struct c_token): Add flags field.
2062 (c_lex_one_token): Pass it to c_lex_with_flags.
2063 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
2064 into IFN_FALLTHROUGH.
2065 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
2066 attribute fallthrough after a case label or default label.
2067 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
2068
9a2300e9
MP
20692016-09-24 Marek Polacek <polacek@redhat.com>
2070
2071 PR c/77490
2072 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
2073 have boolean value. Warn about ++/-- on booleans.
2074
7de76362
JJ
20752016-09-23 Jakub Jelinek <jakub@redhat.com>
2076
2077 * c-parser.c (incomplete_record_decls): Remove unnecessary
2078 = vNULL initialization of file scope vec.
2079
5b73d2ab
MP
20802016-09-16 Marek Polacek <polacek@redhat.com>
2081
2082 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
2083
e51fbec3
MP
20842016-09-14 Marek Polacek <polacek@redhat.com>
2085
2086 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
2087 (fix_array_notation_expr): Likewise.
2088 * c-decl.c (finish_decl): Likewise.
2089 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2090 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
2091 (function_to_pointer_conversion): Use false instead of 0.
2092 (convert_lvalue_to_rvalue): Likewise.
2093 (parser_build_unary_op): Likewise.
2094 (build_atomic_assign): Likewise.
2095 (build_unary_op): Change nonconvert parameter type to bool, use
2096 true/false instead of 1/0.
2097 (build_binary_op): Use true instead of 1.
2098
254830ba
DM
20992016-09-13 David Malcolm <dmalcolm@redhat.com>
2100
2101 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
2102 of add_fixit_insert to add_fixit_insert_before.
2103
4c13ba17
MP
21042016-09-13 Marek Polacek <polacek@redhat.com>
2105
2106 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
2107 it.
2108
54dcdb88
BE
21092016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
2110
2111 PR c++/77496
2112 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
2113 COMPOUND_EXPR to warn_for_omitted_condop.
2114
e5106e27
DM
21152016-09-07 David Malcolm <dmalcolm@redhat.com>
2116
2117 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
2118 c_get_substring_location for this new langhook.
2119
9dc5773f
JJ
21202016-09-02 Jakub Jelinek <jakub@redhat.com>
2121
2122 PR c/65467
2123 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
2124 flag_openmp.
2125 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
2126 instead of mark_exp_read on low_bound/length expression.
2127 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
2128 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2129 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2130 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
2131 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
2132 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
2133 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
2134 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
2135 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
2136 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
2137 instead of mark_expr_read.
2138 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
2139 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
2140 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
2141 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
2142 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
2143 array section bases outside of depend clause, for depend clause
2144 use convert_lvalue_to_rvalue on the base.
2145 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
2146 linear, aligned, map, to and from clauses.
2147 (c_omp_clause_copy_ctor): New function.
2148
295844f6
MP
21492016-09-01 Marek Polacek <polacek@redhat.com>
2150
2151 PR c/7652
2152 * c-typeck.c (composite_type): Add FALLTHRU comment.
2153
089af25c
DM
21542016-08-31 David Malcolm <dmalcolm@redhat.com>
2155
2156 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
2157 to the insertion fixits for "struct", "union", and "enum".
2158
f9087798
DM
21592016-08-30 David Malcolm <dmalcolm@redhat.com>
2160
2161 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
2162 rather than add_fixit_misspelled_id.
2163 (undeclared_variable): Likewise.
2164 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
2165 now-redundant "here" params from add_fixit_insert method calls.
2166 (c_parser_parameter_declaration): Likewise.
2167 * c-typeck.c (build_component_ref): Remove now-redundant range
2168 param from add_fixit_replace method calls.
2169
ebef225f
MP
21702016-08-25 Marek Polacek <polacek@redhat.com>
2171
2172 * c-typeck.c (parser_build_binary_op): Pass LHS to
2173 warn_logical_not_parentheses.
2174
fe377a48
MP
21752016-08-25 Marek Polacek <polacek@redhat.com>
2176
2177 PR c/77323
2178 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
2179 or _FloatN or _FloatNx is not supported.
2180 (finish_declspecs): Set type to integer_type_node when _FloatN or
2181 _FloatNx is not supported.
2182
c65699ef
JM
21832016-08-19 Joseph Myers <joseph@codesourcery.com>
2184
2185 PR c/32187
2186 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
2187 (struct c_declspecs): Add field floatn_nx_idx.
2188 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
2189 and _FloatNx type specifiers.
2190 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
2191 (c_parser_declspecs, c_parser_attribute_any_word)
2192 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
2193 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
2194 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
2195 narrower than double.
2196
2f1364c2
JJ
21972016-08-12 Jakub Jelinek <jakub@redhat.com>
2198 Martin Liska <mliska@suse.cz>
2199
2200 PR c/67410
2201 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
2202 % to determine val element to change. Assert that
2203 wchar_bytes * charwidth fits into val array.
2204
191816a3
MP
22052016-08-12 Marek Polacek <polacek@redhat.com>
2206
2207 PR c/7652
2208 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
2209 (c_parser_postfix_expression): Likewise.
2210 * c-typeck.c (build_unary_op): Adjust fall through comment.
2211 (c_mark_addressable): Likewise.
2212
b95a64bb
JJ
22132016-08-11 Jakub Jelinek <jakub@redhat.com>
2214
2215 PR c/72816
2216 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
2217 array member through typedef, for orig_qual_indirect == 0 clear
2218 orig_qual_type.
2219
895aa8e1
DM
22202016-08-08 David Malcolm <dmalcolm@redhat.com>
2221
2222 PR c/64955
2223 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
2224 this up to selftest::run_c_tests.
2225 (selftest::run_c_tests): New function.
2226
0b212d8c
TS
22272016-08-04 Thomas Schwinge <thomas@codesourcery.com>
2228
ae9281fc
TS
2229 * c-parser.c (struct oacc_routine_data): Add error_seen and
2230 fndecl_seen members.
2231 (c_finish_oacc_routine): Use these.
2232 (c_parser_declaration_or_fndef): Adjust.
2233 (c_parser_oacc_routine): Likewise. Support more C language
2234 constructs, and improve diagnostics. Move pragma context
2235 checking...
2236 (c_parser_pragma): ... here.
2237
0b212d8c
TS
2238 * c-parser.c (struct oacc_routine_data): New.
2239 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
2240 Simplify code.
2241 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
2242 declare target" attribute.
2243
76e2c821
JB
22442016-08-01 Jan Beulich <jbeulich@suse.com>
2245
2246 * c-fold.c (c_fully_fold_internal): Also emit shift count
2247 warnings for vector types.
2248 * c-typeck.c (build_binary_op): Likewise.
2249
f618a472
MP
22502016-07-29 Marek Polacek <polacek@redhat.com>
2251
2252 PR c/71742
2253 * c-decl.c (finish_struct): Rephrase an error message.
2254
efd0786f
MP
2255 PR c/71853
2256 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
2257 to error node for invalid code.
2258
e00dceaf
MP
2259 PR c/71573
2260 * c-decl.c (implicitly_declare): Return decl early not only for
2261 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
2262
673a107a
JJ
22632016-07-29 Jakub Jelinek <jakub@redhat.com>
2264
2265 PR c/71969
2266 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
2267 on GNU extern inline functions.
2268
a5b5c8b6
MP
22692016-07-29 Marek Polacek <polacek@redhat.com>
2270
2271 PR c/71583
2272 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
2273 check expr.value.
2274
e3fe09c1
UB
22752016-07-22 Uros Bizjak <ubizjak@gmail.com>
2276
2277 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
2278
7c8f7eaa
DM
22792016-07-20 David Malcolm <dmalcolm@redhat.com>
2280
2281 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
2282 spellcheck-tree.h
2283 (best_macro_match): Likewise, converting from a typedef to a
2284 subclass.
2285 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
2286 (lookup_name_fuzzy): Update for change of best_macro_match to a
2287 subclass with a ctor that calls cpp_forall_identifiers.
2288
de6a69ee
DM
22892016-07-20 David Malcolm <dmalcolm@redhat.com>
2290
2291 * c-decl.c (implicit_decl_warning): Update for conversion of
2292 return type of lookup_name_fuzzy to const char *.
2293 (undeclared_variable): Likewise.
2294 (lookup_name_fuzzy): Convert return type from tree to
2295 const char *.
2296 * c-parser.c (c_parser_declaration_or_fndef): Update for
2297 conversion of return type of lookup_name_fuzzy to const char *.
2298 (c_parser_parameter_declaration): Likewise.
2299
b1c9c068
CP
23002016-07-15 Cesar Philippidis <cesar@codesourcery.com>
2301
2302 * c-parser.c (c_parser_oacc_declare): Don't scan for
2303 GOMP_MAP_POINTER.
2304 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
2305 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
2306 zero-length subarrays.
2307
ddbbcb19
JJ
23082016-07-15 Jakub Jelinek <jakub@redhat.com>
2309
2310 PR c/71858
2311 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
2312 instead of FUZZY_LOOKUP_NAME.
2313 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
2314 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
2315
dd36b877
JJ
23162016-07-14 Jakub Jelinek <jakub@redhat.com>
2317
2318 PR c/71858
2319 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
2320
8c681247
TS
23212016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2322
2323 * c-parser.c (c_parser_generic_selection): Make type of variable
2324 auto_vec.
2325 (c_parser_omp_declare_simd): Likewise.
2326
bf4fa671
TS
23272016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2328
2329 * c-decl.c (struct c_struct_parse_info): Change member types
2330 from vec to auto_vec.
2331 (start_struct): Adjust.
2332 (finish_struct): Likewise.
2333
557e8c49
JJ
23342016-07-02 Jakub Jelinek <jakub@redhat.com>
2335
2336 PR c/71719
2337 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
2338
54d19c3b
TS
23392016-06-29 Thomas Schwinge <thomas@codesourcery.com>
2340
2341 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
2342 Move pragma context checking into...
2343 (c_parser_omp_cancellation_point): ... here, and improve
2344 diagnostic messages.
2345 * c-typeck.c (c_finish_omp_cancel)
2346 (c_finish_omp_cancellation_point): Improve diagnostic messages.
2347
152ef731
JJ
23482016-06-29 Jakub Jelinek <jakub@redhat.com>
2349
2350 PR c/71685
2351 * c-typeck.c (c_build_qualified_type): Don't clear
2352 C_TYPE_INCOMPLETE_VARS for the main variant.
2353
23542016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
2355
2356 PR c/71552
2357 * c-typeck.c (output_init_element): Diagnose incompatible types
2358 before non-constant initializers.
2359
e9ac1f86
JJ
23602016-06-28 Jakub Jelinek <jakub@redhat.com>
2361
2362 * Make-lang.in: Don't cat ../stage_current if it does not exist.
2363
277d7ee0
AK
23642016-06-23 Andi Kleen <ak@linux.intel.com>
2365
2366 * Make-lang.in: Add support for autofdo.
2367
1a4f11c8
DM
23682016-06-22 David Malcolm <dmalcolm@redhat.com>
2369
2370 PR c/70339
2371 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
2372 (implicit_decl_warning): When issuing warnings for implicit
2373 declarations, attempt to provide a suggestion via
2374 lookup_name_fuzzy.
2375 (undeclared_variable): Likewise when issuing errors.
2376 (lookup_name_in_scope): Likewise.
2377 (struct edit_distance_traits<cpp_hashnode *>): New struct.
2378 (best_macro_match): New typedef.
2379 (find_closest_macro_cpp_cb): New function.
2380 (lookup_name_fuzzy): New function.
2381 * c-parser.c: Include gcc-rich-location.h.
2382 (c_token_starts_typename): Split out case CPP_KEYWORD into...
2383 (c_keyword_starts_typename): ...this new function.
2384 (c_parser_declaration_or_fndef): When issuing errors about
2385 missing "struct" etc, add a fixit. For other kinds of errors,
2386 attempt to provide a suggestion via lookup_name_fuzzy.
2387 (c_parser_parms_declarator): When looking ahead to detect typos in
2388 type names, also reject CPP_KEYWORD.
2389 (c_parser_parameter_declaration): When issuing errors about
2390 unknown type names, attempt to provide a suggestion via
2391 lookup_name_fuzzy.
2392 * c-tree.h (c_keyword_starts_typename): New prototype.
2393
5a578671
JM
23942016-06-20 Joseph Myers <joseph@codesourcery.com>
2395
2396 PR c/71601
2397 * c-typeck.c (build_conditional_expr): Return error_mark_node if
2398 c_common_type returns error_mark_node.
2399
3f8257db 24002016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
2401
2402 PR c/69507
2403 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
2404 __alignof__ (expression).
2405
6a3f203c
DM
24062016-06-14 David Malcolm <dmalcolm@redhat.com>
2407
2408 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
2409
264757fb
DM
24102016-06-14 David Malcolm <dmalcolm@redhat.com>
2411
2412 * c-typeck.c (build_component_ref): Simplify fixit code by
2413 using gcc_rich_location::add_fixit_misspelled_id.
2414 (set_init_label): Likewise.
2415
f7e4f2e3
DM
24162016-06-13 David Malcolm <dmalcolm@redhat.com>
2417
2418 * c-parser.c (c_parser_initelt): Provide location of name for new
2419 location_t param of set_init_label.
2420 * c-tree.h (set_init_label): Add location_t param.
2421 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
2422 param and use it when issuing error messages about unrecognized
2423 field names. Attempt to provide a fixit hint if appropriate,
2424 otherwise update the error message to provide the type name.
2425
4b1ffdb1
TS
24262016-06-10 Thomas Schwinge <thomas@codesourcery.com>
2427
2428 PR c/71381
2429 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
2430 Loosen checking.
2431
44a845ca
MS
24322016-06-08 Martin Sebor <msebor@redhat.com>
2433 Jakub Jelinek <jakub@redhat.com>
2434
2435 PR c++/70507
2436 PR c/68120
2437 * c-typeck.c (convert_arguments): Don't promote last argument
2438 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2439
92a5f2ba
MP
24402016-06-08 Marek Polacek <polacek@redhat.com>
2441
2442 PR c/71418
2443 * c-decl.c (grokdeclarator): Check TYPE_P.
2444
08203f73
MP
2445 PR c/71426
2446 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
2447 code.
2448
6ffd47b7
DM
24492016-06-07 David Malcolm <dmalcolm@redhat.com>
2450
2451 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
2452 and structure element reference, capture the location of the
2453 element name token and pass it to build_component_ref.
2454 (c_parser_postfix_expression_after_primary): Likewise for
2455 structure element dereference.
2456 (c_parser_omp_variable_list): Likewise for
2457 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
2458 * c-tree.h (build_component_ref): Add location_t param.
2459 * c-typeck.c (build_component_ref): Add location_t param
2460 COMPONENT_LOC. Use it, if available, when issuing hints about
2461 mispelled member names to provide a fixit replacement hint.
2462
1f40cff3
MP
24632016-06-06 Marek Polacek <polacek@redhat.com>
2464
2465 PR c/71362
2466 * c-parser.c (c_parser_direct_declarator): Set location.
2467
5545a907
MP
24682016-06-06 Marek Polacek <polacek@redhat.com>
2469
2470 * c-typeck.c (comptypes_internal): Handle comparisons of
2471 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
2472 TYPE_REF_CAN_ALIAS_ALL.
2473
b605f663
CLT
24742016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
2475
2476 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
2477 arguments as addressable when async clause exists.
2478
00631022
JJ
24792016-05-30 Jakub Jelinek <jakub@redhat.com>
2480
2481 PR c++/71349
2482 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
2483 when combined with target construct.
2484
7211a097
JJ
24852016-05-26 Jakub Jelinek <jakub@redhat.com>
2486
2487 * c-parser.c (c_parser_omp_clause_schedule): Warn if
2488 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
2489
95efe6b6
MP
24902016-05-25 Marek Polacek <polacek@redhat.com>
2491
2492 PR c/71265
2493 * c-decl.c (c_make_fname_decl): Don't check seen_error.
2494
a23faf7a
MP
2495 PR c/71266
2496 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
2497
e46c7770
CP
24982016-05-24 Cesar Philippidis <cesar@codesourcery.com>
2499
2500 * c-parser.c (c_parser_oacc_declare): Add support for
2501 GOMP_MAP_FIRSTPRIVATE_POINTER.
2502 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
2503 argument with enum c_omp_region_type ort.
2504 (handle_omp_array_sections): Likewise. Update call to
2505 handle_omp_array_sections_1.
2506 (c_finish_omp_clauses): Add specific errors and warning messages for
2507 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
2508 call to handle_omp_array_sections.
2509
a04e69c0
TS
25102016-05-24 Thomas Schwinge <thomas@codesourcery.com>
2511
2512 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
2513
f17a223d
RB
25142016-05-24 Richard Biener <rguenther@suse.de>
2515
2516 PR middle-end/70434
2517 PR c/69504
2518 * c-typeck.c (build_array_ref): Do not complain about indexing
2519 non-lvalue vectors. Adjust for function name change.
2520
79063edd
MS
25212016-05-20 Martin Sebor <msebor@redhat.com>
2522
2523 PR c/71115
2524 * c-typeck.c (error_init): Use
2525 expansion_point_location_if_in_system_header.
2526 (warning_init): Same.
2527
8a40fef3
DM
25282016-05-19 David Malcolm <dmalcolm@redhat.com>
2529
2530 PR c/71171
2531 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
2532 in error-handling.
2533 (c_parser_postfix_expression): Likewise.
2534 * c-tree.h (c_expr::set_error): New method.
2535 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
2536 that result's range is initialized.
2537
e9892350
JG
25382016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
2539
2540 * c-typeck.c (parser_build_unary_op): Fix formatting.
2541
8fad45f5
MW
25422016-05-16 Matthew Wahab <matthew.wahab@arm.com>
2543
2544 * c-decl.c (grokdeclarator): Remove errmsg and use of
2545 targetm.invalid_return_type.
2546 (grokparms): Remove errmsg and use of
2547 targetm.invalid_parameter_type.
2548
aa4b467b
JM
25492016-05-13 Joseph Myers <joseph@codesourcery.com>
2550
2551 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2552 function return type.
2553
4f2e1536
MP
25542016-05-12 Marek Polacek <polacek@redhat.com>
2555
2556 PR c/70756
2557 * c-decl.c (build_compound_literal): Pass LOC down to
2558 c_incomplete_type_error.
2559 * c-tree.h (require_complete_type): Adjust declaration.
2560 (c_incomplete_type_error): Likewise.
2561 * c-typeck.c (require_complete_type): Add location parameter, pass it
2562 down to c_incomplete_type_error.
2563 (c_incomplete_type_error): Add location parameter, pass it down to
2564 error_at.
2565 (build_component_ref): Pass location down to c_incomplete_type_error.
2566 (default_conversion): Pass location down to require_complete_type.
2567 (build_array_ref): Likewise.
2568 (build_function_call_vec): Likewise.
2569 (convert_arguments): Likewise.
2570 (build_unary_op): Likewise.
2571 (build_c_cast): Likewise.
2572 (build_modify_expr): Likewise.
2573 (convert_for_assignment): Likewise.
2574 (c_finish_omp_clauses): Likewise.
2575
d6e83a8d
MM
25762016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2577
2578 PR c/43651
2579 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
2580 is enabled.
2581 * c-errors.c (pedwarn_c90): Return true if warned.
2582 * c-tree.h (pedwarn_c90): Change return type to bool.
2583 (enum c_declspec_word): Add new enumerator cdw_atomic.
2584
5c3a10fb
MP
25852016-05-11 Marek Polacek <polacek@redhat.com>
2586
2587 PR c++/71024
2588 * c-decl.c (diagnose_mismatched_decls): Factor out code to
2589 diagnose_mismatched_attributes and call it.
2590
cf68d92c
MP
25912016-05-10 Marek Polacek <polacek@redhat.com>
2592
2593 PR c/70255
2594 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2595 on a declaration following the definition.
2596
351f85c5
JJ
25972016-05-05 Jakub Jelinek <jakub@redhat.com>
2598
2599 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2600 parse it through to c_parser_c99_block_statement.
2601 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2602 caller.
2603
deef7113
MP
26042016-05-04 Marek Polacek <polacek@redhat.com>
2605
2606 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2607 OPT_Wdangling_else.
2608
de55efd5
MP
26092016-05-04 Marek Polacek <polacek@redhat.com>
2610
2611 PR c/48778
2612 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2613 for macro expansions.
2614
79ce98bc
MP
26152016-05-03 Marek Polacek <polacek@redhat.com>
2616
2617 PR c/70859
2618 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
2619 check_builtin_function_arguments.
2620
fb2647aa
RB
26212016-05-03 Richard Biener <rguenther@suse.de>
2622
2623 * Make-lang.in (cc1-checksum.c): For stage-final re-use
2624 the checksum from the previous stage.
2625
77886428
CP
26262016-05-02 Cesar Philippidis <cesar@codesourcery.com>
2627
2628 * c-parser.c (c_parser_oacc_all_clauses): Update call to
2629 c_finish_omp_clauses.
2630 (c_parser_omp_all_clauses): Likewise.
2631 (c_parser_oacc_cache): Likewise.
2632 (c_parser_oacc_loop): Likewise.
2633 (omp_split_clauses): Likewise.
2634 (c_parser_omp_declare_target): Likewise.
2635 (c_parser_cilk_all_clauses): Likewise.
2636 (c_parser_cilk_for): Likewise.
2637 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
2638 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2639
7176a4a0
MP
26402016-05-02 Marek Polacek <polacek@redhat.com>
2641
2642 PR c/70851
2643 * c-decl.c (grokdeclarator): Diagnose when array's size has an
2644 incomplete type.
2645
e7ff0319
CP
26462016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2647
2648 PR middle-end/70626
2649 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
2650 OACC_LOOP_CLAUSE_MASK.
2651 (c_parser_oacc_kernels_parallel): Update call to
2652 c_oacc_split_loop_clauses.
2653
9f405ce1
AM
26542016-04-28 Andrew MacLeod <amacleod@redhat.com>
2655
2656 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
2657 argument to build_modify_expr in two cases.
2658
c1e1f433
BS
26592016-04-27 Bernd Schmidt <bschmidt@redhat.com>
2660
2661 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2662 warn_for_memset instead of warning directly here.
2663
2448a956
MP
26642016-04-26 Marek Polacek <polacek@redhat.com>
2665
2666 PR c/67784
2667 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2668 out of ...
2669 (c_parser_for_statement): ... here.
2670 (c_parser_if_statement): Use it.
2671 (c_parser_switch_statement): Use it.
2672 (c_parser_while_statement): Use it.
2673
b02a5e26
MP
2674 PR c/70791
2675 * c-decl.c (pushdecl): Pass LOCUS down to warning.
2676
477d4906
IV
26772016-04-20 Ilya Verbin <ilya.verbin@intel.com>
2678
2679 PR c++/69363
2680 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2681 instead of c_finish_cilk_clauses.
2682 * c-tree.h (c_finish_omp_clauses): Add new default argument.
2683 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
2684 floating-point variables in the linear clause for Cilk Plus.
2685
fe37c7af
MM
26862016-04-18 Michael Matz <matz@suse.de>
2687
2688 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2689 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2690
949505a9
MP
26912016-04-15 Marek Polacek <polacek@redhat.com>
2692
2693 PR c/70671
2694 * c-typeck.c (build_unary_op): Pass location down to error and
2695 warning call.
2696
dda1bf61
JJ
26972016-04-15 Jakub Jelinek <jakub@redhat.com>
2698
2699 PR c/70436
2700 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2701 where needed.
2702 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2703 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2704 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2705 Adjust c_parser_pragma callers.
2706 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
2707 caller.
2708 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2709 c_parser_statement.
2710 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2711 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2712 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2713 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2714 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2715 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2716 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2717 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2718 down where needed.
2719 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
2720 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2721 calls.
2722
99cd9857
MP
27232016-04-13 Marek Polacek <polacek@redhat.com>
2724
2725 PR c/70436
2726 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2727 adjust callers.
2728 (c_parser_statement): Likewise.
2729 (c_parser_c99_block_statement): Likewise.
2730 (c_parser_while_statement): Likewise.
2731 (c_parser_for_statement): Likewise.
2732 (c_parser_if_body): Don't set IF_P here.
2733 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
2734 about dangling else here.
2735 * c-tree.h (c_finish_if_stmt): Adjust declaration.
2736 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
2737 warn about dangling else here.
2738
f13355da
MP
27392016-04-04 Marek Polacek <polacek@redhat.com>
2740
2741 PR c/70307
2742 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2743
5fde6a45
MP
27442016-03-31 Marek Polacek <polacek@redhat.com>
2745
2746 PR c/70297
2747 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2748
4bbf545b
DM
27492016-03-18 David Malcolm <dmalcolm@redhat.com>
2750
2751 PR c/70281
2752 * c-parser.c (c_parser_postfix_expression): Set the source range
2753 for uses of "__builtin_types_compatible_p".
2754
fcc2b74f
JJ
27552016-03-17 Jakub Jelinek <jakub@redhat.com>
2756
2757 PR c/70280
2758 * c-typeck.c (composite_type): Don't count void_list_node
2759 into len, if the list is terminated by void_list_node, start
2760 with void_list_node instead of NULL for newargs. Stop
2761 at void_list_node.
2762
ab4c578f
MP
27632016-03-16 Marek Polacek <polacek@redhat.com>
2764
2765 PR c/70093
2766 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2767 nested functions returning VM types.
2768
96b3c82d
CP
27692016-03-09 Cesar Philippidis <cesar@codesourcery.com>
2770
2771 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2772 when calling c_finish_omp_clauses.
2773
29b9828f
BS
27742016-03-04 Bernd Schmidt <bschmidt@redhat.com>
2775
2776 PR c/69824
2777 * c-decl.c (get_parm_info): Don't queue implicit function declarations
2778 for later.
2779
7ff6ca38
MP
27802016-03-04 Marek Polacek <polacek@redhat.com>
2781
2782 PR c/69798
2783 * c-parser.c (c_parser_postfix_expression): Call
2784 c_parser_cast_expression rather than c_parser_postfix_expression.
2785
686e2237
JJ
27862016-03-01 Jakub Jelinek <jakub@redhat.com>
2787
2788 PR c/69796
2789 PR c/69974
2790 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2791 of incomplete decls to error_mark_node.
2792
0b05329b
MP
27932016-02-24 Marek Polacek <polacek@redhat.com>
2794
2795 PR c/69819
2796 * c-decl.c (finish_decl): Don't update the copy of the type of a
2797 different decl type.
2798
067fbd8b
JJ
27992016-02-23 Jakub Jelinek <jakub@redhat.com>
2800
2801 PR objc/69844
2802 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2803 in id_kind reclassification.
2804
bf14eba2
JJ
28052016-02-16 Jakub Jelinek <jakub@redhat.com>
2806
2807 PR c/69835
2808 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2809
ba539195
JN
28102016-02-16 James Norris <jnorris@codesourcery.com>
2811
2812 PR c/64748
2813 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2814
16595a1f
BS
28152016-02-12 Bernd Schmidt <bschmidt@redhat.com>
2816
f48dfe98
BS
2817 * c-decl.c (build_null_declspecs): Zero the entire struct.
2818
16595a1f
BS
2819 PR c/69522
2820 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
2821 callers changed. If nested_p is true, use it to call
2822 finish_implicit_inits.
2823 * c-tree.h (finish_implicit_inits): Declare.
2824 * c-typeck.c (finish_implicit_inits): New function. Move code
2825 from ...
2826 (push_init_level): ... here.
2827 (set_designator, process_init_element): Call finish_implicit_inits.
2828
66756373
JJ
28292016-02-11 Jakub Jelinek <jakub@redhat.com>
2830
2831 PR c/69768
2832 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
2833 arguments for -Waddress warning.
2834
1066e9b5
JJ
28352016-02-04 Jakub Jelinek <jakub@redhat.com>
2836
2837 PR c/69669
2838 * c-decl.c (finish_enum): When honoring mode attribute,
2839 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2840
3a5d2ba4
JJ
28412016-01-29 Jakub Jelinek <jakub@redhat.com>
2842
2843 PR debug/69518
2844 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2845 all type variants, not just TYPE_MAIN_VARIANT.
2846
cbdd8ae0
JJ
28472016-01-27 Jakub Jelinek <jakub@redhat.com>
2848
2849 PR debug/66869
2850 * c-decl.c (c_write_global_declarations_1): Warn with
2851 warn_unused_function if static prototype without definition
2852 is not C_DECL_USED.
2853
fa74a4bc
MP
28542016-01-27 Marek Polacek <polacek@redhat.com>
2855
2856 PR c/68062
2857 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2858 to unsigned, if needed. Add -Wsign-compare warning.
2859
13f92e8d
JJ
28602016-01-26 Jakub Jelinek <jakub@redhat.com>
2861
2862 PR tree-optimization/69483
2863 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2864
cd8e73dc 28652016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
2866
2867 PR c/24293
2868 * c-tree.h (incomplete_record_decls): Declare.
2869 * c-parser.c (incomplete_record_decls): Define.
2870 (c_parser_translation_unit): Iterate through incomplete_record_decls and
2871 report error if any decl has zero size.
2872 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
2873 or enum type to incomplete_record_decls.
2874
e6d6ec9e
TV
28752016-01-14 Tom de Vries <tom@codesourcery.com>
2876
2877 PR tree-optimization/68773
2878 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
2879 set force_output.
2880
00083992
MP
28812016-01-14 Marek Polacek <polacek@redhat.com>
2882
2883 PR c/69262
2884 * c-decl.c (grokdeclarator): Provide more information for invalid
2885 array declarations.
2886
7443cf13
DM
28872016-01-06 David Malcolm <dmalcolm@redhat.com>
2888
2889 * c-parser.c (c_parser_unary_expression): For dereferences, build
2890 a combined location before calling build_indirect_ref, so that
2891 error reports cover the full range, manually updating the c_expr
2892 src_range.
2893
6b131d5b
MP
28942016-01-06 Marek Polacek <polacek@redhat.com>
2895
2896 PR sanitizer/69099
2897 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
2898 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
2899 NULL.
2900
818ab71a
JJ
29012016-01-04 Jakub Jelinek <jakub@redhat.com>
2902
2903 Update copyright years.
2904
2fe0a208
MP
29052016-01-04 Marek Polacek <polacek@redhat.com>
2906
2907 PR c/68908
2908 * c-typeck.c (build_atomic_assign): Improve commentary. Add
2909 optimization to use __atomic_fetch_* built-in if possible.
2910
c7b48c8a
TS
29112015-12-23 Thomas Schwinge <thomas@codesourcery.com>
2912
2913 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
2914 into...
2915 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
2916 all users.
2917
fda5652f
MP
29182015-12-22 Marek Polacek <polacek@redhat.com>
2919
2920 PR c/69002
2921 * c-typeck.c (build_component_ref): Warn when acessing elements of
2922 atomic structures or unions.
2923
745e411d
DM
29242015-12-21 David Malcolm <dmalcolm@redhat.com>
2925
2926 * c-typeck.c: Include "gcc-rich-location.h".
2927 (build_binary_op): In the two places that call binary_op_error,
2928 create a gcc_rich_location and populate it with the location of
2929 the binary op and its two operands.
2930
94c40e19
DM
29312015-12-16 David Malcolm <dmalcolm@redhat.com>
2932
2933 * c-parser.c (c_parser_statement_after_labels): When calling
2934 c_finish_return, Use the return expression's location if it has
2935 one, falling back to the location of the first token within it.
2936 * c-typeck.c (c_finish_return): When issuing warnings about
2937 the incorrect presence/absence of a return value, issue a note
2938 showing the declaration of the function.
2939
de67c4c3
DM
29402015-12-16 David Malcolm <dmalcolm@redhat.com>
2941
2942 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
2943 to 4.
2944 (c_parser_peek_nth_token): New function.
2945 (c_parser_peek_conflict_marker): New function.
2946 (c_parser_error): Detect conflict markers and report them as such.
2947
a10704e1
DM
29482015-12-16 David Malcolm <dmalcolm@redhat.com>
2949
2950 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
2951 to preserve range information for the primary expression
2952 in the call to c_parser_postfix_expression_after_primary.
2953
8062bca6
DM
29542015-12-16 David Malcolm <dmalcolm@redhat.com>
2955
2956 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
2957 expression location, falling back on the first token location,
2958 rather than always using the latter.
2959
d06f8b75
MP
29602015-12-16 Marek Polacek <polacek@redhat.com>
2961
2962 PR c/64637
2963 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
2964 available.
2965
2994fb91
MP
29662015-12-15 Marek Polacek <polacek@redhat.com>
2967
2968 PR c/68907
2969 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
2970 artificial decl.
2971
a1b93f8d
DM
29722015-12-08 David Malcolm <dmalcolm@redhat.com>
2973
2974 * c-parser.c (c_parser_alignof_expression): Capture location of
2975 closing parenthesis (if any), or of end of unary expression, and
2976 use it to build a src_range for the expression.
2977
46c6e1e2
DM
29782015-12-08 David Malcolm <dmalcolm@redhat.com>
2979
2980 PR c/68757
2981 * c-parser.c (c_parser_get_builtin_args): Add
2982 "out_close_paren_loc" param, and write back to it.
2983 (c_parser_postfix_expression): Capture the closing
2984 parenthesis location for RID_CHOOSE_EXPR,
2985 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
2986 RID_BUILTIN_SHUFFLE and use it to set the source range
2987 for such expressions; within RID_BUILTIN_COMPLEX set
2988 the underlying location.
2989
66189108
MP
29902015-12-07 Marek Polacek <polacek@redhat.com>
2991
2992 PR c/68668
2993 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
2994 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
2995
f187980b
EB
29962015-12-04 Eric Botcazou <ebotcazou@adacore.com>
2997
2998 * c-tree.h (c_build_va_arg): Adjust prototype.
2999 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
3000 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
3001 parameter, adjust throughout and issue an error if EXPR is a component
3002 with reverse storage order.
3003
4250754e
JM
30042015-12-02 Jason Merrill <jason@redhat.com>
3005
3006 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
3007 (c_fully_fold_internal, decl_constant_value_for_optimization):
3008 Move from c-common.c.
3009 * c-tree.h: Declare decl_constant_value_for_optimization.
3010 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
3011
e9e32ee6
JM
30122015-12-02 Joseph Myers <joseph@codesourcery.com>
3013
3014 PR c/68162
3015 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
3016 following link from declarator to next declarator. Track original
3017 qualified type and pass it to c_build_qualified_type.
3018 * c-typeck.c (c_build_qualified_type): Add arguments
3019 orig_qual_type and orig_qual_indirect.
3020
ff7a55bf
TS
30212015-12-02 Thomas Schwinge <thomas@codesourcery.com>
3022
3023 * c-parser.c (c_parser_omp_clause_name)
3024 (c_parser_oacc_all_clauses): Alphabetical sorting.
3025
657e4e47
JJ
30262015-12-02 Jakub Jelinek <jakub@redhat.com>
3027
3028 PR c/68533
3029 * c-decl.c (get_parm_info): Use b->locus instead of input_location
3030 for diagnostics.
3031
37d5ad46
JB
30322015-12-01 Julian Brown <julian@codesourcery.com>
3033 Cesar Philippidis <cesar@codesourcery.com>
3034 James Norris <James_Norris@mentor.com>
3035
3036 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
3037 (c_parser_oacc_clause_use_device): New function.
3038 (c_parser_oacc_all_clauses): Add use_device support.
3039 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
3040 (c_parser_oacc_host_data): New function.
3041 (c_parser_omp_construct): Add host_data support.
3042 * c-tree.h (c_finish_oacc_host_data): Add prototype.
3043 * c-typeck.c (c_finish_oacc_host_data): New function.
3044 (c_finish_omp_clauses): Add use_device support.
3045
a4850ce9
JH
30462015-11-29 Jan Hubicka <hubicka@ucw.cz>
3047
3048 PR c/67106
3049 * c-decl.c: Set TYPE_PACKED in variants.
3050
b58d3df2
ML
30512015-11-27 Martin Liska <mliska@suse.cz>
3052
3053 PR c++/68312
3054 * c-array-notation.c (fix_builtin_array_notation_fn):
3055 Use release_vec_vec instead of vec::release.
3056 (build_array_notation_expr): Likewise.
3057 (fix_conditional_array_notations_1): Likewise.
3058 (fix_array_notation_expr): Likewise.
3059 (fix_array_notation_call_expr): Likewise.
3060
aec17bfe
JJ
30612015-11-27 Jakub Jelinek <jakub@redhat.com>
3062
3063 PR c/63326
3064 * c-parser.c (c_parser_compound_statement_nostart): If
3065 last_label is true, use pragma_stmt instead of pragma_compound
3066 as second c_parser_pragma argument.
3067 (c_parser_omp_ordered, c_parser_omp_target_update,
3068 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
3069 false as second argument to c_parser_skip_to_pragma_eol after
3070 diagnosing standalone directives used in pragma_stmt context.
3071
688c4de0
IV
30722015-11-24 Ilya Verbin <ilya.verbin@intel.com>
3073
3074 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
3075 with "if (ENABLE_OFFLOADING)".
3076
cbd03aee
DM
30772015-11-23 David Malcolm <dmalcolm@redhat.com>
3078
3079 PR objc/68438
3080 * c-parser.c (c_parser_postfix_expression): Set up source ranges
3081 for various Objective-C constructs: Class.name syntax,
3082 @selector(), @protocol(), @encode(), and [] message syntax.
3083
a87a86e1
DM
30842015-11-20 David Malcolm <dmalcolm@redhat.com>
3085
3086 PR 62314
3087 * c-typeck.c (should_suggest_deref_p): New function.
3088 (build_component_ref): Special-case POINTER_TYPE when
3089 generating a "not a structure of union" error message, and
3090 suggest a "->" rather than a ".", providing a fix-it hint.
3091
8ece8dfb
DM
30922015-11-19 David Malcolm <dmalcolm@redhat.com>
3093
3094 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
3095 candidate into a new function, find_closest_identifier.
3096
433068cc
MP
30972015-11-19 Marek Polacek <polacek@redhat.com>
3098
3099 PR c/68412
3100 * c-typeck.c (parser_build_binary_op): Properly handle
3101 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
3102
bef08b71
DM
31032015-11-17 David Malcolm <dmalcolm@redhat.com>
3104
3105 * c-parser.c (set_c_expr_source_range): Bulletproof both
3106 overloaded implementations against NULL expr->value.
3107 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
3108 values.
3109 (c_parser_unary_expression): Likewise when handling addresses of
3110 labels.
3111 (c_parser_postfix_expression): Likewise for statement expressions,
3112 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
3113 __builtin_va_arg, and for __builtin_offset_of.
3114 (c_parser_postfix_expression_after_paren_type): Initialize expr's
3115 src_range using the range of the braced initializer.
3116 (c_parser_transaction_expression): Set src_range for "ret" to a
3117 sane pair of values.
3118
fff77217
KY
31192015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
3120
3121 * c-parser.c (c_finish_omp_declare_simd): Look for
3122 "simd" attribute as well. Update error message.
3123
1d899da2
TS
31242015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3125
3126 * c-parser.c (c_parser_omp_declare_target): Adjust.
3127
e4606348
JJ
31282015-11-14 Jakub Jelinek <jakub@redhat.com>
3129
3130 * c-typeck.c (c_finish_omp_clauses): Don't mark
3131 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
3132
3e636daf
MP
31332015-11-14 Marek Polacek <polacek@redhat.com>
3134
3135 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
3136 * c-typeck.c: Likewise.
3137
ebedc9a3
DM
31382015-11-13 David Malcolm <dmalcolm@redhat.com>
3139
3140 * c-decl.c (warn_defaults_to): Pass line_table to
3141 rich_location ctor.
3142 * c-errors.c (pedwarn_c99): Likewise.
3143 (pedwarn_c90): Likewise.
3144 * c-parser.c (set_c_expr_source_range): New functions.
3145 (c_token::get_range): New method.
3146 (c_token::get_finish): New method.
3147 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
3148 based on the range from the start of the LHS to the end of the
3149 RHS.
3150 (c_parser_conditional_expression): Likewise, based on the range
3151 from the start of the cond.value to the end of exp2.value.
3152 (c_parser_binary_expression): Call set_c_expr_source_range on
3153 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
3154 (c_parser_cast_expression): Call set_c_expr_source_range on ret
3155 based on the cast_loc through to the end of the expr.
3156 (c_parser_unary_expression): Likewise, based on the
3157 op_loc through to the end of op.
3158 (c_parser_sizeof_expression) Likewise, based on the start of the
3159 sizeof token through to either the closing paren or the end of
3160 expr.
3161 (c_parser_postfix_expression): Likewise, using the token range,
3162 or from the open paren through to the close paren for
3163 parenthesized expressions.
3164 (c_parser_postfix_expression_after_primary): Likewise, for
3165 various kinds of expression.
3166 * c-tree.h (struct c_expr): Add field "src_range".
3167 (c_expr::get_start): New method.
3168 (c_expr::get_finish): New method.
3169 (set_c_expr_source_range): New decls.
3170 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
3171 on ret for prefix unary ops.
3172 (parser_build_binary_op): Likewise, running from the start of
3173 arg1.value through to the end of arg2.value.
3174
ec8b536f
MP
31752015-11-13 Marek Polacek <polacek@redhat.com>
3176
3177 PR c/68320
3178 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
3179
277fe616
DM
31802015-11-13 David Malcolm <dmalcolm@redhat.com>
3181
3182 * c-typeck.c: Include spellcheck.h.
3183 (lookup_field_fuzzy_find_candidates): New function.
3184 (lookup_field_fuzzy): New function.
3185 (build_component_ref): If the field was not found, try using
3186 lookup_field_fuzzy and potentially offer a suggestion.
3187
6e232ba4
JN
31882015-11-12 James Norris <jnorris@codesourcery.com>
3189 Joseph Myers <joseph@codesourcery.com>
3190
3191 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
3192 (c_parser_omp_clause_name): Handle 'device_resident' clause.
3193 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3194 and PRAGMA_OMP_CLAUSE_LINK.
3195 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3196 and PRAGMA_OACC_CLAUSE_LINK.
3197 (OACC_DECLARE_CLAUSE_MASK): New definition.
3198 (c_parser_oacc_declare): New function.
3199
9be4f715
MP
32002015-11-12 Marek Polacek <polacek@redhat.com>
3201
3202 PR c/67784
3203 * c-parser.c (c_parser_for_statement): Reclassify the token in
3204 a correct scope.
3205
e78bede6
MP
32062015-11-11 Marek Polacek <polacek@redhat.com>
3207
3208 PR c/68107
3209 PR c++/68266
3210 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
3211 checking the size of an array.
3212
69f293c9
AM
32132015-11-11 Andrew MacLeod <amacleod@redhat.com>
3214
3215 * c-array-notation.c: Remove unused header files.
3216 * c-aux-info.c: Likewise.
3217 * c-convert.c: Likewise.
3218 * c-decl.c: Likewise.
3219 * c-errors.c: Likewise.
3220 * c-lang.c: Likewise.
3221 * c-objc-common.c: Likewise.
3222 * c-parser.c: Likewise.
3223 * c-typeck.c: Likewise.
3224 * gccspec.c: Likewise.
3225
3a40d81d
NS
32262015-11-09 Thomas Schwinge <thomas@codesourcery.com>
3227 Cesar Philippidis <cesar@codesourcery.com>
3228 James Norris <jnorris@codesourcery.com>
3229 Julian Brown <julian@codesourcery.com>
3230 Nathan Sidwell <nathan@codesourcery.com>
3231
3232 c/
3233 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
3234 routine arg.
3235 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
3236 (c_parser_pragma): Parse 'acc routine'.
3237 (OACC_ROUTINE_CLAUSE_MARK): Define.
3238 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
3239
fc402eec
AA
32402015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3241
3242 PR debug/67192
3243 * c-typeck.c (c_finish_loop): For unconditional loops, set the
3244 location of the backward-goto to the start of the loop body.
3245
f6b0b3db
AA
32462015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3247
3248 PR debug/67192
3249 * c-parser.c (c_parser_while_statement): Finish the loop before
3250 parsing ahead for misleading indentation.
3251 (c_parser_for_statement): Likewise.
3252
ee45a32d
EB
32532015-11-08 Eric Botcazou <ebotcazou@adacore.com>
3254
3255 * c-decl.c (finish_struct): If the structure has reverse storage
3256 order, rewrite the type of array fields with scalar component. Call
3257 maybe_apply_pragma_scalar_storage_order on entry.
3258 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
3259 errors on bit-fields and reverse SSO here and not...
3260 (c_mark_addressable): ...here.
3261 (output_init_element): Adjust call to initializer_constant_valid_p.
3262 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
3263
8a645150
DM
32642015-11-06 David Malcolm <dmalcolm@redhat.com>
3265
3266 * c-decl.c (warn_defaults_to): Update for change in signature
3267 of diagnostic_set_info.
3268 * c-errors.c (pedwarn_c99): Likewise.
3269 (pedwarn_c90): Likewise.
3270 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
3271 for textinfo::set_location.
3272
7a5e4956
CP
32732015-11-05 Cesar Philippidis <cesar@codesourcery.com>
3274 Thomas Schwinge <thomas@codesourcery.com>
3275 James Norris <jnorris@codesourcery.com>
3276
3277 * c-parser.c (c_parser_omp_clause_name): Add support for
3278 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
3279 (c_parser_omp_clause_default): Add is_oacc argument. Handle
3280 default(none) in OpenACC.
3281 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
3282 arguments.
3283 (c_parser_oacc_clause_tile): New function.
3284 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
3285 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
3286 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
3287 TILE}.
3288 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
3289 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
3290 FIRSTPRIVATE}.
3291 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
3292 (c_parser_oacc_update): Update the error message for missing clauses.
3293 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
3294 and OMP_CLAUSE_INDEPENDENT.
3295
bfcfbfa0
MP
32962015-11-05 Marek Polacek <polacek@redhat.com>
3297
3298 PR c/68090
3299 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
3300 deal with pre-evaluation on invalid types.
3301
e01d41e5
JJ
33022015-11-05 Jakub Jelinek <jakub@redhat.com>
3303 Ilya Verbin <ilya.verbin@intel.com>
3304
3305 * c-parser.c: Include context.h and gimple-expr.h.
3306 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
3307 monotonic together with nonmonotonic.
3308 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
3309 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
3310 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
3311 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
3312 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
3313 expressions on combined target teams before the target.
3314 (c_parser_omp_declare_target): If decl has "omp declare target" or
3315 "omp declare target link" attribute, and cgraph or varpool node already
3316 exists, then set corresponding flags. Call c_finish_omp_clauses
3317 in the parenthesized extended-list syntax case.
3318 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
3319 declare target.
3320 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
3321 on OMP_CLAUSE_REDUCTION array sections.
3322 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
3323 into the constant offset, or for variable low-bound using
3324 POINTER_PLUS_EXPR. For structure element based array sections use
3325 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
3326 (c_finish_omp_clauses): Drop generic_field_head, structure
3327 elements are now always mapped even as array section bases,
3328 diagnose same var in data sharing and mapping clauses. Diagnose if
3329 linear step on declare simd is neither a constant nor a uniform
3330 parameter. Look through POINTER_PLUS_EXPR for array section
3331 reductions. Diagnose the same var or function appearing multiple
3332 times on the same directive. Fix up wording for the to clause if t
3333 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
3334 modifier on kinds other than dynamic or guided or nonmonotonic
3335 modifier together with ordered clause.
3336
4bf9e5a8
TS
33372015-11-03 Thomas Schwinge <thomas@codesourcery.com>
3338 Chung-Lin Tang <cltang@codesourcery.com>
3339
3340 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
3341
2adfab87
AM
33422015-10-29 Andrew MacLeod <amacleod@redhat.com>
3343
3344 * c-array-notation.c: Reorder #include's and remove duplicates.
3345 * c-aux-info.c: Likewise.
3346 * c-convert.c: Likewise.
3347 * c-decl.c: Likewise.
3348 * c-errors.c: Likewise.
3349 * c-lang.c: Likewise.
3350 * c-objc-common.c: Likewise.
3351 * c-parser.c: Likewise.
3352 * c-typeck.c: Likewise.
3353
e922069e
JW
33542015-10-26 Jim Wilson <jim.wilson@linaro.org>
3355
3356 PR debug/66068
3357 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
3358 after calling build_qualified_type.
3359
765dd391
CP
33602015-10-27 Cesar Philippidis <cesar@codesourcery.com>
3361 Thomas Schwinge <thomas@codesourcery.com>
3362 James Norris <jnorris@codesourcery.com>
3363 Joseph Myers <joseph@codesourcery.com>
3364 Julian Brown <julian@codesourcery.com>
3365 Bernd Schmidt <bschmidt@redhat.com>
3366
3367 * c-parser.c (c_parser_oacc_shape_clause): New.
3368 (c_parser_oacc_simple_clause): New.
3369 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
3370 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
3371
88bae6f4
TS
33722015-10-27 Thomas Schwinge <thomas@codesourcery.com>
3373 James Norris <jnorris@codesourcery.com>
3374 Cesar Philippidis <cesar@codesourcery.com>
3375
3376 PR c/64765
3377 PR c/64880
3378 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
3379 parameters, and handle these. Adjust all users.
3380 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
3381 into...
3382 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
3383 all users.
3384 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
3385 declare functions.
3386 (c_finish_omp_construct): Declare function.
3387 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
3388 Merge functions into...
3389 (c_finish_omp_construct): ... this new function.
3390
a8fc2579
RB
33912015-10-22 Richard Biener <rguenther@suse.de>
3392
3393 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
3394 before folding a MINUS_EXPR.
3395
e9122ef6
MP
33962015-10-21 Marek Polacek <polacek@redhat.com>
3397
3398 PR c/68024
3399 * c-decl.c (start_function): Warn about vararg functions without
3400 a prototype.
3401
9f47c7e5
IE
34022015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
3403
3404 * c-typeck.c (build_conditional_expr): Use boolean vector
3405 type for vector comparison.
3406 (build_vec_cmp): New.
3407 (build_binary_op): Use build_vec_cmp for comparison.
3408
fa60eeb9
MP
34092015-10-20 Marek Polacek <polacek@redhat.com>
3410
3411 * c-parser.c (is_cilkplus_vector_p): Don't define here.
3412
2c7020eb
MP
34132015-10-20 Marek Polacek <polacek@redhat.com>
3414
3415 PR c/67964
3416 * c-parser.c (c_parser_attributes): Break out of the loop if the
3417 token after an attribute isn't a comma.
3418
d9a6bd32
JJ
34192015-10-13 Jakub Jelinek <jakub@redhat.com>
3420 Aldy Hernandez <aldyh@redhat.com>
3421
3422 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
3423 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
3424 (c_parser_omp_variable_list): Handle structure elements for
3425 map, to and from clauses. Handle array sections in reduction
3426 clause. Formatting fixes.
3427 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
3428 if clause modifiers.
3429 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3430 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3431 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
3432 c_parser_omp_clause_is_device_ptr): New functions.
3433 (c_parser_omp_clause_ordered): Parse optional parameter.
3434 (c_parser_omp_clause_reduction): Handle array reductions.
3435 (c_parser_omp_clause_schedule): Parse optional simd modifier.
3436 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
3437 functions.
3438 (c_parser_omp_clause_linear): Parse linear clause modifiers.
3439 (c_parser_omp_clause_depend_sink): New function.
3440 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
3441 (c_parser_omp_clause_map): Parse release/delete map kinds and
3442 optional always modifier.
3443 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
3444 and c_finish_omp_clauses callers.
3445 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
3446 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
3447 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
3448 (OMP_CRITICAL_CLAUSE_MASK): Define.
3449 (c_parser_omp_critical): Parse critical clauses.
3450 (c_parser_omp_for_loop): Handle doacross loops, adjust
3451 c_finish_omp_for and c_finish_omp_clauses callers.
3452 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
3453 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
3454 (OMP_FOR_CLAUSE_MASK): Add linear clause.
3455 (c_parser_omp_for): Disallow ordered clause when combined with
3456 distribute. Disallow linear clause when combined with distribute
3457 and not combined with simd.
3458 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
3459 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
3460 parse clauses and if depend clause is found, don't parse a body.
3461 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
3462 Allow target parallel without for after it.
3463 (OMP_TASK_CLAUSE_MASK): Add priority clause.
3464 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
3465 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
3466 invalid kinds.
3467 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
3468 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
3469 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
3470 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
3471 functions.
3472 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
3473 defaultmap and is_device_ptr clauses.
3474 (c_parser_omp_target): Parse target parallel and target simd. Set
3475 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
3476 and target exit data. Diagnose invalid map kinds.
3477 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
3478 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
3479 construct.
3480 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
3481 &omp_priv.
3482 (OMP_TASKLOOP_CLAUSE_MASK): Define.
3483 (c_parser_omp_taskloop): New function.
3484 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
3485 handle PRAGMA_OMP_TASKLOOP.
3486 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
3487 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
3488 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
3489 Add IS_OMP argument, handle structure element bases, diagnose
3490 bitfields, pass IS_OMP recursively, diagnose known zero length
3491 array sections in depend clauses, handle array sections in reduction
3492 clause, diagnose negative length even for pointers.
3493 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
3494 types, pass IS_OMP down to handle_omp_array_sections_1, handle
3495 array sections in reduction clause, set
3496 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
3497 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
3498 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
3499 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
3500
21ba0cea
MP
35012015-10-06 Marek Polacek <polacek@redhat.com>
3502
3503 * c-parser.c (c_parser_statement_after_labels): Use
3504 protected_set_expr_location.
3505 (c_parser_omp_clause_num_gangs): Likewise.
3506 (c_parser_omp_clause_num_threads): Likewise.
3507 (c_parser_omp_clause_num_workers): Likewise.
3508 (c_parser_omp_clause_vector_length): Likewise.
3509 (c_parser_omp_clause_num_teams): Likewise.
3510 (c_parser_omp_clause_thread_limit): Likewise.
3511 * c-typeck.c (build_c_cast): Likewise.
3512 (c_cast_expr): Likewise.
3513
624d31fe
RS
35142015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3515
3516 * c-typeck.c (c_tree_equal): Use real_equal instead of
3517 REAL_VALUES_EQUAL.
3518
b8fd7909
JM
35192015-10-04 Jason Merrill <jason@redhat.com>
3520
3521 * c-parser.c (c_lex_one_token): Handle @synchronized.
3522 * c-decl.c (match_builtin_function_types): A declaration of a built-in
3523 can change whether the function is transaction_safe.
3524
1c7485af
MP
35252015-10-02 Marek Polacek <polacek@redhat.com>
3526
3527 PR c/67730
3528 * c-typeck.c (convert_for_assignment): Use the expansion point
3529 location throughout.
3530
3e3b8d63
MP
35312015-10-02 Marek Polacek <polacek@redhat.com>
3532
3533 PR c/64249
3534 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
3535 and pass it down to c_parser_if_statement.
3536 (c_parser_else_body): Add CHAIN parameter and pass it down to
3537 c_parser_statement_after_labels.
3538 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
3539 duplicated if-else-if conditions.
3540
aabef2de
MP
35412015-10-01 Marek Polacek <polacek@redhat.com>
3542
3543 * c-typeck.c (convert_for_assignment): Improve commentary.
3544
de8ddd5f
MP
35452015-09-30 Marek Polacek <polacek@redhat.com>
3546
3547 PR c/67730
3548 * c-typeck.c (c_finish_return): Use the expansion point location for
3549 certain "return with value" warnings.
3550
c4914de6
MLI
35512015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3552
3553 * c-parser.c (pragma_lex): Add loc argument.
3554
0e36f5c7
MP
35552015-09-15 Marek Polacek <polacek@redhat.com>
3556
3557 PR c/67580
3558 * c-decl.c (tag_exists_p): New function.
3559 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3560 struct/union/enum keywords are missing.
3561 * c-tree.h (tag_exists_p): Declare.
3562
2f3bb934
MP
35632015-09-15 Marek Polacek <polacek@redhat.com>
3564
3565 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3566 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3567 Return NULL_TREE instead of 0.
3568 (lookup_name): Return NULL_TREE instead of 0.
3569 (lookup_name_in_scope): Likewise.
3570 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3571 (parser_xref_tag): Use false instead of 0.
3572 (start_struct): Use true instead of 1.
3573 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3574
aa256c4a
MP
35752015-09-14 Marek Polacek <polacek@redhat.com>
3576
3577 * c-typeck.c (set_nonincremental_init_from_string): Use
3578 HOST_WIDE_INT_M1U when shifting a negative value.
3579
dbb68221
MW
35802015-09-09 Mark Wielaard <mjw@redhat.com>
3581
3582 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
3583 parm against NULL.
3584
a8a098ac
JJ
35852015-09-10 Jakub Jelinek <jakub@redhat.com>
3586
3587 PR c/67502
3588 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
3589 into OMP_FOR_PRE_BODY rather than before the loop.
3590
f4b189d5
JJ
35912015-09-09 Jakub Jelinek <jakub@redhat.com>
3592
0bb99c11
JJ
3593 PR c/67501
3594 * c-parser.c (c_parser_oacc_all_clauses,
3595 c_parser_omp_all_clauses): Remove invalid clause from
3596 list of clauses even if parser->error is set.
3597
fce5e5e3
JJ
3598 PR c/67500
3599 * c-parser.c (c_parser_omp_clause_aligned,
3600 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3601 test for errors.
3602 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3603 error_mark_node.
3604
f4b189d5
JJ
3605 PR c/67495
3606 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3607 instead of c_parser_unary_expression. If the result is !lvalue_p,
3608 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3609
b2aaf235
MP
36102015-09-04 Marek Polacek <polacek@redhat.com>
3611
3612 PR sanitizer/67279
3613 * c-typeck.c (build_binary_op): Don't instrument static initializers.
3614
1807ffc1
MS
36152015-09-03 Martin Sebor <msebor@redhat.com>
3616
3617 PR c/66516
8b652e65
JJ
3618 * c-typeck.c (convert_arguments, parser_build_unary_op,
3619 build_conditional_expr, c_cast_expr, convert_for_assignment,
3620 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
3621 reject_gcc_builtin.
3622 (c_decl_implicit): Define.
3623
d04ff417
MP
36242015-09-02 Marek Polacek <polacek@redhat.com>
3625
3626 PR c/67432
3627 * c-parser.c (c_parser_enum_specifier): Give a better error for
3628 an empty enum.
3629
a79683d5
TS
36302015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3631
3632 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3633
191a6b94
MP
36342015-08-12 Marek Polacek <polacek@redhat.com>
3635
3636 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
3637 LOC to it.
3638
420a9d9b
MP
36392015-08-03 Marek Polacek <polacek@redhat.com>
3640
3641 PR c/67088
3642 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
3643 Use it.
3644 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
3645
992118a1
PP
36462015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3647
3648 * c-parser.c (c_parser_if_body): Take token_indent_info
3649 argument. Call warn_for_misleading_indentation even when the
3650 body is a semicolon. Extract token_indent_infos corresponding
3651 to the guard, body and next tokens. Adjust call to
3652 warn_for_misleading_indentation accordingly.
3653 (c_parser_else_body): Likewise.
3654 (c_parser_if_statement): Likewise.
3655 (c_parser_while_statement): Likewise.
3656 (c_parser_for_statement): Likewise.
3657
46308474
LFSM
36582015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
3659 Manuel López-Ibáñez <manu@gcc.gnu.org>
3660
3661 * c-decl.c (get_parm_info): Remove static var. Update warning
3662 message.
3663
05b28fd6
MP
36642015-07-27 Marek Polacek <polacek@redhat.com>
3665
3666 PR c++/66555
3667 PR c/54979
3668 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3669
451b5e48
MP
36702015-07-20 Marek Polacek <polacek@redhat.com>
3671
3672 PR c++/55095
3673 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3674 (build_binary_op): Warn about left shift overflows.
3675
1916bcb5
AM
36762015-07-09 Andrew MacLeod <amacleod@redhat.com>
3677
3678 * c-array-notation.c: Adjust includes for flags.h changes.
3679 * c-objc-common.c: Likewise.
3680
c7131fb2
AM
36812015-07-07 Andrew MacLeod <amacleod@redhat.com>
3682
3683 * c-array-notation.c: Adjust includes.
3684 * c-aux-info.c: Likewise.
3685 * c-convert.c: Likewise.
3686 * c-decl.c: Likewise.
3687 * c-errors.c: Likewise.
3688 * c-lang.c: Likewise.
3689 * c-objc-common.c: Likewise.
3690 * c-parser.c: Likewise.
3691 * c-typeck.c: Likewise.
3692
da2e71c9
MLI
36932015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3694
3695 PR fortran/66605
3696 * c-decl.c (finish_function): Call do_warn_unused_parameter.
3697
b155cfd9
MP
36982015-06-29 Marek Polacek <polacek@redhat.com>
3699
3700 PR c/66322
3701 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3702 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
3703 about -Wswitch-bool here.
3704 (do_case): Update c_add_case_label call.
3705 (c_finish_case): Update c_do_switch_warnings call.
3706
31521951
MP
37072015-06-27 Marek Polacek <polacek@redhat.com>
3708
3709 * c-typeck.c: Use VECTOR_TYPE_P throughout.
3710
22d03525
MP
37112015-06-26 Marek Polacek <polacek@redhat.com>
3712
3713 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3714 INDIRECT_REF_P.
3715 * c-typeck.c (array_to_pointer_conversion): Likewise.
3716 (build_unary_op): Likewise.
3717 (c_finish_return): Likewise.
3718
f0889939
AM
37192015-06-25 Andrew MacLeod <amacleod@redhat.com>
3720
3721 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3722 * c-parser.c: Likewise.
3723
8d67ee55
RS
37242015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3725
3726 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3727 instead of pointer_hash.
3728 (detect_field_duplicates): Likewise.
3729
0ae9bd27
MP
37302015-06-25 Marek Polacek <polacek@redhat.com>
3731
3732 * c-array-notation.c: Use VAR_P throughout.
3733 * c-decl.c: Likewise.
3734 * c-objc-common.c: Likewise.
3735 * c-parser.c: Likewise.
3736 * c-typeck.c: Likewise.
3737
62f9079a
MP
37382015-06-25 Marek Polacek <polacek@redhat.com>
3739
3740 * c-decl.c: Use is_global_var throughout.
3741 * c-parser.c: Likewise.
3742 * c-typeck.c: Likewise.
3743
abb226c9
AM
37442015-06-17 Andrew MacLeod <amacleod@redhat.com>
3745
3746 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3747 * c-aux-info.c: Likewise.
3748 * c-convert.c: Likewise.
3749 * c-decl.c: Likewise.
3750 * c-errors.c: Likewise.
3751 * c-lang.c: Likewise.
3752 * c-objc-common.c: Likewise.
3753 * c-parser.c: Likewise.
3754 * c-typeck.c: Likewise.
3755
8cbababc
JH
37562015-06-11 Jan Hubicka <hubicka@ucw.cz>
3757
3758 PR middle-end/66325
3759 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3760 variants.
3761
a0349665
PMR
37622015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
3763
3764 * c-decl.c (pop_scope): Register the main translation unit
3765 through the new debug hook.
3766
13fdf2e2
AM
37672015-06-08 Andrew MacLeod <amacleod@redhat.com>
3768
3769 * c-array-notation.c : Adjust include files.
3770 * c-aux-info.c : Likewise.
3771 * c-convert.c : Likewise.
3772 * c-decl.c : Likewise.
3773 * c-errors.c : Likewise.
3774 * c-lang.c : Likewise.
3775 * c-lang.h : Likewise.
3776 * c-objc-common.c : Likewise.
3777 * c-parser.c : Likewise.
3778 * c-typeck.c : Likewise.
3779
d7438551
AH
37802015-06-05 Aldy Hernandez <aldyh@redhat.com>
3781
3782 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3783 immediately clobber it.
3784 (c_write_global_declarations_1): Remove call to
3785 check_global_declaration_1.
3786 (c_write_global_declarations_2): Remove.
3787 (c_write_final_cleanups): Rename from c_write_global_declarations.
3788 Remove call to finalize_compilation_unit.
3789 Remove calls to debugging hooks.
3790 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3791 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3792 * c-tree.h: Remove c_write_global_declarations.
3793
ecb9f223
AM
37942015-06-04 Andrew MacLeod <amacleod@redhat.com>
3795
3796 * c-array-notation.c: Adjust includes for restructured coretypes.h.
3797 * c-aux-info.c: Likewise.
3798 * c-convert.c: Likewise.
3799 * c-decl.c: Likewise.
3800 * c-errors.c: Likewise.
3801 * c-lang.c: Likewise.
3802 * c-objc-common.c: Likewise.
3803 * c-parser.c: Likewise.
3804 * c-typeck.c: Likewise.
3805
9482b620
MP
38062015-06-04 Marek Polacek <polacek@redhat.com>
3807
3808 PR c/66341
3809 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3810 it is a lvalue.
3811
bc51ace3
PK
38122015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3813
3814 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3815 Warn for empty struct.
3816 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3817
ea5b45b6
AT
38182015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
3819
3820 * c-decl.c (start_function): Call plugin before parsing.
3821 (finish_function): Call plugin after parsing.
3822
c2d47482
PK
38232015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3824
3825 PR c/49551
3826 * c-decl.c (merge_decls): Merge DECL_COMMON.
3827
a95492ab
JW
38282015-05-22 Jim Wilson <jim.wilson@linaro.org>
3829
3830 * Make-lang.in (check_gcc_pallelize): Define.
3831
fd5c817a
MP
38322015-05-22 Marek Polacek <polacek@redhat.com>
3833
3834 PR c/47043
3835 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
3836 attributes.
3837
c7b70a3c
MP
38382015-05-21 Marek Polacek <polacek@redhat.com>
3839
3840 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3841 DECL_BUILT_IN.
3842
21b634ae
MP
38432015-05-20 Marek Polacek <polacek@redhat.com>
3844
3845 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3846 * c-typeck.c: Likewise.
3847
296a8c2f
MP
38482015-05-19 Marek Polacek <polacek@redhat.com>
3849
3850 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3851
41b37d5e
JJ
38522015-05-19 Jakub Jelinek <jakub@redhat.com>
3853
3854 PR middle-end/66199
3855 * c-parser.c (c_parser_omp_for_loop): Don't add
3856 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3857 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3858 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3859 constructs.
3860
fab27f52
MM
38612015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
3862
3863 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 3864 swaps.
fab27f52 3865
40de31cf
MLI
38662015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3867
3868 PR fortran/44054
3869 * c-objc-common.c (c_tree_printer): Replace locus pointer with
3870 accessor function.
3871
3aa3c9fc
MP
38722015-05-14 Marek Polacek <polacek@redhat.com>
3873
3874 PR c/66066
3875 PR c/66127
3876 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
3877 rather than with 0.
3878
c3388e62
DM
38792015-05-12 David Malcolm <dmalcolm@redhat.com>
3880
3881 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
3882 to add a call to warn_for_misleading_indentation.
3883 (c_parser_else_body): Likewise, adding param "else_loc".
3884 (c_parser_if_statement): Check for misleading indentation.
3885 (c_parser_while_statement): Likewise.
3886 (c_parser_for_statement): Likewise.
3887
755e528f
MP
38882015-05-08 Marek Polacek <polacek@redhat.com>
3889
3890 PR c/64918
3891 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
3892 (output_init_element): Likewise.
3893
0173bd2a
MP
38942015-05-07 Marek Polacek <polacek@redhat.com>
3895
3896 PR c/65179
3897 * c-typeck.c (build_binary_op): Warn when left shifting a negative
3898 value.
3899
9babc352
MP
39002015-04-30 Marek Polacek <polacek@redhat.com>
3901
3902 * c-typeck.c (set_init_label): Call error_at instead of error and
3903 pass LOC to it.
3904
ac9f18db
MP
3905 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
3906 the type of a decl.
3907
ec3fba51
MP
3908 * c-typeck.c (c_build_va_arg): Clarify the error message.
3909
b811915d
TS
39102015-04-29 Thomas Schwinge <thomas@codesourcery.com>
3911
3912 * c-parser.c (c_parser_oacc_enter_exit_data): Use
3913 OMP_STANDALONE_CLAUSES.
3914
f3075008
MP
39152015-04-28 Marek Polacek <polacek@redhat.com>
3916
3917 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
3918
4e81b788
MP
39192015-04-28 Marek Polacek <polacek@redhat.com>
3920
3921 PR c/65901
3922 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
3923
6c1db78e
MP
39242015-04-25 Marek Polacek <polacek@redhat.com>
3925
3926 PR c/52085
3927 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
3928 attribute.
3929
5c4abbb8
MP
39302015-04-23 Marek Polacek <polacek@redhat.com>
3931
3932 PR c/65345
3933 * c-decl.c (set_labels_context_r): New function.
3934 (store_parm_decls): Call it via walk_tree_without_duplicates.
3935 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
3936 instead of create_tmp_var. Build TARGET_EXPR instead of
3937 COMPOUND_EXPR.
3938 (build_atomic_assign): Use create_tmp_var_raw instead of
3939 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
3940
06aca1d5
IV
39412015-04-20 Ilya Verbin <ilya.verbin@intel.com>
3942
3943 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
3944 (c_parser_omp_target_update): Add missed %> to error_at ().
3945
8fba1830
BRF
39462015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
3947
3948 PR target/55143
3949 * c-decl.c (c_default_pointer_mode): Remove definition.
3950 * c-tree.h (c_default_pointer_mode): Remove declaration.
3951
62021f64
TB
39522015-03-27 Tobias Burnus <burnus@net-b.de>
3953
3954 PR c/65586
3955 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
3956 error out.
3957 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
3958 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
3959 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
3960
9b65e171
JJ
39612015-03-19 Jakub Jelinek <jakub@redhat.com>
3962
3963 * c-decl.c (c_decl_attributes): Also add "omp declare target"
3964 attribute for DECL_EXTERNAL VAR_DECLs.
3965
17958621
JJ
39662015-03-11 Jakub Jelinek <jakub@redhat.com>
3967
3968 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
3969 argument.
3970
7ccb1a11
JJ
39712015-03-10 Jakub Jelinek <jakub@redhat.com>
3972
3973 PR c/65120
3974 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
3975 before preparing arguments to warn_logical_not_parentheses.
3976
01177669
JJ
39772015-03-09 Jakub Jelinek <jakub@redhat.com>
3978
3979 PR c/65120
3980 * c-typeck.c (parser_build_binary_op): Don't warn for
3981 !!x == y or !b == y where b is _Bool.
3982
802ac282
MP
39832015-03-09 Marek Polacek <polacek@redhat.com>
3984
3985 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
3986 * c-decl.c (grokdeclarator): Likewise.
3987 * c-typeck.c (build_binary_op): Likewise.
3988
e5165b60
MP
39892015-02-27 Marek Polacek <polacek@redhat.com>
3990
3991 PR c/65228
3992 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
3993
065d214c
MP
39942015-02-14 Marek Polacek <polacek@redhat.com>
3995
3996 PR c/64768
3997 * c-decl.c (grokdeclarator): Set the range of a flexible array member
3998 declared through a typedef name.
3999
e5d9235b
MP
40002015-02-13 Marek Polacek <polacek@redhat.com>
4001
4002 PR c/65050
4003 * c-decl.c (grokdeclarator): Print also the type when giving
4004 the error message about array's incomplete element type.
4005
fa01ffcc
JJ
40062015-02-11 Jakub Jelinek <jakub@redhat.com>
4007
4008 PR c/64824
4009 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
4010 check in the POP macro.
4011
c3e38a03
MP
40122015-02-09 Marek Polacek <polacek@redhat.com>
4013
4014 PR c/64856
4015 * c-typeck.c (process_init_element): Don't always wrap
4016 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
4017 initializing a range of elements.
4018
4886ec8e
JJ
40192015-02-04 Jakub Jelinek <jakub@redhat.com>
4020
4021 PR c/64824
4022 PR c/64868
4023 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
4024
c3e38a03 40252015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
4026
4027 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
4028 processing enum declaration.
4029
7b33f0c8
MP
40302015-01-29 Marek Polacek <polacek@redhat.com>
4031
4032 PR c/64709
4033 * c-typeck.c (pop_init_level): If constructor_elements has
4034 exactly one element with integer_zerop value, set constructor_zeroinit
4035 to 1. Remove braces around warning_init call.
4036
dea63e49
JJ
40372015-01-27 Jakub Jelinek <jakub@redhat.com>
4038
4039 PR c/64766
4040 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
4041 of FUNCTION_DECLs with error_mark_node.
4042
d38f7dce
JJ
40432015-01-26 Jakub Jelinek <jakub@redhat.com>
4044
4045 PR c/64778
4046 * c-typeck.c (convert_arguments): Return -1 if there are
4047 error_args, even if we've diagnosed too many arguments.
4048
cbf5d0e7
RB
40492015-01-21 Richard Biener <rguenther@suse.de>
4050
4051 PR middle-end/64313
4052 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
4053 for builtins the user declared correctly.
4054
41dbbb37
TS
40552015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4056 Bernd Schmidt <bernds@codesourcery.com>
4057 Cesar Philippidis <cesar@codesourcery.com>
4058 James Norris <jnorris@codesourcery.com>
4059 Jakub Jelinek <jakub@redhat.com>
4060 Ilmir Usmanov <i.usmanov@samsung.com>
4061
4062 * c-parser.c: Include "gomp-constants.h".
4063 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
4064 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
4065 Use OMP_CLAUSE_SET_MAP_KIND.
4066 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
4067 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
4068 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
4069 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
4070 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
4071 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
4072 "copyout", "create", "delete", "deviceptr", "gang", "host",
4073 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
4074 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
4075 "present_or_create", "pcreate", "seq", "self", "vector",
4076 "vector_length", "wait", "worker".
4077 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
4078 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
4079 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
4080 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
4081 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
4082 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
4083 (c_parser_oacc_data_clause_deviceptr)
4084 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
4085 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
4086 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
4087 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
4088 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
4089 (c_parser_oacc_parallel, c_parser_oacc_update)
4090 (c_parser_oacc_wait): New functions.
4091 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
4092 (c_finish_oacc_data): New prototypes.
4093 * c-typeck.c: Include "gomp-constants.h".
4094 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
4095 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
4096 OMP_CLAUSE_SET_MAP_KIND.
4097 (c_finish_oacc_parallel, c_finish_oacc_kernels)
4098 (c_finish_oacc_data): New functions.
4099 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
4100 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
4101 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
4102 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
4103 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
4104 GOMP_MAP_FORCE_DEVICEPTR.
4105
adfac8df
JJ
41062015-01-09 Michael Collison <michael.collison@linaro.org>
4107
4108 * c-array-notation.c: Include hash-set.h, machmode.h,
4109 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4110 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
4111 * c-aux-info.c: Ditto.
4112 * c-convert.c: Ditto.
4113 * c-decl.c: Ditto.
4114 * c-errors.c: Ditto.
4115 * c-lang.c: Dittoxs.
4116 * c-objc-common.c: Ditto.
4117 * c-parser.c: Ditto.
4118 * c-typeck.c: Include hash-set.h, machmode.h,
4119 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4120 fold-const.h, wide-int.h, inchash.h, real.h and
4121 fixed-value.h due to flattening of tree.h.
4122
2cc901dc
MP
41232015-01-07 Marek Polacek <polacek@redhat.com>
4124
4125 PR c/64417
4126 * c-typeck.c (process_init_element): Disallow initialization of
4127 a flexible array member with a string constant if the structure
4128 is in an array.
4129
5624e564
JJ
41302015-01-05 Jakub Jelinek <jakub@redhat.com>
4131
e5341100
JJ
4132 PR sanitizer/64344
4133 * c-typeck.c (convert_for_assignment, c_finish_return): For
4134 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
4135 types also set in_late_binary_op around convert call.
4136 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
4137 to integral type casts, if not in_late_binary_op, pass c_fully_fold
4138 result on expr as last argument to ubsan_instrument_float_cast,
4139 if in_late_binary_op, don't use c_save_expr but save_expr.
4140
5624e564
JJ
4141 Update copyright years.
4142
5bd012f8
MP
41432015-01-05 Marek Polacek <polacek@redhat.com>
4144
4145 PR c/64423
4146 * c-typeck.c (build_array_ref): Pass loc down to
4147 warn_array_subscript_with_type_char.
4148
3f8257db 41492014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
4150
4151 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 4152 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 4153 element type.
8e745a17 4154 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 4155 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 4156 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 4157 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 4158 to PEDWARN_FOR_QUALIFIERS.
768952be 4159
8f94a8c4
JJ
41602014-12-17 Jakub Jelinek <jakub@redhat.com>
4161
4162 PR sanitizer/64289
4163 * c-convert.c: Include ubsan.h.
4164 (convert): For real -> integral casts and
4165 -fsanitize=float-cast-overflow don't call convert_to_integer, but
4166 instead instrument the float cast directly.
4167
b731b390
JJ
41682014-11-29 Jakub Jelinek <jakub@redhat.com>
4169
4170 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
4171 c_finish_stmt_expr): Remove NULL last argument from
4172 create_tmp_var_raw and create_tmp_var calls.
4173 * c-array-notation.c (fix_builtin_array_notation_fn,
4174 build_array_notation_expr, fix_conditional_array_notations_1,
4175 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
4176
541e35a6
MP
41772014-11-28 Marek Polacek <polacek@redhat.com>
4178
4179 PR c/63862
4180 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
4181 convert the right operand to integer type.
4182
b286be94
MP
41832014-11-25 Marek Polacek <polacek@redhat.com>
4184
4185 PR c/63877
4186 * c-decl.c (start_function): Disable -Wmissing-declarations warning
4187 for inline functions.
4188
aa7da51a
JJ
41892014-11-21 Jakub Jelinek <jakub@redhat.com>
4190
4191 PR target/63764
4192 * c-typeck.c (build_array_ref): Adjust
4193 convert_vector_to_pointer_for_subscript caller. If it returns true,
4194 call non_lvalue_loc on the result.
4195
d876207f
RB
41962014-11-11 Richard Biener <rguenther@suse.de>
4197
4198 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
4199 to true.
4200
e5e44252
AK
42012014-11-10 Andi Kleen <ak@linux.intel.com>
4202
4203 PR c/60804
4204 * c-parser.c (c_parser_statement_after_labels): Call
4205 check_no_cilk.
4206 (c_parser_if_statement): Dito.
4207 (c_parser_switch_statement): Dito.
4208 (c_parser_while_statement): Dito.
4209 (c_parser_do_statement): Dito.
4210 (c_parser_for_statement): Dito.
4211 * c-typeck.c (c_finish_loop): Dito.
4212
13c21655
PC
42132014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
4214
4215 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
4216 OPT_Wshift_count_overflow in the warnings.
4217
2d51fcef
MP
42182014-10-30 Marek Polacek <polacek@redhat.com>
4219
4220 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
4221 print the stripped version as well, if they're not the same.
4222
ef4bddc2
RS
42232014-10-29 Richard Sandiford <richard.sandiford@arm.com>
4224
4225 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
4226 machine_mode.
4227
c582198b
AM
42282014-10-28 Andrew MacLeod <amacleod@redhat.com>
4229
4230 * c-decl.c: Adjust include files.
4231 * c-parser.c: Ditto.
4232
ddc8de03
PM
42332014-10-27 Phil Muldoon <pmuldoon@redhat.com>
4234 Tom Tromey <tromey@redhat.com>
4235
4236 * c-tree.h (enum c_oracle_request): New.
4237 (c_binding_oracle_function): New typedef.
4238 (c_binding_oracle, c_pushtag, c_bind): Declare.
4239 * c-decl.c (c_binding_oracle): New global.
4240 (I_SYMBOL_CHECKED): New macro.
4241 (i_symbol_binding): New function.
4242 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
4243 (I_TAG_CHECKED): New macro.
4244 (i_tag_binding): New function.
4245 (I_TAG_BINDING, I_TAG_DECL): Redefine.
4246 (I_LABEL_CHECKED): New macro.
4247 (i_label_binding): New function.
4248 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
4249 (c_print_identifier): Save and restore c_binding_oracle.
4250 (c_pushtag, c_bind): New functions.
4251
60393bbc
AM
42522014-10-27 Andrew MacLeod <amacleod@redhat.com>
4253
4254 * c-typeck.c: Adjust include files.
4255
d723bb7c
MLI
42562014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
4257
4258 PR c++/53061
4259 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
4260 initialization here...
4261 (c_initialize_diagnostics): ... but here. Set defaults after
4262 building pretty-printer.
4263
1bc5a451
MP
42642014-10-23 Marek Polacek <polacek@redhat.com>
4265
4266 PR c/63626
4267 * c-decl.c (pop_scope): Don't print warning in external_scope.
4268
4435bb92
MP
42692014-10-19 Marek Polacek <polacek@redhat.com>
4270
4271 PR c/63567
4272 * c-typeck.c (output_init_element): Allow initializing objects with
4273 static storage duration with compound literals even in C99 and add
4274 pedwarn for it.
4275
7278465e
MP
42762014-10-17 Marek Polacek <polacek@redhat.com>
4277
4278 PR c/63567
4279 * c-typeck.c (digest_init): Allow initializing objects with static
4280 storage duration with compound literals even in C99 and add pedwarn
4281 for it.
4282
d9b7be2e
MP
42832014-10-17 Marek Polacek <polacek@redhat.com>
4284
4285 PR c/63543
4286 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
4287 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
4288 error multiple times. Print the type.
4289
f406ae1f
MP
42902014-10-17 Marek Polacek <polacek@redhat.com>
4291
4292 PR c/63549
4293 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
4294 type.
4295
92574c7c
MP
42962014-10-17 Marek Polacek <polacek@redhat.com>
4297
4298 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
4299 (start_function): Use OPT_Wimplicit_int instead of 0.
4300 (store_parm_decls_oldstyle): Likewise.
4301
1bc4a978
MT
43022014-10-17 Alan Modra <amodra@gmail.com>
4303
4304 PR middle-end/61848
4305 * c-decl.c (merge_decls): Don't merge section name or tls model
4306 to newdecl symtab node, instead merge to olddecl. Override
4307 existing olddecl section name. Set tls_model for all thread-local
4308 vars, not just OMP thread-private ones. Remove incorrect comment.
4309
83685514
AM
43102014-10-16 Andrew MacLeod <amacleod@redhat.com>
4311
4312 * c-decl.c: Adjust include files.
4313
78a7c317
DD
43142014-10-14 DJ Delorie <dj@redhat.com>
4315
4316 * c-parser.c (c_parse_init): Add RID entries for each __intN.
4317 (c_token_starts_typename): Check all __intN, not just __int128.
4318 (c_token_starts_declspecs): Likewise.
4319 (c_parser_declspecs): Likewise.
4320 (c_parser_attribute_any_word): Likewise.
4321 (c_parser_objc_selector): Likewise.
4322 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
4323 (struct c_declspecs): Add int_n_idx field to record *which* __intN
4324 is specified.
4325 * c-decl.c (declspecs_add_type): Check for all __intN, not just
4326 __int128.
4327 (finish_declspecs): Likewise.
4328
74d98c1e
AB
43292014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
4330
8e745a17 4331 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 4332 the duplicate code.
8e745a17 4333 (c_parser_statement): Call the new function.
74d98c1e 4334
84937de2
MP
43352014-10-09 Marek Polacek <polacek@redhat.com>
4336
4337 PR c/63480
4338 * c-typeck.c (pop_init_level): Don't warn about initializing
4339 with { }.
4340
0382aaa0
MP
43412014-10-07 Marek Polacek <polacek@redhat.com>
4342
4343 PR c/59717
4344 * c-decl.c (header_for_builtin_fn): New function.
4345 (implicitly_declare): Suggest which header to include.
4346
7a0ca710
MP
43472014-10-07 Marek Polacek <polacek@redhat.com>
4348
4349 * c-convert.c (convert): Use error_operand_p.
4350 * c-typeck.c (require_complete_type): Likewise.
4351 (really_atomic_lvalue): Likewise.
4352 (digest_init): Likewise.
4353 (handle_omp_array_sections_1): Likewise.
4354
6bc8a126
MP
43552014-10-03 Marek Polacek <polacek@redhat.com>
4356
4357 PR c/63453
4358 * c-decl.c (pop_scope): Don't warn about "inline function declared
4359 but never defined" for functions marked with gnu_inline attribute.
4360
d90c0a59
JJ
43612014-09-25 Jakub Jelinek <jakub@redhat.com>
4362
4363 PR c++/63249
4364 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
4365 on low_bound and length.
4366
083e891e
MP
43672014-09-24 Marek Polacek <polacek@redhat.com>
4368
4369 PR c/61405
4370 PR c/53874
4371 * c-parser.c: Don't define CPP_KEYWORD.
4372 (c_parser_switch_statement): Pass original type to c_finish_case.
4373 * c-tree.h (c_finish_case): Update declaration.
4374 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
4375 conditionally to c_do_switch_warnings.
4376
8d95fe25
MP
43772014-09-03 Marek Polacek <polacek@redhat.com>
4378
4379 PR c/62024
4380 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
4381 conversions.
4382
9a771876
JJ
43832014-09-02 Jakub Jelinek <jakub@redhat.com>
4384 Balaji V. Iyer <balaji.v.iyer@intel.com>
4385 Igor Zamyatin <igor.zamyatin@intel.com>
4386
4387 * c-parser.c (c_parser_cilk_for): New function.
4388 (c_parser_cilk_grainsize): Likewise.
4389 (c_get_temp_regvar): Likewise.
4390 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
4391 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
4392 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
4393 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
4394 case.
4395
b7679d96
CG
43962014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
4397
4398 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
4399 with using HOST_WIDE_INT without truncation to 'int'
4400
59ea0364
MP
44012014-08-22 Marek Polacek <polacek@redhat.com>
4402
4403 PR c++/62199
4404 * c-typeck.c (parser_build_binary_op): Adjust call to
4405 warn_logical_not_parentheses.
4406
671a475e
IZ
44072014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
4408
4409 PR other/62008
4410 * c-parser.c (c_parser_array_notation): Check for correct
4411 type of an array added.
4412
04159acf
MP
44132014-08-19 Marek Polacek <polacek@redhat.com>
4414
4415 PR c++/62153
4416 * c-typeck.c (build_binary_op): If either operand of a comparison
4417 is a boolean expression, call maybe_warn_bool_compare.
4418
c77935ee
PP
44192014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
4420
4421 PR c/45584
4422 * c-typeck.c (build_c_cast): Do a conversion even when the
4423 TYPE_MAIN_VARIANTs are the same.
4424
35aff4fb
MP
44252014-08-19 Marek Polacek <polacek@redhat.com>
4426
4427 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
4428 pedwarn_c99 instead of pedwarn.
4429 (grokfield): Likewise.
4430 (warn_defaults_to): New function.
4431 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
4432 Unconditionally call pedwarn_c99 instead of pedwarn.
4433 (start_function): Call warn_defaults_to instead of pedwarn_c99.
4434 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
4435 check flag_isoc11 before.
4436 * c-errors.c (pedwarn_c99): Change the return type to bool.
4437 Handle -Wc99-c11-compat.
4438 * c-parser.c (disable_extension_diagnostics): Handle
4439 warn_c99_c11_compat.
4440 (restore_extension_diagnostics): Likewise.
4441 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
4442 instead of pedwarn, don't check flag_isoc11 before.
4443 (c_parser_declspecs): Likewise.
4444 (c_parser_alignas_specifier): Likewise.
4445 (c_parser_alignof_expression): Likewise.
4446 (c_parser_generic_selection): Likewise.
4447 * c-tree.h (pedwarn_c99): Update declaration.
4448 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
4449 of pedwarn_c99.
4450
177cce46
MP
44512014-08-19 Marek Polacek <polacek@redhat.com>
4452
4453 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
4454 to pedwarn_c90.
4455 * c-errors.c: Include "opts.h".
4456 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
4457 * c-parser.c (disable_extension_diagnostics): Handle negative value
4458 of warn_c90_c99_compat, too.
4459 (restore_extension_diagnostics): Likewise.
4460 (c_parser_compound_statement_nostart): Pass
4461 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
4462
6dc99c33
MP
44632014-08-12 Marek Polacek <polacek@redhat.com>
4464
4465 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
4466 Add pedwarn.
4467 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
4468 Likewise.
4469 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
4470
3f8257db 44712014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
4472
4473 PR c/51849
4474 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
4475 Call pedwarn_c90 instead of pedwarn.
4476 (check_bitfield_type_and_width): Likewise.
4477 (declspecs_add_qual): Likewise.
4478 (declspecs_add_type): Likewise.
4479 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
4480 Adjust to only call pedwarn_c90.
4481 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
4482 pedwarn_c90 instead of pedwarn.
4483 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
4484 * c-parser.c (disable_extension_diagnostics): Handle
4485 warn_c90_c99_compat.
4486 (restore_extension_diagnostics): Likewise.
4487 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
4488 pedwarn_c90 instead of pedwarn.
4489 (c_parser_initelt): Likewise.
4490 (c_parser_postfix_expression): Likewise.
4491 (c_parser_postfix_expression_after_paren_type): Likewise.
4492 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
4493 * c-tree.h: Fix formatting.
4494 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
4495 pedwarn_c90 instead of pedwarn.
4496
9f25a338
TS
44972014-08-07 Trevor Saunders <tsaunders@mozilla.com>
4498
4499 * c-typeck.c: Remove include of pointer-set.h.
4500
044331a8
MP
45012014-08-07 Marek Polacek <polacek@redhat.com>
4502
4503 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
4504
b787e7a2
TS
45052014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4506
4507 * c-typeck.c: Use hash_map instead of pointer_map.
4508
6e2830c3
TS
45092014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4510
4511 * c-decl.c: Use hash_set instead of pointer_set.
4512
a7ee52fb
IZ
45132014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
4514
4515 PR middle-end/61455
4516 * c-array-notation.c (expand_array_notations): Handling
4517 of DECL_EXPR added.
4518
b4dfdc11
MG
45192014-07-31 Marc Glisse <marc.glisse@inria.fr>
4520
4521 PR c++/60517
4522 * c-typeck.c (c_finish_return): Return 0 instead of the address of
4523 a local variable.
4524
976d5a22
TT
45252014-07-30 Tom Tromey <tromey@redhat.com>
4526
4527 * c-typeck.c (struct constructor_stack) <designator_depth>: New
4528 field.
4529 (really_start_incremental_init, push_init_level): Initialize
4530 designator_depth.
4531 (pop_init_level): Set global designator_depth.
4532 (process_init_element): Check for designated_init attribute.
4533
30281de2
MP
45342014-07-20 Marek Polacek <polacek@redhat.com>
4535
4536 PR c/61852
4537 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
4538 (implicitly_declare): Pass location to implicit_decl_warning.
4539
b108f48f
JJ
45402014-07-14 Jakub Jelinek <jakub@redhat.com>
4541
4542 PR middle-end/61294
4543 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
4544 If non-NULL, call c_parser_check_literal_zero.
4545 (c_parser_check_literal_zero): New function.
4546 (c_parser_postfix_expression_after_primary): Adjust
4547 c_parser_expr_list caller, handle -Wmemset-transposed-args.
4548
773ec47f
MP
45492014-07-06 Marek Polacek <polacek@redhat.com>
4550
4551 PR c/6940
4552 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4553 * c-tree.h (C_ARRAY_PARAMETER): Define.
4554 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4555 function parameter.
4556
22e1cf1c 45572014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 4558 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
4559
4560 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4561 releasing symbol.
4562
52ec0ea3
MP
45632014-07-01 Marek Polacek <polacek@redhat.com>
4564
4565 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4566 instead of 0 to WARN_FOR_ASSIGNMENT.
4567
d5c3d343
MP
45682014-07-01 Marek Polacek <polacek@redhat.com>
4569
4570 PR c/58286
4571 * c-typeck.c (convert_for_assignment): Pass
4572 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4573
6a7253a4
MP
45742014-06-30 Marek Polacek <polacek@redhat.com>
4575
4576 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4577 has no_sanitize_undefined attribute.
4578
5e88a8f4
IZ
45792014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
4580
4581 PR middle-end/57541
4582 * c-array-notation.c (fix_builtin_array_notation_fn):
4583 Check for 0 arguments in builtin call. Check that bultin argument is
4584 correct.
4585 * c-parser.c (c_parser_array_notation): Check for incorrect initial
4586 index.
4587
9698b078
SH
45882014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
4589
4590 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
4591 qualifiers in __auto_type for atomic types.
4592 (c_parser_typeof_specifier): Discard all type qualifiers in
4593 __typeof__ for atomic types.
4594
6e07c515
MP
45952014-06-25 Marek Polacek <polacek@redhat.com>
4596
4597 PR c/61162
4598 * c-parser.c (c_parser_statement_after_labels): Pass the location of
4599 the return expression to c_finish_return.
4600
da6f124d
JJ
46012014-06-25 Jakub Jelinek <jakub@redhat.com>
4602
4603 * c-typeck.c (c_finish_omp_clauses): Make sure
4604 OMP_CLAUSE_LINEAR_STEP has correct type.
4605
c203e8a7
TS
46062014-06-24 Trevor Saunders <tsaunders@mozilla.com>
4607
4608 * c-decl.c: Adjust.
4609
56ad0e38
JJ
46102014-06-24 Jakub Jelinek <jakub@redhat.com>
4611
4612 * c-parser.c (c_parser_omp_for_loop): For
4613 #pragma omp parallel for simd move lastprivate clause from parallel
4614 to for rather than simd.
4615
47c2554f
MP
46162014-06-23 Marek Polacek <polacek@redhat.com>
4617
4618 * c-typeck.c (parser_build_binary_op): Don't call
4619 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
4620
56363ffd
JH
46212014-06-15 Jan Hubicka <hubicka@ucw.cz>
4622
4623 * c-parser.c (c_parser_omp_threadprivate): Likewise.
4624 * c-decl.c (merge_decls): Likewise.
4625
d7ff7ae5
MP
46262014-06-09 Marek Polacek <polacek@redhat.com>
4627
4628 PR c/36446
4629 * c-typeck.c (error_init): Call inform instead of error_at.
4630 (pedwarn_init): Call inform instead of pedwarn.
4631 (warning_init): Call inform instead of warning_at.
4632
24d047a3
JH
46332014-06-07 Jan Hubicka <hubicka@ucw.cz>
4634
4635 * c-decl.c (merge_decls): Use set_decl_section_name.
4636 (duplicate_decls): Remove node if it exists.
4637
9bac5cbb
G
46382014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
4639
4640 PR c/53119
4641 * c-typeck.c (push_init_level, process_init_element,
4642 pop_init_level): Correct check for zero initialization, move
4643 missing brace warning to respect zero initialization.
4644
8ffcdea8
MP
46452014-06-05 Marek Polacek <polacek@redhat.com>
4646
4647 PR c/56724
4648 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
4649
742938c9
MP
46502014-06-05 Marek Polacek <polacek@redhat.com>
4651
4652 PR c/49706
4653 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
4654 on the left hand side operand of a comparison.
4655
6447c55d
MP
46562014-06-05 Marek Polacek <polacek@redhat.com>
4657
4658 PR c/48062
4659 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
4660 Print note only if the warning was printed.
4661
9dc7743c
IZ
46622014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
4663
4664 PR c/58942
4665 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4666 with a pointer.
4667
fedfecef
MP
46682014-06-03 Marek Polacek <polacek@redhat.com>
4669
4670 PR c/60439
4671 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4672 c_start_case.
4673 * c-tree.h (c_start_case): Update.
4674 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
4675 switch condition has boolean value.
4676
9b2b7279
AM
46772014-06-02 Andrew MacLeod <amacleod@redhat.com>
4678
4679 * c-decl.c: Include builtins.h.
4680 * c-parser.c: Likewise.
4681
5c1bc275
MP
46822014-05-27 Marek Polacek <polacek@redhat.com>
4683
4684 PR c/56724
4685 * c-typeck.c (convert_arguments): Get location of a parameter. Change
4686 error and warning calls to error_at and warning_at. Pass location of
4687 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
4688 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4689 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
4690
97563bc8
IZ
46912014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
4692
4693 PR c/61191
4694 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4695 function parameters.
4696
aede2c10
JH
46972014-05-23 Jan Hubicka <hubicka@ucw.cz>
4698
4699 * c-decl.c (merge_decls): Preserve symtab node pointers.
4700 (duplicate_decls): Free new decl.
4701
edbba2ce
TS
47022014-05-23 Thomas Schwinge <thomas@codesourcery.com>
4703
f3316c6d
TS
4704 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4705 initialization.
4706
edbba2ce
TS
4707 * c-parser.c (c_parser_omp_target): Return bool values.
4708
68c81f24
TS
47092014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4710
4711 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4712 num_teams_loc variable to num_thread_limit_loc.
4713
632f2871
RS
47142014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4715
4716 * c-array-notation.c (expand_array_notations): Use void_node
4717 instead of void_zero_node.
4718
766090c2
TS
47192014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4720
4721 * c-decl.c (finish_struct): Adjust.
4722 (finish_enum): Likewise.
4723 (bind): Adjust.
4724 (record_inline_static): Likewise.
4725 (push_scope): Likewise.
4726 (make_label): Likewise.
4727 (lookup_label_for_goto): Likewise.
4728 (finish_struct): Likewise.
4729 (finish_enum): Likewise.
4730 (store_parm_decls): Likewise.
4731 (c_push_function_context): Likewise.
4732 * c-lang.h: Remove usage of variable_size gty attribute.
4733 * c-parser.c (c_parse_init): Adjust.
4734 (c_parse_file): Likewise.
4735
2b107f6b
MP
47362014-05-13 Marek Polacek <polacek@redhat.com>
4737
4738 PR c/61162
4739 * c-typeck.c (convert_for_assignment): Pass location to
4740 WARN_FOR_ASSIGNMENT instead of input_location.
4741
d033409e
MP
47422014-05-10 Marek Polacek <polacek@redhat.com>
4743
4744 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4745 maybe_warn_string_init.
4746 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4747 maybe_warn_string_init.
4748 * c-tree.h (maybe_warn_string_init): Update declaration.
4749 * c-typeck.c (maybe_warn_string_init): Add location parameter.
4750 Call pedwarn_init with loc instead of with input_location.
4751 (digest_init): Pass init_loc to maybe_warn_string_init.
4752 (pop_init_level): Call pedwarn_init with loc instead of with
4753 input_location.
4754 (set_init_index): Likewise.
4755 (process_init_element): Likewise.
4756
ea58ef42
MP
47572014-05-09 Marek Polacek <polacek@redhat.com>
4758
4759 PR c/61096
4760 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4761 (c_parser_initelt): Pass location to set_init_label. Pass array index
4762 location to set_init_index.
4763 * c-tree.h (push_init_level): Update declaration.
4764 (pop_init_level): Likewise.
4765 (set_init_index): Likewise.
4766 (set_init_label): Likewise.
4767 * c-typeck.c (error_init): Add location parameter. Call error_at
4768 instead of error.
4769 (digest_init): Pass init_loc to error_init.
4770 (really_start_incremental_init):
4771 (push_init_level): Add location parameter. Pass loc to pop_init_level
4772 and error_init.
4773 (pop_init_level): Likewise.
4774 (set_designator): Add location parameter. Pass loc to pop_init_level,
4775 push_init_level, and error_init.
4776 (set_init_index): Add location parameter. Pass loc to error_init and
4777 set_designator.
4778 (set_init_label): Likewise.
4779 (output_init_element): Pass loc to error_init.
4780 (process_init_element): Pass loc to error_init, pop_init_level,
4781 pedwarn_init, and push_init_level.
4782
661a0813
MP
47832014-05-09 Marek Polacek <polacek@redhat.com>
4784
4785 PR c/50459
4786 * c-parser.c (c_parser_attributes): Parse the arguments as an
4787 expression-list if the attribute takes identifier.
4788
2793eeab
MP
47892014-05-08 Marek Polacek <polacek@redhat.com>
4790
4791 PR c/61053
4792 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4793 TYPE_ALIGN_UNIT.
4794
f827930a
MP
47952014-05-08 Marek Polacek <polacek@redhat.com>
4796
4797 PR c/61077
4798 * c-decl.c (start_function): Warn for _Atomic-qualified return type
4799 of main.
4800
1d60af08
KZ
48012014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4802 Mike Stump <mikestump@comcast.net>
4803 Richard Sandiford <rdsandiford@googlemail.com>
4804
4805 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4806 (finish_enum): Use wide-int interfaces.
4807 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4808 * c-typeck.c (build_c_cast): Likewise.
4809 (set_nonincremental_init_from_string): Likewise.
4810 (c_tree_equal): Likewise.
4811
a0e24419
MP
48122014-05-02 Marek Polacek <polacek@redhat.com>
4813
4814 PR c/25801
4815 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
4816 Return size_one_node when the type is not complete.
4817 (pointer_diff): Remove comment.
4818 (build_unary_op): Improve error messages.
4819
19fc9faa
MP
48202014-05-02 Marek Polacek <polacek@redhat.com>
4821
4822 * c-typeck.c (c_finish_return): Separate warning_at calls.
4823
63bc4e87
MP
48242014-05-02 Marek Polacek <polacek@redhat.com>
4825
4826 * c-tree.h (error_init): Remove declaration.
4827 (pedwarn_init): Likewise.
4828 * c-typeck.c (error_init): Make static and move above.
4829 (pedwarn_init): Likewise.
4830 (warning_init): Move above.
4831 (maybe_warn_string_init): Likewise.
4832
4bd2511b
JL
48332014-05-01 Jeff Law <law@redhat.com>
4834
4835 Revert:
4836
4837 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4838 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
4839 avoid goto.
4840
6a358dcb
MP
48412014-05-02 Marek Polacek <polacek@redhat.com>
4842
4843 PR c/60784
4844 * c-typeck.c (push_init_level): Set constructor_designated to
4845 p->designated for structures.
4846
ae5ebda4
MP
48472014-05-01 Marek Polacek <polacek@redhat.com>
4848
4849 PR c/60915
4850 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4851 function-definition has an attribute after the declarator.
4852
96b40f8d
MP
48532014-05-01 Marek Polacek <polacek@redhat.com>
4854
4855 PR c/60257
4856 * c-typeck.c (warning_init): Add location_t parameter. Call
4857 warning_at instead of warning.
4858 (push_init_level): Pass input_location to warning_init.
4859 (add_pending_init): Add location_t parameter. Pass loc to
4860 warning_init.
4861 (set_nonincremental_init): Pass input_location to add_pending_init.
4862 (set_nonincremental_init_from_string): Likewise.
4863 (output_init_element): Pass loc to warning_init and to
4864 add_pending_init.
4865
32e00768
MP
48662014-05-01 Marek Polacek <polacek@redhat.com>
4867
4868 PR c/43395
4869 * c-typeck.c (c_finish_return): Distinguish between label and variable
4870 when warning about returning local address.
4871
c9379ce2
MP
48722014-05-01 Marek Polacek <polacek@redhat.com>
4873
4874 PR c/29467
4875 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
4876 in C89 mode.
4877
d00887e8
MP
48782014-05-01 Marek Polacek <polacek@redhat.com>
4879
4880 PR c/43245
4881 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
4882 instead of 0 to WARN_FOR_QUALIFIERS.
4883
5436fa2e
MP
48842014-05-01 Marek Polacek <polacek@redhat.com>
4885
4886 PR c/56989
4887 * c-typeck.c (default_conversion): Use better location for
4888 error call.
4889
f8ed5150
MP
48902014-04-30 Marek Polacek <polacek@redhat.com>
4891
4892 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
4893 also when SANITIZE_FLOAT_DIVIDE is on.
4894
8337d1db
MP
48952014-04-30 Marek Polacek <polacek@redhat.com>
4896
4897 PR c/60139
4898 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
4899 and pedwarn_init. Use loc insted of input_location.
4900
c4bdc42f
MP
49012014-04-30 Marek Polacek <polacek@redhat.com>
4902
4903 PR c/60351
4904 * c-typeck.c (build_binary_op): Use location when warning about
4905 shift count.
4906
45484dcf
MP
49072014-04-25 Marek Polacek <polacek@redhat.com>
4908
4909 PR c/18079
4910 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
4911 always_inline/noinline and hot/cold attributes.
4912
34cf811f
MP
49132014-04-25 Marek Polacek <polacek@redhat.com>
4914
4915 PR c/60114
4916 * c-parser.c (c_parser_initelt): Pass input_location to
4917 process_init_element.
4918 (c_parser_initval): Pass loc to process_init_element.
4919 * c-tree.h (process_init_element): Adjust declaration.
4920 * c-typeck.c (push_init_level): Pass input_location to
4921 process_init_element.
4922 (pop_init_level): Likewise.
4923 (set_designator): Likewise.
4924 (output_init_element): Add location_t parameter. Pass loc to
4925 digest_init.
4926 (output_pending_init_elements): Pass input_location to
4927 output_init_element.
4928 (process_init_element): Add location_t parameter. Pass loc to
4929 output_init_element.
4930
42056eac
JJ
49312014-04-24 Jakub Jelinek <jakub@redhat.com>
4932
4933 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
4934 atomic-clause, allow comma in between atomic-clause and
4935 seq_cst.
4936
e162a134
JJ
49372014-04-22 Jakub Jelinek <jakub@redhat.com>
4938
4939 PR c/59073
4940 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
4941 fails, don't set OM_PARALLEL_COMBINED and return NULL.
4942
2f6babac
IZ
49432014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
4944
4945 PR middle-end/60469
4946 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4947 create_tmp_var instead build_decl for creating temps.
4948 (build_array_notation_expr): Likewise.
4949 (fix_conditional_array_notations_1): Likewise.
4950 (fix_array_notation_expr): Likewise.
4951 (fix_array_notation_call_expr): Likewise.
4952
8edbfaa6
JJ
49532014-03-28 Jakub Jelinek <jakub@redhat.com>
4954
4955 PR c++/60689
4956 * c-tree.h (c_build_function_call_vec): New prototype.
4957 * c-typeck.c (build_function_call_vec): Don't call
4958 resolve_overloaded_builtin here.
4959 (c_build_function_call_vec): New wrapper function around
4960 build_function_call_vec. Call resolve_overloaded_builtin here.
4961 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
4962 Call c_build_function_call_vec instead of build_function_call_vec.
4963 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4964 * c-decl.c (finish_decl): Likewise.
4965
7485aeea
MLI
49662014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4967
4968 PR c/55383
4969 * c-typeck.c: Use correct format string in cast-qual warning
4970
b17a8b07
TS
49712014-03-07 Thomas Schwinge <thomas@codesourcery.com>
4972
4973 * c-decl.c (c_decl_attributes): Use
4974 lang_hooks.types.omp_mappable_type.
4975 * c-typeck.c (c_finish_omp_clauses): Likewise.
4976
3af9c5e9
MP
49772014-03-06 Marek Polacek <polacek@redhat.com>
4978
4979 PR c/60197
4980 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
4981 of checking tree code.
4982
1c9f5f33
PK
49832014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4984
4985 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
4986 (c_parser_parameter_declaration): Likewise.
4987
cc28fc7f
MP
49882014-02-19 Marek Polacek <polacek@redhat.com>
4989
4990 PR c/60195
4991 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
4992 Call mark_exp_read on exp.value.
4993 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
4994 TREE_ADDRESSABLE on old instead of val.
4995 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
4996
b581c05c
PK
49972014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4998
4999 * c-parser.c (c_parser_get_builtin_args): Replace calls to
5000 C_EXPR_APPEND by vec_safe_push.
5001 * c-tree.h (C_EXPR_APPEND): Remove.
5002
81e5eca8
MP
50032014-01-31 Marek Polacek <polacek@redhat.com>
5004
5005 PR c/59963
5006 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
5007 build_function_call_vec.
5008 (build_function_call): Likewise.
5009 (build_atomic_assign): Likewise.
5010 (build_function_call_vec): Add arg_loc parameter. Use it.
5011 (convert_arguments): Likewise.
5012 (convert_for_assignment): Rename rhs_loc to expr_loc.
5013 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
5014 (c_parser_objc_keywordexpr): Likewise.
5015 (c_parser_postfix_expression_after_primary): Call
5016 build_function_call_vec with expr_loc rather than op_loc.
5017 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
5018 build_function_call_vec.
5019 (c_parser_expr_list): Add locations parameter. Fill it with locations
5020 of function arguments.
5021 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
5022
68fca595
MP
50232014-01-30 Marek Polacek <polacek@redhat.com>
5024
5025 PR c/59940
5026 * c-typeck.c (build_function_call_vec): Use loc parameter.
5027 (convert_arguments): Add location parameter. Use it.
5028 (ep_convert_and_check): Likewise.
5029 (build_atomic_assign): Adjust convert_for_assignment call.
5030 (build_modify_expr): Likewise.
5031 (digest_init): Likewise.
5032 (c_finish_return): Likewise.
5033 (build_conditional_expr): Adjust ep_convert_and_check calls.
5034 (convert_for_assignment): Add rhs_loc parameter. Use it.
5035 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
5036 calls.
5037
fa337f3a
RB
50382014-01-30 Richard Biener <rguenther@suse.de>
5039
5040 PR c/59905
5041 * c-typeck.c (build_function_call_vec): Do not replace calls
5042 to a function via an incompatible type with a runtime abort.
5043
b72271b9
BI
50442014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
5045
5046 * c-parser.c (c_parser_declaration_or_fndef): Replaced
5047 flag_enable_cilkplus with flag_cilkplus.
5048 (c_parser_direct_declarator_inner): Likewise.
5049 (c_parser_attribute_any_word): Likewise.
5050 (c_parser_attributes): Likewise.
5051 (c_parser_compound_statement): Likewise.
5052 (c_parser_statement_after_labels): Likewise.
5053 (c_parser_if_statement): Likewise.
5054 (c_parser_switch_statement): Likewise.
5055 (c_parser_do_statement): Likewise.
5056 (c_parser_for_statement): Likewise.
5057 (c_parser_unary_expression): Likewise.
5058 (c_parser_postfix_expression): Likewise.
5059 (c_parser_postfix_expression_after_primary): Likewise.
5060 (c_parser_postfix_expression_after_primary): Likewise.
5061 (c_parser_omp_clause_name): Likewise.
5062 (c_finish_omp_declare_simd): Likewise.
5063 (c_parser_cilk_verify_simd): Likewise.
5064 * c-typeck.c (build_array_ref): Likewise.
5065 (build_function_call_vec): Likewise.
5066 (convert_arguments): Likewise.
5067 (build_compound_expr): Likewise.
5068 (c_finish_return): Likewise.
5069 (c_finish_if_stmt): Likewise.
5070 (c_finish_loop): Likewise.
5071 (build_binary_op): Likewise.
5072
393e8e8b
MP
50732014-01-23 Marek Polacek <polacek@redhat.com>
5074
5075 PR c/59846
5076 * c-typeck.c (parser_build_binary_op): Use location instead of
5077 input_location.
5078 (build_binary_op): Pass location to shorten_compare.
5079
f04dda30
MP
50802014-01-23 Marek Polacek <polacek@redhat.com>
5081
5082 PR c/58346
5083 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
5084 an empty aggregate.
5085
789eadcd
MP
50862014-01-23 Marek Polacek <polacek@redhat.com>
5087
5088 PR c/59871
5089 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
5090 of a comma expression.
5091 (emit_side_effect_warnings): Likewise.
5092
40f14e9f
BI
50932014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5094
5095 PR c/59825
5096 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
5097 function to use walk_tree and moved a lot of its functionality to
5098 expand_array_notations.
5099 (expand_array_notations): New function.
5100
74558dd9
BI
51012014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5102
5103 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
5104 attribute an attribute without value.
5105
652fea39
JJ
51062014-01-23 Jakub Jelinek <jakub@redhat.com>
5107
5108 PR middle-end/58809
5109 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
5110 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
5111
f34f1c87
MP
51122014-01-22 Marek Polacek <polacek@redhat.com>
5113
5114 PR c/59891
5115 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
5116 of remove_c_maybe_const_expr on op1 and op2.
5117
241f845a
JJ
51182014-01-15 Jakub Jelinek <jakub@redhat.com>
5119
5120 PR c/58943
5121 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
5122 effects, preevaluate rhs using SAVE_EXPR first.
5123
9a74f20c
BI
51242014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
5125
5126 PR c++/59631
5127 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
5128 statements with if-elseif statements.
5129
96066ce1
MP
51302014-01-06 Marek Polacek <polacek@redhat.com>
5131
5132 PR c/57773
5133 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
5134 defined bit-field types only in ISO C.
5135
23a5b65a
RS
51362014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5137
5138 Update copyright years
5139
f9030485
RS
51402014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5141
5142 * c-array-notation.c: Use the standard form for the copyright notice.
5143
41958c28
BI
51442013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
5145
5146 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
5147 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
5148 field in parser is not empty. If not-empty, call the function
5149 c_parser_finish_omp_declare_simd.
5150 (c_parser_cilk_clause_vectorlength): Modified function to be shared
5151 between SIMD-enabled functions and #pragma simd. Added new parameter.
5152 (c_parser_cilk_all_clauses): Modified the usage of the function
5153 c_parser_cilk_clause_vectorlength as mentioned above.
5154 (c_parser_cilk_simd_fn_vector_attrs): New function.
5155 (c_finish_cilk_simd_fn_tokens): Likewise.
5156 (is_cilkplus_vector_p): Likewise.
5157 (c_parser_omp_clause_name): Added checking for "vectorlength,"
5158 "nomask," and "mask" strings in clause name.
5159 (c_parser_omp_all_clauses): Added 3 new case statements:
5160 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
5161 PRAGMA_CILK_CLAUSE_NOMASK.
5162 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
5163 check for vector attribute and if so call the function
5164 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
5165 called the function c_finish_cilk_simd_fn_tokens.
5166 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
5167 parser field is non-empty. If so, parse them as you would parse
5168 the omp declare simd pragma.
5169 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
5170 Added a check when step is a parameter and flag it as error.
5171 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
5172 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
5173 pragma_omp_clause.
5174
cef0fd0e
TS
51752013-12-17 Thomas Schwinge <thomas@codesourcery.com>
5176
5177 * c-parser.c (c_parser_omp_parallel): Fix description.
5178
12893402
BI
51792013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
5180
5181 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
5182 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5183 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
5184 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
5185
296674db
JM
51862013-12-04 Joseph Myers <joseph@codesourcery.com>
5187
5188 PR c/52023
5189 * c-parser.c (c_parser_alignas_specifier): Use
5190 c_sizeof_or_alignof_type instead of c_alignof.
5191 (c_parser_alignof_expression): Likewise, with min_alignof
5192 parameter depending on alignof spelling used.
5193
edd28054
MP
51942013-12-04 Marek Polacek <polacek@redhat.com>
5195
5196 PR c/54113
5197 * c-decl.c (start_function): Don't warn for missing prototype for
5198 inline functions.
5199
da0fc454
MP
52002013-12-03 Marek Polacek <polacek@redhat.com>
5201
5202 PR c/59351
5203 * c-decl.c (build_compound_literal): Allow compound literals with
5204 empty initial value.
5205
4c2ecab0
JM
52062013-12-02 Joseph Myers <joseph@codesourcery.com>
5207
5208 PR c/58235
5209 * c-typeck.c (build_modify_expr): Diagnose assignment to
5210 expression with array type.
5211
340baef7
JM
52122013-11-29 Joseph Myers <joseph@codesourcery.com>
5213
5214 PR c/42262
5215 * c-typeck.c (process_init_element): Do not treat a string as
5216 initializing a whole array when used with a designator for an
5217 individual element.
5218
6763b9f7
JM
52192013-11-29 Joseph Myers <joseph@codesourcery.com>
5220
5221 PR c/57574
5222 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
5223 an inline function following a static declaration.
5224
e7bd1de1
JJ
52252013-11-28 Jakub Jelinek <jakub@redhat.com>
5226
5227 PR c/59310
5228 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
5229 to p_name before calling c_parser_omp_teams instead of after.
5230 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
5231 argument. Remove unused p_name variable.
5232
0136f8f0
AH
52332013-11-27 Aldy Hernandez <aldyh@redhat.com>
5234 Jakub Jelinek <jakub@redhat.com>
5235
5236 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
5237 external_scope is NULL.
5238
241b71bb
TV
52392013-11-27 Tom de Vries <tom@codesourcery.com>
5240 Marc Glisse <marc.glisse@inria.fr>
5241
5242 PR c++/59032
5243 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
5244
2fb9a547
AM
52452013-11-22 Andrew MacLeod <amacleod@redhat.com>
5246
5247 * c-typeck.c: Add required include files from gimple.h.
5248
8400e75e
DM
52492013-11-22 David Malcolm <dmalcolm@redhat.com>
5250
5251 * c-decl.c (define_label, shadow_tag_warned)
5252 (check_bitfield_type_and_width, grokdeclarator, grokparms,
5253 store_parm_decls_newstyle, store_parm_decls_oldstyle)
5254 (declspecs_add_type): Remove use of in_system_header macro.
5255 * c-parser.c (c_parser_unary_expression): Likewise.
5256 * c-typeck.c (store_init_value, process_init_element)
5257 (c_start_case): Likewise.
5258
5259 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
5260 macro.
5261
5262 * c-parser.c (c_parser_set_source_position_from_token): Remove
5263 reference to in_system_header from comment.
5264
386b1f1f
RS
52652013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5266
5267 * c-decl.c (grokdeclarator): Update comment to refer to
5268 tree_to_[su]hwi rather than tree_low_cst.
5269
ae7e9ddd
RS
52702013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5271
5272 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
5273 tree_to_uhwi throughout.
5274
9439e9a1
RS
52752013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5276
5277 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
5278 throughout.
5279
9541ffee
RS
52802013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5281
5282 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
5283 throughout.
5284
c02065fc
AH
52852013-11-15 Aldy Hernandez <aldyh@redhat.com>
5286
5287 * c-parser.c (c_parser_cilk_simd): New.
5288 (c_parser_cilk_verify_simd): New.
5289 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
5290 (c_parser_omp_for_loop): Add case for NE_EXPR.
5291 Set c_break_label for CILK_SIMD.
5292 (c_parser_cilk_clause_vectorlength): New.
5293 (c_parser_cilk_clause_linear): New.
5294 (c_parser_cilk_clause_name): New.
5295 (c_parser_cilk_all_clauses): New.
5296 * c-typeck.c (build_unary_op): Pass location argument to
5297 readonly_error.
5298 (build_modify_expr): Same.
5299 (build_asm_expr): Same.
5300 (c_finish_bc_stmt): Error on break/continue in loops.
5301
18f429e2
AM
53022013-11-14 Andrew MacLeod <amacleod@redhat.com>
5303
5304 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
5305
d8a2d370
DN
53062013-11-14 Diego Novillo <dnovillo@google.com>
5307
5308 * c-decl.c: Include print-tree.h.
5309 Include stor-layout.h.
5310 Include varasm.h.
5311 Include attribs.h.
5312 Include stringpool.h.
5313 * c-lang.c: Include fold-const.h.
5314 * c-parser.c: Include stringpool.h.
5315 Include attribs.h.
5316 Include stor-layout.h.
5317 Include varasm.h.
5318 Include trans-mem.h.
5319 * c-typeck.c: Include stor-layout.h.
5320 Include trans-mem.h.
5321 Include varasm.h.
5322 Include stmt.h.
5323
38b7bc7f
JM
53242013-11-13 Joseph Myers <joseph@codesourcery.com>
5325
5326 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
5327 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
5328 __auto_type.
5329 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
5330 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
5331 RID_AUTO_TYPE.
5332 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
5333 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
5334 (c_parser_declarator, c_parser_direct_declarator_inner)
5335 (c_parser_parameter_declaration, c_parser_type_name): All callers
5336 changed.
5337 (c_parser_declaration_or_fndef): Handle declarations with type
5338 determined from the initializer.
5339
45b0be94
AM
53402013-11-12 Andrew MacLeod <amacleod@redhat.com>
5341
18f429e2 5342 * c-typeck.c: Include gimplify.h.
45b0be94 5343
582d9b50
JM
53442013-11-12 Joseph Myers <joseph@codesourcery.com>
5345
5346 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
5347 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
5348 comment.
5349 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
5350 or _Thread_local as appropriate in diagnostics.
5351 (build_null_declspecs): Initialize ret->thread_gnu_p.
5352 (declspecs_add_scspec): Handle either __thread or _Thread_local
5353 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
5354 pedantic. Do not disallow _Thread_local extern and _Thread_local
5355 static.
5356
267bac10
JM
53572013-11-07 Joseph Myers <joseph@codesourcery.com>
5358 Andrew MacLeod <amacleod@redhat.com>
5359
5360 * c-aux-info.c (gen_type): Handle atomic qualifier.
5361 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
5362 qualifiers when compating types.
5363 (shadow_tag_warned): Handle atomic_p in declspecs.
5364 (quals_from_declspecs): Likewise.
5365 (start_decl): Use c_type_promotes_to when promoting argument
5366 types.
5367 (grokdeclarator): Handle _Atomic.
5368 (get_parm_info): Diagnose any qualifier on "void" as only
5369 parameter.
5370 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
5371 comparing types. Use c_type_promotes_to when promoting argument
5372 types.
5373 (finish_function): Use c_type_promotes_to when promoting argument
5374 types.
5375 (build_null_declspecs): Handle atomic_p in declspecs.
5376 (declspecs_add_qual): Handle RID_ATOMIC.
5377 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
5378 (c_token_starts_declspecs): Handle RID_ATOMIC.
5379 (c_parser_declspecs): Handle atomic type specifiers and
5380 qualifiers.
5381 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
5382 from types of expressions with atomic type.
5383 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
5384 (c_parser_attribute_any_word): Handle RID_ATOMIC.
5385 (c_parser_initializer, c_parser_initelt, c_parser_initval)
5386 (c_parser_statement_after_labels, c_parser_switch_statement)
5387 (c_parser_for_statement, c_parser_expr_no_commas)
5388 (c_parser_conditional_expression, c_parser_binary_expression)
5389 (c_parser_cast_expression, c_parser_unary_expression)
5390 (c_parser_postfix_expression)
5391 (c_parser_postfix_expression_after_primary, c_parser_expression):
5392 Use convert_lvalue_to_rvalue.
5393 (c_parser_expression_conv, c_parser_expr_list): Document
5394 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
5395 (c_parser_objc_synchronized_statement): Use
5396 convert_lvalue_to_rvalue.
5397 (c_parser_objc_selector): Handle RID_ATOMIC.
5398 (c_parser_objc_receiver, c_parser_array_notation): Use
5399 convert_lvalue_to_rvalue.
5400 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
5401 _Atomic (type-name).
5402 (struct c_declspecs): Add atomic_p field.
5403 (convert_lvalue_to_rvalue): Declare.
5404 * c-typeck.c (c_type_promotes_to): Promote atomic types to
5405 corresponding atomic types.
5406 (qualify_type): Don't add _Atomic qualifiers from second argument.
5407 (comp_target_types): Do not allow _Atomic mismatches.
5408 (type_lists_compatible_p): Do not remove atomic qualifiers when
5409 comparing types.
5410 (really_atomic_lvalue, convert_lvalue_to_rvalue)
5411 (build_atomic_assign): New functions.
5412 (build_unary_op): Use build_atomic_assign for atomic increment and
5413 decrement.
5414 (build_conditional_expr): Do not treat _Atomic void as a qualified
5415 version of void.
5416 (build_modify_expr): Use build_atomic_assign for atomic LHS.
5417 (find_anonymous_field_with_type, convert_to_anonymous_field)
5418 (convert_for_assignment): Do not remove atomic qualifiers when
5419 comparing types.
5420 (digest_init): Do not accept initialization of arrays of atomic
5421 elements by string constants.
5422 (build_asm_expr): Use convert_lvalue_to_rvalue.
5423 (build_binary_op): Do not treat _Atomic void as a qualified
5424 version of void.
5425
0c249d4b
DD
54262013-11-06 DJ Delorie <dj@redhat.com>
5427
5428 * c-decl.c (locate_old_decl): If a previous conflicting decl is
5429 both explicit and builtin, print the location of the explicit one.
5430
6d7f7e0a
TB
54312013-11-05 Tobias Burnus <burnus@net-b.de>
5432
5433 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
5434 c_parser_omp_distribute, c_parser_omp_teams,
5435 c_parser_omp_target, c_parser_omp_declare): Handle
5436 -fopenmp-simd.
5437
b906f4ca
MP
54382013-11-03 Marek Polacek <polacek@redhat.com>
5439
5440 * c-decl.c (grokdeclarator): Add VLA instrumentation.
5441
ee1d5a02
JJ
54422013-11-01 Jakub Jelinek <jakub@redhat.com>
5443
5444 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
5445 check_dup_generic at the end, unless remove is true.
5446 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
5447 remove = true;.
5448 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
5449
5a9785fb
JJ
54502013-10-31 Jakub Jelinek <jakub@redhat.com>
5451
5452 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
5453 with decl that is not pointer nor array.
5454
939b37da
BI
54552013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
5456
5457 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
5458 a spawning function is found.
5459 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
5460 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
5461 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5462 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
5463 case.
5464 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
5465 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
5466 expr.
5467 (c_finish_return): Added a check to reject _Cilk_spawn in return
5468 expression.
5469 (build_cilk_spawn): New function.
5470 (build_cilk_sync): Likewise.
5471 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
5472
d4af74d4
TB
54732013-10-27 Tobias Burnus <burnus@net-b.de>
5474
5475 PR other/33426
5476 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
5477 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
5478 (c_parser_statement_after_labels): Update calls.
5479
d73749df 54802013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
5481
5482 PR other/33426
5483 * c-parser.c (c_parser_pragma, c_parser_for_statement):
5484 Handle PRAGMA_IVDEP.
5485 (c_parser_statement_after_labels): Update call.
5486
f28aa681
MP
54872013-10-24 Marek Polacek <polacek@redhat.com>
5488
5489 * c-parser.c (c_parser_struct_declaration): Add a comment.
5490 (c_parser_declarator): Don't allow _Alignas here.
5491
0645c1a2
AM
54922013-10-17 Andrew MacLeod <amacleod@redhat.com>
5493
5494 * c-parser.c: Include omp-low.h.
5495 * c-typeck.c: Likewise.
5496
568a31f2
MP
54972013-10-17 Marek Polacek <polacek@redhat.com>
5498
5499 PR c/58267
5500 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
5501 Document syntax of the array-declarator.
5502 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
5503 are not permitted.
5504 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
5505 (c_parser_struct_declaration): Likewise.
5506 (c_parser_declarator): Likewise.
5507 (c_parser_direct_declarator_inner): Likewise.
5508 (c_parser_parameter_declaration): Likewise.
5509 (c_parser_type_name): Likewise.
5510
acf0174b
JJ
55112013-10-11 Jakub Jelinek <jakub@redhat.com>
5512
5513 * c-lang.h (current_omp_declare_target_attribute): New extern
5514 decl.
5515 * c-parser.c: Include c-lang.h.
5516 (struct c_parser): Change tokens to c_token *.
5517 Add tokens_buf field. Change tokens_avail type to unsigned int.
5518 (c_parser_consume_token): If parser->tokens isn't
5519 &parser->tokens_buf[0], increment parser->tokens.
5520 (c_parser_consume_pragma): Likewise.
5521 (enum pragma_context): Add pragma_struct and pragma_param.
5522 (c_parser_external_declaration): Adjust
5523 c_parser_declaration_or_fndef caller.
5524 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
5525 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
5526 Adjust recursive call.
5527 (c_parser_struct_or_union_specifier): Use pragma_struct instead
5528 of pragma_external.
5529 (c_parser_parameter_declaration): Use pragma_param instead of
5530 pragma_external.
5531 (c_parser_compound_statement_nostart, c_parser_label,
5532 c_parser_for_statement): Adjust
5533 c_parser_declaration_or_fndef callers.
5534 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
5535 it through to c_parser_conditional_expression.
5536 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
5537 pass it through to c_parser_binary_expression. Adjust recursive
5538 call.
5539 (c_parser_binary_expression): Remove prec argument, add
5540 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
5541 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
5542 binop matches it, use build2 instead of parser_build_binary_op.
5543 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
5544 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
5545 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
5546 Handle pragma_struct and pragma_param the same as pragma_external.
5547 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5548 (c_parser_omp_variable_list): Parse array sections for
5549 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5550 (c_parser_omp_clause_collapse): Fully fold collapse expression.
5551 (c_parser_omp_clause_reduction): Handle user defined reductions.
5552 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5553 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5554 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5555 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5556 c_parser_omp_clause_depend, c_parser_omp_clause_map,
5557 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5558 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5559 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5560 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
5561 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
5562 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5563 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
5564 (c_parser_omp_for_loop): Add CODE argument, pass it through
5565 to c_finish_omp_for. Change last argument to cclauses,
5566 and adjust uses to grab parallel clauses from the array of all
5567 the split clauses. Adjust c_parser_binary_expression,
5568 c_parser_declaration_or_fndef and c_finish_omp_for callers.
5569 (omp_split_clauses): New function.
5570 (c_parser_omp_simd): New function.
5571 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5572 Allow the function to be called also when parsing combined constructs,
5573 and call c_parser_omp_simd when parsing for simd.
5574 (c_parser_omp_sections_scope): If section-sequence doesn't start with
5575 #pragma omp section, require exactly one structured-block instead of
5576 sequence of statements.
5577 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5578 Allow the function to be called also when parsing combined constructs.
5579 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
5580 Allow the function to be called also when parsing combined
5581 constructs.
5582 (c_parser_omp_taskgroup, c_parser_omp_cancel,
5583 c_parser_omp_cancellation_point, c_parser_omp_distribute,
5584 c_parser_omp_teams, c_parser_omp_target_data,
5585 c_parser_omp_target_update, c_parser_omp_target,
5586 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
5587 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
5588 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
5589 (c_parser_omp_construct): Add p_name and mask vars. Handle
5590 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
5591 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
5592 and c_parser_omp_sections callers.
5593 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
5594 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5595 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5596 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
5597 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
5598 OMP_CLAUSE_DEPEND.
5599 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5600 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5601 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5602 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5603 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5604 * c-typeck.c: Include tree-inline.h.
5605 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5606 handle_omp_array_sections_1, handle_omp_array_sections,
5607 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5608 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5609 user defined reductions.
5610 (c_tree_equal): New function.
5611 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5612 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5613 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5614 c_check_omp_declare_reduction_r): New prototypes.
5615 * c-decl.c (current_omp_declare_target_attribute): New variable.
5616 (c_decl_attributes): New function.
5617 (start_decl, start_function): Use it instead of decl_attributes.
5618 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5619 c_omp_reduction_decl, c_omp_reduction_lookup,
5620 c_check_omp_declare_reduction_r): New functions.
5621
0a6c2227
TT
56222013-09-25 Tom Tromey <tromey@redhat.com>
5623
5624 * Make-lang.in (c/gccspec.o): Remove.
5625 (CFLAGS-c/gccspec.o): New variable.
5626 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
5627 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
5628 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5629
f3bc55f0
TT
56302013-09-25 Tom Tromey <tromey@redhat.com>
5631
5632 * Make-lang.in (c/gccspec.o): Don't use subshell.
5633
a24d975c
MP
56342013-09-18 Marek Polacek <polacek@redhat.com>
5635
5636 PR sanitize/58443
5637 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5638 Remove unnecessary check.
5639
ce6923c5
MP
56402013-09-18 Marek Polacek <polacek@redhat.com>
5641
5642 PR sanitizer/58411
5643 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
5644 no_sanitize_undefined attribute.
5645
a1e51df9
KT
56462013-09-13 Kai Tietz <ktietz@redhat.com>
5647
5648 PR target/57848
5649 * c-decl.c (c_builtin_function_ext_scope): Remove
5650 wrong assumption that it is never called on prexisting
5651 symbol.
5652
0af94e6f
JR
56532013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
5654
5655 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
5656
20059c8b
GDR
56572013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5658
5659 * c-objc-common.c (c_tree_printer): Tidy.
5660
de5a5fa1
MP
56612013-08-30 Marek Polacek <polacek@redhat.com>
5662
5663 * c-typeck.c (build_binary_op): Add division by zero and shift
5664 instrumentation.
5665
2531a1d9 56662013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 5667 Joseph Myers <joseph@codesourcery.com>
2531a1d9 5668
6e2bcc98 5669 PR c/35649
2531a1d9
JR
5670 * c-typeck.c (c_common_type): Prefer double_type_node over
5671 other REAL_TYPE types with the same precision.
5672 (convert_arguments): Likewise.
5673
025311c4
GDR
56742013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5675
5676 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
5677 (c_initialize_diagnostics): Call a destructor for the early printer.
5678
da6ca2b5
GDR
56792013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5680
5681 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5682 printer initialization.
5683
318cda85 56842013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 5685
318cda85
BI
5686 PR c/57490
5687 * c-array-notation.c (fix_conditional_array_notations_1): Added a
5688 check for truth values.
5689 (expand_array_notation_exprs): Added truth values case. Removed an
5690 unwanted else. Added for-loop to walk through subtrees in default
5691 case.
5692
b066401f
GDR
56932013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5694
5695 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5696
fb48aadc
JM
56972013-07-23 Joseph Myers <joseph@codesourcery.com>
5698
5699 * c-parser.c (struct c_generic_association): Fix typo.
5700
433cc7b0
TT
57012013-07-23 Tom Tromey <tromey@redhat.com>
5702 Joseph Myers <joseph@codesourcery.com>
5703
5704 * c-parser.c (struct c_generic_association): New.
5705 (c_generic_association_d): New typedef.
5706 (c_parser_generic_selection): New function.
5707 (c_parser_postfix_expression): Handle RID_GENERIC.
5708
26d40c3d
JM
57092013-07-13 Jason Merrill <jason@redhat.com>
5710
5711 PR c++/57793
5712 * c-decl.c (finish_struct): Check for too-large class.
5713
ecdbd01a 57142013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
5715
5716 PR c/57821
5717 * c-typeck.c (set_init_index): When folding, check for index overflow.
5718
1141ed3f
BI
57192013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5720
5721 * c-parser.c (c_parser_array_notation): Removed rejection of array
5722 notations in an array of function pointers.
5723
713b46fa
BI
57242013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5725
5726 * c-array-notation.c (make_triplet_val_inv): New function.
5727 (create_cmp_incr): Likewise.
5728 (create_array_refs): Likewise.
5729 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5730 Also modularized common parts between functions and called the function.
5731 (build_array_notation_expr): Likewise.
5732 (fix_conditional_array_notations_1): Likewise.
5733 (fix_array_notation_expr): Likewise.
5734 (fix_array_notation_call_expr): Likewise.
5735
92f20202
MP
57362013-06-18 Marek Polacek <polacek@redhat.com>
5737
5738 PR c/57630
5739 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5740
73a23b06
BI
57412013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
5742
5743 * c-array-notation.c (build_array_notation_expr): Reject array notation
5744 mismatch between LHS and RHS even inside a call_expr. Also, removed
5745 a couple while statements that were dead code.
5746
00b8517d
BI
57472013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
5748
5749 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5750 excessive precision expressions in function parameters. Also removed
5751 couple unwanted while statements.
5752
1509bdda
BI
57532013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5754
5755 * c-array-notation.c (expand_array_notation_exprs): Added
5756 ARRAY_NOTATION_REF case.
5757
d60f1706
BI
57582013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5759
5760 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5761 function to c-family/array-notation-common.c.
5762 (is_cilkplus_reduce_builtin): Likewise.
5763 (find_rank): Likewise.
5764 (extract_array_notation_exprs): Likewise.
5765 (replace_array_notations): Likewise.
5766 (find_inv_trees): Likewise.
5767 (replace_inv_trees): Likewise.
5768 (contains_array_notation_expr): Likewise.
5769 (find_correct_array_notation_type): Likewise.
5770 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5771 (struct inv_list): Moved this to c-family/array-notation-common.c.
5772 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5773
6d6efbb3
BI
57742013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
5775
5776 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5777 reduction functions outside the for-loop. Added a check if the fundecl
5778 is non-NULL. Finally, removed an unwanted if-statement, and made the
5779 body unconditional.
5780
25c22937
BI
57812013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5782
5783 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5784 condition of the if-statement matches the rank of else-block and then-
5785 block when array notations are used.
5786 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5787 expression after the entire function body is parsed.
5788 (c_parser_expr_no_commas): Delayed creating array notation expressions
5789 to the end of function parsing.
5790 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5791 whole if-statement instead of just the condition.
5792 (expand_array_notation_exprs): Added MODIFY_EXPR case.
5793
edd25645
BI
57942013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5795
5796 PR c/57474
5797 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5798 array to NULL_TREE if they are unused. Also added a check for the
5799 field to be NULL before its fields are used in future.
5800
065ce7f1
RO
58012013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5802
5803 PR bootstrap/57450
5804 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5805 (build_array_notation_expr): Likewise.
5806
36536d79
BI
58072013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5808
5809 * c-typeck.c (build_array_ref): Added a check to see if array's
5810 index is greater than one. If true, then emit an error.
5811 (build_function_call_vec): Exclude error reporting and checking
5812 for builtin array-notation functions.
5813 (convert_arguments): Likewise.
5814 (c_finish_return): Added a check for array notations as a return
5815 expression. If true, then emit an error.
5816 (c_finish_loop): Added a check for array notations in a loop
5817 condition. If true then emit an error.
5818 (lvalue_p): Added a ARRAY_NOTATION_REF case.
5819 (build_binary_op): Added a check for array notation expr inside
5820 op1 and op0. If present, we call another function to find correct
5821 type.
5822 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
5823 * c-parser.c (c_parser_compound_statement): Check if array
5824 notation code is used in tree, if so, then transform them into
5825 appropriate C code.
5826 (c_parser_expr_no_commas): Check if array notation is used in LHS
5827 or RHS, if so, then build array notation expression instead of
5828 regular modify.
5829 (c_parser_postfix_expression_after_primary): Added a check for
5830 colon(s) after square braces, if so then handle it like an array
5831 notation. Also, break up array notations in unary op if found.
5832 (c_parser_direct_declarator_inner): Added a check for array
5833 notation.
5834 (c_parser_compound_statement): Added a check for array notation in
5835 a stmt. If one is present, then expand array notation expr.
5836 (c_parser_if_statement): Likewise.
5837 (c_parser_switch_statement): Added a check for array notations in
5838 a switch statement's condition. If true, then output an error.
5839 (c_parser_while_statement): Similarly, but for a while.
5840 (c_parser_do_statement): Similarly, but for a do-while.
5841 (c_parser_for_statement): Similarly, but for a for-loop.
5842 (c_parser_unary_expression): Check if array notation is used in a
5843 pre-increment or pre-decrement expression. If true, then expand
5844 them.
5845 (c_parser_array_notation): New function.
5846 * c-array-notation.c: New file.
5847 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5848
cd192ccc
MS
58492013-05-23 Mike Stump <mikestump@comcast.net>
5850
5851 * c-typeck.c (convert_for_assignment): Handle references to memory
5852 spaces better.
5853
427b248d
JM
58542013-05-16 Jason Merrill <jason@redhat.com>
5855
5856 * Make-lang.in (cc1$(exeext)): Use link mutex.
5857
44d90fe1
PC
58582013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5859
5860 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5861 to simply use OPT_Wpointer_arith.
5862 (build_unary_op): Likewise.
5863
4e7d7b3d
JJ
58642013-04-03 Jakub Jelinek <jakub@redhat.com>
5865
5866 PR c/19449
5867 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
5868 argument. If set, or it temporarily for parsing of the first
5869 argument into force_folding_builtin_constant_p.
5870 (c_parser_postfix_expression): Adjust callers.
5871
839b422f
RB
58722013-03-21 Richard Biener <rguenther@suse.de>
5873
5874 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
5875 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
5876
2ee028f1
MP
58772013-02-12 Marek Polacek <polacek@redhat.com>
5878
5879 PR c/44938
5880 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
5881 origtypes to NULL.
5882
8824edff
JJ
58832013-01-24 Jakub Jelinek <jakub@redhat.com>
5884
5885 PR c/56078
5886 * c-typeck.c (set_nonincremental_init_from_string): If
5887 constructor_max_index is NULL, treat it as if tree_int_cst_lt
5888 returned false.
5889 (process_init_element): Likewise.
5890
eadd3d0d
JJ
58912012-12-20 Jakub Jelinek <jakub@redhat.com>
5892
5893 PR c++/55619
5894 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
5895 argument, don't call default_function_array_conversion
5896 nor c_fully_fold here.
5897 (c_parser_asm_statement): Adjust callers.
5898 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
5899 and outputs here, and call default_function_array_conversion
5900 on inputs that don't need to be addressable.
5901
f8a93a2e
JJ
59022012-12-18 Jakub Jelinek <jakub@redhat.com>
5903
5904 PR c/39464
5905 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
5906 warning require that both c_common_unsigned_type as well as
5907 c_common_signed_type is the same for both mvl and mvr types.
5908
9771b263
DN
59092012-11-16 Diego Novillo <dnovillo@google.com>
5910
5911 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
5912
5913 * c-common.c: Use new vec API in vec.h.
5914 * c-common.h: Likewise.
5915 * c-gimplify.c: Likewise.
5916 * c-pragma.c: Likewise.
5917 * c-pretty-print.c: Likewise.
5918 * c-pretty-print.h: Likewise.
5919 * c-semantics.c: Likewise.
5920 * c-decl.c: Likewise.
5921 * c-parser.c: Likewise.
5922 * c-tree.h: Likewise.
5923 * c-typeck.c: Likewise.
5924
880661a4
JW
59252012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
5926
5927 PR c++/54930
5928 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
5929
077d1abe
MLI
59302012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5931
5932 PR c/53066
5933 * c-decl.c (warn_if_shadowing): Do not warn if a variable
5934 shadows a function, unless the variable is a function or a
5935 pointer-to-function.
5936
3a785c97
JJ
59372012-10-12 Jakub Jelinek <jakub@redhat.com>
5938
5939 PR c/54381
5940 * c-parser.c (struct c_tree_loc_pair): Removed.
5941 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
5942 add location_t * and tree * arguments, fill in array of 3
5943 sizeof_arg trees and corresponding locs.
5944 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
5945 c_parser_expr_list callers.
5946 (c_parser_postfix_expression_after_primary): Likewise. Pass
5947 array of 3 sizeof_arg trees and locs (corresponding to first
5948 3 arguments) to sizeof_pointer_memaccess_warning.
5949
703c8606
LC
59502012-10-09 Lawrence Crowl <crowl@google.com>
5951
5952 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
5953 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
5954 hash table.
5955
5d9de0d0
PC
59562012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
5957
5958 PR c++/54194
5959 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
5960 call.
5961
a212e43f
MG
59622012-10-09 Marc Glisse <marc.glisse@inria.fr>
5963
5964 PR c++/54427
5965 * c-typeck.c: Include c-common.h.
5966 (enum stv_conv): Moved to c-common.h.
5967 (scalar_to_vector): Moved to c-common.c.
5968 (build_binary_op): Adapt to scalar_to_vector's new prototype.
5969 * Make-lang.in: c-typeck.c depends on c-common.h.
5970
3b78de56
AC
59712012-10-04 Arnaud Charlet <charlet@adacore.com>
5972
5973 * c-decl.c (c_write_global_declarations): Fix handling of
5974 -fdump-ada-spec*.
5975
78c60e3d
SS
59762012-09-30 Sharad Singhai <singhai@google.com>
5977
5978 * c-decl.c (c_write_global_declarations): Use a different method
5979 to determine if the dump has ben initialized.
5980
9f33203d
JM
59812012-09-14 Joseph Myers <joseph@codesourcery.com>
5982
5983 PR c/54552
5984 * c-typeck.c (c_cast_expr): When casting to a type requiring
5985 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
5986 c_fully_fold first.
5987
a27d595d
JM
59882012-09-14 Joseph Myers <joseph@codesourcery.com>
5989
5990 PR c/54103
5991 * c-typeck.c (build_unary_op): Pass original argument of
5992 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
5993 any C_MAYBE_CONST_EXPR, if it has integer operands.
5994 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
5995 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
5996 to c_objc_common_truthvalue_conversion, then remove any
5997 C_MAYBE_CONST_EXPR, if they have integer operands. Use
5998 c_objc_common_truthvalue_conversion not
5999 c_common_truthvalue_conversion.
6000 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
6001 call note_integer_operands for arguments with integer operands
6002 that are not integer constants.
6003
9feb29df
JJ
60042012-09-13 Jakub Jelinek <jakub@redhat.com>
6005
6006 PR c/54559
6007 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
6008 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
6009
d409320c
JJ
60102012-08-31 Jakub Jelinek <jakub@redhat.com>
6011
6012 PR c/54428
6013 * c-convert.c (convert): Don't call fold_convert_loc if
6014 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
6015 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
6016 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
6017
6265d07c
JJ
60182012-08-24 Jakub Jelinek <jakub@redhat.com>
6019
6020 PR c/54355
6021 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
6022 for nested and empty_ok arguments in the call to
6023 c_parser_declaration_or_fndef.
6024
1a4049e7
JJ
60252012-08-17 Jakub Jelinek <jakub@redhat.com>
6026
6027 * c-tree.h (c_last_sizeof_arg): Declare.
6028 * c-parser.c (struct c_tree_loc_pair): New type.
6029 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
6030 non-NULL.
6031 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
6032 (c_parser_postfix_expression_after_primary): Likewise. Call
6033 sizeof_pointer_memaccess_warning if needed.
6034 (sizeof_ptr_memacc_comptypes): New function.
6035 * c-typeck.c (c_last_sizeof_arg): New global variable.
6036 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
6037
0229aee9
UB
60382012-07-24 Uros Bizjak <ubizjak@gmail.com>
6039
6040 * c-lang.h (lang_decl): Add variable_size GTY option.
6041
7ee2468b
SB
60422012-07-16 Steven Bosscher <steven@gcc.gnu.org>
6043
6044 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
6045 * Make-lang.in: Fix dependencies.
6046
d4a10d0a
SB
60472012-06-29 Steven Bosscher <steven@gcc.gnu.org>
6048
6049 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
6050 and add language Makefile hooks.
6051 * config-lang.in: New file.
6052 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
6053 add the required "normal" config-lang.in rules.
6054 * c-lang.h: Moved from gcc/ to here.
6055 * c-tree.h: Likewise.
6056 * c-objc-common.c: Likewise.
6057 * c-objc-common.h: Likewise.
6058 * c-typeck.c: Likewise.
6059 * c-convert.c: Likewise.
6060 * c-lang.c: Likewise.
6061 * c-aux-info.c: Likewise.
6062 * c-errors.c: Likewise.
6063 * gccspec.c: Likewise.
6064 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
6065 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
6066\f
a5544970 6067Copyright (C) 2012-2019 Free Software Foundation, Inc.
d4a10d0a
SB
6068
6069Copying and distribution of this file, with or without modification,
6070are permitted in any medium without royalty provided the copyright
6071notice and this notice are preserved.