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