]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
Reduce header dependencies in <iterator>
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
fd4485aa
ML
12019-05-09 Martin Liska <mliska@suse.cz>
2
3 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
4 __MAX.
5 (c_parser_gimple_unary_expression): Parse also binary expression
6 __MIN and __MAX.
7 (c_parser_gimple_parentized_binary_expression): New function.
8
d276406a
ML
92019-05-09 Martin Liska <mliska@suse.cz>
10
11 * gimple-parser.c (struct gimple_parser): Add probability.
12 for gimple_parser_edge.
13 (gimple_parser::push_edge): Add new argument probability.
14 (c_parser_gimple_parse_bb_spec): Parse also probability
15 if present.
16 (c_parser_parse_gimple_body): Set edge probability.
17 (c_parser_gimple_compound_statement): Consume token
18 before calling c_parser_gimple_goto_stmt.
19 Parse BB counts.
20 (c_parser_gimple_statement): Pass new argument.
21 (c_parser_gimple_goto_stmt): Likewise.
22 (c_parser_gimple_if_stmt): Likewise.
23 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
24 * c-parser.c (c_parser_declaration_or_fndef): Pass
25 hot_bb_threshold argument.
26 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
27 field.
28 (c_parser_gimple_parse_bb_spec_edge_probability): New.
29
f179b64e
JJ
302019-04-26 Jakub Jelinek <jakub@redhat.com>
31
32 PR debug/90197
33 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
34 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
35 (c_parser_do_statement): Likewise.
36 (c_parser_for_statement): Likewise. Formatting fixes.
37 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
38 emit DEBUG_BEGIN_STMTs if needed.
39
e7178413
JJ
402019-04-19 Jakub Jelinek <jakub@redhat.com>
41
c280b7ee
JJ
42 PR c/89888
43 * c-typeck.c (struct c_switch): Remove outside_range_p member.
44 (c_start_case): Don't clear it.
45 (do_case): Adjust c_add_case_label caller.
46 (c_finish_case): Adjust c_do_switch_warnings caller.
47
e7178413
JJ
48 PR c++/90108
49 * c-decl.c (merge_decls): If remove is main variant and
50 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
51 variant that has newdecl as TYPE_NAME if any.
52
60a2c645
JJ
532019-04-12 Jakub Jelinek <jakub@redhat.com>
54
55 PR c/89933
56 * c-decl.c (merge_decls): When newdecl's type is its main variant,
57 don't try to remove it from the variant list, but instead assert
58 it has no variants.
59
2a82beaa
RB
602019-04-01 Richard Biener <rguenther@suse.de>
61
62 PR c/71598
63 * c-tree.h (c_get_alias_set): Declare.
64 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
65 * c-objc-common.c (c_get_alias_set): Treat enumeral types
66 as the underlying integer type.
67
bec1da64
MS
682019-03-19 Martin Sebor <msebor@redhat.com>
69
70 PR tree-optimization/89688
71 * c-decl.c (finish_decl): Call braced_lists_to_string for more
72 kinds of initializers.
73
855cd9b1
JJ
742019-03-19 Jakub Jelinek <jakub@redhat.com>
75
76 PR c/89734
77 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
78 return type even if quals_used is 0. Formatting fixes.
79
baa09dc5
RB
802019-03-14 Richard Biener <rguenther@suse.de>
81
82 * c-tree.h (enum c_declspec_il): New.
83 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
84 enum bitfield.
85 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
86 Pass start pass and declspec_il to c_parser_parse_gimple_body.
87 (c_parser_declspecs): Adjust.
88 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
89 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
90 and bitmap.h.
91 (struct gimple_parser): New.
92 (gimple_parser::push_edge): New method.
93 (c_parser_gimple_parse_bb_spec): New helper.
94 (c_parser_parse_gimple_body): Get start pass and IL specification.
95 Initialize SSA and CFG.
96 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
97 Build a gimple_parser parsing state and pass it along.
98 (c_parser_gimple_statement): Change intermittend __PHI internal
99 function argument for the edge.
100 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
101 (c_parser_gimple_goto_stmt): Record edges to build.
102 (c_parser_gimple_if_stmt): Likewise.
103 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
104 (c_parser_gimple_or_rtl_pass_list): Likewise.
105
a3f9f006
ML
1062019-03-11 Martin Liska <mliska@suse.cz>
107
108 * c-decl.c (check_for_loop_decls): Wrap an option name
109 in a string format message and fix GNU coding style.
110 * c-parser.c (c_parser_declspecs): Likewise.
111
1db01ff9
JJ
1122019-03-08 Jakub Jelinek <jakub@redhat.com>
113
114 PR tree-optimization/89550
115 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
116 returned true.
117 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
118 or warning returned true.
119
66dcb747
JJ
1202019-02-28 Jakub Jelinek <jakub@redhat.com>
121
122 PR c/89525
123 * c-typeck.c (convert_arguments): Call inform_declaration only if
124 the previous warning_at call returned true.
125
2263c9f2
TS
1262019-02-22 Thomas Schwinge <thomas@codesourcery.com>
127
128 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
129 parameter. Adjust all users.
130 (c_parser_oacc_simple_clause): Replace parser with loc formal
131 parameter. Adjust all users.
132
19695f4d
CLT
1332019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
134
135 PR c/87924
136 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
137 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
138
5f88ba10
JJ
1392019-02-15 Jakub Jelinek <jakub@redhat.com>
140
141 PR c/89340
142 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
143 before c_decl_attributes rather than after it.
144
cfc30fd1
JJ
1452019-02-06 Jakub Jelinek <jakub@redhat.com>
146
147 PR c/89211
148 * c-parser.c (c_parser_declaration_or_fndef): Don't update
149 DECL_ARGUMENTS of d if it has been defined already. Use a single if
150 instead of 3 nested ifs.
151
fbe83e6b
JM
1522019-02-06 Joseph Myers <joseph@codesourcery.com>
153
154 PR c/88584
155 * c-decl.c (finish_decl): Do not complete array types for arrays
156 with external linkage not at file scope.
157
f461f938
RB
1582019-02-05 Richard Biener <rguenther@suse.de>
159
160 PR c/88606
161 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
162 all type variants when not supported.
163
fe509359
JJ
1642019-01-30 Jakub Jelinek <jakub@redhat.com>
165
166 PR c/89061
167 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
168 * c-decl.c (decl_jump_unsafe): Return false for
169 C_DECL_COMPOUND_LITERAL_P decls.
170 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
171
6a335b96
JJ
1722019-01-29 Jakub Jelinek <jakub@redhat.com>
173
f4b7e754
JJ
174 PR c/89045
175 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
176 scope.
177
6a335b96
JJ
178 PR c/86125
179 * c-decl.c (last_fileptr_type): Remove.
180 (last_structptr_types): New variable.
181 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
182 {old,new}rettype instead of the types themselves. Assert
183 last_structptr_types array has the same number of elements
184 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
185 argument oldtype and newtype. Instead of handling
186 just fileptr_type_node specially, handle all builtin_structptr_types
187 pointer nodes. Formatting fix.
188
d8b5a1a0
MS
1892019-01-24 Martin Sebor <msebor@redhat.com>
190
191 PR c/86125
192 PR c/88886
193 PR middle-end/86308
194 * c-decl.c (match_builtin_function_types): Add arguments.
195 (diagnose_mismatched_decls): Diagnose mismatched declarations
196 of built-ins more strictly.
197
e21c4491
JJ
1982019-01-24 Jakub Jelinek <jakub@redhat.com>
199
200 PR c++/88976
201 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
202 on #pragma omp cancel with different modifiers.
203
420183d9
L
2042019-01-18 H.J. Lu <hongjiu.lu@intel.com>
205
206 PR c/51628
207 PR c/88664
208 * c-typeck.c (convert_for_assignment): Upate the
209 warn_for_address_or_pointer_of_packed_member call.
210
17ad43dd
TH
2112019-01-16 Tom Honermann <tom@honermann.net>
212 Jason Merrill <jason@redhat.com>
213
214 * c-typeck.c (digest_init): Revised the error message produced for
215 ill-formed cases of array initialization with a string literal.
216 (error_init): Make variadic.
217
5f07d78a
JJ
2182019-01-12 Jakub Jelinek <jakub@redhat.com>
219
220 * c-typeck.c (convert_for_assignment): Fix a comment typo.
221
c4581bbf
JJ
2222019-01-07 Jakub Jelinek <jakub@redhat.com>
223
224 PR c/88701
225 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
226 if current_function_decl is non-NULL.
227
65c5b1eb
JM
2282019-01-07 Joseph Myers <joseph@codesourcery.com>
229
230 PR c/88720
231 PR c/88726
232 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
233 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
234 functions declared but never defined only for external scope, not
235 for other scopes.
236
d8fcab68
JJ
2372019-01-07 Jakub Jelinek <jakub@redhat.com>
238
239 PR c++/85052
240 * c-parser.c (c_parser_postfix_expression): Parse
241 __builtin_convertvector.
242
a5544970
JJ
2432019-01-01 Jakub Jelinek <jakub@redhat.com>
244
245 Update copyright years.
246
da77eace
L
2472018-12-20 H.J. Lu <hongjiu.lu@intel.com>
248
249 PR c/51628
250 * c-typeck.c (convert_for_assignment): Call
251 warn_for_address_or_pointer_of_packed_member.
252
1edf8866
SB
2532018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
254
255 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
256 a more specific error message (instead of just falling through).
257
db4fd626
SB
2582018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
259
260 * c-parser.c (c_parser_asm_statement): Keep track of the location each
261 asm qualifier is first seen; use that to give nicer "duplicate asm
262 qualifier" messages. Delete 'quals" variable, instead pass the
263 "is_volatile_ flag to build_asm_stmt directly.
264 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
265 * c-typeck.c (build_asm_stmt): Ditto; adjust.
266
9c9cfcbb
SB
2672018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
268
269 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
270 "done" boolean variable.
271
a14feb3c
DM
2722018-12-19 David Malcolm <dmalcolm@redhat.com>
273
274 PR c++/87504
275 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
276 Move from here to gcc-rich-location.h and gcc-rich-location.c.
277 (build_binary_op): Use struct op_location_t and
278 class binary_op_rich_location.
279
6d939173
JJ
2802018-12-11 Jakub Jelinek <jakub@redhat.com>
281
282 PR sanitizer/88426
283 * c-convert.c (convert): Call c_fully_fold before calling
284 ubsan_instrument_float_cast.
285
b7055028
SB
2862018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
287
288 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
289 setting "quals".
290
5b76e75f
SB
2912018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
292
293 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
294 after asm. Pass a flag for it to build_asm_expr.
295 * c-tree.h (build_asm_expr): Update declaration.
296 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
297 set ASM_INLINE_P.
298
30bd42b9
SB
2992018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
300
301 PR inline-asm/55681
302 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
303 combination of volatile and goto, in any order, without repetitions.
304
9df6c0e4
JB
3052018-12-04 James Norris <jnorris@codesourcery.com>
306 Cesar Philippidis <cesar@codesourcery.com>
307 Julian Brown <julian@codesourcery.com>
308
309 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
310 code.
311
f44697b7
RB
3122018-11-30 Richard Biener <rguenther@suse.de>
313
314 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
315 _Literal (type) { ... } as empty aggregate or vector constructor.
316
550dfbdc
MS
3172018-11-29 Martin Sebor <msebor@redhat.com>
318
319 PR c/88091
320 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
321 (convert_arguments): Add comments. Pass additional argument to
322 the function above.
323
673670da
MS
3242018-11-29 Martin Sebor <msebor@redhat.com>
325
326 PR c/88172
327 PR testsuite/88208
328 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
329
db1d09b0
MS
3302018-11-23 Martin Sebor <msebor@redhat.com>
331
332 PR testsuite/88098
333 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
334 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
335
98f08eb8
MS
3362018-11-20 Martin Sebor <msebor@redhat.com>
337
338 * c-parser.c (c_parser_has_attribute_expression): New function.
339 (c_parser_attribute): New function.
340 (c_parser_attributes): Move code into c_parser_attribute.
341 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
342
cd5da983
MS
3432018-11-15 Martin Sebor <msebor@redhat.com>
344
345 PR c/83656
346 * c-decl.c (header_for_builtin_fn): Declare.
347 (diagnose_mismatched_decls): Diagnose declarations of built-in
348 functions without a prototype.
349 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
350 (convert_argument): Same.
351 (convert_arguments): Factor code out into convert_argument.
352 Detect mismatches between built-in formal arguments in calls
353 to built-in without prototype.
354 (build_conditional_expr): Same.
355 (type_or_builtin_type): New function.
356 (convert_for_assignment): Add argument. Conditionally issue
357 warnings instead of errors for mismatches.
358
620e594b
DM
3592018-11-13 David Malcolm <dmalcolm@redhat.com>
360
361 * c-decl.c: Replace "source_location" with "location_t".
362 * c-tree.h: Likewise.
363 * c-typeck.c: Likewise.
364 * gimple-parser.c: Likewise.
365
3179ebae
JJ
3662018-11-09 Jakub Jelinek <jakub@redhat.com>
367
81a227c6
JJ
368 * c-parser.c (c_parser_omp_clause_final): Use
369 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
370 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
371 parsing instead of c_parser_paren_condition.
372 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
373 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
374 c_fully_fold instead of c_parser_condition.
375 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
376 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
377 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
378 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
379 c_parser_expr_no_commas instead of c_parser_expression.
380
98c91c56
JJ
381 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
382 reduction clause with inscan modifier.
383
3179ebae
JJ
384 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
385 clauses other than atomic_default_mem_order.
386
28567c40
JJ
3872018-11-08 Jakub Jelinek <jakub@redhat.com>
388
389 * c-parser.c: Include memmode.h.
390 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
391 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
392 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
393 task_reduction clauses.
394 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
395 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
396 section, or lvalue assignment expression.
397 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
398 (c_parser_omp_clause_lastprivate): Parse optional
399 conditional: modifier.
400 (c_parser_omp_clause_hint): Require constant integer expression rather
401 than just integer expression.
402 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
403 clause.
404 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
405 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
406 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
407 functions.
408 (c_parser_omp_clause_depend): Parse iterator modifier and handle
409 iterators. Parse mutexinoutset and depobj kinds.
410 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
411 callers.
412 (c_parser_omp_all_clauses): Likewise. Handle
413 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
414 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
415 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
416 default memory order from requires directive if any. Adjust
417 c_finish_omp_atomic caller.
418 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
419 (c_parser_omp_flush): Parse flush with memory-order-clause.
420 (c_parser_omp_for_loop): Allow NE_EXPR even in
421 OpenMP loops, adjust c_finish_omp_for caller.
422 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
423 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
424 Allow to be called while parsing combined parallel master.
425 Parse combined master taskloop{, simd}.
426 (c_parser_omp_parallel): Parse combined
427 parallel master{, taskloop{, simd}} constructs.
428 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
429 (OMP_TASKGROUP_CLAUSE_MASK): Define.
430 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
431 (OMP_TASKWAIT_CLAUSE_MASK): Define.
432 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
433 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
434 around teams body. Use SET_EXPR_LOCATION.
435 (c_parser_omp_target_data): Allow target data
436 with only use_device_ptr clauses.
437 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
438 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
439 (c_parser_omp_requires): New function.
440 (c_finish_taskloop_clauses): New function.
441 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
442 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
443 declaration. Disallow in_reduction clause when combined with parallel
444 master.
445 (c_parser_omp_construct): Adjust c_parser_omp_master and
446 c_parser_omp_taskgroup callers.
447 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
448 other than cancel.
449 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
450 like OMP_CLAUSE_REDUCTION.
451 (handle_omp_array_sections): Likewise. Call save_expr on array
452 reductions before calling build_index_type. Handle depend clauses
453 with iterators.
454 (struct c_find_omp_var_s): New type.
455 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
456 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
457 with static, runtime or auto schedule kinds. Call save_expr for whole
458 array reduction sizes. Diagnose reductions with zero sized elements
459 or variable length structures. Diagnose nogroup clause used with
460 reduction clause(s). Handle depend clause with
461 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
462 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
463 some different type for other kinds. Use build_unary_op with
464 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
465 Handle depend clauses with iterators. Remove no longer needed special
466 case that predetermined const qualified vars may be specified in
467 firstprivate clause. Complain if const qualified vars are mentioned
468 in data-sharing clauses other than firstprivate or shared. Use
469 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
470 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
471 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
472 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
473
7e2de6df
DM
4742018-10-29 David Malcolm <dmalcolm@redhat.com>
475
476 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
477 logic for change to name_hint::operator bool.
478 (undeclared_variable): Likewise.
479 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
480 (c_parser_parameter_declaration): Likewise.
481
9f936c86
JM
4822018-10-17 Joseph Myers <joseph@codesourcery.com>
483
484 * c-errors.c (pedwarn_c11): New function.
485 * c-parser.c (disable_extension_diagnostics): Save
486 warn_c11_c2x_compat and set it to 0.
487 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
488 (c_parser_static_assert_declaration_no_semi): Handle
489 _Static_assert without string constant.
490 * c-tree.h (pedwarn_c11): New prototype.
491
033eb567
DM
4922018-10-17 David Malcolm <dmalcolm@redhat.com>
493
494 * Make-lang.in (selftest-c): New.
495 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
496 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
497 from gcc/Makefile.in.
498
0edf3afe
RB
4992018-10-02 Richard Biener <rguenther@suse.de>
500
501 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
502
8313a764
JM
5032018-09-26 Joseph Myers <joseph@codesourcery.com>
504
505 PR c/87390
506 * c-typeck.c (build_binary_op): Use excess precision for
507 comparisons of integers and floating-point for C11 and later.
508
ce6f0888
MJ
5092018-09-26 Martin Jambor <mjambor@suse.cz>
510
511 PR c/87347
512 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
513 comment.
514
9c4a4b3c
DM
5152018-09-17 David Malcolm <dmalcolm@redhat.com>
516
517 * c-objc-common.c (range_label_for_type_mismatch::get_text):
518 Update for new param.
519 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
520 Likewise.
521
80c6d1f4
MJ
5222018-09-17 Martin Jambor <mjambor@suse.cz>
523
524 PR c/63886
525 * c-parser.c: (warn_for_abs): New function.
526 (c_parser_postfix_expression_after_primary): Call it.
527
4a426e36
BE
5282018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
529
530 * c-typeck.c (digest_init): Shorten overlength strings.
531
6d900107
BE
5322018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
533
534 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
535
b5764229
BE
5362018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
537
538 * c-decl.c (finish_decl): Call braced_list_to_string here ...
539 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
540
22eea6b2
AM
5412018-08-30 Alexander Monakov <amonakov@ispras.ru>
542
543 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
544 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
545
85204e23
DM
5462018-08-27 David Malcolm <dmalcolm@redhat.com>
547
548 PR 87091
549 * c-decl.c (implicitly_declare): Update call to
550 maybe_add_include_fixit to suggest overriding the location, as it
551 is for a note.
552 * c-objc-common.c (c_tree_printer): Update for conversion of
553 show_caret_p to a tri-state.
554
3d78e008
ML
5552018-08-27 Martin Liska <mliska@suse.cz>
556
557 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
558 fndecl_built_in_p and remove check for FUNCTION_DECL if
559 possible.
3d78e008
ML
560 (diagnose_mismatched_decls): Likewise.
561 (merge_decls): Likewise.
562 (warn_if_shadowing): Likewise.
563 (pushdecl): Likewise.
564 (implicitly_declare): Likewise.
565 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
566 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
567 * c-typeck.c (build_function_call_vec): Likewise.
568 (convert_arguments): Likewise.
569
097f82ec
DM
5702018-08-20 David Malcolm <dmalcolm@redhat.com>
571
572 PR other/84889
573 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
574 (diagnose_mismatched_decls): Likewise, in various places.
575 (warn_if_shadowing): Likewise.
576 (implicit_decl_warning): Likewise.
577 (implicitly_declare): Likewise.
578 (undeclared_variable): Likewise.
579 (declare_label): Likewise.
580 (grokdeclarator): Likewise.
581 (start_function): Likewise.
582 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
583 (c_parser_parameter_declaration): Likewise.
584 (c_parser_binary_expression): Likewise.
585 * c-typeck.c (c_expr_sizeof_expr): Likewise.
586 (parser_build_binary_op): Likewise.
587 (build_unary_op): Likewise.
588 (error_init): Likewise.
589 (pedwarn_init): Likewise.
590 (warning_init): Likewise.
591 (convert_for_assignment): Likewise.
592
96e6ae57
DM
5932018-08-15 David Malcolm <dmalcolm@redhat.com>
594
595 * c-objc-common.c: Include "gcc-rich-location.h".
596 (c_tree_printer): Move implemenation of '%T' to...
597 (print_type): ...this new function.
598 (range_label_for_type_mismatch::get_text): New function.
599 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
600 range for the various ic_argpass cases.
601 (class maybe_range_label_for_tree_type_mismatch): New class.
602 (build_binary_op): Use it when calling binary_op_error.
603
0cd020ae
PK
6042018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
605
606 * c-decl.c (start_decl): Do not warn if variables is named as main
607 and is a local variable.
608
72733314
IS
6092018-08-15 Iain Sandoe <iain@sandoe.co.uk>
610
611 PR c/19315
612 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
613 objects of unknown size.
614
23aa9f7c
MS
6152018-08-13 Martin Sebor <msebor@redhat.com>
616
617 PR tree-optimization/71625
618 * c-parser.c (c_parser_declaration_or_fndef): Call
619 braced_list_to_string.
620
e5e7e50d
BH
6212018-08-03 Bogdan Harjoc <harjoc@gmail.com>
622
623 PR c/86690
624 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
625 errors.
626
8a45b051
MS
6272018-08-01 Martin Sebor <msebor@redhat.com>
628
629 PR tree-optimization/86650
630 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
631 and TREE_BLOCK (t) from within percent_K_format to this callsite.
632
5922dcb5
JJ
6332018-08-01 Jakub Jelinek <jakub@redhat.com>
634
635 PR c/85704
636 * c-typeck.c (init_field_decl_cmp): New function.
637 (output_pending_init_elements): Use it for field comparisons
638 instead of pure bit_position comparisons.
639
9b452033
JJ
6402018-07-12 Jakub Jelinek <jakub@redhat.com>
641
642 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
643 type here, instead add "omp declare target implicit" attribute.
644 (finish_decl): Diagnose vars without mappable type here.
645
829c6349
CLT
6462018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
647 Thomas Schwinge <thomas@codesourcery.com>
648 Cesar Philippidis <cesar@codesourcery.com>
649
650 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
651 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
652 to their non-present_or_* counterparts. Make 'self' an alias to
653 PRAGMA_OACC_CLAUSE_HOST.
654 (c_parser_oacc_data_clause): Update GOMP mappings for
655 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
656 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
657 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
658 Remove support for present_or_* clauses.
659 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
660 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
661 (OACC_DECLARE_CLAUSE_MASK): Likewise.
662 (OACC_DATA_CLAUSE_MASK): Likewise.
663 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
664 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
665 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
666 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
667 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
668
e197e64e
KV
6692018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
670
671 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
672 * gimple-parser.c (c_parser_gimple_statement): Likewise.
673 (c_parser_gimple_unary_expression): Likewise.
674
487f2f61
JJ
6752018-06-15 Jakub Jelinek <jakub@redhat.com>
676
677 PR c/86093
678 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
679 before doing POINTER_DIFF_EXPR.
680
e4d44a37
MP
6812018-06-07 Marek Polacek <polacek@redhat.com>
682
683 PR c/85318
684 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
685 for loop initial declarations.
686
b67b9225
DP
6872018-05-30 David Pagan <dave.pagan@oracle.com>
688
689 PR c/55976
690 * c-decl.c (grokdeclarator): Update check for return type warnings.
691 (start_function): Likewise.
692 (finish_function): Likewise.
693 * c-typeck.c (c_finish_return): Update check for return type warnings.
694 Pass OPT_Wreturn_type to pedwarn when appropriate.
695
c566cc9f
RS
6962018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
697
698 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
699 __FMA_EXPR handlng.
700
e4f81565
RS
7012018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
702
703 * gimple-parser.c: Include internal-fn.h.
704 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
705 (c_parser_gimple_call_internal): New function.
706 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
707 Fix typos in comment.
708
79e7b1fe
JJ
7092018-05-10 Jakub Jelinek <jakub@redhat.com>
710
711 PR c++/85662
712 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
713 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
714 fold_convert_loc.
715 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
716 fold_offsetof_1, pass argtype as TYPE to it and drop the
717 fold_convert_loc.
718
f7584c81
DP
7192018-05-02 David Pagan <dave.pagan@oracle.com>
720
721 PR c/30552
722 * c-decl.c (old_style_parameter_scope): New function.
723 * c-parser.c (c_parser_postfix_expression): Check for statement
724 expressions in old-style function parameter list declarations.
725 * c-parser.h (old_style_parameter_scope): New extern declaration.
726
b33a0cb3
JJ
7272018-04-25 Jakub Jelinek <jakub@redhat.com>
728
729 PR sanitizer/84307
730 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
731 it is not TREE_STATIC.
732 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
733 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
734 its COMPOUND_LITERAL_EXPR_DECL.
735
c5c5822a
JM
7362018-03-21 Joseph Myers <joseph@codesourcery.com>
737
738 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
739 where all functions return the same _FloatN or _FloatNx type,
740 treat integer types as _Float64 instead of double.
741
aa1c9429
JJ
7422018-03-21 Jakub Jelinek <jakub@redhat.com>
743
744 PR c/84999
745 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
746 building vector comparison, diagnose it and return error_mark_node.
747
9bb45a95
JJ
7482018-03-15 Jakub Jelinek <jakub@redhat.com>
749
750 PR c/84853
751 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
752 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
753 INTEGER_TYPE element type.
754
ada6bad9
DP
7552018-03-13 David Pagan <dave.pagan@oracle.com>
756
757 PR c/46921
758 * c-typeck.c (output_init_element): Ensure field initializer
759 expression is always evaluated if there are side effects.
760
849bbdb9
JJ
7612018-03-06 Jakub Jelinek <jakub@redhat.com>
762
763 PR c/84721
764 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
765 !building_stmt_list_p ().
766
d74641bd
RS
7672018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
768
769 PR c/84305
770 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
771 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
772 and include the BIND_EXPR in the list of things that need to be
773 pre-evaluated.
774
0444aa9c
NS
7752018-02-09 Nathan Sidwell <nathan@acm.org>
776
777 PR c/84293
778 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
779 to strict_aliasing_warning.
780
7c30b12a
PC
7812018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
782
783 * c-typeck.c (really_start_incremental_init, push_init_level,
784 set_nonincremental_init, output_init_element, process_init_element):
785 Use DECL_UNNAMED_BIT_FIELD.
786
2be4dfcb
MP
7872018-01-31 Marek Polacek <polacek@redhat.com>
788
789 PR c/81779
790 * c-parser.c (c_parser_compound_statement_nostart): Call
791 expansion_point_location_if_in_system_header.
792
bb9869d5
DM
7932018-01-17 David Malcolm <dmalcolm@redhat.com>
794
795 PR c++/83814
796 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
797 the C part.
798
b4923738
JJ
7992018-01-13 Jakub Jelinek <jakub@redhat.com>
800
801 PR c/83801
802 * c-tree.h (decl_constant_value_1): Add a bool argument.
803 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
804 returning a CONSTRUCTOR if it is true. Use error_operand_p.
805 (decl_constant_value): Adjust caller.
806 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
807 decl_constant_value_1 as IN_INIT. Otherwise, punt if
808 decl_constant_value returns initializer that has BLKmode or
809 array type.
810 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
811
928686b1
RS
8122018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
813 Alan Hayward <alan.hayward@arm.com>
814 David Sherwood <david.sherwood@arm.com>
815
816 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
817 TYPE_VECTOR_SUBPARTS.
818
85ec4feb
JJ
8192018-01-03 Jakub Jelinek <jakub@redhat.com>
820
821 Update copyright years.
822
913884f7
JJ
8232018-01-01 Jakub Jelinek <jakub@redhat.com>
824
825 PR c/83595
826 * c-parser.c (c_parser_braced_init, c_parser_initelt,
827 c_parser_conditional_expression, c_parser_cast_expression,
828 c_parser_sizeof_expression, c_parser_alignof_expression,
829 c_parser_postfix_expression, c_parser_omp_declare_reduction,
830 c_parser_transaction_expression): Use set_error () method instead
831 of setting value member to error_mark_node.
832
c6cfa2bf
MM
8332017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
834
835 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
836 and _Float<N>X built-in functions.
837
11d29d63
JJ
8382017-12-22 Jakub Jelinek <jakub@redhat.com>
839
14ec014e
JJ
840 PR debug/83550
841 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
842 TYPE_STUB_DECL and call rest_of_type_compilation before processing
843 incomplete vars rather than after it.
844
11d29d63
JJ
845 PR debug/83547
846 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
847 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
848 and consider empty ones if there are no other stmts. For
849 -Wunused-value walk all statements before the one only followed by
850 DEBUG_BEGIN_STMTs.
851
170a8bd6 8522017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 853 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
854
855 * c-parser.c (c_parser_while_statement): Add unroll parameter and
856 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
857 (c_parser_do_statement): Likewise.
858 (c_parser_for_statement): Likewise.
859 (c_parser_statement_after_labels): Adjust calls to above.
860 (c_parse_pragma_ivdep): New static function.
861 (c_parser_pragma_unroll): Likewise.
862 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
863 <PRAGMA_UNROLL>: New case.
864
01512446
JJ
8652017-12-19 Jakub Jelinek <jakub@redhat.com>
866
867 * c-typeck.c (comptypes_internal, function_types_compatible_p,
868 perform_integral_promotions, digest_init): Replace Yoda conditions
869 with typical order conditions.
870 * c-decl.c (check_bitfield_type_and_width): Likewise.
871
c65e18d3
BE
8722017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
873
874 * c-typeck.c (c_safe_arg_type_equiv_p,
875 c_safe_function_type_cast_p): New function.
876 (build_c_cast): Implement -Wcast-function-type.
877
b7280579
RB
8782017-12-14 Richard Biener <rguenther@suse.de>
879
880 PR c/83415
881 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
882 like REALPART_EXPR for the behavior of whether its operand
883 is an lvalue.
884
49e6a6c0
MP
8852017-12-12 Marek Polacek <polacek@redhat.com>
886
887 PR c/82679
888 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
889
96a95ac1
AO
8902017-12-12 Alexandre Oliva <aoliva@redhat.com>
891
892 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
893 * c-parser.c (add_debug_begin_stmt): New.
894 (c_parser_declaration_or_fndef): Call it.
895 (c_parser_compound_statement_nostart): Likewise.
896 (c_parser_statement_after_labels): Likewise.
897 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
898
4b2b493f
JM
8992017-12-07 Joseph Myers <joseph@codesourcery.com>
900
901 * c-decl.c (build_compound_literal): Add parameter alignas_align
902 and set alignment of decl if nonzero.
903 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
904 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
905 qualifier.
906 (c_parser_struct_declaration): Update syntax comment.
907 (c_parser_type_name): Add alignas_ok argument and pass it to
908 c_parser_declspecs.
909 (c_parser_cast_expression): Pass true to c_parser_type_name and
910 give error if a cast used an _Alignas specifier.
911 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
912 give error if sizeof (type-name) used an _Alignas specifier.
913 (c_parser_alignof_expression): Pass true to c_parser_type_name and
914 give error if _Alignof (type-name) used an _Alignas specifier.
915 (c_parser_postfix_expression_after_paren_type): Check specified
916 alignment for a compound literal and pass it to
917 build_compound_literal.
918 * c-parser.h (c_parser_type_name): Update prototype.
919 * c-tree.h (build_compound_literal): Update prototype.
920
5d9ae53d
MS
9212017-12-07 Martin Sebor <msebor@redhat.com>
922
923 PR c/81544
924 * c-decl.c (c_decl_attributes): Look up existing declaration and
925 pass it to decl_attributes.
926
c79144f8
DM
9272017-12-06 David Malcolm <dmalcolm@redhat.com>
928
929 PR c/83236
930 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
931 reserved for use by the implementation.
932
613bc14f
DM
9332017-12-06 David Malcolm <dmalcolm@redhat.com>
934
935 * c-decl.c: Include "c-family/c-spellcheck.h".
936
05abad4c
ML
9372017-12-05 Martin Liska <mliska@suse.cz>
938 Jakub Jelinek <jakub@redhat.com>
939
940 * c-typeck.c (pointer_diff): Add new argument and instrument
941 pointer subtraction.
942 (build_binary_op): Similar for pointer comparison.
943
cc6534d4
JJ
9442017-12-01 Jakub Jelinek <jakub@redhat.com>
945
65791f42
JJ
946 PR c/79153
947 * c-parser.c: Include tree-iterator.h.
948 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
949 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
950 on it.
951
cc6534d4
JJ
952 PR c/83222
953 * c-tree.h (decl_constant_value_1): Declare.
954 * c-typeck.c (decl_constant_value_1): New function.
955 (decl_constant_value): Use it.
956 * c-fold.c (c_fully_fold_internal): If in_init, use
957 decl_constant_value_1 instead of decl_constant_value.
958
5de73c05
JJ
9592017-11-30 Jakub Jelinek <jakub@redhat.com>
960
961 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
962
058f0b9e
JJ
9632017-11-28 Jakub Jelinek <jakub@redhat.com>
964
965 PR sanitizer/81275
966 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
967 c_switch_covers_all_cases_p returns true.
968
5e9d6aa4 9692017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 970 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
971
972 * Make-lang.in (c/c-array-notation.o): Remove.
973 * c-array-notation.c: Delete.
974 * c-decl.c: Remove cilkplus condition.
975 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
976 c_parser_cilk_verify_simd, c_parser_array_notation,
977 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
978 c_parser_cilk_simd_fn_vector_attrs,
979 c_finish_cilk_simd_fn_tokens): Delete.
980 (c_parser_declaration_or_fndef): Remove cilkplus condition.
981 (c_parser_direct_declarator_inner): Ditto.
982 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
983 (c_parser_attributes, c_parser_compound_statement,
984 c_parser_statement_after_labels, c_parser_if_statement,
985 c_parser_switch_statement, c_parser_while_statement,
986 c_parser_do_statement, c_parser_for_statement,
987 c_parser_unary_expression, c_parser_postfix_expression,
988 c_parser_postfix_expression_after_primary,
989 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
990 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
991 support.
992 * c-typeck.c (build_array_ref, build_function_call_vec,
993 convert_arguments,
994 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
995 c_finish_loop, build_binary_op): Remove cilkplus support.
996
9e851845
JJ
9972017-11-28 Jakub Jelinek <jakub@redhat.com>
998
999 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
1000 of build3.
1001
8c7dbea9
BK
10022017-11-14 Boris Kolpackov <boris@codesynthesis.com>
1003
1004 * Make-lang.in (c.install-plugin): Install backend import library.
1005
41521dee
JJ
10062017-11-23 Jakub Jelinek <jakub@redhat.com>
1007
1008 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
1009 pragma_stmt context.
1010
ac9effed
EB
10112017-11-23 Mike Stump <mikestump@comcast.net>
1012 Eric Botcazou <ebotcazou@adacore.com>
1013
1014 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
1015 ANNOTATE_EXPR.
1016 (c_parser_do_statement): Likewise.
1017 (c_parser_for_statement): Likewise.
1018
ce95abc4
DM
10192017-11-22 David Malcolm <dmalcolm@redhat.com>
1020
1021 PR c++/62170
1022 * c-objc-common.c (c_tree_printer): Convert penultimate param from
1023 bool to bool *. Within '%T' handling, if showing an "aka", use
1024 "quoted" param to add appropriate quoting.
1025
974aedcc
MP
10262017-11-22 Marek Polacek <polacek@redhat.com>
1027
1028 PR c++/60336
1029 PR middle-end/67239
1030 PR target/68355
1031 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
1032
d4300cc6
DM
10332017-11-21 David Malcolm <dmalcolm@redhat.com>
1034
1035 PR c/83056
1036 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
1037 earlier failed lookups.
1038
1af4ebf5
MG
10392017-11-21 Marc Glisse <marc.glisse@inria.fr>
1040
1041 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
1042 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
1043
26edace6
DM
10442017-11-20 David Malcolm <dmalcolm@redhat.com>
1045
1046 PR c/81404
1047 * c-decl.c: Include "c-family/known-headers.h".
1048 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
1049 to known-headers.cc.
1050 (class suggest_missing_header): Move to known-header.h.
1051 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
1052 than get_c_name_hint.
1053
b1212255
DM
10542017-11-20 David Malcolm <dmalcolm@redhat.com>
1055
1056 * c-decl.c (get_c_name_hint): New function.
1057 (class suggest_missing_header): New class.
1058 (lookup_name_fuzzy): Call get_c_name_hint and use it to
1059 suggest missing headers to the user.
1060
6c7a259b
DM
10612017-11-20 David Malcolm <dmalcolm@redhat.com>
1062
1063 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1064 Include "c-family/name-hint.h"
1065 (implicit_decl_warning): Convert "hint" from
1066 const char * to name_hint. Pass location to
1067 lookup_name_fuzzy. Suppress any deferred diagnostic if the
1068 warning was not printed.
1069 (undeclared_variable): Likewise for "guessed_id".
1070 (lookup_name_fuzzy): Convert return type from const char *
1071 to name_hint. Add location_t param.
1072 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1073 Include "c-family/name-hint.h"
1074 (c_parser_declaration_or_fndef): Convert "hint" from
1075 const char * to name_hint. Pass location to lookup_name_fuzzy.
1076 (c_parser_parameter_declaration): Likewise.
1077
f9c59f7e
JJ
10782017-11-19 Jakub Jelinek <jakub@redhat.com>
1079
1080 PR c/66618
1081 PR c/69960
1082 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
1083 where needed.
1084 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
1085 handle_omp_array_sections): Likewise.
1086 (digest_init): Don't call decl_constant_value_for_optimization.
1087 * c-tree.h (decl_constant_value_for_optimization): Removed.
1088 * c-fold.c (c_fold_array_ref): New function.
1089 (c_fully_fold_internal): Add LVAL argument, propagate it through
1090 recursive calls. For VAR_P call decl_constant_value and
1091 unshare if not LVAL and either optimizing or IN_INIT. Remove
1092 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
1093 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
1094 (c_fully_fold): Add LVAL argument, pass it through to
1095 c_fully_fold_internal.
1096 (decl_constant_value_for_optimization): Removed.
1097
3ca0dc60
JM
10982017-11-15 Joseph Myers <joseph@codesourcery.com>
1099
1100 PR c/81156
1101 * c-parser.c (check_tgmath_function): New function.
1102 (enum tgmath_parm_kind): New enum.
1103 (c_parser_postfix_expression): Handle __builtin_tgmath.
1104
64a5912c
DM
11052017-10-31 David Malcolm <dmalcolm@redhat.com>
1106
1107 * c-decl.c (implicit_decl_warning): Update for renaming of
1108 pedwarn_at_rich_loc and warning_at_rich_loc.
1109 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
1110 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
1111 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1112 (c_parser_struct_or_union_specifier): Likewise for renaming of
1113 pedwarn_at_rich_loc.
1114 (c_parser_parameter_declaration): Likewise for renaming of
1115 error_at_rich_loc.
1116 * c-typeck.c (build_component_ref): Likewise.
1117 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
1118 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
1119 (set_init_label): Likewise for renaming of error_at_rich_loc.
1120
c1136864
RB
11212017-10-30 Richard Biener <rguenther@suse.de>
1122
1123 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
1124 stmts.
1125
ee5fd23a
MM
11262017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
1127
1128 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
1129 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
1130
1a59ccf2
DM
11312017-10-25 David Malcolm <dmalcolm@redhat.com>
1132
1133 PR c/7356
1134 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
1135 semicolons.
1136
bc1a75dd
JJ
11372017-10-25 Jakub Jelinek <jakub@redhat.com>
1138
1139 PR libstdc++/81706
1140 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
1141 newdecl to corresponding __builtin_ if any.
1142
ff1ff960
PC
11432017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
1144
1145 PR c++/82466
1146 * c-decl.c (diagnose_mismatched_decls): Use
1147 OPT_Wbuiltin_declaration_mismatch.
1148
62e1c678
DM
11492017-10-12 David Malcolm <dmalcolm@redhat.com>
1150
1151 * c-parser.c (c_parser_require): Add "type_is_unique" param and
1152 use it to guard calls to maybe_suggest_missing_token_insertion.
1153 (c_parser_parms_list_declarator): Override default value of new
1154 "type_is_unique" param to c_parser_require.
1155 (c_parser_asm_statement): Likewise.
1156 * c-parser.h (c_parser_require): Add "type_is_unique" param,
1157 defaulting to true.
1158
a92f6726
NS
11592017-10-11 Nathan Sidwell <nathan@acm.org>
1160
1161 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
1162
8e6cdc90
RS
11632017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1164
1165 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
1166 operating on trees as wide_ints.
1167 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
1168 (c_tree_equal): Likewise.
1169
8139a48e
DM
11702017-10-04 David Malcolm <dmalcolm@redhat.com>
1171
1172 * c-decl.c (push_parm_decl): Store c_parm's location into the
1173 PARAM_DECL.
1174 (build_c_parm): Add "loc" param and store it within the c_parm.
1175 * c-parser.c (struct c_parser): Add "last_token_location" field.
1176 (c_parser_consume_token): Store location of the token into the
1177 new field.
1178 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
1179 when handling a FUNCTION_DECL, if it doesn't already have them.
1180 (c_parser_parameter_declaration): Generate a location for the
1181 parameter, and pass it to the call to build_c_parm.
1182 * c-tree.h (struct c_parm): Add field "loc".
1183 (build_c_parm): Add location_t param.
1184 * c-typeck.c (get_fndecl_argument_location): New function.
1185 (inform_for_arg): New function.
1186 (convert_for_assignment): Use inform_for_arg when dealing with
1187 ic_argpass.
1188
2a389958
JJ
11892017-09-29 Jakub Jelinek <jakub@redhat.com>
1190
7d386d45
JJ
1191 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
1192 width is non-NULL.
1193 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
1194 don't SET_DECL_C_BIT_FIELD here.
1195
2a389958
JJ
1196 PR c/82340
1197 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
1198 instead of trying to set just TREE_READONLY manually.
1199
ebc6a85e
TV
12002017-09-16 Tom de Vries <tom@codesourcery.com>
1201
1202 PR c/81875
1203 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
1204 cond itself.
1205
bb75facd
JM
12062017-09-15 Joseph Myers <joseph@codesourcery.com>
1207
1208 PR c/82071
1209 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
1210 for C11.
1211 (build_conditional_expr): For C11, generate result with excess
1212 precision when one argument is an integer and the other is of a
1213 type using excess precision.
1214
1d933576
BE
12152017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
1216
1217 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
1218
267bbb6f
MP
12192017-09-13 Marek Polacek <polacek@redhat.com>
1220
1221 PR c/82167
1222 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
1223 than expr.original_type.
1224
6836632e
NS
12252017-09-12 Nathan Sidwell <nathan@acm.org>
1226
1227 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1228 resort_sorted_fields): Moved from c-family/c-common.c.
1229 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
1230
e035be33
JM
12312017-09-01 Joseph Myers <joseph@codesourcery.com>
1232
1233 PR c/82071
1234 * c-typeck.c (build_atomic_assign): Handle argument with excess
1235 precision. Ensure any EXCESS_PRECISION_EXPR is present in
1236 argument passed to build_binary_op and convert_for_assignment but
1237 not for call to c_fully_fold.
1238 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
1239 Ensure build_binary_op is called with argument with original
1240 semantic type. Avoid calling c_fully_fold with an
1241 EXCESS_PRECISION_EXPR from build_binary_op.
1242
d2e05fcb
JJ
12432017-09-01 Jakub Jelinek <jakub@redhat.com>
1244
1245 PR c/81887
1246 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
1247
b397965c
RS
12482017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1249 Alan Hayward <alan.hayward@arm.com>
1250 David Sherwood <david.sherwood@arm.com>
1251
1252 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
1253 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
1254 m1 and m2 to the signed equivalent of a fixed-point
1255 SCALAR_TYPE_MODE.
1256
14e18d71
DM
12572017-08-24 David Malcolm <dmalcolm@redhat.com>
1258
1259 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
1260 than CAN_HAVE_LOCATION_P when determining whether to use the
1261 location_t value within "value".
1262
7f204c0f
DM
12632017-08-21 David Malcolm <dmalcolm@redhat.com>
1264
1265 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
1266 rather than peeking the location of the first token.
1267 * c-tree.h (c_expr::get_location): New method.
1268
2f687306
DM
12692017-08-21 David Malcolm <dmalcolm@redhat.com>
1270
1271 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
1272 to check_function_arguments.
1273
3e7b80d7
MP
12742017-08-18 Marek Polacek <polacek@redhat.com>
1275
1276 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
1277 commentary.
1278
00aa1fa2
L
12792017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1280
1281 PR c/53037
1282 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
1283 (check_bitfield_type_and_width): Don't allow bit-field with
1284 warn_if_not_aligned type.
1285
da67acb9
MS
12862017-08-14 Martin Sebor <msebor@redhat.com>
1287
1288 PR c/81117
1289 * c-objc-common.c (c_objc_common_init): Handle 'G'.
1290
bb85aa74
MP
12912017-08-11 Marek Polacek <polacek@redhat.com>
1292
1293 PR c/81795
1294 * c-decl.c (pushtag): Only print inform if the warning was printed.
1295 (grokdeclarator): Likewise.
1296
32129a17
DM
12972017-08-10 David Malcolm <dmalcolm@redhat.com>
1298
1299 * c-parser.c (c_parser_error): Rename to...
1300 (c_parser_error_richloc): ...this, making static, and adding
1301 "richloc" parameter, passing it to the c_parse_error call,
1302 rather than calling c_parser_set_source_position_from_token.
1303 (c_parser_error): Reintroduce, reimplementing in terms of the
1304 above, converting return type from void to bool.
1305 (class token_pair): New class.
1306 (struct matching_paren_traits): New struct.
1307 (matching_parens): New typedef.
1308 (struct matching_brace_traits): New struct.
1309 (matching_braces): New typedef.
1310 (get_matching_symbol): New function.
1311 (c_parser_require): Add param MATCHING_LOCATION, using it to
1312 highlight matching "opening" tokens for missing "closing" tokens.
1313 (c_parser_skip_until_found): Likewise.
1314 (c_parser_static_assert_declaration_no_semi): Convert explicit
1315 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
1316 class matching_parens, so that the pertinent open parenthesis is
1317 highlighted when there are problems locating the close
1318 parenthesis.
1319 (c_parser_struct_or_union_specifier): Likewise.
1320 (c_parser_typeof_specifier): Likewise.
1321 (c_parser_alignas_specifier): Likewise.
1322 (c_parser_simple_asm_expr): Likewise.
1323 (c_parser_braced_init): Likewise, for matching_braces.
1324 (c_parser_paren_condition): Likewise, for matching_parens.
1325 (c_parser_switch_statement): Likewise.
1326 (c_parser_for_statement): Likewise.
1327 (c_parser_asm_statement): Likewise.
1328 (c_parser_asm_operands): Likewise.
1329 (c_parser_cast_expression): Likewise.
1330 (c_parser_sizeof_expression): Likewise.
1331 (c_parser_alignof_expression): Likewise.
1332 (c_parser_generic_selection): Likewise.
1333 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
1334 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
1335 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
1336 In case CPP_OPEN_PAREN, pass loc_open_paren to the
1337 c_parser_skip_until_found call.
1338 (c_parser_objc_class_definition): Use class matching_parens as
1339 above.
1340 (c_parser_objc_method_decl): Likewise.
1341 (c_parser_objc_try_catch_finally_statement): Likewise.
1342 (c_parser_objc_synchronized_statement): Likewise.
1343 (c_parser_objc_at_property_declaration): Likewise.
1344 (c_parser_oacc_wait_list): Likewise.
1345 (c_parser_omp_var_list_parens): Likewise.
1346 (c_parser_omp_clause_collapse): Likewise.
1347 (c_parser_omp_clause_default): Likewise.
1348 (c_parser_omp_clause_if): Likewise.
1349 (c_parser_omp_clause_num_threads): Likewise.
1350 (c_parser_omp_clause_num_tasks): Likewise.
1351 (c_parser_omp_clause_grainsize): Likewise.
1352 (c_parser_omp_clause_priority): Likewise.
1353 (c_parser_omp_clause_hint): Likewise.
1354 (c_parser_omp_clause_defaultmap): Likewise.
1355 (c_parser_oacc_single_int_clause): Likewise.
1356 (c_parser_omp_clause_ordered): Likewise.
1357 (c_parser_omp_clause_reduction): Likewise.
1358 (c_parser_omp_clause_schedule): Likewise.
1359 (c_parser_omp_clause_num_teams): Likewise.
1360 (c_parser_omp_clause_thread_limit): Likewise.
1361 (c_parser_omp_clause_aligned): Likewise.
1362 (c_parser_omp_clause_linear): Likewise.
1363 (c_parser_omp_clause_safelen): Likewise.
1364 (c_parser_omp_clause_simdlen): Likewise.
1365 (c_parser_omp_clause_depend): Likewise.
1366 (c_parser_omp_clause_map): Likewise.
1367 (c_parser_omp_clause_device): Likewise.
1368 (c_parser_omp_clause_dist_schedule): Likewise.
1369 (c_parser_omp_clause_proc_bind): Likewise.
1370 (c_parser_omp_clause_uniform): Likewise.
1371 (c_parser_omp_for_loop): Likewise.
1372 (c_parser_cilk_clause_vectorlength): Likewise.
1373 (c_parser_cilk_clause_linear): Likewise.
1374 (c_parser_transaction_expression): Likewise.
1375 * c-parser.h (c_parser_require): Add param matching_location with
1376 default UNKNOWN_LOCATION.
1377 (c_parser_error): Convert return type from void to bool.
1378 (c_parser_skip_until_found): Add param matching_location with
1379 default UNKNOWN_LOCATION.
1380
30af3a2b
MP
13812017-08-09 Marek Polacek <polacek@redhat.com>
1382
1383 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
1384 * c-tree.h (build_external_ref): Update declaration.
1385 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
1386 (build_external_ref): Change the type of a parameter to bool.
1387 (parser_build_binary_op): Use true/false instead of 1/0.
1388 (pointer_diff): Likewise.
1389 (build_modify_expr): Likewise.
1390 (set_designator): Change the type of a parameter to bool.
1391 (set_init_index): Use true/false instead of 1/0.
1392 (set_init_label): Likewise.
1393 (output_init_element): Change the type of a parameter to bool.
1394 (output_pending_init_elements): Use true/false instead of 1/0.
1395 (process_init_element): Likewise.
1396 (build_binary_op): Change the type of a parameter to bool.
1397
296c53ac
MP
13982017-08-09 Marek Polacek <polacek@redhat.com>
1399
1400 PR c/81233
1401 * c-typeck.c (pedwarn_init): Make the function take a variable list.
1402 Call emit_diagnostic_valist instead of pedwarn.
1403 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
1404 Print the relevant types in diagnostics.
1405
a32c8316
MP
14062017-08-09 Marek Polacek <polacek@redhat.com>
1407
1408 PR c/81417
1409 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
1410 build_conditional_expr.
1411 * c-parser.c (c_parser_conditional_expression): Create locations for
1412 EXP1 and EXP2 from their source ranges. Pass the locations down to
1413 build_conditional_expr.
1414 * c-tree.h (build_conditional_expr): Update declaration.
1415 * c-typeck.c (build_conditional_expr): Add location_t parameters.
1416 For -Wsign-compare, also print the types.
1417
314e6352
ML
14182017-08-08 Martin Liska <mliska@suse.cz>
1419
1420 * c-convert.c: Include header files.
1421 * c-typeck.c: Likewise.
1422
577eec56
ML
14232017-08-07 Martin Liska <mliska@suse.cz>
1424
1425 * c-parser.c (c_parser_attributes): Canonicalize name of an
1426 attribute.
1427
f7b6353a
MP
14282017-08-02 Marek Polacek <polacek@redhat.com>
1429
1430 PR c/81289
1431 * c-parser.c (c_parser_unary_expression): Use set_error.
1432
8a6eab34
MP
1433 PR c/81448
1434 PR c/81306
1435 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
1436 warnings. Avoid walking MACRO_MAP_LOCATIONS.
1437
7fef86d3
JH
14382017-07-31 Jan Hubicka <hubicka@ucw.cz>
1439 Martin Liska <mliska@suse.cz>
1440
1441 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 1442 statement.
7fef86d3 1443
f34ebeb2
ML
14442017-07-31 Martin Liska <mliska@suse.cz>
1445
1446 PR sanitize/81530
1447 * c-convert.c (convert): Guard condition with flag_sanitize_p
1448 also with current_function_decl non-null equality.
1449 * c-decl.c (grokdeclarator): Likewise.
1450 * c-typeck.c (build_binary_op): Likewise.
1451
8595f67b
MP
14522017-07-25 Marek Polacek <polacek@redhat.com>
1453
1454 * c-decl.c (grokfield): Remove local variable.
1455
d49718d6
MP
14562017-07-25 Marek Polacek <polacek@redhat.com>
1457
1458 PR c/81364
1459 * c-parser.c (c_parser_else_body): Don't warn about multistatement
1460 macro expansion if the body is in { }.
1461 (c_parser_while_statement): Likewise.
1462 (c_parser_for_statement): Likewise.
1463
ff22eb12
NS
14642017-07-18 Nathan Sidwell <nathan@acm.org>
1465
1466 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
1467
eea77d1f
DM
14682017-07-14 David Malcolm <dmalcolm@redhat.com>
1469
1470 * c-decl.c (implicitly_declare): When suggesting a missing
1471 #include, provide a fix-it hint.
1472
b6f43128
DM
14732017-07-06 David Malcolm <dmalcolm@redhat.com>
1474
1475 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
1476 and call that instead.
1477 * c-tree.h (selftest::run_c_tests): New decl.
1478
3e2becc4
MP
14792017-06-26 Marek Polacek <polacek@redhat.com>
1480
1481 PR c/80116
1482 * c-parser.c (c_parser_if_body): Set the location of the
1483 body of the conditional after parsing all the labels. Call
1484 warn_for_multistatement_macros.
1485 (c_parser_else_body): Likewise.
1486 (c_parser_switch_statement): Likewise.
1487 (c_parser_while_statement): Likewise.
1488 (c_parser_for_statement): Likewise.
1489 (c_parser_statement): Add a default argument. Save the location
1490 after labels have been parsed.
1491 (c_parser_c99_block_statement): Likewise.
1492
343ae898
RB
14932017-06-19 Richard Biener <rguenther@suse.de>
1494
1495 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1496 negated _Literals to parse _Literal (int) -1.
1497
45b2222a
ML
14982017-06-13 Martin Liska <mliska@suse.cz>
1499
1500 PR sanitize/78204
1501 * c-convert.c (convert): Use sanitize_flags_p.
1502 * c-decl.c (grokdeclarator): Likewise.
1503 * c-typeck.c (convert_for_assignment): Likewise.
1504 (c_finish_return): Likewise.
1505 (build_binary_op): Likewise.
1506
8ab7005b
JJ
15072017-06-08 Jakub Jelinek <jakub@redhat.com>
1508
1509 PR c/81006
1510 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
1511 to sizetype before size_binop.
1512
363dc72c
JJ
15132017-06-07 Jakub Jelinek <jakub@redhat.com>
1514
1515 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
1516 of TDI_generic.
1517
dc949728
MP
15182017-06-06 Marek Polacek <polacek@redhat.com>
1519
1520 PR c/79983
1521 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
1522 ref.
1523 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
1524
40ffd95f
BE
15252017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1526
1527 * c-parser.c (c_parser_binary_expression): Implement the
1528 -Wsizeof_pointer_div warning.
1529 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
1530 from a parenthesized expression.
1531 (c_parser_expr_list): Use c_last_sizeof_loc.
1532 * c-tree.h (c_last_sizeof_loc): New external.
1533 * c-typeck.c (c_last_sizeof_loc): New variable.
1534 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
1535
9fc5e7a4
MM
15362017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
1537
1538 PR testsuite/80580
1539 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
1540
f012c8ef
DM
15412017-05-30 David Malcolm <dmalcolm@redhat.com>
1542
1543 * c-objc-common.c (c_tree_printer): Gain bool and const char **
1544 parameters.
1545
3cd211af
MS
15462017-05-24 Martin Sebor <msebor@redhat.com>
1547
1548 PR c/80731
1549 * c-fold.c (c_fully_fold_internal): Adjust.
1550 * c-typeck.c (parser_build_unary_op): Adjust.
1551
fd71a9a2
TS
15522017-05-23 Thomas Schwinge <thomas@codesourcery.com>
1553
1554 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
1555 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
1556 "VECTOR_LENGTH".
1557
92fa0f9e
MP
15582017-05-23 Marek Polacek <polacek@redhat.com>
1559
1560 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
1561 quotes.
1562
d11c168a
JJ
15632017-05-22 Jakub Jelinek <jakub@redhat.com>
1564
1565 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
1566 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
1567 it returned invariant. Call tree_invariant_p unconditionally
1568 afterwards to decide whether to return expr or op0.
1569
58aca9d9
NS
15702017-05-22 Nathan Sidwell <nathan@acm.org>
1571
1572 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
1573
7fd549d2
TS
15742017-05-19 Thomas Schwinge <thomas@codesourcery.com>
1575
1576 * c-parser.c (c_parser_omp_clause_default): Handle
1577 "OMP_CLAUSE_DEFAULT_PRESENT".
1578
6ecd2339
BE
15792017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1580
1581 * config-lang.in (gtfiles): Add c-family/c-format.c.
1582
8a57ecff
NS
15832017-05-18 Nathan Sidwell <nathan@acm.org>
1584
1585 * c-decl.c (pushdecl_top_level): Delete unused function.
1586
6574d78e
MP
15872017-05-18 Marek Polacek <polacek@redhat.com>
1588
1589 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
1590 (check_earlier_gotos): Likewise.
1591 (define_label): Likewise.
1592 (pending_xref_error): Likewise.
1593 (smallest_type_quals_location): Likewise.
1594 (grokdeclarator): Likewise.
1595 (grokparms): Likewise.
1596 (identifier_global_value): Likewise.
1597 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
1598 (find_init_member): Likewise.
1599
e3455240
MP
16002017-05-18 Marek Polacek <polacek@redhat.com>
1601
1602 * c-decl.c (start_decl): Use false/true instead of 0/1.
1603 (grokdeclarator): Likewise.
1604 (finish_struct): Likewise.
1605 (start_function): Change the return type to bool. Use false/true
1606 instead of 0/1.
1607 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
1608 * c-tree.h (start_function): Update.
1609 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
1610 (set_designator): Change the return type to bool. Use false/true
1611 instead of 0/1.
1612
3fa8871b
MP
16132017-05-17 Marek Polacek <polacek@redhat.com>
1614
1615 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
1616 * c-typeck.c: Likewise.
1617
142473df
MP
16182017-05-17 Marek Polacek <polacek@redhat.com>
1619
1620 PR sanitizer/80659
1621 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
1622 DECL_IGNORED_P even for non-static compound literals.
1623
1a817418
ML
16242017-05-17 Martin Liska <mliska@suse.cz>
1625
1626 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1627 use it instead of int type.
1628
b2fa0a8b
MP
16292017-05-17 Marek Polacek <polacek@redhat.com>
1630
1631 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
1632 call c_fully_fold.
1633 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
1634 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
1635 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1636 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1637 save_expr.
1638 (c_parser_conditional_expression): Likewise.
1639 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1640 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1641 (process_init_element): Likewise.
1642 (build_binary_op): Likewise.
1643 (handle_omp_array_sections_1): Likewise.
1644
1e47f02b
TS
16452017-05-12 Thomas Schwinge <thomas@codesourcery.com>
1646
1647 * c-parser.c (c_parser_omp_clause_num_gangs)
1648 (c_parser_omp_clause_num_workers)
1649 (c_parser_omp_clause_vector_length): Merge functions into...
1650 (c_parser_oacc_single_int_clause): ... this new function. Adjust
1651 all users.
1652
c24e924f
NS
16532017-05-11 Nathan Sidwell <nathan@acm.org>
1654
1655 * gimple-parser.c: Don't #include tree-dump.h.
1656
c587104e
MM
16572017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1658
1659 PR testsuite/80580
1660 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
1661
67ac9a9d
MM
16622017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1663
1664 PR testsuite/80580
1665 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1666 incorrect __MEM syntax.
1667
ac4eb40f
MM
16682017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1669
1670 PR testsuite/80580
1671 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1672 type of unary '*'.
1673
641da50a
NS
16742017-05-09 Nathan Sidwell <nathan@acm.org>
1675
1676 * c-tree.h (pushdecl): Declare.
1677
56d35585
DM
16782017-05-05 David Malcolm <dmalcolm@redhat.com>
1679
1680 * c-decl.c (warn_defaults_to): Replace report_diagnostic
1681 with diagnostic_report_diagnostic.
1682 * c-errors.c (pedwarn_c99): Likewise.
1683 (pedwarn_c90): Likewise.
1684
815d9cc6
XR
16852017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1686
92a285c1 1687 PR c++/80038
815d9cc6
XR
1688 * c-gimplify.c (c_gimplify_expr): Remove calls to
1689 cilk_gimplifY_call_params_in_spawned_fn.
1690
1c4ea66f
DM
16912017-04-25 David Malcolm <dmalcolm@redhat.com>
1692
1693 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1694 hint for removing extra semicolon.
1695
666f7903
JJ
16962017-04-21 Jakub Jelinek <jakub@redhat.com>
1697
1698 PR c/80468
1699 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
1700 enabled, set specs->type to integer_type_node.
1701
5764ee3c
JW
17022017-04-03 Jonathan Wakely <jwakely@redhat.com>
1703
1704 * c-array-notation.c: Fix typo in comment.
1705
10fa8dfb
MP
17062017-03-29 Marek Polacek <polacek@redhat.com>
1707
1708 PR c/79730
1709 * c-decl.c (finish_decl): Check VAR_P.
1710
a9e4a1a5
JJ
17112017-03-27 Jakub Jelinek <jakub@redhat.com>
1712
1713 PR middle-end/80162
1714 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1715 * c-typeck.c (c_mark_addressable): Likewise. Look through
1716 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1717 to ARRAY_TYPE.
1718 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
1719
ee3ff394
MP
17202017-03-23 Marek Polacek <polacek@redhat.com>
1721
1722 * c-tree.h: Remove a C_RID_YYCODE reference.
1723
4d1b8e70
JJ
17242017-03-21 Jakub Jelinek <jakub@redhat.com>
1725
1726 PR c/80097
1727 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
1728 optional COMPOUND_EXPR with ubsan instrumentation.
1729
31dc71a8
MP
17302017-03-17 Marek Polacek <polacek@redhat.com>
1731
1732 * c-parser.c: Add C11 references.
1733
d579c385
MP
17342017-03-15 Marek Polacek <polacek@redhat.com>
1735
1736 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
1737
85059a38
MP
17382017-03-11 Marek Polacek <polacek@redhat.com>
1739
1740 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
1741
2f6f187a
DM
17422017-03-10 David Malcolm <dmalcolm@redhat.com>
1743
1744 PR translation/79848
1745 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1746 "%qs".
1747 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1748
36618428
MP
17492017-03-09 Marek Polacek <polacek@redhat.com>
1750
1751 PR sanitizer/79757
1752 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1753 parameter declarations with initializers.
1754
01e5af5a
JJ
17552017-03-09 Jakub Jelinek <jakub@redhat.com>
1756
1757 PR c/79969
1758 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
1759 TYPE_STUB_DECL.
1760
a71dbc63
JJ
17612017-03-07 Jakub Jelinek <jakub@redhat.com>
1762
1763 PR c/79834
1764 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1765 for "may only be used in compound statements" diagnostics, change it
1766 such that the same translatable string is used for all pragmas. For
1767 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1768 diagnostics.
1769 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1770 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1771 "may only be used in compound statements" diagnostics, such that the
1772 same translatable string is used for all pragmas.
1773
1ff4bae6
MP
17742017-03-04 Marek Polacek <polacek@redhat.com>
1775
1776 PR c/79847
1777 * c-decl.c (implicit_decl_warning): Add missing space.
1778
7f5a7d78
MP
17792017-03-03 Marek Polacek <polacek@redhat.com>
1780
1781 PR c/79758
1782 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1783 current_function_prototype_arg_types is error_mark_node. Fix
1784 formatting. Use TREE_VALUE instead of TREE_TYPE.
1785
883c8f06
JJ
17862017-03-03 Jakub Jelinek <jakub@redhat.com>
1787
79c9b7a8
JJ
1788 PR c/79837
1789 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1790 %<min%> or %<max%> in the diagnostics, instead mention identifier.
1791 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1792 diagnostics.
1793
883c8f06
JJ
1794 PR c/79836
1795 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1796 instead of %<_Generic>.
1797 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1798 (c_parser_omp_target_exit_data): Use %<release%> instead of
1799 %<release>.
1800
324ff1a0
JJ
18012017-02-28 Jakub Jelinek <jakub@redhat.com>
1802
1803 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1804 instead of just cond ? "..." : "...".
1805 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1806 for "enter"/"exit" keyword.
1807 (c_finish_oacc_routine): Don't use %s to supply portions of the
1808 message.
1809
4227c9ad
JJ
18102017-02-24 Jakub Jelinek <jakub@redhat.com>
1811
1812 PR c++/79588
1813 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1814 handle -Wrestrict here.
1815 * c-typeck.c (build_function_call_vec): Adjust
1816 check_function_arguments caller.
1817
5d972e66
RB
18182017-02-23 Richard Biener <rguenther@suse.de>
1819
1820 PR c/79684
1821 * gimple-parser.c (c_parser_gimple_statement): Use set_error
1822 to initialize c_exprs to return.
1823 (c_parser_gimple_binary_expression): Likewise.
1824 (c_parser_gimple_unary_expression): Likewise.
1825 (c_parser_gimple_postfix_expression): Likewise.
1826
61ac5ebe
MP
18272017-02-22 Marek Polacek <polacek@redhat.com>
1828
1829 PR c/79662
1830 * c-typeck.c (convert_arguments): Handle error_mark_node.
1831
41d1b0b1
PK
18322017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1833
1834 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1835 value of c_parser_parse_ssa_name against error_mark_node and emit
1836 error if ssa name is anonymous and written as default definition.
1837
eab1f169
PK
18382017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1839
1840 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1841 FMA_EXPR.
1842
bcac0b4d
JJ
18432017-02-16 Jakub Jelinek <jakub@redhat.com>
1844
1845 PR c++/79512
1846 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1847 ignore #pragma omp target even when not followed by identifier.
1848
1be33173
PK
18492017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1850
1851 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1852 (c_parser_gimple_unary_expression): Likewise.
1853
aa326bfb
JJ
18542017-02-13 Jakub Jelinek <jakub@redhat.com>
1855
1856 * c-parser.c (c_parser_oacc_declare): Add missing space in
1857 diagnostics.
1858
8a398bc5
PK
18592017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1860
1861 PR c/79478
1862 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1863 set_c_expr_source_range when parsing ssa-name.
1864
3dcde5ef
PG
18652017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
1866 Richard Biener <rguenther@suse.de>
1867
1868 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1869 building IL when arguments are error_mark_node.
1870 (c_parser_gimple_unary_expression): Likewise.
1871 (c_parser_gimple_if_stmt): Likewise.
1872 (c_parser_gimple_switch_stmt): Likewise.
1873 (c_parser_gimple_return_stmt): Likewise.
1874 (c_parser_parse_ssa_name): When name lookup fails do not build
1875 an SSA name. Use undeclared rather than not declared in error
1876 reporting.
1877
192b048b
MP
18782017-02-09 Marek Polacek <polacek@redhat.com>
1879
1880 PR c/79428
1881 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1882 instead of c_parser_skip_until_found.
1883
56f71478
JJ
18842017-02-09 Jakub Jelinek <jakub@redhat.com>
1885
1886 PR c/79431
1887 * c-parser.c (c_parser_omp_declare_target): Don't invoke
1888 symtab_node::get on automatic variables.
1889
02889d23
CLT
18902016-02-09 Nathan Sidwell <nathan@codesourcery.com>
1891 Chung-Lin Tang <cltang@codesourcery.com>
1892
1893 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1894 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1895 semantic checking.
1896 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1897
7af4b20d
RB
18982017-02-07 Richard Biener <rguenther@suse.de>
1899
1900 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1901 (c_parser_gimple_postfix_expression_after_primary):
1902 Do not use c_build_function_call_vec to avoid folding and promotion.
1903 Simplify.
1904
e5e391d6
MO
19052017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1906
1907 PR lto/79061
1908 * c-decl.c (pop_scope): Pass main_input_filename to
1909 build_translation_unit_decl.
1910
c2e84327
DM
19112017-01-24 David Malcolm <dmalcolm@redhat.com>
1912
1913 * c-parser.c: Include "read-rtl-function.h" and
1914 "run-rtl-passes.h".
1915 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
1916 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
1917 production. Update for renaming of field "gimple_pass" to
1918 "gimple_or_rtl_pass". If __RTL was seen, call
1919 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
1920 to an auto_timevar, to cope with early exit.
1921 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1922 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1923 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1924 Handle RID_RTL.
1925 (c_parser_parse_rtl_body): New function.
1926 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1927 (struct c_declspecs): Rename field "gimple_pass" to
1928 "gimple_or_rtl_pass". Add field "rtl_p".
1929 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1930 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1931 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1932 (c_parser_gimple_or_rtl_pass_list): ...this.
1933
2ebd93e1
MP
19342017-01-20 Marek Polacek <polacek@redhat.com>
1935
1936 PR c/64279
1937 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1938
b1c95bb5
RB
19392017-01-13 Richard Biener <rguenther@suse.de>
1940
1941 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1942 nops.
1943
25329913
RB
19442017-01-13 Richard Biener <rguenther@suse.de>
1945
1946 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1947 _Literal ( type-name ) number.
1948
6bb4ea5c
RB
19492017-01-12 Richard Biener <rguenther@suse.de>
1950
1951 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1952 __MEM.
1953
6b5b4e9c
JJ
19542017-01-11 Jakub Jelinek <jakub@redhat.com>
1955
1956 PR c++/72813
1957 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
1958 PCH file.
1959
e3252775
RB
19602017-01-11 Richard Biener <rguenther@suse.de>
1961
1962 PR bootstrap/79052
1963 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
1964 returns on parse errors.
1965
a9342885
MP
19662017-01-04 Marek Polacek <polacek@redhat.com>
1967
1968 PR c++/64767
1969 * c-parser.c (c_parser_postfix_expression): Mark zero character
1970 constants by setting original_type in c_expr.
1971 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
1972 with a zero character constant.
1973 (char_type_p): New function.
1974
5dd9a9d0
DM
19752017-01-04 David Malcolm <dmalcolm@redhat.com>
1976
1977 * c-parser.c (c_parser_declaration_or_fndef): Create a
1978 rich_location at init_loc and parse it to start_init.
1979 (last_init_list_comma): New global.
1980 (c_parser_braced_init): Update last_init_list_comma when parsing
1981 commas. Pass it to pop_init_level. Pass location of closing
1982 brace to pop_init_level.
1983 (c_parser_postfix_expression_after_paren_type): Create a
1984 rich_location at type_loc and parse it to start_init.
1985 (c_parser_omp_declare_reduction): Likewise for loc.
1986 * c-tree.h (start_init): Add rich_location * param.
1987 (pop_init_level): Add location_t param.
1988 * c-typeck.c (struct initializer_stack): Add field
1989 "missing_brace_richloc".
1990 (start_init): Add richloc param, use it to initialize
1991 the stack node's missing_brace_richloc.
1992 (last_init_list_comma): New decl.
1993 (finish_implicit_inits): Pass last_init_list_comma to
1994 pop_init_level.
1995 (push_init_level): When finding missing open braces, add fix-it
1996 hints to the richloc.
1997 (pop_init_level): Add "insert_before" param and pass it
1998 when calling pop_init_level. Add fixits about missing
1999 close braces to any richloc. Use the richloc for the
2000 -Wmissing-braces warning.
2001 (set_designator): Pass last_init_list_comma to pop_init_level.
2002 (process_init_element): Likewise.
2003
cbe34bb5
JJ
20042017-01-01 Jakub Jelinek <jakub@redhat.com>
2005
2006 Update copyright years.
2007
d17680f3
JJ
20082016-12-21 Jakub Jelinek <jakub@redhat.com>
2009
0dba7960
JJ
2010 PR bootstrap/78817
2011 * c-typeck.c (build_function_call_vec): If check_function_arguments
2012 returns true, set TREE_NO_WARNING on CALL_EXPR.
2013
d17680f3
JJ
2014 PR c/77767
2015 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
2016 to *expr instead of overwriting it.
2017
aa90531e
RB
20182016-12-20 Richard Biener <rguenther@suse.de>
2019
2020 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
2021 error recovery.
2022 (c_parser_gimple_statement): Only build assigns for non-error
2023 stmts.
2024 (c_parser_gimple_postfix_expression_after): Improve error recovery.
2025
629b3d75
MJ
20262016-12-14 Martin Jambor <mjambor@suse.cz>
2027
2028 * c-parser.c: Include omp-general.h and omp-offload.h instead of
2029 omp-low.h.
2030 (c_finish_oacc_routine): Adjusted call to
2031 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
2032 to use their new names.
2033 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
2034 use its new name.
2035 (c_parser_oacc_update): Likewise.
2036 (c_parser_omp_simd): Likewise.
2037 (c_parser_omp_target_update): Likewise.
2038 * c-typeck.c: Include omp-general.h instead of omp-low.h.
2039 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
2040 name.
2041 (c_finish_omp_cancellation_point): Likewise.
2042 * gimple-parser.c: Do not include omp-low.h
2043
c5af52eb
CP
20442016-12-02 Cesar Philippidis <cesar@codesourcery.com>
2045 James Norris <jnorris@codesourcery.com>
2046
2047 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
2048 EXIT_DATA,WAIT} are not used in compound statements.
2049 (c_parser_oacc_enter_exit_data): Update diagnostics.
2050
48330c93
BE
20512016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2052
2053 PR c++/71973
2054 * c-decl.c (diagnose_mismatched_decls): Use
2055 OPT_Wbuiltin_declaration_mismatch here too.
2056
899ca90e 20572016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
2058 Alan Hayward <alan.hayward@arm.com>
2059 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
2060
2061 * c-decl.c (merge_decls): Use SET_DECL_MODE.
2062 (make_label, finish_struct): Likewise.
2063
1ee62b92 20642016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 2065 Richard Biener <rguenther@suse.de>
22b15758 2066
8e745a17
JJ
2067 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
2068 * config-lang.in (gtfiles): Add c/c-parser.h.
2069 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
2070 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
2071 * c-parser.c (enum c_id_kind, struct c_token,
2072 c_parser_next_token_is, c_parser_next_token_is_not,
2073 c_parser_next_token_is_keyword,
2074 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
2075 Split out to ...
2076 * c-parser.h: ... new header.
2077 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 2078 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
2079 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2080 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2081 c_parser_error, c_parser_require, c_parser_skip_until_found,
2082 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2083 c_parser_type_name): Export.
2084 (c_parser_tokens_buf): New function.
2085 (c_parser_error): Likewise.
2086 (c_parser_set_error): Likewise.
2087 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
2088 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
2089 via c_parser_parse_gimple_body.
8e745a17
JJ
2090 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
2091 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2092 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2093 c_parser_error, c_parser_require, c_parser_skip_until_found,
2094 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2095 c_parser_type_name): Declare.
1ee62b92
PG
2096 (struct c_parser): Declare forward.
2097 (c_parser_tokens_buf): Declare.
8e745a17
JJ
2098 (c_parser_error): Likewise.
2099 (c_parser_set_error): Likewise.
2100 * gimple-parser.c: New file.
2101 * gimple-parser.h: Likewise.
1ee62b92 2102
22b15758
UB
21032016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2104
2105 PR c/35503
2106 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2107 warn_for_restrict.
2108
84ff4775
LCW
21092016-09-11 Le-Chun Wu <lcwu@google.com>
2110 Mark Wielaard <mjw@redhat.com>
2111
2112 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
2113 to the given -Wshadow= variant.
2114
4d0cdd0c
TP
21152016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2116
2117 * c-typeck.c: Include memmodel.h.
2118
1202f33e
JJ
21192016-10-13 Jakub Jelinek <jakub@redhat.com>
2120
2121 PR target/77957
2122 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
2123 instead of lhd_return_null_tree_v.
2124
8a14afd0
BS
21252016-10-07 Bernd Schmidt <bschmidt@redhat.com>
2126
2127 PR c++/69733
2128 * c-decl.c (smallest_type_quals_location): New static function.
2129 (grokdeclarator): Try to find the correct location for an ignored
2130 qualifier.
2131
81fea426
MP
21322016-09-26 Marek Polacek <polacek@redhat.com>
2133
2134 PR c/7652
2135 * c-decl.c (pop_scope): Add gcc_fallthrough.
2136
21372016-09-26 Marek Polacek <polacek@redhat.com>
2138
2139 PR c/7652
2140 * c-parser.c (struct c_token): Add flags field.
2141 (c_lex_one_token): Pass it to c_lex_with_flags.
2142 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
2143 into IFN_FALLTHROUGH.
2144 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
2145 attribute fallthrough after a case label or default label.
2146 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
2147
9a2300e9
MP
21482016-09-24 Marek Polacek <polacek@redhat.com>
2149
2150 PR c/77490
2151 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
2152 have boolean value. Warn about ++/-- on booleans.
2153
7de76362
JJ
21542016-09-23 Jakub Jelinek <jakub@redhat.com>
2155
2156 * c-parser.c (incomplete_record_decls): Remove unnecessary
2157 = vNULL initialization of file scope vec.
2158
5b73d2ab
MP
21592016-09-16 Marek Polacek <polacek@redhat.com>
2160
2161 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
2162
e51fbec3
MP
21632016-09-14 Marek Polacek <polacek@redhat.com>
2164
2165 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
2166 (fix_array_notation_expr): Likewise.
2167 * c-decl.c (finish_decl): Likewise.
2168 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2169 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
2170 (function_to_pointer_conversion): Use false instead of 0.
2171 (convert_lvalue_to_rvalue): Likewise.
2172 (parser_build_unary_op): Likewise.
2173 (build_atomic_assign): Likewise.
2174 (build_unary_op): Change nonconvert parameter type to bool, use
2175 true/false instead of 1/0.
2176 (build_binary_op): Use true instead of 1.
2177
254830ba
DM
21782016-09-13 David Malcolm <dmalcolm@redhat.com>
2179
2180 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
2181 of add_fixit_insert to add_fixit_insert_before.
2182
4c13ba17
MP
21832016-09-13 Marek Polacek <polacek@redhat.com>
2184
2185 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
2186 it.
2187
54dcdb88
BE
21882016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
2189
2190 PR c++/77496
2191 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
2192 COMPOUND_EXPR to warn_for_omitted_condop.
2193
e5106e27
DM
21942016-09-07 David Malcolm <dmalcolm@redhat.com>
2195
2196 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
2197 c_get_substring_location for this new langhook.
2198
9dc5773f
JJ
21992016-09-02 Jakub Jelinek <jakub@redhat.com>
2200
2201 PR c/65467
2202 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
2203 flag_openmp.
2204 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
2205 instead of mark_exp_read on low_bound/length expression.
2206 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
2207 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2208 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2209 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
2210 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
2211 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
2212 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
2213 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
2214 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
2215 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
2216 instead of mark_expr_read.
2217 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
2218 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
2219 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
2220 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
2221 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
2222 array section bases outside of depend clause, for depend clause
2223 use convert_lvalue_to_rvalue on the base.
2224 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
2225 linear, aligned, map, to and from clauses.
2226 (c_omp_clause_copy_ctor): New function.
2227
295844f6
MP
22282016-09-01 Marek Polacek <polacek@redhat.com>
2229
2230 PR c/7652
2231 * c-typeck.c (composite_type): Add FALLTHRU comment.
2232
089af25c
DM
22332016-08-31 David Malcolm <dmalcolm@redhat.com>
2234
2235 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
2236 to the insertion fixits for "struct", "union", and "enum".
2237
f9087798
DM
22382016-08-30 David Malcolm <dmalcolm@redhat.com>
2239
2240 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
2241 rather than add_fixit_misspelled_id.
2242 (undeclared_variable): Likewise.
2243 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
2244 now-redundant "here" params from add_fixit_insert method calls.
2245 (c_parser_parameter_declaration): Likewise.
2246 * c-typeck.c (build_component_ref): Remove now-redundant range
2247 param from add_fixit_replace method calls.
2248
ebef225f
MP
22492016-08-25 Marek Polacek <polacek@redhat.com>
2250
2251 * c-typeck.c (parser_build_binary_op): Pass LHS to
2252 warn_logical_not_parentheses.
2253
fe377a48
MP
22542016-08-25 Marek Polacek <polacek@redhat.com>
2255
2256 PR c/77323
2257 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
2258 or _FloatN or _FloatNx is not supported.
2259 (finish_declspecs): Set type to integer_type_node when _FloatN or
2260 _FloatNx is not supported.
2261
c65699ef
JM
22622016-08-19 Joseph Myers <joseph@codesourcery.com>
2263
2264 PR c/32187
2265 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
2266 (struct c_declspecs): Add field floatn_nx_idx.
2267 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
2268 and _FloatNx type specifiers.
2269 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
2270 (c_parser_declspecs, c_parser_attribute_any_word)
2271 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
2272 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
2273 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
2274 narrower than double.
2275
2f1364c2
JJ
22762016-08-12 Jakub Jelinek <jakub@redhat.com>
2277 Martin Liska <mliska@suse.cz>
2278
2279 PR c/67410
2280 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
2281 % to determine val element to change. Assert that
2282 wchar_bytes * charwidth fits into val array.
2283
191816a3
MP
22842016-08-12 Marek Polacek <polacek@redhat.com>
2285
2286 PR c/7652
2287 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
2288 (c_parser_postfix_expression): Likewise.
2289 * c-typeck.c (build_unary_op): Adjust fall through comment.
2290 (c_mark_addressable): Likewise.
2291
b95a64bb
JJ
22922016-08-11 Jakub Jelinek <jakub@redhat.com>
2293
2294 PR c/72816
2295 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
2296 array member through typedef, for orig_qual_indirect == 0 clear
2297 orig_qual_type.
2298
895aa8e1
DM
22992016-08-08 David Malcolm <dmalcolm@redhat.com>
2300
2301 PR c/64955
2302 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
2303 this up to selftest::run_c_tests.
2304 (selftest::run_c_tests): New function.
2305
0b212d8c
TS
23062016-08-04 Thomas Schwinge <thomas@codesourcery.com>
2307
ae9281fc
TS
2308 * c-parser.c (struct oacc_routine_data): Add error_seen and
2309 fndecl_seen members.
2310 (c_finish_oacc_routine): Use these.
2311 (c_parser_declaration_or_fndef): Adjust.
2312 (c_parser_oacc_routine): Likewise. Support more C language
2313 constructs, and improve diagnostics. Move pragma context
2314 checking...
2315 (c_parser_pragma): ... here.
2316
0b212d8c
TS
2317 * c-parser.c (struct oacc_routine_data): New.
2318 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
2319 Simplify code.
2320 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
2321 declare target" attribute.
2322
76e2c821
JB
23232016-08-01 Jan Beulich <jbeulich@suse.com>
2324
2325 * c-fold.c (c_fully_fold_internal): Also emit shift count
2326 warnings for vector types.
2327 * c-typeck.c (build_binary_op): Likewise.
2328
f618a472
MP
23292016-07-29 Marek Polacek <polacek@redhat.com>
2330
2331 PR c/71742
2332 * c-decl.c (finish_struct): Rephrase an error message.
2333
efd0786f
MP
2334 PR c/71853
2335 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
2336 to error node for invalid code.
2337
e00dceaf
MP
2338 PR c/71573
2339 * c-decl.c (implicitly_declare): Return decl early not only for
2340 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
2341
673a107a
JJ
23422016-07-29 Jakub Jelinek <jakub@redhat.com>
2343
2344 PR c/71969
2345 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
2346 on GNU extern inline functions.
2347
a5b5c8b6
MP
23482016-07-29 Marek Polacek <polacek@redhat.com>
2349
2350 PR c/71583
2351 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
2352 check expr.value.
2353
e3fe09c1
UB
23542016-07-22 Uros Bizjak <ubizjak@gmail.com>
2355
2356 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
2357
7c8f7eaa
DM
23582016-07-20 David Malcolm <dmalcolm@redhat.com>
2359
2360 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
2361 spellcheck-tree.h
2362 (best_macro_match): Likewise, converting from a typedef to a
2363 subclass.
2364 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
2365 (lookup_name_fuzzy): Update for change of best_macro_match to a
2366 subclass with a ctor that calls cpp_forall_identifiers.
2367
de6a69ee
DM
23682016-07-20 David Malcolm <dmalcolm@redhat.com>
2369
2370 * c-decl.c (implicit_decl_warning): Update for conversion of
2371 return type of lookup_name_fuzzy to const char *.
2372 (undeclared_variable): Likewise.
2373 (lookup_name_fuzzy): Convert return type from tree to
2374 const char *.
2375 * c-parser.c (c_parser_declaration_or_fndef): Update for
2376 conversion of return type of lookup_name_fuzzy to const char *.
2377 (c_parser_parameter_declaration): Likewise.
2378
b1c9c068
CP
23792016-07-15 Cesar Philippidis <cesar@codesourcery.com>
2380
2381 * c-parser.c (c_parser_oacc_declare): Don't scan for
2382 GOMP_MAP_POINTER.
2383 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
2384 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
2385 zero-length subarrays.
2386
ddbbcb19
JJ
23872016-07-15 Jakub Jelinek <jakub@redhat.com>
2388
2389 PR c/71858
2390 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
2391 instead of FUZZY_LOOKUP_NAME.
2392 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
2393 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
2394
dd36b877
JJ
23952016-07-14 Jakub Jelinek <jakub@redhat.com>
2396
2397 PR c/71858
2398 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
2399
8c681247
TS
24002016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2401
2402 * c-parser.c (c_parser_generic_selection): Make type of variable
2403 auto_vec.
2404 (c_parser_omp_declare_simd): Likewise.
2405
bf4fa671
TS
24062016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2407
2408 * c-decl.c (struct c_struct_parse_info): Change member types
2409 from vec to auto_vec.
2410 (start_struct): Adjust.
2411 (finish_struct): Likewise.
2412
557e8c49
JJ
24132016-07-02 Jakub Jelinek <jakub@redhat.com>
2414
2415 PR c/71719
2416 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
2417
54d19c3b
TS
24182016-06-29 Thomas Schwinge <thomas@codesourcery.com>
2419
2420 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
2421 Move pragma context checking into...
2422 (c_parser_omp_cancellation_point): ... here, and improve
2423 diagnostic messages.
2424 * c-typeck.c (c_finish_omp_cancel)
2425 (c_finish_omp_cancellation_point): Improve diagnostic messages.
2426
152ef731
JJ
24272016-06-29 Jakub Jelinek <jakub@redhat.com>
2428
2429 PR c/71685
2430 * c-typeck.c (c_build_qualified_type): Don't clear
2431 C_TYPE_INCOMPLETE_VARS for the main variant.
2432
24332016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
2434
2435 PR c/71552
2436 * c-typeck.c (output_init_element): Diagnose incompatible types
2437 before non-constant initializers.
2438
e9ac1f86
JJ
24392016-06-28 Jakub Jelinek <jakub@redhat.com>
2440
2441 * Make-lang.in: Don't cat ../stage_current if it does not exist.
2442
277d7ee0
AK
24432016-06-23 Andi Kleen <ak@linux.intel.com>
2444
2445 * Make-lang.in: Add support for autofdo.
2446
1a4f11c8
DM
24472016-06-22 David Malcolm <dmalcolm@redhat.com>
2448
2449 PR c/70339
2450 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
2451 (implicit_decl_warning): When issuing warnings for implicit
2452 declarations, attempt to provide a suggestion via
2453 lookup_name_fuzzy.
2454 (undeclared_variable): Likewise when issuing errors.
2455 (lookup_name_in_scope): Likewise.
2456 (struct edit_distance_traits<cpp_hashnode *>): New struct.
2457 (best_macro_match): New typedef.
2458 (find_closest_macro_cpp_cb): New function.
2459 (lookup_name_fuzzy): New function.
2460 * c-parser.c: Include gcc-rich-location.h.
2461 (c_token_starts_typename): Split out case CPP_KEYWORD into...
2462 (c_keyword_starts_typename): ...this new function.
2463 (c_parser_declaration_or_fndef): When issuing errors about
2464 missing "struct" etc, add a fixit. For other kinds of errors,
2465 attempt to provide a suggestion via lookup_name_fuzzy.
2466 (c_parser_parms_declarator): When looking ahead to detect typos in
2467 type names, also reject CPP_KEYWORD.
2468 (c_parser_parameter_declaration): When issuing errors about
2469 unknown type names, attempt to provide a suggestion via
2470 lookup_name_fuzzy.
2471 * c-tree.h (c_keyword_starts_typename): New prototype.
2472
5a578671
JM
24732016-06-20 Joseph Myers <joseph@codesourcery.com>
2474
2475 PR c/71601
2476 * c-typeck.c (build_conditional_expr): Return error_mark_node if
2477 c_common_type returns error_mark_node.
2478
3f8257db 24792016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
2480
2481 PR c/69507
2482 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
2483 __alignof__ (expression).
2484
6a3f203c
DM
24852016-06-14 David Malcolm <dmalcolm@redhat.com>
2486
2487 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
2488
264757fb
DM
24892016-06-14 David Malcolm <dmalcolm@redhat.com>
2490
2491 * c-typeck.c (build_component_ref): Simplify fixit code by
2492 using gcc_rich_location::add_fixit_misspelled_id.
2493 (set_init_label): Likewise.
2494
f7e4f2e3
DM
24952016-06-13 David Malcolm <dmalcolm@redhat.com>
2496
2497 * c-parser.c (c_parser_initelt): Provide location of name for new
2498 location_t param of set_init_label.
2499 * c-tree.h (set_init_label): Add location_t param.
2500 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
2501 param and use it when issuing error messages about unrecognized
2502 field names. Attempt to provide a fixit hint if appropriate,
2503 otherwise update the error message to provide the type name.
2504
4b1ffdb1
TS
25052016-06-10 Thomas Schwinge <thomas@codesourcery.com>
2506
2507 PR c/71381
2508 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
2509 Loosen checking.
2510
44a845ca
MS
25112016-06-08 Martin Sebor <msebor@redhat.com>
2512 Jakub Jelinek <jakub@redhat.com>
2513
2514 PR c++/70507
2515 PR c/68120
2516 * c-typeck.c (convert_arguments): Don't promote last argument
2517 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2518
92a5f2ba
MP
25192016-06-08 Marek Polacek <polacek@redhat.com>
2520
2521 PR c/71418
2522 * c-decl.c (grokdeclarator): Check TYPE_P.
2523
08203f73
MP
2524 PR c/71426
2525 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
2526 code.
2527
6ffd47b7
DM
25282016-06-07 David Malcolm <dmalcolm@redhat.com>
2529
2530 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
2531 and structure element reference, capture the location of the
2532 element name token and pass it to build_component_ref.
2533 (c_parser_postfix_expression_after_primary): Likewise for
2534 structure element dereference.
2535 (c_parser_omp_variable_list): Likewise for
2536 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
2537 * c-tree.h (build_component_ref): Add location_t param.
2538 * c-typeck.c (build_component_ref): Add location_t param
2539 COMPONENT_LOC. Use it, if available, when issuing hints about
2540 mispelled member names to provide a fixit replacement hint.
2541
1f40cff3
MP
25422016-06-06 Marek Polacek <polacek@redhat.com>
2543
2544 PR c/71362
2545 * c-parser.c (c_parser_direct_declarator): Set location.
2546
5545a907
MP
25472016-06-06 Marek Polacek <polacek@redhat.com>
2548
2549 * c-typeck.c (comptypes_internal): Handle comparisons of
2550 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
2551 TYPE_REF_CAN_ALIAS_ALL.
2552
b605f663
CLT
25532016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
2554
2555 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
2556 arguments as addressable when async clause exists.
2557
00631022
JJ
25582016-05-30 Jakub Jelinek <jakub@redhat.com>
2559
2560 PR c++/71349
2561 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
2562 when combined with target construct.
2563
7211a097
JJ
25642016-05-26 Jakub Jelinek <jakub@redhat.com>
2565
2566 * c-parser.c (c_parser_omp_clause_schedule): Warn if
2567 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
2568
95efe6b6
MP
25692016-05-25 Marek Polacek <polacek@redhat.com>
2570
2571 PR c/71265
2572 * c-decl.c (c_make_fname_decl): Don't check seen_error.
2573
a23faf7a
MP
2574 PR c/71266
2575 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
2576
e46c7770
CP
25772016-05-24 Cesar Philippidis <cesar@codesourcery.com>
2578
2579 * c-parser.c (c_parser_oacc_declare): Add support for
2580 GOMP_MAP_FIRSTPRIVATE_POINTER.
2581 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
2582 argument with enum c_omp_region_type ort.
2583 (handle_omp_array_sections): Likewise. Update call to
2584 handle_omp_array_sections_1.
2585 (c_finish_omp_clauses): Add specific errors and warning messages for
2586 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
2587 call to handle_omp_array_sections.
2588
a04e69c0
TS
25892016-05-24 Thomas Schwinge <thomas@codesourcery.com>
2590
2591 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
2592
f17a223d
RB
25932016-05-24 Richard Biener <rguenther@suse.de>
2594
2595 PR middle-end/70434
2596 PR c/69504
2597 * c-typeck.c (build_array_ref): Do not complain about indexing
2598 non-lvalue vectors. Adjust for function name change.
2599
79063edd
MS
26002016-05-20 Martin Sebor <msebor@redhat.com>
2601
2602 PR c/71115
2603 * c-typeck.c (error_init): Use
2604 expansion_point_location_if_in_system_header.
2605 (warning_init): Same.
2606
8a40fef3
DM
26072016-05-19 David Malcolm <dmalcolm@redhat.com>
2608
2609 PR c/71171
2610 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
2611 in error-handling.
2612 (c_parser_postfix_expression): Likewise.
2613 * c-tree.h (c_expr::set_error): New method.
2614 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
2615 that result's range is initialized.
2616
e9892350
JG
26172016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
2618
2619 * c-typeck.c (parser_build_unary_op): Fix formatting.
2620
8fad45f5
MW
26212016-05-16 Matthew Wahab <matthew.wahab@arm.com>
2622
2623 * c-decl.c (grokdeclarator): Remove errmsg and use of
2624 targetm.invalid_return_type.
2625 (grokparms): Remove errmsg and use of
2626 targetm.invalid_parameter_type.
2627
aa4b467b
JM
26282016-05-13 Joseph Myers <joseph@codesourcery.com>
2629
2630 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2631 function return type.
2632
4f2e1536
MP
26332016-05-12 Marek Polacek <polacek@redhat.com>
2634
2635 PR c/70756
2636 * c-decl.c (build_compound_literal): Pass LOC down to
2637 c_incomplete_type_error.
2638 * c-tree.h (require_complete_type): Adjust declaration.
2639 (c_incomplete_type_error): Likewise.
2640 * c-typeck.c (require_complete_type): Add location parameter, pass it
2641 down to c_incomplete_type_error.
2642 (c_incomplete_type_error): Add location parameter, pass it down to
2643 error_at.
2644 (build_component_ref): Pass location down to c_incomplete_type_error.
2645 (default_conversion): Pass location down to require_complete_type.
2646 (build_array_ref): Likewise.
2647 (build_function_call_vec): Likewise.
2648 (convert_arguments): Likewise.
2649 (build_unary_op): Likewise.
2650 (build_c_cast): Likewise.
2651 (build_modify_expr): Likewise.
2652 (convert_for_assignment): Likewise.
2653 (c_finish_omp_clauses): Likewise.
2654
d6e83a8d
MM
26552016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2656
2657 PR c/43651
2658 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
2659 is enabled.
2660 * c-errors.c (pedwarn_c90): Return true if warned.
2661 * c-tree.h (pedwarn_c90): Change return type to bool.
2662 (enum c_declspec_word): Add new enumerator cdw_atomic.
2663
5c3a10fb
MP
26642016-05-11 Marek Polacek <polacek@redhat.com>
2665
2666 PR c++/71024
2667 * c-decl.c (diagnose_mismatched_decls): Factor out code to
2668 diagnose_mismatched_attributes and call it.
2669
cf68d92c
MP
26702016-05-10 Marek Polacek <polacek@redhat.com>
2671
2672 PR c/70255
2673 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2674 on a declaration following the definition.
2675
351f85c5
JJ
26762016-05-05 Jakub Jelinek <jakub@redhat.com>
2677
2678 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2679 parse it through to c_parser_c99_block_statement.
2680 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2681 caller.
2682
deef7113
MP
26832016-05-04 Marek Polacek <polacek@redhat.com>
2684
2685 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2686 OPT_Wdangling_else.
2687
de55efd5
MP
26882016-05-04 Marek Polacek <polacek@redhat.com>
2689
2690 PR c/48778
2691 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2692 for macro expansions.
2693
79ce98bc
MP
26942016-05-03 Marek Polacek <polacek@redhat.com>
2695
2696 PR c/70859
2697 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
2698 check_builtin_function_arguments.
2699
fb2647aa
RB
27002016-05-03 Richard Biener <rguenther@suse.de>
2701
2702 * Make-lang.in (cc1-checksum.c): For stage-final re-use
2703 the checksum from the previous stage.
2704
77886428
CP
27052016-05-02 Cesar Philippidis <cesar@codesourcery.com>
2706
2707 * c-parser.c (c_parser_oacc_all_clauses): Update call to
2708 c_finish_omp_clauses.
2709 (c_parser_omp_all_clauses): Likewise.
2710 (c_parser_oacc_cache): Likewise.
2711 (c_parser_oacc_loop): Likewise.
2712 (omp_split_clauses): Likewise.
2713 (c_parser_omp_declare_target): Likewise.
2714 (c_parser_cilk_all_clauses): Likewise.
2715 (c_parser_cilk_for): Likewise.
2716 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
2717 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2718
7176a4a0
MP
27192016-05-02 Marek Polacek <polacek@redhat.com>
2720
2721 PR c/70851
2722 * c-decl.c (grokdeclarator): Diagnose when array's size has an
2723 incomplete type.
2724
e7ff0319
CP
27252016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2726
2727 PR middle-end/70626
2728 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
2729 OACC_LOOP_CLAUSE_MASK.
2730 (c_parser_oacc_kernels_parallel): Update call to
2731 c_oacc_split_loop_clauses.
2732
9f405ce1
AM
27332016-04-28 Andrew MacLeod <amacleod@redhat.com>
2734
2735 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
2736 argument to build_modify_expr in two cases.
2737
c1e1f433
BS
27382016-04-27 Bernd Schmidt <bschmidt@redhat.com>
2739
2740 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2741 warn_for_memset instead of warning directly here.
2742
2448a956
MP
27432016-04-26 Marek Polacek <polacek@redhat.com>
2744
2745 PR c/67784
2746 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2747 out of ...
2748 (c_parser_for_statement): ... here.
2749 (c_parser_if_statement): Use it.
2750 (c_parser_switch_statement): Use it.
2751 (c_parser_while_statement): Use it.
2752
b02a5e26
MP
2753 PR c/70791
2754 * c-decl.c (pushdecl): Pass LOCUS down to warning.
2755
477d4906
IV
27562016-04-20 Ilya Verbin <ilya.verbin@intel.com>
2757
2758 PR c++/69363
2759 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2760 instead of c_finish_cilk_clauses.
2761 * c-tree.h (c_finish_omp_clauses): Add new default argument.
2762 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
2763 floating-point variables in the linear clause for Cilk Plus.
2764
fe37c7af
MM
27652016-04-18 Michael Matz <matz@suse.de>
2766
2767 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2768 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2769
949505a9
MP
27702016-04-15 Marek Polacek <polacek@redhat.com>
2771
2772 PR c/70671
2773 * c-typeck.c (build_unary_op): Pass location down to error and
2774 warning call.
2775
dda1bf61
JJ
27762016-04-15 Jakub Jelinek <jakub@redhat.com>
2777
2778 PR c/70436
2779 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2780 where needed.
2781 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2782 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2783 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2784 Adjust c_parser_pragma callers.
2785 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
2786 caller.
2787 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2788 c_parser_statement.
2789 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2790 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2791 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2792 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2793 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2794 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2795 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2796 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2797 down where needed.
2798 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
2799 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2800 calls.
2801
99cd9857
MP
28022016-04-13 Marek Polacek <polacek@redhat.com>
2803
2804 PR c/70436
2805 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2806 adjust callers.
2807 (c_parser_statement): Likewise.
2808 (c_parser_c99_block_statement): Likewise.
2809 (c_parser_while_statement): Likewise.
2810 (c_parser_for_statement): Likewise.
2811 (c_parser_if_body): Don't set IF_P here.
2812 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
2813 about dangling else here.
2814 * c-tree.h (c_finish_if_stmt): Adjust declaration.
2815 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
2816 warn about dangling else here.
2817
f13355da
MP
28182016-04-04 Marek Polacek <polacek@redhat.com>
2819
2820 PR c/70307
2821 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2822
5fde6a45
MP
28232016-03-31 Marek Polacek <polacek@redhat.com>
2824
2825 PR c/70297
2826 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2827
4bbf545b
DM
28282016-03-18 David Malcolm <dmalcolm@redhat.com>
2829
2830 PR c/70281
2831 * c-parser.c (c_parser_postfix_expression): Set the source range
2832 for uses of "__builtin_types_compatible_p".
2833
fcc2b74f
JJ
28342016-03-17 Jakub Jelinek <jakub@redhat.com>
2835
2836 PR c/70280
2837 * c-typeck.c (composite_type): Don't count void_list_node
2838 into len, if the list is terminated by void_list_node, start
2839 with void_list_node instead of NULL for newargs. Stop
2840 at void_list_node.
2841
ab4c578f
MP
28422016-03-16 Marek Polacek <polacek@redhat.com>
2843
2844 PR c/70093
2845 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2846 nested functions returning VM types.
2847
96b3c82d
CP
28482016-03-09 Cesar Philippidis <cesar@codesourcery.com>
2849
2850 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2851 when calling c_finish_omp_clauses.
2852
29b9828f
BS
28532016-03-04 Bernd Schmidt <bschmidt@redhat.com>
2854
2855 PR c/69824
2856 * c-decl.c (get_parm_info): Don't queue implicit function declarations
2857 for later.
2858
7ff6ca38
MP
28592016-03-04 Marek Polacek <polacek@redhat.com>
2860
2861 PR c/69798
2862 * c-parser.c (c_parser_postfix_expression): Call
2863 c_parser_cast_expression rather than c_parser_postfix_expression.
2864
686e2237
JJ
28652016-03-01 Jakub Jelinek <jakub@redhat.com>
2866
2867 PR c/69796
2868 PR c/69974
2869 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2870 of incomplete decls to error_mark_node.
2871
0b05329b
MP
28722016-02-24 Marek Polacek <polacek@redhat.com>
2873
2874 PR c/69819
2875 * c-decl.c (finish_decl): Don't update the copy of the type of a
2876 different decl type.
2877
067fbd8b
JJ
28782016-02-23 Jakub Jelinek <jakub@redhat.com>
2879
2880 PR objc/69844
2881 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2882 in id_kind reclassification.
2883
bf14eba2
JJ
28842016-02-16 Jakub Jelinek <jakub@redhat.com>
2885
2886 PR c/69835
2887 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2888
ba539195
JN
28892016-02-16 James Norris <jnorris@codesourcery.com>
2890
2891 PR c/64748
2892 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2893
16595a1f
BS
28942016-02-12 Bernd Schmidt <bschmidt@redhat.com>
2895
f48dfe98
BS
2896 * c-decl.c (build_null_declspecs): Zero the entire struct.
2897
16595a1f
BS
2898 PR c/69522
2899 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
2900 callers changed. If nested_p is true, use it to call
2901 finish_implicit_inits.
2902 * c-tree.h (finish_implicit_inits): Declare.
2903 * c-typeck.c (finish_implicit_inits): New function. Move code
2904 from ...
2905 (push_init_level): ... here.
2906 (set_designator, process_init_element): Call finish_implicit_inits.
2907
66756373
JJ
29082016-02-11 Jakub Jelinek <jakub@redhat.com>
2909
2910 PR c/69768
2911 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
2912 arguments for -Waddress warning.
2913
1066e9b5
JJ
29142016-02-04 Jakub Jelinek <jakub@redhat.com>
2915
2916 PR c/69669
2917 * c-decl.c (finish_enum): When honoring mode attribute,
2918 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2919
3a5d2ba4
JJ
29202016-01-29 Jakub Jelinek <jakub@redhat.com>
2921
2922 PR debug/69518
2923 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2924 all type variants, not just TYPE_MAIN_VARIANT.
2925
cbdd8ae0
JJ
29262016-01-27 Jakub Jelinek <jakub@redhat.com>
2927
2928 PR debug/66869
2929 * c-decl.c (c_write_global_declarations_1): Warn with
2930 warn_unused_function if static prototype without definition
2931 is not C_DECL_USED.
2932
fa74a4bc
MP
29332016-01-27 Marek Polacek <polacek@redhat.com>
2934
2935 PR c/68062
2936 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2937 to unsigned, if needed. Add -Wsign-compare warning.
2938
13f92e8d
JJ
29392016-01-26 Jakub Jelinek <jakub@redhat.com>
2940
2941 PR tree-optimization/69483
2942 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2943
cd8e73dc 29442016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
2945
2946 PR c/24293
2947 * c-tree.h (incomplete_record_decls): Declare.
2948 * c-parser.c (incomplete_record_decls): Define.
2949 (c_parser_translation_unit): Iterate through incomplete_record_decls and
2950 report error if any decl has zero size.
2951 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
2952 or enum type to incomplete_record_decls.
2953
e6d6ec9e
TV
29542016-01-14 Tom de Vries <tom@codesourcery.com>
2955
2956 PR tree-optimization/68773
2957 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
2958 set force_output.
2959
00083992
MP
29602016-01-14 Marek Polacek <polacek@redhat.com>
2961
2962 PR c/69262
2963 * c-decl.c (grokdeclarator): Provide more information for invalid
2964 array declarations.
2965
7443cf13
DM
29662016-01-06 David Malcolm <dmalcolm@redhat.com>
2967
2968 * c-parser.c (c_parser_unary_expression): For dereferences, build
2969 a combined location before calling build_indirect_ref, so that
2970 error reports cover the full range, manually updating the c_expr
2971 src_range.
2972
6b131d5b
MP
29732016-01-06 Marek Polacek <polacek@redhat.com>
2974
2975 PR sanitizer/69099
2976 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
2977 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
2978 NULL.
2979
818ab71a
JJ
29802016-01-04 Jakub Jelinek <jakub@redhat.com>
2981
2982 Update copyright years.
2983
2fe0a208
MP
29842016-01-04 Marek Polacek <polacek@redhat.com>
2985
2986 PR c/68908
2987 * c-typeck.c (build_atomic_assign): Improve commentary. Add
2988 optimization to use __atomic_fetch_* built-in if possible.
2989
c7b48c8a
TS
29902015-12-23 Thomas Schwinge <thomas@codesourcery.com>
2991
2992 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
2993 into...
2994 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
2995 all users.
2996
fda5652f
MP
29972015-12-22 Marek Polacek <polacek@redhat.com>
2998
2999 PR c/69002
3000 * c-typeck.c (build_component_ref): Warn when acessing elements of
3001 atomic structures or unions.
3002
745e411d
DM
30032015-12-21 David Malcolm <dmalcolm@redhat.com>
3004
3005 * c-typeck.c: Include "gcc-rich-location.h".
3006 (build_binary_op): In the two places that call binary_op_error,
3007 create a gcc_rich_location and populate it with the location of
3008 the binary op and its two operands.
3009
94c40e19
DM
30102015-12-16 David Malcolm <dmalcolm@redhat.com>
3011
3012 * c-parser.c (c_parser_statement_after_labels): When calling
3013 c_finish_return, Use the return expression's location if it has
3014 one, falling back to the location of the first token within it.
3015 * c-typeck.c (c_finish_return): When issuing warnings about
3016 the incorrect presence/absence of a return value, issue a note
3017 showing the declaration of the function.
3018
de67c4c3
DM
30192015-12-16 David Malcolm <dmalcolm@redhat.com>
3020
3021 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
3022 to 4.
3023 (c_parser_peek_nth_token): New function.
3024 (c_parser_peek_conflict_marker): New function.
3025 (c_parser_error): Detect conflict markers and report them as such.
3026
a10704e1
DM
30272015-12-16 David Malcolm <dmalcolm@redhat.com>
3028
3029 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
3030 to preserve range information for the primary expression
3031 in the call to c_parser_postfix_expression_after_primary.
3032
8062bca6
DM
30332015-12-16 David Malcolm <dmalcolm@redhat.com>
3034
3035 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
3036 expression location, falling back on the first token location,
3037 rather than always using the latter.
3038
d06f8b75
MP
30392015-12-16 Marek Polacek <polacek@redhat.com>
3040
3041 PR c/64637
3042 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
3043 available.
3044
2994fb91
MP
30452015-12-15 Marek Polacek <polacek@redhat.com>
3046
3047 PR c/68907
3048 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
3049 artificial decl.
3050
a1b93f8d
DM
30512015-12-08 David Malcolm <dmalcolm@redhat.com>
3052
3053 * c-parser.c (c_parser_alignof_expression): Capture location of
3054 closing parenthesis (if any), or of end of unary expression, and
3055 use it to build a src_range for the expression.
3056
46c6e1e2
DM
30572015-12-08 David Malcolm <dmalcolm@redhat.com>
3058
3059 PR c/68757
3060 * c-parser.c (c_parser_get_builtin_args): Add
3061 "out_close_paren_loc" param, and write back to it.
3062 (c_parser_postfix_expression): Capture the closing
3063 parenthesis location for RID_CHOOSE_EXPR,
3064 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
3065 RID_BUILTIN_SHUFFLE and use it to set the source range
3066 for such expressions; within RID_BUILTIN_COMPLEX set
3067 the underlying location.
3068
66189108
MP
30692015-12-07 Marek Polacek <polacek@redhat.com>
3070
3071 PR c/68668
3072 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
3073 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
3074
f187980b
EB
30752015-12-04 Eric Botcazou <ebotcazou@adacore.com>
3076
3077 * c-tree.h (c_build_va_arg): Adjust prototype.
3078 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
3079 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
3080 parameter, adjust throughout and issue an error if EXPR is a component
3081 with reverse storage order.
3082
4250754e
JM
30832015-12-02 Jason Merrill <jason@redhat.com>
3084
3085 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
3086 (c_fully_fold_internal, decl_constant_value_for_optimization):
3087 Move from c-common.c.
3088 * c-tree.h: Declare decl_constant_value_for_optimization.
3089 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
3090
e9e32ee6
JM
30912015-12-02 Joseph Myers <joseph@codesourcery.com>
3092
3093 PR c/68162
3094 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
3095 following link from declarator to next declarator. Track original
3096 qualified type and pass it to c_build_qualified_type.
3097 * c-typeck.c (c_build_qualified_type): Add arguments
3098 orig_qual_type and orig_qual_indirect.
3099
ff7a55bf
TS
31002015-12-02 Thomas Schwinge <thomas@codesourcery.com>
3101
3102 * c-parser.c (c_parser_omp_clause_name)
3103 (c_parser_oacc_all_clauses): Alphabetical sorting.
3104
657e4e47
JJ
31052015-12-02 Jakub Jelinek <jakub@redhat.com>
3106
3107 PR c/68533
3108 * c-decl.c (get_parm_info): Use b->locus instead of input_location
3109 for diagnostics.
3110
37d5ad46
JB
31112015-12-01 Julian Brown <julian@codesourcery.com>
3112 Cesar Philippidis <cesar@codesourcery.com>
3113 James Norris <James_Norris@mentor.com>
3114
3115 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
3116 (c_parser_oacc_clause_use_device): New function.
3117 (c_parser_oacc_all_clauses): Add use_device support.
3118 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
3119 (c_parser_oacc_host_data): New function.
3120 (c_parser_omp_construct): Add host_data support.
3121 * c-tree.h (c_finish_oacc_host_data): Add prototype.
3122 * c-typeck.c (c_finish_oacc_host_data): New function.
3123 (c_finish_omp_clauses): Add use_device support.
3124
a4850ce9
JH
31252015-11-29 Jan Hubicka <hubicka@ucw.cz>
3126
3127 PR c/67106
3128 * c-decl.c: Set TYPE_PACKED in variants.
3129
b58d3df2
ML
31302015-11-27 Martin Liska <mliska@suse.cz>
3131
3132 PR c++/68312
3133 * c-array-notation.c (fix_builtin_array_notation_fn):
3134 Use release_vec_vec instead of vec::release.
3135 (build_array_notation_expr): Likewise.
3136 (fix_conditional_array_notations_1): Likewise.
3137 (fix_array_notation_expr): Likewise.
3138 (fix_array_notation_call_expr): Likewise.
3139
aec17bfe
JJ
31402015-11-27 Jakub Jelinek <jakub@redhat.com>
3141
3142 PR c/63326
3143 * c-parser.c (c_parser_compound_statement_nostart): If
3144 last_label is true, use pragma_stmt instead of pragma_compound
3145 as second c_parser_pragma argument.
3146 (c_parser_omp_ordered, c_parser_omp_target_update,
3147 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
3148 false as second argument to c_parser_skip_to_pragma_eol after
3149 diagnosing standalone directives used in pragma_stmt context.
3150
688c4de0
IV
31512015-11-24 Ilya Verbin <ilya.verbin@intel.com>
3152
3153 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
3154 with "if (ENABLE_OFFLOADING)".
3155
cbd03aee
DM
31562015-11-23 David Malcolm <dmalcolm@redhat.com>
3157
3158 PR objc/68438
3159 * c-parser.c (c_parser_postfix_expression): Set up source ranges
3160 for various Objective-C constructs: Class.name syntax,
3161 @selector(), @protocol(), @encode(), and [] message syntax.
3162
a87a86e1
DM
31632015-11-20 David Malcolm <dmalcolm@redhat.com>
3164
3165 PR 62314
3166 * c-typeck.c (should_suggest_deref_p): New function.
3167 (build_component_ref): Special-case POINTER_TYPE when
3168 generating a "not a structure of union" error message, and
3169 suggest a "->" rather than a ".", providing a fix-it hint.
3170
8ece8dfb
DM
31712015-11-19 David Malcolm <dmalcolm@redhat.com>
3172
3173 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
3174 candidate into a new function, find_closest_identifier.
3175
433068cc
MP
31762015-11-19 Marek Polacek <polacek@redhat.com>
3177
3178 PR c/68412
3179 * c-typeck.c (parser_build_binary_op): Properly handle
3180 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
3181
bef08b71
DM
31822015-11-17 David Malcolm <dmalcolm@redhat.com>
3183
3184 * c-parser.c (set_c_expr_source_range): Bulletproof both
3185 overloaded implementations against NULL expr->value.
3186 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
3187 values.
3188 (c_parser_unary_expression): Likewise when handling addresses of
3189 labels.
3190 (c_parser_postfix_expression): Likewise for statement expressions,
3191 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
3192 __builtin_va_arg, and for __builtin_offset_of.
3193 (c_parser_postfix_expression_after_paren_type): Initialize expr's
3194 src_range using the range of the braced initializer.
3195 (c_parser_transaction_expression): Set src_range for "ret" to a
3196 sane pair of values.
3197
fff77217
KY
31982015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
3199
3200 * c-parser.c (c_finish_omp_declare_simd): Look for
3201 "simd" attribute as well. Update error message.
3202
1d899da2
TS
32032015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3204
3205 * c-parser.c (c_parser_omp_declare_target): Adjust.
3206
e4606348
JJ
32072015-11-14 Jakub Jelinek <jakub@redhat.com>
3208
3209 * c-typeck.c (c_finish_omp_clauses): Don't mark
3210 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
3211
3e636daf
MP
32122015-11-14 Marek Polacek <polacek@redhat.com>
3213
3214 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
3215 * c-typeck.c: Likewise.
3216
ebedc9a3
DM
32172015-11-13 David Malcolm <dmalcolm@redhat.com>
3218
3219 * c-decl.c (warn_defaults_to): Pass line_table to
3220 rich_location ctor.
3221 * c-errors.c (pedwarn_c99): Likewise.
3222 (pedwarn_c90): Likewise.
3223 * c-parser.c (set_c_expr_source_range): New functions.
3224 (c_token::get_range): New method.
3225 (c_token::get_finish): New method.
3226 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
3227 based on the range from the start of the LHS to the end of the
3228 RHS.
3229 (c_parser_conditional_expression): Likewise, based on the range
3230 from the start of the cond.value to the end of exp2.value.
3231 (c_parser_binary_expression): Call set_c_expr_source_range on
3232 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
3233 (c_parser_cast_expression): Call set_c_expr_source_range on ret
3234 based on the cast_loc through to the end of the expr.
3235 (c_parser_unary_expression): Likewise, based on the
3236 op_loc through to the end of op.
3237 (c_parser_sizeof_expression) Likewise, based on the start of the
3238 sizeof token through to either the closing paren or the end of
3239 expr.
3240 (c_parser_postfix_expression): Likewise, using the token range,
3241 or from the open paren through to the close paren for
3242 parenthesized expressions.
3243 (c_parser_postfix_expression_after_primary): Likewise, for
3244 various kinds of expression.
3245 * c-tree.h (struct c_expr): Add field "src_range".
3246 (c_expr::get_start): New method.
3247 (c_expr::get_finish): New method.
3248 (set_c_expr_source_range): New decls.
3249 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
3250 on ret for prefix unary ops.
3251 (parser_build_binary_op): Likewise, running from the start of
3252 arg1.value through to the end of arg2.value.
3253
ec8b536f
MP
32542015-11-13 Marek Polacek <polacek@redhat.com>
3255
3256 PR c/68320
3257 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
3258
277fe616
DM
32592015-11-13 David Malcolm <dmalcolm@redhat.com>
3260
3261 * c-typeck.c: Include spellcheck.h.
3262 (lookup_field_fuzzy_find_candidates): New function.
3263 (lookup_field_fuzzy): New function.
3264 (build_component_ref): If the field was not found, try using
3265 lookup_field_fuzzy and potentially offer a suggestion.
3266
6e232ba4
JN
32672015-11-12 James Norris <jnorris@codesourcery.com>
3268 Joseph Myers <joseph@codesourcery.com>
3269
3270 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
3271 (c_parser_omp_clause_name): Handle 'device_resident' clause.
3272 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3273 and PRAGMA_OMP_CLAUSE_LINK.
3274 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3275 and PRAGMA_OACC_CLAUSE_LINK.
3276 (OACC_DECLARE_CLAUSE_MASK): New definition.
3277 (c_parser_oacc_declare): New function.
3278
9be4f715
MP
32792015-11-12 Marek Polacek <polacek@redhat.com>
3280
3281 PR c/67784
3282 * c-parser.c (c_parser_for_statement): Reclassify the token in
3283 a correct scope.
3284
e78bede6
MP
32852015-11-11 Marek Polacek <polacek@redhat.com>
3286
3287 PR c/68107
3288 PR c++/68266
3289 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
3290 checking the size of an array.
3291
69f293c9
AM
32922015-11-11 Andrew MacLeod <amacleod@redhat.com>
3293
3294 * c-array-notation.c: Remove unused header files.
3295 * c-aux-info.c: Likewise.
3296 * c-convert.c: Likewise.
3297 * c-decl.c: Likewise.
3298 * c-errors.c: Likewise.
3299 * c-lang.c: Likewise.
3300 * c-objc-common.c: Likewise.
3301 * c-parser.c: Likewise.
3302 * c-typeck.c: Likewise.
3303 * gccspec.c: Likewise.
3304
3a40d81d
NS
33052015-11-09 Thomas Schwinge <thomas@codesourcery.com>
3306 Cesar Philippidis <cesar@codesourcery.com>
3307 James Norris <jnorris@codesourcery.com>
3308 Julian Brown <julian@codesourcery.com>
3309 Nathan Sidwell <nathan@codesourcery.com>
3310
3311 c/
3312 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
3313 routine arg.
3314 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
3315 (c_parser_pragma): Parse 'acc routine'.
3316 (OACC_ROUTINE_CLAUSE_MARK): Define.
3317 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
3318
fc402eec
AA
33192015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3320
3321 PR debug/67192
3322 * c-typeck.c (c_finish_loop): For unconditional loops, set the
3323 location of the backward-goto to the start of the loop body.
3324
f6b0b3db
AA
33252015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3326
3327 PR debug/67192
3328 * c-parser.c (c_parser_while_statement): Finish the loop before
3329 parsing ahead for misleading indentation.
3330 (c_parser_for_statement): Likewise.
3331
ee45a32d
EB
33322015-11-08 Eric Botcazou <ebotcazou@adacore.com>
3333
3334 * c-decl.c (finish_struct): If the structure has reverse storage
3335 order, rewrite the type of array fields with scalar component. Call
3336 maybe_apply_pragma_scalar_storage_order on entry.
3337 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
3338 errors on bit-fields and reverse SSO here and not...
3339 (c_mark_addressable): ...here.
3340 (output_init_element): Adjust call to initializer_constant_valid_p.
3341 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
3342
8a645150
DM
33432015-11-06 David Malcolm <dmalcolm@redhat.com>
3344
3345 * c-decl.c (warn_defaults_to): Update for change in signature
3346 of diagnostic_set_info.
3347 * c-errors.c (pedwarn_c99): Likewise.
3348 (pedwarn_c90): Likewise.
3349 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
3350 for textinfo::set_location.
3351
7a5e4956
CP
33522015-11-05 Cesar Philippidis <cesar@codesourcery.com>
3353 Thomas Schwinge <thomas@codesourcery.com>
3354 James Norris <jnorris@codesourcery.com>
3355
3356 * c-parser.c (c_parser_omp_clause_name): Add support for
3357 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
3358 (c_parser_omp_clause_default): Add is_oacc argument. Handle
3359 default(none) in OpenACC.
3360 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
3361 arguments.
3362 (c_parser_oacc_clause_tile): New function.
3363 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
3364 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
3365 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
3366 TILE}.
3367 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
3368 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
3369 FIRSTPRIVATE}.
3370 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
3371 (c_parser_oacc_update): Update the error message for missing clauses.
3372 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
3373 and OMP_CLAUSE_INDEPENDENT.
3374
bfcfbfa0
MP
33752015-11-05 Marek Polacek <polacek@redhat.com>
3376
3377 PR c/68090
3378 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
3379 deal with pre-evaluation on invalid types.
3380
e01d41e5
JJ
33812015-11-05 Jakub Jelinek <jakub@redhat.com>
3382 Ilya Verbin <ilya.verbin@intel.com>
3383
3384 * c-parser.c: Include context.h and gimple-expr.h.
3385 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
3386 monotonic together with nonmonotonic.
3387 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
3388 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
3389 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
3390 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
3391 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
3392 expressions on combined target teams before the target.
3393 (c_parser_omp_declare_target): If decl has "omp declare target" or
3394 "omp declare target link" attribute, and cgraph or varpool node already
3395 exists, then set corresponding flags. Call c_finish_omp_clauses
3396 in the parenthesized extended-list syntax case.
3397 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
3398 declare target.
3399 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
3400 on OMP_CLAUSE_REDUCTION array sections.
3401 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
3402 into the constant offset, or for variable low-bound using
3403 POINTER_PLUS_EXPR. For structure element based array sections use
3404 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
3405 (c_finish_omp_clauses): Drop generic_field_head, structure
3406 elements are now always mapped even as array section bases,
3407 diagnose same var in data sharing and mapping clauses. Diagnose if
3408 linear step on declare simd is neither a constant nor a uniform
3409 parameter. Look through POINTER_PLUS_EXPR for array section
3410 reductions. Diagnose the same var or function appearing multiple
3411 times on the same directive. Fix up wording for the to clause if t
3412 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
3413 modifier on kinds other than dynamic or guided or nonmonotonic
3414 modifier together with ordered clause.
3415
4bf9e5a8
TS
34162015-11-03 Thomas Schwinge <thomas@codesourcery.com>
3417 Chung-Lin Tang <cltang@codesourcery.com>
3418
3419 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
3420
2adfab87
AM
34212015-10-29 Andrew MacLeod <amacleod@redhat.com>
3422
3423 * c-array-notation.c: Reorder #include's and remove duplicates.
3424 * c-aux-info.c: Likewise.
3425 * c-convert.c: Likewise.
3426 * c-decl.c: Likewise.
3427 * c-errors.c: Likewise.
3428 * c-lang.c: Likewise.
3429 * c-objc-common.c: Likewise.
3430 * c-parser.c: Likewise.
3431 * c-typeck.c: Likewise.
3432
e922069e
JW
34332015-10-26 Jim Wilson <jim.wilson@linaro.org>
3434
3435 PR debug/66068
3436 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
3437 after calling build_qualified_type.
3438
765dd391
CP
34392015-10-27 Cesar Philippidis <cesar@codesourcery.com>
3440 Thomas Schwinge <thomas@codesourcery.com>
3441 James Norris <jnorris@codesourcery.com>
3442 Joseph Myers <joseph@codesourcery.com>
3443 Julian Brown <julian@codesourcery.com>
3444 Bernd Schmidt <bschmidt@redhat.com>
3445
3446 * c-parser.c (c_parser_oacc_shape_clause): New.
3447 (c_parser_oacc_simple_clause): New.
3448 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
3449 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
3450
88bae6f4
TS
34512015-10-27 Thomas Schwinge <thomas@codesourcery.com>
3452 James Norris <jnorris@codesourcery.com>
3453 Cesar Philippidis <cesar@codesourcery.com>
3454
3455 PR c/64765
3456 PR c/64880
3457 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
3458 parameters, and handle these. Adjust all users.
3459 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
3460 into...
3461 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
3462 all users.
3463 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
3464 declare functions.
3465 (c_finish_omp_construct): Declare function.
3466 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
3467 Merge functions into...
3468 (c_finish_omp_construct): ... this new function.
3469
a8fc2579
RB
34702015-10-22 Richard Biener <rguenther@suse.de>
3471
3472 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
3473 before folding a MINUS_EXPR.
3474
e9122ef6
MP
34752015-10-21 Marek Polacek <polacek@redhat.com>
3476
3477 PR c/68024
3478 * c-decl.c (start_function): Warn about vararg functions without
3479 a prototype.
3480
9f47c7e5
IE
34812015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
3482
3483 * c-typeck.c (build_conditional_expr): Use boolean vector
3484 type for vector comparison.
3485 (build_vec_cmp): New.
3486 (build_binary_op): Use build_vec_cmp for comparison.
3487
fa60eeb9
MP
34882015-10-20 Marek Polacek <polacek@redhat.com>
3489
3490 * c-parser.c (is_cilkplus_vector_p): Don't define here.
3491
2c7020eb
MP
34922015-10-20 Marek Polacek <polacek@redhat.com>
3493
3494 PR c/67964
3495 * c-parser.c (c_parser_attributes): Break out of the loop if the
3496 token after an attribute isn't a comma.
3497
d9a6bd32
JJ
34982015-10-13 Jakub Jelinek <jakub@redhat.com>
3499 Aldy Hernandez <aldyh@redhat.com>
3500
3501 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
3502 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
3503 (c_parser_omp_variable_list): Handle structure elements for
3504 map, to and from clauses. Handle array sections in reduction
3505 clause. Formatting fixes.
3506 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
3507 if clause modifiers.
3508 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3509 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3510 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
3511 c_parser_omp_clause_is_device_ptr): New functions.
3512 (c_parser_omp_clause_ordered): Parse optional parameter.
3513 (c_parser_omp_clause_reduction): Handle array reductions.
3514 (c_parser_omp_clause_schedule): Parse optional simd modifier.
3515 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
3516 functions.
3517 (c_parser_omp_clause_linear): Parse linear clause modifiers.
3518 (c_parser_omp_clause_depend_sink): New function.
3519 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
3520 (c_parser_omp_clause_map): Parse release/delete map kinds and
3521 optional always modifier.
3522 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
3523 and c_finish_omp_clauses callers.
3524 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
3525 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
3526 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
3527 (OMP_CRITICAL_CLAUSE_MASK): Define.
3528 (c_parser_omp_critical): Parse critical clauses.
3529 (c_parser_omp_for_loop): Handle doacross loops, adjust
3530 c_finish_omp_for and c_finish_omp_clauses callers.
3531 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
3532 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
3533 (OMP_FOR_CLAUSE_MASK): Add linear clause.
3534 (c_parser_omp_for): Disallow ordered clause when combined with
3535 distribute. Disallow linear clause when combined with distribute
3536 and not combined with simd.
3537 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
3538 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
3539 parse clauses and if depend clause is found, don't parse a body.
3540 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
3541 Allow target parallel without for after it.
3542 (OMP_TASK_CLAUSE_MASK): Add priority clause.
3543 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
3544 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
3545 invalid kinds.
3546 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
3547 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
3548 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
3549 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
3550 functions.
3551 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
3552 defaultmap and is_device_ptr clauses.
3553 (c_parser_omp_target): Parse target parallel and target simd. Set
3554 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
3555 and target exit data. Diagnose invalid map kinds.
3556 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
3557 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
3558 construct.
3559 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
3560 &omp_priv.
3561 (OMP_TASKLOOP_CLAUSE_MASK): Define.
3562 (c_parser_omp_taskloop): New function.
3563 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
3564 handle PRAGMA_OMP_TASKLOOP.
3565 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
3566 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
3567 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
3568 Add IS_OMP argument, handle structure element bases, diagnose
3569 bitfields, pass IS_OMP recursively, diagnose known zero length
3570 array sections in depend clauses, handle array sections in reduction
3571 clause, diagnose negative length even for pointers.
3572 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
3573 types, pass IS_OMP down to handle_omp_array_sections_1, handle
3574 array sections in reduction clause, set
3575 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
3576 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
3577 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
3578 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
3579
21ba0cea
MP
35802015-10-06 Marek Polacek <polacek@redhat.com>
3581
3582 * c-parser.c (c_parser_statement_after_labels): Use
3583 protected_set_expr_location.
3584 (c_parser_omp_clause_num_gangs): Likewise.
3585 (c_parser_omp_clause_num_threads): Likewise.
3586 (c_parser_omp_clause_num_workers): Likewise.
3587 (c_parser_omp_clause_vector_length): Likewise.
3588 (c_parser_omp_clause_num_teams): Likewise.
3589 (c_parser_omp_clause_thread_limit): Likewise.
3590 * c-typeck.c (build_c_cast): Likewise.
3591 (c_cast_expr): Likewise.
3592
624d31fe
RS
35932015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3594
3595 * c-typeck.c (c_tree_equal): Use real_equal instead of
3596 REAL_VALUES_EQUAL.
3597
b8fd7909
JM
35982015-10-04 Jason Merrill <jason@redhat.com>
3599
3600 * c-parser.c (c_lex_one_token): Handle @synchronized.
3601 * c-decl.c (match_builtin_function_types): A declaration of a built-in
3602 can change whether the function is transaction_safe.
3603
1c7485af
MP
36042015-10-02 Marek Polacek <polacek@redhat.com>
3605
3606 PR c/67730
3607 * c-typeck.c (convert_for_assignment): Use the expansion point
3608 location throughout.
3609
3e3b8d63
MP
36102015-10-02 Marek Polacek <polacek@redhat.com>
3611
3612 PR c/64249
3613 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
3614 and pass it down to c_parser_if_statement.
3615 (c_parser_else_body): Add CHAIN parameter and pass it down to
3616 c_parser_statement_after_labels.
3617 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
3618 duplicated if-else-if conditions.
3619
aabef2de
MP
36202015-10-01 Marek Polacek <polacek@redhat.com>
3621
3622 * c-typeck.c (convert_for_assignment): Improve commentary.
3623
de8ddd5f
MP
36242015-09-30 Marek Polacek <polacek@redhat.com>
3625
3626 PR c/67730
3627 * c-typeck.c (c_finish_return): Use the expansion point location for
3628 certain "return with value" warnings.
3629
c4914de6
MLI
36302015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3631
3632 * c-parser.c (pragma_lex): Add loc argument.
3633
0e36f5c7
MP
36342015-09-15 Marek Polacek <polacek@redhat.com>
3635
3636 PR c/67580
3637 * c-decl.c (tag_exists_p): New function.
3638 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3639 struct/union/enum keywords are missing.
3640 * c-tree.h (tag_exists_p): Declare.
3641
2f3bb934
MP
36422015-09-15 Marek Polacek <polacek@redhat.com>
3643
3644 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3645 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3646 Return NULL_TREE instead of 0.
3647 (lookup_name): Return NULL_TREE instead of 0.
3648 (lookup_name_in_scope): Likewise.
3649 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3650 (parser_xref_tag): Use false instead of 0.
3651 (start_struct): Use true instead of 1.
3652 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3653
aa256c4a
MP
36542015-09-14 Marek Polacek <polacek@redhat.com>
3655
3656 * c-typeck.c (set_nonincremental_init_from_string): Use
3657 HOST_WIDE_INT_M1U when shifting a negative value.
3658
dbb68221
MW
36592015-09-09 Mark Wielaard <mjw@redhat.com>
3660
3661 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
3662 parm against NULL.
3663
a8a098ac
JJ
36642015-09-10 Jakub Jelinek <jakub@redhat.com>
3665
3666 PR c/67502
3667 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
3668 into OMP_FOR_PRE_BODY rather than before the loop.
3669
f4b189d5
JJ
36702015-09-09 Jakub Jelinek <jakub@redhat.com>
3671
0bb99c11
JJ
3672 PR c/67501
3673 * c-parser.c (c_parser_oacc_all_clauses,
3674 c_parser_omp_all_clauses): Remove invalid clause from
3675 list of clauses even if parser->error is set.
3676
fce5e5e3
JJ
3677 PR c/67500
3678 * c-parser.c (c_parser_omp_clause_aligned,
3679 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3680 test for errors.
3681 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3682 error_mark_node.
3683
f4b189d5
JJ
3684 PR c/67495
3685 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3686 instead of c_parser_unary_expression. If the result is !lvalue_p,
3687 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3688
b2aaf235
MP
36892015-09-04 Marek Polacek <polacek@redhat.com>
3690
3691 PR sanitizer/67279
3692 * c-typeck.c (build_binary_op): Don't instrument static initializers.
3693
1807ffc1
MS
36942015-09-03 Martin Sebor <msebor@redhat.com>
3695
3696 PR c/66516
8b652e65
JJ
3697 * c-typeck.c (convert_arguments, parser_build_unary_op,
3698 build_conditional_expr, c_cast_expr, convert_for_assignment,
3699 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
3700 reject_gcc_builtin.
3701 (c_decl_implicit): Define.
3702
d04ff417
MP
37032015-09-02 Marek Polacek <polacek@redhat.com>
3704
3705 PR c/67432
3706 * c-parser.c (c_parser_enum_specifier): Give a better error for
3707 an empty enum.
3708
a79683d5
TS
37092015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3710
3711 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3712
191a6b94
MP
37132015-08-12 Marek Polacek <polacek@redhat.com>
3714
3715 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
3716 LOC to it.
3717
420a9d9b
MP
37182015-08-03 Marek Polacek <polacek@redhat.com>
3719
3720 PR c/67088
3721 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
3722 Use it.
3723 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
3724
992118a1
PP
37252015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3726
3727 * c-parser.c (c_parser_if_body): Take token_indent_info
3728 argument. Call warn_for_misleading_indentation even when the
3729 body is a semicolon. Extract token_indent_infos corresponding
3730 to the guard, body and next tokens. Adjust call to
3731 warn_for_misleading_indentation accordingly.
3732 (c_parser_else_body): Likewise.
3733 (c_parser_if_statement): Likewise.
3734 (c_parser_while_statement): Likewise.
3735 (c_parser_for_statement): Likewise.
3736
46308474
LFSM
37372015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
3738 Manuel López-Ibáñez <manu@gcc.gnu.org>
3739
3740 * c-decl.c (get_parm_info): Remove static var. Update warning
3741 message.
3742
05b28fd6
MP
37432015-07-27 Marek Polacek <polacek@redhat.com>
3744
3745 PR c++/66555
3746 PR c/54979
3747 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3748
451b5e48
MP
37492015-07-20 Marek Polacek <polacek@redhat.com>
3750
3751 PR c++/55095
3752 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3753 (build_binary_op): Warn about left shift overflows.
3754
1916bcb5
AM
37552015-07-09 Andrew MacLeod <amacleod@redhat.com>
3756
3757 * c-array-notation.c: Adjust includes for flags.h changes.
3758 * c-objc-common.c: Likewise.
3759
c7131fb2
AM
37602015-07-07 Andrew MacLeod <amacleod@redhat.com>
3761
3762 * c-array-notation.c: Adjust includes.
3763 * c-aux-info.c: Likewise.
3764 * c-convert.c: Likewise.
3765 * c-decl.c: Likewise.
3766 * c-errors.c: Likewise.
3767 * c-lang.c: Likewise.
3768 * c-objc-common.c: Likewise.
3769 * c-parser.c: Likewise.
3770 * c-typeck.c: Likewise.
3771
da2e71c9
MLI
37722015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3773
3774 PR fortran/66605
3775 * c-decl.c (finish_function): Call do_warn_unused_parameter.
3776
b155cfd9
MP
37772015-06-29 Marek Polacek <polacek@redhat.com>
3778
3779 PR c/66322
3780 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3781 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
3782 about -Wswitch-bool here.
3783 (do_case): Update c_add_case_label call.
3784 (c_finish_case): Update c_do_switch_warnings call.
3785
31521951
MP
37862015-06-27 Marek Polacek <polacek@redhat.com>
3787
3788 * c-typeck.c: Use VECTOR_TYPE_P throughout.
3789
22d03525
MP
37902015-06-26 Marek Polacek <polacek@redhat.com>
3791
3792 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3793 INDIRECT_REF_P.
3794 * c-typeck.c (array_to_pointer_conversion): Likewise.
3795 (build_unary_op): Likewise.
3796 (c_finish_return): Likewise.
3797
f0889939
AM
37982015-06-25 Andrew MacLeod <amacleod@redhat.com>
3799
3800 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3801 * c-parser.c: Likewise.
3802
8d67ee55
RS
38032015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3804
3805 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3806 instead of pointer_hash.
3807 (detect_field_duplicates): Likewise.
3808
0ae9bd27
MP
38092015-06-25 Marek Polacek <polacek@redhat.com>
3810
3811 * c-array-notation.c: Use VAR_P throughout.
3812 * c-decl.c: Likewise.
3813 * c-objc-common.c: Likewise.
3814 * c-parser.c: Likewise.
3815 * c-typeck.c: Likewise.
3816
62f9079a
MP
38172015-06-25 Marek Polacek <polacek@redhat.com>
3818
3819 * c-decl.c: Use is_global_var throughout.
3820 * c-parser.c: Likewise.
3821 * c-typeck.c: Likewise.
3822
abb226c9
AM
38232015-06-17 Andrew MacLeod <amacleod@redhat.com>
3824
3825 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3826 * c-aux-info.c: Likewise.
3827 * c-convert.c: Likewise.
3828 * c-decl.c: Likewise.
3829 * c-errors.c: Likewise.
3830 * c-lang.c: Likewise.
3831 * c-objc-common.c: Likewise.
3832 * c-parser.c: Likewise.
3833 * c-typeck.c: Likewise.
3834
8cbababc
JH
38352015-06-11 Jan Hubicka <hubicka@ucw.cz>
3836
3837 PR middle-end/66325
3838 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3839 variants.
3840
a0349665
PMR
38412015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
3842
3843 * c-decl.c (pop_scope): Register the main translation unit
3844 through the new debug hook.
3845
13fdf2e2
AM
38462015-06-08 Andrew MacLeod <amacleod@redhat.com>
3847
3848 * c-array-notation.c : Adjust include files.
3849 * c-aux-info.c : Likewise.
3850 * c-convert.c : Likewise.
3851 * c-decl.c : Likewise.
3852 * c-errors.c : Likewise.
3853 * c-lang.c : Likewise.
3854 * c-lang.h : Likewise.
3855 * c-objc-common.c : Likewise.
3856 * c-parser.c : Likewise.
3857 * c-typeck.c : Likewise.
3858
d7438551
AH
38592015-06-05 Aldy Hernandez <aldyh@redhat.com>
3860
3861 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3862 immediately clobber it.
3863 (c_write_global_declarations_1): Remove call to
3864 check_global_declaration_1.
3865 (c_write_global_declarations_2): Remove.
3866 (c_write_final_cleanups): Rename from c_write_global_declarations.
3867 Remove call to finalize_compilation_unit.
3868 Remove calls to debugging hooks.
3869 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3870 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3871 * c-tree.h: Remove c_write_global_declarations.
3872
ecb9f223
AM
38732015-06-04 Andrew MacLeod <amacleod@redhat.com>
3874
3875 * c-array-notation.c: Adjust includes for restructured coretypes.h.
3876 * c-aux-info.c: Likewise.
3877 * c-convert.c: Likewise.
3878 * c-decl.c: Likewise.
3879 * c-errors.c: Likewise.
3880 * c-lang.c: Likewise.
3881 * c-objc-common.c: Likewise.
3882 * c-parser.c: Likewise.
3883 * c-typeck.c: Likewise.
3884
9482b620
MP
38852015-06-04 Marek Polacek <polacek@redhat.com>
3886
3887 PR c/66341
3888 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3889 it is a lvalue.
3890
bc51ace3
PK
38912015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3892
3893 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3894 Warn for empty struct.
3895 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3896
ea5b45b6
AT
38972015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
3898
3899 * c-decl.c (start_function): Call plugin before parsing.
3900 (finish_function): Call plugin after parsing.
3901
c2d47482
PK
39022015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3903
3904 PR c/49551
3905 * c-decl.c (merge_decls): Merge DECL_COMMON.
3906
a95492ab
JW
39072015-05-22 Jim Wilson <jim.wilson@linaro.org>
3908
3909 * Make-lang.in (check_gcc_pallelize): Define.
3910
fd5c817a
MP
39112015-05-22 Marek Polacek <polacek@redhat.com>
3912
3913 PR c/47043
3914 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
3915 attributes.
3916
c7b70a3c
MP
39172015-05-21 Marek Polacek <polacek@redhat.com>
3918
3919 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3920 DECL_BUILT_IN.
3921
21b634ae
MP
39222015-05-20 Marek Polacek <polacek@redhat.com>
3923
3924 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3925 * c-typeck.c: Likewise.
3926
296a8c2f
MP
39272015-05-19 Marek Polacek <polacek@redhat.com>
3928
3929 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3930
41b37d5e
JJ
39312015-05-19 Jakub Jelinek <jakub@redhat.com>
3932
3933 PR middle-end/66199
3934 * c-parser.c (c_parser_omp_for_loop): Don't add
3935 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3936 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3937 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3938 constructs.
3939
fab27f52
MM
39402015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
3941
3942 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 3943 swaps.
fab27f52 3944
40de31cf
MLI
39452015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3946
3947 PR fortran/44054
3948 * c-objc-common.c (c_tree_printer): Replace locus pointer with
3949 accessor function.
3950
3aa3c9fc
MP
39512015-05-14 Marek Polacek <polacek@redhat.com>
3952
3953 PR c/66066
3954 PR c/66127
3955 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
3956 rather than with 0.
3957
c3388e62
DM
39582015-05-12 David Malcolm <dmalcolm@redhat.com>
3959
3960 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
3961 to add a call to warn_for_misleading_indentation.
3962 (c_parser_else_body): Likewise, adding param "else_loc".
3963 (c_parser_if_statement): Check for misleading indentation.
3964 (c_parser_while_statement): Likewise.
3965 (c_parser_for_statement): Likewise.
3966
755e528f
MP
39672015-05-08 Marek Polacek <polacek@redhat.com>
3968
3969 PR c/64918
3970 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
3971 (output_init_element): Likewise.
3972
0173bd2a
MP
39732015-05-07 Marek Polacek <polacek@redhat.com>
3974
3975 PR c/65179
3976 * c-typeck.c (build_binary_op): Warn when left shifting a negative
3977 value.
3978
9babc352
MP
39792015-04-30 Marek Polacek <polacek@redhat.com>
3980
3981 * c-typeck.c (set_init_label): Call error_at instead of error and
3982 pass LOC to it.
3983
ac9f18db
MP
3984 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
3985 the type of a decl.
3986
ec3fba51
MP
3987 * c-typeck.c (c_build_va_arg): Clarify the error message.
3988
b811915d
TS
39892015-04-29 Thomas Schwinge <thomas@codesourcery.com>
3990
3991 * c-parser.c (c_parser_oacc_enter_exit_data): Use
3992 OMP_STANDALONE_CLAUSES.
3993
f3075008
MP
39942015-04-28 Marek Polacek <polacek@redhat.com>
3995
3996 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
3997
4e81b788
MP
39982015-04-28 Marek Polacek <polacek@redhat.com>
3999
4000 PR c/65901
4001 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
4002
6c1db78e
MP
40032015-04-25 Marek Polacek <polacek@redhat.com>
4004
4005 PR c/52085
4006 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
4007 attribute.
4008
5c4abbb8
MP
40092015-04-23 Marek Polacek <polacek@redhat.com>
4010
4011 PR c/65345
4012 * c-decl.c (set_labels_context_r): New function.
4013 (store_parm_decls): Call it via walk_tree_without_duplicates.
4014 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
4015 instead of create_tmp_var. Build TARGET_EXPR instead of
4016 COMPOUND_EXPR.
4017 (build_atomic_assign): Use create_tmp_var_raw instead of
4018 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
4019
06aca1d5
IV
40202015-04-20 Ilya Verbin <ilya.verbin@intel.com>
4021
4022 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
4023 (c_parser_omp_target_update): Add missed %> to error_at ().
4024
8fba1830
BRF
40252015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
4026
4027 PR target/55143
4028 * c-decl.c (c_default_pointer_mode): Remove definition.
4029 * c-tree.h (c_default_pointer_mode): Remove declaration.
4030
62021f64
TB
40312015-03-27 Tobias Burnus <burnus@net-b.de>
4032
4033 PR c/65586
4034 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
4035 error out.
4036 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
4037 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
4038 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
4039
9b65e171
JJ
40402015-03-19 Jakub Jelinek <jakub@redhat.com>
4041
4042 * c-decl.c (c_decl_attributes): Also add "omp declare target"
4043 attribute for DECL_EXTERNAL VAR_DECLs.
4044
17958621
JJ
40452015-03-11 Jakub Jelinek <jakub@redhat.com>
4046
4047 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
4048 argument.
4049
7ccb1a11
JJ
40502015-03-10 Jakub Jelinek <jakub@redhat.com>
4051
4052 PR c/65120
4053 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
4054 before preparing arguments to warn_logical_not_parentheses.
4055
01177669
JJ
40562015-03-09 Jakub Jelinek <jakub@redhat.com>
4057
4058 PR c/65120
4059 * c-typeck.c (parser_build_binary_op): Don't warn for
4060 !!x == y or !b == y where b is _Bool.
4061
802ac282
MP
40622015-03-09 Marek Polacek <polacek@redhat.com>
4063
4064 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
4065 * c-decl.c (grokdeclarator): Likewise.
4066 * c-typeck.c (build_binary_op): Likewise.
4067
e5165b60
MP
40682015-02-27 Marek Polacek <polacek@redhat.com>
4069
4070 PR c/65228
4071 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
4072
065d214c
MP
40732015-02-14 Marek Polacek <polacek@redhat.com>
4074
4075 PR c/64768
4076 * c-decl.c (grokdeclarator): Set the range of a flexible array member
4077 declared through a typedef name.
4078
e5d9235b
MP
40792015-02-13 Marek Polacek <polacek@redhat.com>
4080
4081 PR c/65050
4082 * c-decl.c (grokdeclarator): Print also the type when giving
4083 the error message about array's incomplete element type.
4084
fa01ffcc
JJ
40852015-02-11 Jakub Jelinek <jakub@redhat.com>
4086
4087 PR c/64824
4088 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
4089 check in the POP macro.
4090
c3e38a03
MP
40912015-02-09 Marek Polacek <polacek@redhat.com>
4092
4093 PR c/64856
4094 * c-typeck.c (process_init_element): Don't always wrap
4095 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
4096 initializing a range of elements.
4097
4886ec8e
JJ
40982015-02-04 Jakub Jelinek <jakub@redhat.com>
4099
4100 PR c/64824
4101 PR c/64868
4102 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
4103
c3e38a03 41042015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
4105
4106 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
4107 processing enum declaration.
4108
7b33f0c8
MP
41092015-01-29 Marek Polacek <polacek@redhat.com>
4110
4111 PR c/64709
4112 * c-typeck.c (pop_init_level): If constructor_elements has
4113 exactly one element with integer_zerop value, set constructor_zeroinit
4114 to 1. Remove braces around warning_init call.
4115
dea63e49
JJ
41162015-01-27 Jakub Jelinek <jakub@redhat.com>
4117
4118 PR c/64766
4119 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
4120 of FUNCTION_DECLs with error_mark_node.
4121
d38f7dce
JJ
41222015-01-26 Jakub Jelinek <jakub@redhat.com>
4123
4124 PR c/64778
4125 * c-typeck.c (convert_arguments): Return -1 if there are
4126 error_args, even if we've diagnosed too many arguments.
4127
cbf5d0e7
RB
41282015-01-21 Richard Biener <rguenther@suse.de>
4129
4130 PR middle-end/64313
4131 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
4132 for builtins the user declared correctly.
4133
41dbbb37
TS
41342015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4135 Bernd Schmidt <bernds@codesourcery.com>
4136 Cesar Philippidis <cesar@codesourcery.com>
4137 James Norris <jnorris@codesourcery.com>
4138 Jakub Jelinek <jakub@redhat.com>
4139 Ilmir Usmanov <i.usmanov@samsung.com>
4140
4141 * c-parser.c: Include "gomp-constants.h".
4142 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
4143 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
4144 Use OMP_CLAUSE_SET_MAP_KIND.
4145 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
4146 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
4147 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
4148 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
4149 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
4150 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
4151 "copyout", "create", "delete", "deviceptr", "gang", "host",
4152 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
4153 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
4154 "present_or_create", "pcreate", "seq", "self", "vector",
4155 "vector_length", "wait", "worker".
4156 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
4157 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
4158 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
4159 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
4160 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
4161 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
4162 (c_parser_oacc_data_clause_deviceptr)
4163 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
4164 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
4165 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
4166 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
4167 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
4168 (c_parser_oacc_parallel, c_parser_oacc_update)
4169 (c_parser_oacc_wait): New functions.
4170 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
4171 (c_finish_oacc_data): New prototypes.
4172 * c-typeck.c: Include "gomp-constants.h".
4173 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
4174 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
4175 OMP_CLAUSE_SET_MAP_KIND.
4176 (c_finish_oacc_parallel, c_finish_oacc_kernels)
4177 (c_finish_oacc_data): New functions.
4178 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
4179 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
4180 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
4181 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
4182 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
4183 GOMP_MAP_FORCE_DEVICEPTR.
4184
adfac8df
JJ
41852015-01-09 Michael Collison <michael.collison@linaro.org>
4186
4187 * c-array-notation.c: Include hash-set.h, machmode.h,
4188 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4189 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
4190 * c-aux-info.c: Ditto.
4191 * c-convert.c: Ditto.
4192 * c-decl.c: Ditto.
4193 * c-errors.c: Ditto.
4194 * c-lang.c: Dittoxs.
4195 * c-objc-common.c: Ditto.
4196 * c-parser.c: Ditto.
4197 * c-typeck.c: Include hash-set.h, machmode.h,
4198 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4199 fold-const.h, wide-int.h, inchash.h, real.h and
4200 fixed-value.h due to flattening of tree.h.
4201
2cc901dc
MP
42022015-01-07 Marek Polacek <polacek@redhat.com>
4203
4204 PR c/64417
4205 * c-typeck.c (process_init_element): Disallow initialization of
4206 a flexible array member with a string constant if the structure
4207 is in an array.
4208
5624e564
JJ
42092015-01-05 Jakub Jelinek <jakub@redhat.com>
4210
e5341100
JJ
4211 PR sanitizer/64344
4212 * c-typeck.c (convert_for_assignment, c_finish_return): For
4213 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
4214 types also set in_late_binary_op around convert call.
4215 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
4216 to integral type casts, if not in_late_binary_op, pass c_fully_fold
4217 result on expr as last argument to ubsan_instrument_float_cast,
4218 if in_late_binary_op, don't use c_save_expr but save_expr.
4219
5624e564
JJ
4220 Update copyright years.
4221
5bd012f8
MP
42222015-01-05 Marek Polacek <polacek@redhat.com>
4223
4224 PR c/64423
4225 * c-typeck.c (build_array_ref): Pass loc down to
4226 warn_array_subscript_with_type_char.
4227
3f8257db 42282014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
4229
4230 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 4231 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 4232 element type.
8e745a17 4233 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 4234 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 4235 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 4236 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 4237 to PEDWARN_FOR_QUALIFIERS.
768952be 4238
8f94a8c4
JJ
42392014-12-17 Jakub Jelinek <jakub@redhat.com>
4240
4241 PR sanitizer/64289
4242 * c-convert.c: Include ubsan.h.
4243 (convert): For real -> integral casts and
4244 -fsanitize=float-cast-overflow don't call convert_to_integer, but
4245 instead instrument the float cast directly.
4246
b731b390
JJ
42472014-11-29 Jakub Jelinek <jakub@redhat.com>
4248
4249 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
4250 c_finish_stmt_expr): Remove NULL last argument from
4251 create_tmp_var_raw and create_tmp_var calls.
4252 * c-array-notation.c (fix_builtin_array_notation_fn,
4253 build_array_notation_expr, fix_conditional_array_notations_1,
4254 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
4255
541e35a6
MP
42562014-11-28 Marek Polacek <polacek@redhat.com>
4257
4258 PR c/63862
4259 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
4260 convert the right operand to integer type.
4261
b286be94
MP
42622014-11-25 Marek Polacek <polacek@redhat.com>
4263
4264 PR c/63877
4265 * c-decl.c (start_function): Disable -Wmissing-declarations warning
4266 for inline functions.
4267
aa7da51a
JJ
42682014-11-21 Jakub Jelinek <jakub@redhat.com>
4269
4270 PR target/63764
4271 * c-typeck.c (build_array_ref): Adjust
4272 convert_vector_to_pointer_for_subscript caller. If it returns true,
4273 call non_lvalue_loc on the result.
4274
d876207f
RB
42752014-11-11 Richard Biener <rguenther@suse.de>
4276
4277 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
4278 to true.
4279
e5e44252
AK
42802014-11-10 Andi Kleen <ak@linux.intel.com>
4281
4282 PR c/60804
4283 * c-parser.c (c_parser_statement_after_labels): Call
4284 check_no_cilk.
4285 (c_parser_if_statement): Dito.
4286 (c_parser_switch_statement): Dito.
4287 (c_parser_while_statement): Dito.
4288 (c_parser_do_statement): Dito.
4289 (c_parser_for_statement): Dito.
4290 * c-typeck.c (c_finish_loop): Dito.
4291
13c21655
PC
42922014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
4293
4294 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
4295 OPT_Wshift_count_overflow in the warnings.
4296
2d51fcef
MP
42972014-10-30 Marek Polacek <polacek@redhat.com>
4298
4299 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
4300 print the stripped version as well, if they're not the same.
4301
ef4bddc2
RS
43022014-10-29 Richard Sandiford <richard.sandiford@arm.com>
4303
4304 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
4305 machine_mode.
4306
c582198b
AM
43072014-10-28 Andrew MacLeod <amacleod@redhat.com>
4308
4309 * c-decl.c: Adjust include files.
4310 * c-parser.c: Ditto.
4311
ddc8de03
PM
43122014-10-27 Phil Muldoon <pmuldoon@redhat.com>
4313 Tom Tromey <tromey@redhat.com>
4314
4315 * c-tree.h (enum c_oracle_request): New.
4316 (c_binding_oracle_function): New typedef.
4317 (c_binding_oracle, c_pushtag, c_bind): Declare.
4318 * c-decl.c (c_binding_oracle): New global.
4319 (I_SYMBOL_CHECKED): New macro.
4320 (i_symbol_binding): New function.
4321 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
4322 (I_TAG_CHECKED): New macro.
4323 (i_tag_binding): New function.
4324 (I_TAG_BINDING, I_TAG_DECL): Redefine.
4325 (I_LABEL_CHECKED): New macro.
4326 (i_label_binding): New function.
4327 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
4328 (c_print_identifier): Save and restore c_binding_oracle.
4329 (c_pushtag, c_bind): New functions.
4330
60393bbc
AM
43312014-10-27 Andrew MacLeod <amacleod@redhat.com>
4332
4333 * c-typeck.c: Adjust include files.
4334
d723bb7c
MLI
43352014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
4336
4337 PR c++/53061
4338 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
4339 initialization here...
4340 (c_initialize_diagnostics): ... but here. Set defaults after
4341 building pretty-printer.
4342
1bc5a451
MP
43432014-10-23 Marek Polacek <polacek@redhat.com>
4344
4345 PR c/63626
4346 * c-decl.c (pop_scope): Don't print warning in external_scope.
4347
4435bb92
MP
43482014-10-19 Marek Polacek <polacek@redhat.com>
4349
4350 PR c/63567
4351 * c-typeck.c (output_init_element): Allow initializing objects with
4352 static storage duration with compound literals even in C99 and add
4353 pedwarn for it.
4354
7278465e
MP
43552014-10-17 Marek Polacek <polacek@redhat.com>
4356
4357 PR c/63567
4358 * c-typeck.c (digest_init): Allow initializing objects with static
4359 storage duration with compound literals even in C99 and add pedwarn
4360 for it.
4361
d9b7be2e
MP
43622014-10-17 Marek Polacek <polacek@redhat.com>
4363
4364 PR c/63543
4365 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
4366 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
4367 error multiple times. Print the type.
4368
f406ae1f
MP
43692014-10-17 Marek Polacek <polacek@redhat.com>
4370
4371 PR c/63549
4372 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
4373 type.
4374
92574c7c
MP
43752014-10-17 Marek Polacek <polacek@redhat.com>
4376
4377 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
4378 (start_function): Use OPT_Wimplicit_int instead of 0.
4379 (store_parm_decls_oldstyle): Likewise.
4380
1bc4a978
MT
43812014-10-17 Alan Modra <amodra@gmail.com>
4382
4383 PR middle-end/61848
4384 * c-decl.c (merge_decls): Don't merge section name or tls model
4385 to newdecl symtab node, instead merge to olddecl. Override
4386 existing olddecl section name. Set tls_model for all thread-local
4387 vars, not just OMP thread-private ones. Remove incorrect comment.
4388
83685514
AM
43892014-10-16 Andrew MacLeod <amacleod@redhat.com>
4390
4391 * c-decl.c: Adjust include files.
4392
78a7c317
DD
43932014-10-14 DJ Delorie <dj@redhat.com>
4394
4395 * c-parser.c (c_parse_init): Add RID entries for each __intN.
4396 (c_token_starts_typename): Check all __intN, not just __int128.
4397 (c_token_starts_declspecs): Likewise.
4398 (c_parser_declspecs): Likewise.
4399 (c_parser_attribute_any_word): Likewise.
4400 (c_parser_objc_selector): Likewise.
4401 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
4402 (struct c_declspecs): Add int_n_idx field to record *which* __intN
4403 is specified.
4404 * c-decl.c (declspecs_add_type): Check for all __intN, not just
4405 __int128.
4406 (finish_declspecs): Likewise.
4407
74d98c1e
AB
44082014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
4409
8e745a17 4410 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 4411 the duplicate code.
8e745a17 4412 (c_parser_statement): Call the new function.
74d98c1e 4413
84937de2
MP
44142014-10-09 Marek Polacek <polacek@redhat.com>
4415
4416 PR c/63480
4417 * c-typeck.c (pop_init_level): Don't warn about initializing
4418 with { }.
4419
0382aaa0
MP
44202014-10-07 Marek Polacek <polacek@redhat.com>
4421
4422 PR c/59717
4423 * c-decl.c (header_for_builtin_fn): New function.
4424 (implicitly_declare): Suggest which header to include.
4425
7a0ca710
MP
44262014-10-07 Marek Polacek <polacek@redhat.com>
4427
4428 * c-convert.c (convert): Use error_operand_p.
4429 * c-typeck.c (require_complete_type): Likewise.
4430 (really_atomic_lvalue): Likewise.
4431 (digest_init): Likewise.
4432 (handle_omp_array_sections_1): Likewise.
4433
6bc8a126
MP
44342014-10-03 Marek Polacek <polacek@redhat.com>
4435
4436 PR c/63453
4437 * c-decl.c (pop_scope): Don't warn about "inline function declared
4438 but never defined" for functions marked with gnu_inline attribute.
4439
d90c0a59
JJ
44402014-09-25 Jakub Jelinek <jakub@redhat.com>
4441
4442 PR c++/63249
4443 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
4444 on low_bound and length.
4445
083e891e
MP
44462014-09-24 Marek Polacek <polacek@redhat.com>
4447
4448 PR c/61405
4449 PR c/53874
4450 * c-parser.c: Don't define CPP_KEYWORD.
4451 (c_parser_switch_statement): Pass original type to c_finish_case.
4452 * c-tree.h (c_finish_case): Update declaration.
4453 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
4454 conditionally to c_do_switch_warnings.
4455
8d95fe25
MP
44562014-09-03 Marek Polacek <polacek@redhat.com>
4457
4458 PR c/62024
4459 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
4460 conversions.
4461
9a771876
JJ
44622014-09-02 Jakub Jelinek <jakub@redhat.com>
4463 Balaji V. Iyer <balaji.v.iyer@intel.com>
4464 Igor Zamyatin <igor.zamyatin@intel.com>
4465
4466 * c-parser.c (c_parser_cilk_for): New function.
4467 (c_parser_cilk_grainsize): Likewise.
4468 (c_get_temp_regvar): Likewise.
4469 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
4470 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
4471 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
4472 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
4473 case.
4474
b7679d96
CG
44752014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
4476
4477 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
4478 with using HOST_WIDE_INT without truncation to 'int'
4479
59ea0364
MP
44802014-08-22 Marek Polacek <polacek@redhat.com>
4481
4482 PR c++/62199
4483 * c-typeck.c (parser_build_binary_op): Adjust call to
4484 warn_logical_not_parentheses.
4485
671a475e
IZ
44862014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
4487
4488 PR other/62008
4489 * c-parser.c (c_parser_array_notation): Check for correct
4490 type of an array added.
4491
04159acf
MP
44922014-08-19 Marek Polacek <polacek@redhat.com>
4493
4494 PR c++/62153
4495 * c-typeck.c (build_binary_op): If either operand of a comparison
4496 is a boolean expression, call maybe_warn_bool_compare.
4497
c77935ee
PP
44982014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
4499
4500 PR c/45584
4501 * c-typeck.c (build_c_cast): Do a conversion even when the
4502 TYPE_MAIN_VARIANTs are the same.
4503
35aff4fb
MP
45042014-08-19 Marek Polacek <polacek@redhat.com>
4505
4506 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
4507 pedwarn_c99 instead of pedwarn.
4508 (grokfield): Likewise.
4509 (warn_defaults_to): New function.
4510 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
4511 Unconditionally call pedwarn_c99 instead of pedwarn.
4512 (start_function): Call warn_defaults_to instead of pedwarn_c99.
4513 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
4514 check flag_isoc11 before.
4515 * c-errors.c (pedwarn_c99): Change the return type to bool.
4516 Handle -Wc99-c11-compat.
4517 * c-parser.c (disable_extension_diagnostics): Handle
4518 warn_c99_c11_compat.
4519 (restore_extension_diagnostics): Likewise.
4520 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
4521 instead of pedwarn, don't check flag_isoc11 before.
4522 (c_parser_declspecs): Likewise.
4523 (c_parser_alignas_specifier): Likewise.
4524 (c_parser_alignof_expression): Likewise.
4525 (c_parser_generic_selection): Likewise.
4526 * c-tree.h (pedwarn_c99): Update declaration.
4527 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
4528 of pedwarn_c99.
4529
177cce46
MP
45302014-08-19 Marek Polacek <polacek@redhat.com>
4531
4532 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
4533 to pedwarn_c90.
4534 * c-errors.c: Include "opts.h".
4535 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
4536 * c-parser.c (disable_extension_diagnostics): Handle negative value
4537 of warn_c90_c99_compat, too.
4538 (restore_extension_diagnostics): Likewise.
4539 (c_parser_compound_statement_nostart): Pass
4540 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
4541
6dc99c33
MP
45422014-08-12 Marek Polacek <polacek@redhat.com>
4543
4544 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
4545 Add pedwarn.
4546 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
4547 Likewise.
4548 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
4549
3f8257db 45502014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
4551
4552 PR c/51849
4553 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
4554 Call pedwarn_c90 instead of pedwarn.
4555 (check_bitfield_type_and_width): Likewise.
4556 (declspecs_add_qual): Likewise.
4557 (declspecs_add_type): Likewise.
4558 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
4559 Adjust to only call pedwarn_c90.
4560 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
4561 pedwarn_c90 instead of pedwarn.
4562 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
4563 * c-parser.c (disable_extension_diagnostics): Handle
4564 warn_c90_c99_compat.
4565 (restore_extension_diagnostics): Likewise.
4566 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
4567 pedwarn_c90 instead of pedwarn.
4568 (c_parser_initelt): Likewise.
4569 (c_parser_postfix_expression): Likewise.
4570 (c_parser_postfix_expression_after_paren_type): Likewise.
4571 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
4572 * c-tree.h: Fix formatting.
4573 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
4574 pedwarn_c90 instead of pedwarn.
4575
9f25a338
TS
45762014-08-07 Trevor Saunders <tsaunders@mozilla.com>
4577
4578 * c-typeck.c: Remove include of pointer-set.h.
4579
044331a8
MP
45802014-08-07 Marek Polacek <polacek@redhat.com>
4581
4582 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
4583
b787e7a2
TS
45842014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4585
4586 * c-typeck.c: Use hash_map instead of pointer_map.
4587
6e2830c3
TS
45882014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4589
4590 * c-decl.c: Use hash_set instead of pointer_set.
4591
a7ee52fb
IZ
45922014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
4593
4594 PR middle-end/61455
4595 * c-array-notation.c (expand_array_notations): Handling
4596 of DECL_EXPR added.
4597
b4dfdc11
MG
45982014-07-31 Marc Glisse <marc.glisse@inria.fr>
4599
4600 PR c++/60517
4601 * c-typeck.c (c_finish_return): Return 0 instead of the address of
4602 a local variable.
4603
976d5a22
TT
46042014-07-30 Tom Tromey <tromey@redhat.com>
4605
4606 * c-typeck.c (struct constructor_stack) <designator_depth>: New
4607 field.
4608 (really_start_incremental_init, push_init_level): Initialize
4609 designator_depth.
4610 (pop_init_level): Set global designator_depth.
4611 (process_init_element): Check for designated_init attribute.
4612
30281de2
MP
46132014-07-20 Marek Polacek <polacek@redhat.com>
4614
4615 PR c/61852
4616 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
4617 (implicitly_declare): Pass location to implicit_decl_warning.
4618
b108f48f
JJ
46192014-07-14 Jakub Jelinek <jakub@redhat.com>
4620
4621 PR middle-end/61294
4622 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
4623 If non-NULL, call c_parser_check_literal_zero.
4624 (c_parser_check_literal_zero): New function.
4625 (c_parser_postfix_expression_after_primary): Adjust
4626 c_parser_expr_list caller, handle -Wmemset-transposed-args.
4627
773ec47f
MP
46282014-07-06 Marek Polacek <polacek@redhat.com>
4629
4630 PR c/6940
4631 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4632 * c-tree.h (C_ARRAY_PARAMETER): Define.
4633 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4634 function parameter.
4635
22e1cf1c 46362014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 4637 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
4638
4639 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4640 releasing symbol.
4641
52ec0ea3
MP
46422014-07-01 Marek Polacek <polacek@redhat.com>
4643
4644 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4645 instead of 0 to WARN_FOR_ASSIGNMENT.
4646
d5c3d343
MP
46472014-07-01 Marek Polacek <polacek@redhat.com>
4648
4649 PR c/58286
4650 * c-typeck.c (convert_for_assignment): Pass
4651 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4652
6a7253a4
MP
46532014-06-30 Marek Polacek <polacek@redhat.com>
4654
4655 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4656 has no_sanitize_undefined attribute.
4657
5e88a8f4
IZ
46582014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
4659
4660 PR middle-end/57541
4661 * c-array-notation.c (fix_builtin_array_notation_fn):
4662 Check for 0 arguments in builtin call. Check that bultin argument is
4663 correct.
4664 * c-parser.c (c_parser_array_notation): Check for incorrect initial
4665 index.
4666
9698b078
SH
46672014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
4668
4669 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
4670 qualifiers in __auto_type for atomic types.
4671 (c_parser_typeof_specifier): Discard all type qualifiers in
4672 __typeof__ for atomic types.
4673
6e07c515
MP
46742014-06-25 Marek Polacek <polacek@redhat.com>
4675
4676 PR c/61162
4677 * c-parser.c (c_parser_statement_after_labels): Pass the location of
4678 the return expression to c_finish_return.
4679
da6f124d
JJ
46802014-06-25 Jakub Jelinek <jakub@redhat.com>
4681
4682 * c-typeck.c (c_finish_omp_clauses): Make sure
4683 OMP_CLAUSE_LINEAR_STEP has correct type.
4684
c203e8a7
TS
46852014-06-24 Trevor Saunders <tsaunders@mozilla.com>
4686
4687 * c-decl.c: Adjust.
4688
56ad0e38
JJ
46892014-06-24 Jakub Jelinek <jakub@redhat.com>
4690
4691 * c-parser.c (c_parser_omp_for_loop): For
4692 #pragma omp parallel for simd move lastprivate clause from parallel
4693 to for rather than simd.
4694
47c2554f
MP
46952014-06-23 Marek Polacek <polacek@redhat.com>
4696
4697 * c-typeck.c (parser_build_binary_op): Don't call
4698 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
4699
56363ffd
JH
47002014-06-15 Jan Hubicka <hubicka@ucw.cz>
4701
4702 * c-parser.c (c_parser_omp_threadprivate): Likewise.
4703 * c-decl.c (merge_decls): Likewise.
4704
d7ff7ae5
MP
47052014-06-09 Marek Polacek <polacek@redhat.com>
4706
4707 PR c/36446
4708 * c-typeck.c (error_init): Call inform instead of error_at.
4709 (pedwarn_init): Call inform instead of pedwarn.
4710 (warning_init): Call inform instead of warning_at.
4711
24d047a3
JH
47122014-06-07 Jan Hubicka <hubicka@ucw.cz>
4713
4714 * c-decl.c (merge_decls): Use set_decl_section_name.
4715 (duplicate_decls): Remove node if it exists.
4716
9bac5cbb
G
47172014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
4718
4719 PR c/53119
4720 * c-typeck.c (push_init_level, process_init_element,
4721 pop_init_level): Correct check for zero initialization, move
4722 missing brace warning to respect zero initialization.
4723
8ffcdea8
MP
47242014-06-05 Marek Polacek <polacek@redhat.com>
4725
4726 PR c/56724
4727 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
4728
742938c9
MP
47292014-06-05 Marek Polacek <polacek@redhat.com>
4730
4731 PR c/49706
4732 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
4733 on the left hand side operand of a comparison.
4734
6447c55d
MP
47352014-06-05 Marek Polacek <polacek@redhat.com>
4736
4737 PR c/48062
4738 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
4739 Print note only if the warning was printed.
4740
9dc7743c
IZ
47412014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
4742
4743 PR c/58942
4744 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4745 with a pointer.
4746
fedfecef
MP
47472014-06-03 Marek Polacek <polacek@redhat.com>
4748
4749 PR c/60439
4750 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4751 c_start_case.
4752 * c-tree.h (c_start_case): Update.
4753 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
4754 switch condition has boolean value.
4755
9b2b7279
AM
47562014-06-02 Andrew MacLeod <amacleod@redhat.com>
4757
4758 * c-decl.c: Include builtins.h.
4759 * c-parser.c: Likewise.
4760
5c1bc275
MP
47612014-05-27 Marek Polacek <polacek@redhat.com>
4762
4763 PR c/56724
4764 * c-typeck.c (convert_arguments): Get location of a parameter. Change
4765 error and warning calls to error_at and warning_at. Pass location of
4766 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
4767 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4768 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
4769
97563bc8
IZ
47702014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
4771
4772 PR c/61191
4773 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4774 function parameters.
4775
aede2c10
JH
47762014-05-23 Jan Hubicka <hubicka@ucw.cz>
4777
4778 * c-decl.c (merge_decls): Preserve symtab node pointers.
4779 (duplicate_decls): Free new decl.
4780
edbba2ce
TS
47812014-05-23 Thomas Schwinge <thomas@codesourcery.com>
4782
f3316c6d
TS
4783 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4784 initialization.
4785
edbba2ce
TS
4786 * c-parser.c (c_parser_omp_target): Return bool values.
4787
68c81f24
TS
47882014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4789
4790 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4791 num_teams_loc variable to num_thread_limit_loc.
4792
632f2871
RS
47932014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4794
4795 * c-array-notation.c (expand_array_notations): Use void_node
4796 instead of void_zero_node.
4797
766090c2
TS
47982014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4799
4800 * c-decl.c (finish_struct): Adjust.
4801 (finish_enum): Likewise.
4802 (bind): Adjust.
4803 (record_inline_static): Likewise.
4804 (push_scope): Likewise.
4805 (make_label): Likewise.
4806 (lookup_label_for_goto): Likewise.
4807 (finish_struct): Likewise.
4808 (finish_enum): Likewise.
4809 (store_parm_decls): Likewise.
4810 (c_push_function_context): Likewise.
4811 * c-lang.h: Remove usage of variable_size gty attribute.
4812 * c-parser.c (c_parse_init): Adjust.
4813 (c_parse_file): Likewise.
4814
2b107f6b
MP
48152014-05-13 Marek Polacek <polacek@redhat.com>
4816
4817 PR c/61162
4818 * c-typeck.c (convert_for_assignment): Pass location to
4819 WARN_FOR_ASSIGNMENT instead of input_location.
4820
d033409e
MP
48212014-05-10 Marek Polacek <polacek@redhat.com>
4822
4823 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4824 maybe_warn_string_init.
4825 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4826 maybe_warn_string_init.
4827 * c-tree.h (maybe_warn_string_init): Update declaration.
4828 * c-typeck.c (maybe_warn_string_init): Add location parameter.
4829 Call pedwarn_init with loc instead of with input_location.
4830 (digest_init): Pass init_loc to maybe_warn_string_init.
4831 (pop_init_level): Call pedwarn_init with loc instead of with
4832 input_location.
4833 (set_init_index): Likewise.
4834 (process_init_element): Likewise.
4835
ea58ef42
MP
48362014-05-09 Marek Polacek <polacek@redhat.com>
4837
4838 PR c/61096
4839 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4840 (c_parser_initelt): Pass location to set_init_label. Pass array index
4841 location to set_init_index.
4842 * c-tree.h (push_init_level): Update declaration.
4843 (pop_init_level): Likewise.
4844 (set_init_index): Likewise.
4845 (set_init_label): Likewise.
4846 * c-typeck.c (error_init): Add location parameter. Call error_at
4847 instead of error.
4848 (digest_init): Pass init_loc to error_init.
4849 (really_start_incremental_init):
4850 (push_init_level): Add location parameter. Pass loc to pop_init_level
4851 and error_init.
4852 (pop_init_level): Likewise.
4853 (set_designator): Add location parameter. Pass loc to pop_init_level,
4854 push_init_level, and error_init.
4855 (set_init_index): Add location parameter. Pass loc to error_init and
4856 set_designator.
4857 (set_init_label): Likewise.
4858 (output_init_element): Pass loc to error_init.
4859 (process_init_element): Pass loc to error_init, pop_init_level,
4860 pedwarn_init, and push_init_level.
4861
661a0813
MP
48622014-05-09 Marek Polacek <polacek@redhat.com>
4863
4864 PR c/50459
4865 * c-parser.c (c_parser_attributes): Parse the arguments as an
4866 expression-list if the attribute takes identifier.
4867
2793eeab
MP
48682014-05-08 Marek Polacek <polacek@redhat.com>
4869
4870 PR c/61053
4871 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4872 TYPE_ALIGN_UNIT.
4873
f827930a
MP
48742014-05-08 Marek Polacek <polacek@redhat.com>
4875
4876 PR c/61077
4877 * c-decl.c (start_function): Warn for _Atomic-qualified return type
4878 of main.
4879
1d60af08
KZ
48802014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4881 Mike Stump <mikestump@comcast.net>
4882 Richard Sandiford <rdsandiford@googlemail.com>
4883
4884 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4885 (finish_enum): Use wide-int interfaces.
4886 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4887 * c-typeck.c (build_c_cast): Likewise.
4888 (set_nonincremental_init_from_string): Likewise.
4889 (c_tree_equal): Likewise.
4890
a0e24419
MP
48912014-05-02 Marek Polacek <polacek@redhat.com>
4892
4893 PR c/25801
4894 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
4895 Return size_one_node when the type is not complete.
4896 (pointer_diff): Remove comment.
4897 (build_unary_op): Improve error messages.
4898
19fc9faa
MP
48992014-05-02 Marek Polacek <polacek@redhat.com>
4900
4901 * c-typeck.c (c_finish_return): Separate warning_at calls.
4902
63bc4e87
MP
49032014-05-02 Marek Polacek <polacek@redhat.com>
4904
4905 * c-tree.h (error_init): Remove declaration.
4906 (pedwarn_init): Likewise.
4907 * c-typeck.c (error_init): Make static and move above.
4908 (pedwarn_init): Likewise.
4909 (warning_init): Move above.
4910 (maybe_warn_string_init): Likewise.
4911
4bd2511b
JL
49122014-05-01 Jeff Law <law@redhat.com>
4913
4914 Revert:
4915
4916 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4917 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
4918 avoid goto.
4919
6a358dcb
MP
49202014-05-02 Marek Polacek <polacek@redhat.com>
4921
4922 PR c/60784
4923 * c-typeck.c (push_init_level): Set constructor_designated to
4924 p->designated for structures.
4925
ae5ebda4
MP
49262014-05-01 Marek Polacek <polacek@redhat.com>
4927
4928 PR c/60915
4929 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4930 function-definition has an attribute after the declarator.
4931
96b40f8d
MP
49322014-05-01 Marek Polacek <polacek@redhat.com>
4933
4934 PR c/60257
4935 * c-typeck.c (warning_init): Add location_t parameter. Call
4936 warning_at instead of warning.
4937 (push_init_level): Pass input_location to warning_init.
4938 (add_pending_init): Add location_t parameter. Pass loc to
4939 warning_init.
4940 (set_nonincremental_init): Pass input_location to add_pending_init.
4941 (set_nonincremental_init_from_string): Likewise.
4942 (output_init_element): Pass loc to warning_init and to
4943 add_pending_init.
4944
32e00768
MP
49452014-05-01 Marek Polacek <polacek@redhat.com>
4946
4947 PR c/43395
4948 * c-typeck.c (c_finish_return): Distinguish between label and variable
4949 when warning about returning local address.
4950
c9379ce2
MP
49512014-05-01 Marek Polacek <polacek@redhat.com>
4952
4953 PR c/29467
4954 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
4955 in C89 mode.
4956
d00887e8
MP
49572014-05-01 Marek Polacek <polacek@redhat.com>
4958
4959 PR c/43245
4960 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
4961 instead of 0 to WARN_FOR_QUALIFIERS.
4962
5436fa2e
MP
49632014-05-01 Marek Polacek <polacek@redhat.com>
4964
4965 PR c/56989
4966 * c-typeck.c (default_conversion): Use better location for
4967 error call.
4968
f8ed5150
MP
49692014-04-30 Marek Polacek <polacek@redhat.com>
4970
4971 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
4972 also when SANITIZE_FLOAT_DIVIDE is on.
4973
8337d1db
MP
49742014-04-30 Marek Polacek <polacek@redhat.com>
4975
4976 PR c/60139
4977 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
4978 and pedwarn_init. Use loc insted of input_location.
4979
c4bdc42f
MP
49802014-04-30 Marek Polacek <polacek@redhat.com>
4981
4982 PR c/60351
4983 * c-typeck.c (build_binary_op): Use location when warning about
4984 shift count.
4985
45484dcf
MP
49862014-04-25 Marek Polacek <polacek@redhat.com>
4987
4988 PR c/18079
4989 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
4990 always_inline/noinline and hot/cold attributes.
4991
34cf811f
MP
49922014-04-25 Marek Polacek <polacek@redhat.com>
4993
4994 PR c/60114
4995 * c-parser.c (c_parser_initelt): Pass input_location to
4996 process_init_element.
4997 (c_parser_initval): Pass loc to process_init_element.
4998 * c-tree.h (process_init_element): Adjust declaration.
4999 * c-typeck.c (push_init_level): Pass input_location to
5000 process_init_element.
5001 (pop_init_level): Likewise.
5002 (set_designator): Likewise.
5003 (output_init_element): Add location_t parameter. Pass loc to
5004 digest_init.
5005 (output_pending_init_elements): Pass input_location to
5006 output_init_element.
5007 (process_init_element): Add location_t parameter. Pass loc to
5008 output_init_element.
5009
42056eac
JJ
50102014-04-24 Jakub Jelinek <jakub@redhat.com>
5011
5012 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
5013 atomic-clause, allow comma in between atomic-clause and
5014 seq_cst.
5015
e162a134
JJ
50162014-04-22 Jakub Jelinek <jakub@redhat.com>
5017
5018 PR c/59073
5019 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
5020 fails, don't set OM_PARALLEL_COMBINED and return NULL.
5021
2f6babac
IZ
50222014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
5023
5024 PR middle-end/60469
5025 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5026 create_tmp_var instead build_decl for creating temps.
5027 (build_array_notation_expr): Likewise.
5028 (fix_conditional_array_notations_1): Likewise.
5029 (fix_array_notation_expr): Likewise.
5030 (fix_array_notation_call_expr): Likewise.
5031
8edbfaa6
JJ
50322014-03-28 Jakub Jelinek <jakub@redhat.com>
5033
5034 PR c++/60689
5035 * c-tree.h (c_build_function_call_vec): New prototype.
5036 * c-typeck.c (build_function_call_vec): Don't call
5037 resolve_overloaded_builtin here.
5038 (c_build_function_call_vec): New wrapper function around
5039 build_function_call_vec. Call resolve_overloaded_builtin here.
5040 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
5041 Call c_build_function_call_vec instead of build_function_call_vec.
5042 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
5043 * c-decl.c (finish_decl): Likewise.
5044
7485aeea
MLI
50452014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5046
5047 PR c/55383
5048 * c-typeck.c: Use correct format string in cast-qual warning
5049
b17a8b07
TS
50502014-03-07 Thomas Schwinge <thomas@codesourcery.com>
5051
5052 * c-decl.c (c_decl_attributes): Use
5053 lang_hooks.types.omp_mappable_type.
5054 * c-typeck.c (c_finish_omp_clauses): Likewise.
5055
3af9c5e9
MP
50562014-03-06 Marek Polacek <polacek@redhat.com>
5057
5058 PR c/60197
5059 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
5060 of checking tree code.
5061
1c9f5f33
PK
50622014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5063
5064 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
5065 (c_parser_parameter_declaration): Likewise.
5066
cc28fc7f
MP
50672014-02-19 Marek Polacek <polacek@redhat.com>
5068
5069 PR c/60195
5070 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
5071 Call mark_exp_read on exp.value.
5072 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
5073 TREE_ADDRESSABLE on old instead of val.
5074 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
5075
b581c05c
PK
50762014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5077
5078 * c-parser.c (c_parser_get_builtin_args): Replace calls to
5079 C_EXPR_APPEND by vec_safe_push.
5080 * c-tree.h (C_EXPR_APPEND): Remove.
5081
81e5eca8
MP
50822014-01-31 Marek Polacek <polacek@redhat.com>
5083
5084 PR c/59963
5085 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
5086 build_function_call_vec.
5087 (build_function_call): Likewise.
5088 (build_atomic_assign): Likewise.
5089 (build_function_call_vec): Add arg_loc parameter. Use it.
5090 (convert_arguments): Likewise.
5091 (convert_for_assignment): Rename rhs_loc to expr_loc.
5092 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
5093 (c_parser_objc_keywordexpr): Likewise.
5094 (c_parser_postfix_expression_after_primary): Call
5095 build_function_call_vec with expr_loc rather than op_loc.
5096 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
5097 build_function_call_vec.
5098 (c_parser_expr_list): Add locations parameter. Fill it with locations
5099 of function arguments.
5100 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
5101
68fca595
MP
51022014-01-30 Marek Polacek <polacek@redhat.com>
5103
5104 PR c/59940
5105 * c-typeck.c (build_function_call_vec): Use loc parameter.
5106 (convert_arguments): Add location parameter. Use it.
5107 (ep_convert_and_check): Likewise.
5108 (build_atomic_assign): Adjust convert_for_assignment call.
5109 (build_modify_expr): Likewise.
5110 (digest_init): Likewise.
5111 (c_finish_return): Likewise.
5112 (build_conditional_expr): Adjust ep_convert_and_check calls.
5113 (convert_for_assignment): Add rhs_loc parameter. Use it.
5114 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
5115 calls.
5116
fa337f3a
RB
51172014-01-30 Richard Biener <rguenther@suse.de>
5118
5119 PR c/59905
5120 * c-typeck.c (build_function_call_vec): Do not replace calls
5121 to a function via an incompatible type with a runtime abort.
5122
b72271b9
BI
51232014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
5124
5125 * c-parser.c (c_parser_declaration_or_fndef): Replaced
5126 flag_enable_cilkplus with flag_cilkplus.
5127 (c_parser_direct_declarator_inner): Likewise.
5128 (c_parser_attribute_any_word): Likewise.
5129 (c_parser_attributes): Likewise.
5130 (c_parser_compound_statement): Likewise.
5131 (c_parser_statement_after_labels): Likewise.
5132 (c_parser_if_statement): Likewise.
5133 (c_parser_switch_statement): Likewise.
5134 (c_parser_do_statement): Likewise.
5135 (c_parser_for_statement): Likewise.
5136 (c_parser_unary_expression): Likewise.
5137 (c_parser_postfix_expression): Likewise.
5138 (c_parser_postfix_expression_after_primary): Likewise.
5139 (c_parser_postfix_expression_after_primary): Likewise.
5140 (c_parser_omp_clause_name): Likewise.
5141 (c_finish_omp_declare_simd): Likewise.
5142 (c_parser_cilk_verify_simd): Likewise.
5143 * c-typeck.c (build_array_ref): Likewise.
5144 (build_function_call_vec): Likewise.
5145 (convert_arguments): Likewise.
5146 (build_compound_expr): Likewise.
5147 (c_finish_return): Likewise.
5148 (c_finish_if_stmt): Likewise.
5149 (c_finish_loop): Likewise.
5150 (build_binary_op): Likewise.
5151
393e8e8b
MP
51522014-01-23 Marek Polacek <polacek@redhat.com>
5153
5154 PR c/59846
5155 * c-typeck.c (parser_build_binary_op): Use location instead of
5156 input_location.
5157 (build_binary_op): Pass location to shorten_compare.
5158
f04dda30
MP
51592014-01-23 Marek Polacek <polacek@redhat.com>
5160
5161 PR c/58346
5162 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
5163 an empty aggregate.
5164
789eadcd
MP
51652014-01-23 Marek Polacek <polacek@redhat.com>
5166
5167 PR c/59871
5168 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
5169 of a comma expression.
5170 (emit_side_effect_warnings): Likewise.
5171
40f14e9f
BI
51722014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5173
5174 PR c/59825
5175 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
5176 function to use walk_tree and moved a lot of its functionality to
5177 expand_array_notations.
5178 (expand_array_notations): New function.
5179
74558dd9
BI
51802014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5181
5182 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
5183 attribute an attribute without value.
5184
652fea39
JJ
51852014-01-23 Jakub Jelinek <jakub@redhat.com>
5186
5187 PR middle-end/58809
5188 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
5189 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
5190
f34f1c87
MP
51912014-01-22 Marek Polacek <polacek@redhat.com>
5192
5193 PR c/59891
5194 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
5195 of remove_c_maybe_const_expr on op1 and op2.
5196
241f845a
JJ
51972014-01-15 Jakub Jelinek <jakub@redhat.com>
5198
5199 PR c/58943
5200 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
5201 effects, preevaluate rhs using SAVE_EXPR first.
5202
9a74f20c
BI
52032014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
5204
5205 PR c++/59631
5206 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
5207 statements with if-elseif statements.
5208
96066ce1
MP
52092014-01-06 Marek Polacek <polacek@redhat.com>
5210
5211 PR c/57773
5212 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
5213 defined bit-field types only in ISO C.
5214
23a5b65a
RS
52152014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5216
5217 Update copyright years
5218
f9030485
RS
52192014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5220
5221 * c-array-notation.c: Use the standard form for the copyright notice.
5222
41958c28
BI
52232013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
5224
5225 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
5226 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
5227 field in parser is not empty. If not-empty, call the function
5228 c_parser_finish_omp_declare_simd.
5229 (c_parser_cilk_clause_vectorlength): Modified function to be shared
5230 between SIMD-enabled functions and #pragma simd. Added new parameter.
5231 (c_parser_cilk_all_clauses): Modified the usage of the function
5232 c_parser_cilk_clause_vectorlength as mentioned above.
5233 (c_parser_cilk_simd_fn_vector_attrs): New function.
5234 (c_finish_cilk_simd_fn_tokens): Likewise.
5235 (is_cilkplus_vector_p): Likewise.
5236 (c_parser_omp_clause_name): Added checking for "vectorlength,"
5237 "nomask," and "mask" strings in clause name.
5238 (c_parser_omp_all_clauses): Added 3 new case statements:
5239 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
5240 PRAGMA_CILK_CLAUSE_NOMASK.
5241 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
5242 check for vector attribute and if so call the function
5243 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
5244 called the function c_finish_cilk_simd_fn_tokens.
5245 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
5246 parser field is non-empty. If so, parse them as you would parse
5247 the omp declare simd pragma.
5248 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
5249 Added a check when step is a parameter and flag it as error.
5250 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
5251 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
5252 pragma_omp_clause.
5253
cef0fd0e
TS
52542013-12-17 Thomas Schwinge <thomas@codesourcery.com>
5255
5256 * c-parser.c (c_parser_omp_parallel): Fix description.
5257
12893402
BI
52582013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
5259
5260 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
5261 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5262 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
5263 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
5264
296674db
JM
52652013-12-04 Joseph Myers <joseph@codesourcery.com>
5266
5267 PR c/52023
5268 * c-parser.c (c_parser_alignas_specifier): Use
5269 c_sizeof_or_alignof_type instead of c_alignof.
5270 (c_parser_alignof_expression): Likewise, with min_alignof
5271 parameter depending on alignof spelling used.
5272
edd28054
MP
52732013-12-04 Marek Polacek <polacek@redhat.com>
5274
5275 PR c/54113
5276 * c-decl.c (start_function): Don't warn for missing prototype for
5277 inline functions.
5278
da0fc454
MP
52792013-12-03 Marek Polacek <polacek@redhat.com>
5280
5281 PR c/59351
5282 * c-decl.c (build_compound_literal): Allow compound literals with
5283 empty initial value.
5284
4c2ecab0
JM
52852013-12-02 Joseph Myers <joseph@codesourcery.com>
5286
5287 PR c/58235
5288 * c-typeck.c (build_modify_expr): Diagnose assignment to
5289 expression with array type.
5290
340baef7
JM
52912013-11-29 Joseph Myers <joseph@codesourcery.com>
5292
5293 PR c/42262
5294 * c-typeck.c (process_init_element): Do not treat a string as
5295 initializing a whole array when used with a designator for an
5296 individual element.
5297
6763b9f7
JM
52982013-11-29 Joseph Myers <joseph@codesourcery.com>
5299
5300 PR c/57574
5301 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
5302 an inline function following a static declaration.
5303
e7bd1de1
JJ
53042013-11-28 Jakub Jelinek <jakub@redhat.com>
5305
5306 PR c/59310
5307 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
5308 to p_name before calling c_parser_omp_teams instead of after.
5309 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
5310 argument. Remove unused p_name variable.
5311
0136f8f0
AH
53122013-11-27 Aldy Hernandez <aldyh@redhat.com>
5313 Jakub Jelinek <jakub@redhat.com>
5314
5315 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
5316 external_scope is NULL.
5317
241b71bb
TV
53182013-11-27 Tom de Vries <tom@codesourcery.com>
5319 Marc Glisse <marc.glisse@inria.fr>
5320
5321 PR c++/59032
5322 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
5323
2fb9a547
AM
53242013-11-22 Andrew MacLeod <amacleod@redhat.com>
5325
5326 * c-typeck.c: Add required include files from gimple.h.
5327
8400e75e
DM
53282013-11-22 David Malcolm <dmalcolm@redhat.com>
5329
5330 * c-decl.c (define_label, shadow_tag_warned)
5331 (check_bitfield_type_and_width, grokdeclarator, grokparms,
5332 store_parm_decls_newstyle, store_parm_decls_oldstyle)
5333 (declspecs_add_type): Remove use of in_system_header macro.
5334 * c-parser.c (c_parser_unary_expression): Likewise.
5335 * c-typeck.c (store_init_value, process_init_element)
5336 (c_start_case): Likewise.
5337
5338 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
5339 macro.
5340
5341 * c-parser.c (c_parser_set_source_position_from_token): Remove
5342 reference to in_system_header from comment.
5343
386b1f1f
RS
53442013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5345
5346 * c-decl.c (grokdeclarator): Update comment to refer to
5347 tree_to_[su]hwi rather than tree_low_cst.
5348
ae7e9ddd
RS
53492013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5350
5351 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
5352 tree_to_uhwi throughout.
5353
9439e9a1
RS
53542013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5355
5356 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
5357 throughout.
5358
9541ffee
RS
53592013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5360
5361 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
5362 throughout.
5363
c02065fc
AH
53642013-11-15 Aldy Hernandez <aldyh@redhat.com>
5365
5366 * c-parser.c (c_parser_cilk_simd): New.
5367 (c_parser_cilk_verify_simd): New.
5368 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
5369 (c_parser_omp_for_loop): Add case for NE_EXPR.
5370 Set c_break_label for CILK_SIMD.
5371 (c_parser_cilk_clause_vectorlength): New.
5372 (c_parser_cilk_clause_linear): New.
5373 (c_parser_cilk_clause_name): New.
5374 (c_parser_cilk_all_clauses): New.
5375 * c-typeck.c (build_unary_op): Pass location argument to
5376 readonly_error.
5377 (build_modify_expr): Same.
5378 (build_asm_expr): Same.
5379 (c_finish_bc_stmt): Error on break/continue in loops.
5380
18f429e2
AM
53812013-11-14 Andrew MacLeod <amacleod@redhat.com>
5382
5383 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
5384
d8a2d370
DN
53852013-11-14 Diego Novillo <dnovillo@google.com>
5386
5387 * c-decl.c: Include print-tree.h.
5388 Include stor-layout.h.
5389 Include varasm.h.
5390 Include attribs.h.
5391 Include stringpool.h.
5392 * c-lang.c: Include fold-const.h.
5393 * c-parser.c: Include stringpool.h.
5394 Include attribs.h.
5395 Include stor-layout.h.
5396 Include varasm.h.
5397 Include trans-mem.h.
5398 * c-typeck.c: Include stor-layout.h.
5399 Include trans-mem.h.
5400 Include varasm.h.
5401 Include stmt.h.
5402
38b7bc7f
JM
54032013-11-13 Joseph Myers <joseph@codesourcery.com>
5404
5405 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
5406 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
5407 __auto_type.
5408 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
5409 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
5410 RID_AUTO_TYPE.
5411 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
5412 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
5413 (c_parser_declarator, c_parser_direct_declarator_inner)
5414 (c_parser_parameter_declaration, c_parser_type_name): All callers
5415 changed.
5416 (c_parser_declaration_or_fndef): Handle declarations with type
5417 determined from the initializer.
5418
45b0be94
AM
54192013-11-12 Andrew MacLeod <amacleod@redhat.com>
5420
18f429e2 5421 * c-typeck.c: Include gimplify.h.
45b0be94 5422
582d9b50
JM
54232013-11-12 Joseph Myers <joseph@codesourcery.com>
5424
5425 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
5426 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
5427 comment.
5428 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
5429 or _Thread_local as appropriate in diagnostics.
5430 (build_null_declspecs): Initialize ret->thread_gnu_p.
5431 (declspecs_add_scspec): Handle either __thread or _Thread_local
5432 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
5433 pedantic. Do not disallow _Thread_local extern and _Thread_local
5434 static.
5435
267bac10
JM
54362013-11-07 Joseph Myers <joseph@codesourcery.com>
5437 Andrew MacLeod <amacleod@redhat.com>
5438
5439 * c-aux-info.c (gen_type): Handle atomic qualifier.
5440 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
5441 qualifiers when compating types.
5442 (shadow_tag_warned): Handle atomic_p in declspecs.
5443 (quals_from_declspecs): Likewise.
5444 (start_decl): Use c_type_promotes_to when promoting argument
5445 types.
5446 (grokdeclarator): Handle _Atomic.
5447 (get_parm_info): Diagnose any qualifier on "void" as only
5448 parameter.
5449 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
5450 comparing types. Use c_type_promotes_to when promoting argument
5451 types.
5452 (finish_function): Use c_type_promotes_to when promoting argument
5453 types.
5454 (build_null_declspecs): Handle atomic_p in declspecs.
5455 (declspecs_add_qual): Handle RID_ATOMIC.
5456 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
5457 (c_token_starts_declspecs): Handle RID_ATOMIC.
5458 (c_parser_declspecs): Handle atomic type specifiers and
5459 qualifiers.
5460 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
5461 from types of expressions with atomic type.
5462 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
5463 (c_parser_attribute_any_word): Handle RID_ATOMIC.
5464 (c_parser_initializer, c_parser_initelt, c_parser_initval)
5465 (c_parser_statement_after_labels, c_parser_switch_statement)
5466 (c_parser_for_statement, c_parser_expr_no_commas)
5467 (c_parser_conditional_expression, c_parser_binary_expression)
5468 (c_parser_cast_expression, c_parser_unary_expression)
5469 (c_parser_postfix_expression)
5470 (c_parser_postfix_expression_after_primary, c_parser_expression):
5471 Use convert_lvalue_to_rvalue.
5472 (c_parser_expression_conv, c_parser_expr_list): Document
5473 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
5474 (c_parser_objc_synchronized_statement): Use
5475 convert_lvalue_to_rvalue.
5476 (c_parser_objc_selector): Handle RID_ATOMIC.
5477 (c_parser_objc_receiver, c_parser_array_notation): Use
5478 convert_lvalue_to_rvalue.
5479 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
5480 _Atomic (type-name).
5481 (struct c_declspecs): Add atomic_p field.
5482 (convert_lvalue_to_rvalue): Declare.
5483 * c-typeck.c (c_type_promotes_to): Promote atomic types to
5484 corresponding atomic types.
5485 (qualify_type): Don't add _Atomic qualifiers from second argument.
5486 (comp_target_types): Do not allow _Atomic mismatches.
5487 (type_lists_compatible_p): Do not remove atomic qualifiers when
5488 comparing types.
5489 (really_atomic_lvalue, convert_lvalue_to_rvalue)
5490 (build_atomic_assign): New functions.
5491 (build_unary_op): Use build_atomic_assign for atomic increment and
5492 decrement.
5493 (build_conditional_expr): Do not treat _Atomic void as a qualified
5494 version of void.
5495 (build_modify_expr): Use build_atomic_assign for atomic LHS.
5496 (find_anonymous_field_with_type, convert_to_anonymous_field)
5497 (convert_for_assignment): Do not remove atomic qualifiers when
5498 comparing types.
5499 (digest_init): Do not accept initialization of arrays of atomic
5500 elements by string constants.
5501 (build_asm_expr): Use convert_lvalue_to_rvalue.
5502 (build_binary_op): Do not treat _Atomic void as a qualified
5503 version of void.
5504
0c249d4b
DD
55052013-11-06 DJ Delorie <dj@redhat.com>
5506
5507 * c-decl.c (locate_old_decl): If a previous conflicting decl is
5508 both explicit and builtin, print the location of the explicit one.
5509
6d7f7e0a
TB
55102013-11-05 Tobias Burnus <burnus@net-b.de>
5511
5512 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
5513 c_parser_omp_distribute, c_parser_omp_teams,
5514 c_parser_omp_target, c_parser_omp_declare): Handle
5515 -fopenmp-simd.
5516
b906f4ca
MP
55172013-11-03 Marek Polacek <polacek@redhat.com>
5518
5519 * c-decl.c (grokdeclarator): Add VLA instrumentation.
5520
ee1d5a02
JJ
55212013-11-01 Jakub Jelinek <jakub@redhat.com>
5522
5523 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
5524 check_dup_generic at the end, unless remove is true.
5525 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
5526 remove = true;.
5527 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
5528
5a9785fb
JJ
55292013-10-31 Jakub Jelinek <jakub@redhat.com>
5530
5531 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
5532 with decl that is not pointer nor array.
5533
939b37da
BI
55342013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
5535
5536 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
5537 a spawning function is found.
5538 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
5539 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
5540 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5541 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
5542 case.
5543 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
5544 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
5545 expr.
5546 (c_finish_return): Added a check to reject _Cilk_spawn in return
5547 expression.
5548 (build_cilk_spawn): New function.
5549 (build_cilk_sync): Likewise.
5550 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
5551
d4af74d4
TB
55522013-10-27 Tobias Burnus <burnus@net-b.de>
5553
5554 PR other/33426
5555 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
5556 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
5557 (c_parser_statement_after_labels): Update calls.
5558
d73749df 55592013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
5560
5561 PR other/33426
5562 * c-parser.c (c_parser_pragma, c_parser_for_statement):
5563 Handle PRAGMA_IVDEP.
5564 (c_parser_statement_after_labels): Update call.
5565
f28aa681
MP
55662013-10-24 Marek Polacek <polacek@redhat.com>
5567
5568 * c-parser.c (c_parser_struct_declaration): Add a comment.
5569 (c_parser_declarator): Don't allow _Alignas here.
5570
0645c1a2
AM
55712013-10-17 Andrew MacLeod <amacleod@redhat.com>
5572
5573 * c-parser.c: Include omp-low.h.
5574 * c-typeck.c: Likewise.
5575
568a31f2
MP
55762013-10-17 Marek Polacek <polacek@redhat.com>
5577
5578 PR c/58267
5579 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
5580 Document syntax of the array-declarator.
5581 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
5582 are not permitted.
5583 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
5584 (c_parser_struct_declaration): Likewise.
5585 (c_parser_declarator): Likewise.
5586 (c_parser_direct_declarator_inner): Likewise.
5587 (c_parser_parameter_declaration): Likewise.
5588 (c_parser_type_name): Likewise.
5589
acf0174b
JJ
55902013-10-11 Jakub Jelinek <jakub@redhat.com>
5591
5592 * c-lang.h (current_omp_declare_target_attribute): New extern
5593 decl.
5594 * c-parser.c: Include c-lang.h.
5595 (struct c_parser): Change tokens to c_token *.
5596 Add tokens_buf field. Change tokens_avail type to unsigned int.
5597 (c_parser_consume_token): If parser->tokens isn't
5598 &parser->tokens_buf[0], increment parser->tokens.
5599 (c_parser_consume_pragma): Likewise.
5600 (enum pragma_context): Add pragma_struct and pragma_param.
5601 (c_parser_external_declaration): Adjust
5602 c_parser_declaration_or_fndef caller.
5603 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
5604 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
5605 Adjust recursive call.
5606 (c_parser_struct_or_union_specifier): Use pragma_struct instead
5607 of pragma_external.
5608 (c_parser_parameter_declaration): Use pragma_param instead of
5609 pragma_external.
5610 (c_parser_compound_statement_nostart, c_parser_label,
5611 c_parser_for_statement): Adjust
5612 c_parser_declaration_or_fndef callers.
5613 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
5614 it through to c_parser_conditional_expression.
5615 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
5616 pass it through to c_parser_binary_expression. Adjust recursive
5617 call.
5618 (c_parser_binary_expression): Remove prec argument, add
5619 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
5620 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
5621 binop matches it, use build2 instead of parser_build_binary_op.
5622 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
5623 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
5624 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
5625 Handle pragma_struct and pragma_param the same as pragma_external.
5626 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5627 (c_parser_omp_variable_list): Parse array sections for
5628 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5629 (c_parser_omp_clause_collapse): Fully fold collapse expression.
5630 (c_parser_omp_clause_reduction): Handle user defined reductions.
5631 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5632 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5633 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5634 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5635 c_parser_omp_clause_depend, c_parser_omp_clause_map,
5636 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5637 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5638 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5639 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
5640 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
5641 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5642 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
5643 (c_parser_omp_for_loop): Add CODE argument, pass it through
5644 to c_finish_omp_for. Change last argument to cclauses,
5645 and adjust uses to grab parallel clauses from the array of all
5646 the split clauses. Adjust c_parser_binary_expression,
5647 c_parser_declaration_or_fndef and c_finish_omp_for callers.
5648 (omp_split_clauses): New function.
5649 (c_parser_omp_simd): New function.
5650 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5651 Allow the function to be called also when parsing combined constructs,
5652 and call c_parser_omp_simd when parsing for simd.
5653 (c_parser_omp_sections_scope): If section-sequence doesn't start with
5654 #pragma omp section, require exactly one structured-block instead of
5655 sequence of statements.
5656 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5657 Allow the function to be called also when parsing combined constructs.
5658 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
5659 Allow the function to be called also when parsing combined
5660 constructs.
5661 (c_parser_omp_taskgroup, c_parser_omp_cancel,
5662 c_parser_omp_cancellation_point, c_parser_omp_distribute,
5663 c_parser_omp_teams, c_parser_omp_target_data,
5664 c_parser_omp_target_update, c_parser_omp_target,
5665 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
5666 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
5667 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
5668 (c_parser_omp_construct): Add p_name and mask vars. Handle
5669 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
5670 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
5671 and c_parser_omp_sections callers.
5672 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
5673 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5674 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5675 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
5676 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
5677 OMP_CLAUSE_DEPEND.
5678 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5679 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5680 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5681 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5682 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5683 * c-typeck.c: Include tree-inline.h.
5684 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5685 handle_omp_array_sections_1, handle_omp_array_sections,
5686 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5687 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5688 user defined reductions.
5689 (c_tree_equal): New function.
5690 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5691 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5692 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5693 c_check_omp_declare_reduction_r): New prototypes.
5694 * c-decl.c (current_omp_declare_target_attribute): New variable.
5695 (c_decl_attributes): New function.
5696 (start_decl, start_function): Use it instead of decl_attributes.
5697 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5698 c_omp_reduction_decl, c_omp_reduction_lookup,
5699 c_check_omp_declare_reduction_r): New functions.
5700
0a6c2227
TT
57012013-09-25 Tom Tromey <tromey@redhat.com>
5702
5703 * Make-lang.in (c/gccspec.o): Remove.
5704 (CFLAGS-c/gccspec.o): New variable.
5705 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
5706 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
5707 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5708
f3bc55f0
TT
57092013-09-25 Tom Tromey <tromey@redhat.com>
5710
5711 * Make-lang.in (c/gccspec.o): Don't use subshell.
5712
a24d975c
MP
57132013-09-18 Marek Polacek <polacek@redhat.com>
5714
5715 PR sanitize/58443
5716 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5717 Remove unnecessary check.
5718
ce6923c5
MP
57192013-09-18 Marek Polacek <polacek@redhat.com>
5720
5721 PR sanitizer/58411
5722 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
5723 no_sanitize_undefined attribute.
5724
a1e51df9
KT
57252013-09-13 Kai Tietz <ktietz@redhat.com>
5726
5727 PR target/57848
5728 * c-decl.c (c_builtin_function_ext_scope): Remove
5729 wrong assumption that it is never called on prexisting
5730 symbol.
5731
0af94e6f
JR
57322013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
5733
5734 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
5735
20059c8b
GDR
57362013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5737
5738 * c-objc-common.c (c_tree_printer): Tidy.
5739
de5a5fa1
MP
57402013-08-30 Marek Polacek <polacek@redhat.com>
5741
5742 * c-typeck.c (build_binary_op): Add division by zero and shift
5743 instrumentation.
5744
2531a1d9 57452013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 5746 Joseph Myers <joseph@codesourcery.com>
2531a1d9 5747
6e2bcc98 5748 PR c/35649
2531a1d9
JR
5749 * c-typeck.c (c_common_type): Prefer double_type_node over
5750 other REAL_TYPE types with the same precision.
5751 (convert_arguments): Likewise.
5752
025311c4
GDR
57532013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5754
5755 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
5756 (c_initialize_diagnostics): Call a destructor for the early printer.
5757
da6ca2b5
GDR
57582013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5759
5760 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5761 printer initialization.
5762
318cda85 57632013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 5764
318cda85
BI
5765 PR c/57490
5766 * c-array-notation.c (fix_conditional_array_notations_1): Added a
5767 check for truth values.
5768 (expand_array_notation_exprs): Added truth values case. Removed an
5769 unwanted else. Added for-loop to walk through subtrees in default
5770 case.
5771
b066401f
GDR
57722013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5773
5774 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5775
fb48aadc
JM
57762013-07-23 Joseph Myers <joseph@codesourcery.com>
5777
5778 * c-parser.c (struct c_generic_association): Fix typo.
5779
433cc7b0
TT
57802013-07-23 Tom Tromey <tromey@redhat.com>
5781 Joseph Myers <joseph@codesourcery.com>
5782
5783 * c-parser.c (struct c_generic_association): New.
5784 (c_generic_association_d): New typedef.
5785 (c_parser_generic_selection): New function.
5786 (c_parser_postfix_expression): Handle RID_GENERIC.
5787
26d40c3d
JM
57882013-07-13 Jason Merrill <jason@redhat.com>
5789
5790 PR c++/57793
5791 * c-decl.c (finish_struct): Check for too-large class.
5792
ecdbd01a 57932013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
5794
5795 PR c/57821
5796 * c-typeck.c (set_init_index): When folding, check for index overflow.
5797
1141ed3f
BI
57982013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5799
5800 * c-parser.c (c_parser_array_notation): Removed rejection of array
5801 notations in an array of function pointers.
5802
713b46fa
BI
58032013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5804
5805 * c-array-notation.c (make_triplet_val_inv): New function.
5806 (create_cmp_incr): Likewise.
5807 (create_array_refs): Likewise.
5808 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5809 Also modularized common parts between functions and called the function.
5810 (build_array_notation_expr): Likewise.
5811 (fix_conditional_array_notations_1): Likewise.
5812 (fix_array_notation_expr): Likewise.
5813 (fix_array_notation_call_expr): Likewise.
5814
92f20202
MP
58152013-06-18 Marek Polacek <polacek@redhat.com>
5816
5817 PR c/57630
5818 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5819
73a23b06
BI
58202013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
5821
5822 * c-array-notation.c (build_array_notation_expr): Reject array notation
5823 mismatch between LHS and RHS even inside a call_expr. Also, removed
5824 a couple while statements that were dead code.
5825
00b8517d
BI
58262013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
5827
5828 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5829 excessive precision expressions in function parameters. Also removed
5830 couple unwanted while statements.
5831
1509bdda
BI
58322013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5833
5834 * c-array-notation.c (expand_array_notation_exprs): Added
5835 ARRAY_NOTATION_REF case.
5836
d60f1706
BI
58372013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5838
5839 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5840 function to c-family/array-notation-common.c.
5841 (is_cilkplus_reduce_builtin): Likewise.
5842 (find_rank): Likewise.
5843 (extract_array_notation_exprs): Likewise.
5844 (replace_array_notations): Likewise.
5845 (find_inv_trees): Likewise.
5846 (replace_inv_trees): Likewise.
5847 (contains_array_notation_expr): Likewise.
5848 (find_correct_array_notation_type): Likewise.
5849 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5850 (struct inv_list): Moved this to c-family/array-notation-common.c.
5851 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5852
6d6efbb3
BI
58532013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
5854
5855 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5856 reduction functions outside the for-loop. Added a check if the fundecl
5857 is non-NULL. Finally, removed an unwanted if-statement, and made the
5858 body unconditional.
5859
25c22937
BI
58602013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5861
5862 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5863 condition of the if-statement matches the rank of else-block and then-
5864 block when array notations are used.
5865 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5866 expression after the entire function body is parsed.
5867 (c_parser_expr_no_commas): Delayed creating array notation expressions
5868 to the end of function parsing.
5869 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5870 whole if-statement instead of just the condition.
5871 (expand_array_notation_exprs): Added MODIFY_EXPR case.
5872
edd25645
BI
58732013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5874
5875 PR c/57474
5876 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5877 array to NULL_TREE if they are unused. Also added a check for the
5878 field to be NULL before its fields are used in future.
5879
065ce7f1
RO
58802013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5881
5882 PR bootstrap/57450
5883 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5884 (build_array_notation_expr): Likewise.
5885
36536d79
BI
58862013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5887
5888 * c-typeck.c (build_array_ref): Added a check to see if array's
5889 index is greater than one. If true, then emit an error.
5890 (build_function_call_vec): Exclude error reporting and checking
5891 for builtin array-notation functions.
5892 (convert_arguments): Likewise.
5893 (c_finish_return): Added a check for array notations as a return
5894 expression. If true, then emit an error.
5895 (c_finish_loop): Added a check for array notations in a loop
5896 condition. If true then emit an error.
5897 (lvalue_p): Added a ARRAY_NOTATION_REF case.
5898 (build_binary_op): Added a check for array notation expr inside
5899 op1 and op0. If present, we call another function to find correct
5900 type.
5901 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
5902 * c-parser.c (c_parser_compound_statement): Check if array
5903 notation code is used in tree, if so, then transform them into
5904 appropriate C code.
5905 (c_parser_expr_no_commas): Check if array notation is used in LHS
5906 or RHS, if so, then build array notation expression instead of
5907 regular modify.
5908 (c_parser_postfix_expression_after_primary): Added a check for
5909 colon(s) after square braces, if so then handle it like an array
5910 notation. Also, break up array notations in unary op if found.
5911 (c_parser_direct_declarator_inner): Added a check for array
5912 notation.
5913 (c_parser_compound_statement): Added a check for array notation in
5914 a stmt. If one is present, then expand array notation expr.
5915 (c_parser_if_statement): Likewise.
5916 (c_parser_switch_statement): Added a check for array notations in
5917 a switch statement's condition. If true, then output an error.
5918 (c_parser_while_statement): Similarly, but for a while.
5919 (c_parser_do_statement): Similarly, but for a do-while.
5920 (c_parser_for_statement): Similarly, but for a for-loop.
5921 (c_parser_unary_expression): Check if array notation is used in a
5922 pre-increment or pre-decrement expression. If true, then expand
5923 them.
5924 (c_parser_array_notation): New function.
5925 * c-array-notation.c: New file.
5926 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5927
cd192ccc
MS
59282013-05-23 Mike Stump <mikestump@comcast.net>
5929
5930 * c-typeck.c (convert_for_assignment): Handle references to memory
5931 spaces better.
5932
427b248d
JM
59332013-05-16 Jason Merrill <jason@redhat.com>
5934
5935 * Make-lang.in (cc1$(exeext)): Use link mutex.
5936
44d90fe1
PC
59372013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5938
5939 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5940 to simply use OPT_Wpointer_arith.
5941 (build_unary_op): Likewise.
5942
4e7d7b3d
JJ
59432013-04-03 Jakub Jelinek <jakub@redhat.com>
5944
5945 PR c/19449
5946 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
5947 argument. If set, or it temporarily for parsing of the first
5948 argument into force_folding_builtin_constant_p.
5949 (c_parser_postfix_expression): Adjust callers.
5950
839b422f
RB
59512013-03-21 Richard Biener <rguenther@suse.de>
5952
5953 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
5954 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
5955
2ee028f1
MP
59562013-02-12 Marek Polacek <polacek@redhat.com>
5957
5958 PR c/44938
5959 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
5960 origtypes to NULL.
5961
8824edff
JJ
59622013-01-24 Jakub Jelinek <jakub@redhat.com>
5963
5964 PR c/56078
5965 * c-typeck.c (set_nonincremental_init_from_string): If
5966 constructor_max_index is NULL, treat it as if tree_int_cst_lt
5967 returned false.
5968 (process_init_element): Likewise.
5969
eadd3d0d
JJ
59702012-12-20 Jakub Jelinek <jakub@redhat.com>
5971
5972 PR c++/55619
5973 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
5974 argument, don't call default_function_array_conversion
5975 nor c_fully_fold here.
5976 (c_parser_asm_statement): Adjust callers.
5977 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
5978 and outputs here, and call default_function_array_conversion
5979 on inputs that don't need to be addressable.
5980
f8a93a2e
JJ
59812012-12-18 Jakub Jelinek <jakub@redhat.com>
5982
5983 PR c/39464
5984 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
5985 warning require that both c_common_unsigned_type as well as
5986 c_common_signed_type is the same for both mvl and mvr types.
5987
9771b263
DN
59882012-11-16 Diego Novillo <dnovillo@google.com>
5989
5990 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
5991
5992 * c-common.c: Use new vec API in vec.h.
5993 * c-common.h: Likewise.
5994 * c-gimplify.c: Likewise.
5995 * c-pragma.c: Likewise.
5996 * c-pretty-print.c: Likewise.
5997 * c-pretty-print.h: Likewise.
5998 * c-semantics.c: Likewise.
5999 * c-decl.c: Likewise.
6000 * c-parser.c: Likewise.
6001 * c-tree.h: Likewise.
6002 * c-typeck.c: Likewise.
6003
880661a4
JW
60042012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
6005
6006 PR c++/54930
6007 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
6008
077d1abe
MLI
60092012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6010
6011 PR c/53066
6012 * c-decl.c (warn_if_shadowing): Do not warn if a variable
6013 shadows a function, unless the variable is a function or a
6014 pointer-to-function.
6015
3a785c97
JJ
60162012-10-12 Jakub Jelinek <jakub@redhat.com>
6017
6018 PR c/54381
6019 * c-parser.c (struct c_tree_loc_pair): Removed.
6020 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
6021 add location_t * and tree * arguments, fill in array of 3
6022 sizeof_arg trees and corresponding locs.
6023 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
6024 c_parser_expr_list callers.
6025 (c_parser_postfix_expression_after_primary): Likewise. Pass
6026 array of 3 sizeof_arg trees and locs (corresponding to first
6027 3 arguments) to sizeof_pointer_memaccess_warning.
6028
703c8606
LC
60292012-10-09 Lawrence Crowl <crowl@google.com>
6030
6031 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
6032 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
6033 hash table.
6034
5d9de0d0
PC
60352012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
6036
6037 PR c++/54194
6038 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
6039 call.
6040
a212e43f
MG
60412012-10-09 Marc Glisse <marc.glisse@inria.fr>
6042
6043 PR c++/54427
6044 * c-typeck.c: Include c-common.h.
6045 (enum stv_conv): Moved to c-common.h.
6046 (scalar_to_vector): Moved to c-common.c.
6047 (build_binary_op): Adapt to scalar_to_vector's new prototype.
6048 * Make-lang.in: c-typeck.c depends on c-common.h.
6049
3b78de56
AC
60502012-10-04 Arnaud Charlet <charlet@adacore.com>
6051
6052 * c-decl.c (c_write_global_declarations): Fix handling of
6053 -fdump-ada-spec*.
6054
78c60e3d
SS
60552012-09-30 Sharad Singhai <singhai@google.com>
6056
6057 * c-decl.c (c_write_global_declarations): Use a different method
6058 to determine if the dump has ben initialized.
6059
9f33203d
JM
60602012-09-14 Joseph Myers <joseph@codesourcery.com>
6061
6062 PR c/54552
6063 * c-typeck.c (c_cast_expr): When casting to a type requiring
6064 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
6065 c_fully_fold first.
6066
a27d595d
JM
60672012-09-14 Joseph Myers <joseph@codesourcery.com>
6068
6069 PR c/54103
6070 * c-typeck.c (build_unary_op): Pass original argument of
6071 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
6072 any C_MAYBE_CONST_EXPR, if it has integer operands.
6073 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
6074 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
6075 to c_objc_common_truthvalue_conversion, then remove any
6076 C_MAYBE_CONST_EXPR, if they have integer operands. Use
6077 c_objc_common_truthvalue_conversion not
6078 c_common_truthvalue_conversion.
6079 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
6080 call note_integer_operands for arguments with integer operands
6081 that are not integer constants.
6082
9feb29df
JJ
60832012-09-13 Jakub Jelinek <jakub@redhat.com>
6084
6085 PR c/54559
6086 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
6087 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
6088
d409320c
JJ
60892012-08-31 Jakub Jelinek <jakub@redhat.com>
6090
6091 PR c/54428
6092 * c-convert.c (convert): Don't call fold_convert_loc if
6093 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
6094 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
6095 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
6096
6265d07c
JJ
60972012-08-24 Jakub Jelinek <jakub@redhat.com>
6098
6099 PR c/54355
6100 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
6101 for nested and empty_ok arguments in the call to
6102 c_parser_declaration_or_fndef.
6103
1a4049e7
JJ
61042012-08-17 Jakub Jelinek <jakub@redhat.com>
6105
6106 * c-tree.h (c_last_sizeof_arg): Declare.
6107 * c-parser.c (struct c_tree_loc_pair): New type.
6108 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
6109 non-NULL.
6110 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
6111 (c_parser_postfix_expression_after_primary): Likewise. Call
6112 sizeof_pointer_memaccess_warning if needed.
6113 (sizeof_ptr_memacc_comptypes): New function.
6114 * c-typeck.c (c_last_sizeof_arg): New global variable.
6115 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
6116
0229aee9
UB
61172012-07-24 Uros Bizjak <ubizjak@gmail.com>
6118
6119 * c-lang.h (lang_decl): Add variable_size GTY option.
6120
7ee2468b
SB
61212012-07-16 Steven Bosscher <steven@gcc.gnu.org>
6122
6123 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
6124 * Make-lang.in: Fix dependencies.
6125
d4a10d0a
SB
61262012-06-29 Steven Bosscher <steven@gcc.gnu.org>
6127
6128 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
6129 and add language Makefile hooks.
6130 * config-lang.in: New file.
6131 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
6132 add the required "normal" config-lang.in rules.
6133 * c-lang.h: Moved from gcc/ to here.
6134 * c-tree.h: Likewise.
6135 * c-objc-common.c: Likewise.
6136 * c-objc-common.h: Likewise.
6137 * c-typeck.c: Likewise.
6138 * c-convert.c: Likewise.
6139 * c-lang.c: Likewise.
6140 * c-aux-info.c: Likewise.
6141 * c-errors.c: Likewise.
6142 * gccspec.c: Likewise.
6143 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
6144 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
6145\f
a5544970 6146Copyright (C) 2012-2019 Free Software Foundation, Inc.
d4a10d0a
SB
6147
6148Copying and distribution of this file, with or without modification,
6149are permitted in any medium without royalty provided the copyright
6150notice and this notice are preserved.