]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
[PR89433] Use 'oacc_verify_routine_clauses' for C/C++ OpenACC 'routine' directives
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
e03436e7
TS
12019-05-17 Thomas Schwinge <thomas@codesourcery.com>
2
5bf04509
TS
3 PR c/89433
4 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
5 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
6
e03436e7
TS
7 PR c/89433
8 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
9 clauses from "omp declare target" attribute.
10
a9c697b8
MS
112019-05-16 Martin Sebor <msebor@redhat.com>
12
13 * c-decl.c (start_decl): Quote keywords, operators, and
14 types in diagnostics.
15 (finish_decl): Same.
16 * c-parser.c (c_parser_asm_statement): Same.
17 (c_parser_conditional_expression): Same.
18 (c_parser_transaction_cancel): Same.
19 * c-typeck.c (c_common_type): Same.
20 (build_conditional_expr): Same.
21 (digest_init): Same.
22 (process_init_element): Same.
23 (build_binary_op): Same.
24
c4499192
RB
252019-05-17 Richard Biener <rguenther@suse.de>
26
27 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
28 (c_parser_gimple_unary_expression): Likewise.
29 (c_parser_gimple_parentized_ternary_expression): New function.
30
adfe6e4b
RB
312019-05-16 Richard Biener <rguenther@suse.de>
32
33 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
34 (c_parser_gimple_unary_expression): Likewise.
35
186dabf2
RB
362019-05-15 Richard Biener <rguenther@suse.de>
37
38 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
39 __BIT_FIELD_REF.
40
1158c5b4
RB
412019-05-14 Richard Biener <rguenther@suse.de>
42
43 * gimple-parser.c (c_parser_gimple_statement): Remove
44 questionable auto-promotion to VIEW_CONVERT_EXPR.
45 (c_parser_gimple_typespec): Split out from __MEM parsing.
46 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
47 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
48 as __VIEW_CONVERT with -gimple.
49
fd4485aa
ML
502019-05-09 Martin Liska <mliska@suse.cz>
51
52 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
53 __MAX.
54 (c_parser_gimple_unary_expression): Parse also binary expression
55 __MIN and __MAX.
56 (c_parser_gimple_parentized_binary_expression): New function.
57
d276406a
ML
582019-05-09 Martin Liska <mliska@suse.cz>
59
60 * gimple-parser.c (struct gimple_parser): Add probability.
61 for gimple_parser_edge.
62 (gimple_parser::push_edge): Add new argument probability.
63 (c_parser_gimple_parse_bb_spec): Parse also probability
64 if present.
65 (c_parser_parse_gimple_body): Set edge probability.
66 (c_parser_gimple_compound_statement): Consume token
67 before calling c_parser_gimple_goto_stmt.
68 Parse BB counts.
69 (c_parser_gimple_statement): Pass new argument.
70 (c_parser_gimple_goto_stmt): Likewise.
71 (c_parser_gimple_if_stmt): Likewise.
72 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
73 * c-parser.c (c_parser_declaration_or_fndef): Pass
74 hot_bb_threshold argument.
75 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
76 field.
77 (c_parser_gimple_parse_bb_spec_edge_probability): New.
78
f179b64e
JJ
792019-04-26 Jakub Jelinek <jakub@redhat.com>
80
81 PR debug/90197
82 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
83 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
84 (c_parser_do_statement): Likewise.
85 (c_parser_for_statement): Likewise. Formatting fixes.
86 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
87 emit DEBUG_BEGIN_STMTs if needed.
88
e7178413
JJ
892019-04-19 Jakub Jelinek <jakub@redhat.com>
90
c280b7ee
JJ
91 PR c/89888
92 * c-typeck.c (struct c_switch): Remove outside_range_p member.
93 (c_start_case): Don't clear it.
94 (do_case): Adjust c_add_case_label caller.
95 (c_finish_case): Adjust c_do_switch_warnings caller.
96
e7178413
JJ
97 PR c++/90108
98 * c-decl.c (merge_decls): If remove is main variant and
99 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
100 variant that has newdecl as TYPE_NAME if any.
101
60a2c645
JJ
1022019-04-12 Jakub Jelinek <jakub@redhat.com>
103
104 PR c/89933
105 * c-decl.c (merge_decls): When newdecl's type is its main variant,
106 don't try to remove it from the variant list, but instead assert
107 it has no variants.
108
2a82beaa
RB
1092019-04-01 Richard Biener <rguenther@suse.de>
110
111 PR c/71598
112 * c-tree.h (c_get_alias_set): Declare.
113 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
114 * c-objc-common.c (c_get_alias_set): Treat enumeral types
115 as the underlying integer type.
116
bec1da64
MS
1172019-03-19 Martin Sebor <msebor@redhat.com>
118
119 PR tree-optimization/89688
120 * c-decl.c (finish_decl): Call braced_lists_to_string for more
121 kinds of initializers.
122
855cd9b1
JJ
1232019-03-19 Jakub Jelinek <jakub@redhat.com>
124
125 PR c/89734
126 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
127 return type even if quals_used is 0. Formatting fixes.
128
baa09dc5
RB
1292019-03-14 Richard Biener <rguenther@suse.de>
130
131 * c-tree.h (enum c_declspec_il): New.
132 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
133 enum bitfield.
134 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
135 Pass start pass and declspec_il to c_parser_parse_gimple_body.
136 (c_parser_declspecs): Adjust.
137 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
138 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
139 and bitmap.h.
140 (struct gimple_parser): New.
141 (gimple_parser::push_edge): New method.
142 (c_parser_gimple_parse_bb_spec): New helper.
143 (c_parser_parse_gimple_body): Get start pass and IL specification.
144 Initialize SSA and CFG.
145 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
146 Build a gimple_parser parsing state and pass it along.
147 (c_parser_gimple_statement): Change intermittend __PHI internal
148 function argument for the edge.
149 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
150 (c_parser_gimple_goto_stmt): Record edges to build.
151 (c_parser_gimple_if_stmt): Likewise.
152 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
153 (c_parser_gimple_or_rtl_pass_list): Likewise.
154
a3f9f006
ML
1552019-03-11 Martin Liska <mliska@suse.cz>
156
157 * c-decl.c (check_for_loop_decls): Wrap an option name
158 in a string format message and fix GNU coding style.
159 * c-parser.c (c_parser_declspecs): Likewise.
160
1db01ff9
JJ
1612019-03-08 Jakub Jelinek <jakub@redhat.com>
162
163 PR tree-optimization/89550
164 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
165 returned true.
166 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
167 or warning returned true.
168
66dcb747
JJ
1692019-02-28 Jakub Jelinek <jakub@redhat.com>
170
171 PR c/89525
172 * c-typeck.c (convert_arguments): Call inform_declaration only if
173 the previous warning_at call returned true.
174
2263c9f2
TS
1752019-02-22 Thomas Schwinge <thomas@codesourcery.com>
176
177 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
178 parameter. Adjust all users.
179 (c_parser_oacc_simple_clause): Replace parser with loc formal
180 parameter. Adjust all users.
181
19695f4d
CLT
1822019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
183
184 PR c/87924
185 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
186 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
187
5f88ba10
JJ
1882019-02-15 Jakub Jelinek <jakub@redhat.com>
189
190 PR c/89340
191 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
192 before c_decl_attributes rather than after it.
193
cfc30fd1
JJ
1942019-02-06 Jakub Jelinek <jakub@redhat.com>
195
196 PR c/89211
197 * c-parser.c (c_parser_declaration_or_fndef): Don't update
198 DECL_ARGUMENTS of d if it has been defined already. Use a single if
199 instead of 3 nested ifs.
200
fbe83e6b
JM
2012019-02-06 Joseph Myers <joseph@codesourcery.com>
202
203 PR c/88584
204 * c-decl.c (finish_decl): Do not complete array types for arrays
205 with external linkage not at file scope.
206
f461f938
RB
2072019-02-05 Richard Biener <rguenther@suse.de>
208
209 PR c/88606
210 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
211 all type variants when not supported.
212
fe509359
JJ
2132019-01-30 Jakub Jelinek <jakub@redhat.com>
214
215 PR c/89061
216 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
217 * c-decl.c (decl_jump_unsafe): Return false for
218 C_DECL_COMPOUND_LITERAL_P decls.
219 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
220
6a335b96
JJ
2212019-01-29 Jakub Jelinek <jakub@redhat.com>
222
f4b7e754
JJ
223 PR c/89045
224 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
225 scope.
226
6a335b96
JJ
227 PR c/86125
228 * c-decl.c (last_fileptr_type): Remove.
229 (last_structptr_types): New variable.
230 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
231 {old,new}rettype instead of the types themselves. Assert
232 last_structptr_types array has the same number of elements
233 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
234 argument oldtype and newtype. Instead of handling
235 just fileptr_type_node specially, handle all builtin_structptr_types
236 pointer nodes. Formatting fix.
237
d8b5a1a0
MS
2382019-01-24 Martin Sebor <msebor@redhat.com>
239
240 PR c/86125
241 PR c/88886
242 PR middle-end/86308
243 * c-decl.c (match_builtin_function_types): Add arguments.
244 (diagnose_mismatched_decls): Diagnose mismatched declarations
245 of built-ins more strictly.
246
e21c4491
JJ
2472019-01-24 Jakub Jelinek <jakub@redhat.com>
248
249 PR c++/88976
250 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
251 on #pragma omp cancel with different modifiers.
252
420183d9
L
2532019-01-18 H.J. Lu <hongjiu.lu@intel.com>
254
255 PR c/51628
256 PR c/88664
257 * c-typeck.c (convert_for_assignment): Upate the
258 warn_for_address_or_pointer_of_packed_member call.
259
17ad43dd
TH
2602019-01-16 Tom Honermann <tom@honermann.net>
261 Jason Merrill <jason@redhat.com>
262
263 * c-typeck.c (digest_init): Revised the error message produced for
264 ill-formed cases of array initialization with a string literal.
265 (error_init): Make variadic.
266
5f07d78a
JJ
2672019-01-12 Jakub Jelinek <jakub@redhat.com>
268
269 * c-typeck.c (convert_for_assignment): Fix a comment typo.
270
c4581bbf
JJ
2712019-01-07 Jakub Jelinek <jakub@redhat.com>
272
273 PR c/88701
274 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
275 if current_function_decl is non-NULL.
276
65c5b1eb
JM
2772019-01-07 Joseph Myers <joseph@codesourcery.com>
278
279 PR c/88720
280 PR c/88726
281 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
282 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
283 functions declared but never defined only for external scope, not
284 for other scopes.
285
d8fcab68
JJ
2862019-01-07 Jakub Jelinek <jakub@redhat.com>
287
288 PR c++/85052
289 * c-parser.c (c_parser_postfix_expression): Parse
290 __builtin_convertvector.
291
a5544970
JJ
2922019-01-01 Jakub Jelinek <jakub@redhat.com>
293
294 Update copyright years.
295
da77eace
L
2962018-12-20 H.J. Lu <hongjiu.lu@intel.com>
297
298 PR c/51628
299 * c-typeck.c (convert_for_assignment): Call
300 warn_for_address_or_pointer_of_packed_member.
301
1edf8866
SB
3022018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
303
304 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
305 a more specific error message (instead of just falling through).
306
db4fd626
SB
3072018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
308
309 * c-parser.c (c_parser_asm_statement): Keep track of the location each
310 asm qualifier is first seen; use that to give nicer "duplicate asm
311 qualifier" messages. Delete 'quals" variable, instead pass the
312 "is_volatile_ flag to build_asm_stmt directly.
313 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
314 * c-typeck.c (build_asm_stmt): Ditto; adjust.
315
9c9cfcbb
SB
3162018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
317
318 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
319 "done" boolean variable.
320
a14feb3c
DM
3212018-12-19 David Malcolm <dmalcolm@redhat.com>
322
323 PR c++/87504
324 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
325 Move from here to gcc-rich-location.h and gcc-rich-location.c.
326 (build_binary_op): Use struct op_location_t and
327 class binary_op_rich_location.
328
6d939173
JJ
3292018-12-11 Jakub Jelinek <jakub@redhat.com>
330
331 PR sanitizer/88426
332 * c-convert.c (convert): Call c_fully_fold before calling
333 ubsan_instrument_float_cast.
334
b7055028
SB
3352018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
336
337 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
338 setting "quals".
339
5b76e75f
SB
3402018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
341
342 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
343 after asm. Pass a flag for it to build_asm_expr.
344 * c-tree.h (build_asm_expr): Update declaration.
345 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
346 set ASM_INLINE_P.
347
30bd42b9
SB
3482018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
349
350 PR inline-asm/55681
351 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
352 combination of volatile and goto, in any order, without repetitions.
353
9df6c0e4
JB
3542018-12-04 James Norris <jnorris@codesourcery.com>
355 Cesar Philippidis <cesar@codesourcery.com>
356 Julian Brown <julian@codesourcery.com>
357
358 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
359 code.
360
f44697b7
RB
3612018-11-30 Richard Biener <rguenther@suse.de>
362
363 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
364 _Literal (type) { ... } as empty aggregate or vector constructor.
365
550dfbdc
MS
3662018-11-29 Martin Sebor <msebor@redhat.com>
367
368 PR c/88091
369 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
370 (convert_arguments): Add comments. Pass additional argument to
371 the function above.
372
673670da
MS
3732018-11-29 Martin Sebor <msebor@redhat.com>
374
375 PR c/88172
376 PR testsuite/88208
377 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
378
db1d09b0
MS
3792018-11-23 Martin Sebor <msebor@redhat.com>
380
381 PR testsuite/88098
382 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
383 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
384
98f08eb8
MS
3852018-11-20 Martin Sebor <msebor@redhat.com>
386
387 * c-parser.c (c_parser_has_attribute_expression): New function.
388 (c_parser_attribute): New function.
389 (c_parser_attributes): Move code into c_parser_attribute.
390 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
391
cd5da983
MS
3922018-11-15 Martin Sebor <msebor@redhat.com>
393
394 PR c/83656
395 * c-decl.c (header_for_builtin_fn): Declare.
396 (diagnose_mismatched_decls): Diagnose declarations of built-in
397 functions without a prototype.
398 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
399 (convert_argument): Same.
400 (convert_arguments): Factor code out into convert_argument.
401 Detect mismatches between built-in formal arguments in calls
402 to built-in without prototype.
403 (build_conditional_expr): Same.
404 (type_or_builtin_type): New function.
405 (convert_for_assignment): Add argument. Conditionally issue
406 warnings instead of errors for mismatches.
407
620e594b
DM
4082018-11-13 David Malcolm <dmalcolm@redhat.com>
409
410 * c-decl.c: Replace "source_location" with "location_t".
411 * c-tree.h: Likewise.
412 * c-typeck.c: Likewise.
413 * gimple-parser.c: Likewise.
414
3179ebae
JJ
4152018-11-09 Jakub Jelinek <jakub@redhat.com>
416
81a227c6
JJ
417 * c-parser.c (c_parser_omp_clause_final): Use
418 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
419 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
420 parsing instead of c_parser_paren_condition.
421 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
422 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
423 c_fully_fold instead of c_parser_condition.
424 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
425 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
426 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
427 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
428 c_parser_expr_no_commas instead of c_parser_expression.
429
98c91c56
JJ
430 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
431 reduction clause with inscan modifier.
432
3179ebae
JJ
433 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
434 clauses other than atomic_default_mem_order.
435
28567c40
JJ
4362018-11-08 Jakub Jelinek <jakub@redhat.com>
437
438 * c-parser.c: Include memmode.h.
439 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
440 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
441 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
442 task_reduction clauses.
443 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
444 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
445 section, or lvalue assignment expression.
446 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
447 (c_parser_omp_clause_lastprivate): Parse optional
448 conditional: modifier.
449 (c_parser_omp_clause_hint): Require constant integer expression rather
450 than just integer expression.
451 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
452 clause.
453 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
454 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
455 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
456 functions.
457 (c_parser_omp_clause_depend): Parse iterator modifier and handle
458 iterators. Parse mutexinoutset and depobj kinds.
459 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
460 callers.
461 (c_parser_omp_all_clauses): Likewise. Handle
462 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
463 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
464 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
465 default memory order from requires directive if any. Adjust
466 c_finish_omp_atomic caller.
467 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
468 (c_parser_omp_flush): Parse flush with memory-order-clause.
469 (c_parser_omp_for_loop): Allow NE_EXPR even in
470 OpenMP loops, adjust c_finish_omp_for caller.
471 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
472 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
473 Allow to be called while parsing combined parallel master.
474 Parse combined master taskloop{, simd}.
475 (c_parser_omp_parallel): Parse combined
476 parallel master{, taskloop{, simd}} constructs.
477 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
478 (OMP_TASKGROUP_CLAUSE_MASK): Define.
479 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
480 (OMP_TASKWAIT_CLAUSE_MASK): Define.
481 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
482 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
483 around teams body. Use SET_EXPR_LOCATION.
484 (c_parser_omp_target_data): Allow target data
485 with only use_device_ptr clauses.
486 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
487 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
488 (c_parser_omp_requires): New function.
489 (c_finish_taskloop_clauses): New function.
490 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
491 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
492 declaration. Disallow in_reduction clause when combined with parallel
493 master.
494 (c_parser_omp_construct): Adjust c_parser_omp_master and
495 c_parser_omp_taskgroup callers.
496 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
497 other than cancel.
498 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
499 like OMP_CLAUSE_REDUCTION.
500 (handle_omp_array_sections): Likewise. Call save_expr on array
501 reductions before calling build_index_type. Handle depend clauses
502 with iterators.
503 (struct c_find_omp_var_s): New type.
504 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
505 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
506 with static, runtime or auto schedule kinds. Call save_expr for whole
507 array reduction sizes. Diagnose reductions with zero sized elements
508 or variable length structures. Diagnose nogroup clause used with
509 reduction clause(s). Handle depend clause with
510 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
511 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
512 some different type for other kinds. Use build_unary_op with
513 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
514 Handle depend clauses with iterators. Remove no longer needed special
515 case that predetermined const qualified vars may be specified in
516 firstprivate clause. Complain if const qualified vars are mentioned
517 in data-sharing clauses other than firstprivate or shared. Use
518 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
519 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
520 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
521 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
522
7e2de6df
DM
5232018-10-29 David Malcolm <dmalcolm@redhat.com>
524
525 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
526 logic for change to name_hint::operator bool.
527 (undeclared_variable): Likewise.
528 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
529 (c_parser_parameter_declaration): Likewise.
530
9f936c86
JM
5312018-10-17 Joseph Myers <joseph@codesourcery.com>
532
533 * c-errors.c (pedwarn_c11): New function.
534 * c-parser.c (disable_extension_diagnostics): Save
535 warn_c11_c2x_compat and set it to 0.
536 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
537 (c_parser_static_assert_declaration_no_semi): Handle
538 _Static_assert without string constant.
539 * c-tree.h (pedwarn_c11): New prototype.
540
033eb567
DM
5412018-10-17 David Malcolm <dmalcolm@redhat.com>
542
543 * Make-lang.in (selftest-c): New.
544 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
545 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
546 from gcc/Makefile.in.
547
0edf3afe
RB
5482018-10-02 Richard Biener <rguenther@suse.de>
549
550 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
551
8313a764
JM
5522018-09-26 Joseph Myers <joseph@codesourcery.com>
553
554 PR c/87390
555 * c-typeck.c (build_binary_op): Use excess precision for
556 comparisons of integers and floating-point for C11 and later.
557
ce6f0888
MJ
5582018-09-26 Martin Jambor <mjambor@suse.cz>
559
560 PR c/87347
561 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
562 comment.
563
9c4a4b3c
DM
5642018-09-17 David Malcolm <dmalcolm@redhat.com>
565
566 * c-objc-common.c (range_label_for_type_mismatch::get_text):
567 Update for new param.
568 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
569 Likewise.
570
80c6d1f4
MJ
5712018-09-17 Martin Jambor <mjambor@suse.cz>
572
573 PR c/63886
574 * c-parser.c: (warn_for_abs): New function.
575 (c_parser_postfix_expression_after_primary): Call it.
576
4a426e36
BE
5772018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
578
579 * c-typeck.c (digest_init): Shorten overlength strings.
580
6d900107
BE
5812018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
582
583 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
584
b5764229
BE
5852018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
586
587 * c-decl.c (finish_decl): Call braced_list_to_string here ...
588 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
589
22eea6b2
AM
5902018-08-30 Alexander Monakov <amonakov@ispras.ru>
591
592 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
593 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
594
85204e23
DM
5952018-08-27 David Malcolm <dmalcolm@redhat.com>
596
597 PR 87091
598 * c-decl.c (implicitly_declare): Update call to
599 maybe_add_include_fixit to suggest overriding the location, as it
600 is for a note.
601 * c-objc-common.c (c_tree_printer): Update for conversion of
602 show_caret_p to a tri-state.
603
3d78e008
ML
6042018-08-27 Martin Liska <mliska@suse.cz>
605
606 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
607 fndecl_built_in_p and remove check for FUNCTION_DECL if
608 possible.
3d78e008
ML
609 (diagnose_mismatched_decls): Likewise.
610 (merge_decls): Likewise.
611 (warn_if_shadowing): Likewise.
612 (pushdecl): Likewise.
613 (implicitly_declare): Likewise.
614 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
615 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
616 * c-typeck.c (build_function_call_vec): Likewise.
617 (convert_arguments): Likewise.
618
097f82ec
DM
6192018-08-20 David Malcolm <dmalcolm@redhat.com>
620
621 PR other/84889
622 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
623 (diagnose_mismatched_decls): Likewise, in various places.
624 (warn_if_shadowing): Likewise.
625 (implicit_decl_warning): Likewise.
626 (implicitly_declare): Likewise.
627 (undeclared_variable): Likewise.
628 (declare_label): Likewise.
629 (grokdeclarator): Likewise.
630 (start_function): Likewise.
631 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
632 (c_parser_parameter_declaration): Likewise.
633 (c_parser_binary_expression): Likewise.
634 * c-typeck.c (c_expr_sizeof_expr): Likewise.
635 (parser_build_binary_op): Likewise.
636 (build_unary_op): Likewise.
637 (error_init): Likewise.
638 (pedwarn_init): Likewise.
639 (warning_init): Likewise.
640 (convert_for_assignment): Likewise.
641
96e6ae57
DM
6422018-08-15 David Malcolm <dmalcolm@redhat.com>
643
644 * c-objc-common.c: Include "gcc-rich-location.h".
645 (c_tree_printer): Move implemenation of '%T' to...
646 (print_type): ...this new function.
647 (range_label_for_type_mismatch::get_text): New function.
648 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
649 range for the various ic_argpass cases.
650 (class maybe_range_label_for_tree_type_mismatch): New class.
651 (build_binary_op): Use it when calling binary_op_error.
652
0cd020ae
PK
6532018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
654
655 * c-decl.c (start_decl): Do not warn if variables is named as main
656 and is a local variable.
657
72733314
IS
6582018-08-15 Iain Sandoe <iain@sandoe.co.uk>
659
660 PR c/19315
661 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
662 objects of unknown size.
663
23aa9f7c
MS
6642018-08-13 Martin Sebor <msebor@redhat.com>
665
666 PR tree-optimization/71625
667 * c-parser.c (c_parser_declaration_or_fndef): Call
668 braced_list_to_string.
669
e5e7e50d
BH
6702018-08-03 Bogdan Harjoc <harjoc@gmail.com>
671
672 PR c/86690
673 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
674 errors.
675
8a45b051
MS
6762018-08-01 Martin Sebor <msebor@redhat.com>
677
678 PR tree-optimization/86650
679 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
680 and TREE_BLOCK (t) from within percent_K_format to this callsite.
681
5922dcb5
JJ
6822018-08-01 Jakub Jelinek <jakub@redhat.com>
683
684 PR c/85704
685 * c-typeck.c (init_field_decl_cmp): New function.
686 (output_pending_init_elements): Use it for field comparisons
687 instead of pure bit_position comparisons.
688
9b452033
JJ
6892018-07-12 Jakub Jelinek <jakub@redhat.com>
690
691 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
692 type here, instead add "omp declare target implicit" attribute.
693 (finish_decl): Diagnose vars without mappable type here.
694
829c6349
CLT
6952018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
696 Thomas Schwinge <thomas@codesourcery.com>
697 Cesar Philippidis <cesar@codesourcery.com>
698
699 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
700 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
701 to their non-present_or_* counterparts. Make 'self' an alias to
702 PRAGMA_OACC_CLAUSE_HOST.
703 (c_parser_oacc_data_clause): Update GOMP mappings for
704 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
705 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
706 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
707 Remove support for present_or_* clauses.
708 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
709 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
710 (OACC_DECLARE_CLAUSE_MASK): Likewise.
711 (OACC_DATA_CLAUSE_MASK): Likewise.
712 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
713 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
714 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
715 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
716 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
717
e197e64e
KV
7182018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
719
720 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
721 * gimple-parser.c (c_parser_gimple_statement): Likewise.
722 (c_parser_gimple_unary_expression): Likewise.
723
487f2f61
JJ
7242018-06-15 Jakub Jelinek <jakub@redhat.com>
725
726 PR c/86093
727 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
728 before doing POINTER_DIFF_EXPR.
729
e4d44a37
MP
7302018-06-07 Marek Polacek <polacek@redhat.com>
731
732 PR c/85318
733 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
734 for loop initial declarations.
735
b67b9225
DP
7362018-05-30 David Pagan <dave.pagan@oracle.com>
737
738 PR c/55976
739 * c-decl.c (grokdeclarator): Update check for return type warnings.
740 (start_function): Likewise.
741 (finish_function): Likewise.
742 * c-typeck.c (c_finish_return): Update check for return type warnings.
743 Pass OPT_Wreturn_type to pedwarn when appropriate.
744
c566cc9f
RS
7452018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
746
747 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
748 __FMA_EXPR handlng.
749
e4f81565
RS
7502018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
751
752 * gimple-parser.c: Include internal-fn.h.
753 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
754 (c_parser_gimple_call_internal): New function.
755 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
756 Fix typos in comment.
757
79e7b1fe
JJ
7582018-05-10 Jakub Jelinek <jakub@redhat.com>
759
760 PR c++/85662
761 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
762 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
763 fold_convert_loc.
764 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
765 fold_offsetof_1, pass argtype as TYPE to it and drop the
766 fold_convert_loc.
767
f7584c81
DP
7682018-05-02 David Pagan <dave.pagan@oracle.com>
769
770 PR c/30552
771 * c-decl.c (old_style_parameter_scope): New function.
772 * c-parser.c (c_parser_postfix_expression): Check for statement
773 expressions in old-style function parameter list declarations.
774 * c-parser.h (old_style_parameter_scope): New extern declaration.
775
b33a0cb3
JJ
7762018-04-25 Jakub Jelinek <jakub@redhat.com>
777
778 PR sanitizer/84307
779 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
780 it is not TREE_STATIC.
781 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
782 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
783 its COMPOUND_LITERAL_EXPR_DECL.
784
c5c5822a
JM
7852018-03-21 Joseph Myers <joseph@codesourcery.com>
786
787 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
788 where all functions return the same _FloatN or _FloatNx type,
789 treat integer types as _Float64 instead of double.
790
aa1c9429
JJ
7912018-03-21 Jakub Jelinek <jakub@redhat.com>
792
793 PR c/84999
794 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
795 building vector comparison, diagnose it and return error_mark_node.
796
9bb45a95
JJ
7972018-03-15 Jakub Jelinek <jakub@redhat.com>
798
799 PR c/84853
800 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
801 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
802 INTEGER_TYPE element type.
803
ada6bad9
DP
8042018-03-13 David Pagan <dave.pagan@oracle.com>
805
806 PR c/46921
807 * c-typeck.c (output_init_element): Ensure field initializer
808 expression is always evaluated if there are side effects.
809
849bbdb9
JJ
8102018-03-06 Jakub Jelinek <jakub@redhat.com>
811
812 PR c/84721
813 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
814 !building_stmt_list_p ().
815
d74641bd
RS
8162018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
817
818 PR c/84305
819 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
820 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
821 and include the BIND_EXPR in the list of things that need to be
822 pre-evaluated.
823
0444aa9c
NS
8242018-02-09 Nathan Sidwell <nathan@acm.org>
825
826 PR c/84293
827 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
828 to strict_aliasing_warning.
829
7c30b12a
PC
8302018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
831
832 * c-typeck.c (really_start_incremental_init, push_init_level,
833 set_nonincremental_init, output_init_element, process_init_element):
834 Use DECL_UNNAMED_BIT_FIELD.
835
2be4dfcb
MP
8362018-01-31 Marek Polacek <polacek@redhat.com>
837
838 PR c/81779
839 * c-parser.c (c_parser_compound_statement_nostart): Call
840 expansion_point_location_if_in_system_header.
841
bb9869d5
DM
8422018-01-17 David Malcolm <dmalcolm@redhat.com>
843
844 PR c++/83814
845 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
846 the C part.
847
b4923738
JJ
8482018-01-13 Jakub Jelinek <jakub@redhat.com>
849
850 PR c/83801
851 * c-tree.h (decl_constant_value_1): Add a bool argument.
852 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
853 returning a CONSTRUCTOR if it is true. Use error_operand_p.
854 (decl_constant_value): Adjust caller.
855 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
856 decl_constant_value_1 as IN_INIT. Otherwise, punt if
857 decl_constant_value returns initializer that has BLKmode or
858 array type.
859 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
860
928686b1
RS
8612018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
862 Alan Hayward <alan.hayward@arm.com>
863 David Sherwood <david.sherwood@arm.com>
864
865 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
866 TYPE_VECTOR_SUBPARTS.
867
85ec4feb
JJ
8682018-01-03 Jakub Jelinek <jakub@redhat.com>
869
870 Update copyright years.
871
913884f7
JJ
8722018-01-01 Jakub Jelinek <jakub@redhat.com>
873
874 PR c/83595
875 * c-parser.c (c_parser_braced_init, c_parser_initelt,
876 c_parser_conditional_expression, c_parser_cast_expression,
877 c_parser_sizeof_expression, c_parser_alignof_expression,
878 c_parser_postfix_expression, c_parser_omp_declare_reduction,
879 c_parser_transaction_expression): Use set_error () method instead
880 of setting value member to error_mark_node.
881
c6cfa2bf
MM
8822017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
883
884 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
885 and _Float<N>X built-in functions.
886
11d29d63
JJ
8872017-12-22 Jakub Jelinek <jakub@redhat.com>
888
14ec014e
JJ
889 PR debug/83550
890 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
891 TYPE_STUB_DECL and call rest_of_type_compilation before processing
892 incomplete vars rather than after it.
893
11d29d63
JJ
894 PR debug/83547
895 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
896 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
897 and consider empty ones if there are no other stmts. For
898 -Wunused-value walk all statements before the one only followed by
899 DEBUG_BEGIN_STMTs.
900
170a8bd6 9012017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 902 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
903
904 * c-parser.c (c_parser_while_statement): Add unroll parameter and
905 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
906 (c_parser_do_statement): Likewise.
907 (c_parser_for_statement): Likewise.
908 (c_parser_statement_after_labels): Adjust calls to above.
909 (c_parse_pragma_ivdep): New static function.
910 (c_parser_pragma_unroll): Likewise.
911 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
912 <PRAGMA_UNROLL>: New case.
913
01512446
JJ
9142017-12-19 Jakub Jelinek <jakub@redhat.com>
915
916 * c-typeck.c (comptypes_internal, function_types_compatible_p,
917 perform_integral_promotions, digest_init): Replace Yoda conditions
918 with typical order conditions.
919 * c-decl.c (check_bitfield_type_and_width): Likewise.
920
c65e18d3
BE
9212017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
922
923 * c-typeck.c (c_safe_arg_type_equiv_p,
924 c_safe_function_type_cast_p): New function.
925 (build_c_cast): Implement -Wcast-function-type.
926
b7280579
RB
9272017-12-14 Richard Biener <rguenther@suse.de>
928
929 PR c/83415
930 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
931 like REALPART_EXPR for the behavior of whether its operand
932 is an lvalue.
933
49e6a6c0
MP
9342017-12-12 Marek Polacek <polacek@redhat.com>
935
936 PR c/82679
937 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
938
96a95ac1
AO
9392017-12-12 Alexandre Oliva <aoliva@redhat.com>
940
941 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
942 * c-parser.c (add_debug_begin_stmt): New.
943 (c_parser_declaration_or_fndef): Call it.
944 (c_parser_compound_statement_nostart): Likewise.
945 (c_parser_statement_after_labels): Likewise.
946 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
947
4b2b493f
JM
9482017-12-07 Joseph Myers <joseph@codesourcery.com>
949
950 * c-decl.c (build_compound_literal): Add parameter alignas_align
951 and set alignment of decl if nonzero.
952 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
953 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
954 qualifier.
955 (c_parser_struct_declaration): Update syntax comment.
956 (c_parser_type_name): Add alignas_ok argument and pass it to
957 c_parser_declspecs.
958 (c_parser_cast_expression): Pass true to c_parser_type_name and
959 give error if a cast used an _Alignas specifier.
960 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
961 give error if sizeof (type-name) used an _Alignas specifier.
962 (c_parser_alignof_expression): Pass true to c_parser_type_name and
963 give error if _Alignof (type-name) used an _Alignas specifier.
964 (c_parser_postfix_expression_after_paren_type): Check specified
965 alignment for a compound literal and pass it to
966 build_compound_literal.
967 * c-parser.h (c_parser_type_name): Update prototype.
968 * c-tree.h (build_compound_literal): Update prototype.
969
5d9ae53d
MS
9702017-12-07 Martin Sebor <msebor@redhat.com>
971
972 PR c/81544
973 * c-decl.c (c_decl_attributes): Look up existing declaration and
974 pass it to decl_attributes.
975
c79144f8
DM
9762017-12-06 David Malcolm <dmalcolm@redhat.com>
977
978 PR c/83236
979 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
980 reserved for use by the implementation.
981
613bc14f
DM
9822017-12-06 David Malcolm <dmalcolm@redhat.com>
983
984 * c-decl.c: Include "c-family/c-spellcheck.h".
985
05abad4c
ML
9862017-12-05 Martin Liska <mliska@suse.cz>
987 Jakub Jelinek <jakub@redhat.com>
988
989 * c-typeck.c (pointer_diff): Add new argument and instrument
990 pointer subtraction.
991 (build_binary_op): Similar for pointer comparison.
992
cc6534d4
JJ
9932017-12-01 Jakub Jelinek <jakub@redhat.com>
994
65791f42
JJ
995 PR c/79153
996 * c-parser.c: Include tree-iterator.h.
997 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
998 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
999 on it.
1000
cc6534d4
JJ
1001 PR c/83222
1002 * c-tree.h (decl_constant_value_1): Declare.
1003 * c-typeck.c (decl_constant_value_1): New function.
1004 (decl_constant_value): Use it.
1005 * c-fold.c (c_fully_fold_internal): If in_init, use
1006 decl_constant_value_1 instead of decl_constant_value.
1007
5de73c05
JJ
10082017-11-30 Jakub Jelinek <jakub@redhat.com>
1009
1010 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
1011
058f0b9e
JJ
10122017-11-28 Jakub Jelinek <jakub@redhat.com>
1013
1014 PR sanitizer/81275
1015 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
1016 c_switch_covers_all_cases_p returns true.
1017
5e9d6aa4 10182017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 1019 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
1020
1021 * Make-lang.in (c/c-array-notation.o): Remove.
1022 * c-array-notation.c: Delete.
1023 * c-decl.c: Remove cilkplus condition.
1024 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
1025 c_parser_cilk_verify_simd, c_parser_array_notation,
1026 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
1027 c_parser_cilk_simd_fn_vector_attrs,
1028 c_finish_cilk_simd_fn_tokens): Delete.
1029 (c_parser_declaration_or_fndef): Remove cilkplus condition.
1030 (c_parser_direct_declarator_inner): Ditto.
1031 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
1032 (c_parser_attributes, c_parser_compound_statement,
1033 c_parser_statement_after_labels, c_parser_if_statement,
1034 c_parser_switch_statement, c_parser_while_statement,
1035 c_parser_do_statement, c_parser_for_statement,
1036 c_parser_unary_expression, c_parser_postfix_expression,
1037 c_parser_postfix_expression_after_primary,
1038 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
1039 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
1040 support.
1041 * c-typeck.c (build_array_ref, build_function_call_vec,
1042 convert_arguments,
1043 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
1044 c_finish_loop, build_binary_op): Remove cilkplus support.
1045
9e851845
JJ
10462017-11-28 Jakub Jelinek <jakub@redhat.com>
1047
1048 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
1049 of build3.
1050
8c7dbea9
BK
10512017-11-14 Boris Kolpackov <boris@codesynthesis.com>
1052
1053 * Make-lang.in (c.install-plugin): Install backend import library.
1054
41521dee
JJ
10552017-11-23 Jakub Jelinek <jakub@redhat.com>
1056
1057 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
1058 pragma_stmt context.
1059
ac9effed
EB
10602017-11-23 Mike Stump <mikestump@comcast.net>
1061 Eric Botcazou <ebotcazou@adacore.com>
1062
1063 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
1064 ANNOTATE_EXPR.
1065 (c_parser_do_statement): Likewise.
1066 (c_parser_for_statement): Likewise.
1067
ce95abc4
DM
10682017-11-22 David Malcolm <dmalcolm@redhat.com>
1069
1070 PR c++/62170
1071 * c-objc-common.c (c_tree_printer): Convert penultimate param from
1072 bool to bool *. Within '%T' handling, if showing an "aka", use
1073 "quoted" param to add appropriate quoting.
1074
974aedcc
MP
10752017-11-22 Marek Polacek <polacek@redhat.com>
1076
1077 PR c++/60336
1078 PR middle-end/67239
1079 PR target/68355
1080 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
1081
d4300cc6
DM
10822017-11-21 David Malcolm <dmalcolm@redhat.com>
1083
1084 PR c/83056
1085 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
1086 earlier failed lookups.
1087
1af4ebf5
MG
10882017-11-21 Marc Glisse <marc.glisse@inria.fr>
1089
1090 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
1091 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
1092
26edace6
DM
10932017-11-20 David Malcolm <dmalcolm@redhat.com>
1094
1095 PR c/81404
1096 * c-decl.c: Include "c-family/known-headers.h".
1097 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
1098 to known-headers.cc.
1099 (class suggest_missing_header): Move to known-header.h.
1100 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
1101 than get_c_name_hint.
1102
b1212255
DM
11032017-11-20 David Malcolm <dmalcolm@redhat.com>
1104
1105 * c-decl.c (get_c_name_hint): New function.
1106 (class suggest_missing_header): New class.
1107 (lookup_name_fuzzy): Call get_c_name_hint and use it to
1108 suggest missing headers to the user.
1109
6c7a259b
DM
11102017-11-20 David Malcolm <dmalcolm@redhat.com>
1111
1112 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1113 Include "c-family/name-hint.h"
1114 (implicit_decl_warning): Convert "hint" from
1115 const char * to name_hint. Pass location to
1116 lookup_name_fuzzy. Suppress any deferred diagnostic if the
1117 warning was not printed.
1118 (undeclared_variable): Likewise for "guessed_id".
1119 (lookup_name_fuzzy): Convert return type from const char *
1120 to name_hint. Add location_t param.
1121 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1122 Include "c-family/name-hint.h"
1123 (c_parser_declaration_or_fndef): Convert "hint" from
1124 const char * to name_hint. Pass location to lookup_name_fuzzy.
1125 (c_parser_parameter_declaration): Likewise.
1126
f9c59f7e
JJ
11272017-11-19 Jakub Jelinek <jakub@redhat.com>
1128
1129 PR c/66618
1130 PR c/69960
1131 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
1132 where needed.
1133 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
1134 handle_omp_array_sections): Likewise.
1135 (digest_init): Don't call decl_constant_value_for_optimization.
1136 * c-tree.h (decl_constant_value_for_optimization): Removed.
1137 * c-fold.c (c_fold_array_ref): New function.
1138 (c_fully_fold_internal): Add LVAL argument, propagate it through
1139 recursive calls. For VAR_P call decl_constant_value and
1140 unshare if not LVAL and either optimizing or IN_INIT. Remove
1141 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
1142 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
1143 (c_fully_fold): Add LVAL argument, pass it through to
1144 c_fully_fold_internal.
1145 (decl_constant_value_for_optimization): Removed.
1146
3ca0dc60
JM
11472017-11-15 Joseph Myers <joseph@codesourcery.com>
1148
1149 PR c/81156
1150 * c-parser.c (check_tgmath_function): New function.
1151 (enum tgmath_parm_kind): New enum.
1152 (c_parser_postfix_expression): Handle __builtin_tgmath.
1153
64a5912c
DM
11542017-10-31 David Malcolm <dmalcolm@redhat.com>
1155
1156 * c-decl.c (implicit_decl_warning): Update for renaming of
1157 pedwarn_at_rich_loc and warning_at_rich_loc.
1158 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
1159 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
1160 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1161 (c_parser_struct_or_union_specifier): Likewise for renaming of
1162 pedwarn_at_rich_loc.
1163 (c_parser_parameter_declaration): Likewise for renaming of
1164 error_at_rich_loc.
1165 * c-typeck.c (build_component_ref): Likewise.
1166 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
1167 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
1168 (set_init_label): Likewise for renaming of error_at_rich_loc.
1169
c1136864
RB
11702017-10-30 Richard Biener <rguenther@suse.de>
1171
1172 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
1173 stmts.
1174
ee5fd23a
MM
11752017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
1176
1177 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
1178 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
1179
1a59ccf2
DM
11802017-10-25 David Malcolm <dmalcolm@redhat.com>
1181
1182 PR c/7356
1183 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
1184 semicolons.
1185
bc1a75dd
JJ
11862017-10-25 Jakub Jelinek <jakub@redhat.com>
1187
1188 PR libstdc++/81706
1189 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
1190 newdecl to corresponding __builtin_ if any.
1191
ff1ff960
PC
11922017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
1193
1194 PR c++/82466
1195 * c-decl.c (diagnose_mismatched_decls): Use
1196 OPT_Wbuiltin_declaration_mismatch.
1197
62e1c678
DM
11982017-10-12 David Malcolm <dmalcolm@redhat.com>
1199
1200 * c-parser.c (c_parser_require): Add "type_is_unique" param and
1201 use it to guard calls to maybe_suggest_missing_token_insertion.
1202 (c_parser_parms_list_declarator): Override default value of new
1203 "type_is_unique" param to c_parser_require.
1204 (c_parser_asm_statement): Likewise.
1205 * c-parser.h (c_parser_require): Add "type_is_unique" param,
1206 defaulting to true.
1207
a92f6726
NS
12082017-10-11 Nathan Sidwell <nathan@acm.org>
1209
1210 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
1211
8e6cdc90
RS
12122017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1213
1214 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
1215 operating on trees as wide_ints.
1216 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
1217 (c_tree_equal): Likewise.
1218
8139a48e
DM
12192017-10-04 David Malcolm <dmalcolm@redhat.com>
1220
1221 * c-decl.c (push_parm_decl): Store c_parm's location into the
1222 PARAM_DECL.
1223 (build_c_parm): Add "loc" param and store it within the c_parm.
1224 * c-parser.c (struct c_parser): Add "last_token_location" field.
1225 (c_parser_consume_token): Store location of the token into the
1226 new field.
1227 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
1228 when handling a FUNCTION_DECL, if it doesn't already have them.
1229 (c_parser_parameter_declaration): Generate a location for the
1230 parameter, and pass it to the call to build_c_parm.
1231 * c-tree.h (struct c_parm): Add field "loc".
1232 (build_c_parm): Add location_t param.
1233 * c-typeck.c (get_fndecl_argument_location): New function.
1234 (inform_for_arg): New function.
1235 (convert_for_assignment): Use inform_for_arg when dealing with
1236 ic_argpass.
1237
2a389958
JJ
12382017-09-29 Jakub Jelinek <jakub@redhat.com>
1239
7d386d45
JJ
1240 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
1241 width is non-NULL.
1242 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
1243 don't SET_DECL_C_BIT_FIELD here.
1244
2a389958
JJ
1245 PR c/82340
1246 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
1247 instead of trying to set just TREE_READONLY manually.
1248
ebc6a85e
TV
12492017-09-16 Tom de Vries <tom@codesourcery.com>
1250
1251 PR c/81875
1252 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
1253 cond itself.
1254
bb75facd
JM
12552017-09-15 Joseph Myers <joseph@codesourcery.com>
1256
1257 PR c/82071
1258 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
1259 for C11.
1260 (build_conditional_expr): For C11, generate result with excess
1261 precision when one argument is an integer and the other is of a
1262 type using excess precision.
1263
1d933576
BE
12642017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
1265
1266 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
1267
267bbb6f
MP
12682017-09-13 Marek Polacek <polacek@redhat.com>
1269
1270 PR c/82167
1271 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
1272 than expr.original_type.
1273
6836632e
NS
12742017-09-12 Nathan Sidwell <nathan@acm.org>
1275
1276 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1277 resort_sorted_fields): Moved from c-family/c-common.c.
1278 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
1279
e035be33
JM
12802017-09-01 Joseph Myers <joseph@codesourcery.com>
1281
1282 PR c/82071
1283 * c-typeck.c (build_atomic_assign): Handle argument with excess
1284 precision. Ensure any EXCESS_PRECISION_EXPR is present in
1285 argument passed to build_binary_op and convert_for_assignment but
1286 not for call to c_fully_fold.
1287 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
1288 Ensure build_binary_op is called with argument with original
1289 semantic type. Avoid calling c_fully_fold with an
1290 EXCESS_PRECISION_EXPR from build_binary_op.
1291
d2e05fcb
JJ
12922017-09-01 Jakub Jelinek <jakub@redhat.com>
1293
1294 PR c/81887
1295 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
1296
b397965c
RS
12972017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1298 Alan Hayward <alan.hayward@arm.com>
1299 David Sherwood <david.sherwood@arm.com>
1300
1301 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
1302 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
1303 m1 and m2 to the signed equivalent of a fixed-point
1304 SCALAR_TYPE_MODE.
1305
14e18d71
DM
13062017-08-24 David Malcolm <dmalcolm@redhat.com>
1307
1308 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
1309 than CAN_HAVE_LOCATION_P when determining whether to use the
1310 location_t value within "value".
1311
7f204c0f
DM
13122017-08-21 David Malcolm <dmalcolm@redhat.com>
1313
1314 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
1315 rather than peeking the location of the first token.
1316 * c-tree.h (c_expr::get_location): New method.
1317
2f687306
DM
13182017-08-21 David Malcolm <dmalcolm@redhat.com>
1319
1320 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
1321 to check_function_arguments.
1322
3e7b80d7
MP
13232017-08-18 Marek Polacek <polacek@redhat.com>
1324
1325 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
1326 commentary.
1327
00aa1fa2
L
13282017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1329
1330 PR c/53037
1331 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
1332 (check_bitfield_type_and_width): Don't allow bit-field with
1333 warn_if_not_aligned type.
1334
da67acb9
MS
13352017-08-14 Martin Sebor <msebor@redhat.com>
1336
1337 PR c/81117
1338 * c-objc-common.c (c_objc_common_init): Handle 'G'.
1339
bb85aa74
MP
13402017-08-11 Marek Polacek <polacek@redhat.com>
1341
1342 PR c/81795
1343 * c-decl.c (pushtag): Only print inform if the warning was printed.
1344 (grokdeclarator): Likewise.
1345
32129a17
DM
13462017-08-10 David Malcolm <dmalcolm@redhat.com>
1347
1348 * c-parser.c (c_parser_error): Rename to...
1349 (c_parser_error_richloc): ...this, making static, and adding
1350 "richloc" parameter, passing it to the c_parse_error call,
1351 rather than calling c_parser_set_source_position_from_token.
1352 (c_parser_error): Reintroduce, reimplementing in terms of the
1353 above, converting return type from void to bool.
1354 (class token_pair): New class.
1355 (struct matching_paren_traits): New struct.
1356 (matching_parens): New typedef.
1357 (struct matching_brace_traits): New struct.
1358 (matching_braces): New typedef.
1359 (get_matching_symbol): New function.
1360 (c_parser_require): Add param MATCHING_LOCATION, using it to
1361 highlight matching "opening" tokens for missing "closing" tokens.
1362 (c_parser_skip_until_found): Likewise.
1363 (c_parser_static_assert_declaration_no_semi): Convert explicit
1364 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
1365 class matching_parens, so that the pertinent open parenthesis is
1366 highlighted when there are problems locating the close
1367 parenthesis.
1368 (c_parser_struct_or_union_specifier): Likewise.
1369 (c_parser_typeof_specifier): Likewise.
1370 (c_parser_alignas_specifier): Likewise.
1371 (c_parser_simple_asm_expr): Likewise.
1372 (c_parser_braced_init): Likewise, for matching_braces.
1373 (c_parser_paren_condition): Likewise, for matching_parens.
1374 (c_parser_switch_statement): Likewise.
1375 (c_parser_for_statement): Likewise.
1376 (c_parser_asm_statement): Likewise.
1377 (c_parser_asm_operands): Likewise.
1378 (c_parser_cast_expression): Likewise.
1379 (c_parser_sizeof_expression): Likewise.
1380 (c_parser_alignof_expression): Likewise.
1381 (c_parser_generic_selection): Likewise.
1382 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
1383 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
1384 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
1385 In case CPP_OPEN_PAREN, pass loc_open_paren to the
1386 c_parser_skip_until_found call.
1387 (c_parser_objc_class_definition): Use class matching_parens as
1388 above.
1389 (c_parser_objc_method_decl): Likewise.
1390 (c_parser_objc_try_catch_finally_statement): Likewise.
1391 (c_parser_objc_synchronized_statement): Likewise.
1392 (c_parser_objc_at_property_declaration): Likewise.
1393 (c_parser_oacc_wait_list): Likewise.
1394 (c_parser_omp_var_list_parens): Likewise.
1395 (c_parser_omp_clause_collapse): Likewise.
1396 (c_parser_omp_clause_default): Likewise.
1397 (c_parser_omp_clause_if): Likewise.
1398 (c_parser_omp_clause_num_threads): Likewise.
1399 (c_parser_omp_clause_num_tasks): Likewise.
1400 (c_parser_omp_clause_grainsize): Likewise.
1401 (c_parser_omp_clause_priority): Likewise.
1402 (c_parser_omp_clause_hint): Likewise.
1403 (c_parser_omp_clause_defaultmap): Likewise.
1404 (c_parser_oacc_single_int_clause): Likewise.
1405 (c_parser_omp_clause_ordered): Likewise.
1406 (c_parser_omp_clause_reduction): Likewise.
1407 (c_parser_omp_clause_schedule): Likewise.
1408 (c_parser_omp_clause_num_teams): Likewise.
1409 (c_parser_omp_clause_thread_limit): Likewise.
1410 (c_parser_omp_clause_aligned): Likewise.
1411 (c_parser_omp_clause_linear): Likewise.
1412 (c_parser_omp_clause_safelen): Likewise.
1413 (c_parser_omp_clause_simdlen): Likewise.
1414 (c_parser_omp_clause_depend): Likewise.
1415 (c_parser_omp_clause_map): Likewise.
1416 (c_parser_omp_clause_device): Likewise.
1417 (c_parser_omp_clause_dist_schedule): Likewise.
1418 (c_parser_omp_clause_proc_bind): Likewise.
1419 (c_parser_omp_clause_uniform): Likewise.
1420 (c_parser_omp_for_loop): Likewise.
1421 (c_parser_cilk_clause_vectorlength): Likewise.
1422 (c_parser_cilk_clause_linear): Likewise.
1423 (c_parser_transaction_expression): Likewise.
1424 * c-parser.h (c_parser_require): Add param matching_location with
1425 default UNKNOWN_LOCATION.
1426 (c_parser_error): Convert return type from void to bool.
1427 (c_parser_skip_until_found): Add param matching_location with
1428 default UNKNOWN_LOCATION.
1429
30af3a2b
MP
14302017-08-09 Marek Polacek <polacek@redhat.com>
1431
1432 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
1433 * c-tree.h (build_external_ref): Update declaration.
1434 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
1435 (build_external_ref): Change the type of a parameter to bool.
1436 (parser_build_binary_op): Use true/false instead of 1/0.
1437 (pointer_diff): Likewise.
1438 (build_modify_expr): Likewise.
1439 (set_designator): Change the type of a parameter to bool.
1440 (set_init_index): Use true/false instead of 1/0.
1441 (set_init_label): Likewise.
1442 (output_init_element): Change the type of a parameter to bool.
1443 (output_pending_init_elements): Use true/false instead of 1/0.
1444 (process_init_element): Likewise.
1445 (build_binary_op): Change the type of a parameter to bool.
1446
296c53ac
MP
14472017-08-09 Marek Polacek <polacek@redhat.com>
1448
1449 PR c/81233
1450 * c-typeck.c (pedwarn_init): Make the function take a variable list.
1451 Call emit_diagnostic_valist instead of pedwarn.
1452 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
1453 Print the relevant types in diagnostics.
1454
a32c8316
MP
14552017-08-09 Marek Polacek <polacek@redhat.com>
1456
1457 PR c/81417
1458 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
1459 build_conditional_expr.
1460 * c-parser.c (c_parser_conditional_expression): Create locations for
1461 EXP1 and EXP2 from their source ranges. Pass the locations down to
1462 build_conditional_expr.
1463 * c-tree.h (build_conditional_expr): Update declaration.
1464 * c-typeck.c (build_conditional_expr): Add location_t parameters.
1465 For -Wsign-compare, also print the types.
1466
314e6352
ML
14672017-08-08 Martin Liska <mliska@suse.cz>
1468
1469 * c-convert.c: Include header files.
1470 * c-typeck.c: Likewise.
1471
577eec56
ML
14722017-08-07 Martin Liska <mliska@suse.cz>
1473
1474 * c-parser.c (c_parser_attributes): Canonicalize name of an
1475 attribute.
1476
f7b6353a
MP
14772017-08-02 Marek Polacek <polacek@redhat.com>
1478
1479 PR c/81289
1480 * c-parser.c (c_parser_unary_expression): Use set_error.
1481
8a6eab34
MP
1482 PR c/81448
1483 PR c/81306
1484 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
1485 warnings. Avoid walking MACRO_MAP_LOCATIONS.
1486
7fef86d3
JH
14872017-07-31 Jan Hubicka <hubicka@ucw.cz>
1488 Martin Liska <mliska@suse.cz>
1489
1490 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 1491 statement.
7fef86d3 1492
f34ebeb2
ML
14932017-07-31 Martin Liska <mliska@suse.cz>
1494
1495 PR sanitize/81530
1496 * c-convert.c (convert): Guard condition with flag_sanitize_p
1497 also with current_function_decl non-null equality.
1498 * c-decl.c (grokdeclarator): Likewise.
1499 * c-typeck.c (build_binary_op): Likewise.
1500
8595f67b
MP
15012017-07-25 Marek Polacek <polacek@redhat.com>
1502
1503 * c-decl.c (grokfield): Remove local variable.
1504
d49718d6
MP
15052017-07-25 Marek Polacek <polacek@redhat.com>
1506
1507 PR c/81364
1508 * c-parser.c (c_parser_else_body): Don't warn about multistatement
1509 macro expansion if the body is in { }.
1510 (c_parser_while_statement): Likewise.
1511 (c_parser_for_statement): Likewise.
1512
ff22eb12
NS
15132017-07-18 Nathan Sidwell <nathan@acm.org>
1514
1515 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
1516
eea77d1f
DM
15172017-07-14 David Malcolm <dmalcolm@redhat.com>
1518
1519 * c-decl.c (implicitly_declare): When suggesting a missing
1520 #include, provide a fix-it hint.
1521
b6f43128
DM
15222017-07-06 David Malcolm <dmalcolm@redhat.com>
1523
1524 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
1525 and call that instead.
1526 * c-tree.h (selftest::run_c_tests): New decl.
1527
3e2becc4
MP
15282017-06-26 Marek Polacek <polacek@redhat.com>
1529
1530 PR c/80116
1531 * c-parser.c (c_parser_if_body): Set the location of the
1532 body of the conditional after parsing all the labels. Call
1533 warn_for_multistatement_macros.
1534 (c_parser_else_body): Likewise.
1535 (c_parser_switch_statement): Likewise.
1536 (c_parser_while_statement): Likewise.
1537 (c_parser_for_statement): Likewise.
1538 (c_parser_statement): Add a default argument. Save the location
1539 after labels have been parsed.
1540 (c_parser_c99_block_statement): Likewise.
1541
343ae898
RB
15422017-06-19 Richard Biener <rguenther@suse.de>
1543
1544 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1545 negated _Literals to parse _Literal (int) -1.
1546
45b2222a
ML
15472017-06-13 Martin Liska <mliska@suse.cz>
1548
1549 PR sanitize/78204
1550 * c-convert.c (convert): Use sanitize_flags_p.
1551 * c-decl.c (grokdeclarator): Likewise.
1552 * c-typeck.c (convert_for_assignment): Likewise.
1553 (c_finish_return): Likewise.
1554 (build_binary_op): Likewise.
1555
8ab7005b
JJ
15562017-06-08 Jakub Jelinek <jakub@redhat.com>
1557
1558 PR c/81006
1559 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
1560 to sizetype before size_binop.
1561
363dc72c
JJ
15622017-06-07 Jakub Jelinek <jakub@redhat.com>
1563
1564 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
1565 of TDI_generic.
1566
dc949728
MP
15672017-06-06 Marek Polacek <polacek@redhat.com>
1568
1569 PR c/79983
1570 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
1571 ref.
1572 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
1573
40ffd95f
BE
15742017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1575
1576 * c-parser.c (c_parser_binary_expression): Implement the
1577 -Wsizeof_pointer_div warning.
1578 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
1579 from a parenthesized expression.
1580 (c_parser_expr_list): Use c_last_sizeof_loc.
1581 * c-tree.h (c_last_sizeof_loc): New external.
1582 * c-typeck.c (c_last_sizeof_loc): New variable.
1583 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
1584
9fc5e7a4
MM
15852017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
1586
1587 PR testsuite/80580
1588 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
1589
f012c8ef
DM
15902017-05-30 David Malcolm <dmalcolm@redhat.com>
1591
1592 * c-objc-common.c (c_tree_printer): Gain bool and const char **
1593 parameters.
1594
3cd211af
MS
15952017-05-24 Martin Sebor <msebor@redhat.com>
1596
1597 PR c/80731
1598 * c-fold.c (c_fully_fold_internal): Adjust.
1599 * c-typeck.c (parser_build_unary_op): Adjust.
1600
fd71a9a2
TS
16012017-05-23 Thomas Schwinge <thomas@codesourcery.com>
1602
1603 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
1604 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
1605 "VECTOR_LENGTH".
1606
92fa0f9e
MP
16072017-05-23 Marek Polacek <polacek@redhat.com>
1608
1609 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
1610 quotes.
1611
d11c168a
JJ
16122017-05-22 Jakub Jelinek <jakub@redhat.com>
1613
1614 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
1615 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
1616 it returned invariant. Call tree_invariant_p unconditionally
1617 afterwards to decide whether to return expr or op0.
1618
58aca9d9
NS
16192017-05-22 Nathan Sidwell <nathan@acm.org>
1620
1621 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
1622
7fd549d2
TS
16232017-05-19 Thomas Schwinge <thomas@codesourcery.com>
1624
1625 * c-parser.c (c_parser_omp_clause_default): Handle
1626 "OMP_CLAUSE_DEFAULT_PRESENT".
1627
6ecd2339
BE
16282017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1629
1630 * config-lang.in (gtfiles): Add c-family/c-format.c.
1631
8a57ecff
NS
16322017-05-18 Nathan Sidwell <nathan@acm.org>
1633
1634 * c-decl.c (pushdecl_top_level): Delete unused function.
1635
6574d78e
MP
16362017-05-18 Marek Polacek <polacek@redhat.com>
1637
1638 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
1639 (check_earlier_gotos): Likewise.
1640 (define_label): Likewise.
1641 (pending_xref_error): Likewise.
1642 (smallest_type_quals_location): Likewise.
1643 (grokdeclarator): Likewise.
1644 (grokparms): Likewise.
1645 (identifier_global_value): Likewise.
1646 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
1647 (find_init_member): Likewise.
1648
e3455240
MP
16492017-05-18 Marek Polacek <polacek@redhat.com>
1650
1651 * c-decl.c (start_decl): Use false/true instead of 0/1.
1652 (grokdeclarator): Likewise.
1653 (finish_struct): Likewise.
1654 (start_function): Change the return type to bool. Use false/true
1655 instead of 0/1.
1656 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
1657 * c-tree.h (start_function): Update.
1658 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
1659 (set_designator): Change the return type to bool. Use false/true
1660 instead of 0/1.
1661
3fa8871b
MP
16622017-05-17 Marek Polacek <polacek@redhat.com>
1663
1664 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
1665 * c-typeck.c: Likewise.
1666
142473df
MP
16672017-05-17 Marek Polacek <polacek@redhat.com>
1668
1669 PR sanitizer/80659
1670 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
1671 DECL_IGNORED_P even for non-static compound literals.
1672
1a817418
ML
16732017-05-17 Martin Liska <mliska@suse.cz>
1674
1675 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1676 use it instead of int type.
1677
b2fa0a8b
MP
16782017-05-17 Marek Polacek <polacek@redhat.com>
1679
1680 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
1681 call c_fully_fold.
1682 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
1683 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
1684 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1685 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1686 save_expr.
1687 (c_parser_conditional_expression): Likewise.
1688 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1689 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1690 (process_init_element): Likewise.
1691 (build_binary_op): Likewise.
1692 (handle_omp_array_sections_1): Likewise.
1693
1e47f02b
TS
16942017-05-12 Thomas Schwinge <thomas@codesourcery.com>
1695
1696 * c-parser.c (c_parser_omp_clause_num_gangs)
1697 (c_parser_omp_clause_num_workers)
1698 (c_parser_omp_clause_vector_length): Merge functions into...
1699 (c_parser_oacc_single_int_clause): ... this new function. Adjust
1700 all users.
1701
c24e924f
NS
17022017-05-11 Nathan Sidwell <nathan@acm.org>
1703
1704 * gimple-parser.c: Don't #include tree-dump.h.
1705
c587104e
MM
17062017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1707
1708 PR testsuite/80580
1709 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
1710
67ac9a9d
MM
17112017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1712
1713 PR testsuite/80580
1714 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1715 incorrect __MEM syntax.
1716
ac4eb40f
MM
17172017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1718
1719 PR testsuite/80580
1720 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1721 type of unary '*'.
1722
641da50a
NS
17232017-05-09 Nathan Sidwell <nathan@acm.org>
1724
1725 * c-tree.h (pushdecl): Declare.
1726
56d35585
DM
17272017-05-05 David Malcolm <dmalcolm@redhat.com>
1728
1729 * c-decl.c (warn_defaults_to): Replace report_diagnostic
1730 with diagnostic_report_diagnostic.
1731 * c-errors.c (pedwarn_c99): Likewise.
1732 (pedwarn_c90): Likewise.
1733
815d9cc6
XR
17342017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1735
92a285c1 1736 PR c++/80038
815d9cc6
XR
1737 * c-gimplify.c (c_gimplify_expr): Remove calls to
1738 cilk_gimplifY_call_params_in_spawned_fn.
1739
1c4ea66f
DM
17402017-04-25 David Malcolm <dmalcolm@redhat.com>
1741
1742 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1743 hint for removing extra semicolon.
1744
666f7903
JJ
17452017-04-21 Jakub Jelinek <jakub@redhat.com>
1746
1747 PR c/80468
1748 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
1749 enabled, set specs->type to integer_type_node.
1750
5764ee3c
JW
17512017-04-03 Jonathan Wakely <jwakely@redhat.com>
1752
1753 * c-array-notation.c: Fix typo in comment.
1754
10fa8dfb
MP
17552017-03-29 Marek Polacek <polacek@redhat.com>
1756
1757 PR c/79730
1758 * c-decl.c (finish_decl): Check VAR_P.
1759
a9e4a1a5
JJ
17602017-03-27 Jakub Jelinek <jakub@redhat.com>
1761
1762 PR middle-end/80162
1763 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1764 * c-typeck.c (c_mark_addressable): Likewise. Look through
1765 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1766 to ARRAY_TYPE.
1767 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
1768
ee3ff394
MP
17692017-03-23 Marek Polacek <polacek@redhat.com>
1770
1771 * c-tree.h: Remove a C_RID_YYCODE reference.
1772
4d1b8e70
JJ
17732017-03-21 Jakub Jelinek <jakub@redhat.com>
1774
1775 PR c/80097
1776 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
1777 optional COMPOUND_EXPR with ubsan instrumentation.
1778
31dc71a8
MP
17792017-03-17 Marek Polacek <polacek@redhat.com>
1780
1781 * c-parser.c: Add C11 references.
1782
d579c385
MP
17832017-03-15 Marek Polacek <polacek@redhat.com>
1784
1785 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
1786
85059a38
MP
17872017-03-11 Marek Polacek <polacek@redhat.com>
1788
1789 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
1790
2f6f187a
DM
17912017-03-10 David Malcolm <dmalcolm@redhat.com>
1792
1793 PR translation/79848
1794 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1795 "%qs".
1796 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1797
36618428
MP
17982017-03-09 Marek Polacek <polacek@redhat.com>
1799
1800 PR sanitizer/79757
1801 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1802 parameter declarations with initializers.
1803
01e5af5a
JJ
18042017-03-09 Jakub Jelinek <jakub@redhat.com>
1805
1806 PR c/79969
1807 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
1808 TYPE_STUB_DECL.
1809
a71dbc63
JJ
18102017-03-07 Jakub Jelinek <jakub@redhat.com>
1811
1812 PR c/79834
1813 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1814 for "may only be used in compound statements" diagnostics, change it
1815 such that the same translatable string is used for all pragmas. For
1816 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1817 diagnostics.
1818 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1819 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1820 "may only be used in compound statements" diagnostics, such that the
1821 same translatable string is used for all pragmas.
1822
1ff4bae6
MP
18232017-03-04 Marek Polacek <polacek@redhat.com>
1824
1825 PR c/79847
1826 * c-decl.c (implicit_decl_warning): Add missing space.
1827
7f5a7d78
MP
18282017-03-03 Marek Polacek <polacek@redhat.com>
1829
1830 PR c/79758
1831 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1832 current_function_prototype_arg_types is error_mark_node. Fix
1833 formatting. Use TREE_VALUE instead of TREE_TYPE.
1834
883c8f06
JJ
18352017-03-03 Jakub Jelinek <jakub@redhat.com>
1836
79c9b7a8
JJ
1837 PR c/79837
1838 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1839 %<min%> or %<max%> in the diagnostics, instead mention identifier.
1840 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1841 diagnostics.
1842
883c8f06
JJ
1843 PR c/79836
1844 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1845 instead of %<_Generic>.
1846 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1847 (c_parser_omp_target_exit_data): Use %<release%> instead of
1848 %<release>.
1849
324ff1a0
JJ
18502017-02-28 Jakub Jelinek <jakub@redhat.com>
1851
1852 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1853 instead of just cond ? "..." : "...".
1854 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1855 for "enter"/"exit" keyword.
1856 (c_finish_oacc_routine): Don't use %s to supply portions of the
1857 message.
1858
4227c9ad
JJ
18592017-02-24 Jakub Jelinek <jakub@redhat.com>
1860
1861 PR c++/79588
1862 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1863 handle -Wrestrict here.
1864 * c-typeck.c (build_function_call_vec): Adjust
1865 check_function_arguments caller.
1866
5d972e66
RB
18672017-02-23 Richard Biener <rguenther@suse.de>
1868
1869 PR c/79684
1870 * gimple-parser.c (c_parser_gimple_statement): Use set_error
1871 to initialize c_exprs to return.
1872 (c_parser_gimple_binary_expression): Likewise.
1873 (c_parser_gimple_unary_expression): Likewise.
1874 (c_parser_gimple_postfix_expression): Likewise.
1875
61ac5ebe
MP
18762017-02-22 Marek Polacek <polacek@redhat.com>
1877
1878 PR c/79662
1879 * c-typeck.c (convert_arguments): Handle error_mark_node.
1880
41d1b0b1
PK
18812017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1882
1883 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1884 value of c_parser_parse_ssa_name against error_mark_node and emit
1885 error if ssa name is anonymous and written as default definition.
1886
eab1f169
PK
18872017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1888
1889 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1890 FMA_EXPR.
1891
bcac0b4d
JJ
18922017-02-16 Jakub Jelinek <jakub@redhat.com>
1893
1894 PR c++/79512
1895 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1896 ignore #pragma omp target even when not followed by identifier.
1897
1be33173
PK
18982017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1899
1900 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1901 (c_parser_gimple_unary_expression): Likewise.
1902
aa326bfb
JJ
19032017-02-13 Jakub Jelinek <jakub@redhat.com>
1904
1905 * c-parser.c (c_parser_oacc_declare): Add missing space in
1906 diagnostics.
1907
8a398bc5
PK
19082017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1909
1910 PR c/79478
1911 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1912 set_c_expr_source_range when parsing ssa-name.
1913
3dcde5ef
PG
19142017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
1915 Richard Biener <rguenther@suse.de>
1916
1917 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1918 building IL when arguments are error_mark_node.
1919 (c_parser_gimple_unary_expression): Likewise.
1920 (c_parser_gimple_if_stmt): Likewise.
1921 (c_parser_gimple_switch_stmt): Likewise.
1922 (c_parser_gimple_return_stmt): Likewise.
1923 (c_parser_parse_ssa_name): When name lookup fails do not build
1924 an SSA name. Use undeclared rather than not declared in error
1925 reporting.
1926
192b048b
MP
19272017-02-09 Marek Polacek <polacek@redhat.com>
1928
1929 PR c/79428
1930 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1931 instead of c_parser_skip_until_found.
1932
56f71478
JJ
19332017-02-09 Jakub Jelinek <jakub@redhat.com>
1934
1935 PR c/79431
1936 * c-parser.c (c_parser_omp_declare_target): Don't invoke
1937 symtab_node::get on automatic variables.
1938
02889d23
CLT
19392016-02-09 Nathan Sidwell <nathan@codesourcery.com>
1940 Chung-Lin Tang <cltang@codesourcery.com>
1941
1942 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1943 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1944 semantic checking.
1945 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1946
7af4b20d
RB
19472017-02-07 Richard Biener <rguenther@suse.de>
1948
1949 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1950 (c_parser_gimple_postfix_expression_after_primary):
1951 Do not use c_build_function_call_vec to avoid folding and promotion.
1952 Simplify.
1953
e5e391d6
MO
19542017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1955
1956 PR lto/79061
1957 * c-decl.c (pop_scope): Pass main_input_filename to
1958 build_translation_unit_decl.
1959
c2e84327
DM
19602017-01-24 David Malcolm <dmalcolm@redhat.com>
1961
1962 * c-parser.c: Include "read-rtl-function.h" and
1963 "run-rtl-passes.h".
1964 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
1965 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
1966 production. Update for renaming of field "gimple_pass" to
1967 "gimple_or_rtl_pass". If __RTL was seen, call
1968 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
1969 to an auto_timevar, to cope with early exit.
1970 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1971 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1972 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1973 Handle RID_RTL.
1974 (c_parser_parse_rtl_body): New function.
1975 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1976 (struct c_declspecs): Rename field "gimple_pass" to
1977 "gimple_or_rtl_pass". Add field "rtl_p".
1978 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1979 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1980 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1981 (c_parser_gimple_or_rtl_pass_list): ...this.
1982
2ebd93e1
MP
19832017-01-20 Marek Polacek <polacek@redhat.com>
1984
1985 PR c/64279
1986 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1987
b1c95bb5
RB
19882017-01-13 Richard Biener <rguenther@suse.de>
1989
1990 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1991 nops.
1992
25329913
RB
19932017-01-13 Richard Biener <rguenther@suse.de>
1994
1995 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1996 _Literal ( type-name ) number.
1997
6bb4ea5c
RB
19982017-01-12 Richard Biener <rguenther@suse.de>
1999
2000 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2001 __MEM.
2002
6b5b4e9c
JJ
20032017-01-11 Jakub Jelinek <jakub@redhat.com>
2004
2005 PR c++/72813
2006 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
2007 PCH file.
2008
e3252775
RB
20092017-01-11 Richard Biener <rguenther@suse.de>
2010
2011 PR bootstrap/79052
2012 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
2013 returns on parse errors.
2014
a9342885
MP
20152017-01-04 Marek Polacek <polacek@redhat.com>
2016
2017 PR c++/64767
2018 * c-parser.c (c_parser_postfix_expression): Mark zero character
2019 constants by setting original_type in c_expr.
2020 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
2021 with a zero character constant.
2022 (char_type_p): New function.
2023
5dd9a9d0
DM
20242017-01-04 David Malcolm <dmalcolm@redhat.com>
2025
2026 * c-parser.c (c_parser_declaration_or_fndef): Create a
2027 rich_location at init_loc and parse it to start_init.
2028 (last_init_list_comma): New global.
2029 (c_parser_braced_init): Update last_init_list_comma when parsing
2030 commas. Pass it to pop_init_level. Pass location of closing
2031 brace to pop_init_level.
2032 (c_parser_postfix_expression_after_paren_type): Create a
2033 rich_location at type_loc and parse it to start_init.
2034 (c_parser_omp_declare_reduction): Likewise for loc.
2035 * c-tree.h (start_init): Add rich_location * param.
2036 (pop_init_level): Add location_t param.
2037 * c-typeck.c (struct initializer_stack): Add field
2038 "missing_brace_richloc".
2039 (start_init): Add richloc param, use it to initialize
2040 the stack node's missing_brace_richloc.
2041 (last_init_list_comma): New decl.
2042 (finish_implicit_inits): Pass last_init_list_comma to
2043 pop_init_level.
2044 (push_init_level): When finding missing open braces, add fix-it
2045 hints to the richloc.
2046 (pop_init_level): Add "insert_before" param and pass it
2047 when calling pop_init_level. Add fixits about missing
2048 close braces to any richloc. Use the richloc for the
2049 -Wmissing-braces warning.
2050 (set_designator): Pass last_init_list_comma to pop_init_level.
2051 (process_init_element): Likewise.
2052
cbe34bb5
JJ
20532017-01-01 Jakub Jelinek <jakub@redhat.com>
2054
2055 Update copyright years.
2056
d17680f3
JJ
20572016-12-21 Jakub Jelinek <jakub@redhat.com>
2058
0dba7960
JJ
2059 PR bootstrap/78817
2060 * c-typeck.c (build_function_call_vec): If check_function_arguments
2061 returns true, set TREE_NO_WARNING on CALL_EXPR.
2062
d17680f3
JJ
2063 PR c/77767
2064 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
2065 to *expr instead of overwriting it.
2066
aa90531e
RB
20672016-12-20 Richard Biener <rguenther@suse.de>
2068
2069 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
2070 error recovery.
2071 (c_parser_gimple_statement): Only build assigns for non-error
2072 stmts.
2073 (c_parser_gimple_postfix_expression_after): Improve error recovery.
2074
629b3d75
MJ
20752016-12-14 Martin Jambor <mjambor@suse.cz>
2076
2077 * c-parser.c: Include omp-general.h and omp-offload.h instead of
2078 omp-low.h.
2079 (c_finish_oacc_routine): Adjusted call to
2080 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
2081 to use their new names.
2082 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
2083 use its new name.
2084 (c_parser_oacc_update): Likewise.
2085 (c_parser_omp_simd): Likewise.
2086 (c_parser_omp_target_update): Likewise.
2087 * c-typeck.c: Include omp-general.h instead of omp-low.h.
2088 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
2089 name.
2090 (c_finish_omp_cancellation_point): Likewise.
2091 * gimple-parser.c: Do not include omp-low.h
2092
c5af52eb
CP
20932016-12-02 Cesar Philippidis <cesar@codesourcery.com>
2094 James Norris <jnorris@codesourcery.com>
2095
2096 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
2097 EXIT_DATA,WAIT} are not used in compound statements.
2098 (c_parser_oacc_enter_exit_data): Update diagnostics.
2099
48330c93
BE
21002016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2101
2102 PR c++/71973
2103 * c-decl.c (diagnose_mismatched_decls): Use
2104 OPT_Wbuiltin_declaration_mismatch here too.
2105
899ca90e 21062016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
2107 Alan Hayward <alan.hayward@arm.com>
2108 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
2109
2110 * c-decl.c (merge_decls): Use SET_DECL_MODE.
2111 (make_label, finish_struct): Likewise.
2112
1ee62b92 21132016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 2114 Richard Biener <rguenther@suse.de>
22b15758 2115
8e745a17
JJ
2116 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
2117 * config-lang.in (gtfiles): Add c/c-parser.h.
2118 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
2119 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
2120 * c-parser.c (enum c_id_kind, struct c_token,
2121 c_parser_next_token_is, c_parser_next_token_is_not,
2122 c_parser_next_token_is_keyword,
2123 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
2124 Split out to ...
2125 * c-parser.h: ... new header.
2126 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 2127 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
2128 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2129 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2130 c_parser_error, c_parser_require, c_parser_skip_until_found,
2131 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2132 c_parser_type_name): Export.
2133 (c_parser_tokens_buf): New function.
2134 (c_parser_error): Likewise.
2135 (c_parser_set_error): Likewise.
2136 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
2137 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
2138 via c_parser_parse_gimple_body.
8e745a17
JJ
2139 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
2140 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2141 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2142 c_parser_error, c_parser_require, c_parser_skip_until_found,
2143 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2144 c_parser_type_name): Declare.
1ee62b92
PG
2145 (struct c_parser): Declare forward.
2146 (c_parser_tokens_buf): Declare.
8e745a17
JJ
2147 (c_parser_error): Likewise.
2148 (c_parser_set_error): Likewise.
2149 * gimple-parser.c: New file.
2150 * gimple-parser.h: Likewise.
1ee62b92 2151
22b15758
UB
21522016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2153
2154 PR c/35503
2155 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2156 warn_for_restrict.
2157
84ff4775
LCW
21582016-09-11 Le-Chun Wu <lcwu@google.com>
2159 Mark Wielaard <mjw@redhat.com>
2160
2161 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
2162 to the given -Wshadow= variant.
2163
4d0cdd0c
TP
21642016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2165
2166 * c-typeck.c: Include memmodel.h.
2167
1202f33e
JJ
21682016-10-13 Jakub Jelinek <jakub@redhat.com>
2169
2170 PR target/77957
2171 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
2172 instead of lhd_return_null_tree_v.
2173
8a14afd0
BS
21742016-10-07 Bernd Schmidt <bschmidt@redhat.com>
2175
2176 PR c++/69733
2177 * c-decl.c (smallest_type_quals_location): New static function.
2178 (grokdeclarator): Try to find the correct location for an ignored
2179 qualifier.
2180
81fea426
MP
21812016-09-26 Marek Polacek <polacek@redhat.com>
2182
2183 PR c/7652
2184 * c-decl.c (pop_scope): Add gcc_fallthrough.
2185
21862016-09-26 Marek Polacek <polacek@redhat.com>
2187
2188 PR c/7652
2189 * c-parser.c (struct c_token): Add flags field.
2190 (c_lex_one_token): Pass it to c_lex_with_flags.
2191 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
2192 into IFN_FALLTHROUGH.
2193 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
2194 attribute fallthrough after a case label or default label.
2195 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
2196
9a2300e9
MP
21972016-09-24 Marek Polacek <polacek@redhat.com>
2198
2199 PR c/77490
2200 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
2201 have boolean value. Warn about ++/-- on booleans.
2202
7de76362
JJ
22032016-09-23 Jakub Jelinek <jakub@redhat.com>
2204
2205 * c-parser.c (incomplete_record_decls): Remove unnecessary
2206 = vNULL initialization of file scope vec.
2207
5b73d2ab
MP
22082016-09-16 Marek Polacek <polacek@redhat.com>
2209
2210 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
2211
e51fbec3
MP
22122016-09-14 Marek Polacek <polacek@redhat.com>
2213
2214 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
2215 (fix_array_notation_expr): Likewise.
2216 * c-decl.c (finish_decl): Likewise.
2217 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2218 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
2219 (function_to_pointer_conversion): Use false instead of 0.
2220 (convert_lvalue_to_rvalue): Likewise.
2221 (parser_build_unary_op): Likewise.
2222 (build_atomic_assign): Likewise.
2223 (build_unary_op): Change nonconvert parameter type to bool, use
2224 true/false instead of 1/0.
2225 (build_binary_op): Use true instead of 1.
2226
254830ba
DM
22272016-09-13 David Malcolm <dmalcolm@redhat.com>
2228
2229 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
2230 of add_fixit_insert to add_fixit_insert_before.
2231
4c13ba17
MP
22322016-09-13 Marek Polacek <polacek@redhat.com>
2233
2234 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
2235 it.
2236
54dcdb88
BE
22372016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
2238
2239 PR c++/77496
2240 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
2241 COMPOUND_EXPR to warn_for_omitted_condop.
2242
e5106e27
DM
22432016-09-07 David Malcolm <dmalcolm@redhat.com>
2244
2245 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
2246 c_get_substring_location for this new langhook.
2247
9dc5773f
JJ
22482016-09-02 Jakub Jelinek <jakub@redhat.com>
2249
2250 PR c/65467
2251 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
2252 flag_openmp.
2253 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
2254 instead of mark_exp_read on low_bound/length expression.
2255 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
2256 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2257 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2258 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
2259 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
2260 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
2261 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
2262 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
2263 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
2264 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
2265 instead of mark_expr_read.
2266 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
2267 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
2268 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
2269 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
2270 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
2271 array section bases outside of depend clause, for depend clause
2272 use convert_lvalue_to_rvalue on the base.
2273 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
2274 linear, aligned, map, to and from clauses.
2275 (c_omp_clause_copy_ctor): New function.
2276
295844f6
MP
22772016-09-01 Marek Polacek <polacek@redhat.com>
2278
2279 PR c/7652
2280 * c-typeck.c (composite_type): Add FALLTHRU comment.
2281
089af25c
DM
22822016-08-31 David Malcolm <dmalcolm@redhat.com>
2283
2284 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
2285 to the insertion fixits for "struct", "union", and "enum".
2286
f9087798
DM
22872016-08-30 David Malcolm <dmalcolm@redhat.com>
2288
2289 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
2290 rather than add_fixit_misspelled_id.
2291 (undeclared_variable): Likewise.
2292 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
2293 now-redundant "here" params from add_fixit_insert method calls.
2294 (c_parser_parameter_declaration): Likewise.
2295 * c-typeck.c (build_component_ref): Remove now-redundant range
2296 param from add_fixit_replace method calls.
2297
ebef225f
MP
22982016-08-25 Marek Polacek <polacek@redhat.com>
2299
2300 * c-typeck.c (parser_build_binary_op): Pass LHS to
2301 warn_logical_not_parentheses.
2302
fe377a48
MP
23032016-08-25 Marek Polacek <polacek@redhat.com>
2304
2305 PR c/77323
2306 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
2307 or _FloatN or _FloatNx is not supported.
2308 (finish_declspecs): Set type to integer_type_node when _FloatN or
2309 _FloatNx is not supported.
2310
c65699ef
JM
23112016-08-19 Joseph Myers <joseph@codesourcery.com>
2312
2313 PR c/32187
2314 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
2315 (struct c_declspecs): Add field floatn_nx_idx.
2316 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
2317 and _FloatNx type specifiers.
2318 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
2319 (c_parser_declspecs, c_parser_attribute_any_word)
2320 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
2321 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
2322 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
2323 narrower than double.
2324
2f1364c2
JJ
23252016-08-12 Jakub Jelinek <jakub@redhat.com>
2326 Martin Liska <mliska@suse.cz>
2327
2328 PR c/67410
2329 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
2330 % to determine val element to change. Assert that
2331 wchar_bytes * charwidth fits into val array.
2332
191816a3
MP
23332016-08-12 Marek Polacek <polacek@redhat.com>
2334
2335 PR c/7652
2336 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
2337 (c_parser_postfix_expression): Likewise.
2338 * c-typeck.c (build_unary_op): Adjust fall through comment.
2339 (c_mark_addressable): Likewise.
2340
b95a64bb
JJ
23412016-08-11 Jakub Jelinek <jakub@redhat.com>
2342
2343 PR c/72816
2344 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
2345 array member through typedef, for orig_qual_indirect == 0 clear
2346 orig_qual_type.
2347
895aa8e1
DM
23482016-08-08 David Malcolm <dmalcolm@redhat.com>
2349
2350 PR c/64955
2351 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
2352 this up to selftest::run_c_tests.
2353 (selftest::run_c_tests): New function.
2354
0b212d8c
TS
23552016-08-04 Thomas Schwinge <thomas@codesourcery.com>
2356
ae9281fc
TS
2357 * c-parser.c (struct oacc_routine_data): Add error_seen and
2358 fndecl_seen members.
2359 (c_finish_oacc_routine): Use these.
2360 (c_parser_declaration_or_fndef): Adjust.
2361 (c_parser_oacc_routine): Likewise. Support more C language
2362 constructs, and improve diagnostics. Move pragma context
2363 checking...
2364 (c_parser_pragma): ... here.
2365
0b212d8c
TS
2366 * c-parser.c (struct oacc_routine_data): New.
2367 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
2368 Simplify code.
2369 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
2370 declare target" attribute.
2371
76e2c821
JB
23722016-08-01 Jan Beulich <jbeulich@suse.com>
2373
2374 * c-fold.c (c_fully_fold_internal): Also emit shift count
2375 warnings for vector types.
2376 * c-typeck.c (build_binary_op): Likewise.
2377
f618a472
MP
23782016-07-29 Marek Polacek <polacek@redhat.com>
2379
2380 PR c/71742
2381 * c-decl.c (finish_struct): Rephrase an error message.
2382
efd0786f
MP
2383 PR c/71853
2384 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
2385 to error node for invalid code.
2386
e00dceaf
MP
2387 PR c/71573
2388 * c-decl.c (implicitly_declare): Return decl early not only for
2389 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
2390
673a107a
JJ
23912016-07-29 Jakub Jelinek <jakub@redhat.com>
2392
2393 PR c/71969
2394 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
2395 on GNU extern inline functions.
2396
a5b5c8b6
MP
23972016-07-29 Marek Polacek <polacek@redhat.com>
2398
2399 PR c/71583
2400 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
2401 check expr.value.
2402
e3fe09c1
UB
24032016-07-22 Uros Bizjak <ubizjak@gmail.com>
2404
2405 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
2406
7c8f7eaa
DM
24072016-07-20 David Malcolm <dmalcolm@redhat.com>
2408
2409 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
2410 spellcheck-tree.h
2411 (best_macro_match): Likewise, converting from a typedef to a
2412 subclass.
2413 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
2414 (lookup_name_fuzzy): Update for change of best_macro_match to a
2415 subclass with a ctor that calls cpp_forall_identifiers.
2416
de6a69ee
DM
24172016-07-20 David Malcolm <dmalcolm@redhat.com>
2418
2419 * c-decl.c (implicit_decl_warning): Update for conversion of
2420 return type of lookup_name_fuzzy to const char *.
2421 (undeclared_variable): Likewise.
2422 (lookup_name_fuzzy): Convert return type from tree to
2423 const char *.
2424 * c-parser.c (c_parser_declaration_or_fndef): Update for
2425 conversion of return type of lookup_name_fuzzy to const char *.
2426 (c_parser_parameter_declaration): Likewise.
2427
b1c9c068
CP
24282016-07-15 Cesar Philippidis <cesar@codesourcery.com>
2429
2430 * c-parser.c (c_parser_oacc_declare): Don't scan for
2431 GOMP_MAP_POINTER.
2432 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
2433 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
2434 zero-length subarrays.
2435
ddbbcb19
JJ
24362016-07-15 Jakub Jelinek <jakub@redhat.com>
2437
2438 PR c/71858
2439 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
2440 instead of FUZZY_LOOKUP_NAME.
2441 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
2442 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
2443
dd36b877
JJ
24442016-07-14 Jakub Jelinek <jakub@redhat.com>
2445
2446 PR c/71858
2447 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
2448
8c681247
TS
24492016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2450
2451 * c-parser.c (c_parser_generic_selection): Make type of variable
2452 auto_vec.
2453 (c_parser_omp_declare_simd): Likewise.
2454
bf4fa671
TS
24552016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2456
2457 * c-decl.c (struct c_struct_parse_info): Change member types
2458 from vec to auto_vec.
2459 (start_struct): Adjust.
2460 (finish_struct): Likewise.
2461
557e8c49
JJ
24622016-07-02 Jakub Jelinek <jakub@redhat.com>
2463
2464 PR c/71719
2465 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
2466
54d19c3b
TS
24672016-06-29 Thomas Schwinge <thomas@codesourcery.com>
2468
2469 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
2470 Move pragma context checking into...
2471 (c_parser_omp_cancellation_point): ... here, and improve
2472 diagnostic messages.
2473 * c-typeck.c (c_finish_omp_cancel)
2474 (c_finish_omp_cancellation_point): Improve diagnostic messages.
2475
152ef731
JJ
24762016-06-29 Jakub Jelinek <jakub@redhat.com>
2477
2478 PR c/71685
2479 * c-typeck.c (c_build_qualified_type): Don't clear
2480 C_TYPE_INCOMPLETE_VARS for the main variant.
2481
24822016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
2483
2484 PR c/71552
2485 * c-typeck.c (output_init_element): Diagnose incompatible types
2486 before non-constant initializers.
2487
e9ac1f86
JJ
24882016-06-28 Jakub Jelinek <jakub@redhat.com>
2489
2490 * Make-lang.in: Don't cat ../stage_current if it does not exist.
2491
277d7ee0
AK
24922016-06-23 Andi Kleen <ak@linux.intel.com>
2493
2494 * Make-lang.in: Add support for autofdo.
2495
1a4f11c8
DM
24962016-06-22 David Malcolm <dmalcolm@redhat.com>
2497
2498 PR c/70339
2499 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
2500 (implicit_decl_warning): When issuing warnings for implicit
2501 declarations, attempt to provide a suggestion via
2502 lookup_name_fuzzy.
2503 (undeclared_variable): Likewise when issuing errors.
2504 (lookup_name_in_scope): Likewise.
2505 (struct edit_distance_traits<cpp_hashnode *>): New struct.
2506 (best_macro_match): New typedef.
2507 (find_closest_macro_cpp_cb): New function.
2508 (lookup_name_fuzzy): New function.
2509 * c-parser.c: Include gcc-rich-location.h.
2510 (c_token_starts_typename): Split out case CPP_KEYWORD into...
2511 (c_keyword_starts_typename): ...this new function.
2512 (c_parser_declaration_or_fndef): When issuing errors about
2513 missing "struct" etc, add a fixit. For other kinds of errors,
2514 attempt to provide a suggestion via lookup_name_fuzzy.
2515 (c_parser_parms_declarator): When looking ahead to detect typos in
2516 type names, also reject CPP_KEYWORD.
2517 (c_parser_parameter_declaration): When issuing errors about
2518 unknown type names, attempt to provide a suggestion via
2519 lookup_name_fuzzy.
2520 * c-tree.h (c_keyword_starts_typename): New prototype.
2521
5a578671
JM
25222016-06-20 Joseph Myers <joseph@codesourcery.com>
2523
2524 PR c/71601
2525 * c-typeck.c (build_conditional_expr): Return error_mark_node if
2526 c_common_type returns error_mark_node.
2527
3f8257db 25282016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
2529
2530 PR c/69507
2531 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
2532 __alignof__ (expression).
2533
6a3f203c
DM
25342016-06-14 David Malcolm <dmalcolm@redhat.com>
2535
2536 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
2537
264757fb
DM
25382016-06-14 David Malcolm <dmalcolm@redhat.com>
2539
2540 * c-typeck.c (build_component_ref): Simplify fixit code by
2541 using gcc_rich_location::add_fixit_misspelled_id.
2542 (set_init_label): Likewise.
2543
f7e4f2e3
DM
25442016-06-13 David Malcolm <dmalcolm@redhat.com>
2545
2546 * c-parser.c (c_parser_initelt): Provide location of name for new
2547 location_t param of set_init_label.
2548 * c-tree.h (set_init_label): Add location_t param.
2549 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
2550 param and use it when issuing error messages about unrecognized
2551 field names. Attempt to provide a fixit hint if appropriate,
2552 otherwise update the error message to provide the type name.
2553
4b1ffdb1
TS
25542016-06-10 Thomas Schwinge <thomas@codesourcery.com>
2555
2556 PR c/71381
2557 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
2558 Loosen checking.
2559
44a845ca
MS
25602016-06-08 Martin Sebor <msebor@redhat.com>
2561 Jakub Jelinek <jakub@redhat.com>
2562
2563 PR c++/70507
2564 PR c/68120
2565 * c-typeck.c (convert_arguments): Don't promote last argument
2566 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2567
92a5f2ba
MP
25682016-06-08 Marek Polacek <polacek@redhat.com>
2569
2570 PR c/71418
2571 * c-decl.c (grokdeclarator): Check TYPE_P.
2572
08203f73
MP
2573 PR c/71426
2574 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
2575 code.
2576
6ffd47b7
DM
25772016-06-07 David Malcolm <dmalcolm@redhat.com>
2578
2579 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
2580 and structure element reference, capture the location of the
2581 element name token and pass it to build_component_ref.
2582 (c_parser_postfix_expression_after_primary): Likewise for
2583 structure element dereference.
2584 (c_parser_omp_variable_list): Likewise for
2585 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
2586 * c-tree.h (build_component_ref): Add location_t param.
2587 * c-typeck.c (build_component_ref): Add location_t param
2588 COMPONENT_LOC. Use it, if available, when issuing hints about
2589 mispelled member names to provide a fixit replacement hint.
2590
1f40cff3
MP
25912016-06-06 Marek Polacek <polacek@redhat.com>
2592
2593 PR c/71362
2594 * c-parser.c (c_parser_direct_declarator): Set location.
2595
5545a907
MP
25962016-06-06 Marek Polacek <polacek@redhat.com>
2597
2598 * c-typeck.c (comptypes_internal): Handle comparisons of
2599 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
2600 TYPE_REF_CAN_ALIAS_ALL.
2601
b605f663
CLT
26022016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
2603
2604 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
2605 arguments as addressable when async clause exists.
2606
00631022
JJ
26072016-05-30 Jakub Jelinek <jakub@redhat.com>
2608
2609 PR c++/71349
2610 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
2611 when combined with target construct.
2612
7211a097
JJ
26132016-05-26 Jakub Jelinek <jakub@redhat.com>
2614
2615 * c-parser.c (c_parser_omp_clause_schedule): Warn if
2616 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
2617
95efe6b6
MP
26182016-05-25 Marek Polacek <polacek@redhat.com>
2619
2620 PR c/71265
2621 * c-decl.c (c_make_fname_decl): Don't check seen_error.
2622
a23faf7a
MP
2623 PR c/71266
2624 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
2625
e46c7770
CP
26262016-05-24 Cesar Philippidis <cesar@codesourcery.com>
2627
2628 * c-parser.c (c_parser_oacc_declare): Add support for
2629 GOMP_MAP_FIRSTPRIVATE_POINTER.
2630 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
2631 argument with enum c_omp_region_type ort.
2632 (handle_omp_array_sections): Likewise. Update call to
2633 handle_omp_array_sections_1.
2634 (c_finish_omp_clauses): Add specific errors and warning messages for
2635 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
2636 call to handle_omp_array_sections.
2637
a04e69c0
TS
26382016-05-24 Thomas Schwinge <thomas@codesourcery.com>
2639
2640 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
2641
f17a223d
RB
26422016-05-24 Richard Biener <rguenther@suse.de>
2643
2644 PR middle-end/70434
2645 PR c/69504
2646 * c-typeck.c (build_array_ref): Do not complain about indexing
2647 non-lvalue vectors. Adjust for function name change.
2648
79063edd
MS
26492016-05-20 Martin Sebor <msebor@redhat.com>
2650
2651 PR c/71115
2652 * c-typeck.c (error_init): Use
2653 expansion_point_location_if_in_system_header.
2654 (warning_init): Same.
2655
8a40fef3
DM
26562016-05-19 David Malcolm <dmalcolm@redhat.com>
2657
2658 PR c/71171
2659 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
2660 in error-handling.
2661 (c_parser_postfix_expression): Likewise.
2662 * c-tree.h (c_expr::set_error): New method.
2663 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
2664 that result's range is initialized.
2665
e9892350
JG
26662016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
2667
2668 * c-typeck.c (parser_build_unary_op): Fix formatting.
2669
8fad45f5
MW
26702016-05-16 Matthew Wahab <matthew.wahab@arm.com>
2671
2672 * c-decl.c (grokdeclarator): Remove errmsg and use of
2673 targetm.invalid_return_type.
2674 (grokparms): Remove errmsg and use of
2675 targetm.invalid_parameter_type.
2676
aa4b467b
JM
26772016-05-13 Joseph Myers <joseph@codesourcery.com>
2678
2679 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2680 function return type.
2681
4f2e1536
MP
26822016-05-12 Marek Polacek <polacek@redhat.com>
2683
2684 PR c/70756
2685 * c-decl.c (build_compound_literal): Pass LOC down to
2686 c_incomplete_type_error.
2687 * c-tree.h (require_complete_type): Adjust declaration.
2688 (c_incomplete_type_error): Likewise.
2689 * c-typeck.c (require_complete_type): Add location parameter, pass it
2690 down to c_incomplete_type_error.
2691 (c_incomplete_type_error): Add location parameter, pass it down to
2692 error_at.
2693 (build_component_ref): Pass location down to c_incomplete_type_error.
2694 (default_conversion): Pass location down to require_complete_type.
2695 (build_array_ref): Likewise.
2696 (build_function_call_vec): Likewise.
2697 (convert_arguments): Likewise.
2698 (build_unary_op): Likewise.
2699 (build_c_cast): Likewise.
2700 (build_modify_expr): Likewise.
2701 (convert_for_assignment): Likewise.
2702 (c_finish_omp_clauses): Likewise.
2703
d6e83a8d
MM
27042016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2705
2706 PR c/43651
2707 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
2708 is enabled.
2709 * c-errors.c (pedwarn_c90): Return true if warned.
2710 * c-tree.h (pedwarn_c90): Change return type to bool.
2711 (enum c_declspec_word): Add new enumerator cdw_atomic.
2712
5c3a10fb
MP
27132016-05-11 Marek Polacek <polacek@redhat.com>
2714
2715 PR c++/71024
2716 * c-decl.c (diagnose_mismatched_decls): Factor out code to
2717 diagnose_mismatched_attributes and call it.
2718
cf68d92c
MP
27192016-05-10 Marek Polacek <polacek@redhat.com>
2720
2721 PR c/70255
2722 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2723 on a declaration following the definition.
2724
351f85c5
JJ
27252016-05-05 Jakub Jelinek <jakub@redhat.com>
2726
2727 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2728 parse it through to c_parser_c99_block_statement.
2729 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2730 caller.
2731
deef7113
MP
27322016-05-04 Marek Polacek <polacek@redhat.com>
2733
2734 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2735 OPT_Wdangling_else.
2736
de55efd5
MP
27372016-05-04 Marek Polacek <polacek@redhat.com>
2738
2739 PR c/48778
2740 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2741 for macro expansions.
2742
79ce98bc
MP
27432016-05-03 Marek Polacek <polacek@redhat.com>
2744
2745 PR c/70859
2746 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
2747 check_builtin_function_arguments.
2748
fb2647aa
RB
27492016-05-03 Richard Biener <rguenther@suse.de>
2750
2751 * Make-lang.in (cc1-checksum.c): For stage-final re-use
2752 the checksum from the previous stage.
2753
77886428
CP
27542016-05-02 Cesar Philippidis <cesar@codesourcery.com>
2755
2756 * c-parser.c (c_parser_oacc_all_clauses): Update call to
2757 c_finish_omp_clauses.
2758 (c_parser_omp_all_clauses): Likewise.
2759 (c_parser_oacc_cache): Likewise.
2760 (c_parser_oacc_loop): Likewise.
2761 (omp_split_clauses): Likewise.
2762 (c_parser_omp_declare_target): Likewise.
2763 (c_parser_cilk_all_clauses): Likewise.
2764 (c_parser_cilk_for): Likewise.
2765 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
2766 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2767
7176a4a0
MP
27682016-05-02 Marek Polacek <polacek@redhat.com>
2769
2770 PR c/70851
2771 * c-decl.c (grokdeclarator): Diagnose when array's size has an
2772 incomplete type.
2773
e7ff0319
CP
27742016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2775
2776 PR middle-end/70626
2777 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
2778 OACC_LOOP_CLAUSE_MASK.
2779 (c_parser_oacc_kernels_parallel): Update call to
2780 c_oacc_split_loop_clauses.
2781
9f405ce1
AM
27822016-04-28 Andrew MacLeod <amacleod@redhat.com>
2783
2784 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
2785 argument to build_modify_expr in two cases.
2786
c1e1f433
BS
27872016-04-27 Bernd Schmidt <bschmidt@redhat.com>
2788
2789 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2790 warn_for_memset instead of warning directly here.
2791
2448a956
MP
27922016-04-26 Marek Polacek <polacek@redhat.com>
2793
2794 PR c/67784
2795 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2796 out of ...
2797 (c_parser_for_statement): ... here.
2798 (c_parser_if_statement): Use it.
2799 (c_parser_switch_statement): Use it.
2800 (c_parser_while_statement): Use it.
2801
b02a5e26
MP
2802 PR c/70791
2803 * c-decl.c (pushdecl): Pass LOCUS down to warning.
2804
477d4906
IV
28052016-04-20 Ilya Verbin <ilya.verbin@intel.com>
2806
2807 PR c++/69363
2808 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2809 instead of c_finish_cilk_clauses.
2810 * c-tree.h (c_finish_omp_clauses): Add new default argument.
2811 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
2812 floating-point variables in the linear clause for Cilk Plus.
2813
fe37c7af
MM
28142016-04-18 Michael Matz <matz@suse.de>
2815
2816 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2817 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2818
949505a9
MP
28192016-04-15 Marek Polacek <polacek@redhat.com>
2820
2821 PR c/70671
2822 * c-typeck.c (build_unary_op): Pass location down to error and
2823 warning call.
2824
dda1bf61
JJ
28252016-04-15 Jakub Jelinek <jakub@redhat.com>
2826
2827 PR c/70436
2828 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2829 where needed.
2830 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2831 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2832 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2833 Adjust c_parser_pragma callers.
2834 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
2835 caller.
2836 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2837 c_parser_statement.
2838 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2839 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2840 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2841 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2842 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2843 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2844 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2845 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2846 down where needed.
2847 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
2848 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2849 calls.
2850
99cd9857
MP
28512016-04-13 Marek Polacek <polacek@redhat.com>
2852
2853 PR c/70436
2854 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2855 adjust callers.
2856 (c_parser_statement): Likewise.
2857 (c_parser_c99_block_statement): Likewise.
2858 (c_parser_while_statement): Likewise.
2859 (c_parser_for_statement): Likewise.
2860 (c_parser_if_body): Don't set IF_P here.
2861 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
2862 about dangling else here.
2863 * c-tree.h (c_finish_if_stmt): Adjust declaration.
2864 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
2865 warn about dangling else here.
2866
f13355da
MP
28672016-04-04 Marek Polacek <polacek@redhat.com>
2868
2869 PR c/70307
2870 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2871
5fde6a45
MP
28722016-03-31 Marek Polacek <polacek@redhat.com>
2873
2874 PR c/70297
2875 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2876
4bbf545b
DM
28772016-03-18 David Malcolm <dmalcolm@redhat.com>
2878
2879 PR c/70281
2880 * c-parser.c (c_parser_postfix_expression): Set the source range
2881 for uses of "__builtin_types_compatible_p".
2882
fcc2b74f
JJ
28832016-03-17 Jakub Jelinek <jakub@redhat.com>
2884
2885 PR c/70280
2886 * c-typeck.c (composite_type): Don't count void_list_node
2887 into len, if the list is terminated by void_list_node, start
2888 with void_list_node instead of NULL for newargs. Stop
2889 at void_list_node.
2890
ab4c578f
MP
28912016-03-16 Marek Polacek <polacek@redhat.com>
2892
2893 PR c/70093
2894 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2895 nested functions returning VM types.
2896
96b3c82d
CP
28972016-03-09 Cesar Philippidis <cesar@codesourcery.com>
2898
2899 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2900 when calling c_finish_omp_clauses.
2901
29b9828f
BS
29022016-03-04 Bernd Schmidt <bschmidt@redhat.com>
2903
2904 PR c/69824
2905 * c-decl.c (get_parm_info): Don't queue implicit function declarations
2906 for later.
2907
7ff6ca38
MP
29082016-03-04 Marek Polacek <polacek@redhat.com>
2909
2910 PR c/69798
2911 * c-parser.c (c_parser_postfix_expression): Call
2912 c_parser_cast_expression rather than c_parser_postfix_expression.
2913
686e2237
JJ
29142016-03-01 Jakub Jelinek <jakub@redhat.com>
2915
2916 PR c/69796
2917 PR c/69974
2918 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2919 of incomplete decls to error_mark_node.
2920
0b05329b
MP
29212016-02-24 Marek Polacek <polacek@redhat.com>
2922
2923 PR c/69819
2924 * c-decl.c (finish_decl): Don't update the copy of the type of a
2925 different decl type.
2926
067fbd8b
JJ
29272016-02-23 Jakub Jelinek <jakub@redhat.com>
2928
2929 PR objc/69844
2930 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2931 in id_kind reclassification.
2932
bf14eba2
JJ
29332016-02-16 Jakub Jelinek <jakub@redhat.com>
2934
2935 PR c/69835
2936 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2937
ba539195
JN
29382016-02-16 James Norris <jnorris@codesourcery.com>
2939
2940 PR c/64748
2941 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2942
16595a1f
BS
29432016-02-12 Bernd Schmidt <bschmidt@redhat.com>
2944
f48dfe98
BS
2945 * c-decl.c (build_null_declspecs): Zero the entire struct.
2946
16595a1f
BS
2947 PR c/69522
2948 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
2949 callers changed. If nested_p is true, use it to call
2950 finish_implicit_inits.
2951 * c-tree.h (finish_implicit_inits): Declare.
2952 * c-typeck.c (finish_implicit_inits): New function. Move code
2953 from ...
2954 (push_init_level): ... here.
2955 (set_designator, process_init_element): Call finish_implicit_inits.
2956
66756373
JJ
29572016-02-11 Jakub Jelinek <jakub@redhat.com>
2958
2959 PR c/69768
2960 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
2961 arguments for -Waddress warning.
2962
1066e9b5
JJ
29632016-02-04 Jakub Jelinek <jakub@redhat.com>
2964
2965 PR c/69669
2966 * c-decl.c (finish_enum): When honoring mode attribute,
2967 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2968
3a5d2ba4
JJ
29692016-01-29 Jakub Jelinek <jakub@redhat.com>
2970
2971 PR debug/69518
2972 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2973 all type variants, not just TYPE_MAIN_VARIANT.
2974
cbdd8ae0
JJ
29752016-01-27 Jakub Jelinek <jakub@redhat.com>
2976
2977 PR debug/66869
2978 * c-decl.c (c_write_global_declarations_1): Warn with
2979 warn_unused_function if static prototype without definition
2980 is not C_DECL_USED.
2981
fa74a4bc
MP
29822016-01-27 Marek Polacek <polacek@redhat.com>
2983
2984 PR c/68062
2985 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2986 to unsigned, if needed. Add -Wsign-compare warning.
2987
13f92e8d
JJ
29882016-01-26 Jakub Jelinek <jakub@redhat.com>
2989
2990 PR tree-optimization/69483
2991 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2992
cd8e73dc 29932016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
2994
2995 PR c/24293
2996 * c-tree.h (incomplete_record_decls): Declare.
2997 * c-parser.c (incomplete_record_decls): Define.
2998 (c_parser_translation_unit): Iterate through incomplete_record_decls and
2999 report error if any decl has zero size.
3000 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
3001 or enum type to incomplete_record_decls.
3002
e6d6ec9e
TV
30032016-01-14 Tom de Vries <tom@codesourcery.com>
3004
3005 PR tree-optimization/68773
3006 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
3007 set force_output.
3008
00083992
MP
30092016-01-14 Marek Polacek <polacek@redhat.com>
3010
3011 PR c/69262
3012 * c-decl.c (grokdeclarator): Provide more information for invalid
3013 array declarations.
3014
7443cf13
DM
30152016-01-06 David Malcolm <dmalcolm@redhat.com>
3016
3017 * c-parser.c (c_parser_unary_expression): For dereferences, build
3018 a combined location before calling build_indirect_ref, so that
3019 error reports cover the full range, manually updating the c_expr
3020 src_range.
3021
6b131d5b
MP
30222016-01-06 Marek Polacek <polacek@redhat.com>
3023
3024 PR sanitizer/69099
3025 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
3026 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
3027 NULL.
3028
818ab71a
JJ
30292016-01-04 Jakub Jelinek <jakub@redhat.com>
3030
3031 Update copyright years.
3032
2fe0a208
MP
30332016-01-04 Marek Polacek <polacek@redhat.com>
3034
3035 PR c/68908
3036 * c-typeck.c (build_atomic_assign): Improve commentary. Add
3037 optimization to use __atomic_fetch_* built-in if possible.
3038
c7b48c8a
TS
30392015-12-23 Thomas Schwinge <thomas@codesourcery.com>
3040
3041 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
3042 into...
3043 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
3044 all users.
3045
fda5652f
MP
30462015-12-22 Marek Polacek <polacek@redhat.com>
3047
3048 PR c/69002
3049 * c-typeck.c (build_component_ref): Warn when acessing elements of
3050 atomic structures or unions.
3051
745e411d
DM
30522015-12-21 David Malcolm <dmalcolm@redhat.com>
3053
3054 * c-typeck.c: Include "gcc-rich-location.h".
3055 (build_binary_op): In the two places that call binary_op_error,
3056 create a gcc_rich_location and populate it with the location of
3057 the binary op and its two operands.
3058
94c40e19
DM
30592015-12-16 David Malcolm <dmalcolm@redhat.com>
3060
3061 * c-parser.c (c_parser_statement_after_labels): When calling
3062 c_finish_return, Use the return expression's location if it has
3063 one, falling back to the location of the first token within it.
3064 * c-typeck.c (c_finish_return): When issuing warnings about
3065 the incorrect presence/absence of a return value, issue a note
3066 showing the declaration of the function.
3067
de67c4c3
DM
30682015-12-16 David Malcolm <dmalcolm@redhat.com>
3069
3070 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
3071 to 4.
3072 (c_parser_peek_nth_token): New function.
3073 (c_parser_peek_conflict_marker): New function.
3074 (c_parser_error): Detect conflict markers and report them as such.
3075
a10704e1
DM
30762015-12-16 David Malcolm <dmalcolm@redhat.com>
3077
3078 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
3079 to preserve range information for the primary expression
3080 in the call to c_parser_postfix_expression_after_primary.
3081
8062bca6
DM
30822015-12-16 David Malcolm <dmalcolm@redhat.com>
3083
3084 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
3085 expression location, falling back on the first token location,
3086 rather than always using the latter.
3087
d06f8b75
MP
30882015-12-16 Marek Polacek <polacek@redhat.com>
3089
3090 PR c/64637
3091 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
3092 available.
3093
2994fb91
MP
30942015-12-15 Marek Polacek <polacek@redhat.com>
3095
3096 PR c/68907
3097 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
3098 artificial decl.
3099
a1b93f8d
DM
31002015-12-08 David Malcolm <dmalcolm@redhat.com>
3101
3102 * c-parser.c (c_parser_alignof_expression): Capture location of
3103 closing parenthesis (if any), or of end of unary expression, and
3104 use it to build a src_range for the expression.
3105
46c6e1e2
DM
31062015-12-08 David Malcolm <dmalcolm@redhat.com>
3107
3108 PR c/68757
3109 * c-parser.c (c_parser_get_builtin_args): Add
3110 "out_close_paren_loc" param, and write back to it.
3111 (c_parser_postfix_expression): Capture the closing
3112 parenthesis location for RID_CHOOSE_EXPR,
3113 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
3114 RID_BUILTIN_SHUFFLE and use it to set the source range
3115 for such expressions; within RID_BUILTIN_COMPLEX set
3116 the underlying location.
3117
66189108
MP
31182015-12-07 Marek Polacek <polacek@redhat.com>
3119
3120 PR c/68668
3121 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
3122 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
3123
f187980b
EB
31242015-12-04 Eric Botcazou <ebotcazou@adacore.com>
3125
3126 * c-tree.h (c_build_va_arg): Adjust prototype.
3127 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
3128 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
3129 parameter, adjust throughout and issue an error if EXPR is a component
3130 with reverse storage order.
3131
4250754e
JM
31322015-12-02 Jason Merrill <jason@redhat.com>
3133
3134 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
3135 (c_fully_fold_internal, decl_constant_value_for_optimization):
3136 Move from c-common.c.
3137 * c-tree.h: Declare decl_constant_value_for_optimization.
3138 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
3139
e9e32ee6
JM
31402015-12-02 Joseph Myers <joseph@codesourcery.com>
3141
3142 PR c/68162
3143 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
3144 following link from declarator to next declarator. Track original
3145 qualified type and pass it to c_build_qualified_type.
3146 * c-typeck.c (c_build_qualified_type): Add arguments
3147 orig_qual_type and orig_qual_indirect.
3148
ff7a55bf
TS
31492015-12-02 Thomas Schwinge <thomas@codesourcery.com>
3150
3151 * c-parser.c (c_parser_omp_clause_name)
3152 (c_parser_oacc_all_clauses): Alphabetical sorting.
3153
657e4e47
JJ
31542015-12-02 Jakub Jelinek <jakub@redhat.com>
3155
3156 PR c/68533
3157 * c-decl.c (get_parm_info): Use b->locus instead of input_location
3158 for diagnostics.
3159
37d5ad46
JB
31602015-12-01 Julian Brown <julian@codesourcery.com>
3161 Cesar Philippidis <cesar@codesourcery.com>
3162 James Norris <James_Norris@mentor.com>
3163
3164 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
3165 (c_parser_oacc_clause_use_device): New function.
3166 (c_parser_oacc_all_clauses): Add use_device support.
3167 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
3168 (c_parser_oacc_host_data): New function.
3169 (c_parser_omp_construct): Add host_data support.
3170 * c-tree.h (c_finish_oacc_host_data): Add prototype.
3171 * c-typeck.c (c_finish_oacc_host_data): New function.
3172 (c_finish_omp_clauses): Add use_device support.
3173
a4850ce9
JH
31742015-11-29 Jan Hubicka <hubicka@ucw.cz>
3175
3176 PR c/67106
3177 * c-decl.c: Set TYPE_PACKED in variants.
3178
b58d3df2
ML
31792015-11-27 Martin Liska <mliska@suse.cz>
3180
3181 PR c++/68312
3182 * c-array-notation.c (fix_builtin_array_notation_fn):
3183 Use release_vec_vec instead of vec::release.
3184 (build_array_notation_expr): Likewise.
3185 (fix_conditional_array_notations_1): Likewise.
3186 (fix_array_notation_expr): Likewise.
3187 (fix_array_notation_call_expr): Likewise.
3188
aec17bfe
JJ
31892015-11-27 Jakub Jelinek <jakub@redhat.com>
3190
3191 PR c/63326
3192 * c-parser.c (c_parser_compound_statement_nostart): If
3193 last_label is true, use pragma_stmt instead of pragma_compound
3194 as second c_parser_pragma argument.
3195 (c_parser_omp_ordered, c_parser_omp_target_update,
3196 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
3197 false as second argument to c_parser_skip_to_pragma_eol after
3198 diagnosing standalone directives used in pragma_stmt context.
3199
688c4de0
IV
32002015-11-24 Ilya Verbin <ilya.verbin@intel.com>
3201
3202 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
3203 with "if (ENABLE_OFFLOADING)".
3204
cbd03aee
DM
32052015-11-23 David Malcolm <dmalcolm@redhat.com>
3206
3207 PR objc/68438
3208 * c-parser.c (c_parser_postfix_expression): Set up source ranges
3209 for various Objective-C constructs: Class.name syntax,
3210 @selector(), @protocol(), @encode(), and [] message syntax.
3211
a87a86e1
DM
32122015-11-20 David Malcolm <dmalcolm@redhat.com>
3213
3214 PR 62314
3215 * c-typeck.c (should_suggest_deref_p): New function.
3216 (build_component_ref): Special-case POINTER_TYPE when
3217 generating a "not a structure of union" error message, and
3218 suggest a "->" rather than a ".", providing a fix-it hint.
3219
8ece8dfb
DM
32202015-11-19 David Malcolm <dmalcolm@redhat.com>
3221
3222 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
3223 candidate into a new function, find_closest_identifier.
3224
433068cc
MP
32252015-11-19 Marek Polacek <polacek@redhat.com>
3226
3227 PR c/68412
3228 * c-typeck.c (parser_build_binary_op): Properly handle
3229 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
3230
bef08b71
DM
32312015-11-17 David Malcolm <dmalcolm@redhat.com>
3232
3233 * c-parser.c (set_c_expr_source_range): Bulletproof both
3234 overloaded implementations against NULL expr->value.
3235 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
3236 values.
3237 (c_parser_unary_expression): Likewise when handling addresses of
3238 labels.
3239 (c_parser_postfix_expression): Likewise for statement expressions,
3240 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
3241 __builtin_va_arg, and for __builtin_offset_of.
3242 (c_parser_postfix_expression_after_paren_type): Initialize expr's
3243 src_range using the range of the braced initializer.
3244 (c_parser_transaction_expression): Set src_range for "ret" to a
3245 sane pair of values.
3246
fff77217
KY
32472015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
3248
3249 * c-parser.c (c_finish_omp_declare_simd): Look for
3250 "simd" attribute as well. Update error message.
3251
1d899da2
TS
32522015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3253
3254 * c-parser.c (c_parser_omp_declare_target): Adjust.
3255
e4606348
JJ
32562015-11-14 Jakub Jelinek <jakub@redhat.com>
3257
3258 * c-typeck.c (c_finish_omp_clauses): Don't mark
3259 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
3260
3e636daf
MP
32612015-11-14 Marek Polacek <polacek@redhat.com>
3262
3263 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
3264 * c-typeck.c: Likewise.
3265
ebedc9a3
DM
32662015-11-13 David Malcolm <dmalcolm@redhat.com>
3267
3268 * c-decl.c (warn_defaults_to): Pass line_table to
3269 rich_location ctor.
3270 * c-errors.c (pedwarn_c99): Likewise.
3271 (pedwarn_c90): Likewise.
3272 * c-parser.c (set_c_expr_source_range): New functions.
3273 (c_token::get_range): New method.
3274 (c_token::get_finish): New method.
3275 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
3276 based on the range from the start of the LHS to the end of the
3277 RHS.
3278 (c_parser_conditional_expression): Likewise, based on the range
3279 from the start of the cond.value to the end of exp2.value.
3280 (c_parser_binary_expression): Call set_c_expr_source_range on
3281 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
3282 (c_parser_cast_expression): Call set_c_expr_source_range on ret
3283 based on the cast_loc through to the end of the expr.
3284 (c_parser_unary_expression): Likewise, based on the
3285 op_loc through to the end of op.
3286 (c_parser_sizeof_expression) Likewise, based on the start of the
3287 sizeof token through to either the closing paren or the end of
3288 expr.
3289 (c_parser_postfix_expression): Likewise, using the token range,
3290 or from the open paren through to the close paren for
3291 parenthesized expressions.
3292 (c_parser_postfix_expression_after_primary): Likewise, for
3293 various kinds of expression.
3294 * c-tree.h (struct c_expr): Add field "src_range".
3295 (c_expr::get_start): New method.
3296 (c_expr::get_finish): New method.
3297 (set_c_expr_source_range): New decls.
3298 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
3299 on ret for prefix unary ops.
3300 (parser_build_binary_op): Likewise, running from the start of
3301 arg1.value through to the end of arg2.value.
3302
ec8b536f
MP
33032015-11-13 Marek Polacek <polacek@redhat.com>
3304
3305 PR c/68320
3306 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
3307
277fe616
DM
33082015-11-13 David Malcolm <dmalcolm@redhat.com>
3309
3310 * c-typeck.c: Include spellcheck.h.
3311 (lookup_field_fuzzy_find_candidates): New function.
3312 (lookup_field_fuzzy): New function.
3313 (build_component_ref): If the field was not found, try using
3314 lookup_field_fuzzy and potentially offer a suggestion.
3315
6e232ba4
JN
33162015-11-12 James Norris <jnorris@codesourcery.com>
3317 Joseph Myers <joseph@codesourcery.com>
3318
3319 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
3320 (c_parser_omp_clause_name): Handle 'device_resident' clause.
3321 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3322 and PRAGMA_OMP_CLAUSE_LINK.
3323 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3324 and PRAGMA_OACC_CLAUSE_LINK.
3325 (OACC_DECLARE_CLAUSE_MASK): New definition.
3326 (c_parser_oacc_declare): New function.
3327
9be4f715
MP
33282015-11-12 Marek Polacek <polacek@redhat.com>
3329
3330 PR c/67784
3331 * c-parser.c (c_parser_for_statement): Reclassify the token in
3332 a correct scope.
3333
e78bede6
MP
33342015-11-11 Marek Polacek <polacek@redhat.com>
3335
3336 PR c/68107
3337 PR c++/68266
3338 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
3339 checking the size of an array.
3340
69f293c9
AM
33412015-11-11 Andrew MacLeod <amacleod@redhat.com>
3342
3343 * c-array-notation.c: Remove unused header files.
3344 * c-aux-info.c: Likewise.
3345 * c-convert.c: Likewise.
3346 * c-decl.c: Likewise.
3347 * c-errors.c: Likewise.
3348 * c-lang.c: Likewise.
3349 * c-objc-common.c: Likewise.
3350 * c-parser.c: Likewise.
3351 * c-typeck.c: Likewise.
3352 * gccspec.c: Likewise.
3353
3a40d81d
NS
33542015-11-09 Thomas Schwinge <thomas@codesourcery.com>
3355 Cesar Philippidis <cesar@codesourcery.com>
3356 James Norris <jnorris@codesourcery.com>
3357 Julian Brown <julian@codesourcery.com>
3358 Nathan Sidwell <nathan@codesourcery.com>
3359
3360 c/
3361 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
3362 routine arg.
3363 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
3364 (c_parser_pragma): Parse 'acc routine'.
3365 (OACC_ROUTINE_CLAUSE_MARK): Define.
3366 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
3367
fc402eec
AA
33682015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3369
3370 PR debug/67192
3371 * c-typeck.c (c_finish_loop): For unconditional loops, set the
3372 location of the backward-goto to the start of the loop body.
3373
f6b0b3db
AA
33742015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3375
3376 PR debug/67192
3377 * c-parser.c (c_parser_while_statement): Finish the loop before
3378 parsing ahead for misleading indentation.
3379 (c_parser_for_statement): Likewise.
3380
ee45a32d
EB
33812015-11-08 Eric Botcazou <ebotcazou@adacore.com>
3382
3383 * c-decl.c (finish_struct): If the structure has reverse storage
3384 order, rewrite the type of array fields with scalar component. Call
3385 maybe_apply_pragma_scalar_storage_order on entry.
3386 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
3387 errors on bit-fields and reverse SSO here and not...
3388 (c_mark_addressable): ...here.
3389 (output_init_element): Adjust call to initializer_constant_valid_p.
3390 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
3391
8a645150
DM
33922015-11-06 David Malcolm <dmalcolm@redhat.com>
3393
3394 * c-decl.c (warn_defaults_to): Update for change in signature
3395 of diagnostic_set_info.
3396 * c-errors.c (pedwarn_c99): Likewise.
3397 (pedwarn_c90): Likewise.
3398 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
3399 for textinfo::set_location.
3400
7a5e4956
CP
34012015-11-05 Cesar Philippidis <cesar@codesourcery.com>
3402 Thomas Schwinge <thomas@codesourcery.com>
3403 James Norris <jnorris@codesourcery.com>
3404
3405 * c-parser.c (c_parser_omp_clause_name): Add support for
3406 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
3407 (c_parser_omp_clause_default): Add is_oacc argument. Handle
3408 default(none) in OpenACC.
3409 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
3410 arguments.
3411 (c_parser_oacc_clause_tile): New function.
3412 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
3413 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
3414 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
3415 TILE}.
3416 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
3417 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
3418 FIRSTPRIVATE}.
3419 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
3420 (c_parser_oacc_update): Update the error message for missing clauses.
3421 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
3422 and OMP_CLAUSE_INDEPENDENT.
3423
bfcfbfa0
MP
34242015-11-05 Marek Polacek <polacek@redhat.com>
3425
3426 PR c/68090
3427 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
3428 deal with pre-evaluation on invalid types.
3429
e01d41e5
JJ
34302015-11-05 Jakub Jelinek <jakub@redhat.com>
3431 Ilya Verbin <ilya.verbin@intel.com>
3432
3433 * c-parser.c: Include context.h and gimple-expr.h.
3434 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
3435 monotonic together with nonmonotonic.
3436 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
3437 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
3438 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
3439 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
3440 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
3441 expressions on combined target teams before the target.
3442 (c_parser_omp_declare_target): If decl has "omp declare target" or
3443 "omp declare target link" attribute, and cgraph or varpool node already
3444 exists, then set corresponding flags. Call c_finish_omp_clauses
3445 in the parenthesized extended-list syntax case.
3446 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
3447 declare target.
3448 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
3449 on OMP_CLAUSE_REDUCTION array sections.
3450 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
3451 into the constant offset, or for variable low-bound using
3452 POINTER_PLUS_EXPR. For structure element based array sections use
3453 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
3454 (c_finish_omp_clauses): Drop generic_field_head, structure
3455 elements are now always mapped even as array section bases,
3456 diagnose same var in data sharing and mapping clauses. Diagnose if
3457 linear step on declare simd is neither a constant nor a uniform
3458 parameter. Look through POINTER_PLUS_EXPR for array section
3459 reductions. Diagnose the same var or function appearing multiple
3460 times on the same directive. Fix up wording for the to clause if t
3461 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
3462 modifier on kinds other than dynamic or guided or nonmonotonic
3463 modifier together with ordered clause.
3464
4bf9e5a8
TS
34652015-11-03 Thomas Schwinge <thomas@codesourcery.com>
3466 Chung-Lin Tang <cltang@codesourcery.com>
3467
3468 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
3469
2adfab87
AM
34702015-10-29 Andrew MacLeod <amacleod@redhat.com>
3471
3472 * c-array-notation.c: Reorder #include's and remove duplicates.
3473 * c-aux-info.c: Likewise.
3474 * c-convert.c: Likewise.
3475 * c-decl.c: Likewise.
3476 * c-errors.c: Likewise.
3477 * c-lang.c: Likewise.
3478 * c-objc-common.c: Likewise.
3479 * c-parser.c: Likewise.
3480 * c-typeck.c: Likewise.
3481
e922069e
JW
34822015-10-26 Jim Wilson <jim.wilson@linaro.org>
3483
3484 PR debug/66068
3485 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
3486 after calling build_qualified_type.
3487
765dd391
CP
34882015-10-27 Cesar Philippidis <cesar@codesourcery.com>
3489 Thomas Schwinge <thomas@codesourcery.com>
3490 James Norris <jnorris@codesourcery.com>
3491 Joseph Myers <joseph@codesourcery.com>
3492 Julian Brown <julian@codesourcery.com>
3493 Bernd Schmidt <bschmidt@redhat.com>
3494
3495 * c-parser.c (c_parser_oacc_shape_clause): New.
3496 (c_parser_oacc_simple_clause): New.
3497 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
3498 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
3499
88bae6f4
TS
35002015-10-27 Thomas Schwinge <thomas@codesourcery.com>
3501 James Norris <jnorris@codesourcery.com>
3502 Cesar Philippidis <cesar@codesourcery.com>
3503
3504 PR c/64765
3505 PR c/64880
3506 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
3507 parameters, and handle these. Adjust all users.
3508 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
3509 into...
3510 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
3511 all users.
3512 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
3513 declare functions.
3514 (c_finish_omp_construct): Declare function.
3515 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
3516 Merge functions into...
3517 (c_finish_omp_construct): ... this new function.
3518
a8fc2579
RB
35192015-10-22 Richard Biener <rguenther@suse.de>
3520
3521 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
3522 before folding a MINUS_EXPR.
3523
e9122ef6
MP
35242015-10-21 Marek Polacek <polacek@redhat.com>
3525
3526 PR c/68024
3527 * c-decl.c (start_function): Warn about vararg functions without
3528 a prototype.
3529
9f47c7e5
IE
35302015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
3531
3532 * c-typeck.c (build_conditional_expr): Use boolean vector
3533 type for vector comparison.
3534 (build_vec_cmp): New.
3535 (build_binary_op): Use build_vec_cmp for comparison.
3536
fa60eeb9
MP
35372015-10-20 Marek Polacek <polacek@redhat.com>
3538
3539 * c-parser.c (is_cilkplus_vector_p): Don't define here.
3540
2c7020eb
MP
35412015-10-20 Marek Polacek <polacek@redhat.com>
3542
3543 PR c/67964
3544 * c-parser.c (c_parser_attributes): Break out of the loop if the
3545 token after an attribute isn't a comma.
3546
d9a6bd32
JJ
35472015-10-13 Jakub Jelinek <jakub@redhat.com>
3548 Aldy Hernandez <aldyh@redhat.com>
3549
3550 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
3551 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
3552 (c_parser_omp_variable_list): Handle structure elements for
3553 map, to and from clauses. Handle array sections in reduction
3554 clause. Formatting fixes.
3555 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
3556 if clause modifiers.
3557 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3558 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3559 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
3560 c_parser_omp_clause_is_device_ptr): New functions.
3561 (c_parser_omp_clause_ordered): Parse optional parameter.
3562 (c_parser_omp_clause_reduction): Handle array reductions.
3563 (c_parser_omp_clause_schedule): Parse optional simd modifier.
3564 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
3565 functions.
3566 (c_parser_omp_clause_linear): Parse linear clause modifiers.
3567 (c_parser_omp_clause_depend_sink): New function.
3568 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
3569 (c_parser_omp_clause_map): Parse release/delete map kinds and
3570 optional always modifier.
3571 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
3572 and c_finish_omp_clauses callers.
3573 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
3574 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
3575 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
3576 (OMP_CRITICAL_CLAUSE_MASK): Define.
3577 (c_parser_omp_critical): Parse critical clauses.
3578 (c_parser_omp_for_loop): Handle doacross loops, adjust
3579 c_finish_omp_for and c_finish_omp_clauses callers.
3580 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
3581 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
3582 (OMP_FOR_CLAUSE_MASK): Add linear clause.
3583 (c_parser_omp_for): Disallow ordered clause when combined with
3584 distribute. Disallow linear clause when combined with distribute
3585 and not combined with simd.
3586 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
3587 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
3588 parse clauses and if depend clause is found, don't parse a body.
3589 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
3590 Allow target parallel without for after it.
3591 (OMP_TASK_CLAUSE_MASK): Add priority clause.
3592 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
3593 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
3594 invalid kinds.
3595 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
3596 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
3597 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
3598 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
3599 functions.
3600 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
3601 defaultmap and is_device_ptr clauses.
3602 (c_parser_omp_target): Parse target parallel and target simd. Set
3603 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
3604 and target exit data. Diagnose invalid map kinds.
3605 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
3606 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
3607 construct.
3608 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
3609 &omp_priv.
3610 (OMP_TASKLOOP_CLAUSE_MASK): Define.
3611 (c_parser_omp_taskloop): New function.
3612 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
3613 handle PRAGMA_OMP_TASKLOOP.
3614 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
3615 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
3616 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
3617 Add IS_OMP argument, handle structure element bases, diagnose
3618 bitfields, pass IS_OMP recursively, diagnose known zero length
3619 array sections in depend clauses, handle array sections in reduction
3620 clause, diagnose negative length even for pointers.
3621 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
3622 types, pass IS_OMP down to handle_omp_array_sections_1, handle
3623 array sections in reduction clause, set
3624 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
3625 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
3626 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
3627 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
3628
21ba0cea
MP
36292015-10-06 Marek Polacek <polacek@redhat.com>
3630
3631 * c-parser.c (c_parser_statement_after_labels): Use
3632 protected_set_expr_location.
3633 (c_parser_omp_clause_num_gangs): Likewise.
3634 (c_parser_omp_clause_num_threads): Likewise.
3635 (c_parser_omp_clause_num_workers): Likewise.
3636 (c_parser_omp_clause_vector_length): Likewise.
3637 (c_parser_omp_clause_num_teams): Likewise.
3638 (c_parser_omp_clause_thread_limit): Likewise.
3639 * c-typeck.c (build_c_cast): Likewise.
3640 (c_cast_expr): Likewise.
3641
624d31fe
RS
36422015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3643
3644 * c-typeck.c (c_tree_equal): Use real_equal instead of
3645 REAL_VALUES_EQUAL.
3646
b8fd7909
JM
36472015-10-04 Jason Merrill <jason@redhat.com>
3648
3649 * c-parser.c (c_lex_one_token): Handle @synchronized.
3650 * c-decl.c (match_builtin_function_types): A declaration of a built-in
3651 can change whether the function is transaction_safe.
3652
1c7485af
MP
36532015-10-02 Marek Polacek <polacek@redhat.com>
3654
3655 PR c/67730
3656 * c-typeck.c (convert_for_assignment): Use the expansion point
3657 location throughout.
3658
3e3b8d63
MP
36592015-10-02 Marek Polacek <polacek@redhat.com>
3660
3661 PR c/64249
3662 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
3663 and pass it down to c_parser_if_statement.
3664 (c_parser_else_body): Add CHAIN parameter and pass it down to
3665 c_parser_statement_after_labels.
3666 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
3667 duplicated if-else-if conditions.
3668
aabef2de
MP
36692015-10-01 Marek Polacek <polacek@redhat.com>
3670
3671 * c-typeck.c (convert_for_assignment): Improve commentary.
3672
de8ddd5f
MP
36732015-09-30 Marek Polacek <polacek@redhat.com>
3674
3675 PR c/67730
3676 * c-typeck.c (c_finish_return): Use the expansion point location for
3677 certain "return with value" warnings.
3678
c4914de6
MLI
36792015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3680
3681 * c-parser.c (pragma_lex): Add loc argument.
3682
0e36f5c7
MP
36832015-09-15 Marek Polacek <polacek@redhat.com>
3684
3685 PR c/67580
3686 * c-decl.c (tag_exists_p): New function.
3687 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3688 struct/union/enum keywords are missing.
3689 * c-tree.h (tag_exists_p): Declare.
3690
2f3bb934
MP
36912015-09-15 Marek Polacek <polacek@redhat.com>
3692
3693 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3694 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3695 Return NULL_TREE instead of 0.
3696 (lookup_name): Return NULL_TREE instead of 0.
3697 (lookup_name_in_scope): Likewise.
3698 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3699 (parser_xref_tag): Use false instead of 0.
3700 (start_struct): Use true instead of 1.
3701 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3702
aa256c4a
MP
37032015-09-14 Marek Polacek <polacek@redhat.com>
3704
3705 * c-typeck.c (set_nonincremental_init_from_string): Use
3706 HOST_WIDE_INT_M1U when shifting a negative value.
3707
dbb68221
MW
37082015-09-09 Mark Wielaard <mjw@redhat.com>
3709
3710 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
3711 parm against NULL.
3712
a8a098ac
JJ
37132015-09-10 Jakub Jelinek <jakub@redhat.com>
3714
3715 PR c/67502
3716 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
3717 into OMP_FOR_PRE_BODY rather than before the loop.
3718
f4b189d5
JJ
37192015-09-09 Jakub Jelinek <jakub@redhat.com>
3720
0bb99c11
JJ
3721 PR c/67501
3722 * c-parser.c (c_parser_oacc_all_clauses,
3723 c_parser_omp_all_clauses): Remove invalid clause from
3724 list of clauses even if parser->error is set.
3725
fce5e5e3
JJ
3726 PR c/67500
3727 * c-parser.c (c_parser_omp_clause_aligned,
3728 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3729 test for errors.
3730 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3731 error_mark_node.
3732
f4b189d5
JJ
3733 PR c/67495
3734 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3735 instead of c_parser_unary_expression. If the result is !lvalue_p,
3736 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3737
b2aaf235
MP
37382015-09-04 Marek Polacek <polacek@redhat.com>
3739
3740 PR sanitizer/67279
3741 * c-typeck.c (build_binary_op): Don't instrument static initializers.
3742
1807ffc1
MS
37432015-09-03 Martin Sebor <msebor@redhat.com>
3744
3745 PR c/66516
8b652e65
JJ
3746 * c-typeck.c (convert_arguments, parser_build_unary_op,
3747 build_conditional_expr, c_cast_expr, convert_for_assignment,
3748 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
3749 reject_gcc_builtin.
3750 (c_decl_implicit): Define.
3751
d04ff417
MP
37522015-09-02 Marek Polacek <polacek@redhat.com>
3753
3754 PR c/67432
3755 * c-parser.c (c_parser_enum_specifier): Give a better error for
3756 an empty enum.
3757
a79683d5
TS
37582015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3759
3760 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3761
191a6b94
MP
37622015-08-12 Marek Polacek <polacek@redhat.com>
3763
3764 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
3765 LOC to it.
3766
420a9d9b
MP
37672015-08-03 Marek Polacek <polacek@redhat.com>
3768
3769 PR c/67088
3770 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
3771 Use it.
3772 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
3773
992118a1
PP
37742015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3775
3776 * c-parser.c (c_parser_if_body): Take token_indent_info
3777 argument. Call warn_for_misleading_indentation even when the
3778 body is a semicolon. Extract token_indent_infos corresponding
3779 to the guard, body and next tokens. Adjust call to
3780 warn_for_misleading_indentation accordingly.
3781 (c_parser_else_body): Likewise.
3782 (c_parser_if_statement): Likewise.
3783 (c_parser_while_statement): Likewise.
3784 (c_parser_for_statement): Likewise.
3785
46308474
LFSM
37862015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
3787 Manuel López-Ibáñez <manu@gcc.gnu.org>
3788
3789 * c-decl.c (get_parm_info): Remove static var. Update warning
3790 message.
3791
05b28fd6
MP
37922015-07-27 Marek Polacek <polacek@redhat.com>
3793
3794 PR c++/66555
3795 PR c/54979
3796 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3797
451b5e48
MP
37982015-07-20 Marek Polacek <polacek@redhat.com>
3799
3800 PR c++/55095
3801 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3802 (build_binary_op): Warn about left shift overflows.
3803
1916bcb5
AM
38042015-07-09 Andrew MacLeod <amacleod@redhat.com>
3805
3806 * c-array-notation.c: Adjust includes for flags.h changes.
3807 * c-objc-common.c: Likewise.
3808
c7131fb2
AM
38092015-07-07 Andrew MacLeod <amacleod@redhat.com>
3810
3811 * c-array-notation.c: Adjust includes.
3812 * c-aux-info.c: Likewise.
3813 * c-convert.c: Likewise.
3814 * c-decl.c: Likewise.
3815 * c-errors.c: Likewise.
3816 * c-lang.c: Likewise.
3817 * c-objc-common.c: Likewise.
3818 * c-parser.c: Likewise.
3819 * c-typeck.c: Likewise.
3820
da2e71c9
MLI
38212015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3822
3823 PR fortran/66605
3824 * c-decl.c (finish_function): Call do_warn_unused_parameter.
3825
b155cfd9
MP
38262015-06-29 Marek Polacek <polacek@redhat.com>
3827
3828 PR c/66322
3829 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3830 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
3831 about -Wswitch-bool here.
3832 (do_case): Update c_add_case_label call.
3833 (c_finish_case): Update c_do_switch_warnings call.
3834
31521951
MP
38352015-06-27 Marek Polacek <polacek@redhat.com>
3836
3837 * c-typeck.c: Use VECTOR_TYPE_P throughout.
3838
22d03525
MP
38392015-06-26 Marek Polacek <polacek@redhat.com>
3840
3841 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3842 INDIRECT_REF_P.
3843 * c-typeck.c (array_to_pointer_conversion): Likewise.
3844 (build_unary_op): Likewise.
3845 (c_finish_return): Likewise.
3846
f0889939
AM
38472015-06-25 Andrew MacLeod <amacleod@redhat.com>
3848
3849 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3850 * c-parser.c: Likewise.
3851
8d67ee55
RS
38522015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3853
3854 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3855 instead of pointer_hash.
3856 (detect_field_duplicates): Likewise.
3857
0ae9bd27
MP
38582015-06-25 Marek Polacek <polacek@redhat.com>
3859
3860 * c-array-notation.c: Use VAR_P throughout.
3861 * c-decl.c: Likewise.
3862 * c-objc-common.c: Likewise.
3863 * c-parser.c: Likewise.
3864 * c-typeck.c: Likewise.
3865
62f9079a
MP
38662015-06-25 Marek Polacek <polacek@redhat.com>
3867
3868 * c-decl.c: Use is_global_var throughout.
3869 * c-parser.c: Likewise.
3870 * c-typeck.c: Likewise.
3871
abb226c9
AM
38722015-06-17 Andrew MacLeod <amacleod@redhat.com>
3873
3874 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3875 * c-aux-info.c: Likewise.
3876 * c-convert.c: Likewise.
3877 * c-decl.c: Likewise.
3878 * c-errors.c: Likewise.
3879 * c-lang.c: Likewise.
3880 * c-objc-common.c: Likewise.
3881 * c-parser.c: Likewise.
3882 * c-typeck.c: Likewise.
3883
8cbababc
JH
38842015-06-11 Jan Hubicka <hubicka@ucw.cz>
3885
3886 PR middle-end/66325
3887 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3888 variants.
3889
a0349665
PMR
38902015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
3891
3892 * c-decl.c (pop_scope): Register the main translation unit
3893 through the new debug hook.
3894
13fdf2e2
AM
38952015-06-08 Andrew MacLeod <amacleod@redhat.com>
3896
3897 * c-array-notation.c : Adjust include files.
3898 * c-aux-info.c : Likewise.
3899 * c-convert.c : Likewise.
3900 * c-decl.c : Likewise.
3901 * c-errors.c : Likewise.
3902 * c-lang.c : Likewise.
3903 * c-lang.h : Likewise.
3904 * c-objc-common.c : Likewise.
3905 * c-parser.c : Likewise.
3906 * c-typeck.c : Likewise.
3907
d7438551
AH
39082015-06-05 Aldy Hernandez <aldyh@redhat.com>
3909
3910 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3911 immediately clobber it.
3912 (c_write_global_declarations_1): Remove call to
3913 check_global_declaration_1.
3914 (c_write_global_declarations_2): Remove.
3915 (c_write_final_cleanups): Rename from c_write_global_declarations.
3916 Remove call to finalize_compilation_unit.
3917 Remove calls to debugging hooks.
3918 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3919 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3920 * c-tree.h: Remove c_write_global_declarations.
3921
ecb9f223
AM
39222015-06-04 Andrew MacLeod <amacleod@redhat.com>
3923
3924 * c-array-notation.c: Adjust includes for restructured coretypes.h.
3925 * c-aux-info.c: Likewise.
3926 * c-convert.c: Likewise.
3927 * c-decl.c: Likewise.
3928 * c-errors.c: Likewise.
3929 * c-lang.c: Likewise.
3930 * c-objc-common.c: Likewise.
3931 * c-parser.c: Likewise.
3932 * c-typeck.c: Likewise.
3933
9482b620
MP
39342015-06-04 Marek Polacek <polacek@redhat.com>
3935
3936 PR c/66341
3937 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3938 it is a lvalue.
3939
bc51ace3
PK
39402015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3941
3942 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3943 Warn for empty struct.
3944 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3945
ea5b45b6
AT
39462015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
3947
3948 * c-decl.c (start_function): Call plugin before parsing.
3949 (finish_function): Call plugin after parsing.
3950
c2d47482
PK
39512015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3952
3953 PR c/49551
3954 * c-decl.c (merge_decls): Merge DECL_COMMON.
3955
a95492ab
JW
39562015-05-22 Jim Wilson <jim.wilson@linaro.org>
3957
3958 * Make-lang.in (check_gcc_pallelize): Define.
3959
fd5c817a
MP
39602015-05-22 Marek Polacek <polacek@redhat.com>
3961
3962 PR c/47043
3963 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
3964 attributes.
3965
c7b70a3c
MP
39662015-05-21 Marek Polacek <polacek@redhat.com>
3967
3968 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3969 DECL_BUILT_IN.
3970
21b634ae
MP
39712015-05-20 Marek Polacek <polacek@redhat.com>
3972
3973 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3974 * c-typeck.c: Likewise.
3975
296a8c2f
MP
39762015-05-19 Marek Polacek <polacek@redhat.com>
3977
3978 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3979
41b37d5e
JJ
39802015-05-19 Jakub Jelinek <jakub@redhat.com>
3981
3982 PR middle-end/66199
3983 * c-parser.c (c_parser_omp_for_loop): Don't add
3984 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3985 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3986 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3987 constructs.
3988
fab27f52
MM
39892015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
3990
3991 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 3992 swaps.
fab27f52 3993
40de31cf
MLI
39942015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3995
3996 PR fortran/44054
3997 * c-objc-common.c (c_tree_printer): Replace locus pointer with
3998 accessor function.
3999
3aa3c9fc
MP
40002015-05-14 Marek Polacek <polacek@redhat.com>
4001
4002 PR c/66066
4003 PR c/66127
4004 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
4005 rather than with 0.
4006
c3388e62
DM
40072015-05-12 David Malcolm <dmalcolm@redhat.com>
4008
4009 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
4010 to add a call to warn_for_misleading_indentation.
4011 (c_parser_else_body): Likewise, adding param "else_loc".
4012 (c_parser_if_statement): Check for misleading indentation.
4013 (c_parser_while_statement): Likewise.
4014 (c_parser_for_statement): Likewise.
4015
755e528f
MP
40162015-05-08 Marek Polacek <polacek@redhat.com>
4017
4018 PR c/64918
4019 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
4020 (output_init_element): Likewise.
4021
0173bd2a
MP
40222015-05-07 Marek Polacek <polacek@redhat.com>
4023
4024 PR c/65179
4025 * c-typeck.c (build_binary_op): Warn when left shifting a negative
4026 value.
4027
9babc352
MP
40282015-04-30 Marek Polacek <polacek@redhat.com>
4029
4030 * c-typeck.c (set_init_label): Call error_at instead of error and
4031 pass LOC to it.
4032
ac9f18db
MP
4033 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
4034 the type of a decl.
4035
ec3fba51
MP
4036 * c-typeck.c (c_build_va_arg): Clarify the error message.
4037
b811915d
TS
40382015-04-29 Thomas Schwinge <thomas@codesourcery.com>
4039
4040 * c-parser.c (c_parser_oacc_enter_exit_data): Use
4041 OMP_STANDALONE_CLAUSES.
4042
f3075008
MP
40432015-04-28 Marek Polacek <polacek@redhat.com>
4044
4045 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
4046
4e81b788
MP
40472015-04-28 Marek Polacek <polacek@redhat.com>
4048
4049 PR c/65901
4050 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
4051
6c1db78e
MP
40522015-04-25 Marek Polacek <polacek@redhat.com>
4053
4054 PR c/52085
4055 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
4056 attribute.
4057
5c4abbb8
MP
40582015-04-23 Marek Polacek <polacek@redhat.com>
4059
4060 PR c/65345
4061 * c-decl.c (set_labels_context_r): New function.
4062 (store_parm_decls): Call it via walk_tree_without_duplicates.
4063 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
4064 instead of create_tmp_var. Build TARGET_EXPR instead of
4065 COMPOUND_EXPR.
4066 (build_atomic_assign): Use create_tmp_var_raw instead of
4067 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
4068
06aca1d5
IV
40692015-04-20 Ilya Verbin <ilya.verbin@intel.com>
4070
4071 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
4072 (c_parser_omp_target_update): Add missed %> to error_at ().
4073
8fba1830
BRF
40742015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
4075
4076 PR target/55143
4077 * c-decl.c (c_default_pointer_mode): Remove definition.
4078 * c-tree.h (c_default_pointer_mode): Remove declaration.
4079
62021f64
TB
40802015-03-27 Tobias Burnus <burnus@net-b.de>
4081
4082 PR c/65586
4083 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
4084 error out.
4085 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
4086 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
4087 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
4088
9b65e171
JJ
40892015-03-19 Jakub Jelinek <jakub@redhat.com>
4090
4091 * c-decl.c (c_decl_attributes): Also add "omp declare target"
4092 attribute for DECL_EXTERNAL VAR_DECLs.
4093
17958621
JJ
40942015-03-11 Jakub Jelinek <jakub@redhat.com>
4095
4096 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
4097 argument.
4098
7ccb1a11
JJ
40992015-03-10 Jakub Jelinek <jakub@redhat.com>
4100
4101 PR c/65120
4102 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
4103 before preparing arguments to warn_logical_not_parentheses.
4104
01177669
JJ
41052015-03-09 Jakub Jelinek <jakub@redhat.com>
4106
4107 PR c/65120
4108 * c-typeck.c (parser_build_binary_op): Don't warn for
4109 !!x == y or !b == y where b is _Bool.
4110
802ac282
MP
41112015-03-09 Marek Polacek <polacek@redhat.com>
4112
4113 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
4114 * c-decl.c (grokdeclarator): Likewise.
4115 * c-typeck.c (build_binary_op): Likewise.
4116
e5165b60
MP
41172015-02-27 Marek Polacek <polacek@redhat.com>
4118
4119 PR c/65228
4120 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
4121
065d214c
MP
41222015-02-14 Marek Polacek <polacek@redhat.com>
4123
4124 PR c/64768
4125 * c-decl.c (grokdeclarator): Set the range of a flexible array member
4126 declared through a typedef name.
4127
e5d9235b
MP
41282015-02-13 Marek Polacek <polacek@redhat.com>
4129
4130 PR c/65050
4131 * c-decl.c (grokdeclarator): Print also the type when giving
4132 the error message about array's incomplete element type.
4133
fa01ffcc
JJ
41342015-02-11 Jakub Jelinek <jakub@redhat.com>
4135
4136 PR c/64824
4137 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
4138 check in the POP macro.
4139
c3e38a03
MP
41402015-02-09 Marek Polacek <polacek@redhat.com>
4141
4142 PR c/64856
4143 * c-typeck.c (process_init_element): Don't always wrap
4144 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
4145 initializing a range of elements.
4146
4886ec8e
JJ
41472015-02-04 Jakub Jelinek <jakub@redhat.com>
4148
4149 PR c/64824
4150 PR c/64868
4151 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
4152
c3e38a03 41532015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
4154
4155 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
4156 processing enum declaration.
4157
7b33f0c8
MP
41582015-01-29 Marek Polacek <polacek@redhat.com>
4159
4160 PR c/64709
4161 * c-typeck.c (pop_init_level): If constructor_elements has
4162 exactly one element with integer_zerop value, set constructor_zeroinit
4163 to 1. Remove braces around warning_init call.
4164
dea63e49
JJ
41652015-01-27 Jakub Jelinek <jakub@redhat.com>
4166
4167 PR c/64766
4168 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
4169 of FUNCTION_DECLs with error_mark_node.
4170
d38f7dce
JJ
41712015-01-26 Jakub Jelinek <jakub@redhat.com>
4172
4173 PR c/64778
4174 * c-typeck.c (convert_arguments): Return -1 if there are
4175 error_args, even if we've diagnosed too many arguments.
4176
cbf5d0e7
RB
41772015-01-21 Richard Biener <rguenther@suse.de>
4178
4179 PR middle-end/64313
4180 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
4181 for builtins the user declared correctly.
4182
41dbbb37
TS
41832015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4184 Bernd Schmidt <bernds@codesourcery.com>
4185 Cesar Philippidis <cesar@codesourcery.com>
4186 James Norris <jnorris@codesourcery.com>
4187 Jakub Jelinek <jakub@redhat.com>
4188 Ilmir Usmanov <i.usmanov@samsung.com>
4189
4190 * c-parser.c: Include "gomp-constants.h".
4191 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
4192 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
4193 Use OMP_CLAUSE_SET_MAP_KIND.
4194 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
4195 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
4196 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
4197 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
4198 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
4199 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
4200 "copyout", "create", "delete", "deviceptr", "gang", "host",
4201 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
4202 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
4203 "present_or_create", "pcreate", "seq", "self", "vector",
4204 "vector_length", "wait", "worker".
4205 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
4206 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
4207 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
4208 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
4209 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
4210 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
4211 (c_parser_oacc_data_clause_deviceptr)
4212 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
4213 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
4214 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
4215 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
4216 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
4217 (c_parser_oacc_parallel, c_parser_oacc_update)
4218 (c_parser_oacc_wait): New functions.
4219 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
4220 (c_finish_oacc_data): New prototypes.
4221 * c-typeck.c: Include "gomp-constants.h".
4222 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
4223 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
4224 OMP_CLAUSE_SET_MAP_KIND.
4225 (c_finish_oacc_parallel, c_finish_oacc_kernels)
4226 (c_finish_oacc_data): New functions.
4227 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
4228 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
4229 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
4230 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
4231 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
4232 GOMP_MAP_FORCE_DEVICEPTR.
4233
adfac8df
JJ
42342015-01-09 Michael Collison <michael.collison@linaro.org>
4235
4236 * c-array-notation.c: Include hash-set.h, machmode.h,
4237 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4238 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
4239 * c-aux-info.c: Ditto.
4240 * c-convert.c: Ditto.
4241 * c-decl.c: Ditto.
4242 * c-errors.c: Ditto.
4243 * c-lang.c: Dittoxs.
4244 * c-objc-common.c: Ditto.
4245 * c-parser.c: Ditto.
4246 * c-typeck.c: Include hash-set.h, machmode.h,
4247 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4248 fold-const.h, wide-int.h, inchash.h, real.h and
4249 fixed-value.h due to flattening of tree.h.
4250
2cc901dc
MP
42512015-01-07 Marek Polacek <polacek@redhat.com>
4252
4253 PR c/64417
4254 * c-typeck.c (process_init_element): Disallow initialization of
4255 a flexible array member with a string constant if the structure
4256 is in an array.
4257
5624e564
JJ
42582015-01-05 Jakub Jelinek <jakub@redhat.com>
4259
e5341100
JJ
4260 PR sanitizer/64344
4261 * c-typeck.c (convert_for_assignment, c_finish_return): For
4262 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
4263 types also set in_late_binary_op around convert call.
4264 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
4265 to integral type casts, if not in_late_binary_op, pass c_fully_fold
4266 result on expr as last argument to ubsan_instrument_float_cast,
4267 if in_late_binary_op, don't use c_save_expr but save_expr.
4268
5624e564
JJ
4269 Update copyright years.
4270
5bd012f8
MP
42712015-01-05 Marek Polacek <polacek@redhat.com>
4272
4273 PR c/64423
4274 * c-typeck.c (build_array_ref): Pass loc down to
4275 warn_array_subscript_with_type_char.
4276
3f8257db 42772014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
4278
4279 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 4280 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 4281 element type.
8e745a17 4282 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 4283 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 4284 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 4285 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 4286 to PEDWARN_FOR_QUALIFIERS.
768952be 4287
8f94a8c4
JJ
42882014-12-17 Jakub Jelinek <jakub@redhat.com>
4289
4290 PR sanitizer/64289
4291 * c-convert.c: Include ubsan.h.
4292 (convert): For real -> integral casts and
4293 -fsanitize=float-cast-overflow don't call convert_to_integer, but
4294 instead instrument the float cast directly.
4295
b731b390
JJ
42962014-11-29 Jakub Jelinek <jakub@redhat.com>
4297
4298 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
4299 c_finish_stmt_expr): Remove NULL last argument from
4300 create_tmp_var_raw and create_tmp_var calls.
4301 * c-array-notation.c (fix_builtin_array_notation_fn,
4302 build_array_notation_expr, fix_conditional_array_notations_1,
4303 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
4304
541e35a6
MP
43052014-11-28 Marek Polacek <polacek@redhat.com>
4306
4307 PR c/63862
4308 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
4309 convert the right operand to integer type.
4310
b286be94
MP
43112014-11-25 Marek Polacek <polacek@redhat.com>
4312
4313 PR c/63877
4314 * c-decl.c (start_function): Disable -Wmissing-declarations warning
4315 for inline functions.
4316
aa7da51a
JJ
43172014-11-21 Jakub Jelinek <jakub@redhat.com>
4318
4319 PR target/63764
4320 * c-typeck.c (build_array_ref): Adjust
4321 convert_vector_to_pointer_for_subscript caller. If it returns true,
4322 call non_lvalue_loc on the result.
4323
d876207f
RB
43242014-11-11 Richard Biener <rguenther@suse.de>
4325
4326 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
4327 to true.
4328
e5e44252
AK
43292014-11-10 Andi Kleen <ak@linux.intel.com>
4330
4331 PR c/60804
4332 * c-parser.c (c_parser_statement_after_labels): Call
4333 check_no_cilk.
4334 (c_parser_if_statement): Dito.
4335 (c_parser_switch_statement): Dito.
4336 (c_parser_while_statement): Dito.
4337 (c_parser_do_statement): Dito.
4338 (c_parser_for_statement): Dito.
4339 * c-typeck.c (c_finish_loop): Dito.
4340
13c21655
PC
43412014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
4342
4343 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
4344 OPT_Wshift_count_overflow in the warnings.
4345
2d51fcef
MP
43462014-10-30 Marek Polacek <polacek@redhat.com>
4347
4348 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
4349 print the stripped version as well, if they're not the same.
4350
ef4bddc2
RS
43512014-10-29 Richard Sandiford <richard.sandiford@arm.com>
4352
4353 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
4354 machine_mode.
4355
c582198b
AM
43562014-10-28 Andrew MacLeod <amacleod@redhat.com>
4357
4358 * c-decl.c: Adjust include files.
4359 * c-parser.c: Ditto.
4360
ddc8de03
PM
43612014-10-27 Phil Muldoon <pmuldoon@redhat.com>
4362 Tom Tromey <tromey@redhat.com>
4363
4364 * c-tree.h (enum c_oracle_request): New.
4365 (c_binding_oracle_function): New typedef.
4366 (c_binding_oracle, c_pushtag, c_bind): Declare.
4367 * c-decl.c (c_binding_oracle): New global.
4368 (I_SYMBOL_CHECKED): New macro.
4369 (i_symbol_binding): New function.
4370 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
4371 (I_TAG_CHECKED): New macro.
4372 (i_tag_binding): New function.
4373 (I_TAG_BINDING, I_TAG_DECL): Redefine.
4374 (I_LABEL_CHECKED): New macro.
4375 (i_label_binding): New function.
4376 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
4377 (c_print_identifier): Save and restore c_binding_oracle.
4378 (c_pushtag, c_bind): New functions.
4379
60393bbc
AM
43802014-10-27 Andrew MacLeod <amacleod@redhat.com>
4381
4382 * c-typeck.c: Adjust include files.
4383
d723bb7c
MLI
43842014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
4385
4386 PR c++/53061
4387 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
4388 initialization here...
4389 (c_initialize_diagnostics): ... but here. Set defaults after
4390 building pretty-printer.
4391
1bc5a451
MP
43922014-10-23 Marek Polacek <polacek@redhat.com>
4393
4394 PR c/63626
4395 * c-decl.c (pop_scope): Don't print warning in external_scope.
4396
4435bb92
MP
43972014-10-19 Marek Polacek <polacek@redhat.com>
4398
4399 PR c/63567
4400 * c-typeck.c (output_init_element): Allow initializing objects with
4401 static storage duration with compound literals even in C99 and add
4402 pedwarn for it.
4403
7278465e
MP
44042014-10-17 Marek Polacek <polacek@redhat.com>
4405
4406 PR c/63567
4407 * c-typeck.c (digest_init): Allow initializing objects with static
4408 storage duration with compound literals even in C99 and add pedwarn
4409 for it.
4410
d9b7be2e
MP
44112014-10-17 Marek Polacek <polacek@redhat.com>
4412
4413 PR c/63543
4414 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
4415 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
4416 error multiple times. Print the type.
4417
f406ae1f
MP
44182014-10-17 Marek Polacek <polacek@redhat.com>
4419
4420 PR c/63549
4421 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
4422 type.
4423
92574c7c
MP
44242014-10-17 Marek Polacek <polacek@redhat.com>
4425
4426 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
4427 (start_function): Use OPT_Wimplicit_int instead of 0.
4428 (store_parm_decls_oldstyle): Likewise.
4429
1bc4a978
MT
44302014-10-17 Alan Modra <amodra@gmail.com>
4431
4432 PR middle-end/61848
4433 * c-decl.c (merge_decls): Don't merge section name or tls model
4434 to newdecl symtab node, instead merge to olddecl. Override
4435 existing olddecl section name. Set tls_model for all thread-local
4436 vars, not just OMP thread-private ones. Remove incorrect comment.
4437
83685514
AM
44382014-10-16 Andrew MacLeod <amacleod@redhat.com>
4439
4440 * c-decl.c: Adjust include files.
4441
78a7c317
DD
44422014-10-14 DJ Delorie <dj@redhat.com>
4443
4444 * c-parser.c (c_parse_init): Add RID entries for each __intN.
4445 (c_token_starts_typename): Check all __intN, not just __int128.
4446 (c_token_starts_declspecs): Likewise.
4447 (c_parser_declspecs): Likewise.
4448 (c_parser_attribute_any_word): Likewise.
4449 (c_parser_objc_selector): Likewise.
4450 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
4451 (struct c_declspecs): Add int_n_idx field to record *which* __intN
4452 is specified.
4453 * c-decl.c (declspecs_add_type): Check for all __intN, not just
4454 __int128.
4455 (finish_declspecs): Likewise.
4456
74d98c1e
AB
44572014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
4458
8e745a17 4459 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 4460 the duplicate code.
8e745a17 4461 (c_parser_statement): Call the new function.
74d98c1e 4462
84937de2
MP
44632014-10-09 Marek Polacek <polacek@redhat.com>
4464
4465 PR c/63480
4466 * c-typeck.c (pop_init_level): Don't warn about initializing
4467 with { }.
4468
0382aaa0
MP
44692014-10-07 Marek Polacek <polacek@redhat.com>
4470
4471 PR c/59717
4472 * c-decl.c (header_for_builtin_fn): New function.
4473 (implicitly_declare): Suggest which header to include.
4474
7a0ca710
MP
44752014-10-07 Marek Polacek <polacek@redhat.com>
4476
4477 * c-convert.c (convert): Use error_operand_p.
4478 * c-typeck.c (require_complete_type): Likewise.
4479 (really_atomic_lvalue): Likewise.
4480 (digest_init): Likewise.
4481 (handle_omp_array_sections_1): Likewise.
4482
6bc8a126
MP
44832014-10-03 Marek Polacek <polacek@redhat.com>
4484
4485 PR c/63453
4486 * c-decl.c (pop_scope): Don't warn about "inline function declared
4487 but never defined" for functions marked with gnu_inline attribute.
4488
d90c0a59
JJ
44892014-09-25 Jakub Jelinek <jakub@redhat.com>
4490
4491 PR c++/63249
4492 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
4493 on low_bound and length.
4494
083e891e
MP
44952014-09-24 Marek Polacek <polacek@redhat.com>
4496
4497 PR c/61405
4498 PR c/53874
4499 * c-parser.c: Don't define CPP_KEYWORD.
4500 (c_parser_switch_statement): Pass original type to c_finish_case.
4501 * c-tree.h (c_finish_case): Update declaration.
4502 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
4503 conditionally to c_do_switch_warnings.
4504
8d95fe25
MP
45052014-09-03 Marek Polacek <polacek@redhat.com>
4506
4507 PR c/62024
4508 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
4509 conversions.
4510
9a771876
JJ
45112014-09-02 Jakub Jelinek <jakub@redhat.com>
4512 Balaji V. Iyer <balaji.v.iyer@intel.com>
4513 Igor Zamyatin <igor.zamyatin@intel.com>
4514
4515 * c-parser.c (c_parser_cilk_for): New function.
4516 (c_parser_cilk_grainsize): Likewise.
4517 (c_get_temp_regvar): Likewise.
4518 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
4519 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
4520 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
4521 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
4522 case.
4523
b7679d96
CG
45242014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
4525
4526 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
4527 with using HOST_WIDE_INT without truncation to 'int'
4528
59ea0364
MP
45292014-08-22 Marek Polacek <polacek@redhat.com>
4530
4531 PR c++/62199
4532 * c-typeck.c (parser_build_binary_op): Adjust call to
4533 warn_logical_not_parentheses.
4534
671a475e
IZ
45352014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
4536
4537 PR other/62008
4538 * c-parser.c (c_parser_array_notation): Check for correct
4539 type of an array added.
4540
04159acf
MP
45412014-08-19 Marek Polacek <polacek@redhat.com>
4542
4543 PR c++/62153
4544 * c-typeck.c (build_binary_op): If either operand of a comparison
4545 is a boolean expression, call maybe_warn_bool_compare.
4546
c77935ee
PP
45472014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
4548
4549 PR c/45584
4550 * c-typeck.c (build_c_cast): Do a conversion even when the
4551 TYPE_MAIN_VARIANTs are the same.
4552
35aff4fb
MP
45532014-08-19 Marek Polacek <polacek@redhat.com>
4554
4555 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
4556 pedwarn_c99 instead of pedwarn.
4557 (grokfield): Likewise.
4558 (warn_defaults_to): New function.
4559 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
4560 Unconditionally call pedwarn_c99 instead of pedwarn.
4561 (start_function): Call warn_defaults_to instead of pedwarn_c99.
4562 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
4563 check flag_isoc11 before.
4564 * c-errors.c (pedwarn_c99): Change the return type to bool.
4565 Handle -Wc99-c11-compat.
4566 * c-parser.c (disable_extension_diagnostics): Handle
4567 warn_c99_c11_compat.
4568 (restore_extension_diagnostics): Likewise.
4569 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
4570 instead of pedwarn, don't check flag_isoc11 before.
4571 (c_parser_declspecs): Likewise.
4572 (c_parser_alignas_specifier): Likewise.
4573 (c_parser_alignof_expression): Likewise.
4574 (c_parser_generic_selection): Likewise.
4575 * c-tree.h (pedwarn_c99): Update declaration.
4576 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
4577 of pedwarn_c99.
4578
177cce46
MP
45792014-08-19 Marek Polacek <polacek@redhat.com>
4580
4581 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
4582 to pedwarn_c90.
4583 * c-errors.c: Include "opts.h".
4584 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
4585 * c-parser.c (disable_extension_diagnostics): Handle negative value
4586 of warn_c90_c99_compat, too.
4587 (restore_extension_diagnostics): Likewise.
4588 (c_parser_compound_statement_nostart): Pass
4589 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
4590
6dc99c33
MP
45912014-08-12 Marek Polacek <polacek@redhat.com>
4592
4593 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
4594 Add pedwarn.
4595 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
4596 Likewise.
4597 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
4598
3f8257db 45992014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
4600
4601 PR c/51849
4602 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
4603 Call pedwarn_c90 instead of pedwarn.
4604 (check_bitfield_type_and_width): Likewise.
4605 (declspecs_add_qual): Likewise.
4606 (declspecs_add_type): Likewise.
4607 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
4608 Adjust to only call pedwarn_c90.
4609 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
4610 pedwarn_c90 instead of pedwarn.
4611 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
4612 * c-parser.c (disable_extension_diagnostics): Handle
4613 warn_c90_c99_compat.
4614 (restore_extension_diagnostics): Likewise.
4615 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
4616 pedwarn_c90 instead of pedwarn.
4617 (c_parser_initelt): Likewise.
4618 (c_parser_postfix_expression): Likewise.
4619 (c_parser_postfix_expression_after_paren_type): Likewise.
4620 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
4621 * c-tree.h: Fix formatting.
4622 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
4623 pedwarn_c90 instead of pedwarn.
4624
9f25a338
TS
46252014-08-07 Trevor Saunders <tsaunders@mozilla.com>
4626
4627 * c-typeck.c: Remove include of pointer-set.h.
4628
044331a8
MP
46292014-08-07 Marek Polacek <polacek@redhat.com>
4630
4631 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
4632
b787e7a2
TS
46332014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4634
4635 * c-typeck.c: Use hash_map instead of pointer_map.
4636
6e2830c3
TS
46372014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4638
4639 * c-decl.c: Use hash_set instead of pointer_set.
4640
a7ee52fb
IZ
46412014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
4642
4643 PR middle-end/61455
4644 * c-array-notation.c (expand_array_notations): Handling
4645 of DECL_EXPR added.
4646
b4dfdc11
MG
46472014-07-31 Marc Glisse <marc.glisse@inria.fr>
4648
4649 PR c++/60517
4650 * c-typeck.c (c_finish_return): Return 0 instead of the address of
4651 a local variable.
4652
976d5a22
TT
46532014-07-30 Tom Tromey <tromey@redhat.com>
4654
4655 * c-typeck.c (struct constructor_stack) <designator_depth>: New
4656 field.
4657 (really_start_incremental_init, push_init_level): Initialize
4658 designator_depth.
4659 (pop_init_level): Set global designator_depth.
4660 (process_init_element): Check for designated_init attribute.
4661
30281de2
MP
46622014-07-20 Marek Polacek <polacek@redhat.com>
4663
4664 PR c/61852
4665 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
4666 (implicitly_declare): Pass location to implicit_decl_warning.
4667
b108f48f
JJ
46682014-07-14 Jakub Jelinek <jakub@redhat.com>
4669
4670 PR middle-end/61294
4671 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
4672 If non-NULL, call c_parser_check_literal_zero.
4673 (c_parser_check_literal_zero): New function.
4674 (c_parser_postfix_expression_after_primary): Adjust
4675 c_parser_expr_list caller, handle -Wmemset-transposed-args.
4676
773ec47f
MP
46772014-07-06 Marek Polacek <polacek@redhat.com>
4678
4679 PR c/6940
4680 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4681 * c-tree.h (C_ARRAY_PARAMETER): Define.
4682 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4683 function parameter.
4684
22e1cf1c 46852014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 4686 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
4687
4688 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4689 releasing symbol.
4690
52ec0ea3
MP
46912014-07-01 Marek Polacek <polacek@redhat.com>
4692
4693 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4694 instead of 0 to WARN_FOR_ASSIGNMENT.
4695
d5c3d343
MP
46962014-07-01 Marek Polacek <polacek@redhat.com>
4697
4698 PR c/58286
4699 * c-typeck.c (convert_for_assignment): Pass
4700 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4701
6a7253a4
MP
47022014-06-30 Marek Polacek <polacek@redhat.com>
4703
4704 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4705 has no_sanitize_undefined attribute.
4706
5e88a8f4
IZ
47072014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
4708
4709 PR middle-end/57541
4710 * c-array-notation.c (fix_builtin_array_notation_fn):
4711 Check for 0 arguments in builtin call. Check that bultin argument is
4712 correct.
4713 * c-parser.c (c_parser_array_notation): Check for incorrect initial
4714 index.
4715
9698b078
SH
47162014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
4717
4718 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
4719 qualifiers in __auto_type for atomic types.
4720 (c_parser_typeof_specifier): Discard all type qualifiers in
4721 __typeof__ for atomic types.
4722
6e07c515
MP
47232014-06-25 Marek Polacek <polacek@redhat.com>
4724
4725 PR c/61162
4726 * c-parser.c (c_parser_statement_after_labels): Pass the location of
4727 the return expression to c_finish_return.
4728
da6f124d
JJ
47292014-06-25 Jakub Jelinek <jakub@redhat.com>
4730
4731 * c-typeck.c (c_finish_omp_clauses): Make sure
4732 OMP_CLAUSE_LINEAR_STEP has correct type.
4733
c203e8a7
TS
47342014-06-24 Trevor Saunders <tsaunders@mozilla.com>
4735
4736 * c-decl.c: Adjust.
4737
56ad0e38
JJ
47382014-06-24 Jakub Jelinek <jakub@redhat.com>
4739
4740 * c-parser.c (c_parser_omp_for_loop): For
4741 #pragma omp parallel for simd move lastprivate clause from parallel
4742 to for rather than simd.
4743
47c2554f
MP
47442014-06-23 Marek Polacek <polacek@redhat.com>
4745
4746 * c-typeck.c (parser_build_binary_op): Don't call
4747 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
4748
56363ffd
JH
47492014-06-15 Jan Hubicka <hubicka@ucw.cz>
4750
4751 * c-parser.c (c_parser_omp_threadprivate): Likewise.
4752 * c-decl.c (merge_decls): Likewise.
4753
d7ff7ae5
MP
47542014-06-09 Marek Polacek <polacek@redhat.com>
4755
4756 PR c/36446
4757 * c-typeck.c (error_init): Call inform instead of error_at.
4758 (pedwarn_init): Call inform instead of pedwarn.
4759 (warning_init): Call inform instead of warning_at.
4760
24d047a3
JH
47612014-06-07 Jan Hubicka <hubicka@ucw.cz>
4762
4763 * c-decl.c (merge_decls): Use set_decl_section_name.
4764 (duplicate_decls): Remove node if it exists.
4765
9bac5cbb
G
47662014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
4767
4768 PR c/53119
4769 * c-typeck.c (push_init_level, process_init_element,
4770 pop_init_level): Correct check for zero initialization, move
4771 missing brace warning to respect zero initialization.
4772
8ffcdea8
MP
47732014-06-05 Marek Polacek <polacek@redhat.com>
4774
4775 PR c/56724
4776 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
4777
742938c9
MP
47782014-06-05 Marek Polacek <polacek@redhat.com>
4779
4780 PR c/49706
4781 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
4782 on the left hand side operand of a comparison.
4783
6447c55d
MP
47842014-06-05 Marek Polacek <polacek@redhat.com>
4785
4786 PR c/48062
4787 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
4788 Print note only if the warning was printed.
4789
9dc7743c
IZ
47902014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
4791
4792 PR c/58942
4793 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4794 with a pointer.
4795
fedfecef
MP
47962014-06-03 Marek Polacek <polacek@redhat.com>
4797
4798 PR c/60439
4799 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4800 c_start_case.
4801 * c-tree.h (c_start_case): Update.
4802 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
4803 switch condition has boolean value.
4804
9b2b7279
AM
48052014-06-02 Andrew MacLeod <amacleod@redhat.com>
4806
4807 * c-decl.c: Include builtins.h.
4808 * c-parser.c: Likewise.
4809
5c1bc275
MP
48102014-05-27 Marek Polacek <polacek@redhat.com>
4811
4812 PR c/56724
4813 * c-typeck.c (convert_arguments): Get location of a parameter. Change
4814 error and warning calls to error_at and warning_at. Pass location of
4815 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
4816 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4817 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
4818
97563bc8
IZ
48192014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
4820
4821 PR c/61191
4822 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4823 function parameters.
4824
aede2c10
JH
48252014-05-23 Jan Hubicka <hubicka@ucw.cz>
4826
4827 * c-decl.c (merge_decls): Preserve symtab node pointers.
4828 (duplicate_decls): Free new decl.
4829
edbba2ce
TS
48302014-05-23 Thomas Schwinge <thomas@codesourcery.com>
4831
f3316c6d
TS
4832 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4833 initialization.
4834
edbba2ce
TS
4835 * c-parser.c (c_parser_omp_target): Return bool values.
4836
68c81f24
TS
48372014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4838
4839 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4840 num_teams_loc variable to num_thread_limit_loc.
4841
632f2871
RS
48422014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4843
4844 * c-array-notation.c (expand_array_notations): Use void_node
4845 instead of void_zero_node.
4846
766090c2
TS
48472014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4848
4849 * c-decl.c (finish_struct): Adjust.
4850 (finish_enum): Likewise.
4851 (bind): Adjust.
4852 (record_inline_static): Likewise.
4853 (push_scope): Likewise.
4854 (make_label): Likewise.
4855 (lookup_label_for_goto): Likewise.
4856 (finish_struct): Likewise.
4857 (finish_enum): Likewise.
4858 (store_parm_decls): Likewise.
4859 (c_push_function_context): Likewise.
4860 * c-lang.h: Remove usage of variable_size gty attribute.
4861 * c-parser.c (c_parse_init): Adjust.
4862 (c_parse_file): Likewise.
4863
2b107f6b
MP
48642014-05-13 Marek Polacek <polacek@redhat.com>
4865
4866 PR c/61162
4867 * c-typeck.c (convert_for_assignment): Pass location to
4868 WARN_FOR_ASSIGNMENT instead of input_location.
4869
d033409e
MP
48702014-05-10 Marek Polacek <polacek@redhat.com>
4871
4872 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4873 maybe_warn_string_init.
4874 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4875 maybe_warn_string_init.
4876 * c-tree.h (maybe_warn_string_init): Update declaration.
4877 * c-typeck.c (maybe_warn_string_init): Add location parameter.
4878 Call pedwarn_init with loc instead of with input_location.
4879 (digest_init): Pass init_loc to maybe_warn_string_init.
4880 (pop_init_level): Call pedwarn_init with loc instead of with
4881 input_location.
4882 (set_init_index): Likewise.
4883 (process_init_element): Likewise.
4884
ea58ef42
MP
48852014-05-09 Marek Polacek <polacek@redhat.com>
4886
4887 PR c/61096
4888 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4889 (c_parser_initelt): Pass location to set_init_label. Pass array index
4890 location to set_init_index.
4891 * c-tree.h (push_init_level): Update declaration.
4892 (pop_init_level): Likewise.
4893 (set_init_index): Likewise.
4894 (set_init_label): Likewise.
4895 * c-typeck.c (error_init): Add location parameter. Call error_at
4896 instead of error.
4897 (digest_init): Pass init_loc to error_init.
4898 (really_start_incremental_init):
4899 (push_init_level): Add location parameter. Pass loc to pop_init_level
4900 and error_init.
4901 (pop_init_level): Likewise.
4902 (set_designator): Add location parameter. Pass loc to pop_init_level,
4903 push_init_level, and error_init.
4904 (set_init_index): Add location parameter. Pass loc to error_init and
4905 set_designator.
4906 (set_init_label): Likewise.
4907 (output_init_element): Pass loc to error_init.
4908 (process_init_element): Pass loc to error_init, pop_init_level,
4909 pedwarn_init, and push_init_level.
4910
661a0813
MP
49112014-05-09 Marek Polacek <polacek@redhat.com>
4912
4913 PR c/50459
4914 * c-parser.c (c_parser_attributes): Parse the arguments as an
4915 expression-list if the attribute takes identifier.
4916
2793eeab
MP
49172014-05-08 Marek Polacek <polacek@redhat.com>
4918
4919 PR c/61053
4920 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4921 TYPE_ALIGN_UNIT.
4922
f827930a
MP
49232014-05-08 Marek Polacek <polacek@redhat.com>
4924
4925 PR c/61077
4926 * c-decl.c (start_function): Warn for _Atomic-qualified return type
4927 of main.
4928
1d60af08
KZ
49292014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4930 Mike Stump <mikestump@comcast.net>
4931 Richard Sandiford <rdsandiford@googlemail.com>
4932
4933 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4934 (finish_enum): Use wide-int interfaces.
4935 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4936 * c-typeck.c (build_c_cast): Likewise.
4937 (set_nonincremental_init_from_string): Likewise.
4938 (c_tree_equal): Likewise.
4939
a0e24419
MP
49402014-05-02 Marek Polacek <polacek@redhat.com>
4941
4942 PR c/25801
4943 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
4944 Return size_one_node when the type is not complete.
4945 (pointer_diff): Remove comment.
4946 (build_unary_op): Improve error messages.
4947
19fc9faa
MP
49482014-05-02 Marek Polacek <polacek@redhat.com>
4949
4950 * c-typeck.c (c_finish_return): Separate warning_at calls.
4951
63bc4e87
MP
49522014-05-02 Marek Polacek <polacek@redhat.com>
4953
4954 * c-tree.h (error_init): Remove declaration.
4955 (pedwarn_init): Likewise.
4956 * c-typeck.c (error_init): Make static and move above.
4957 (pedwarn_init): Likewise.
4958 (warning_init): Move above.
4959 (maybe_warn_string_init): Likewise.
4960
4bd2511b
JL
49612014-05-01 Jeff Law <law@redhat.com>
4962
4963 Revert:
4964
4965 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4966 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
4967 avoid goto.
4968
6a358dcb
MP
49692014-05-02 Marek Polacek <polacek@redhat.com>
4970
4971 PR c/60784
4972 * c-typeck.c (push_init_level): Set constructor_designated to
4973 p->designated for structures.
4974
ae5ebda4
MP
49752014-05-01 Marek Polacek <polacek@redhat.com>
4976
4977 PR c/60915
4978 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4979 function-definition has an attribute after the declarator.
4980
96b40f8d
MP
49812014-05-01 Marek Polacek <polacek@redhat.com>
4982
4983 PR c/60257
4984 * c-typeck.c (warning_init): Add location_t parameter. Call
4985 warning_at instead of warning.
4986 (push_init_level): Pass input_location to warning_init.
4987 (add_pending_init): Add location_t parameter. Pass loc to
4988 warning_init.
4989 (set_nonincremental_init): Pass input_location to add_pending_init.
4990 (set_nonincremental_init_from_string): Likewise.
4991 (output_init_element): Pass loc to warning_init and to
4992 add_pending_init.
4993
32e00768
MP
49942014-05-01 Marek Polacek <polacek@redhat.com>
4995
4996 PR c/43395
4997 * c-typeck.c (c_finish_return): Distinguish between label and variable
4998 when warning about returning local address.
4999
c9379ce2
MP
50002014-05-01 Marek Polacek <polacek@redhat.com>
5001
5002 PR c/29467
5003 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
5004 in C89 mode.
5005
d00887e8
MP
50062014-05-01 Marek Polacek <polacek@redhat.com>
5007
5008 PR c/43245
5009 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
5010 instead of 0 to WARN_FOR_QUALIFIERS.
5011
5436fa2e
MP
50122014-05-01 Marek Polacek <polacek@redhat.com>
5013
5014 PR c/56989
5015 * c-typeck.c (default_conversion): Use better location for
5016 error call.
5017
f8ed5150
MP
50182014-04-30 Marek Polacek <polacek@redhat.com>
5019
5020 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
5021 also when SANITIZE_FLOAT_DIVIDE is on.
5022
8337d1db
MP
50232014-04-30 Marek Polacek <polacek@redhat.com>
5024
5025 PR c/60139
5026 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
5027 and pedwarn_init. Use loc insted of input_location.
5028
c4bdc42f
MP
50292014-04-30 Marek Polacek <polacek@redhat.com>
5030
5031 PR c/60351
5032 * c-typeck.c (build_binary_op): Use location when warning about
5033 shift count.
5034
45484dcf
MP
50352014-04-25 Marek Polacek <polacek@redhat.com>
5036
5037 PR c/18079
5038 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
5039 always_inline/noinline and hot/cold attributes.
5040
34cf811f
MP
50412014-04-25 Marek Polacek <polacek@redhat.com>
5042
5043 PR c/60114
5044 * c-parser.c (c_parser_initelt): Pass input_location to
5045 process_init_element.
5046 (c_parser_initval): Pass loc to process_init_element.
5047 * c-tree.h (process_init_element): Adjust declaration.
5048 * c-typeck.c (push_init_level): Pass input_location to
5049 process_init_element.
5050 (pop_init_level): Likewise.
5051 (set_designator): Likewise.
5052 (output_init_element): Add location_t parameter. Pass loc to
5053 digest_init.
5054 (output_pending_init_elements): Pass input_location to
5055 output_init_element.
5056 (process_init_element): Add location_t parameter. Pass loc to
5057 output_init_element.
5058
42056eac
JJ
50592014-04-24 Jakub Jelinek <jakub@redhat.com>
5060
5061 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
5062 atomic-clause, allow comma in between atomic-clause and
5063 seq_cst.
5064
e162a134
JJ
50652014-04-22 Jakub Jelinek <jakub@redhat.com>
5066
5067 PR c/59073
5068 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
5069 fails, don't set OM_PARALLEL_COMBINED and return NULL.
5070
2f6babac
IZ
50712014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
5072
5073 PR middle-end/60469
5074 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5075 create_tmp_var instead build_decl for creating temps.
5076 (build_array_notation_expr): Likewise.
5077 (fix_conditional_array_notations_1): Likewise.
5078 (fix_array_notation_expr): Likewise.
5079 (fix_array_notation_call_expr): Likewise.
5080
8edbfaa6
JJ
50812014-03-28 Jakub Jelinek <jakub@redhat.com>
5082
5083 PR c++/60689
5084 * c-tree.h (c_build_function_call_vec): New prototype.
5085 * c-typeck.c (build_function_call_vec): Don't call
5086 resolve_overloaded_builtin here.
5087 (c_build_function_call_vec): New wrapper function around
5088 build_function_call_vec. Call resolve_overloaded_builtin here.
5089 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
5090 Call c_build_function_call_vec instead of build_function_call_vec.
5091 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
5092 * c-decl.c (finish_decl): Likewise.
5093
7485aeea
MLI
50942014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5095
5096 PR c/55383
5097 * c-typeck.c: Use correct format string in cast-qual warning
5098
b17a8b07
TS
50992014-03-07 Thomas Schwinge <thomas@codesourcery.com>
5100
5101 * c-decl.c (c_decl_attributes): Use
5102 lang_hooks.types.omp_mappable_type.
5103 * c-typeck.c (c_finish_omp_clauses): Likewise.
5104
3af9c5e9
MP
51052014-03-06 Marek Polacek <polacek@redhat.com>
5106
5107 PR c/60197
5108 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
5109 of checking tree code.
5110
1c9f5f33
PK
51112014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5112
5113 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
5114 (c_parser_parameter_declaration): Likewise.
5115
cc28fc7f
MP
51162014-02-19 Marek Polacek <polacek@redhat.com>
5117
5118 PR c/60195
5119 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
5120 Call mark_exp_read on exp.value.
5121 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
5122 TREE_ADDRESSABLE on old instead of val.
5123 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
5124
b581c05c
PK
51252014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5126
5127 * c-parser.c (c_parser_get_builtin_args): Replace calls to
5128 C_EXPR_APPEND by vec_safe_push.
5129 * c-tree.h (C_EXPR_APPEND): Remove.
5130
81e5eca8
MP
51312014-01-31 Marek Polacek <polacek@redhat.com>
5132
5133 PR c/59963
5134 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
5135 build_function_call_vec.
5136 (build_function_call): Likewise.
5137 (build_atomic_assign): Likewise.
5138 (build_function_call_vec): Add arg_loc parameter. Use it.
5139 (convert_arguments): Likewise.
5140 (convert_for_assignment): Rename rhs_loc to expr_loc.
5141 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
5142 (c_parser_objc_keywordexpr): Likewise.
5143 (c_parser_postfix_expression_after_primary): Call
5144 build_function_call_vec with expr_loc rather than op_loc.
5145 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
5146 build_function_call_vec.
5147 (c_parser_expr_list): Add locations parameter. Fill it with locations
5148 of function arguments.
5149 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
5150
68fca595
MP
51512014-01-30 Marek Polacek <polacek@redhat.com>
5152
5153 PR c/59940
5154 * c-typeck.c (build_function_call_vec): Use loc parameter.
5155 (convert_arguments): Add location parameter. Use it.
5156 (ep_convert_and_check): Likewise.
5157 (build_atomic_assign): Adjust convert_for_assignment call.
5158 (build_modify_expr): Likewise.
5159 (digest_init): Likewise.
5160 (c_finish_return): Likewise.
5161 (build_conditional_expr): Adjust ep_convert_and_check calls.
5162 (convert_for_assignment): Add rhs_loc parameter. Use it.
5163 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
5164 calls.
5165
fa337f3a
RB
51662014-01-30 Richard Biener <rguenther@suse.de>
5167
5168 PR c/59905
5169 * c-typeck.c (build_function_call_vec): Do not replace calls
5170 to a function via an incompatible type with a runtime abort.
5171
b72271b9
BI
51722014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
5173
5174 * c-parser.c (c_parser_declaration_or_fndef): Replaced
5175 flag_enable_cilkplus with flag_cilkplus.
5176 (c_parser_direct_declarator_inner): Likewise.
5177 (c_parser_attribute_any_word): Likewise.
5178 (c_parser_attributes): Likewise.
5179 (c_parser_compound_statement): Likewise.
5180 (c_parser_statement_after_labels): Likewise.
5181 (c_parser_if_statement): Likewise.
5182 (c_parser_switch_statement): Likewise.
5183 (c_parser_do_statement): Likewise.
5184 (c_parser_for_statement): Likewise.
5185 (c_parser_unary_expression): Likewise.
5186 (c_parser_postfix_expression): Likewise.
5187 (c_parser_postfix_expression_after_primary): Likewise.
5188 (c_parser_postfix_expression_after_primary): Likewise.
5189 (c_parser_omp_clause_name): Likewise.
5190 (c_finish_omp_declare_simd): Likewise.
5191 (c_parser_cilk_verify_simd): Likewise.
5192 * c-typeck.c (build_array_ref): Likewise.
5193 (build_function_call_vec): Likewise.
5194 (convert_arguments): Likewise.
5195 (build_compound_expr): Likewise.
5196 (c_finish_return): Likewise.
5197 (c_finish_if_stmt): Likewise.
5198 (c_finish_loop): Likewise.
5199 (build_binary_op): Likewise.
5200
393e8e8b
MP
52012014-01-23 Marek Polacek <polacek@redhat.com>
5202
5203 PR c/59846
5204 * c-typeck.c (parser_build_binary_op): Use location instead of
5205 input_location.
5206 (build_binary_op): Pass location to shorten_compare.
5207
f04dda30
MP
52082014-01-23 Marek Polacek <polacek@redhat.com>
5209
5210 PR c/58346
5211 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
5212 an empty aggregate.
5213
789eadcd
MP
52142014-01-23 Marek Polacek <polacek@redhat.com>
5215
5216 PR c/59871
5217 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
5218 of a comma expression.
5219 (emit_side_effect_warnings): Likewise.
5220
40f14e9f
BI
52212014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5222
5223 PR c/59825
5224 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
5225 function to use walk_tree and moved a lot of its functionality to
5226 expand_array_notations.
5227 (expand_array_notations): New function.
5228
74558dd9
BI
52292014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5230
5231 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
5232 attribute an attribute without value.
5233
652fea39
JJ
52342014-01-23 Jakub Jelinek <jakub@redhat.com>
5235
5236 PR middle-end/58809
5237 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
5238 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
5239
f34f1c87
MP
52402014-01-22 Marek Polacek <polacek@redhat.com>
5241
5242 PR c/59891
5243 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
5244 of remove_c_maybe_const_expr on op1 and op2.
5245
241f845a
JJ
52462014-01-15 Jakub Jelinek <jakub@redhat.com>
5247
5248 PR c/58943
5249 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
5250 effects, preevaluate rhs using SAVE_EXPR first.
5251
9a74f20c
BI
52522014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
5253
5254 PR c++/59631
5255 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
5256 statements with if-elseif statements.
5257
96066ce1
MP
52582014-01-06 Marek Polacek <polacek@redhat.com>
5259
5260 PR c/57773
5261 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
5262 defined bit-field types only in ISO C.
5263
23a5b65a
RS
52642014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5265
5266 Update copyright years
5267
f9030485
RS
52682014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5269
5270 * c-array-notation.c: Use the standard form for the copyright notice.
5271
41958c28
BI
52722013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
5273
5274 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
5275 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
5276 field in parser is not empty. If not-empty, call the function
5277 c_parser_finish_omp_declare_simd.
5278 (c_parser_cilk_clause_vectorlength): Modified function to be shared
5279 between SIMD-enabled functions and #pragma simd. Added new parameter.
5280 (c_parser_cilk_all_clauses): Modified the usage of the function
5281 c_parser_cilk_clause_vectorlength as mentioned above.
5282 (c_parser_cilk_simd_fn_vector_attrs): New function.
5283 (c_finish_cilk_simd_fn_tokens): Likewise.
5284 (is_cilkplus_vector_p): Likewise.
5285 (c_parser_omp_clause_name): Added checking for "vectorlength,"
5286 "nomask," and "mask" strings in clause name.
5287 (c_parser_omp_all_clauses): Added 3 new case statements:
5288 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
5289 PRAGMA_CILK_CLAUSE_NOMASK.
5290 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
5291 check for vector attribute and if so call the function
5292 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
5293 called the function c_finish_cilk_simd_fn_tokens.
5294 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
5295 parser field is non-empty. If so, parse them as you would parse
5296 the omp declare simd pragma.
5297 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
5298 Added a check when step is a parameter and flag it as error.
5299 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
5300 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
5301 pragma_omp_clause.
5302
cef0fd0e
TS
53032013-12-17 Thomas Schwinge <thomas@codesourcery.com>
5304
5305 * c-parser.c (c_parser_omp_parallel): Fix description.
5306
12893402
BI
53072013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
5308
5309 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
5310 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5311 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
5312 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
5313
296674db
JM
53142013-12-04 Joseph Myers <joseph@codesourcery.com>
5315
5316 PR c/52023
5317 * c-parser.c (c_parser_alignas_specifier): Use
5318 c_sizeof_or_alignof_type instead of c_alignof.
5319 (c_parser_alignof_expression): Likewise, with min_alignof
5320 parameter depending on alignof spelling used.
5321
edd28054
MP
53222013-12-04 Marek Polacek <polacek@redhat.com>
5323
5324 PR c/54113
5325 * c-decl.c (start_function): Don't warn for missing prototype for
5326 inline functions.
5327
da0fc454
MP
53282013-12-03 Marek Polacek <polacek@redhat.com>
5329
5330 PR c/59351
5331 * c-decl.c (build_compound_literal): Allow compound literals with
5332 empty initial value.
5333
4c2ecab0
JM
53342013-12-02 Joseph Myers <joseph@codesourcery.com>
5335
5336 PR c/58235
5337 * c-typeck.c (build_modify_expr): Diagnose assignment to
5338 expression with array type.
5339
340baef7
JM
53402013-11-29 Joseph Myers <joseph@codesourcery.com>
5341
5342 PR c/42262
5343 * c-typeck.c (process_init_element): Do not treat a string as
5344 initializing a whole array when used with a designator for an
5345 individual element.
5346
6763b9f7
JM
53472013-11-29 Joseph Myers <joseph@codesourcery.com>
5348
5349 PR c/57574
5350 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
5351 an inline function following a static declaration.
5352
e7bd1de1
JJ
53532013-11-28 Jakub Jelinek <jakub@redhat.com>
5354
5355 PR c/59310
5356 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
5357 to p_name before calling c_parser_omp_teams instead of after.
5358 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
5359 argument. Remove unused p_name variable.
5360
0136f8f0
AH
53612013-11-27 Aldy Hernandez <aldyh@redhat.com>
5362 Jakub Jelinek <jakub@redhat.com>
5363
5364 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
5365 external_scope is NULL.
5366
241b71bb
TV
53672013-11-27 Tom de Vries <tom@codesourcery.com>
5368 Marc Glisse <marc.glisse@inria.fr>
5369
5370 PR c++/59032
5371 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
5372
2fb9a547
AM
53732013-11-22 Andrew MacLeod <amacleod@redhat.com>
5374
5375 * c-typeck.c: Add required include files from gimple.h.
5376
8400e75e
DM
53772013-11-22 David Malcolm <dmalcolm@redhat.com>
5378
5379 * c-decl.c (define_label, shadow_tag_warned)
5380 (check_bitfield_type_and_width, grokdeclarator, grokparms,
5381 store_parm_decls_newstyle, store_parm_decls_oldstyle)
5382 (declspecs_add_type): Remove use of in_system_header macro.
5383 * c-parser.c (c_parser_unary_expression): Likewise.
5384 * c-typeck.c (store_init_value, process_init_element)
5385 (c_start_case): Likewise.
5386
5387 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
5388 macro.
5389
5390 * c-parser.c (c_parser_set_source_position_from_token): Remove
5391 reference to in_system_header from comment.
5392
386b1f1f
RS
53932013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5394
5395 * c-decl.c (grokdeclarator): Update comment to refer to
5396 tree_to_[su]hwi rather than tree_low_cst.
5397
ae7e9ddd
RS
53982013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5399
5400 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
5401 tree_to_uhwi throughout.
5402
9439e9a1
RS
54032013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5404
5405 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
5406 throughout.
5407
9541ffee
RS
54082013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5409
5410 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
5411 throughout.
5412
c02065fc
AH
54132013-11-15 Aldy Hernandez <aldyh@redhat.com>
5414
5415 * c-parser.c (c_parser_cilk_simd): New.
5416 (c_parser_cilk_verify_simd): New.
5417 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
5418 (c_parser_omp_for_loop): Add case for NE_EXPR.
5419 Set c_break_label for CILK_SIMD.
5420 (c_parser_cilk_clause_vectorlength): New.
5421 (c_parser_cilk_clause_linear): New.
5422 (c_parser_cilk_clause_name): New.
5423 (c_parser_cilk_all_clauses): New.
5424 * c-typeck.c (build_unary_op): Pass location argument to
5425 readonly_error.
5426 (build_modify_expr): Same.
5427 (build_asm_expr): Same.
5428 (c_finish_bc_stmt): Error on break/continue in loops.
5429
18f429e2
AM
54302013-11-14 Andrew MacLeod <amacleod@redhat.com>
5431
5432 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
5433
d8a2d370
DN
54342013-11-14 Diego Novillo <dnovillo@google.com>
5435
5436 * c-decl.c: Include print-tree.h.
5437 Include stor-layout.h.
5438 Include varasm.h.
5439 Include attribs.h.
5440 Include stringpool.h.
5441 * c-lang.c: Include fold-const.h.
5442 * c-parser.c: Include stringpool.h.
5443 Include attribs.h.
5444 Include stor-layout.h.
5445 Include varasm.h.
5446 Include trans-mem.h.
5447 * c-typeck.c: Include stor-layout.h.
5448 Include trans-mem.h.
5449 Include varasm.h.
5450 Include stmt.h.
5451
38b7bc7f
JM
54522013-11-13 Joseph Myers <joseph@codesourcery.com>
5453
5454 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
5455 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
5456 __auto_type.
5457 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
5458 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
5459 RID_AUTO_TYPE.
5460 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
5461 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
5462 (c_parser_declarator, c_parser_direct_declarator_inner)
5463 (c_parser_parameter_declaration, c_parser_type_name): All callers
5464 changed.
5465 (c_parser_declaration_or_fndef): Handle declarations with type
5466 determined from the initializer.
5467
45b0be94
AM
54682013-11-12 Andrew MacLeod <amacleod@redhat.com>
5469
18f429e2 5470 * c-typeck.c: Include gimplify.h.
45b0be94 5471
582d9b50
JM
54722013-11-12 Joseph Myers <joseph@codesourcery.com>
5473
5474 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
5475 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
5476 comment.
5477 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
5478 or _Thread_local as appropriate in diagnostics.
5479 (build_null_declspecs): Initialize ret->thread_gnu_p.
5480 (declspecs_add_scspec): Handle either __thread or _Thread_local
5481 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
5482 pedantic. Do not disallow _Thread_local extern and _Thread_local
5483 static.
5484
267bac10
JM
54852013-11-07 Joseph Myers <joseph@codesourcery.com>
5486 Andrew MacLeod <amacleod@redhat.com>
5487
5488 * c-aux-info.c (gen_type): Handle atomic qualifier.
5489 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
5490 qualifiers when compating types.
5491 (shadow_tag_warned): Handle atomic_p in declspecs.
5492 (quals_from_declspecs): Likewise.
5493 (start_decl): Use c_type_promotes_to when promoting argument
5494 types.
5495 (grokdeclarator): Handle _Atomic.
5496 (get_parm_info): Diagnose any qualifier on "void" as only
5497 parameter.
5498 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
5499 comparing types. Use c_type_promotes_to when promoting argument
5500 types.
5501 (finish_function): Use c_type_promotes_to when promoting argument
5502 types.
5503 (build_null_declspecs): Handle atomic_p in declspecs.
5504 (declspecs_add_qual): Handle RID_ATOMIC.
5505 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
5506 (c_token_starts_declspecs): Handle RID_ATOMIC.
5507 (c_parser_declspecs): Handle atomic type specifiers and
5508 qualifiers.
5509 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
5510 from types of expressions with atomic type.
5511 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
5512 (c_parser_attribute_any_word): Handle RID_ATOMIC.
5513 (c_parser_initializer, c_parser_initelt, c_parser_initval)
5514 (c_parser_statement_after_labels, c_parser_switch_statement)
5515 (c_parser_for_statement, c_parser_expr_no_commas)
5516 (c_parser_conditional_expression, c_parser_binary_expression)
5517 (c_parser_cast_expression, c_parser_unary_expression)
5518 (c_parser_postfix_expression)
5519 (c_parser_postfix_expression_after_primary, c_parser_expression):
5520 Use convert_lvalue_to_rvalue.
5521 (c_parser_expression_conv, c_parser_expr_list): Document
5522 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
5523 (c_parser_objc_synchronized_statement): Use
5524 convert_lvalue_to_rvalue.
5525 (c_parser_objc_selector): Handle RID_ATOMIC.
5526 (c_parser_objc_receiver, c_parser_array_notation): Use
5527 convert_lvalue_to_rvalue.
5528 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
5529 _Atomic (type-name).
5530 (struct c_declspecs): Add atomic_p field.
5531 (convert_lvalue_to_rvalue): Declare.
5532 * c-typeck.c (c_type_promotes_to): Promote atomic types to
5533 corresponding atomic types.
5534 (qualify_type): Don't add _Atomic qualifiers from second argument.
5535 (comp_target_types): Do not allow _Atomic mismatches.
5536 (type_lists_compatible_p): Do not remove atomic qualifiers when
5537 comparing types.
5538 (really_atomic_lvalue, convert_lvalue_to_rvalue)
5539 (build_atomic_assign): New functions.
5540 (build_unary_op): Use build_atomic_assign for atomic increment and
5541 decrement.
5542 (build_conditional_expr): Do not treat _Atomic void as a qualified
5543 version of void.
5544 (build_modify_expr): Use build_atomic_assign for atomic LHS.
5545 (find_anonymous_field_with_type, convert_to_anonymous_field)
5546 (convert_for_assignment): Do not remove atomic qualifiers when
5547 comparing types.
5548 (digest_init): Do not accept initialization of arrays of atomic
5549 elements by string constants.
5550 (build_asm_expr): Use convert_lvalue_to_rvalue.
5551 (build_binary_op): Do not treat _Atomic void as a qualified
5552 version of void.
5553
0c249d4b
DD
55542013-11-06 DJ Delorie <dj@redhat.com>
5555
5556 * c-decl.c (locate_old_decl): If a previous conflicting decl is
5557 both explicit and builtin, print the location of the explicit one.
5558
6d7f7e0a
TB
55592013-11-05 Tobias Burnus <burnus@net-b.de>
5560
5561 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
5562 c_parser_omp_distribute, c_parser_omp_teams,
5563 c_parser_omp_target, c_parser_omp_declare): Handle
5564 -fopenmp-simd.
5565
b906f4ca
MP
55662013-11-03 Marek Polacek <polacek@redhat.com>
5567
5568 * c-decl.c (grokdeclarator): Add VLA instrumentation.
5569
ee1d5a02
JJ
55702013-11-01 Jakub Jelinek <jakub@redhat.com>
5571
5572 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
5573 check_dup_generic at the end, unless remove is true.
5574 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
5575 remove = true;.
5576 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
5577
5a9785fb
JJ
55782013-10-31 Jakub Jelinek <jakub@redhat.com>
5579
5580 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
5581 with decl that is not pointer nor array.
5582
939b37da
BI
55832013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
5584
5585 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
5586 a spawning function is found.
5587 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
5588 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
5589 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5590 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
5591 case.
5592 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
5593 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
5594 expr.
5595 (c_finish_return): Added a check to reject _Cilk_spawn in return
5596 expression.
5597 (build_cilk_spawn): New function.
5598 (build_cilk_sync): Likewise.
5599 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
5600
d4af74d4
TB
56012013-10-27 Tobias Burnus <burnus@net-b.de>
5602
5603 PR other/33426
5604 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
5605 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
5606 (c_parser_statement_after_labels): Update calls.
5607
d73749df 56082013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
5609
5610 PR other/33426
5611 * c-parser.c (c_parser_pragma, c_parser_for_statement):
5612 Handle PRAGMA_IVDEP.
5613 (c_parser_statement_after_labels): Update call.
5614
f28aa681
MP
56152013-10-24 Marek Polacek <polacek@redhat.com>
5616
5617 * c-parser.c (c_parser_struct_declaration): Add a comment.
5618 (c_parser_declarator): Don't allow _Alignas here.
5619
0645c1a2
AM
56202013-10-17 Andrew MacLeod <amacleod@redhat.com>
5621
5622 * c-parser.c: Include omp-low.h.
5623 * c-typeck.c: Likewise.
5624
568a31f2
MP
56252013-10-17 Marek Polacek <polacek@redhat.com>
5626
5627 PR c/58267
5628 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
5629 Document syntax of the array-declarator.
5630 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
5631 are not permitted.
5632 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
5633 (c_parser_struct_declaration): Likewise.
5634 (c_parser_declarator): Likewise.
5635 (c_parser_direct_declarator_inner): Likewise.
5636 (c_parser_parameter_declaration): Likewise.
5637 (c_parser_type_name): Likewise.
5638
acf0174b
JJ
56392013-10-11 Jakub Jelinek <jakub@redhat.com>
5640
5641 * c-lang.h (current_omp_declare_target_attribute): New extern
5642 decl.
5643 * c-parser.c: Include c-lang.h.
5644 (struct c_parser): Change tokens to c_token *.
5645 Add tokens_buf field. Change tokens_avail type to unsigned int.
5646 (c_parser_consume_token): If parser->tokens isn't
5647 &parser->tokens_buf[0], increment parser->tokens.
5648 (c_parser_consume_pragma): Likewise.
5649 (enum pragma_context): Add pragma_struct and pragma_param.
5650 (c_parser_external_declaration): Adjust
5651 c_parser_declaration_or_fndef caller.
5652 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
5653 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
5654 Adjust recursive call.
5655 (c_parser_struct_or_union_specifier): Use pragma_struct instead
5656 of pragma_external.
5657 (c_parser_parameter_declaration): Use pragma_param instead of
5658 pragma_external.
5659 (c_parser_compound_statement_nostart, c_parser_label,
5660 c_parser_for_statement): Adjust
5661 c_parser_declaration_or_fndef callers.
5662 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
5663 it through to c_parser_conditional_expression.
5664 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
5665 pass it through to c_parser_binary_expression. Adjust recursive
5666 call.
5667 (c_parser_binary_expression): Remove prec argument, add
5668 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
5669 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
5670 binop matches it, use build2 instead of parser_build_binary_op.
5671 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
5672 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
5673 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
5674 Handle pragma_struct and pragma_param the same as pragma_external.
5675 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5676 (c_parser_omp_variable_list): Parse array sections for
5677 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5678 (c_parser_omp_clause_collapse): Fully fold collapse expression.
5679 (c_parser_omp_clause_reduction): Handle user defined reductions.
5680 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5681 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5682 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5683 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5684 c_parser_omp_clause_depend, c_parser_omp_clause_map,
5685 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5686 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5687 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5688 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
5689 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
5690 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5691 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
5692 (c_parser_omp_for_loop): Add CODE argument, pass it through
5693 to c_finish_omp_for. Change last argument to cclauses,
5694 and adjust uses to grab parallel clauses from the array of all
5695 the split clauses. Adjust c_parser_binary_expression,
5696 c_parser_declaration_or_fndef and c_finish_omp_for callers.
5697 (omp_split_clauses): New function.
5698 (c_parser_omp_simd): New function.
5699 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5700 Allow the function to be called also when parsing combined constructs,
5701 and call c_parser_omp_simd when parsing for simd.
5702 (c_parser_omp_sections_scope): If section-sequence doesn't start with
5703 #pragma omp section, require exactly one structured-block instead of
5704 sequence of statements.
5705 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5706 Allow the function to be called also when parsing combined constructs.
5707 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
5708 Allow the function to be called also when parsing combined
5709 constructs.
5710 (c_parser_omp_taskgroup, c_parser_omp_cancel,
5711 c_parser_omp_cancellation_point, c_parser_omp_distribute,
5712 c_parser_omp_teams, c_parser_omp_target_data,
5713 c_parser_omp_target_update, c_parser_omp_target,
5714 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
5715 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
5716 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
5717 (c_parser_omp_construct): Add p_name and mask vars. Handle
5718 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
5719 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
5720 and c_parser_omp_sections callers.
5721 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
5722 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5723 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5724 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
5725 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
5726 OMP_CLAUSE_DEPEND.
5727 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5728 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5729 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5730 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5731 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5732 * c-typeck.c: Include tree-inline.h.
5733 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5734 handle_omp_array_sections_1, handle_omp_array_sections,
5735 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5736 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5737 user defined reductions.
5738 (c_tree_equal): New function.
5739 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5740 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5741 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5742 c_check_omp_declare_reduction_r): New prototypes.
5743 * c-decl.c (current_omp_declare_target_attribute): New variable.
5744 (c_decl_attributes): New function.
5745 (start_decl, start_function): Use it instead of decl_attributes.
5746 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5747 c_omp_reduction_decl, c_omp_reduction_lookup,
5748 c_check_omp_declare_reduction_r): New functions.
5749
0a6c2227
TT
57502013-09-25 Tom Tromey <tromey@redhat.com>
5751
5752 * Make-lang.in (c/gccspec.o): Remove.
5753 (CFLAGS-c/gccspec.o): New variable.
5754 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
5755 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
5756 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5757
f3bc55f0
TT
57582013-09-25 Tom Tromey <tromey@redhat.com>
5759
5760 * Make-lang.in (c/gccspec.o): Don't use subshell.
5761
a24d975c
MP
57622013-09-18 Marek Polacek <polacek@redhat.com>
5763
5764 PR sanitize/58443
5765 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5766 Remove unnecessary check.
5767
ce6923c5
MP
57682013-09-18 Marek Polacek <polacek@redhat.com>
5769
5770 PR sanitizer/58411
5771 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
5772 no_sanitize_undefined attribute.
5773
a1e51df9
KT
57742013-09-13 Kai Tietz <ktietz@redhat.com>
5775
5776 PR target/57848
5777 * c-decl.c (c_builtin_function_ext_scope): Remove
5778 wrong assumption that it is never called on prexisting
5779 symbol.
5780
0af94e6f
JR
57812013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
5782
5783 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
5784
20059c8b
GDR
57852013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5786
5787 * c-objc-common.c (c_tree_printer): Tidy.
5788
de5a5fa1
MP
57892013-08-30 Marek Polacek <polacek@redhat.com>
5790
5791 * c-typeck.c (build_binary_op): Add division by zero and shift
5792 instrumentation.
5793
2531a1d9 57942013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 5795 Joseph Myers <joseph@codesourcery.com>
2531a1d9 5796
6e2bcc98 5797 PR c/35649
2531a1d9
JR
5798 * c-typeck.c (c_common_type): Prefer double_type_node over
5799 other REAL_TYPE types with the same precision.
5800 (convert_arguments): Likewise.
5801
025311c4
GDR
58022013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5803
5804 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
5805 (c_initialize_diagnostics): Call a destructor for the early printer.
5806
da6ca2b5
GDR
58072013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5808
5809 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5810 printer initialization.
5811
318cda85 58122013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 5813
318cda85
BI
5814 PR c/57490
5815 * c-array-notation.c (fix_conditional_array_notations_1): Added a
5816 check for truth values.
5817 (expand_array_notation_exprs): Added truth values case. Removed an
5818 unwanted else. Added for-loop to walk through subtrees in default
5819 case.
5820
b066401f
GDR
58212013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5822
5823 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5824
fb48aadc
JM
58252013-07-23 Joseph Myers <joseph@codesourcery.com>
5826
5827 * c-parser.c (struct c_generic_association): Fix typo.
5828
433cc7b0
TT
58292013-07-23 Tom Tromey <tromey@redhat.com>
5830 Joseph Myers <joseph@codesourcery.com>
5831
5832 * c-parser.c (struct c_generic_association): New.
5833 (c_generic_association_d): New typedef.
5834 (c_parser_generic_selection): New function.
5835 (c_parser_postfix_expression): Handle RID_GENERIC.
5836
26d40c3d
JM
58372013-07-13 Jason Merrill <jason@redhat.com>
5838
5839 PR c++/57793
5840 * c-decl.c (finish_struct): Check for too-large class.
5841
ecdbd01a 58422013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
5843
5844 PR c/57821
5845 * c-typeck.c (set_init_index): When folding, check for index overflow.
5846
1141ed3f
BI
58472013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5848
5849 * c-parser.c (c_parser_array_notation): Removed rejection of array
5850 notations in an array of function pointers.
5851
713b46fa
BI
58522013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5853
5854 * c-array-notation.c (make_triplet_val_inv): New function.
5855 (create_cmp_incr): Likewise.
5856 (create_array_refs): Likewise.
5857 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5858 Also modularized common parts between functions and called the function.
5859 (build_array_notation_expr): Likewise.
5860 (fix_conditional_array_notations_1): Likewise.
5861 (fix_array_notation_expr): Likewise.
5862 (fix_array_notation_call_expr): Likewise.
5863
92f20202
MP
58642013-06-18 Marek Polacek <polacek@redhat.com>
5865
5866 PR c/57630
5867 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5868
73a23b06
BI
58692013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
5870
5871 * c-array-notation.c (build_array_notation_expr): Reject array notation
5872 mismatch between LHS and RHS even inside a call_expr. Also, removed
5873 a couple while statements that were dead code.
5874
00b8517d
BI
58752013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
5876
5877 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5878 excessive precision expressions in function parameters. Also removed
5879 couple unwanted while statements.
5880
1509bdda
BI
58812013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5882
5883 * c-array-notation.c (expand_array_notation_exprs): Added
5884 ARRAY_NOTATION_REF case.
5885
d60f1706
BI
58862013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5887
5888 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5889 function to c-family/array-notation-common.c.
5890 (is_cilkplus_reduce_builtin): Likewise.
5891 (find_rank): Likewise.
5892 (extract_array_notation_exprs): Likewise.
5893 (replace_array_notations): Likewise.
5894 (find_inv_trees): Likewise.
5895 (replace_inv_trees): Likewise.
5896 (contains_array_notation_expr): Likewise.
5897 (find_correct_array_notation_type): Likewise.
5898 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5899 (struct inv_list): Moved this to c-family/array-notation-common.c.
5900 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5901
6d6efbb3
BI
59022013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
5903
5904 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5905 reduction functions outside the for-loop. Added a check if the fundecl
5906 is non-NULL. Finally, removed an unwanted if-statement, and made the
5907 body unconditional.
5908
25c22937
BI
59092013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5910
5911 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5912 condition of the if-statement matches the rank of else-block and then-
5913 block when array notations are used.
5914 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5915 expression after the entire function body is parsed.
5916 (c_parser_expr_no_commas): Delayed creating array notation expressions
5917 to the end of function parsing.
5918 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5919 whole if-statement instead of just the condition.
5920 (expand_array_notation_exprs): Added MODIFY_EXPR case.
5921
edd25645
BI
59222013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5923
5924 PR c/57474
5925 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5926 array to NULL_TREE if they are unused. Also added a check for the
5927 field to be NULL before its fields are used in future.
5928
065ce7f1
RO
59292013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5930
5931 PR bootstrap/57450
5932 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5933 (build_array_notation_expr): Likewise.
5934
36536d79
BI
59352013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5936
5937 * c-typeck.c (build_array_ref): Added a check to see if array's
5938 index is greater than one. If true, then emit an error.
5939 (build_function_call_vec): Exclude error reporting and checking
5940 for builtin array-notation functions.
5941 (convert_arguments): Likewise.
5942 (c_finish_return): Added a check for array notations as a return
5943 expression. If true, then emit an error.
5944 (c_finish_loop): Added a check for array notations in a loop
5945 condition. If true then emit an error.
5946 (lvalue_p): Added a ARRAY_NOTATION_REF case.
5947 (build_binary_op): Added a check for array notation expr inside
5948 op1 and op0. If present, we call another function to find correct
5949 type.
5950 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
5951 * c-parser.c (c_parser_compound_statement): Check if array
5952 notation code is used in tree, if so, then transform them into
5953 appropriate C code.
5954 (c_parser_expr_no_commas): Check if array notation is used in LHS
5955 or RHS, if so, then build array notation expression instead of
5956 regular modify.
5957 (c_parser_postfix_expression_after_primary): Added a check for
5958 colon(s) after square braces, if so then handle it like an array
5959 notation. Also, break up array notations in unary op if found.
5960 (c_parser_direct_declarator_inner): Added a check for array
5961 notation.
5962 (c_parser_compound_statement): Added a check for array notation in
5963 a stmt. If one is present, then expand array notation expr.
5964 (c_parser_if_statement): Likewise.
5965 (c_parser_switch_statement): Added a check for array notations in
5966 a switch statement's condition. If true, then output an error.
5967 (c_parser_while_statement): Similarly, but for a while.
5968 (c_parser_do_statement): Similarly, but for a do-while.
5969 (c_parser_for_statement): Similarly, but for a for-loop.
5970 (c_parser_unary_expression): Check if array notation is used in a
5971 pre-increment or pre-decrement expression. If true, then expand
5972 them.
5973 (c_parser_array_notation): New function.
5974 * c-array-notation.c: New file.
5975 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5976
cd192ccc
MS
59772013-05-23 Mike Stump <mikestump@comcast.net>
5978
5979 * c-typeck.c (convert_for_assignment): Handle references to memory
5980 spaces better.
5981
427b248d
JM
59822013-05-16 Jason Merrill <jason@redhat.com>
5983
5984 * Make-lang.in (cc1$(exeext)): Use link mutex.
5985
44d90fe1
PC
59862013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5987
5988 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5989 to simply use OPT_Wpointer_arith.
5990 (build_unary_op): Likewise.
5991
4e7d7b3d
JJ
59922013-04-03 Jakub Jelinek <jakub@redhat.com>
5993
5994 PR c/19449
5995 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
5996 argument. If set, or it temporarily for parsing of the first
5997 argument into force_folding_builtin_constant_p.
5998 (c_parser_postfix_expression): Adjust callers.
5999
839b422f
RB
60002013-03-21 Richard Biener <rguenther@suse.de>
6001
6002 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
6003 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
6004
2ee028f1
MP
60052013-02-12 Marek Polacek <polacek@redhat.com>
6006
6007 PR c/44938
6008 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
6009 origtypes to NULL.
6010
8824edff
JJ
60112013-01-24 Jakub Jelinek <jakub@redhat.com>
6012
6013 PR c/56078
6014 * c-typeck.c (set_nonincremental_init_from_string): If
6015 constructor_max_index is NULL, treat it as if tree_int_cst_lt
6016 returned false.
6017 (process_init_element): Likewise.
6018
eadd3d0d
JJ
60192012-12-20 Jakub Jelinek <jakub@redhat.com>
6020
6021 PR c++/55619
6022 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
6023 argument, don't call default_function_array_conversion
6024 nor c_fully_fold here.
6025 (c_parser_asm_statement): Adjust callers.
6026 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
6027 and outputs here, and call default_function_array_conversion
6028 on inputs that don't need to be addressable.
6029
f8a93a2e
JJ
60302012-12-18 Jakub Jelinek <jakub@redhat.com>
6031
6032 PR c/39464
6033 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
6034 warning require that both c_common_unsigned_type as well as
6035 c_common_signed_type is the same for both mvl and mvr types.
6036
9771b263
DN
60372012-11-16 Diego Novillo <dnovillo@google.com>
6038
6039 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
6040
6041 * c-common.c: Use new vec API in vec.h.
6042 * c-common.h: Likewise.
6043 * c-gimplify.c: Likewise.
6044 * c-pragma.c: Likewise.
6045 * c-pretty-print.c: Likewise.
6046 * c-pretty-print.h: Likewise.
6047 * c-semantics.c: Likewise.
6048 * c-decl.c: Likewise.
6049 * c-parser.c: Likewise.
6050 * c-tree.h: Likewise.
6051 * c-typeck.c: Likewise.
6052
880661a4
JW
60532012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
6054
6055 PR c++/54930
6056 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
6057
077d1abe
MLI
60582012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6059
6060 PR c/53066
6061 * c-decl.c (warn_if_shadowing): Do not warn if a variable
6062 shadows a function, unless the variable is a function or a
6063 pointer-to-function.
6064
3a785c97
JJ
60652012-10-12 Jakub Jelinek <jakub@redhat.com>
6066
6067 PR c/54381
6068 * c-parser.c (struct c_tree_loc_pair): Removed.
6069 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
6070 add location_t * and tree * arguments, fill in array of 3
6071 sizeof_arg trees and corresponding locs.
6072 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
6073 c_parser_expr_list callers.
6074 (c_parser_postfix_expression_after_primary): Likewise. Pass
6075 array of 3 sizeof_arg trees and locs (corresponding to first
6076 3 arguments) to sizeof_pointer_memaccess_warning.
6077
703c8606
LC
60782012-10-09 Lawrence Crowl <crowl@google.com>
6079
6080 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
6081 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
6082 hash table.
6083
5d9de0d0
PC
60842012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
6085
6086 PR c++/54194
6087 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
6088 call.
6089
a212e43f
MG
60902012-10-09 Marc Glisse <marc.glisse@inria.fr>
6091
6092 PR c++/54427
6093 * c-typeck.c: Include c-common.h.
6094 (enum stv_conv): Moved to c-common.h.
6095 (scalar_to_vector): Moved to c-common.c.
6096 (build_binary_op): Adapt to scalar_to_vector's new prototype.
6097 * Make-lang.in: c-typeck.c depends on c-common.h.
6098
3b78de56
AC
60992012-10-04 Arnaud Charlet <charlet@adacore.com>
6100
6101 * c-decl.c (c_write_global_declarations): Fix handling of
6102 -fdump-ada-spec*.
6103
78c60e3d
SS
61042012-09-30 Sharad Singhai <singhai@google.com>
6105
6106 * c-decl.c (c_write_global_declarations): Use a different method
6107 to determine if the dump has ben initialized.
6108
9f33203d
JM
61092012-09-14 Joseph Myers <joseph@codesourcery.com>
6110
6111 PR c/54552
6112 * c-typeck.c (c_cast_expr): When casting to a type requiring
6113 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
6114 c_fully_fold first.
6115
a27d595d
JM
61162012-09-14 Joseph Myers <joseph@codesourcery.com>
6117
6118 PR c/54103
6119 * c-typeck.c (build_unary_op): Pass original argument of
6120 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
6121 any C_MAYBE_CONST_EXPR, if it has integer operands.
6122 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
6123 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
6124 to c_objc_common_truthvalue_conversion, then remove any
6125 C_MAYBE_CONST_EXPR, if they have integer operands. Use
6126 c_objc_common_truthvalue_conversion not
6127 c_common_truthvalue_conversion.
6128 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
6129 call note_integer_operands for arguments with integer operands
6130 that are not integer constants.
6131
9feb29df
JJ
61322012-09-13 Jakub Jelinek <jakub@redhat.com>
6133
6134 PR c/54559
6135 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
6136 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
6137
d409320c
JJ
61382012-08-31 Jakub Jelinek <jakub@redhat.com>
6139
6140 PR c/54428
6141 * c-convert.c (convert): Don't call fold_convert_loc if
6142 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
6143 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
6144 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
6145
6265d07c
JJ
61462012-08-24 Jakub Jelinek <jakub@redhat.com>
6147
6148 PR c/54355
6149 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
6150 for nested and empty_ok arguments in the call to
6151 c_parser_declaration_or_fndef.
6152
1a4049e7
JJ
61532012-08-17 Jakub Jelinek <jakub@redhat.com>
6154
6155 * c-tree.h (c_last_sizeof_arg): Declare.
6156 * c-parser.c (struct c_tree_loc_pair): New type.
6157 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
6158 non-NULL.
6159 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
6160 (c_parser_postfix_expression_after_primary): Likewise. Call
6161 sizeof_pointer_memaccess_warning if needed.
6162 (sizeof_ptr_memacc_comptypes): New function.
6163 * c-typeck.c (c_last_sizeof_arg): New global variable.
6164 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
6165
0229aee9
UB
61662012-07-24 Uros Bizjak <ubizjak@gmail.com>
6167
6168 * c-lang.h (lang_decl): Add variable_size GTY option.
6169
7ee2468b
SB
61702012-07-16 Steven Bosscher <steven@gcc.gnu.org>
6171
6172 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
6173 * Make-lang.in: Fix dependencies.
6174
d4a10d0a
SB
61752012-06-29 Steven Bosscher <steven@gcc.gnu.org>
6176
6177 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
6178 and add language Makefile hooks.
6179 * config-lang.in: New file.
6180 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
6181 add the required "normal" config-lang.in rules.
6182 * c-lang.h: Moved from gcc/ to here.
6183 * c-tree.h: Likewise.
6184 * c-objc-common.c: Likewise.
6185 * c-objc-common.h: Likewise.
6186 * c-typeck.c: Likewise.
6187 * c-convert.c: Likewise.
6188 * c-lang.c: Likewise.
6189 * c-aux-info.c: Likewise.
6190 * c-errors.c: Likewise.
6191 * gccspec.c: Likewise.
6192 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
6193 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
6194\f
a5544970 6195Copyright (C) 2012-2019 Free Software Foundation, Inc.
d4a10d0a
SB
6196
6197Copying and distribution of this file, with or without modification,
6198are permitted in any medium without royalty provided the copyright
6199notice and this notice are preserved.