]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=)
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
c4499192
RB
12019-05-17 Richard Biener <rguenther@suse.de>
2
3 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
4 (c_parser_gimple_unary_expression): Likewise.
5 (c_parser_gimple_parentized_ternary_expression): New function.
6
adfe6e4b
RB
72019-05-16 Richard Biener <rguenther@suse.de>
8
9 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
10 (c_parser_gimple_unary_expression): Likewise.
11
186dabf2
RB
122019-05-15 Richard Biener <rguenther@suse.de>
13
14 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
15 __BIT_FIELD_REF.
16
1158c5b4
RB
172019-05-14 Richard Biener <rguenther@suse.de>
18
19 * gimple-parser.c (c_parser_gimple_statement): Remove
20 questionable auto-promotion to VIEW_CONVERT_EXPR.
21 (c_parser_gimple_typespec): Split out from __MEM parsing.
22 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
23 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
24 as __VIEW_CONVERT with -gimple.
25
fd4485aa
ML
262019-05-09 Martin Liska <mliska@suse.cz>
27
28 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
29 __MAX.
30 (c_parser_gimple_unary_expression): Parse also binary expression
31 __MIN and __MAX.
32 (c_parser_gimple_parentized_binary_expression): New function.
33
d276406a
ML
342019-05-09 Martin Liska <mliska@suse.cz>
35
36 * gimple-parser.c (struct gimple_parser): Add probability.
37 for gimple_parser_edge.
38 (gimple_parser::push_edge): Add new argument probability.
39 (c_parser_gimple_parse_bb_spec): Parse also probability
40 if present.
41 (c_parser_parse_gimple_body): Set edge probability.
42 (c_parser_gimple_compound_statement): Consume token
43 before calling c_parser_gimple_goto_stmt.
44 Parse BB counts.
45 (c_parser_gimple_statement): Pass new argument.
46 (c_parser_gimple_goto_stmt): Likewise.
47 (c_parser_gimple_if_stmt): Likewise.
48 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
49 * c-parser.c (c_parser_declaration_or_fndef): Pass
50 hot_bb_threshold argument.
51 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
52 field.
53 (c_parser_gimple_parse_bb_spec_edge_probability): New.
54
f179b64e
JJ
552019-04-26 Jakub Jelinek <jakub@redhat.com>
56
57 PR debug/90197
58 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
59 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
60 (c_parser_do_statement): Likewise.
61 (c_parser_for_statement): Likewise. Formatting fixes.
62 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
63 emit DEBUG_BEGIN_STMTs if needed.
64
e7178413
JJ
652019-04-19 Jakub Jelinek <jakub@redhat.com>
66
c280b7ee
JJ
67 PR c/89888
68 * c-typeck.c (struct c_switch): Remove outside_range_p member.
69 (c_start_case): Don't clear it.
70 (do_case): Adjust c_add_case_label caller.
71 (c_finish_case): Adjust c_do_switch_warnings caller.
72
e7178413
JJ
73 PR c++/90108
74 * c-decl.c (merge_decls): If remove is main variant and
75 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
76 variant that has newdecl as TYPE_NAME if any.
77
60a2c645
JJ
782019-04-12 Jakub Jelinek <jakub@redhat.com>
79
80 PR c/89933
81 * c-decl.c (merge_decls): When newdecl's type is its main variant,
82 don't try to remove it from the variant list, but instead assert
83 it has no variants.
84
2a82beaa
RB
852019-04-01 Richard Biener <rguenther@suse.de>
86
87 PR c/71598
88 * c-tree.h (c_get_alias_set): Declare.
89 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
90 * c-objc-common.c (c_get_alias_set): Treat enumeral types
91 as the underlying integer type.
92
bec1da64
MS
932019-03-19 Martin Sebor <msebor@redhat.com>
94
95 PR tree-optimization/89688
96 * c-decl.c (finish_decl): Call braced_lists_to_string for more
97 kinds of initializers.
98
855cd9b1
JJ
992019-03-19 Jakub Jelinek <jakub@redhat.com>
100
101 PR c/89734
102 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
103 return type even if quals_used is 0. Formatting fixes.
104
baa09dc5
RB
1052019-03-14 Richard Biener <rguenther@suse.de>
106
107 * c-tree.h (enum c_declspec_il): New.
108 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
109 enum bitfield.
110 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
111 Pass start pass and declspec_il to c_parser_parse_gimple_body.
112 (c_parser_declspecs): Adjust.
113 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
114 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
115 and bitmap.h.
116 (struct gimple_parser): New.
117 (gimple_parser::push_edge): New method.
118 (c_parser_gimple_parse_bb_spec): New helper.
119 (c_parser_parse_gimple_body): Get start pass and IL specification.
120 Initialize SSA and CFG.
121 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
122 Build a gimple_parser parsing state and pass it along.
123 (c_parser_gimple_statement): Change intermittend __PHI internal
124 function argument for the edge.
125 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
126 (c_parser_gimple_goto_stmt): Record edges to build.
127 (c_parser_gimple_if_stmt): Likewise.
128 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
129 (c_parser_gimple_or_rtl_pass_list): Likewise.
130
a3f9f006
ML
1312019-03-11 Martin Liska <mliska@suse.cz>
132
133 * c-decl.c (check_for_loop_decls): Wrap an option name
134 in a string format message and fix GNU coding style.
135 * c-parser.c (c_parser_declspecs): Likewise.
136
1db01ff9
JJ
1372019-03-08 Jakub Jelinek <jakub@redhat.com>
138
139 PR tree-optimization/89550
140 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
141 returned true.
142 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
143 or warning returned true.
144
66dcb747
JJ
1452019-02-28 Jakub Jelinek <jakub@redhat.com>
146
147 PR c/89525
148 * c-typeck.c (convert_arguments): Call inform_declaration only if
149 the previous warning_at call returned true.
150
2263c9f2
TS
1512019-02-22 Thomas Schwinge <thomas@codesourcery.com>
152
153 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
154 parameter. Adjust all users.
155 (c_parser_oacc_simple_clause): Replace parser with loc formal
156 parameter. Adjust all users.
157
19695f4d
CLT
1582019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
159
160 PR c/87924
161 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
162 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
163
5f88ba10
JJ
1642019-02-15 Jakub Jelinek <jakub@redhat.com>
165
166 PR c/89340
167 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
168 before c_decl_attributes rather than after it.
169
cfc30fd1
JJ
1702019-02-06 Jakub Jelinek <jakub@redhat.com>
171
172 PR c/89211
173 * c-parser.c (c_parser_declaration_or_fndef): Don't update
174 DECL_ARGUMENTS of d if it has been defined already. Use a single if
175 instead of 3 nested ifs.
176
fbe83e6b
JM
1772019-02-06 Joseph Myers <joseph@codesourcery.com>
178
179 PR c/88584
180 * c-decl.c (finish_decl): Do not complete array types for arrays
181 with external linkage not at file scope.
182
f461f938
RB
1832019-02-05 Richard Biener <rguenther@suse.de>
184
185 PR c/88606
186 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
187 all type variants when not supported.
188
fe509359
JJ
1892019-01-30 Jakub Jelinek <jakub@redhat.com>
190
191 PR c/89061
192 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
193 * c-decl.c (decl_jump_unsafe): Return false for
194 C_DECL_COMPOUND_LITERAL_P decls.
195 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
196
6a335b96
JJ
1972019-01-29 Jakub Jelinek <jakub@redhat.com>
198
f4b7e754
JJ
199 PR c/89045
200 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
201 scope.
202
6a335b96
JJ
203 PR c/86125
204 * c-decl.c (last_fileptr_type): Remove.
205 (last_structptr_types): New variable.
206 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
207 {old,new}rettype instead of the types themselves. Assert
208 last_structptr_types array has the same number of elements
209 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
210 argument oldtype and newtype. Instead of handling
211 just fileptr_type_node specially, handle all builtin_structptr_types
212 pointer nodes. Formatting fix.
213
d8b5a1a0
MS
2142019-01-24 Martin Sebor <msebor@redhat.com>
215
216 PR c/86125
217 PR c/88886
218 PR middle-end/86308
219 * c-decl.c (match_builtin_function_types): Add arguments.
220 (diagnose_mismatched_decls): Diagnose mismatched declarations
221 of built-ins more strictly.
222
e21c4491
JJ
2232019-01-24 Jakub Jelinek <jakub@redhat.com>
224
225 PR c++/88976
226 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
227 on #pragma omp cancel with different modifiers.
228
420183d9
L
2292019-01-18 H.J. Lu <hongjiu.lu@intel.com>
230
231 PR c/51628
232 PR c/88664
233 * c-typeck.c (convert_for_assignment): Upate the
234 warn_for_address_or_pointer_of_packed_member call.
235
17ad43dd
TH
2362019-01-16 Tom Honermann <tom@honermann.net>
237 Jason Merrill <jason@redhat.com>
238
239 * c-typeck.c (digest_init): Revised the error message produced for
240 ill-formed cases of array initialization with a string literal.
241 (error_init): Make variadic.
242
5f07d78a
JJ
2432019-01-12 Jakub Jelinek <jakub@redhat.com>
244
245 * c-typeck.c (convert_for_assignment): Fix a comment typo.
246
c4581bbf
JJ
2472019-01-07 Jakub Jelinek <jakub@redhat.com>
248
249 PR c/88701
250 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
251 if current_function_decl is non-NULL.
252
65c5b1eb
JM
2532019-01-07 Joseph Myers <joseph@codesourcery.com>
254
255 PR c/88720
256 PR c/88726
257 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
258 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
259 functions declared but never defined only for external scope, not
260 for other scopes.
261
d8fcab68
JJ
2622019-01-07 Jakub Jelinek <jakub@redhat.com>
263
264 PR c++/85052
265 * c-parser.c (c_parser_postfix_expression): Parse
266 __builtin_convertvector.
267
a5544970
JJ
2682019-01-01 Jakub Jelinek <jakub@redhat.com>
269
270 Update copyright years.
271
da77eace
L
2722018-12-20 H.J. Lu <hongjiu.lu@intel.com>
273
274 PR c/51628
275 * c-typeck.c (convert_for_assignment): Call
276 warn_for_address_or_pointer_of_packed_member.
277
1edf8866
SB
2782018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
279
280 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
281 a more specific error message (instead of just falling through).
282
db4fd626
SB
2832018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
284
285 * c-parser.c (c_parser_asm_statement): Keep track of the location each
286 asm qualifier is first seen; use that to give nicer "duplicate asm
287 qualifier" messages. Delete 'quals" variable, instead pass the
288 "is_volatile_ flag to build_asm_stmt directly.
289 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
290 * c-typeck.c (build_asm_stmt): Ditto; adjust.
291
9c9cfcbb
SB
2922018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
293
294 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
295 "done" boolean variable.
296
a14feb3c
DM
2972018-12-19 David Malcolm <dmalcolm@redhat.com>
298
299 PR c++/87504
300 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
301 Move from here to gcc-rich-location.h and gcc-rich-location.c.
302 (build_binary_op): Use struct op_location_t and
303 class binary_op_rich_location.
304
6d939173
JJ
3052018-12-11 Jakub Jelinek <jakub@redhat.com>
306
307 PR sanitizer/88426
308 * c-convert.c (convert): Call c_fully_fold before calling
309 ubsan_instrument_float_cast.
310
b7055028
SB
3112018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
312
313 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
314 setting "quals".
315
5b76e75f
SB
3162018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
317
318 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
319 after asm. Pass a flag for it to build_asm_expr.
320 * c-tree.h (build_asm_expr): Update declaration.
321 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
322 set ASM_INLINE_P.
323
30bd42b9
SB
3242018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
325
326 PR inline-asm/55681
327 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
328 combination of volatile and goto, in any order, without repetitions.
329
9df6c0e4
JB
3302018-12-04 James Norris <jnorris@codesourcery.com>
331 Cesar Philippidis <cesar@codesourcery.com>
332 Julian Brown <julian@codesourcery.com>
333
334 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
335 code.
336
f44697b7
RB
3372018-11-30 Richard Biener <rguenther@suse.de>
338
339 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
340 _Literal (type) { ... } as empty aggregate or vector constructor.
341
550dfbdc
MS
3422018-11-29 Martin Sebor <msebor@redhat.com>
343
344 PR c/88091
345 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
346 (convert_arguments): Add comments. Pass additional argument to
347 the function above.
348
673670da
MS
3492018-11-29 Martin Sebor <msebor@redhat.com>
350
351 PR c/88172
352 PR testsuite/88208
353 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
354
db1d09b0
MS
3552018-11-23 Martin Sebor <msebor@redhat.com>
356
357 PR testsuite/88098
358 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
359 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
360
98f08eb8
MS
3612018-11-20 Martin Sebor <msebor@redhat.com>
362
363 * c-parser.c (c_parser_has_attribute_expression): New function.
364 (c_parser_attribute): New function.
365 (c_parser_attributes): Move code into c_parser_attribute.
366 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
367
cd5da983
MS
3682018-11-15 Martin Sebor <msebor@redhat.com>
369
370 PR c/83656
371 * c-decl.c (header_for_builtin_fn): Declare.
372 (diagnose_mismatched_decls): Diagnose declarations of built-in
373 functions without a prototype.
374 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
375 (convert_argument): Same.
376 (convert_arguments): Factor code out into convert_argument.
377 Detect mismatches between built-in formal arguments in calls
378 to built-in without prototype.
379 (build_conditional_expr): Same.
380 (type_or_builtin_type): New function.
381 (convert_for_assignment): Add argument. Conditionally issue
382 warnings instead of errors for mismatches.
383
620e594b
DM
3842018-11-13 David Malcolm <dmalcolm@redhat.com>
385
386 * c-decl.c: Replace "source_location" with "location_t".
387 * c-tree.h: Likewise.
388 * c-typeck.c: Likewise.
389 * gimple-parser.c: Likewise.
390
3179ebae
JJ
3912018-11-09 Jakub Jelinek <jakub@redhat.com>
392
81a227c6
JJ
393 * c-parser.c (c_parser_omp_clause_final): Use
394 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
395 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
396 parsing instead of c_parser_paren_condition.
397 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
398 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
399 c_fully_fold instead of c_parser_condition.
400 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
401 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
402 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
403 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
404 c_parser_expr_no_commas instead of c_parser_expression.
405
98c91c56
JJ
406 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
407 reduction clause with inscan modifier.
408
3179ebae
JJ
409 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
410 clauses other than atomic_default_mem_order.
411
28567c40
JJ
4122018-11-08 Jakub Jelinek <jakub@redhat.com>
413
414 * c-parser.c: Include memmode.h.
415 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
416 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
417 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
418 task_reduction clauses.
419 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
420 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
421 section, or lvalue assignment expression.
422 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
423 (c_parser_omp_clause_lastprivate): Parse optional
424 conditional: modifier.
425 (c_parser_omp_clause_hint): Require constant integer expression rather
426 than just integer expression.
427 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
428 clause.
429 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
430 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
431 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
432 functions.
433 (c_parser_omp_clause_depend): Parse iterator modifier and handle
434 iterators. Parse mutexinoutset and depobj kinds.
435 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
436 callers.
437 (c_parser_omp_all_clauses): Likewise. Handle
438 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
439 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
440 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
441 default memory order from requires directive if any. Adjust
442 c_finish_omp_atomic caller.
443 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
444 (c_parser_omp_flush): Parse flush with memory-order-clause.
445 (c_parser_omp_for_loop): Allow NE_EXPR even in
446 OpenMP loops, adjust c_finish_omp_for caller.
447 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
448 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
449 Allow to be called while parsing combined parallel master.
450 Parse combined master taskloop{, simd}.
451 (c_parser_omp_parallel): Parse combined
452 parallel master{, taskloop{, simd}} constructs.
453 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
454 (OMP_TASKGROUP_CLAUSE_MASK): Define.
455 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
456 (OMP_TASKWAIT_CLAUSE_MASK): Define.
457 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
458 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
459 around teams body. Use SET_EXPR_LOCATION.
460 (c_parser_omp_target_data): Allow target data
461 with only use_device_ptr clauses.
462 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
463 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
464 (c_parser_omp_requires): New function.
465 (c_finish_taskloop_clauses): New function.
466 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
467 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
468 declaration. Disallow in_reduction clause when combined with parallel
469 master.
470 (c_parser_omp_construct): Adjust c_parser_omp_master and
471 c_parser_omp_taskgroup callers.
472 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
473 other than cancel.
474 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
475 like OMP_CLAUSE_REDUCTION.
476 (handle_omp_array_sections): Likewise. Call save_expr on array
477 reductions before calling build_index_type. Handle depend clauses
478 with iterators.
479 (struct c_find_omp_var_s): New type.
480 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
481 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
482 with static, runtime or auto schedule kinds. Call save_expr for whole
483 array reduction sizes. Diagnose reductions with zero sized elements
484 or variable length structures. Diagnose nogroup clause used with
485 reduction clause(s). Handle depend clause with
486 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
487 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
488 some different type for other kinds. Use build_unary_op with
489 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
490 Handle depend clauses with iterators. Remove no longer needed special
491 case that predetermined const qualified vars may be specified in
492 firstprivate clause. Complain if const qualified vars are mentioned
493 in data-sharing clauses other than firstprivate or shared. Use
494 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
495 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
496 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
497 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
498
7e2de6df
DM
4992018-10-29 David Malcolm <dmalcolm@redhat.com>
500
501 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
502 logic for change to name_hint::operator bool.
503 (undeclared_variable): Likewise.
504 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
505 (c_parser_parameter_declaration): Likewise.
506
9f936c86
JM
5072018-10-17 Joseph Myers <joseph@codesourcery.com>
508
509 * c-errors.c (pedwarn_c11): New function.
510 * c-parser.c (disable_extension_diagnostics): Save
511 warn_c11_c2x_compat and set it to 0.
512 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
513 (c_parser_static_assert_declaration_no_semi): Handle
514 _Static_assert without string constant.
515 * c-tree.h (pedwarn_c11): New prototype.
516
033eb567
DM
5172018-10-17 David Malcolm <dmalcolm@redhat.com>
518
519 * Make-lang.in (selftest-c): New.
520 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
521 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
522 from gcc/Makefile.in.
523
0edf3afe
RB
5242018-10-02 Richard Biener <rguenther@suse.de>
525
526 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
527
8313a764
JM
5282018-09-26 Joseph Myers <joseph@codesourcery.com>
529
530 PR c/87390
531 * c-typeck.c (build_binary_op): Use excess precision for
532 comparisons of integers and floating-point for C11 and later.
533
ce6f0888
MJ
5342018-09-26 Martin Jambor <mjambor@suse.cz>
535
536 PR c/87347
537 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
538 comment.
539
9c4a4b3c
DM
5402018-09-17 David Malcolm <dmalcolm@redhat.com>
541
542 * c-objc-common.c (range_label_for_type_mismatch::get_text):
543 Update for new param.
544 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
545 Likewise.
546
80c6d1f4
MJ
5472018-09-17 Martin Jambor <mjambor@suse.cz>
548
549 PR c/63886
550 * c-parser.c: (warn_for_abs): New function.
551 (c_parser_postfix_expression_after_primary): Call it.
552
4a426e36
BE
5532018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
554
555 * c-typeck.c (digest_init): Shorten overlength strings.
556
6d900107
BE
5572018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
558
559 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
560
b5764229
BE
5612018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
562
563 * c-decl.c (finish_decl): Call braced_list_to_string here ...
564 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
565
22eea6b2
AM
5662018-08-30 Alexander Monakov <amonakov@ispras.ru>
567
568 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
569 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
570
85204e23
DM
5712018-08-27 David Malcolm <dmalcolm@redhat.com>
572
573 PR 87091
574 * c-decl.c (implicitly_declare): Update call to
575 maybe_add_include_fixit to suggest overriding the location, as it
576 is for a note.
577 * c-objc-common.c (c_tree_printer): Update for conversion of
578 show_caret_p to a tri-state.
579
3d78e008
ML
5802018-08-27 Martin Liska <mliska@suse.cz>
581
582 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
583 fndecl_built_in_p and remove check for FUNCTION_DECL if
584 possible.
3d78e008
ML
585 (diagnose_mismatched_decls): Likewise.
586 (merge_decls): Likewise.
587 (warn_if_shadowing): Likewise.
588 (pushdecl): Likewise.
589 (implicitly_declare): Likewise.
590 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
591 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
592 * c-typeck.c (build_function_call_vec): Likewise.
593 (convert_arguments): Likewise.
594
097f82ec
DM
5952018-08-20 David Malcolm <dmalcolm@redhat.com>
596
597 PR other/84889
598 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
599 (diagnose_mismatched_decls): Likewise, in various places.
600 (warn_if_shadowing): Likewise.
601 (implicit_decl_warning): Likewise.
602 (implicitly_declare): Likewise.
603 (undeclared_variable): Likewise.
604 (declare_label): Likewise.
605 (grokdeclarator): Likewise.
606 (start_function): Likewise.
607 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
608 (c_parser_parameter_declaration): Likewise.
609 (c_parser_binary_expression): Likewise.
610 * c-typeck.c (c_expr_sizeof_expr): Likewise.
611 (parser_build_binary_op): Likewise.
612 (build_unary_op): Likewise.
613 (error_init): Likewise.
614 (pedwarn_init): Likewise.
615 (warning_init): Likewise.
616 (convert_for_assignment): Likewise.
617
96e6ae57
DM
6182018-08-15 David Malcolm <dmalcolm@redhat.com>
619
620 * c-objc-common.c: Include "gcc-rich-location.h".
621 (c_tree_printer): Move implemenation of '%T' to...
622 (print_type): ...this new function.
623 (range_label_for_type_mismatch::get_text): New function.
624 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
625 range for the various ic_argpass cases.
626 (class maybe_range_label_for_tree_type_mismatch): New class.
627 (build_binary_op): Use it when calling binary_op_error.
628
0cd020ae
PK
6292018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
630
631 * c-decl.c (start_decl): Do not warn if variables is named as main
632 and is a local variable.
633
72733314
IS
6342018-08-15 Iain Sandoe <iain@sandoe.co.uk>
635
636 PR c/19315
637 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
638 objects of unknown size.
639
23aa9f7c
MS
6402018-08-13 Martin Sebor <msebor@redhat.com>
641
642 PR tree-optimization/71625
643 * c-parser.c (c_parser_declaration_or_fndef): Call
644 braced_list_to_string.
645
e5e7e50d
BH
6462018-08-03 Bogdan Harjoc <harjoc@gmail.com>
647
648 PR c/86690
649 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
650 errors.
651
8a45b051
MS
6522018-08-01 Martin Sebor <msebor@redhat.com>
653
654 PR tree-optimization/86650
655 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
656 and TREE_BLOCK (t) from within percent_K_format to this callsite.
657
5922dcb5
JJ
6582018-08-01 Jakub Jelinek <jakub@redhat.com>
659
660 PR c/85704
661 * c-typeck.c (init_field_decl_cmp): New function.
662 (output_pending_init_elements): Use it for field comparisons
663 instead of pure bit_position comparisons.
664
9b452033
JJ
6652018-07-12 Jakub Jelinek <jakub@redhat.com>
666
667 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
668 type here, instead add "omp declare target implicit" attribute.
669 (finish_decl): Diagnose vars without mappable type here.
670
829c6349
CLT
6712018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
672 Thomas Schwinge <thomas@codesourcery.com>
673 Cesar Philippidis <cesar@codesourcery.com>
674
675 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
676 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
677 to their non-present_or_* counterparts. Make 'self' an alias to
678 PRAGMA_OACC_CLAUSE_HOST.
679 (c_parser_oacc_data_clause): Update GOMP mappings for
680 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
681 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
682 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
683 Remove support for present_or_* clauses.
684 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
685 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
686 (OACC_DECLARE_CLAUSE_MASK): Likewise.
687 (OACC_DATA_CLAUSE_MASK): Likewise.
688 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
689 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
690 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
691 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
692 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
693
e197e64e
KV
6942018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
695
696 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
697 * gimple-parser.c (c_parser_gimple_statement): Likewise.
698 (c_parser_gimple_unary_expression): Likewise.
699
487f2f61
JJ
7002018-06-15 Jakub Jelinek <jakub@redhat.com>
701
702 PR c/86093
703 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
704 before doing POINTER_DIFF_EXPR.
705
e4d44a37
MP
7062018-06-07 Marek Polacek <polacek@redhat.com>
707
708 PR c/85318
709 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
710 for loop initial declarations.
711
b67b9225
DP
7122018-05-30 David Pagan <dave.pagan@oracle.com>
713
714 PR c/55976
715 * c-decl.c (grokdeclarator): Update check for return type warnings.
716 (start_function): Likewise.
717 (finish_function): Likewise.
718 * c-typeck.c (c_finish_return): Update check for return type warnings.
719 Pass OPT_Wreturn_type to pedwarn when appropriate.
720
c566cc9f
RS
7212018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
722
723 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
724 __FMA_EXPR handlng.
725
e4f81565
RS
7262018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
727
728 * gimple-parser.c: Include internal-fn.h.
729 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
730 (c_parser_gimple_call_internal): New function.
731 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
732 Fix typos in comment.
733
79e7b1fe
JJ
7342018-05-10 Jakub Jelinek <jakub@redhat.com>
735
736 PR c++/85662
737 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
738 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
739 fold_convert_loc.
740 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
741 fold_offsetof_1, pass argtype as TYPE to it and drop the
742 fold_convert_loc.
743
f7584c81
DP
7442018-05-02 David Pagan <dave.pagan@oracle.com>
745
746 PR c/30552
747 * c-decl.c (old_style_parameter_scope): New function.
748 * c-parser.c (c_parser_postfix_expression): Check for statement
749 expressions in old-style function parameter list declarations.
750 * c-parser.h (old_style_parameter_scope): New extern declaration.
751
b33a0cb3
JJ
7522018-04-25 Jakub Jelinek <jakub@redhat.com>
753
754 PR sanitizer/84307
755 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
756 it is not TREE_STATIC.
757 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
758 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
759 its COMPOUND_LITERAL_EXPR_DECL.
760
c5c5822a
JM
7612018-03-21 Joseph Myers <joseph@codesourcery.com>
762
763 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
764 where all functions return the same _FloatN or _FloatNx type,
765 treat integer types as _Float64 instead of double.
766
aa1c9429
JJ
7672018-03-21 Jakub Jelinek <jakub@redhat.com>
768
769 PR c/84999
770 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
771 building vector comparison, diagnose it and return error_mark_node.
772
9bb45a95
JJ
7732018-03-15 Jakub Jelinek <jakub@redhat.com>
774
775 PR c/84853
776 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
777 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
778 INTEGER_TYPE element type.
779
ada6bad9
DP
7802018-03-13 David Pagan <dave.pagan@oracle.com>
781
782 PR c/46921
783 * c-typeck.c (output_init_element): Ensure field initializer
784 expression is always evaluated if there are side effects.
785
849bbdb9
JJ
7862018-03-06 Jakub Jelinek <jakub@redhat.com>
787
788 PR c/84721
789 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
790 !building_stmt_list_p ().
791
d74641bd
RS
7922018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
793
794 PR c/84305
795 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
796 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
797 and include the BIND_EXPR in the list of things that need to be
798 pre-evaluated.
799
0444aa9c
NS
8002018-02-09 Nathan Sidwell <nathan@acm.org>
801
802 PR c/84293
803 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
804 to strict_aliasing_warning.
805
7c30b12a
PC
8062018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
807
808 * c-typeck.c (really_start_incremental_init, push_init_level,
809 set_nonincremental_init, output_init_element, process_init_element):
810 Use DECL_UNNAMED_BIT_FIELD.
811
2be4dfcb
MP
8122018-01-31 Marek Polacek <polacek@redhat.com>
813
814 PR c/81779
815 * c-parser.c (c_parser_compound_statement_nostart): Call
816 expansion_point_location_if_in_system_header.
817
bb9869d5
DM
8182018-01-17 David Malcolm <dmalcolm@redhat.com>
819
820 PR c++/83814
821 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
822 the C part.
823
b4923738
JJ
8242018-01-13 Jakub Jelinek <jakub@redhat.com>
825
826 PR c/83801
827 * c-tree.h (decl_constant_value_1): Add a bool argument.
828 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
829 returning a CONSTRUCTOR if it is true. Use error_operand_p.
830 (decl_constant_value): Adjust caller.
831 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
832 decl_constant_value_1 as IN_INIT. Otherwise, punt if
833 decl_constant_value returns initializer that has BLKmode or
834 array type.
835 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
836
928686b1
RS
8372018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
838 Alan Hayward <alan.hayward@arm.com>
839 David Sherwood <david.sherwood@arm.com>
840
841 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
842 TYPE_VECTOR_SUBPARTS.
843
85ec4feb
JJ
8442018-01-03 Jakub Jelinek <jakub@redhat.com>
845
846 Update copyright years.
847
913884f7
JJ
8482018-01-01 Jakub Jelinek <jakub@redhat.com>
849
850 PR c/83595
851 * c-parser.c (c_parser_braced_init, c_parser_initelt,
852 c_parser_conditional_expression, c_parser_cast_expression,
853 c_parser_sizeof_expression, c_parser_alignof_expression,
854 c_parser_postfix_expression, c_parser_omp_declare_reduction,
855 c_parser_transaction_expression): Use set_error () method instead
856 of setting value member to error_mark_node.
857
c6cfa2bf
MM
8582017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
859
860 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
861 and _Float<N>X built-in functions.
862
11d29d63
JJ
8632017-12-22 Jakub Jelinek <jakub@redhat.com>
864
14ec014e
JJ
865 PR debug/83550
866 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
867 TYPE_STUB_DECL and call rest_of_type_compilation before processing
868 incomplete vars rather than after it.
869
11d29d63
JJ
870 PR debug/83547
871 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
872 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
873 and consider empty ones if there are no other stmts. For
874 -Wunused-value walk all statements before the one only followed by
875 DEBUG_BEGIN_STMTs.
876
170a8bd6 8772017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 878 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
879
880 * c-parser.c (c_parser_while_statement): Add unroll parameter and
881 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
882 (c_parser_do_statement): Likewise.
883 (c_parser_for_statement): Likewise.
884 (c_parser_statement_after_labels): Adjust calls to above.
885 (c_parse_pragma_ivdep): New static function.
886 (c_parser_pragma_unroll): Likewise.
887 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
888 <PRAGMA_UNROLL>: New case.
889
01512446
JJ
8902017-12-19 Jakub Jelinek <jakub@redhat.com>
891
892 * c-typeck.c (comptypes_internal, function_types_compatible_p,
893 perform_integral_promotions, digest_init): Replace Yoda conditions
894 with typical order conditions.
895 * c-decl.c (check_bitfield_type_and_width): Likewise.
896
c65e18d3
BE
8972017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
898
899 * c-typeck.c (c_safe_arg_type_equiv_p,
900 c_safe_function_type_cast_p): New function.
901 (build_c_cast): Implement -Wcast-function-type.
902
b7280579
RB
9032017-12-14 Richard Biener <rguenther@suse.de>
904
905 PR c/83415
906 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
907 like REALPART_EXPR for the behavior of whether its operand
908 is an lvalue.
909
49e6a6c0
MP
9102017-12-12 Marek Polacek <polacek@redhat.com>
911
912 PR c/82679
913 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
914
96a95ac1
AO
9152017-12-12 Alexandre Oliva <aoliva@redhat.com>
916
917 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
918 * c-parser.c (add_debug_begin_stmt): New.
919 (c_parser_declaration_or_fndef): Call it.
920 (c_parser_compound_statement_nostart): Likewise.
921 (c_parser_statement_after_labels): Likewise.
922 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
923
4b2b493f
JM
9242017-12-07 Joseph Myers <joseph@codesourcery.com>
925
926 * c-decl.c (build_compound_literal): Add parameter alignas_align
927 and set alignment of decl if nonzero.
928 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
929 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
930 qualifier.
931 (c_parser_struct_declaration): Update syntax comment.
932 (c_parser_type_name): Add alignas_ok argument and pass it to
933 c_parser_declspecs.
934 (c_parser_cast_expression): Pass true to c_parser_type_name and
935 give error if a cast used an _Alignas specifier.
936 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
937 give error if sizeof (type-name) used an _Alignas specifier.
938 (c_parser_alignof_expression): Pass true to c_parser_type_name and
939 give error if _Alignof (type-name) used an _Alignas specifier.
940 (c_parser_postfix_expression_after_paren_type): Check specified
941 alignment for a compound literal and pass it to
942 build_compound_literal.
943 * c-parser.h (c_parser_type_name): Update prototype.
944 * c-tree.h (build_compound_literal): Update prototype.
945
5d9ae53d
MS
9462017-12-07 Martin Sebor <msebor@redhat.com>
947
948 PR c/81544
949 * c-decl.c (c_decl_attributes): Look up existing declaration and
950 pass it to decl_attributes.
951
c79144f8
DM
9522017-12-06 David Malcolm <dmalcolm@redhat.com>
953
954 PR c/83236
955 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
956 reserved for use by the implementation.
957
613bc14f
DM
9582017-12-06 David Malcolm <dmalcolm@redhat.com>
959
960 * c-decl.c: Include "c-family/c-spellcheck.h".
961
05abad4c
ML
9622017-12-05 Martin Liska <mliska@suse.cz>
963 Jakub Jelinek <jakub@redhat.com>
964
965 * c-typeck.c (pointer_diff): Add new argument and instrument
966 pointer subtraction.
967 (build_binary_op): Similar for pointer comparison.
968
cc6534d4
JJ
9692017-12-01 Jakub Jelinek <jakub@redhat.com>
970
65791f42
JJ
971 PR c/79153
972 * c-parser.c: Include tree-iterator.h.
973 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
974 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
975 on it.
976
cc6534d4
JJ
977 PR c/83222
978 * c-tree.h (decl_constant_value_1): Declare.
979 * c-typeck.c (decl_constant_value_1): New function.
980 (decl_constant_value): Use it.
981 * c-fold.c (c_fully_fold_internal): If in_init, use
982 decl_constant_value_1 instead of decl_constant_value.
983
5de73c05
JJ
9842017-11-30 Jakub Jelinek <jakub@redhat.com>
985
986 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
987
058f0b9e
JJ
9882017-11-28 Jakub Jelinek <jakub@redhat.com>
989
990 PR sanitizer/81275
991 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
992 c_switch_covers_all_cases_p returns true.
993
5e9d6aa4 9942017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 995 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
996
997 * Make-lang.in (c/c-array-notation.o): Remove.
998 * c-array-notation.c: Delete.
999 * c-decl.c: Remove cilkplus condition.
1000 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
1001 c_parser_cilk_verify_simd, c_parser_array_notation,
1002 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
1003 c_parser_cilk_simd_fn_vector_attrs,
1004 c_finish_cilk_simd_fn_tokens): Delete.
1005 (c_parser_declaration_or_fndef): Remove cilkplus condition.
1006 (c_parser_direct_declarator_inner): Ditto.
1007 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
1008 (c_parser_attributes, c_parser_compound_statement,
1009 c_parser_statement_after_labels, c_parser_if_statement,
1010 c_parser_switch_statement, c_parser_while_statement,
1011 c_parser_do_statement, c_parser_for_statement,
1012 c_parser_unary_expression, c_parser_postfix_expression,
1013 c_parser_postfix_expression_after_primary,
1014 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
1015 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
1016 support.
1017 * c-typeck.c (build_array_ref, build_function_call_vec,
1018 convert_arguments,
1019 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
1020 c_finish_loop, build_binary_op): Remove cilkplus support.
1021
9e851845
JJ
10222017-11-28 Jakub Jelinek <jakub@redhat.com>
1023
1024 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
1025 of build3.
1026
8c7dbea9
BK
10272017-11-14 Boris Kolpackov <boris@codesynthesis.com>
1028
1029 * Make-lang.in (c.install-plugin): Install backend import library.
1030
41521dee
JJ
10312017-11-23 Jakub Jelinek <jakub@redhat.com>
1032
1033 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
1034 pragma_stmt context.
1035
ac9effed
EB
10362017-11-23 Mike Stump <mikestump@comcast.net>
1037 Eric Botcazou <ebotcazou@adacore.com>
1038
1039 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
1040 ANNOTATE_EXPR.
1041 (c_parser_do_statement): Likewise.
1042 (c_parser_for_statement): Likewise.
1043
ce95abc4
DM
10442017-11-22 David Malcolm <dmalcolm@redhat.com>
1045
1046 PR c++/62170
1047 * c-objc-common.c (c_tree_printer): Convert penultimate param from
1048 bool to bool *. Within '%T' handling, if showing an "aka", use
1049 "quoted" param to add appropriate quoting.
1050
974aedcc
MP
10512017-11-22 Marek Polacek <polacek@redhat.com>
1052
1053 PR c++/60336
1054 PR middle-end/67239
1055 PR target/68355
1056 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
1057
d4300cc6
DM
10582017-11-21 David Malcolm <dmalcolm@redhat.com>
1059
1060 PR c/83056
1061 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
1062 earlier failed lookups.
1063
1af4ebf5
MG
10642017-11-21 Marc Glisse <marc.glisse@inria.fr>
1065
1066 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
1067 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
1068
26edace6
DM
10692017-11-20 David Malcolm <dmalcolm@redhat.com>
1070
1071 PR c/81404
1072 * c-decl.c: Include "c-family/known-headers.h".
1073 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
1074 to known-headers.cc.
1075 (class suggest_missing_header): Move to known-header.h.
1076 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
1077 than get_c_name_hint.
1078
b1212255
DM
10792017-11-20 David Malcolm <dmalcolm@redhat.com>
1080
1081 * c-decl.c (get_c_name_hint): New function.
1082 (class suggest_missing_header): New class.
1083 (lookup_name_fuzzy): Call get_c_name_hint and use it to
1084 suggest missing headers to the user.
1085
6c7a259b
DM
10862017-11-20 David Malcolm <dmalcolm@redhat.com>
1087
1088 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1089 Include "c-family/name-hint.h"
1090 (implicit_decl_warning): Convert "hint" from
1091 const char * to name_hint. Pass location to
1092 lookup_name_fuzzy. Suppress any deferred diagnostic if the
1093 warning was not printed.
1094 (undeclared_variable): Likewise for "guessed_id".
1095 (lookup_name_fuzzy): Convert return type from const char *
1096 to name_hint. Add location_t param.
1097 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1098 Include "c-family/name-hint.h"
1099 (c_parser_declaration_or_fndef): Convert "hint" from
1100 const char * to name_hint. Pass location to lookup_name_fuzzy.
1101 (c_parser_parameter_declaration): Likewise.
1102
f9c59f7e
JJ
11032017-11-19 Jakub Jelinek <jakub@redhat.com>
1104
1105 PR c/66618
1106 PR c/69960
1107 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
1108 where needed.
1109 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
1110 handle_omp_array_sections): Likewise.
1111 (digest_init): Don't call decl_constant_value_for_optimization.
1112 * c-tree.h (decl_constant_value_for_optimization): Removed.
1113 * c-fold.c (c_fold_array_ref): New function.
1114 (c_fully_fold_internal): Add LVAL argument, propagate it through
1115 recursive calls. For VAR_P call decl_constant_value and
1116 unshare if not LVAL and either optimizing or IN_INIT. Remove
1117 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
1118 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
1119 (c_fully_fold): Add LVAL argument, pass it through to
1120 c_fully_fold_internal.
1121 (decl_constant_value_for_optimization): Removed.
1122
3ca0dc60
JM
11232017-11-15 Joseph Myers <joseph@codesourcery.com>
1124
1125 PR c/81156
1126 * c-parser.c (check_tgmath_function): New function.
1127 (enum tgmath_parm_kind): New enum.
1128 (c_parser_postfix_expression): Handle __builtin_tgmath.
1129
64a5912c
DM
11302017-10-31 David Malcolm <dmalcolm@redhat.com>
1131
1132 * c-decl.c (implicit_decl_warning): Update for renaming of
1133 pedwarn_at_rich_loc and warning_at_rich_loc.
1134 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
1135 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
1136 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1137 (c_parser_struct_or_union_specifier): Likewise for renaming of
1138 pedwarn_at_rich_loc.
1139 (c_parser_parameter_declaration): Likewise for renaming of
1140 error_at_rich_loc.
1141 * c-typeck.c (build_component_ref): Likewise.
1142 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
1143 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
1144 (set_init_label): Likewise for renaming of error_at_rich_loc.
1145
c1136864
RB
11462017-10-30 Richard Biener <rguenther@suse.de>
1147
1148 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
1149 stmts.
1150
ee5fd23a
MM
11512017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
1152
1153 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
1154 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
1155
1a59ccf2
DM
11562017-10-25 David Malcolm <dmalcolm@redhat.com>
1157
1158 PR c/7356
1159 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
1160 semicolons.
1161
bc1a75dd
JJ
11622017-10-25 Jakub Jelinek <jakub@redhat.com>
1163
1164 PR libstdc++/81706
1165 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
1166 newdecl to corresponding __builtin_ if any.
1167
ff1ff960
PC
11682017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
1169
1170 PR c++/82466
1171 * c-decl.c (diagnose_mismatched_decls): Use
1172 OPT_Wbuiltin_declaration_mismatch.
1173
62e1c678
DM
11742017-10-12 David Malcolm <dmalcolm@redhat.com>
1175
1176 * c-parser.c (c_parser_require): Add "type_is_unique" param and
1177 use it to guard calls to maybe_suggest_missing_token_insertion.
1178 (c_parser_parms_list_declarator): Override default value of new
1179 "type_is_unique" param to c_parser_require.
1180 (c_parser_asm_statement): Likewise.
1181 * c-parser.h (c_parser_require): Add "type_is_unique" param,
1182 defaulting to true.
1183
a92f6726
NS
11842017-10-11 Nathan Sidwell <nathan@acm.org>
1185
1186 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
1187
8e6cdc90
RS
11882017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1189
1190 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
1191 operating on trees as wide_ints.
1192 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
1193 (c_tree_equal): Likewise.
1194
8139a48e
DM
11952017-10-04 David Malcolm <dmalcolm@redhat.com>
1196
1197 * c-decl.c (push_parm_decl): Store c_parm's location into the
1198 PARAM_DECL.
1199 (build_c_parm): Add "loc" param and store it within the c_parm.
1200 * c-parser.c (struct c_parser): Add "last_token_location" field.
1201 (c_parser_consume_token): Store location of the token into the
1202 new field.
1203 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
1204 when handling a FUNCTION_DECL, if it doesn't already have them.
1205 (c_parser_parameter_declaration): Generate a location for the
1206 parameter, and pass it to the call to build_c_parm.
1207 * c-tree.h (struct c_parm): Add field "loc".
1208 (build_c_parm): Add location_t param.
1209 * c-typeck.c (get_fndecl_argument_location): New function.
1210 (inform_for_arg): New function.
1211 (convert_for_assignment): Use inform_for_arg when dealing with
1212 ic_argpass.
1213
2a389958
JJ
12142017-09-29 Jakub Jelinek <jakub@redhat.com>
1215
7d386d45
JJ
1216 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
1217 width is non-NULL.
1218 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
1219 don't SET_DECL_C_BIT_FIELD here.
1220
2a389958
JJ
1221 PR c/82340
1222 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
1223 instead of trying to set just TREE_READONLY manually.
1224
ebc6a85e
TV
12252017-09-16 Tom de Vries <tom@codesourcery.com>
1226
1227 PR c/81875
1228 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
1229 cond itself.
1230
bb75facd
JM
12312017-09-15 Joseph Myers <joseph@codesourcery.com>
1232
1233 PR c/82071
1234 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
1235 for C11.
1236 (build_conditional_expr): For C11, generate result with excess
1237 precision when one argument is an integer and the other is of a
1238 type using excess precision.
1239
1d933576
BE
12402017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
1241
1242 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
1243
267bbb6f
MP
12442017-09-13 Marek Polacek <polacek@redhat.com>
1245
1246 PR c/82167
1247 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
1248 than expr.original_type.
1249
6836632e
NS
12502017-09-12 Nathan Sidwell <nathan@acm.org>
1251
1252 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1253 resort_sorted_fields): Moved from c-family/c-common.c.
1254 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
1255
e035be33
JM
12562017-09-01 Joseph Myers <joseph@codesourcery.com>
1257
1258 PR c/82071
1259 * c-typeck.c (build_atomic_assign): Handle argument with excess
1260 precision. Ensure any EXCESS_PRECISION_EXPR is present in
1261 argument passed to build_binary_op and convert_for_assignment but
1262 not for call to c_fully_fold.
1263 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
1264 Ensure build_binary_op is called with argument with original
1265 semantic type. Avoid calling c_fully_fold with an
1266 EXCESS_PRECISION_EXPR from build_binary_op.
1267
d2e05fcb
JJ
12682017-09-01 Jakub Jelinek <jakub@redhat.com>
1269
1270 PR c/81887
1271 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
1272
b397965c
RS
12732017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1274 Alan Hayward <alan.hayward@arm.com>
1275 David Sherwood <david.sherwood@arm.com>
1276
1277 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
1278 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
1279 m1 and m2 to the signed equivalent of a fixed-point
1280 SCALAR_TYPE_MODE.
1281
14e18d71
DM
12822017-08-24 David Malcolm <dmalcolm@redhat.com>
1283
1284 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
1285 than CAN_HAVE_LOCATION_P when determining whether to use the
1286 location_t value within "value".
1287
7f204c0f
DM
12882017-08-21 David Malcolm <dmalcolm@redhat.com>
1289
1290 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
1291 rather than peeking the location of the first token.
1292 * c-tree.h (c_expr::get_location): New method.
1293
2f687306
DM
12942017-08-21 David Malcolm <dmalcolm@redhat.com>
1295
1296 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
1297 to check_function_arguments.
1298
3e7b80d7
MP
12992017-08-18 Marek Polacek <polacek@redhat.com>
1300
1301 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
1302 commentary.
1303
00aa1fa2
L
13042017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1305
1306 PR c/53037
1307 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
1308 (check_bitfield_type_and_width): Don't allow bit-field with
1309 warn_if_not_aligned type.
1310
da67acb9
MS
13112017-08-14 Martin Sebor <msebor@redhat.com>
1312
1313 PR c/81117
1314 * c-objc-common.c (c_objc_common_init): Handle 'G'.
1315
bb85aa74
MP
13162017-08-11 Marek Polacek <polacek@redhat.com>
1317
1318 PR c/81795
1319 * c-decl.c (pushtag): Only print inform if the warning was printed.
1320 (grokdeclarator): Likewise.
1321
32129a17
DM
13222017-08-10 David Malcolm <dmalcolm@redhat.com>
1323
1324 * c-parser.c (c_parser_error): Rename to...
1325 (c_parser_error_richloc): ...this, making static, and adding
1326 "richloc" parameter, passing it to the c_parse_error call,
1327 rather than calling c_parser_set_source_position_from_token.
1328 (c_parser_error): Reintroduce, reimplementing in terms of the
1329 above, converting return type from void to bool.
1330 (class token_pair): New class.
1331 (struct matching_paren_traits): New struct.
1332 (matching_parens): New typedef.
1333 (struct matching_brace_traits): New struct.
1334 (matching_braces): New typedef.
1335 (get_matching_symbol): New function.
1336 (c_parser_require): Add param MATCHING_LOCATION, using it to
1337 highlight matching "opening" tokens for missing "closing" tokens.
1338 (c_parser_skip_until_found): Likewise.
1339 (c_parser_static_assert_declaration_no_semi): Convert explicit
1340 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
1341 class matching_parens, so that the pertinent open parenthesis is
1342 highlighted when there are problems locating the close
1343 parenthesis.
1344 (c_parser_struct_or_union_specifier): Likewise.
1345 (c_parser_typeof_specifier): Likewise.
1346 (c_parser_alignas_specifier): Likewise.
1347 (c_parser_simple_asm_expr): Likewise.
1348 (c_parser_braced_init): Likewise, for matching_braces.
1349 (c_parser_paren_condition): Likewise, for matching_parens.
1350 (c_parser_switch_statement): Likewise.
1351 (c_parser_for_statement): Likewise.
1352 (c_parser_asm_statement): Likewise.
1353 (c_parser_asm_operands): Likewise.
1354 (c_parser_cast_expression): Likewise.
1355 (c_parser_sizeof_expression): Likewise.
1356 (c_parser_alignof_expression): Likewise.
1357 (c_parser_generic_selection): Likewise.
1358 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
1359 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
1360 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
1361 In case CPP_OPEN_PAREN, pass loc_open_paren to the
1362 c_parser_skip_until_found call.
1363 (c_parser_objc_class_definition): Use class matching_parens as
1364 above.
1365 (c_parser_objc_method_decl): Likewise.
1366 (c_parser_objc_try_catch_finally_statement): Likewise.
1367 (c_parser_objc_synchronized_statement): Likewise.
1368 (c_parser_objc_at_property_declaration): Likewise.
1369 (c_parser_oacc_wait_list): Likewise.
1370 (c_parser_omp_var_list_parens): Likewise.
1371 (c_parser_omp_clause_collapse): Likewise.
1372 (c_parser_omp_clause_default): Likewise.
1373 (c_parser_omp_clause_if): Likewise.
1374 (c_parser_omp_clause_num_threads): Likewise.
1375 (c_parser_omp_clause_num_tasks): Likewise.
1376 (c_parser_omp_clause_grainsize): Likewise.
1377 (c_parser_omp_clause_priority): Likewise.
1378 (c_parser_omp_clause_hint): Likewise.
1379 (c_parser_omp_clause_defaultmap): Likewise.
1380 (c_parser_oacc_single_int_clause): Likewise.
1381 (c_parser_omp_clause_ordered): Likewise.
1382 (c_parser_omp_clause_reduction): Likewise.
1383 (c_parser_omp_clause_schedule): Likewise.
1384 (c_parser_omp_clause_num_teams): Likewise.
1385 (c_parser_omp_clause_thread_limit): Likewise.
1386 (c_parser_omp_clause_aligned): Likewise.
1387 (c_parser_omp_clause_linear): Likewise.
1388 (c_parser_omp_clause_safelen): Likewise.
1389 (c_parser_omp_clause_simdlen): Likewise.
1390 (c_parser_omp_clause_depend): Likewise.
1391 (c_parser_omp_clause_map): Likewise.
1392 (c_parser_omp_clause_device): Likewise.
1393 (c_parser_omp_clause_dist_schedule): Likewise.
1394 (c_parser_omp_clause_proc_bind): Likewise.
1395 (c_parser_omp_clause_uniform): Likewise.
1396 (c_parser_omp_for_loop): Likewise.
1397 (c_parser_cilk_clause_vectorlength): Likewise.
1398 (c_parser_cilk_clause_linear): Likewise.
1399 (c_parser_transaction_expression): Likewise.
1400 * c-parser.h (c_parser_require): Add param matching_location with
1401 default UNKNOWN_LOCATION.
1402 (c_parser_error): Convert return type from void to bool.
1403 (c_parser_skip_until_found): Add param matching_location with
1404 default UNKNOWN_LOCATION.
1405
30af3a2b
MP
14062017-08-09 Marek Polacek <polacek@redhat.com>
1407
1408 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
1409 * c-tree.h (build_external_ref): Update declaration.
1410 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
1411 (build_external_ref): Change the type of a parameter to bool.
1412 (parser_build_binary_op): Use true/false instead of 1/0.
1413 (pointer_diff): Likewise.
1414 (build_modify_expr): Likewise.
1415 (set_designator): Change the type of a parameter to bool.
1416 (set_init_index): Use true/false instead of 1/0.
1417 (set_init_label): Likewise.
1418 (output_init_element): Change the type of a parameter to bool.
1419 (output_pending_init_elements): Use true/false instead of 1/0.
1420 (process_init_element): Likewise.
1421 (build_binary_op): Change the type of a parameter to bool.
1422
296c53ac
MP
14232017-08-09 Marek Polacek <polacek@redhat.com>
1424
1425 PR c/81233
1426 * c-typeck.c (pedwarn_init): Make the function take a variable list.
1427 Call emit_diagnostic_valist instead of pedwarn.
1428 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
1429 Print the relevant types in diagnostics.
1430
a32c8316
MP
14312017-08-09 Marek Polacek <polacek@redhat.com>
1432
1433 PR c/81417
1434 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
1435 build_conditional_expr.
1436 * c-parser.c (c_parser_conditional_expression): Create locations for
1437 EXP1 and EXP2 from their source ranges. Pass the locations down to
1438 build_conditional_expr.
1439 * c-tree.h (build_conditional_expr): Update declaration.
1440 * c-typeck.c (build_conditional_expr): Add location_t parameters.
1441 For -Wsign-compare, also print the types.
1442
314e6352
ML
14432017-08-08 Martin Liska <mliska@suse.cz>
1444
1445 * c-convert.c: Include header files.
1446 * c-typeck.c: Likewise.
1447
577eec56
ML
14482017-08-07 Martin Liska <mliska@suse.cz>
1449
1450 * c-parser.c (c_parser_attributes): Canonicalize name of an
1451 attribute.
1452
f7b6353a
MP
14532017-08-02 Marek Polacek <polacek@redhat.com>
1454
1455 PR c/81289
1456 * c-parser.c (c_parser_unary_expression): Use set_error.
1457
8a6eab34
MP
1458 PR c/81448
1459 PR c/81306
1460 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
1461 warnings. Avoid walking MACRO_MAP_LOCATIONS.
1462
7fef86d3
JH
14632017-07-31 Jan Hubicka <hubicka@ucw.cz>
1464 Martin Liska <mliska@suse.cz>
1465
1466 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 1467 statement.
7fef86d3 1468
f34ebeb2
ML
14692017-07-31 Martin Liska <mliska@suse.cz>
1470
1471 PR sanitize/81530
1472 * c-convert.c (convert): Guard condition with flag_sanitize_p
1473 also with current_function_decl non-null equality.
1474 * c-decl.c (grokdeclarator): Likewise.
1475 * c-typeck.c (build_binary_op): Likewise.
1476
8595f67b
MP
14772017-07-25 Marek Polacek <polacek@redhat.com>
1478
1479 * c-decl.c (grokfield): Remove local variable.
1480
d49718d6
MP
14812017-07-25 Marek Polacek <polacek@redhat.com>
1482
1483 PR c/81364
1484 * c-parser.c (c_parser_else_body): Don't warn about multistatement
1485 macro expansion if the body is in { }.
1486 (c_parser_while_statement): Likewise.
1487 (c_parser_for_statement): Likewise.
1488
ff22eb12
NS
14892017-07-18 Nathan Sidwell <nathan@acm.org>
1490
1491 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
1492
eea77d1f
DM
14932017-07-14 David Malcolm <dmalcolm@redhat.com>
1494
1495 * c-decl.c (implicitly_declare): When suggesting a missing
1496 #include, provide a fix-it hint.
1497
b6f43128
DM
14982017-07-06 David Malcolm <dmalcolm@redhat.com>
1499
1500 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
1501 and call that instead.
1502 * c-tree.h (selftest::run_c_tests): New decl.
1503
3e2becc4
MP
15042017-06-26 Marek Polacek <polacek@redhat.com>
1505
1506 PR c/80116
1507 * c-parser.c (c_parser_if_body): Set the location of the
1508 body of the conditional after parsing all the labels. Call
1509 warn_for_multistatement_macros.
1510 (c_parser_else_body): Likewise.
1511 (c_parser_switch_statement): Likewise.
1512 (c_parser_while_statement): Likewise.
1513 (c_parser_for_statement): Likewise.
1514 (c_parser_statement): Add a default argument. Save the location
1515 after labels have been parsed.
1516 (c_parser_c99_block_statement): Likewise.
1517
343ae898
RB
15182017-06-19 Richard Biener <rguenther@suse.de>
1519
1520 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1521 negated _Literals to parse _Literal (int) -1.
1522
45b2222a
ML
15232017-06-13 Martin Liska <mliska@suse.cz>
1524
1525 PR sanitize/78204
1526 * c-convert.c (convert): Use sanitize_flags_p.
1527 * c-decl.c (grokdeclarator): Likewise.
1528 * c-typeck.c (convert_for_assignment): Likewise.
1529 (c_finish_return): Likewise.
1530 (build_binary_op): Likewise.
1531
8ab7005b
JJ
15322017-06-08 Jakub Jelinek <jakub@redhat.com>
1533
1534 PR c/81006
1535 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
1536 to sizetype before size_binop.
1537
363dc72c
JJ
15382017-06-07 Jakub Jelinek <jakub@redhat.com>
1539
1540 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
1541 of TDI_generic.
1542
dc949728
MP
15432017-06-06 Marek Polacek <polacek@redhat.com>
1544
1545 PR c/79983
1546 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
1547 ref.
1548 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
1549
40ffd95f
BE
15502017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1551
1552 * c-parser.c (c_parser_binary_expression): Implement the
1553 -Wsizeof_pointer_div warning.
1554 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
1555 from a parenthesized expression.
1556 (c_parser_expr_list): Use c_last_sizeof_loc.
1557 * c-tree.h (c_last_sizeof_loc): New external.
1558 * c-typeck.c (c_last_sizeof_loc): New variable.
1559 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
1560
9fc5e7a4
MM
15612017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
1562
1563 PR testsuite/80580
1564 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
1565
f012c8ef
DM
15662017-05-30 David Malcolm <dmalcolm@redhat.com>
1567
1568 * c-objc-common.c (c_tree_printer): Gain bool and const char **
1569 parameters.
1570
3cd211af
MS
15712017-05-24 Martin Sebor <msebor@redhat.com>
1572
1573 PR c/80731
1574 * c-fold.c (c_fully_fold_internal): Adjust.
1575 * c-typeck.c (parser_build_unary_op): Adjust.
1576
fd71a9a2
TS
15772017-05-23 Thomas Schwinge <thomas@codesourcery.com>
1578
1579 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
1580 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
1581 "VECTOR_LENGTH".
1582
92fa0f9e
MP
15832017-05-23 Marek Polacek <polacek@redhat.com>
1584
1585 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
1586 quotes.
1587
d11c168a
JJ
15882017-05-22 Jakub Jelinek <jakub@redhat.com>
1589
1590 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
1591 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
1592 it returned invariant. Call tree_invariant_p unconditionally
1593 afterwards to decide whether to return expr or op0.
1594
58aca9d9
NS
15952017-05-22 Nathan Sidwell <nathan@acm.org>
1596
1597 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
1598
7fd549d2
TS
15992017-05-19 Thomas Schwinge <thomas@codesourcery.com>
1600
1601 * c-parser.c (c_parser_omp_clause_default): Handle
1602 "OMP_CLAUSE_DEFAULT_PRESENT".
1603
6ecd2339
BE
16042017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1605
1606 * config-lang.in (gtfiles): Add c-family/c-format.c.
1607
8a57ecff
NS
16082017-05-18 Nathan Sidwell <nathan@acm.org>
1609
1610 * c-decl.c (pushdecl_top_level): Delete unused function.
1611
6574d78e
MP
16122017-05-18 Marek Polacek <polacek@redhat.com>
1613
1614 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
1615 (check_earlier_gotos): Likewise.
1616 (define_label): Likewise.
1617 (pending_xref_error): Likewise.
1618 (smallest_type_quals_location): Likewise.
1619 (grokdeclarator): Likewise.
1620 (grokparms): Likewise.
1621 (identifier_global_value): Likewise.
1622 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
1623 (find_init_member): Likewise.
1624
e3455240
MP
16252017-05-18 Marek Polacek <polacek@redhat.com>
1626
1627 * c-decl.c (start_decl): Use false/true instead of 0/1.
1628 (grokdeclarator): Likewise.
1629 (finish_struct): Likewise.
1630 (start_function): Change the return type to bool. Use false/true
1631 instead of 0/1.
1632 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
1633 * c-tree.h (start_function): Update.
1634 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
1635 (set_designator): Change the return type to bool. Use false/true
1636 instead of 0/1.
1637
3fa8871b
MP
16382017-05-17 Marek Polacek <polacek@redhat.com>
1639
1640 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
1641 * c-typeck.c: Likewise.
1642
142473df
MP
16432017-05-17 Marek Polacek <polacek@redhat.com>
1644
1645 PR sanitizer/80659
1646 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
1647 DECL_IGNORED_P even for non-static compound literals.
1648
1a817418
ML
16492017-05-17 Martin Liska <mliska@suse.cz>
1650
1651 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1652 use it instead of int type.
1653
b2fa0a8b
MP
16542017-05-17 Marek Polacek <polacek@redhat.com>
1655
1656 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
1657 call c_fully_fold.
1658 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
1659 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
1660 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1661 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1662 save_expr.
1663 (c_parser_conditional_expression): Likewise.
1664 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1665 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1666 (process_init_element): Likewise.
1667 (build_binary_op): Likewise.
1668 (handle_omp_array_sections_1): Likewise.
1669
1e47f02b
TS
16702017-05-12 Thomas Schwinge <thomas@codesourcery.com>
1671
1672 * c-parser.c (c_parser_omp_clause_num_gangs)
1673 (c_parser_omp_clause_num_workers)
1674 (c_parser_omp_clause_vector_length): Merge functions into...
1675 (c_parser_oacc_single_int_clause): ... this new function. Adjust
1676 all users.
1677
c24e924f
NS
16782017-05-11 Nathan Sidwell <nathan@acm.org>
1679
1680 * gimple-parser.c: Don't #include tree-dump.h.
1681
c587104e
MM
16822017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1683
1684 PR testsuite/80580
1685 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
1686
67ac9a9d
MM
16872017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1688
1689 PR testsuite/80580
1690 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1691 incorrect __MEM syntax.
1692
ac4eb40f
MM
16932017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1694
1695 PR testsuite/80580
1696 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1697 type of unary '*'.
1698
641da50a
NS
16992017-05-09 Nathan Sidwell <nathan@acm.org>
1700
1701 * c-tree.h (pushdecl): Declare.
1702
56d35585
DM
17032017-05-05 David Malcolm <dmalcolm@redhat.com>
1704
1705 * c-decl.c (warn_defaults_to): Replace report_diagnostic
1706 with diagnostic_report_diagnostic.
1707 * c-errors.c (pedwarn_c99): Likewise.
1708 (pedwarn_c90): Likewise.
1709
815d9cc6
XR
17102017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1711
92a285c1 1712 PR c++/80038
815d9cc6
XR
1713 * c-gimplify.c (c_gimplify_expr): Remove calls to
1714 cilk_gimplifY_call_params_in_spawned_fn.
1715
1c4ea66f
DM
17162017-04-25 David Malcolm <dmalcolm@redhat.com>
1717
1718 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1719 hint for removing extra semicolon.
1720
666f7903
JJ
17212017-04-21 Jakub Jelinek <jakub@redhat.com>
1722
1723 PR c/80468
1724 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
1725 enabled, set specs->type to integer_type_node.
1726
5764ee3c
JW
17272017-04-03 Jonathan Wakely <jwakely@redhat.com>
1728
1729 * c-array-notation.c: Fix typo in comment.
1730
10fa8dfb
MP
17312017-03-29 Marek Polacek <polacek@redhat.com>
1732
1733 PR c/79730
1734 * c-decl.c (finish_decl): Check VAR_P.
1735
a9e4a1a5
JJ
17362017-03-27 Jakub Jelinek <jakub@redhat.com>
1737
1738 PR middle-end/80162
1739 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1740 * c-typeck.c (c_mark_addressable): Likewise. Look through
1741 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1742 to ARRAY_TYPE.
1743 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
1744
ee3ff394
MP
17452017-03-23 Marek Polacek <polacek@redhat.com>
1746
1747 * c-tree.h: Remove a C_RID_YYCODE reference.
1748
4d1b8e70
JJ
17492017-03-21 Jakub Jelinek <jakub@redhat.com>
1750
1751 PR c/80097
1752 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
1753 optional COMPOUND_EXPR with ubsan instrumentation.
1754
31dc71a8
MP
17552017-03-17 Marek Polacek <polacek@redhat.com>
1756
1757 * c-parser.c: Add C11 references.
1758
d579c385
MP
17592017-03-15 Marek Polacek <polacek@redhat.com>
1760
1761 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
1762
85059a38
MP
17632017-03-11 Marek Polacek <polacek@redhat.com>
1764
1765 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
1766
2f6f187a
DM
17672017-03-10 David Malcolm <dmalcolm@redhat.com>
1768
1769 PR translation/79848
1770 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1771 "%qs".
1772 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1773
36618428
MP
17742017-03-09 Marek Polacek <polacek@redhat.com>
1775
1776 PR sanitizer/79757
1777 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1778 parameter declarations with initializers.
1779
01e5af5a
JJ
17802017-03-09 Jakub Jelinek <jakub@redhat.com>
1781
1782 PR c/79969
1783 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
1784 TYPE_STUB_DECL.
1785
a71dbc63
JJ
17862017-03-07 Jakub Jelinek <jakub@redhat.com>
1787
1788 PR c/79834
1789 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1790 for "may only be used in compound statements" diagnostics, change it
1791 such that the same translatable string is used for all pragmas. For
1792 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1793 diagnostics.
1794 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1795 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1796 "may only be used in compound statements" diagnostics, such that the
1797 same translatable string is used for all pragmas.
1798
1ff4bae6
MP
17992017-03-04 Marek Polacek <polacek@redhat.com>
1800
1801 PR c/79847
1802 * c-decl.c (implicit_decl_warning): Add missing space.
1803
7f5a7d78
MP
18042017-03-03 Marek Polacek <polacek@redhat.com>
1805
1806 PR c/79758
1807 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1808 current_function_prototype_arg_types is error_mark_node. Fix
1809 formatting. Use TREE_VALUE instead of TREE_TYPE.
1810
883c8f06
JJ
18112017-03-03 Jakub Jelinek <jakub@redhat.com>
1812
79c9b7a8
JJ
1813 PR c/79837
1814 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1815 %<min%> or %<max%> in the diagnostics, instead mention identifier.
1816 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1817 diagnostics.
1818
883c8f06
JJ
1819 PR c/79836
1820 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1821 instead of %<_Generic>.
1822 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1823 (c_parser_omp_target_exit_data): Use %<release%> instead of
1824 %<release>.
1825
324ff1a0
JJ
18262017-02-28 Jakub Jelinek <jakub@redhat.com>
1827
1828 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1829 instead of just cond ? "..." : "...".
1830 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1831 for "enter"/"exit" keyword.
1832 (c_finish_oacc_routine): Don't use %s to supply portions of the
1833 message.
1834
4227c9ad
JJ
18352017-02-24 Jakub Jelinek <jakub@redhat.com>
1836
1837 PR c++/79588
1838 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1839 handle -Wrestrict here.
1840 * c-typeck.c (build_function_call_vec): Adjust
1841 check_function_arguments caller.
1842
5d972e66
RB
18432017-02-23 Richard Biener <rguenther@suse.de>
1844
1845 PR c/79684
1846 * gimple-parser.c (c_parser_gimple_statement): Use set_error
1847 to initialize c_exprs to return.
1848 (c_parser_gimple_binary_expression): Likewise.
1849 (c_parser_gimple_unary_expression): Likewise.
1850 (c_parser_gimple_postfix_expression): Likewise.
1851
61ac5ebe
MP
18522017-02-22 Marek Polacek <polacek@redhat.com>
1853
1854 PR c/79662
1855 * c-typeck.c (convert_arguments): Handle error_mark_node.
1856
41d1b0b1
PK
18572017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1858
1859 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1860 value of c_parser_parse_ssa_name against error_mark_node and emit
1861 error if ssa name is anonymous and written as default definition.
1862
eab1f169
PK
18632017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1864
1865 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1866 FMA_EXPR.
1867
bcac0b4d
JJ
18682017-02-16 Jakub Jelinek <jakub@redhat.com>
1869
1870 PR c++/79512
1871 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1872 ignore #pragma omp target even when not followed by identifier.
1873
1be33173
PK
18742017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1875
1876 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1877 (c_parser_gimple_unary_expression): Likewise.
1878
aa326bfb
JJ
18792017-02-13 Jakub Jelinek <jakub@redhat.com>
1880
1881 * c-parser.c (c_parser_oacc_declare): Add missing space in
1882 diagnostics.
1883
8a398bc5
PK
18842017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1885
1886 PR c/79478
1887 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1888 set_c_expr_source_range when parsing ssa-name.
1889
3dcde5ef
PG
18902017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
1891 Richard Biener <rguenther@suse.de>
1892
1893 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1894 building IL when arguments are error_mark_node.
1895 (c_parser_gimple_unary_expression): Likewise.
1896 (c_parser_gimple_if_stmt): Likewise.
1897 (c_parser_gimple_switch_stmt): Likewise.
1898 (c_parser_gimple_return_stmt): Likewise.
1899 (c_parser_parse_ssa_name): When name lookup fails do not build
1900 an SSA name. Use undeclared rather than not declared in error
1901 reporting.
1902
192b048b
MP
19032017-02-09 Marek Polacek <polacek@redhat.com>
1904
1905 PR c/79428
1906 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1907 instead of c_parser_skip_until_found.
1908
56f71478
JJ
19092017-02-09 Jakub Jelinek <jakub@redhat.com>
1910
1911 PR c/79431
1912 * c-parser.c (c_parser_omp_declare_target): Don't invoke
1913 symtab_node::get on automatic variables.
1914
02889d23
CLT
19152016-02-09 Nathan Sidwell <nathan@codesourcery.com>
1916 Chung-Lin Tang <cltang@codesourcery.com>
1917
1918 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1919 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1920 semantic checking.
1921 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1922
7af4b20d
RB
19232017-02-07 Richard Biener <rguenther@suse.de>
1924
1925 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1926 (c_parser_gimple_postfix_expression_after_primary):
1927 Do not use c_build_function_call_vec to avoid folding and promotion.
1928 Simplify.
1929
e5e391d6
MO
19302017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1931
1932 PR lto/79061
1933 * c-decl.c (pop_scope): Pass main_input_filename to
1934 build_translation_unit_decl.
1935
c2e84327
DM
19362017-01-24 David Malcolm <dmalcolm@redhat.com>
1937
1938 * c-parser.c: Include "read-rtl-function.h" and
1939 "run-rtl-passes.h".
1940 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
1941 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
1942 production. Update for renaming of field "gimple_pass" to
1943 "gimple_or_rtl_pass". If __RTL was seen, call
1944 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
1945 to an auto_timevar, to cope with early exit.
1946 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1947 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1948 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1949 Handle RID_RTL.
1950 (c_parser_parse_rtl_body): New function.
1951 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1952 (struct c_declspecs): Rename field "gimple_pass" to
1953 "gimple_or_rtl_pass". Add field "rtl_p".
1954 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1955 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1956 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1957 (c_parser_gimple_or_rtl_pass_list): ...this.
1958
2ebd93e1
MP
19592017-01-20 Marek Polacek <polacek@redhat.com>
1960
1961 PR c/64279
1962 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1963
b1c95bb5
RB
19642017-01-13 Richard Biener <rguenther@suse.de>
1965
1966 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1967 nops.
1968
25329913
RB
19692017-01-13 Richard Biener <rguenther@suse.de>
1970
1971 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1972 _Literal ( type-name ) number.
1973
6bb4ea5c
RB
19742017-01-12 Richard Biener <rguenther@suse.de>
1975
1976 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1977 __MEM.
1978
6b5b4e9c
JJ
19792017-01-11 Jakub Jelinek <jakub@redhat.com>
1980
1981 PR c++/72813
1982 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
1983 PCH file.
1984
e3252775
RB
19852017-01-11 Richard Biener <rguenther@suse.de>
1986
1987 PR bootstrap/79052
1988 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
1989 returns on parse errors.
1990
a9342885
MP
19912017-01-04 Marek Polacek <polacek@redhat.com>
1992
1993 PR c++/64767
1994 * c-parser.c (c_parser_postfix_expression): Mark zero character
1995 constants by setting original_type in c_expr.
1996 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
1997 with a zero character constant.
1998 (char_type_p): New function.
1999
5dd9a9d0
DM
20002017-01-04 David Malcolm <dmalcolm@redhat.com>
2001
2002 * c-parser.c (c_parser_declaration_or_fndef): Create a
2003 rich_location at init_loc and parse it to start_init.
2004 (last_init_list_comma): New global.
2005 (c_parser_braced_init): Update last_init_list_comma when parsing
2006 commas. Pass it to pop_init_level. Pass location of closing
2007 brace to pop_init_level.
2008 (c_parser_postfix_expression_after_paren_type): Create a
2009 rich_location at type_loc and parse it to start_init.
2010 (c_parser_omp_declare_reduction): Likewise for loc.
2011 * c-tree.h (start_init): Add rich_location * param.
2012 (pop_init_level): Add location_t param.
2013 * c-typeck.c (struct initializer_stack): Add field
2014 "missing_brace_richloc".
2015 (start_init): Add richloc param, use it to initialize
2016 the stack node's missing_brace_richloc.
2017 (last_init_list_comma): New decl.
2018 (finish_implicit_inits): Pass last_init_list_comma to
2019 pop_init_level.
2020 (push_init_level): When finding missing open braces, add fix-it
2021 hints to the richloc.
2022 (pop_init_level): Add "insert_before" param and pass it
2023 when calling pop_init_level. Add fixits about missing
2024 close braces to any richloc. Use the richloc for the
2025 -Wmissing-braces warning.
2026 (set_designator): Pass last_init_list_comma to pop_init_level.
2027 (process_init_element): Likewise.
2028
cbe34bb5
JJ
20292017-01-01 Jakub Jelinek <jakub@redhat.com>
2030
2031 Update copyright years.
2032
d17680f3
JJ
20332016-12-21 Jakub Jelinek <jakub@redhat.com>
2034
0dba7960
JJ
2035 PR bootstrap/78817
2036 * c-typeck.c (build_function_call_vec): If check_function_arguments
2037 returns true, set TREE_NO_WARNING on CALL_EXPR.
2038
d17680f3
JJ
2039 PR c/77767
2040 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
2041 to *expr instead of overwriting it.
2042
aa90531e
RB
20432016-12-20 Richard Biener <rguenther@suse.de>
2044
2045 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
2046 error recovery.
2047 (c_parser_gimple_statement): Only build assigns for non-error
2048 stmts.
2049 (c_parser_gimple_postfix_expression_after): Improve error recovery.
2050
629b3d75
MJ
20512016-12-14 Martin Jambor <mjambor@suse.cz>
2052
2053 * c-parser.c: Include omp-general.h and omp-offload.h instead of
2054 omp-low.h.
2055 (c_finish_oacc_routine): Adjusted call to
2056 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
2057 to use their new names.
2058 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
2059 use its new name.
2060 (c_parser_oacc_update): Likewise.
2061 (c_parser_omp_simd): Likewise.
2062 (c_parser_omp_target_update): Likewise.
2063 * c-typeck.c: Include omp-general.h instead of omp-low.h.
2064 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
2065 name.
2066 (c_finish_omp_cancellation_point): Likewise.
2067 * gimple-parser.c: Do not include omp-low.h
2068
c5af52eb
CP
20692016-12-02 Cesar Philippidis <cesar@codesourcery.com>
2070 James Norris <jnorris@codesourcery.com>
2071
2072 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
2073 EXIT_DATA,WAIT} are not used in compound statements.
2074 (c_parser_oacc_enter_exit_data): Update diagnostics.
2075
48330c93
BE
20762016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2077
2078 PR c++/71973
2079 * c-decl.c (diagnose_mismatched_decls): Use
2080 OPT_Wbuiltin_declaration_mismatch here too.
2081
899ca90e 20822016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
2083 Alan Hayward <alan.hayward@arm.com>
2084 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
2085
2086 * c-decl.c (merge_decls): Use SET_DECL_MODE.
2087 (make_label, finish_struct): Likewise.
2088
1ee62b92 20892016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 2090 Richard Biener <rguenther@suse.de>
22b15758 2091
8e745a17
JJ
2092 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
2093 * config-lang.in (gtfiles): Add c/c-parser.h.
2094 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
2095 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
2096 * c-parser.c (enum c_id_kind, struct c_token,
2097 c_parser_next_token_is, c_parser_next_token_is_not,
2098 c_parser_next_token_is_keyword,
2099 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
2100 Split out to ...
2101 * c-parser.h: ... new header.
2102 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 2103 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
2104 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2105 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2106 c_parser_error, c_parser_require, c_parser_skip_until_found,
2107 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2108 c_parser_type_name): Export.
2109 (c_parser_tokens_buf): New function.
2110 (c_parser_error): Likewise.
2111 (c_parser_set_error): Likewise.
2112 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
2113 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
2114 via c_parser_parse_gimple_body.
8e745a17
JJ
2115 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
2116 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2117 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2118 c_parser_error, c_parser_require, c_parser_skip_until_found,
2119 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2120 c_parser_type_name): Declare.
1ee62b92
PG
2121 (struct c_parser): Declare forward.
2122 (c_parser_tokens_buf): Declare.
8e745a17
JJ
2123 (c_parser_error): Likewise.
2124 (c_parser_set_error): Likewise.
2125 * gimple-parser.c: New file.
2126 * gimple-parser.h: Likewise.
1ee62b92 2127
22b15758
UB
21282016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2129
2130 PR c/35503
2131 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2132 warn_for_restrict.
2133
84ff4775
LCW
21342016-09-11 Le-Chun Wu <lcwu@google.com>
2135 Mark Wielaard <mjw@redhat.com>
2136
2137 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
2138 to the given -Wshadow= variant.
2139
4d0cdd0c
TP
21402016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2141
2142 * c-typeck.c: Include memmodel.h.
2143
1202f33e
JJ
21442016-10-13 Jakub Jelinek <jakub@redhat.com>
2145
2146 PR target/77957
2147 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
2148 instead of lhd_return_null_tree_v.
2149
8a14afd0
BS
21502016-10-07 Bernd Schmidt <bschmidt@redhat.com>
2151
2152 PR c++/69733
2153 * c-decl.c (smallest_type_quals_location): New static function.
2154 (grokdeclarator): Try to find the correct location for an ignored
2155 qualifier.
2156
81fea426
MP
21572016-09-26 Marek Polacek <polacek@redhat.com>
2158
2159 PR c/7652
2160 * c-decl.c (pop_scope): Add gcc_fallthrough.
2161
21622016-09-26 Marek Polacek <polacek@redhat.com>
2163
2164 PR c/7652
2165 * c-parser.c (struct c_token): Add flags field.
2166 (c_lex_one_token): Pass it to c_lex_with_flags.
2167 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
2168 into IFN_FALLTHROUGH.
2169 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
2170 attribute fallthrough after a case label or default label.
2171 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
2172
9a2300e9
MP
21732016-09-24 Marek Polacek <polacek@redhat.com>
2174
2175 PR c/77490
2176 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
2177 have boolean value. Warn about ++/-- on booleans.
2178
7de76362
JJ
21792016-09-23 Jakub Jelinek <jakub@redhat.com>
2180
2181 * c-parser.c (incomplete_record_decls): Remove unnecessary
2182 = vNULL initialization of file scope vec.
2183
5b73d2ab
MP
21842016-09-16 Marek Polacek <polacek@redhat.com>
2185
2186 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
2187
e51fbec3
MP
21882016-09-14 Marek Polacek <polacek@redhat.com>
2189
2190 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
2191 (fix_array_notation_expr): Likewise.
2192 * c-decl.c (finish_decl): Likewise.
2193 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2194 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
2195 (function_to_pointer_conversion): Use false instead of 0.
2196 (convert_lvalue_to_rvalue): Likewise.
2197 (parser_build_unary_op): Likewise.
2198 (build_atomic_assign): Likewise.
2199 (build_unary_op): Change nonconvert parameter type to bool, use
2200 true/false instead of 1/0.
2201 (build_binary_op): Use true instead of 1.
2202
254830ba
DM
22032016-09-13 David Malcolm <dmalcolm@redhat.com>
2204
2205 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
2206 of add_fixit_insert to add_fixit_insert_before.
2207
4c13ba17
MP
22082016-09-13 Marek Polacek <polacek@redhat.com>
2209
2210 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
2211 it.
2212
54dcdb88
BE
22132016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
2214
2215 PR c++/77496
2216 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
2217 COMPOUND_EXPR to warn_for_omitted_condop.
2218
e5106e27
DM
22192016-09-07 David Malcolm <dmalcolm@redhat.com>
2220
2221 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
2222 c_get_substring_location for this new langhook.
2223
9dc5773f
JJ
22242016-09-02 Jakub Jelinek <jakub@redhat.com>
2225
2226 PR c/65467
2227 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
2228 flag_openmp.
2229 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
2230 instead of mark_exp_read on low_bound/length expression.
2231 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
2232 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2233 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2234 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
2235 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
2236 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
2237 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
2238 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
2239 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
2240 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
2241 instead of mark_expr_read.
2242 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
2243 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
2244 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
2245 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
2246 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
2247 array section bases outside of depend clause, for depend clause
2248 use convert_lvalue_to_rvalue on the base.
2249 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
2250 linear, aligned, map, to and from clauses.
2251 (c_omp_clause_copy_ctor): New function.
2252
295844f6
MP
22532016-09-01 Marek Polacek <polacek@redhat.com>
2254
2255 PR c/7652
2256 * c-typeck.c (composite_type): Add FALLTHRU comment.
2257
089af25c
DM
22582016-08-31 David Malcolm <dmalcolm@redhat.com>
2259
2260 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
2261 to the insertion fixits for "struct", "union", and "enum".
2262
f9087798
DM
22632016-08-30 David Malcolm <dmalcolm@redhat.com>
2264
2265 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
2266 rather than add_fixit_misspelled_id.
2267 (undeclared_variable): Likewise.
2268 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
2269 now-redundant "here" params from add_fixit_insert method calls.
2270 (c_parser_parameter_declaration): Likewise.
2271 * c-typeck.c (build_component_ref): Remove now-redundant range
2272 param from add_fixit_replace method calls.
2273
ebef225f
MP
22742016-08-25 Marek Polacek <polacek@redhat.com>
2275
2276 * c-typeck.c (parser_build_binary_op): Pass LHS to
2277 warn_logical_not_parentheses.
2278
fe377a48
MP
22792016-08-25 Marek Polacek <polacek@redhat.com>
2280
2281 PR c/77323
2282 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
2283 or _FloatN or _FloatNx is not supported.
2284 (finish_declspecs): Set type to integer_type_node when _FloatN or
2285 _FloatNx is not supported.
2286
c65699ef
JM
22872016-08-19 Joseph Myers <joseph@codesourcery.com>
2288
2289 PR c/32187
2290 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
2291 (struct c_declspecs): Add field floatn_nx_idx.
2292 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
2293 and _FloatNx type specifiers.
2294 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
2295 (c_parser_declspecs, c_parser_attribute_any_word)
2296 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
2297 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
2298 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
2299 narrower than double.
2300
2f1364c2
JJ
23012016-08-12 Jakub Jelinek <jakub@redhat.com>
2302 Martin Liska <mliska@suse.cz>
2303
2304 PR c/67410
2305 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
2306 % to determine val element to change. Assert that
2307 wchar_bytes * charwidth fits into val array.
2308
191816a3
MP
23092016-08-12 Marek Polacek <polacek@redhat.com>
2310
2311 PR c/7652
2312 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
2313 (c_parser_postfix_expression): Likewise.
2314 * c-typeck.c (build_unary_op): Adjust fall through comment.
2315 (c_mark_addressable): Likewise.
2316
b95a64bb
JJ
23172016-08-11 Jakub Jelinek <jakub@redhat.com>
2318
2319 PR c/72816
2320 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
2321 array member through typedef, for orig_qual_indirect == 0 clear
2322 orig_qual_type.
2323
895aa8e1
DM
23242016-08-08 David Malcolm <dmalcolm@redhat.com>
2325
2326 PR c/64955
2327 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
2328 this up to selftest::run_c_tests.
2329 (selftest::run_c_tests): New function.
2330
0b212d8c
TS
23312016-08-04 Thomas Schwinge <thomas@codesourcery.com>
2332
ae9281fc
TS
2333 * c-parser.c (struct oacc_routine_data): Add error_seen and
2334 fndecl_seen members.
2335 (c_finish_oacc_routine): Use these.
2336 (c_parser_declaration_or_fndef): Adjust.
2337 (c_parser_oacc_routine): Likewise. Support more C language
2338 constructs, and improve diagnostics. Move pragma context
2339 checking...
2340 (c_parser_pragma): ... here.
2341
0b212d8c
TS
2342 * c-parser.c (struct oacc_routine_data): New.
2343 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
2344 Simplify code.
2345 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
2346 declare target" attribute.
2347
76e2c821
JB
23482016-08-01 Jan Beulich <jbeulich@suse.com>
2349
2350 * c-fold.c (c_fully_fold_internal): Also emit shift count
2351 warnings for vector types.
2352 * c-typeck.c (build_binary_op): Likewise.
2353
f618a472
MP
23542016-07-29 Marek Polacek <polacek@redhat.com>
2355
2356 PR c/71742
2357 * c-decl.c (finish_struct): Rephrase an error message.
2358
efd0786f
MP
2359 PR c/71853
2360 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
2361 to error node for invalid code.
2362
e00dceaf
MP
2363 PR c/71573
2364 * c-decl.c (implicitly_declare): Return decl early not only for
2365 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
2366
673a107a
JJ
23672016-07-29 Jakub Jelinek <jakub@redhat.com>
2368
2369 PR c/71969
2370 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
2371 on GNU extern inline functions.
2372
a5b5c8b6
MP
23732016-07-29 Marek Polacek <polacek@redhat.com>
2374
2375 PR c/71583
2376 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
2377 check expr.value.
2378
e3fe09c1
UB
23792016-07-22 Uros Bizjak <ubizjak@gmail.com>
2380
2381 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
2382
7c8f7eaa
DM
23832016-07-20 David Malcolm <dmalcolm@redhat.com>
2384
2385 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
2386 spellcheck-tree.h
2387 (best_macro_match): Likewise, converting from a typedef to a
2388 subclass.
2389 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
2390 (lookup_name_fuzzy): Update for change of best_macro_match to a
2391 subclass with a ctor that calls cpp_forall_identifiers.
2392
de6a69ee
DM
23932016-07-20 David Malcolm <dmalcolm@redhat.com>
2394
2395 * c-decl.c (implicit_decl_warning): Update for conversion of
2396 return type of lookup_name_fuzzy to const char *.
2397 (undeclared_variable): Likewise.
2398 (lookup_name_fuzzy): Convert return type from tree to
2399 const char *.
2400 * c-parser.c (c_parser_declaration_or_fndef): Update for
2401 conversion of return type of lookup_name_fuzzy to const char *.
2402 (c_parser_parameter_declaration): Likewise.
2403
b1c9c068
CP
24042016-07-15 Cesar Philippidis <cesar@codesourcery.com>
2405
2406 * c-parser.c (c_parser_oacc_declare): Don't scan for
2407 GOMP_MAP_POINTER.
2408 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
2409 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
2410 zero-length subarrays.
2411
ddbbcb19
JJ
24122016-07-15 Jakub Jelinek <jakub@redhat.com>
2413
2414 PR c/71858
2415 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
2416 instead of FUZZY_LOOKUP_NAME.
2417 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
2418 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
2419
dd36b877
JJ
24202016-07-14 Jakub Jelinek <jakub@redhat.com>
2421
2422 PR c/71858
2423 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
2424
8c681247
TS
24252016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2426
2427 * c-parser.c (c_parser_generic_selection): Make type of variable
2428 auto_vec.
2429 (c_parser_omp_declare_simd): Likewise.
2430
bf4fa671
TS
24312016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2432
2433 * c-decl.c (struct c_struct_parse_info): Change member types
2434 from vec to auto_vec.
2435 (start_struct): Adjust.
2436 (finish_struct): Likewise.
2437
557e8c49
JJ
24382016-07-02 Jakub Jelinek <jakub@redhat.com>
2439
2440 PR c/71719
2441 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
2442
54d19c3b
TS
24432016-06-29 Thomas Schwinge <thomas@codesourcery.com>
2444
2445 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
2446 Move pragma context checking into...
2447 (c_parser_omp_cancellation_point): ... here, and improve
2448 diagnostic messages.
2449 * c-typeck.c (c_finish_omp_cancel)
2450 (c_finish_omp_cancellation_point): Improve diagnostic messages.
2451
152ef731
JJ
24522016-06-29 Jakub Jelinek <jakub@redhat.com>
2453
2454 PR c/71685
2455 * c-typeck.c (c_build_qualified_type): Don't clear
2456 C_TYPE_INCOMPLETE_VARS for the main variant.
2457
24582016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
2459
2460 PR c/71552
2461 * c-typeck.c (output_init_element): Diagnose incompatible types
2462 before non-constant initializers.
2463
e9ac1f86
JJ
24642016-06-28 Jakub Jelinek <jakub@redhat.com>
2465
2466 * Make-lang.in: Don't cat ../stage_current if it does not exist.
2467
277d7ee0
AK
24682016-06-23 Andi Kleen <ak@linux.intel.com>
2469
2470 * Make-lang.in: Add support for autofdo.
2471
1a4f11c8
DM
24722016-06-22 David Malcolm <dmalcolm@redhat.com>
2473
2474 PR c/70339
2475 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
2476 (implicit_decl_warning): When issuing warnings for implicit
2477 declarations, attempt to provide a suggestion via
2478 lookup_name_fuzzy.
2479 (undeclared_variable): Likewise when issuing errors.
2480 (lookup_name_in_scope): Likewise.
2481 (struct edit_distance_traits<cpp_hashnode *>): New struct.
2482 (best_macro_match): New typedef.
2483 (find_closest_macro_cpp_cb): New function.
2484 (lookup_name_fuzzy): New function.
2485 * c-parser.c: Include gcc-rich-location.h.
2486 (c_token_starts_typename): Split out case CPP_KEYWORD into...
2487 (c_keyword_starts_typename): ...this new function.
2488 (c_parser_declaration_or_fndef): When issuing errors about
2489 missing "struct" etc, add a fixit. For other kinds of errors,
2490 attempt to provide a suggestion via lookup_name_fuzzy.
2491 (c_parser_parms_declarator): When looking ahead to detect typos in
2492 type names, also reject CPP_KEYWORD.
2493 (c_parser_parameter_declaration): When issuing errors about
2494 unknown type names, attempt to provide a suggestion via
2495 lookup_name_fuzzy.
2496 * c-tree.h (c_keyword_starts_typename): New prototype.
2497
5a578671
JM
24982016-06-20 Joseph Myers <joseph@codesourcery.com>
2499
2500 PR c/71601
2501 * c-typeck.c (build_conditional_expr): Return error_mark_node if
2502 c_common_type returns error_mark_node.
2503
3f8257db 25042016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
2505
2506 PR c/69507
2507 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
2508 __alignof__ (expression).
2509
6a3f203c
DM
25102016-06-14 David Malcolm <dmalcolm@redhat.com>
2511
2512 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
2513
264757fb
DM
25142016-06-14 David Malcolm <dmalcolm@redhat.com>
2515
2516 * c-typeck.c (build_component_ref): Simplify fixit code by
2517 using gcc_rich_location::add_fixit_misspelled_id.
2518 (set_init_label): Likewise.
2519
f7e4f2e3
DM
25202016-06-13 David Malcolm <dmalcolm@redhat.com>
2521
2522 * c-parser.c (c_parser_initelt): Provide location of name for new
2523 location_t param of set_init_label.
2524 * c-tree.h (set_init_label): Add location_t param.
2525 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
2526 param and use it when issuing error messages about unrecognized
2527 field names. Attempt to provide a fixit hint if appropriate,
2528 otherwise update the error message to provide the type name.
2529
4b1ffdb1
TS
25302016-06-10 Thomas Schwinge <thomas@codesourcery.com>
2531
2532 PR c/71381
2533 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
2534 Loosen checking.
2535
44a845ca
MS
25362016-06-08 Martin Sebor <msebor@redhat.com>
2537 Jakub Jelinek <jakub@redhat.com>
2538
2539 PR c++/70507
2540 PR c/68120
2541 * c-typeck.c (convert_arguments): Don't promote last argument
2542 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2543
92a5f2ba
MP
25442016-06-08 Marek Polacek <polacek@redhat.com>
2545
2546 PR c/71418
2547 * c-decl.c (grokdeclarator): Check TYPE_P.
2548
08203f73
MP
2549 PR c/71426
2550 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
2551 code.
2552
6ffd47b7
DM
25532016-06-07 David Malcolm <dmalcolm@redhat.com>
2554
2555 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
2556 and structure element reference, capture the location of the
2557 element name token and pass it to build_component_ref.
2558 (c_parser_postfix_expression_after_primary): Likewise for
2559 structure element dereference.
2560 (c_parser_omp_variable_list): Likewise for
2561 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
2562 * c-tree.h (build_component_ref): Add location_t param.
2563 * c-typeck.c (build_component_ref): Add location_t param
2564 COMPONENT_LOC. Use it, if available, when issuing hints about
2565 mispelled member names to provide a fixit replacement hint.
2566
1f40cff3
MP
25672016-06-06 Marek Polacek <polacek@redhat.com>
2568
2569 PR c/71362
2570 * c-parser.c (c_parser_direct_declarator): Set location.
2571
5545a907
MP
25722016-06-06 Marek Polacek <polacek@redhat.com>
2573
2574 * c-typeck.c (comptypes_internal): Handle comparisons of
2575 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
2576 TYPE_REF_CAN_ALIAS_ALL.
2577
b605f663
CLT
25782016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
2579
2580 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
2581 arguments as addressable when async clause exists.
2582
00631022
JJ
25832016-05-30 Jakub Jelinek <jakub@redhat.com>
2584
2585 PR c++/71349
2586 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
2587 when combined with target construct.
2588
7211a097
JJ
25892016-05-26 Jakub Jelinek <jakub@redhat.com>
2590
2591 * c-parser.c (c_parser_omp_clause_schedule): Warn if
2592 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
2593
95efe6b6
MP
25942016-05-25 Marek Polacek <polacek@redhat.com>
2595
2596 PR c/71265
2597 * c-decl.c (c_make_fname_decl): Don't check seen_error.
2598
a23faf7a
MP
2599 PR c/71266
2600 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
2601
e46c7770
CP
26022016-05-24 Cesar Philippidis <cesar@codesourcery.com>
2603
2604 * c-parser.c (c_parser_oacc_declare): Add support for
2605 GOMP_MAP_FIRSTPRIVATE_POINTER.
2606 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
2607 argument with enum c_omp_region_type ort.
2608 (handle_omp_array_sections): Likewise. Update call to
2609 handle_omp_array_sections_1.
2610 (c_finish_omp_clauses): Add specific errors and warning messages for
2611 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
2612 call to handle_omp_array_sections.
2613
a04e69c0
TS
26142016-05-24 Thomas Schwinge <thomas@codesourcery.com>
2615
2616 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
2617
f17a223d
RB
26182016-05-24 Richard Biener <rguenther@suse.de>
2619
2620 PR middle-end/70434
2621 PR c/69504
2622 * c-typeck.c (build_array_ref): Do not complain about indexing
2623 non-lvalue vectors. Adjust for function name change.
2624
79063edd
MS
26252016-05-20 Martin Sebor <msebor@redhat.com>
2626
2627 PR c/71115
2628 * c-typeck.c (error_init): Use
2629 expansion_point_location_if_in_system_header.
2630 (warning_init): Same.
2631
8a40fef3
DM
26322016-05-19 David Malcolm <dmalcolm@redhat.com>
2633
2634 PR c/71171
2635 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
2636 in error-handling.
2637 (c_parser_postfix_expression): Likewise.
2638 * c-tree.h (c_expr::set_error): New method.
2639 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
2640 that result's range is initialized.
2641
e9892350
JG
26422016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
2643
2644 * c-typeck.c (parser_build_unary_op): Fix formatting.
2645
8fad45f5
MW
26462016-05-16 Matthew Wahab <matthew.wahab@arm.com>
2647
2648 * c-decl.c (grokdeclarator): Remove errmsg and use of
2649 targetm.invalid_return_type.
2650 (grokparms): Remove errmsg and use of
2651 targetm.invalid_parameter_type.
2652
aa4b467b
JM
26532016-05-13 Joseph Myers <joseph@codesourcery.com>
2654
2655 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2656 function return type.
2657
4f2e1536
MP
26582016-05-12 Marek Polacek <polacek@redhat.com>
2659
2660 PR c/70756
2661 * c-decl.c (build_compound_literal): Pass LOC down to
2662 c_incomplete_type_error.
2663 * c-tree.h (require_complete_type): Adjust declaration.
2664 (c_incomplete_type_error): Likewise.
2665 * c-typeck.c (require_complete_type): Add location parameter, pass it
2666 down to c_incomplete_type_error.
2667 (c_incomplete_type_error): Add location parameter, pass it down to
2668 error_at.
2669 (build_component_ref): Pass location down to c_incomplete_type_error.
2670 (default_conversion): Pass location down to require_complete_type.
2671 (build_array_ref): Likewise.
2672 (build_function_call_vec): Likewise.
2673 (convert_arguments): Likewise.
2674 (build_unary_op): Likewise.
2675 (build_c_cast): Likewise.
2676 (build_modify_expr): Likewise.
2677 (convert_for_assignment): Likewise.
2678 (c_finish_omp_clauses): Likewise.
2679
d6e83a8d
MM
26802016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2681
2682 PR c/43651
2683 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
2684 is enabled.
2685 * c-errors.c (pedwarn_c90): Return true if warned.
2686 * c-tree.h (pedwarn_c90): Change return type to bool.
2687 (enum c_declspec_word): Add new enumerator cdw_atomic.
2688
5c3a10fb
MP
26892016-05-11 Marek Polacek <polacek@redhat.com>
2690
2691 PR c++/71024
2692 * c-decl.c (diagnose_mismatched_decls): Factor out code to
2693 diagnose_mismatched_attributes and call it.
2694
cf68d92c
MP
26952016-05-10 Marek Polacek <polacek@redhat.com>
2696
2697 PR c/70255
2698 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2699 on a declaration following the definition.
2700
351f85c5
JJ
27012016-05-05 Jakub Jelinek <jakub@redhat.com>
2702
2703 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2704 parse it through to c_parser_c99_block_statement.
2705 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2706 caller.
2707
deef7113
MP
27082016-05-04 Marek Polacek <polacek@redhat.com>
2709
2710 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2711 OPT_Wdangling_else.
2712
de55efd5
MP
27132016-05-04 Marek Polacek <polacek@redhat.com>
2714
2715 PR c/48778
2716 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2717 for macro expansions.
2718
79ce98bc
MP
27192016-05-03 Marek Polacek <polacek@redhat.com>
2720
2721 PR c/70859
2722 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
2723 check_builtin_function_arguments.
2724
fb2647aa
RB
27252016-05-03 Richard Biener <rguenther@suse.de>
2726
2727 * Make-lang.in (cc1-checksum.c): For stage-final re-use
2728 the checksum from the previous stage.
2729
77886428
CP
27302016-05-02 Cesar Philippidis <cesar@codesourcery.com>
2731
2732 * c-parser.c (c_parser_oacc_all_clauses): Update call to
2733 c_finish_omp_clauses.
2734 (c_parser_omp_all_clauses): Likewise.
2735 (c_parser_oacc_cache): Likewise.
2736 (c_parser_oacc_loop): Likewise.
2737 (omp_split_clauses): Likewise.
2738 (c_parser_omp_declare_target): Likewise.
2739 (c_parser_cilk_all_clauses): Likewise.
2740 (c_parser_cilk_for): Likewise.
2741 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
2742 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2743
7176a4a0
MP
27442016-05-02 Marek Polacek <polacek@redhat.com>
2745
2746 PR c/70851
2747 * c-decl.c (grokdeclarator): Diagnose when array's size has an
2748 incomplete type.
2749
e7ff0319
CP
27502016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2751
2752 PR middle-end/70626
2753 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
2754 OACC_LOOP_CLAUSE_MASK.
2755 (c_parser_oacc_kernels_parallel): Update call to
2756 c_oacc_split_loop_clauses.
2757
9f405ce1
AM
27582016-04-28 Andrew MacLeod <amacleod@redhat.com>
2759
2760 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
2761 argument to build_modify_expr in two cases.
2762
c1e1f433
BS
27632016-04-27 Bernd Schmidt <bschmidt@redhat.com>
2764
2765 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2766 warn_for_memset instead of warning directly here.
2767
2448a956
MP
27682016-04-26 Marek Polacek <polacek@redhat.com>
2769
2770 PR c/67784
2771 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2772 out of ...
2773 (c_parser_for_statement): ... here.
2774 (c_parser_if_statement): Use it.
2775 (c_parser_switch_statement): Use it.
2776 (c_parser_while_statement): Use it.
2777
b02a5e26
MP
2778 PR c/70791
2779 * c-decl.c (pushdecl): Pass LOCUS down to warning.
2780
477d4906
IV
27812016-04-20 Ilya Verbin <ilya.verbin@intel.com>
2782
2783 PR c++/69363
2784 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2785 instead of c_finish_cilk_clauses.
2786 * c-tree.h (c_finish_omp_clauses): Add new default argument.
2787 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
2788 floating-point variables in the linear clause for Cilk Plus.
2789
fe37c7af
MM
27902016-04-18 Michael Matz <matz@suse.de>
2791
2792 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2793 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2794
949505a9
MP
27952016-04-15 Marek Polacek <polacek@redhat.com>
2796
2797 PR c/70671
2798 * c-typeck.c (build_unary_op): Pass location down to error and
2799 warning call.
2800
dda1bf61
JJ
28012016-04-15 Jakub Jelinek <jakub@redhat.com>
2802
2803 PR c/70436
2804 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2805 where needed.
2806 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2807 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2808 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2809 Adjust c_parser_pragma callers.
2810 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
2811 caller.
2812 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2813 c_parser_statement.
2814 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2815 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2816 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2817 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2818 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2819 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2820 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2821 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2822 down where needed.
2823 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
2824 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2825 calls.
2826
99cd9857
MP
28272016-04-13 Marek Polacek <polacek@redhat.com>
2828
2829 PR c/70436
2830 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2831 adjust callers.
2832 (c_parser_statement): Likewise.
2833 (c_parser_c99_block_statement): Likewise.
2834 (c_parser_while_statement): Likewise.
2835 (c_parser_for_statement): Likewise.
2836 (c_parser_if_body): Don't set IF_P here.
2837 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
2838 about dangling else here.
2839 * c-tree.h (c_finish_if_stmt): Adjust declaration.
2840 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
2841 warn about dangling else here.
2842
f13355da
MP
28432016-04-04 Marek Polacek <polacek@redhat.com>
2844
2845 PR c/70307
2846 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2847
5fde6a45
MP
28482016-03-31 Marek Polacek <polacek@redhat.com>
2849
2850 PR c/70297
2851 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2852
4bbf545b
DM
28532016-03-18 David Malcolm <dmalcolm@redhat.com>
2854
2855 PR c/70281
2856 * c-parser.c (c_parser_postfix_expression): Set the source range
2857 for uses of "__builtin_types_compatible_p".
2858
fcc2b74f
JJ
28592016-03-17 Jakub Jelinek <jakub@redhat.com>
2860
2861 PR c/70280
2862 * c-typeck.c (composite_type): Don't count void_list_node
2863 into len, if the list is terminated by void_list_node, start
2864 with void_list_node instead of NULL for newargs. Stop
2865 at void_list_node.
2866
ab4c578f
MP
28672016-03-16 Marek Polacek <polacek@redhat.com>
2868
2869 PR c/70093
2870 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2871 nested functions returning VM types.
2872
96b3c82d
CP
28732016-03-09 Cesar Philippidis <cesar@codesourcery.com>
2874
2875 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2876 when calling c_finish_omp_clauses.
2877
29b9828f
BS
28782016-03-04 Bernd Schmidt <bschmidt@redhat.com>
2879
2880 PR c/69824
2881 * c-decl.c (get_parm_info): Don't queue implicit function declarations
2882 for later.
2883
7ff6ca38
MP
28842016-03-04 Marek Polacek <polacek@redhat.com>
2885
2886 PR c/69798
2887 * c-parser.c (c_parser_postfix_expression): Call
2888 c_parser_cast_expression rather than c_parser_postfix_expression.
2889
686e2237
JJ
28902016-03-01 Jakub Jelinek <jakub@redhat.com>
2891
2892 PR c/69796
2893 PR c/69974
2894 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2895 of incomplete decls to error_mark_node.
2896
0b05329b
MP
28972016-02-24 Marek Polacek <polacek@redhat.com>
2898
2899 PR c/69819
2900 * c-decl.c (finish_decl): Don't update the copy of the type of a
2901 different decl type.
2902
067fbd8b
JJ
29032016-02-23 Jakub Jelinek <jakub@redhat.com>
2904
2905 PR objc/69844
2906 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2907 in id_kind reclassification.
2908
bf14eba2
JJ
29092016-02-16 Jakub Jelinek <jakub@redhat.com>
2910
2911 PR c/69835
2912 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2913
ba539195
JN
29142016-02-16 James Norris <jnorris@codesourcery.com>
2915
2916 PR c/64748
2917 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2918
16595a1f
BS
29192016-02-12 Bernd Schmidt <bschmidt@redhat.com>
2920
f48dfe98
BS
2921 * c-decl.c (build_null_declspecs): Zero the entire struct.
2922
16595a1f
BS
2923 PR c/69522
2924 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
2925 callers changed. If nested_p is true, use it to call
2926 finish_implicit_inits.
2927 * c-tree.h (finish_implicit_inits): Declare.
2928 * c-typeck.c (finish_implicit_inits): New function. Move code
2929 from ...
2930 (push_init_level): ... here.
2931 (set_designator, process_init_element): Call finish_implicit_inits.
2932
66756373
JJ
29332016-02-11 Jakub Jelinek <jakub@redhat.com>
2934
2935 PR c/69768
2936 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
2937 arguments for -Waddress warning.
2938
1066e9b5
JJ
29392016-02-04 Jakub Jelinek <jakub@redhat.com>
2940
2941 PR c/69669
2942 * c-decl.c (finish_enum): When honoring mode attribute,
2943 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2944
3a5d2ba4
JJ
29452016-01-29 Jakub Jelinek <jakub@redhat.com>
2946
2947 PR debug/69518
2948 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2949 all type variants, not just TYPE_MAIN_VARIANT.
2950
cbdd8ae0
JJ
29512016-01-27 Jakub Jelinek <jakub@redhat.com>
2952
2953 PR debug/66869
2954 * c-decl.c (c_write_global_declarations_1): Warn with
2955 warn_unused_function if static prototype without definition
2956 is not C_DECL_USED.
2957
fa74a4bc
MP
29582016-01-27 Marek Polacek <polacek@redhat.com>
2959
2960 PR c/68062
2961 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2962 to unsigned, if needed. Add -Wsign-compare warning.
2963
13f92e8d
JJ
29642016-01-26 Jakub Jelinek <jakub@redhat.com>
2965
2966 PR tree-optimization/69483
2967 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2968
cd8e73dc 29692016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
2970
2971 PR c/24293
2972 * c-tree.h (incomplete_record_decls): Declare.
2973 * c-parser.c (incomplete_record_decls): Define.
2974 (c_parser_translation_unit): Iterate through incomplete_record_decls and
2975 report error if any decl has zero size.
2976 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
2977 or enum type to incomplete_record_decls.
2978
e6d6ec9e
TV
29792016-01-14 Tom de Vries <tom@codesourcery.com>
2980
2981 PR tree-optimization/68773
2982 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
2983 set force_output.
2984
00083992
MP
29852016-01-14 Marek Polacek <polacek@redhat.com>
2986
2987 PR c/69262
2988 * c-decl.c (grokdeclarator): Provide more information for invalid
2989 array declarations.
2990
7443cf13
DM
29912016-01-06 David Malcolm <dmalcolm@redhat.com>
2992
2993 * c-parser.c (c_parser_unary_expression): For dereferences, build
2994 a combined location before calling build_indirect_ref, so that
2995 error reports cover the full range, manually updating the c_expr
2996 src_range.
2997
6b131d5b
MP
29982016-01-06 Marek Polacek <polacek@redhat.com>
2999
3000 PR sanitizer/69099
3001 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
3002 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
3003 NULL.
3004
818ab71a
JJ
30052016-01-04 Jakub Jelinek <jakub@redhat.com>
3006
3007 Update copyright years.
3008
2fe0a208
MP
30092016-01-04 Marek Polacek <polacek@redhat.com>
3010
3011 PR c/68908
3012 * c-typeck.c (build_atomic_assign): Improve commentary. Add
3013 optimization to use __atomic_fetch_* built-in if possible.
3014
c7b48c8a
TS
30152015-12-23 Thomas Schwinge <thomas@codesourcery.com>
3016
3017 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
3018 into...
3019 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
3020 all users.
3021
fda5652f
MP
30222015-12-22 Marek Polacek <polacek@redhat.com>
3023
3024 PR c/69002
3025 * c-typeck.c (build_component_ref): Warn when acessing elements of
3026 atomic structures or unions.
3027
745e411d
DM
30282015-12-21 David Malcolm <dmalcolm@redhat.com>
3029
3030 * c-typeck.c: Include "gcc-rich-location.h".
3031 (build_binary_op): In the two places that call binary_op_error,
3032 create a gcc_rich_location and populate it with the location of
3033 the binary op and its two operands.
3034
94c40e19
DM
30352015-12-16 David Malcolm <dmalcolm@redhat.com>
3036
3037 * c-parser.c (c_parser_statement_after_labels): When calling
3038 c_finish_return, Use the return expression's location if it has
3039 one, falling back to the location of the first token within it.
3040 * c-typeck.c (c_finish_return): When issuing warnings about
3041 the incorrect presence/absence of a return value, issue a note
3042 showing the declaration of the function.
3043
de67c4c3
DM
30442015-12-16 David Malcolm <dmalcolm@redhat.com>
3045
3046 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
3047 to 4.
3048 (c_parser_peek_nth_token): New function.
3049 (c_parser_peek_conflict_marker): New function.
3050 (c_parser_error): Detect conflict markers and report them as such.
3051
a10704e1
DM
30522015-12-16 David Malcolm <dmalcolm@redhat.com>
3053
3054 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
3055 to preserve range information for the primary expression
3056 in the call to c_parser_postfix_expression_after_primary.
3057
8062bca6
DM
30582015-12-16 David Malcolm <dmalcolm@redhat.com>
3059
3060 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
3061 expression location, falling back on the first token location,
3062 rather than always using the latter.
3063
d06f8b75
MP
30642015-12-16 Marek Polacek <polacek@redhat.com>
3065
3066 PR c/64637
3067 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
3068 available.
3069
2994fb91
MP
30702015-12-15 Marek Polacek <polacek@redhat.com>
3071
3072 PR c/68907
3073 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
3074 artificial decl.
3075
a1b93f8d
DM
30762015-12-08 David Malcolm <dmalcolm@redhat.com>
3077
3078 * c-parser.c (c_parser_alignof_expression): Capture location of
3079 closing parenthesis (if any), or of end of unary expression, and
3080 use it to build a src_range for the expression.
3081
46c6e1e2
DM
30822015-12-08 David Malcolm <dmalcolm@redhat.com>
3083
3084 PR c/68757
3085 * c-parser.c (c_parser_get_builtin_args): Add
3086 "out_close_paren_loc" param, and write back to it.
3087 (c_parser_postfix_expression): Capture the closing
3088 parenthesis location for RID_CHOOSE_EXPR,
3089 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
3090 RID_BUILTIN_SHUFFLE and use it to set the source range
3091 for such expressions; within RID_BUILTIN_COMPLEX set
3092 the underlying location.
3093
66189108
MP
30942015-12-07 Marek Polacek <polacek@redhat.com>
3095
3096 PR c/68668
3097 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
3098 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
3099
f187980b
EB
31002015-12-04 Eric Botcazou <ebotcazou@adacore.com>
3101
3102 * c-tree.h (c_build_va_arg): Adjust prototype.
3103 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
3104 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
3105 parameter, adjust throughout and issue an error if EXPR is a component
3106 with reverse storage order.
3107
4250754e
JM
31082015-12-02 Jason Merrill <jason@redhat.com>
3109
3110 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
3111 (c_fully_fold_internal, decl_constant_value_for_optimization):
3112 Move from c-common.c.
3113 * c-tree.h: Declare decl_constant_value_for_optimization.
3114 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
3115
e9e32ee6
JM
31162015-12-02 Joseph Myers <joseph@codesourcery.com>
3117
3118 PR c/68162
3119 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
3120 following link from declarator to next declarator. Track original
3121 qualified type and pass it to c_build_qualified_type.
3122 * c-typeck.c (c_build_qualified_type): Add arguments
3123 orig_qual_type and orig_qual_indirect.
3124
ff7a55bf
TS
31252015-12-02 Thomas Schwinge <thomas@codesourcery.com>
3126
3127 * c-parser.c (c_parser_omp_clause_name)
3128 (c_parser_oacc_all_clauses): Alphabetical sorting.
3129
657e4e47
JJ
31302015-12-02 Jakub Jelinek <jakub@redhat.com>
3131
3132 PR c/68533
3133 * c-decl.c (get_parm_info): Use b->locus instead of input_location
3134 for diagnostics.
3135
37d5ad46
JB
31362015-12-01 Julian Brown <julian@codesourcery.com>
3137 Cesar Philippidis <cesar@codesourcery.com>
3138 James Norris <James_Norris@mentor.com>
3139
3140 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
3141 (c_parser_oacc_clause_use_device): New function.
3142 (c_parser_oacc_all_clauses): Add use_device support.
3143 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
3144 (c_parser_oacc_host_data): New function.
3145 (c_parser_omp_construct): Add host_data support.
3146 * c-tree.h (c_finish_oacc_host_data): Add prototype.
3147 * c-typeck.c (c_finish_oacc_host_data): New function.
3148 (c_finish_omp_clauses): Add use_device support.
3149
a4850ce9
JH
31502015-11-29 Jan Hubicka <hubicka@ucw.cz>
3151
3152 PR c/67106
3153 * c-decl.c: Set TYPE_PACKED in variants.
3154
b58d3df2
ML
31552015-11-27 Martin Liska <mliska@suse.cz>
3156
3157 PR c++/68312
3158 * c-array-notation.c (fix_builtin_array_notation_fn):
3159 Use release_vec_vec instead of vec::release.
3160 (build_array_notation_expr): Likewise.
3161 (fix_conditional_array_notations_1): Likewise.
3162 (fix_array_notation_expr): Likewise.
3163 (fix_array_notation_call_expr): Likewise.
3164
aec17bfe
JJ
31652015-11-27 Jakub Jelinek <jakub@redhat.com>
3166
3167 PR c/63326
3168 * c-parser.c (c_parser_compound_statement_nostart): If
3169 last_label is true, use pragma_stmt instead of pragma_compound
3170 as second c_parser_pragma argument.
3171 (c_parser_omp_ordered, c_parser_omp_target_update,
3172 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
3173 false as second argument to c_parser_skip_to_pragma_eol after
3174 diagnosing standalone directives used in pragma_stmt context.
3175
688c4de0
IV
31762015-11-24 Ilya Verbin <ilya.verbin@intel.com>
3177
3178 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
3179 with "if (ENABLE_OFFLOADING)".
3180
cbd03aee
DM
31812015-11-23 David Malcolm <dmalcolm@redhat.com>
3182
3183 PR objc/68438
3184 * c-parser.c (c_parser_postfix_expression): Set up source ranges
3185 for various Objective-C constructs: Class.name syntax,
3186 @selector(), @protocol(), @encode(), and [] message syntax.
3187
a87a86e1
DM
31882015-11-20 David Malcolm <dmalcolm@redhat.com>
3189
3190 PR 62314
3191 * c-typeck.c (should_suggest_deref_p): New function.
3192 (build_component_ref): Special-case POINTER_TYPE when
3193 generating a "not a structure of union" error message, and
3194 suggest a "->" rather than a ".", providing a fix-it hint.
3195
8ece8dfb
DM
31962015-11-19 David Malcolm <dmalcolm@redhat.com>
3197
3198 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
3199 candidate into a new function, find_closest_identifier.
3200
433068cc
MP
32012015-11-19 Marek Polacek <polacek@redhat.com>
3202
3203 PR c/68412
3204 * c-typeck.c (parser_build_binary_op): Properly handle
3205 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
3206
bef08b71
DM
32072015-11-17 David Malcolm <dmalcolm@redhat.com>
3208
3209 * c-parser.c (set_c_expr_source_range): Bulletproof both
3210 overloaded implementations against NULL expr->value.
3211 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
3212 values.
3213 (c_parser_unary_expression): Likewise when handling addresses of
3214 labels.
3215 (c_parser_postfix_expression): Likewise for statement expressions,
3216 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
3217 __builtin_va_arg, and for __builtin_offset_of.
3218 (c_parser_postfix_expression_after_paren_type): Initialize expr's
3219 src_range using the range of the braced initializer.
3220 (c_parser_transaction_expression): Set src_range for "ret" to a
3221 sane pair of values.
3222
fff77217
KY
32232015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
3224
3225 * c-parser.c (c_finish_omp_declare_simd): Look for
3226 "simd" attribute as well. Update error message.
3227
1d899da2
TS
32282015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3229
3230 * c-parser.c (c_parser_omp_declare_target): Adjust.
3231
e4606348
JJ
32322015-11-14 Jakub Jelinek <jakub@redhat.com>
3233
3234 * c-typeck.c (c_finish_omp_clauses): Don't mark
3235 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
3236
3e636daf
MP
32372015-11-14 Marek Polacek <polacek@redhat.com>
3238
3239 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
3240 * c-typeck.c: Likewise.
3241
ebedc9a3
DM
32422015-11-13 David Malcolm <dmalcolm@redhat.com>
3243
3244 * c-decl.c (warn_defaults_to): Pass line_table to
3245 rich_location ctor.
3246 * c-errors.c (pedwarn_c99): Likewise.
3247 (pedwarn_c90): Likewise.
3248 * c-parser.c (set_c_expr_source_range): New functions.
3249 (c_token::get_range): New method.
3250 (c_token::get_finish): New method.
3251 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
3252 based on the range from the start of the LHS to the end of the
3253 RHS.
3254 (c_parser_conditional_expression): Likewise, based on the range
3255 from the start of the cond.value to the end of exp2.value.
3256 (c_parser_binary_expression): Call set_c_expr_source_range on
3257 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
3258 (c_parser_cast_expression): Call set_c_expr_source_range on ret
3259 based on the cast_loc through to the end of the expr.
3260 (c_parser_unary_expression): Likewise, based on the
3261 op_loc through to the end of op.
3262 (c_parser_sizeof_expression) Likewise, based on the start of the
3263 sizeof token through to either the closing paren or the end of
3264 expr.
3265 (c_parser_postfix_expression): Likewise, using the token range,
3266 or from the open paren through to the close paren for
3267 parenthesized expressions.
3268 (c_parser_postfix_expression_after_primary): Likewise, for
3269 various kinds of expression.
3270 * c-tree.h (struct c_expr): Add field "src_range".
3271 (c_expr::get_start): New method.
3272 (c_expr::get_finish): New method.
3273 (set_c_expr_source_range): New decls.
3274 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
3275 on ret for prefix unary ops.
3276 (parser_build_binary_op): Likewise, running from the start of
3277 arg1.value through to the end of arg2.value.
3278
ec8b536f
MP
32792015-11-13 Marek Polacek <polacek@redhat.com>
3280
3281 PR c/68320
3282 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
3283
277fe616
DM
32842015-11-13 David Malcolm <dmalcolm@redhat.com>
3285
3286 * c-typeck.c: Include spellcheck.h.
3287 (lookup_field_fuzzy_find_candidates): New function.
3288 (lookup_field_fuzzy): New function.
3289 (build_component_ref): If the field was not found, try using
3290 lookup_field_fuzzy and potentially offer a suggestion.
3291
6e232ba4
JN
32922015-11-12 James Norris <jnorris@codesourcery.com>
3293 Joseph Myers <joseph@codesourcery.com>
3294
3295 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
3296 (c_parser_omp_clause_name): Handle 'device_resident' clause.
3297 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3298 and PRAGMA_OMP_CLAUSE_LINK.
3299 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3300 and PRAGMA_OACC_CLAUSE_LINK.
3301 (OACC_DECLARE_CLAUSE_MASK): New definition.
3302 (c_parser_oacc_declare): New function.
3303
9be4f715
MP
33042015-11-12 Marek Polacek <polacek@redhat.com>
3305
3306 PR c/67784
3307 * c-parser.c (c_parser_for_statement): Reclassify the token in
3308 a correct scope.
3309
e78bede6
MP
33102015-11-11 Marek Polacek <polacek@redhat.com>
3311
3312 PR c/68107
3313 PR c++/68266
3314 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
3315 checking the size of an array.
3316
69f293c9
AM
33172015-11-11 Andrew MacLeod <amacleod@redhat.com>
3318
3319 * c-array-notation.c: Remove unused header files.
3320 * c-aux-info.c: Likewise.
3321 * c-convert.c: Likewise.
3322 * c-decl.c: Likewise.
3323 * c-errors.c: Likewise.
3324 * c-lang.c: Likewise.
3325 * c-objc-common.c: Likewise.
3326 * c-parser.c: Likewise.
3327 * c-typeck.c: Likewise.
3328 * gccspec.c: Likewise.
3329
3a40d81d
NS
33302015-11-09 Thomas Schwinge <thomas@codesourcery.com>
3331 Cesar Philippidis <cesar@codesourcery.com>
3332 James Norris <jnorris@codesourcery.com>
3333 Julian Brown <julian@codesourcery.com>
3334 Nathan Sidwell <nathan@codesourcery.com>
3335
3336 c/
3337 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
3338 routine arg.
3339 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
3340 (c_parser_pragma): Parse 'acc routine'.
3341 (OACC_ROUTINE_CLAUSE_MARK): Define.
3342 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
3343
fc402eec
AA
33442015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3345
3346 PR debug/67192
3347 * c-typeck.c (c_finish_loop): For unconditional loops, set the
3348 location of the backward-goto to the start of the loop body.
3349
f6b0b3db
AA
33502015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3351
3352 PR debug/67192
3353 * c-parser.c (c_parser_while_statement): Finish the loop before
3354 parsing ahead for misleading indentation.
3355 (c_parser_for_statement): Likewise.
3356
ee45a32d
EB
33572015-11-08 Eric Botcazou <ebotcazou@adacore.com>
3358
3359 * c-decl.c (finish_struct): If the structure has reverse storage
3360 order, rewrite the type of array fields with scalar component. Call
3361 maybe_apply_pragma_scalar_storage_order on entry.
3362 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
3363 errors on bit-fields and reverse SSO here and not...
3364 (c_mark_addressable): ...here.
3365 (output_init_element): Adjust call to initializer_constant_valid_p.
3366 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
3367
8a645150
DM
33682015-11-06 David Malcolm <dmalcolm@redhat.com>
3369
3370 * c-decl.c (warn_defaults_to): Update for change in signature
3371 of diagnostic_set_info.
3372 * c-errors.c (pedwarn_c99): Likewise.
3373 (pedwarn_c90): Likewise.
3374 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
3375 for textinfo::set_location.
3376
7a5e4956
CP
33772015-11-05 Cesar Philippidis <cesar@codesourcery.com>
3378 Thomas Schwinge <thomas@codesourcery.com>
3379 James Norris <jnorris@codesourcery.com>
3380
3381 * c-parser.c (c_parser_omp_clause_name): Add support for
3382 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
3383 (c_parser_omp_clause_default): Add is_oacc argument. Handle
3384 default(none) in OpenACC.
3385 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
3386 arguments.
3387 (c_parser_oacc_clause_tile): New function.
3388 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
3389 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
3390 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
3391 TILE}.
3392 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
3393 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
3394 FIRSTPRIVATE}.
3395 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
3396 (c_parser_oacc_update): Update the error message for missing clauses.
3397 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
3398 and OMP_CLAUSE_INDEPENDENT.
3399
bfcfbfa0
MP
34002015-11-05 Marek Polacek <polacek@redhat.com>
3401
3402 PR c/68090
3403 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
3404 deal with pre-evaluation on invalid types.
3405
e01d41e5
JJ
34062015-11-05 Jakub Jelinek <jakub@redhat.com>
3407 Ilya Verbin <ilya.verbin@intel.com>
3408
3409 * c-parser.c: Include context.h and gimple-expr.h.
3410 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
3411 monotonic together with nonmonotonic.
3412 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
3413 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
3414 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
3415 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
3416 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
3417 expressions on combined target teams before the target.
3418 (c_parser_omp_declare_target): If decl has "omp declare target" or
3419 "omp declare target link" attribute, and cgraph or varpool node already
3420 exists, then set corresponding flags. Call c_finish_omp_clauses
3421 in the parenthesized extended-list syntax case.
3422 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
3423 declare target.
3424 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
3425 on OMP_CLAUSE_REDUCTION array sections.
3426 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
3427 into the constant offset, or for variable low-bound using
3428 POINTER_PLUS_EXPR. For structure element based array sections use
3429 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
3430 (c_finish_omp_clauses): Drop generic_field_head, structure
3431 elements are now always mapped even as array section bases,
3432 diagnose same var in data sharing and mapping clauses. Diagnose if
3433 linear step on declare simd is neither a constant nor a uniform
3434 parameter. Look through POINTER_PLUS_EXPR for array section
3435 reductions. Diagnose the same var or function appearing multiple
3436 times on the same directive. Fix up wording for the to clause if t
3437 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
3438 modifier on kinds other than dynamic or guided or nonmonotonic
3439 modifier together with ordered clause.
3440
4bf9e5a8
TS
34412015-11-03 Thomas Schwinge <thomas@codesourcery.com>
3442 Chung-Lin Tang <cltang@codesourcery.com>
3443
3444 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
3445
2adfab87
AM
34462015-10-29 Andrew MacLeod <amacleod@redhat.com>
3447
3448 * c-array-notation.c: Reorder #include's and remove duplicates.
3449 * c-aux-info.c: Likewise.
3450 * c-convert.c: Likewise.
3451 * c-decl.c: Likewise.
3452 * c-errors.c: Likewise.
3453 * c-lang.c: Likewise.
3454 * c-objc-common.c: Likewise.
3455 * c-parser.c: Likewise.
3456 * c-typeck.c: Likewise.
3457
e922069e
JW
34582015-10-26 Jim Wilson <jim.wilson@linaro.org>
3459
3460 PR debug/66068
3461 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
3462 after calling build_qualified_type.
3463
765dd391
CP
34642015-10-27 Cesar Philippidis <cesar@codesourcery.com>
3465 Thomas Schwinge <thomas@codesourcery.com>
3466 James Norris <jnorris@codesourcery.com>
3467 Joseph Myers <joseph@codesourcery.com>
3468 Julian Brown <julian@codesourcery.com>
3469 Bernd Schmidt <bschmidt@redhat.com>
3470
3471 * c-parser.c (c_parser_oacc_shape_clause): New.
3472 (c_parser_oacc_simple_clause): New.
3473 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
3474 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
3475
88bae6f4
TS
34762015-10-27 Thomas Schwinge <thomas@codesourcery.com>
3477 James Norris <jnorris@codesourcery.com>
3478 Cesar Philippidis <cesar@codesourcery.com>
3479
3480 PR c/64765
3481 PR c/64880
3482 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
3483 parameters, and handle these. Adjust all users.
3484 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
3485 into...
3486 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
3487 all users.
3488 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
3489 declare functions.
3490 (c_finish_omp_construct): Declare function.
3491 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
3492 Merge functions into...
3493 (c_finish_omp_construct): ... this new function.
3494
a8fc2579
RB
34952015-10-22 Richard Biener <rguenther@suse.de>
3496
3497 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
3498 before folding a MINUS_EXPR.
3499
e9122ef6
MP
35002015-10-21 Marek Polacek <polacek@redhat.com>
3501
3502 PR c/68024
3503 * c-decl.c (start_function): Warn about vararg functions without
3504 a prototype.
3505
9f47c7e5
IE
35062015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
3507
3508 * c-typeck.c (build_conditional_expr): Use boolean vector
3509 type for vector comparison.
3510 (build_vec_cmp): New.
3511 (build_binary_op): Use build_vec_cmp for comparison.
3512
fa60eeb9
MP
35132015-10-20 Marek Polacek <polacek@redhat.com>
3514
3515 * c-parser.c (is_cilkplus_vector_p): Don't define here.
3516
2c7020eb
MP
35172015-10-20 Marek Polacek <polacek@redhat.com>
3518
3519 PR c/67964
3520 * c-parser.c (c_parser_attributes): Break out of the loop if the
3521 token after an attribute isn't a comma.
3522
d9a6bd32
JJ
35232015-10-13 Jakub Jelinek <jakub@redhat.com>
3524 Aldy Hernandez <aldyh@redhat.com>
3525
3526 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
3527 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
3528 (c_parser_omp_variable_list): Handle structure elements for
3529 map, to and from clauses. Handle array sections in reduction
3530 clause. Formatting fixes.
3531 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
3532 if clause modifiers.
3533 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3534 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3535 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
3536 c_parser_omp_clause_is_device_ptr): New functions.
3537 (c_parser_omp_clause_ordered): Parse optional parameter.
3538 (c_parser_omp_clause_reduction): Handle array reductions.
3539 (c_parser_omp_clause_schedule): Parse optional simd modifier.
3540 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
3541 functions.
3542 (c_parser_omp_clause_linear): Parse linear clause modifiers.
3543 (c_parser_omp_clause_depend_sink): New function.
3544 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
3545 (c_parser_omp_clause_map): Parse release/delete map kinds and
3546 optional always modifier.
3547 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
3548 and c_finish_omp_clauses callers.
3549 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
3550 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
3551 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
3552 (OMP_CRITICAL_CLAUSE_MASK): Define.
3553 (c_parser_omp_critical): Parse critical clauses.
3554 (c_parser_omp_for_loop): Handle doacross loops, adjust
3555 c_finish_omp_for and c_finish_omp_clauses callers.
3556 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
3557 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
3558 (OMP_FOR_CLAUSE_MASK): Add linear clause.
3559 (c_parser_omp_for): Disallow ordered clause when combined with
3560 distribute. Disallow linear clause when combined with distribute
3561 and not combined with simd.
3562 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
3563 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
3564 parse clauses and if depend clause is found, don't parse a body.
3565 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
3566 Allow target parallel without for after it.
3567 (OMP_TASK_CLAUSE_MASK): Add priority clause.
3568 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
3569 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
3570 invalid kinds.
3571 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
3572 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
3573 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
3574 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
3575 functions.
3576 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
3577 defaultmap and is_device_ptr clauses.
3578 (c_parser_omp_target): Parse target parallel and target simd. Set
3579 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
3580 and target exit data. Diagnose invalid map kinds.
3581 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
3582 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
3583 construct.
3584 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
3585 &omp_priv.
3586 (OMP_TASKLOOP_CLAUSE_MASK): Define.
3587 (c_parser_omp_taskloop): New function.
3588 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
3589 handle PRAGMA_OMP_TASKLOOP.
3590 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
3591 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
3592 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
3593 Add IS_OMP argument, handle structure element bases, diagnose
3594 bitfields, pass IS_OMP recursively, diagnose known zero length
3595 array sections in depend clauses, handle array sections in reduction
3596 clause, diagnose negative length even for pointers.
3597 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
3598 types, pass IS_OMP down to handle_omp_array_sections_1, handle
3599 array sections in reduction clause, set
3600 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
3601 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
3602 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
3603 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
3604
21ba0cea
MP
36052015-10-06 Marek Polacek <polacek@redhat.com>
3606
3607 * c-parser.c (c_parser_statement_after_labels): Use
3608 protected_set_expr_location.
3609 (c_parser_omp_clause_num_gangs): Likewise.
3610 (c_parser_omp_clause_num_threads): Likewise.
3611 (c_parser_omp_clause_num_workers): Likewise.
3612 (c_parser_omp_clause_vector_length): Likewise.
3613 (c_parser_omp_clause_num_teams): Likewise.
3614 (c_parser_omp_clause_thread_limit): Likewise.
3615 * c-typeck.c (build_c_cast): Likewise.
3616 (c_cast_expr): Likewise.
3617
624d31fe
RS
36182015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3619
3620 * c-typeck.c (c_tree_equal): Use real_equal instead of
3621 REAL_VALUES_EQUAL.
3622
b8fd7909
JM
36232015-10-04 Jason Merrill <jason@redhat.com>
3624
3625 * c-parser.c (c_lex_one_token): Handle @synchronized.
3626 * c-decl.c (match_builtin_function_types): A declaration of a built-in
3627 can change whether the function is transaction_safe.
3628
1c7485af
MP
36292015-10-02 Marek Polacek <polacek@redhat.com>
3630
3631 PR c/67730
3632 * c-typeck.c (convert_for_assignment): Use the expansion point
3633 location throughout.
3634
3e3b8d63
MP
36352015-10-02 Marek Polacek <polacek@redhat.com>
3636
3637 PR c/64249
3638 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
3639 and pass it down to c_parser_if_statement.
3640 (c_parser_else_body): Add CHAIN parameter and pass it down to
3641 c_parser_statement_after_labels.
3642 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
3643 duplicated if-else-if conditions.
3644
aabef2de
MP
36452015-10-01 Marek Polacek <polacek@redhat.com>
3646
3647 * c-typeck.c (convert_for_assignment): Improve commentary.
3648
de8ddd5f
MP
36492015-09-30 Marek Polacek <polacek@redhat.com>
3650
3651 PR c/67730
3652 * c-typeck.c (c_finish_return): Use the expansion point location for
3653 certain "return with value" warnings.
3654
c4914de6
MLI
36552015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3656
3657 * c-parser.c (pragma_lex): Add loc argument.
3658
0e36f5c7
MP
36592015-09-15 Marek Polacek <polacek@redhat.com>
3660
3661 PR c/67580
3662 * c-decl.c (tag_exists_p): New function.
3663 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3664 struct/union/enum keywords are missing.
3665 * c-tree.h (tag_exists_p): Declare.
3666
2f3bb934
MP
36672015-09-15 Marek Polacek <polacek@redhat.com>
3668
3669 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3670 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3671 Return NULL_TREE instead of 0.
3672 (lookup_name): Return NULL_TREE instead of 0.
3673 (lookup_name_in_scope): Likewise.
3674 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3675 (parser_xref_tag): Use false instead of 0.
3676 (start_struct): Use true instead of 1.
3677 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3678
aa256c4a
MP
36792015-09-14 Marek Polacek <polacek@redhat.com>
3680
3681 * c-typeck.c (set_nonincremental_init_from_string): Use
3682 HOST_WIDE_INT_M1U when shifting a negative value.
3683
dbb68221
MW
36842015-09-09 Mark Wielaard <mjw@redhat.com>
3685
3686 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
3687 parm against NULL.
3688
a8a098ac
JJ
36892015-09-10 Jakub Jelinek <jakub@redhat.com>
3690
3691 PR c/67502
3692 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
3693 into OMP_FOR_PRE_BODY rather than before the loop.
3694
f4b189d5
JJ
36952015-09-09 Jakub Jelinek <jakub@redhat.com>
3696
0bb99c11
JJ
3697 PR c/67501
3698 * c-parser.c (c_parser_oacc_all_clauses,
3699 c_parser_omp_all_clauses): Remove invalid clause from
3700 list of clauses even if parser->error is set.
3701
fce5e5e3
JJ
3702 PR c/67500
3703 * c-parser.c (c_parser_omp_clause_aligned,
3704 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3705 test for errors.
3706 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3707 error_mark_node.
3708
f4b189d5
JJ
3709 PR c/67495
3710 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3711 instead of c_parser_unary_expression. If the result is !lvalue_p,
3712 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3713
b2aaf235
MP
37142015-09-04 Marek Polacek <polacek@redhat.com>
3715
3716 PR sanitizer/67279
3717 * c-typeck.c (build_binary_op): Don't instrument static initializers.
3718
1807ffc1
MS
37192015-09-03 Martin Sebor <msebor@redhat.com>
3720
3721 PR c/66516
8b652e65
JJ
3722 * c-typeck.c (convert_arguments, parser_build_unary_op,
3723 build_conditional_expr, c_cast_expr, convert_for_assignment,
3724 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
3725 reject_gcc_builtin.
3726 (c_decl_implicit): Define.
3727
d04ff417
MP
37282015-09-02 Marek Polacek <polacek@redhat.com>
3729
3730 PR c/67432
3731 * c-parser.c (c_parser_enum_specifier): Give a better error for
3732 an empty enum.
3733
a79683d5
TS
37342015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3735
3736 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3737
191a6b94
MP
37382015-08-12 Marek Polacek <polacek@redhat.com>
3739
3740 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
3741 LOC to it.
3742
420a9d9b
MP
37432015-08-03 Marek Polacek <polacek@redhat.com>
3744
3745 PR c/67088
3746 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
3747 Use it.
3748 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
3749
992118a1
PP
37502015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3751
3752 * c-parser.c (c_parser_if_body): Take token_indent_info
3753 argument. Call warn_for_misleading_indentation even when the
3754 body is a semicolon. Extract token_indent_infos corresponding
3755 to the guard, body and next tokens. Adjust call to
3756 warn_for_misleading_indentation accordingly.
3757 (c_parser_else_body): Likewise.
3758 (c_parser_if_statement): Likewise.
3759 (c_parser_while_statement): Likewise.
3760 (c_parser_for_statement): Likewise.
3761
46308474
LFSM
37622015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
3763 Manuel López-Ibáñez <manu@gcc.gnu.org>
3764
3765 * c-decl.c (get_parm_info): Remove static var. Update warning
3766 message.
3767
05b28fd6
MP
37682015-07-27 Marek Polacek <polacek@redhat.com>
3769
3770 PR c++/66555
3771 PR c/54979
3772 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3773
451b5e48
MP
37742015-07-20 Marek Polacek <polacek@redhat.com>
3775
3776 PR c++/55095
3777 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3778 (build_binary_op): Warn about left shift overflows.
3779
1916bcb5
AM
37802015-07-09 Andrew MacLeod <amacleod@redhat.com>
3781
3782 * c-array-notation.c: Adjust includes for flags.h changes.
3783 * c-objc-common.c: Likewise.
3784
c7131fb2
AM
37852015-07-07 Andrew MacLeod <amacleod@redhat.com>
3786
3787 * c-array-notation.c: Adjust includes.
3788 * c-aux-info.c: Likewise.
3789 * c-convert.c: Likewise.
3790 * c-decl.c: Likewise.
3791 * c-errors.c: Likewise.
3792 * c-lang.c: Likewise.
3793 * c-objc-common.c: Likewise.
3794 * c-parser.c: Likewise.
3795 * c-typeck.c: Likewise.
3796
da2e71c9
MLI
37972015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3798
3799 PR fortran/66605
3800 * c-decl.c (finish_function): Call do_warn_unused_parameter.
3801
b155cfd9
MP
38022015-06-29 Marek Polacek <polacek@redhat.com>
3803
3804 PR c/66322
3805 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3806 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
3807 about -Wswitch-bool here.
3808 (do_case): Update c_add_case_label call.
3809 (c_finish_case): Update c_do_switch_warnings call.
3810
31521951
MP
38112015-06-27 Marek Polacek <polacek@redhat.com>
3812
3813 * c-typeck.c: Use VECTOR_TYPE_P throughout.
3814
22d03525
MP
38152015-06-26 Marek Polacek <polacek@redhat.com>
3816
3817 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3818 INDIRECT_REF_P.
3819 * c-typeck.c (array_to_pointer_conversion): Likewise.
3820 (build_unary_op): Likewise.
3821 (c_finish_return): Likewise.
3822
f0889939
AM
38232015-06-25 Andrew MacLeod <amacleod@redhat.com>
3824
3825 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3826 * c-parser.c: Likewise.
3827
8d67ee55
RS
38282015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3829
3830 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3831 instead of pointer_hash.
3832 (detect_field_duplicates): Likewise.
3833
0ae9bd27
MP
38342015-06-25 Marek Polacek <polacek@redhat.com>
3835
3836 * c-array-notation.c: Use VAR_P throughout.
3837 * c-decl.c: Likewise.
3838 * c-objc-common.c: Likewise.
3839 * c-parser.c: Likewise.
3840 * c-typeck.c: Likewise.
3841
62f9079a
MP
38422015-06-25 Marek Polacek <polacek@redhat.com>
3843
3844 * c-decl.c: Use is_global_var throughout.
3845 * c-parser.c: Likewise.
3846 * c-typeck.c: Likewise.
3847
abb226c9
AM
38482015-06-17 Andrew MacLeod <amacleod@redhat.com>
3849
3850 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3851 * c-aux-info.c: Likewise.
3852 * c-convert.c: Likewise.
3853 * c-decl.c: Likewise.
3854 * c-errors.c: Likewise.
3855 * c-lang.c: Likewise.
3856 * c-objc-common.c: Likewise.
3857 * c-parser.c: Likewise.
3858 * c-typeck.c: Likewise.
3859
8cbababc
JH
38602015-06-11 Jan Hubicka <hubicka@ucw.cz>
3861
3862 PR middle-end/66325
3863 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3864 variants.
3865
a0349665
PMR
38662015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
3867
3868 * c-decl.c (pop_scope): Register the main translation unit
3869 through the new debug hook.
3870
13fdf2e2
AM
38712015-06-08 Andrew MacLeod <amacleod@redhat.com>
3872
3873 * c-array-notation.c : Adjust include files.
3874 * c-aux-info.c : Likewise.
3875 * c-convert.c : Likewise.
3876 * c-decl.c : Likewise.
3877 * c-errors.c : Likewise.
3878 * c-lang.c : Likewise.
3879 * c-lang.h : Likewise.
3880 * c-objc-common.c : Likewise.
3881 * c-parser.c : Likewise.
3882 * c-typeck.c : Likewise.
3883
d7438551
AH
38842015-06-05 Aldy Hernandez <aldyh@redhat.com>
3885
3886 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3887 immediately clobber it.
3888 (c_write_global_declarations_1): Remove call to
3889 check_global_declaration_1.
3890 (c_write_global_declarations_2): Remove.
3891 (c_write_final_cleanups): Rename from c_write_global_declarations.
3892 Remove call to finalize_compilation_unit.
3893 Remove calls to debugging hooks.
3894 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3895 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3896 * c-tree.h: Remove c_write_global_declarations.
3897
ecb9f223
AM
38982015-06-04 Andrew MacLeod <amacleod@redhat.com>
3899
3900 * c-array-notation.c: Adjust includes for restructured coretypes.h.
3901 * c-aux-info.c: Likewise.
3902 * c-convert.c: Likewise.
3903 * c-decl.c: Likewise.
3904 * c-errors.c: Likewise.
3905 * c-lang.c: Likewise.
3906 * c-objc-common.c: Likewise.
3907 * c-parser.c: Likewise.
3908 * c-typeck.c: Likewise.
3909
9482b620
MP
39102015-06-04 Marek Polacek <polacek@redhat.com>
3911
3912 PR c/66341
3913 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3914 it is a lvalue.
3915
bc51ace3
PK
39162015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3917
3918 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3919 Warn for empty struct.
3920 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3921
ea5b45b6
AT
39222015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
3923
3924 * c-decl.c (start_function): Call plugin before parsing.
3925 (finish_function): Call plugin after parsing.
3926
c2d47482
PK
39272015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3928
3929 PR c/49551
3930 * c-decl.c (merge_decls): Merge DECL_COMMON.
3931
a95492ab
JW
39322015-05-22 Jim Wilson <jim.wilson@linaro.org>
3933
3934 * Make-lang.in (check_gcc_pallelize): Define.
3935
fd5c817a
MP
39362015-05-22 Marek Polacek <polacek@redhat.com>
3937
3938 PR c/47043
3939 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
3940 attributes.
3941
c7b70a3c
MP
39422015-05-21 Marek Polacek <polacek@redhat.com>
3943
3944 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3945 DECL_BUILT_IN.
3946
21b634ae
MP
39472015-05-20 Marek Polacek <polacek@redhat.com>
3948
3949 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3950 * c-typeck.c: Likewise.
3951
296a8c2f
MP
39522015-05-19 Marek Polacek <polacek@redhat.com>
3953
3954 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3955
41b37d5e
JJ
39562015-05-19 Jakub Jelinek <jakub@redhat.com>
3957
3958 PR middle-end/66199
3959 * c-parser.c (c_parser_omp_for_loop): Don't add
3960 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3961 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3962 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3963 constructs.
3964
fab27f52
MM
39652015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
3966
3967 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 3968 swaps.
fab27f52 3969
40de31cf
MLI
39702015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3971
3972 PR fortran/44054
3973 * c-objc-common.c (c_tree_printer): Replace locus pointer with
3974 accessor function.
3975
3aa3c9fc
MP
39762015-05-14 Marek Polacek <polacek@redhat.com>
3977
3978 PR c/66066
3979 PR c/66127
3980 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
3981 rather than with 0.
3982
c3388e62
DM
39832015-05-12 David Malcolm <dmalcolm@redhat.com>
3984
3985 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
3986 to add a call to warn_for_misleading_indentation.
3987 (c_parser_else_body): Likewise, adding param "else_loc".
3988 (c_parser_if_statement): Check for misleading indentation.
3989 (c_parser_while_statement): Likewise.
3990 (c_parser_for_statement): Likewise.
3991
755e528f
MP
39922015-05-08 Marek Polacek <polacek@redhat.com>
3993
3994 PR c/64918
3995 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
3996 (output_init_element): Likewise.
3997
0173bd2a
MP
39982015-05-07 Marek Polacek <polacek@redhat.com>
3999
4000 PR c/65179
4001 * c-typeck.c (build_binary_op): Warn when left shifting a negative
4002 value.
4003
9babc352
MP
40042015-04-30 Marek Polacek <polacek@redhat.com>
4005
4006 * c-typeck.c (set_init_label): Call error_at instead of error and
4007 pass LOC to it.
4008
ac9f18db
MP
4009 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
4010 the type of a decl.
4011
ec3fba51
MP
4012 * c-typeck.c (c_build_va_arg): Clarify the error message.
4013
b811915d
TS
40142015-04-29 Thomas Schwinge <thomas@codesourcery.com>
4015
4016 * c-parser.c (c_parser_oacc_enter_exit_data): Use
4017 OMP_STANDALONE_CLAUSES.
4018
f3075008
MP
40192015-04-28 Marek Polacek <polacek@redhat.com>
4020
4021 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
4022
4e81b788
MP
40232015-04-28 Marek Polacek <polacek@redhat.com>
4024
4025 PR c/65901
4026 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
4027
6c1db78e
MP
40282015-04-25 Marek Polacek <polacek@redhat.com>
4029
4030 PR c/52085
4031 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
4032 attribute.
4033
5c4abbb8
MP
40342015-04-23 Marek Polacek <polacek@redhat.com>
4035
4036 PR c/65345
4037 * c-decl.c (set_labels_context_r): New function.
4038 (store_parm_decls): Call it via walk_tree_without_duplicates.
4039 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
4040 instead of create_tmp_var. Build TARGET_EXPR instead of
4041 COMPOUND_EXPR.
4042 (build_atomic_assign): Use create_tmp_var_raw instead of
4043 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
4044
06aca1d5
IV
40452015-04-20 Ilya Verbin <ilya.verbin@intel.com>
4046
4047 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
4048 (c_parser_omp_target_update): Add missed %> to error_at ().
4049
8fba1830
BRF
40502015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
4051
4052 PR target/55143
4053 * c-decl.c (c_default_pointer_mode): Remove definition.
4054 * c-tree.h (c_default_pointer_mode): Remove declaration.
4055
62021f64
TB
40562015-03-27 Tobias Burnus <burnus@net-b.de>
4057
4058 PR c/65586
4059 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
4060 error out.
4061 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
4062 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
4063 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
4064
9b65e171
JJ
40652015-03-19 Jakub Jelinek <jakub@redhat.com>
4066
4067 * c-decl.c (c_decl_attributes): Also add "omp declare target"
4068 attribute for DECL_EXTERNAL VAR_DECLs.
4069
17958621
JJ
40702015-03-11 Jakub Jelinek <jakub@redhat.com>
4071
4072 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
4073 argument.
4074
7ccb1a11
JJ
40752015-03-10 Jakub Jelinek <jakub@redhat.com>
4076
4077 PR c/65120
4078 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
4079 before preparing arguments to warn_logical_not_parentheses.
4080
01177669
JJ
40812015-03-09 Jakub Jelinek <jakub@redhat.com>
4082
4083 PR c/65120
4084 * c-typeck.c (parser_build_binary_op): Don't warn for
4085 !!x == y or !b == y where b is _Bool.
4086
802ac282
MP
40872015-03-09 Marek Polacek <polacek@redhat.com>
4088
4089 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
4090 * c-decl.c (grokdeclarator): Likewise.
4091 * c-typeck.c (build_binary_op): Likewise.
4092
e5165b60
MP
40932015-02-27 Marek Polacek <polacek@redhat.com>
4094
4095 PR c/65228
4096 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
4097
065d214c
MP
40982015-02-14 Marek Polacek <polacek@redhat.com>
4099
4100 PR c/64768
4101 * c-decl.c (grokdeclarator): Set the range of a flexible array member
4102 declared through a typedef name.
4103
e5d9235b
MP
41042015-02-13 Marek Polacek <polacek@redhat.com>
4105
4106 PR c/65050
4107 * c-decl.c (grokdeclarator): Print also the type when giving
4108 the error message about array's incomplete element type.
4109
fa01ffcc
JJ
41102015-02-11 Jakub Jelinek <jakub@redhat.com>
4111
4112 PR c/64824
4113 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
4114 check in the POP macro.
4115
c3e38a03
MP
41162015-02-09 Marek Polacek <polacek@redhat.com>
4117
4118 PR c/64856
4119 * c-typeck.c (process_init_element): Don't always wrap
4120 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
4121 initializing a range of elements.
4122
4886ec8e
JJ
41232015-02-04 Jakub Jelinek <jakub@redhat.com>
4124
4125 PR c/64824
4126 PR c/64868
4127 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
4128
c3e38a03 41292015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
4130
4131 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
4132 processing enum declaration.
4133
7b33f0c8
MP
41342015-01-29 Marek Polacek <polacek@redhat.com>
4135
4136 PR c/64709
4137 * c-typeck.c (pop_init_level): If constructor_elements has
4138 exactly one element with integer_zerop value, set constructor_zeroinit
4139 to 1. Remove braces around warning_init call.
4140
dea63e49
JJ
41412015-01-27 Jakub Jelinek <jakub@redhat.com>
4142
4143 PR c/64766
4144 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
4145 of FUNCTION_DECLs with error_mark_node.
4146
d38f7dce
JJ
41472015-01-26 Jakub Jelinek <jakub@redhat.com>
4148
4149 PR c/64778
4150 * c-typeck.c (convert_arguments): Return -1 if there are
4151 error_args, even if we've diagnosed too many arguments.
4152
cbf5d0e7
RB
41532015-01-21 Richard Biener <rguenther@suse.de>
4154
4155 PR middle-end/64313
4156 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
4157 for builtins the user declared correctly.
4158
41dbbb37
TS
41592015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4160 Bernd Schmidt <bernds@codesourcery.com>
4161 Cesar Philippidis <cesar@codesourcery.com>
4162 James Norris <jnorris@codesourcery.com>
4163 Jakub Jelinek <jakub@redhat.com>
4164 Ilmir Usmanov <i.usmanov@samsung.com>
4165
4166 * c-parser.c: Include "gomp-constants.h".
4167 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
4168 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
4169 Use OMP_CLAUSE_SET_MAP_KIND.
4170 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
4171 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
4172 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
4173 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
4174 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
4175 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
4176 "copyout", "create", "delete", "deviceptr", "gang", "host",
4177 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
4178 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
4179 "present_or_create", "pcreate", "seq", "self", "vector",
4180 "vector_length", "wait", "worker".
4181 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
4182 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
4183 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
4184 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
4185 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
4186 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
4187 (c_parser_oacc_data_clause_deviceptr)
4188 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
4189 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
4190 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
4191 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
4192 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
4193 (c_parser_oacc_parallel, c_parser_oacc_update)
4194 (c_parser_oacc_wait): New functions.
4195 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
4196 (c_finish_oacc_data): New prototypes.
4197 * c-typeck.c: Include "gomp-constants.h".
4198 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
4199 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
4200 OMP_CLAUSE_SET_MAP_KIND.
4201 (c_finish_oacc_parallel, c_finish_oacc_kernels)
4202 (c_finish_oacc_data): New functions.
4203 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
4204 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
4205 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
4206 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
4207 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
4208 GOMP_MAP_FORCE_DEVICEPTR.
4209
adfac8df
JJ
42102015-01-09 Michael Collison <michael.collison@linaro.org>
4211
4212 * c-array-notation.c: Include hash-set.h, machmode.h,
4213 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4214 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
4215 * c-aux-info.c: Ditto.
4216 * c-convert.c: Ditto.
4217 * c-decl.c: Ditto.
4218 * c-errors.c: Ditto.
4219 * c-lang.c: Dittoxs.
4220 * c-objc-common.c: Ditto.
4221 * c-parser.c: Ditto.
4222 * c-typeck.c: Include hash-set.h, machmode.h,
4223 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4224 fold-const.h, wide-int.h, inchash.h, real.h and
4225 fixed-value.h due to flattening of tree.h.
4226
2cc901dc
MP
42272015-01-07 Marek Polacek <polacek@redhat.com>
4228
4229 PR c/64417
4230 * c-typeck.c (process_init_element): Disallow initialization of
4231 a flexible array member with a string constant if the structure
4232 is in an array.
4233
5624e564
JJ
42342015-01-05 Jakub Jelinek <jakub@redhat.com>
4235
e5341100
JJ
4236 PR sanitizer/64344
4237 * c-typeck.c (convert_for_assignment, c_finish_return): For
4238 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
4239 types also set in_late_binary_op around convert call.
4240 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
4241 to integral type casts, if not in_late_binary_op, pass c_fully_fold
4242 result on expr as last argument to ubsan_instrument_float_cast,
4243 if in_late_binary_op, don't use c_save_expr but save_expr.
4244
5624e564
JJ
4245 Update copyright years.
4246
5bd012f8
MP
42472015-01-05 Marek Polacek <polacek@redhat.com>
4248
4249 PR c/64423
4250 * c-typeck.c (build_array_ref): Pass loc down to
4251 warn_array_subscript_with_type_char.
4252
3f8257db 42532014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
4254
4255 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 4256 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 4257 element type.
8e745a17 4258 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 4259 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 4260 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 4261 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 4262 to PEDWARN_FOR_QUALIFIERS.
768952be 4263
8f94a8c4
JJ
42642014-12-17 Jakub Jelinek <jakub@redhat.com>
4265
4266 PR sanitizer/64289
4267 * c-convert.c: Include ubsan.h.
4268 (convert): For real -> integral casts and
4269 -fsanitize=float-cast-overflow don't call convert_to_integer, but
4270 instead instrument the float cast directly.
4271
b731b390
JJ
42722014-11-29 Jakub Jelinek <jakub@redhat.com>
4273
4274 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
4275 c_finish_stmt_expr): Remove NULL last argument from
4276 create_tmp_var_raw and create_tmp_var calls.
4277 * c-array-notation.c (fix_builtin_array_notation_fn,
4278 build_array_notation_expr, fix_conditional_array_notations_1,
4279 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
4280
541e35a6
MP
42812014-11-28 Marek Polacek <polacek@redhat.com>
4282
4283 PR c/63862
4284 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
4285 convert the right operand to integer type.
4286
b286be94
MP
42872014-11-25 Marek Polacek <polacek@redhat.com>
4288
4289 PR c/63877
4290 * c-decl.c (start_function): Disable -Wmissing-declarations warning
4291 for inline functions.
4292
aa7da51a
JJ
42932014-11-21 Jakub Jelinek <jakub@redhat.com>
4294
4295 PR target/63764
4296 * c-typeck.c (build_array_ref): Adjust
4297 convert_vector_to_pointer_for_subscript caller. If it returns true,
4298 call non_lvalue_loc on the result.
4299
d876207f
RB
43002014-11-11 Richard Biener <rguenther@suse.de>
4301
4302 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
4303 to true.
4304
e5e44252
AK
43052014-11-10 Andi Kleen <ak@linux.intel.com>
4306
4307 PR c/60804
4308 * c-parser.c (c_parser_statement_after_labels): Call
4309 check_no_cilk.
4310 (c_parser_if_statement): Dito.
4311 (c_parser_switch_statement): Dito.
4312 (c_parser_while_statement): Dito.
4313 (c_parser_do_statement): Dito.
4314 (c_parser_for_statement): Dito.
4315 * c-typeck.c (c_finish_loop): Dito.
4316
13c21655
PC
43172014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
4318
4319 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
4320 OPT_Wshift_count_overflow in the warnings.
4321
2d51fcef
MP
43222014-10-30 Marek Polacek <polacek@redhat.com>
4323
4324 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
4325 print the stripped version as well, if they're not the same.
4326
ef4bddc2
RS
43272014-10-29 Richard Sandiford <richard.sandiford@arm.com>
4328
4329 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
4330 machine_mode.
4331
c582198b
AM
43322014-10-28 Andrew MacLeod <amacleod@redhat.com>
4333
4334 * c-decl.c: Adjust include files.
4335 * c-parser.c: Ditto.
4336
ddc8de03
PM
43372014-10-27 Phil Muldoon <pmuldoon@redhat.com>
4338 Tom Tromey <tromey@redhat.com>
4339
4340 * c-tree.h (enum c_oracle_request): New.
4341 (c_binding_oracle_function): New typedef.
4342 (c_binding_oracle, c_pushtag, c_bind): Declare.
4343 * c-decl.c (c_binding_oracle): New global.
4344 (I_SYMBOL_CHECKED): New macro.
4345 (i_symbol_binding): New function.
4346 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
4347 (I_TAG_CHECKED): New macro.
4348 (i_tag_binding): New function.
4349 (I_TAG_BINDING, I_TAG_DECL): Redefine.
4350 (I_LABEL_CHECKED): New macro.
4351 (i_label_binding): New function.
4352 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
4353 (c_print_identifier): Save and restore c_binding_oracle.
4354 (c_pushtag, c_bind): New functions.
4355
60393bbc
AM
43562014-10-27 Andrew MacLeod <amacleod@redhat.com>
4357
4358 * c-typeck.c: Adjust include files.
4359
d723bb7c
MLI
43602014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
4361
4362 PR c++/53061
4363 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
4364 initialization here...
4365 (c_initialize_diagnostics): ... but here. Set defaults after
4366 building pretty-printer.
4367
1bc5a451
MP
43682014-10-23 Marek Polacek <polacek@redhat.com>
4369
4370 PR c/63626
4371 * c-decl.c (pop_scope): Don't print warning in external_scope.
4372
4435bb92
MP
43732014-10-19 Marek Polacek <polacek@redhat.com>
4374
4375 PR c/63567
4376 * c-typeck.c (output_init_element): Allow initializing objects with
4377 static storage duration with compound literals even in C99 and add
4378 pedwarn for it.
4379
7278465e
MP
43802014-10-17 Marek Polacek <polacek@redhat.com>
4381
4382 PR c/63567
4383 * c-typeck.c (digest_init): Allow initializing objects with static
4384 storage duration with compound literals even in C99 and add pedwarn
4385 for it.
4386
d9b7be2e
MP
43872014-10-17 Marek Polacek <polacek@redhat.com>
4388
4389 PR c/63543
4390 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
4391 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
4392 error multiple times. Print the type.
4393
f406ae1f
MP
43942014-10-17 Marek Polacek <polacek@redhat.com>
4395
4396 PR c/63549
4397 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
4398 type.
4399
92574c7c
MP
44002014-10-17 Marek Polacek <polacek@redhat.com>
4401
4402 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
4403 (start_function): Use OPT_Wimplicit_int instead of 0.
4404 (store_parm_decls_oldstyle): Likewise.
4405
1bc4a978
MT
44062014-10-17 Alan Modra <amodra@gmail.com>
4407
4408 PR middle-end/61848
4409 * c-decl.c (merge_decls): Don't merge section name or tls model
4410 to newdecl symtab node, instead merge to olddecl. Override
4411 existing olddecl section name. Set tls_model for all thread-local
4412 vars, not just OMP thread-private ones. Remove incorrect comment.
4413
83685514
AM
44142014-10-16 Andrew MacLeod <amacleod@redhat.com>
4415
4416 * c-decl.c: Adjust include files.
4417
78a7c317
DD
44182014-10-14 DJ Delorie <dj@redhat.com>
4419
4420 * c-parser.c (c_parse_init): Add RID entries for each __intN.
4421 (c_token_starts_typename): Check all __intN, not just __int128.
4422 (c_token_starts_declspecs): Likewise.
4423 (c_parser_declspecs): Likewise.
4424 (c_parser_attribute_any_word): Likewise.
4425 (c_parser_objc_selector): Likewise.
4426 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
4427 (struct c_declspecs): Add int_n_idx field to record *which* __intN
4428 is specified.
4429 * c-decl.c (declspecs_add_type): Check for all __intN, not just
4430 __int128.
4431 (finish_declspecs): Likewise.
4432
74d98c1e
AB
44332014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
4434
8e745a17 4435 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 4436 the duplicate code.
8e745a17 4437 (c_parser_statement): Call the new function.
74d98c1e 4438
84937de2
MP
44392014-10-09 Marek Polacek <polacek@redhat.com>
4440
4441 PR c/63480
4442 * c-typeck.c (pop_init_level): Don't warn about initializing
4443 with { }.
4444
0382aaa0
MP
44452014-10-07 Marek Polacek <polacek@redhat.com>
4446
4447 PR c/59717
4448 * c-decl.c (header_for_builtin_fn): New function.
4449 (implicitly_declare): Suggest which header to include.
4450
7a0ca710
MP
44512014-10-07 Marek Polacek <polacek@redhat.com>
4452
4453 * c-convert.c (convert): Use error_operand_p.
4454 * c-typeck.c (require_complete_type): Likewise.
4455 (really_atomic_lvalue): Likewise.
4456 (digest_init): Likewise.
4457 (handle_omp_array_sections_1): Likewise.
4458
6bc8a126
MP
44592014-10-03 Marek Polacek <polacek@redhat.com>
4460
4461 PR c/63453
4462 * c-decl.c (pop_scope): Don't warn about "inline function declared
4463 but never defined" for functions marked with gnu_inline attribute.
4464
d90c0a59
JJ
44652014-09-25 Jakub Jelinek <jakub@redhat.com>
4466
4467 PR c++/63249
4468 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
4469 on low_bound and length.
4470
083e891e
MP
44712014-09-24 Marek Polacek <polacek@redhat.com>
4472
4473 PR c/61405
4474 PR c/53874
4475 * c-parser.c: Don't define CPP_KEYWORD.
4476 (c_parser_switch_statement): Pass original type to c_finish_case.
4477 * c-tree.h (c_finish_case): Update declaration.
4478 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
4479 conditionally to c_do_switch_warnings.
4480
8d95fe25
MP
44812014-09-03 Marek Polacek <polacek@redhat.com>
4482
4483 PR c/62024
4484 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
4485 conversions.
4486
9a771876
JJ
44872014-09-02 Jakub Jelinek <jakub@redhat.com>
4488 Balaji V. Iyer <balaji.v.iyer@intel.com>
4489 Igor Zamyatin <igor.zamyatin@intel.com>
4490
4491 * c-parser.c (c_parser_cilk_for): New function.
4492 (c_parser_cilk_grainsize): Likewise.
4493 (c_get_temp_regvar): Likewise.
4494 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
4495 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
4496 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
4497 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
4498 case.
4499
b7679d96
CG
45002014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
4501
4502 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
4503 with using HOST_WIDE_INT without truncation to 'int'
4504
59ea0364
MP
45052014-08-22 Marek Polacek <polacek@redhat.com>
4506
4507 PR c++/62199
4508 * c-typeck.c (parser_build_binary_op): Adjust call to
4509 warn_logical_not_parentheses.
4510
671a475e
IZ
45112014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
4512
4513 PR other/62008
4514 * c-parser.c (c_parser_array_notation): Check for correct
4515 type of an array added.
4516
04159acf
MP
45172014-08-19 Marek Polacek <polacek@redhat.com>
4518
4519 PR c++/62153
4520 * c-typeck.c (build_binary_op): If either operand of a comparison
4521 is a boolean expression, call maybe_warn_bool_compare.
4522
c77935ee
PP
45232014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
4524
4525 PR c/45584
4526 * c-typeck.c (build_c_cast): Do a conversion even when the
4527 TYPE_MAIN_VARIANTs are the same.
4528
35aff4fb
MP
45292014-08-19 Marek Polacek <polacek@redhat.com>
4530
4531 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
4532 pedwarn_c99 instead of pedwarn.
4533 (grokfield): Likewise.
4534 (warn_defaults_to): New function.
4535 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
4536 Unconditionally call pedwarn_c99 instead of pedwarn.
4537 (start_function): Call warn_defaults_to instead of pedwarn_c99.
4538 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
4539 check flag_isoc11 before.
4540 * c-errors.c (pedwarn_c99): Change the return type to bool.
4541 Handle -Wc99-c11-compat.
4542 * c-parser.c (disable_extension_diagnostics): Handle
4543 warn_c99_c11_compat.
4544 (restore_extension_diagnostics): Likewise.
4545 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
4546 instead of pedwarn, don't check flag_isoc11 before.
4547 (c_parser_declspecs): Likewise.
4548 (c_parser_alignas_specifier): Likewise.
4549 (c_parser_alignof_expression): Likewise.
4550 (c_parser_generic_selection): Likewise.
4551 * c-tree.h (pedwarn_c99): Update declaration.
4552 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
4553 of pedwarn_c99.
4554
177cce46
MP
45552014-08-19 Marek Polacek <polacek@redhat.com>
4556
4557 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
4558 to pedwarn_c90.
4559 * c-errors.c: Include "opts.h".
4560 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
4561 * c-parser.c (disable_extension_diagnostics): Handle negative value
4562 of warn_c90_c99_compat, too.
4563 (restore_extension_diagnostics): Likewise.
4564 (c_parser_compound_statement_nostart): Pass
4565 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
4566
6dc99c33
MP
45672014-08-12 Marek Polacek <polacek@redhat.com>
4568
4569 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
4570 Add pedwarn.
4571 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
4572 Likewise.
4573 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
4574
3f8257db 45752014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
4576
4577 PR c/51849
4578 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
4579 Call pedwarn_c90 instead of pedwarn.
4580 (check_bitfield_type_and_width): Likewise.
4581 (declspecs_add_qual): Likewise.
4582 (declspecs_add_type): Likewise.
4583 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
4584 Adjust to only call pedwarn_c90.
4585 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
4586 pedwarn_c90 instead of pedwarn.
4587 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
4588 * c-parser.c (disable_extension_diagnostics): Handle
4589 warn_c90_c99_compat.
4590 (restore_extension_diagnostics): Likewise.
4591 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
4592 pedwarn_c90 instead of pedwarn.
4593 (c_parser_initelt): Likewise.
4594 (c_parser_postfix_expression): Likewise.
4595 (c_parser_postfix_expression_after_paren_type): Likewise.
4596 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
4597 * c-tree.h: Fix formatting.
4598 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
4599 pedwarn_c90 instead of pedwarn.
4600
9f25a338
TS
46012014-08-07 Trevor Saunders <tsaunders@mozilla.com>
4602
4603 * c-typeck.c: Remove include of pointer-set.h.
4604
044331a8
MP
46052014-08-07 Marek Polacek <polacek@redhat.com>
4606
4607 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
4608
b787e7a2
TS
46092014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4610
4611 * c-typeck.c: Use hash_map instead of pointer_map.
4612
6e2830c3
TS
46132014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4614
4615 * c-decl.c: Use hash_set instead of pointer_set.
4616
a7ee52fb
IZ
46172014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
4618
4619 PR middle-end/61455
4620 * c-array-notation.c (expand_array_notations): Handling
4621 of DECL_EXPR added.
4622
b4dfdc11
MG
46232014-07-31 Marc Glisse <marc.glisse@inria.fr>
4624
4625 PR c++/60517
4626 * c-typeck.c (c_finish_return): Return 0 instead of the address of
4627 a local variable.
4628
976d5a22
TT
46292014-07-30 Tom Tromey <tromey@redhat.com>
4630
4631 * c-typeck.c (struct constructor_stack) <designator_depth>: New
4632 field.
4633 (really_start_incremental_init, push_init_level): Initialize
4634 designator_depth.
4635 (pop_init_level): Set global designator_depth.
4636 (process_init_element): Check for designated_init attribute.
4637
30281de2
MP
46382014-07-20 Marek Polacek <polacek@redhat.com>
4639
4640 PR c/61852
4641 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
4642 (implicitly_declare): Pass location to implicit_decl_warning.
4643
b108f48f
JJ
46442014-07-14 Jakub Jelinek <jakub@redhat.com>
4645
4646 PR middle-end/61294
4647 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
4648 If non-NULL, call c_parser_check_literal_zero.
4649 (c_parser_check_literal_zero): New function.
4650 (c_parser_postfix_expression_after_primary): Adjust
4651 c_parser_expr_list caller, handle -Wmemset-transposed-args.
4652
773ec47f
MP
46532014-07-06 Marek Polacek <polacek@redhat.com>
4654
4655 PR c/6940
4656 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4657 * c-tree.h (C_ARRAY_PARAMETER): Define.
4658 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4659 function parameter.
4660
22e1cf1c 46612014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 4662 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
4663
4664 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4665 releasing symbol.
4666
52ec0ea3
MP
46672014-07-01 Marek Polacek <polacek@redhat.com>
4668
4669 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4670 instead of 0 to WARN_FOR_ASSIGNMENT.
4671
d5c3d343
MP
46722014-07-01 Marek Polacek <polacek@redhat.com>
4673
4674 PR c/58286
4675 * c-typeck.c (convert_for_assignment): Pass
4676 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4677
6a7253a4
MP
46782014-06-30 Marek Polacek <polacek@redhat.com>
4679
4680 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4681 has no_sanitize_undefined attribute.
4682
5e88a8f4
IZ
46832014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
4684
4685 PR middle-end/57541
4686 * c-array-notation.c (fix_builtin_array_notation_fn):
4687 Check for 0 arguments in builtin call. Check that bultin argument is
4688 correct.
4689 * c-parser.c (c_parser_array_notation): Check for incorrect initial
4690 index.
4691
9698b078
SH
46922014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
4693
4694 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
4695 qualifiers in __auto_type for atomic types.
4696 (c_parser_typeof_specifier): Discard all type qualifiers in
4697 __typeof__ for atomic types.
4698
6e07c515
MP
46992014-06-25 Marek Polacek <polacek@redhat.com>
4700
4701 PR c/61162
4702 * c-parser.c (c_parser_statement_after_labels): Pass the location of
4703 the return expression to c_finish_return.
4704
da6f124d
JJ
47052014-06-25 Jakub Jelinek <jakub@redhat.com>
4706
4707 * c-typeck.c (c_finish_omp_clauses): Make sure
4708 OMP_CLAUSE_LINEAR_STEP has correct type.
4709
c203e8a7
TS
47102014-06-24 Trevor Saunders <tsaunders@mozilla.com>
4711
4712 * c-decl.c: Adjust.
4713
56ad0e38
JJ
47142014-06-24 Jakub Jelinek <jakub@redhat.com>
4715
4716 * c-parser.c (c_parser_omp_for_loop): For
4717 #pragma omp parallel for simd move lastprivate clause from parallel
4718 to for rather than simd.
4719
47c2554f
MP
47202014-06-23 Marek Polacek <polacek@redhat.com>
4721
4722 * c-typeck.c (parser_build_binary_op): Don't call
4723 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
4724
56363ffd
JH
47252014-06-15 Jan Hubicka <hubicka@ucw.cz>
4726
4727 * c-parser.c (c_parser_omp_threadprivate): Likewise.
4728 * c-decl.c (merge_decls): Likewise.
4729
d7ff7ae5
MP
47302014-06-09 Marek Polacek <polacek@redhat.com>
4731
4732 PR c/36446
4733 * c-typeck.c (error_init): Call inform instead of error_at.
4734 (pedwarn_init): Call inform instead of pedwarn.
4735 (warning_init): Call inform instead of warning_at.
4736
24d047a3
JH
47372014-06-07 Jan Hubicka <hubicka@ucw.cz>
4738
4739 * c-decl.c (merge_decls): Use set_decl_section_name.
4740 (duplicate_decls): Remove node if it exists.
4741
9bac5cbb
G
47422014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
4743
4744 PR c/53119
4745 * c-typeck.c (push_init_level, process_init_element,
4746 pop_init_level): Correct check for zero initialization, move
4747 missing brace warning to respect zero initialization.
4748
8ffcdea8
MP
47492014-06-05 Marek Polacek <polacek@redhat.com>
4750
4751 PR c/56724
4752 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
4753
742938c9
MP
47542014-06-05 Marek Polacek <polacek@redhat.com>
4755
4756 PR c/49706
4757 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
4758 on the left hand side operand of a comparison.
4759
6447c55d
MP
47602014-06-05 Marek Polacek <polacek@redhat.com>
4761
4762 PR c/48062
4763 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
4764 Print note only if the warning was printed.
4765
9dc7743c
IZ
47662014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
4767
4768 PR c/58942
4769 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4770 with a pointer.
4771
fedfecef
MP
47722014-06-03 Marek Polacek <polacek@redhat.com>
4773
4774 PR c/60439
4775 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4776 c_start_case.
4777 * c-tree.h (c_start_case): Update.
4778 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
4779 switch condition has boolean value.
4780
9b2b7279
AM
47812014-06-02 Andrew MacLeod <amacleod@redhat.com>
4782
4783 * c-decl.c: Include builtins.h.
4784 * c-parser.c: Likewise.
4785
5c1bc275
MP
47862014-05-27 Marek Polacek <polacek@redhat.com>
4787
4788 PR c/56724
4789 * c-typeck.c (convert_arguments): Get location of a parameter. Change
4790 error and warning calls to error_at and warning_at. Pass location of
4791 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
4792 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4793 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
4794
97563bc8
IZ
47952014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
4796
4797 PR c/61191
4798 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4799 function parameters.
4800
aede2c10
JH
48012014-05-23 Jan Hubicka <hubicka@ucw.cz>
4802
4803 * c-decl.c (merge_decls): Preserve symtab node pointers.
4804 (duplicate_decls): Free new decl.
4805
edbba2ce
TS
48062014-05-23 Thomas Schwinge <thomas@codesourcery.com>
4807
f3316c6d
TS
4808 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4809 initialization.
4810
edbba2ce
TS
4811 * c-parser.c (c_parser_omp_target): Return bool values.
4812
68c81f24
TS
48132014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4814
4815 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4816 num_teams_loc variable to num_thread_limit_loc.
4817
632f2871
RS
48182014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4819
4820 * c-array-notation.c (expand_array_notations): Use void_node
4821 instead of void_zero_node.
4822
766090c2
TS
48232014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4824
4825 * c-decl.c (finish_struct): Adjust.
4826 (finish_enum): Likewise.
4827 (bind): Adjust.
4828 (record_inline_static): Likewise.
4829 (push_scope): Likewise.
4830 (make_label): Likewise.
4831 (lookup_label_for_goto): Likewise.
4832 (finish_struct): Likewise.
4833 (finish_enum): Likewise.
4834 (store_parm_decls): Likewise.
4835 (c_push_function_context): Likewise.
4836 * c-lang.h: Remove usage of variable_size gty attribute.
4837 * c-parser.c (c_parse_init): Adjust.
4838 (c_parse_file): Likewise.
4839
2b107f6b
MP
48402014-05-13 Marek Polacek <polacek@redhat.com>
4841
4842 PR c/61162
4843 * c-typeck.c (convert_for_assignment): Pass location to
4844 WARN_FOR_ASSIGNMENT instead of input_location.
4845
d033409e
MP
48462014-05-10 Marek Polacek <polacek@redhat.com>
4847
4848 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4849 maybe_warn_string_init.
4850 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4851 maybe_warn_string_init.
4852 * c-tree.h (maybe_warn_string_init): Update declaration.
4853 * c-typeck.c (maybe_warn_string_init): Add location parameter.
4854 Call pedwarn_init with loc instead of with input_location.
4855 (digest_init): Pass init_loc to maybe_warn_string_init.
4856 (pop_init_level): Call pedwarn_init with loc instead of with
4857 input_location.
4858 (set_init_index): Likewise.
4859 (process_init_element): Likewise.
4860
ea58ef42
MP
48612014-05-09 Marek Polacek <polacek@redhat.com>
4862
4863 PR c/61096
4864 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4865 (c_parser_initelt): Pass location to set_init_label. Pass array index
4866 location to set_init_index.
4867 * c-tree.h (push_init_level): Update declaration.
4868 (pop_init_level): Likewise.
4869 (set_init_index): Likewise.
4870 (set_init_label): Likewise.
4871 * c-typeck.c (error_init): Add location parameter. Call error_at
4872 instead of error.
4873 (digest_init): Pass init_loc to error_init.
4874 (really_start_incremental_init):
4875 (push_init_level): Add location parameter. Pass loc to pop_init_level
4876 and error_init.
4877 (pop_init_level): Likewise.
4878 (set_designator): Add location parameter. Pass loc to pop_init_level,
4879 push_init_level, and error_init.
4880 (set_init_index): Add location parameter. Pass loc to error_init and
4881 set_designator.
4882 (set_init_label): Likewise.
4883 (output_init_element): Pass loc to error_init.
4884 (process_init_element): Pass loc to error_init, pop_init_level,
4885 pedwarn_init, and push_init_level.
4886
661a0813
MP
48872014-05-09 Marek Polacek <polacek@redhat.com>
4888
4889 PR c/50459
4890 * c-parser.c (c_parser_attributes): Parse the arguments as an
4891 expression-list if the attribute takes identifier.
4892
2793eeab
MP
48932014-05-08 Marek Polacek <polacek@redhat.com>
4894
4895 PR c/61053
4896 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4897 TYPE_ALIGN_UNIT.
4898
f827930a
MP
48992014-05-08 Marek Polacek <polacek@redhat.com>
4900
4901 PR c/61077
4902 * c-decl.c (start_function): Warn for _Atomic-qualified return type
4903 of main.
4904
1d60af08
KZ
49052014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4906 Mike Stump <mikestump@comcast.net>
4907 Richard Sandiford <rdsandiford@googlemail.com>
4908
4909 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4910 (finish_enum): Use wide-int interfaces.
4911 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4912 * c-typeck.c (build_c_cast): Likewise.
4913 (set_nonincremental_init_from_string): Likewise.
4914 (c_tree_equal): Likewise.
4915
a0e24419
MP
49162014-05-02 Marek Polacek <polacek@redhat.com>
4917
4918 PR c/25801
4919 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
4920 Return size_one_node when the type is not complete.
4921 (pointer_diff): Remove comment.
4922 (build_unary_op): Improve error messages.
4923
19fc9faa
MP
49242014-05-02 Marek Polacek <polacek@redhat.com>
4925
4926 * c-typeck.c (c_finish_return): Separate warning_at calls.
4927
63bc4e87
MP
49282014-05-02 Marek Polacek <polacek@redhat.com>
4929
4930 * c-tree.h (error_init): Remove declaration.
4931 (pedwarn_init): Likewise.
4932 * c-typeck.c (error_init): Make static and move above.
4933 (pedwarn_init): Likewise.
4934 (warning_init): Move above.
4935 (maybe_warn_string_init): Likewise.
4936
4bd2511b
JL
49372014-05-01 Jeff Law <law@redhat.com>
4938
4939 Revert:
4940
4941 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4942 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
4943 avoid goto.
4944
6a358dcb
MP
49452014-05-02 Marek Polacek <polacek@redhat.com>
4946
4947 PR c/60784
4948 * c-typeck.c (push_init_level): Set constructor_designated to
4949 p->designated for structures.
4950
ae5ebda4
MP
49512014-05-01 Marek Polacek <polacek@redhat.com>
4952
4953 PR c/60915
4954 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4955 function-definition has an attribute after the declarator.
4956
96b40f8d
MP
49572014-05-01 Marek Polacek <polacek@redhat.com>
4958
4959 PR c/60257
4960 * c-typeck.c (warning_init): Add location_t parameter. Call
4961 warning_at instead of warning.
4962 (push_init_level): Pass input_location to warning_init.
4963 (add_pending_init): Add location_t parameter. Pass loc to
4964 warning_init.
4965 (set_nonincremental_init): Pass input_location to add_pending_init.
4966 (set_nonincremental_init_from_string): Likewise.
4967 (output_init_element): Pass loc to warning_init and to
4968 add_pending_init.
4969
32e00768
MP
49702014-05-01 Marek Polacek <polacek@redhat.com>
4971
4972 PR c/43395
4973 * c-typeck.c (c_finish_return): Distinguish between label and variable
4974 when warning about returning local address.
4975
c9379ce2
MP
49762014-05-01 Marek Polacek <polacek@redhat.com>
4977
4978 PR c/29467
4979 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
4980 in C89 mode.
4981
d00887e8
MP
49822014-05-01 Marek Polacek <polacek@redhat.com>
4983
4984 PR c/43245
4985 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
4986 instead of 0 to WARN_FOR_QUALIFIERS.
4987
5436fa2e
MP
49882014-05-01 Marek Polacek <polacek@redhat.com>
4989
4990 PR c/56989
4991 * c-typeck.c (default_conversion): Use better location for
4992 error call.
4993
f8ed5150
MP
49942014-04-30 Marek Polacek <polacek@redhat.com>
4995
4996 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
4997 also when SANITIZE_FLOAT_DIVIDE is on.
4998
8337d1db
MP
49992014-04-30 Marek Polacek <polacek@redhat.com>
5000
5001 PR c/60139
5002 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
5003 and pedwarn_init. Use loc insted of input_location.
5004
c4bdc42f
MP
50052014-04-30 Marek Polacek <polacek@redhat.com>
5006
5007 PR c/60351
5008 * c-typeck.c (build_binary_op): Use location when warning about
5009 shift count.
5010
45484dcf
MP
50112014-04-25 Marek Polacek <polacek@redhat.com>
5012
5013 PR c/18079
5014 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
5015 always_inline/noinline and hot/cold attributes.
5016
34cf811f
MP
50172014-04-25 Marek Polacek <polacek@redhat.com>
5018
5019 PR c/60114
5020 * c-parser.c (c_parser_initelt): Pass input_location to
5021 process_init_element.
5022 (c_parser_initval): Pass loc to process_init_element.
5023 * c-tree.h (process_init_element): Adjust declaration.
5024 * c-typeck.c (push_init_level): Pass input_location to
5025 process_init_element.
5026 (pop_init_level): Likewise.
5027 (set_designator): Likewise.
5028 (output_init_element): Add location_t parameter. Pass loc to
5029 digest_init.
5030 (output_pending_init_elements): Pass input_location to
5031 output_init_element.
5032 (process_init_element): Add location_t parameter. Pass loc to
5033 output_init_element.
5034
42056eac
JJ
50352014-04-24 Jakub Jelinek <jakub@redhat.com>
5036
5037 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
5038 atomic-clause, allow comma in between atomic-clause and
5039 seq_cst.
5040
e162a134
JJ
50412014-04-22 Jakub Jelinek <jakub@redhat.com>
5042
5043 PR c/59073
5044 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
5045 fails, don't set OM_PARALLEL_COMBINED and return NULL.
5046
2f6babac
IZ
50472014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
5048
5049 PR middle-end/60469
5050 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5051 create_tmp_var instead build_decl for creating temps.
5052 (build_array_notation_expr): Likewise.
5053 (fix_conditional_array_notations_1): Likewise.
5054 (fix_array_notation_expr): Likewise.
5055 (fix_array_notation_call_expr): Likewise.
5056
8edbfaa6
JJ
50572014-03-28 Jakub Jelinek <jakub@redhat.com>
5058
5059 PR c++/60689
5060 * c-tree.h (c_build_function_call_vec): New prototype.
5061 * c-typeck.c (build_function_call_vec): Don't call
5062 resolve_overloaded_builtin here.
5063 (c_build_function_call_vec): New wrapper function around
5064 build_function_call_vec. Call resolve_overloaded_builtin here.
5065 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
5066 Call c_build_function_call_vec instead of build_function_call_vec.
5067 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
5068 * c-decl.c (finish_decl): Likewise.
5069
7485aeea
MLI
50702014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5071
5072 PR c/55383
5073 * c-typeck.c: Use correct format string in cast-qual warning
5074
b17a8b07
TS
50752014-03-07 Thomas Schwinge <thomas@codesourcery.com>
5076
5077 * c-decl.c (c_decl_attributes): Use
5078 lang_hooks.types.omp_mappable_type.
5079 * c-typeck.c (c_finish_omp_clauses): Likewise.
5080
3af9c5e9
MP
50812014-03-06 Marek Polacek <polacek@redhat.com>
5082
5083 PR c/60197
5084 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
5085 of checking tree code.
5086
1c9f5f33
PK
50872014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5088
5089 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
5090 (c_parser_parameter_declaration): Likewise.
5091
cc28fc7f
MP
50922014-02-19 Marek Polacek <polacek@redhat.com>
5093
5094 PR c/60195
5095 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
5096 Call mark_exp_read on exp.value.
5097 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
5098 TREE_ADDRESSABLE on old instead of val.
5099 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
5100
b581c05c
PK
51012014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5102
5103 * c-parser.c (c_parser_get_builtin_args): Replace calls to
5104 C_EXPR_APPEND by vec_safe_push.
5105 * c-tree.h (C_EXPR_APPEND): Remove.
5106
81e5eca8
MP
51072014-01-31 Marek Polacek <polacek@redhat.com>
5108
5109 PR c/59963
5110 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
5111 build_function_call_vec.
5112 (build_function_call): Likewise.
5113 (build_atomic_assign): Likewise.
5114 (build_function_call_vec): Add arg_loc parameter. Use it.
5115 (convert_arguments): Likewise.
5116 (convert_for_assignment): Rename rhs_loc to expr_loc.
5117 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
5118 (c_parser_objc_keywordexpr): Likewise.
5119 (c_parser_postfix_expression_after_primary): Call
5120 build_function_call_vec with expr_loc rather than op_loc.
5121 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
5122 build_function_call_vec.
5123 (c_parser_expr_list): Add locations parameter. Fill it with locations
5124 of function arguments.
5125 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
5126
68fca595
MP
51272014-01-30 Marek Polacek <polacek@redhat.com>
5128
5129 PR c/59940
5130 * c-typeck.c (build_function_call_vec): Use loc parameter.
5131 (convert_arguments): Add location parameter. Use it.
5132 (ep_convert_and_check): Likewise.
5133 (build_atomic_assign): Adjust convert_for_assignment call.
5134 (build_modify_expr): Likewise.
5135 (digest_init): Likewise.
5136 (c_finish_return): Likewise.
5137 (build_conditional_expr): Adjust ep_convert_and_check calls.
5138 (convert_for_assignment): Add rhs_loc parameter. Use it.
5139 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
5140 calls.
5141
fa337f3a
RB
51422014-01-30 Richard Biener <rguenther@suse.de>
5143
5144 PR c/59905
5145 * c-typeck.c (build_function_call_vec): Do not replace calls
5146 to a function via an incompatible type with a runtime abort.
5147
b72271b9
BI
51482014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
5149
5150 * c-parser.c (c_parser_declaration_or_fndef): Replaced
5151 flag_enable_cilkplus with flag_cilkplus.
5152 (c_parser_direct_declarator_inner): Likewise.
5153 (c_parser_attribute_any_word): Likewise.
5154 (c_parser_attributes): Likewise.
5155 (c_parser_compound_statement): Likewise.
5156 (c_parser_statement_after_labels): Likewise.
5157 (c_parser_if_statement): Likewise.
5158 (c_parser_switch_statement): Likewise.
5159 (c_parser_do_statement): Likewise.
5160 (c_parser_for_statement): Likewise.
5161 (c_parser_unary_expression): Likewise.
5162 (c_parser_postfix_expression): Likewise.
5163 (c_parser_postfix_expression_after_primary): Likewise.
5164 (c_parser_postfix_expression_after_primary): Likewise.
5165 (c_parser_omp_clause_name): Likewise.
5166 (c_finish_omp_declare_simd): Likewise.
5167 (c_parser_cilk_verify_simd): Likewise.
5168 * c-typeck.c (build_array_ref): Likewise.
5169 (build_function_call_vec): Likewise.
5170 (convert_arguments): Likewise.
5171 (build_compound_expr): Likewise.
5172 (c_finish_return): Likewise.
5173 (c_finish_if_stmt): Likewise.
5174 (c_finish_loop): Likewise.
5175 (build_binary_op): Likewise.
5176
393e8e8b
MP
51772014-01-23 Marek Polacek <polacek@redhat.com>
5178
5179 PR c/59846
5180 * c-typeck.c (parser_build_binary_op): Use location instead of
5181 input_location.
5182 (build_binary_op): Pass location to shorten_compare.
5183
f04dda30
MP
51842014-01-23 Marek Polacek <polacek@redhat.com>
5185
5186 PR c/58346
5187 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
5188 an empty aggregate.
5189
789eadcd
MP
51902014-01-23 Marek Polacek <polacek@redhat.com>
5191
5192 PR c/59871
5193 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
5194 of a comma expression.
5195 (emit_side_effect_warnings): Likewise.
5196
40f14e9f
BI
51972014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5198
5199 PR c/59825
5200 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
5201 function to use walk_tree and moved a lot of its functionality to
5202 expand_array_notations.
5203 (expand_array_notations): New function.
5204
74558dd9
BI
52052014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5206
5207 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
5208 attribute an attribute without value.
5209
652fea39
JJ
52102014-01-23 Jakub Jelinek <jakub@redhat.com>
5211
5212 PR middle-end/58809
5213 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
5214 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
5215
f34f1c87
MP
52162014-01-22 Marek Polacek <polacek@redhat.com>
5217
5218 PR c/59891
5219 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
5220 of remove_c_maybe_const_expr on op1 and op2.
5221
241f845a
JJ
52222014-01-15 Jakub Jelinek <jakub@redhat.com>
5223
5224 PR c/58943
5225 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
5226 effects, preevaluate rhs using SAVE_EXPR first.
5227
9a74f20c
BI
52282014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
5229
5230 PR c++/59631
5231 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
5232 statements with if-elseif statements.
5233
96066ce1
MP
52342014-01-06 Marek Polacek <polacek@redhat.com>
5235
5236 PR c/57773
5237 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
5238 defined bit-field types only in ISO C.
5239
23a5b65a
RS
52402014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5241
5242 Update copyright years
5243
f9030485
RS
52442014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5245
5246 * c-array-notation.c: Use the standard form for the copyright notice.
5247
41958c28
BI
52482013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
5249
5250 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
5251 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
5252 field in parser is not empty. If not-empty, call the function
5253 c_parser_finish_omp_declare_simd.
5254 (c_parser_cilk_clause_vectorlength): Modified function to be shared
5255 between SIMD-enabled functions and #pragma simd. Added new parameter.
5256 (c_parser_cilk_all_clauses): Modified the usage of the function
5257 c_parser_cilk_clause_vectorlength as mentioned above.
5258 (c_parser_cilk_simd_fn_vector_attrs): New function.
5259 (c_finish_cilk_simd_fn_tokens): Likewise.
5260 (is_cilkplus_vector_p): Likewise.
5261 (c_parser_omp_clause_name): Added checking for "vectorlength,"
5262 "nomask," and "mask" strings in clause name.
5263 (c_parser_omp_all_clauses): Added 3 new case statements:
5264 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
5265 PRAGMA_CILK_CLAUSE_NOMASK.
5266 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
5267 check for vector attribute and if so call the function
5268 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
5269 called the function c_finish_cilk_simd_fn_tokens.
5270 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
5271 parser field is non-empty. If so, parse them as you would parse
5272 the omp declare simd pragma.
5273 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
5274 Added a check when step is a parameter and flag it as error.
5275 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
5276 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
5277 pragma_omp_clause.
5278
cef0fd0e
TS
52792013-12-17 Thomas Schwinge <thomas@codesourcery.com>
5280
5281 * c-parser.c (c_parser_omp_parallel): Fix description.
5282
12893402
BI
52832013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
5284
5285 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
5286 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5287 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
5288 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
5289
296674db
JM
52902013-12-04 Joseph Myers <joseph@codesourcery.com>
5291
5292 PR c/52023
5293 * c-parser.c (c_parser_alignas_specifier): Use
5294 c_sizeof_or_alignof_type instead of c_alignof.
5295 (c_parser_alignof_expression): Likewise, with min_alignof
5296 parameter depending on alignof spelling used.
5297
edd28054
MP
52982013-12-04 Marek Polacek <polacek@redhat.com>
5299
5300 PR c/54113
5301 * c-decl.c (start_function): Don't warn for missing prototype for
5302 inline functions.
5303
da0fc454
MP
53042013-12-03 Marek Polacek <polacek@redhat.com>
5305
5306 PR c/59351
5307 * c-decl.c (build_compound_literal): Allow compound literals with
5308 empty initial value.
5309
4c2ecab0
JM
53102013-12-02 Joseph Myers <joseph@codesourcery.com>
5311
5312 PR c/58235
5313 * c-typeck.c (build_modify_expr): Diagnose assignment to
5314 expression with array type.
5315
340baef7
JM
53162013-11-29 Joseph Myers <joseph@codesourcery.com>
5317
5318 PR c/42262
5319 * c-typeck.c (process_init_element): Do not treat a string as
5320 initializing a whole array when used with a designator for an
5321 individual element.
5322
6763b9f7
JM
53232013-11-29 Joseph Myers <joseph@codesourcery.com>
5324
5325 PR c/57574
5326 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
5327 an inline function following a static declaration.
5328
e7bd1de1
JJ
53292013-11-28 Jakub Jelinek <jakub@redhat.com>
5330
5331 PR c/59310
5332 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
5333 to p_name before calling c_parser_omp_teams instead of after.
5334 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
5335 argument. Remove unused p_name variable.
5336
0136f8f0
AH
53372013-11-27 Aldy Hernandez <aldyh@redhat.com>
5338 Jakub Jelinek <jakub@redhat.com>
5339
5340 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
5341 external_scope is NULL.
5342
241b71bb
TV
53432013-11-27 Tom de Vries <tom@codesourcery.com>
5344 Marc Glisse <marc.glisse@inria.fr>
5345
5346 PR c++/59032
5347 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
5348
2fb9a547
AM
53492013-11-22 Andrew MacLeod <amacleod@redhat.com>
5350
5351 * c-typeck.c: Add required include files from gimple.h.
5352
8400e75e
DM
53532013-11-22 David Malcolm <dmalcolm@redhat.com>
5354
5355 * c-decl.c (define_label, shadow_tag_warned)
5356 (check_bitfield_type_and_width, grokdeclarator, grokparms,
5357 store_parm_decls_newstyle, store_parm_decls_oldstyle)
5358 (declspecs_add_type): Remove use of in_system_header macro.
5359 * c-parser.c (c_parser_unary_expression): Likewise.
5360 * c-typeck.c (store_init_value, process_init_element)
5361 (c_start_case): Likewise.
5362
5363 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
5364 macro.
5365
5366 * c-parser.c (c_parser_set_source_position_from_token): Remove
5367 reference to in_system_header from comment.
5368
386b1f1f
RS
53692013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5370
5371 * c-decl.c (grokdeclarator): Update comment to refer to
5372 tree_to_[su]hwi rather than tree_low_cst.
5373
ae7e9ddd
RS
53742013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5375
5376 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
5377 tree_to_uhwi throughout.
5378
9439e9a1
RS
53792013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5380
5381 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
5382 throughout.
5383
9541ffee
RS
53842013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5385
5386 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
5387 throughout.
5388
c02065fc
AH
53892013-11-15 Aldy Hernandez <aldyh@redhat.com>
5390
5391 * c-parser.c (c_parser_cilk_simd): New.
5392 (c_parser_cilk_verify_simd): New.
5393 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
5394 (c_parser_omp_for_loop): Add case for NE_EXPR.
5395 Set c_break_label for CILK_SIMD.
5396 (c_parser_cilk_clause_vectorlength): New.
5397 (c_parser_cilk_clause_linear): New.
5398 (c_parser_cilk_clause_name): New.
5399 (c_parser_cilk_all_clauses): New.
5400 * c-typeck.c (build_unary_op): Pass location argument to
5401 readonly_error.
5402 (build_modify_expr): Same.
5403 (build_asm_expr): Same.
5404 (c_finish_bc_stmt): Error on break/continue in loops.
5405
18f429e2
AM
54062013-11-14 Andrew MacLeod <amacleod@redhat.com>
5407
5408 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
5409
d8a2d370
DN
54102013-11-14 Diego Novillo <dnovillo@google.com>
5411
5412 * c-decl.c: Include print-tree.h.
5413 Include stor-layout.h.
5414 Include varasm.h.
5415 Include attribs.h.
5416 Include stringpool.h.
5417 * c-lang.c: Include fold-const.h.
5418 * c-parser.c: Include stringpool.h.
5419 Include attribs.h.
5420 Include stor-layout.h.
5421 Include varasm.h.
5422 Include trans-mem.h.
5423 * c-typeck.c: Include stor-layout.h.
5424 Include trans-mem.h.
5425 Include varasm.h.
5426 Include stmt.h.
5427
38b7bc7f
JM
54282013-11-13 Joseph Myers <joseph@codesourcery.com>
5429
5430 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
5431 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
5432 __auto_type.
5433 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
5434 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
5435 RID_AUTO_TYPE.
5436 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
5437 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
5438 (c_parser_declarator, c_parser_direct_declarator_inner)
5439 (c_parser_parameter_declaration, c_parser_type_name): All callers
5440 changed.
5441 (c_parser_declaration_or_fndef): Handle declarations with type
5442 determined from the initializer.
5443
45b0be94
AM
54442013-11-12 Andrew MacLeod <amacleod@redhat.com>
5445
18f429e2 5446 * c-typeck.c: Include gimplify.h.
45b0be94 5447
582d9b50
JM
54482013-11-12 Joseph Myers <joseph@codesourcery.com>
5449
5450 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
5451 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
5452 comment.
5453 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
5454 or _Thread_local as appropriate in diagnostics.
5455 (build_null_declspecs): Initialize ret->thread_gnu_p.
5456 (declspecs_add_scspec): Handle either __thread or _Thread_local
5457 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
5458 pedantic. Do not disallow _Thread_local extern and _Thread_local
5459 static.
5460
267bac10
JM
54612013-11-07 Joseph Myers <joseph@codesourcery.com>
5462 Andrew MacLeod <amacleod@redhat.com>
5463
5464 * c-aux-info.c (gen_type): Handle atomic qualifier.
5465 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
5466 qualifiers when compating types.
5467 (shadow_tag_warned): Handle atomic_p in declspecs.
5468 (quals_from_declspecs): Likewise.
5469 (start_decl): Use c_type_promotes_to when promoting argument
5470 types.
5471 (grokdeclarator): Handle _Atomic.
5472 (get_parm_info): Diagnose any qualifier on "void" as only
5473 parameter.
5474 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
5475 comparing types. Use c_type_promotes_to when promoting argument
5476 types.
5477 (finish_function): Use c_type_promotes_to when promoting argument
5478 types.
5479 (build_null_declspecs): Handle atomic_p in declspecs.
5480 (declspecs_add_qual): Handle RID_ATOMIC.
5481 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
5482 (c_token_starts_declspecs): Handle RID_ATOMIC.
5483 (c_parser_declspecs): Handle atomic type specifiers and
5484 qualifiers.
5485 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
5486 from types of expressions with atomic type.
5487 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
5488 (c_parser_attribute_any_word): Handle RID_ATOMIC.
5489 (c_parser_initializer, c_parser_initelt, c_parser_initval)
5490 (c_parser_statement_after_labels, c_parser_switch_statement)
5491 (c_parser_for_statement, c_parser_expr_no_commas)
5492 (c_parser_conditional_expression, c_parser_binary_expression)
5493 (c_parser_cast_expression, c_parser_unary_expression)
5494 (c_parser_postfix_expression)
5495 (c_parser_postfix_expression_after_primary, c_parser_expression):
5496 Use convert_lvalue_to_rvalue.
5497 (c_parser_expression_conv, c_parser_expr_list): Document
5498 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
5499 (c_parser_objc_synchronized_statement): Use
5500 convert_lvalue_to_rvalue.
5501 (c_parser_objc_selector): Handle RID_ATOMIC.
5502 (c_parser_objc_receiver, c_parser_array_notation): Use
5503 convert_lvalue_to_rvalue.
5504 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
5505 _Atomic (type-name).
5506 (struct c_declspecs): Add atomic_p field.
5507 (convert_lvalue_to_rvalue): Declare.
5508 * c-typeck.c (c_type_promotes_to): Promote atomic types to
5509 corresponding atomic types.
5510 (qualify_type): Don't add _Atomic qualifiers from second argument.
5511 (comp_target_types): Do not allow _Atomic mismatches.
5512 (type_lists_compatible_p): Do not remove atomic qualifiers when
5513 comparing types.
5514 (really_atomic_lvalue, convert_lvalue_to_rvalue)
5515 (build_atomic_assign): New functions.
5516 (build_unary_op): Use build_atomic_assign for atomic increment and
5517 decrement.
5518 (build_conditional_expr): Do not treat _Atomic void as a qualified
5519 version of void.
5520 (build_modify_expr): Use build_atomic_assign for atomic LHS.
5521 (find_anonymous_field_with_type, convert_to_anonymous_field)
5522 (convert_for_assignment): Do not remove atomic qualifiers when
5523 comparing types.
5524 (digest_init): Do not accept initialization of arrays of atomic
5525 elements by string constants.
5526 (build_asm_expr): Use convert_lvalue_to_rvalue.
5527 (build_binary_op): Do not treat _Atomic void as a qualified
5528 version of void.
5529
0c249d4b
DD
55302013-11-06 DJ Delorie <dj@redhat.com>
5531
5532 * c-decl.c (locate_old_decl): If a previous conflicting decl is
5533 both explicit and builtin, print the location of the explicit one.
5534
6d7f7e0a
TB
55352013-11-05 Tobias Burnus <burnus@net-b.de>
5536
5537 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
5538 c_parser_omp_distribute, c_parser_omp_teams,
5539 c_parser_omp_target, c_parser_omp_declare): Handle
5540 -fopenmp-simd.
5541
b906f4ca
MP
55422013-11-03 Marek Polacek <polacek@redhat.com>
5543
5544 * c-decl.c (grokdeclarator): Add VLA instrumentation.
5545
ee1d5a02
JJ
55462013-11-01 Jakub Jelinek <jakub@redhat.com>
5547
5548 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
5549 check_dup_generic at the end, unless remove is true.
5550 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
5551 remove = true;.
5552 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
5553
5a9785fb
JJ
55542013-10-31 Jakub Jelinek <jakub@redhat.com>
5555
5556 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
5557 with decl that is not pointer nor array.
5558
939b37da
BI
55592013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
5560
5561 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
5562 a spawning function is found.
5563 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
5564 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
5565 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5566 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
5567 case.
5568 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
5569 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
5570 expr.
5571 (c_finish_return): Added a check to reject _Cilk_spawn in return
5572 expression.
5573 (build_cilk_spawn): New function.
5574 (build_cilk_sync): Likewise.
5575 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
5576
d4af74d4
TB
55772013-10-27 Tobias Burnus <burnus@net-b.de>
5578
5579 PR other/33426
5580 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
5581 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
5582 (c_parser_statement_after_labels): Update calls.
5583
d73749df 55842013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
5585
5586 PR other/33426
5587 * c-parser.c (c_parser_pragma, c_parser_for_statement):
5588 Handle PRAGMA_IVDEP.
5589 (c_parser_statement_after_labels): Update call.
5590
f28aa681
MP
55912013-10-24 Marek Polacek <polacek@redhat.com>
5592
5593 * c-parser.c (c_parser_struct_declaration): Add a comment.
5594 (c_parser_declarator): Don't allow _Alignas here.
5595
0645c1a2
AM
55962013-10-17 Andrew MacLeod <amacleod@redhat.com>
5597
5598 * c-parser.c: Include omp-low.h.
5599 * c-typeck.c: Likewise.
5600
568a31f2
MP
56012013-10-17 Marek Polacek <polacek@redhat.com>
5602
5603 PR c/58267
5604 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
5605 Document syntax of the array-declarator.
5606 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
5607 are not permitted.
5608 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
5609 (c_parser_struct_declaration): Likewise.
5610 (c_parser_declarator): Likewise.
5611 (c_parser_direct_declarator_inner): Likewise.
5612 (c_parser_parameter_declaration): Likewise.
5613 (c_parser_type_name): Likewise.
5614
acf0174b
JJ
56152013-10-11 Jakub Jelinek <jakub@redhat.com>
5616
5617 * c-lang.h (current_omp_declare_target_attribute): New extern
5618 decl.
5619 * c-parser.c: Include c-lang.h.
5620 (struct c_parser): Change tokens to c_token *.
5621 Add tokens_buf field. Change tokens_avail type to unsigned int.
5622 (c_parser_consume_token): If parser->tokens isn't
5623 &parser->tokens_buf[0], increment parser->tokens.
5624 (c_parser_consume_pragma): Likewise.
5625 (enum pragma_context): Add pragma_struct and pragma_param.
5626 (c_parser_external_declaration): Adjust
5627 c_parser_declaration_or_fndef caller.
5628 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
5629 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
5630 Adjust recursive call.
5631 (c_parser_struct_or_union_specifier): Use pragma_struct instead
5632 of pragma_external.
5633 (c_parser_parameter_declaration): Use pragma_param instead of
5634 pragma_external.
5635 (c_parser_compound_statement_nostart, c_parser_label,
5636 c_parser_for_statement): Adjust
5637 c_parser_declaration_or_fndef callers.
5638 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
5639 it through to c_parser_conditional_expression.
5640 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
5641 pass it through to c_parser_binary_expression. Adjust recursive
5642 call.
5643 (c_parser_binary_expression): Remove prec argument, add
5644 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
5645 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
5646 binop matches it, use build2 instead of parser_build_binary_op.
5647 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
5648 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
5649 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
5650 Handle pragma_struct and pragma_param the same as pragma_external.
5651 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5652 (c_parser_omp_variable_list): Parse array sections for
5653 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5654 (c_parser_omp_clause_collapse): Fully fold collapse expression.
5655 (c_parser_omp_clause_reduction): Handle user defined reductions.
5656 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5657 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5658 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5659 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5660 c_parser_omp_clause_depend, c_parser_omp_clause_map,
5661 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5662 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5663 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5664 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
5665 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
5666 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5667 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
5668 (c_parser_omp_for_loop): Add CODE argument, pass it through
5669 to c_finish_omp_for. Change last argument to cclauses,
5670 and adjust uses to grab parallel clauses from the array of all
5671 the split clauses. Adjust c_parser_binary_expression,
5672 c_parser_declaration_or_fndef and c_finish_omp_for callers.
5673 (omp_split_clauses): New function.
5674 (c_parser_omp_simd): New function.
5675 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5676 Allow the function to be called also when parsing combined constructs,
5677 and call c_parser_omp_simd when parsing for simd.
5678 (c_parser_omp_sections_scope): If section-sequence doesn't start with
5679 #pragma omp section, require exactly one structured-block instead of
5680 sequence of statements.
5681 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5682 Allow the function to be called also when parsing combined constructs.
5683 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
5684 Allow the function to be called also when parsing combined
5685 constructs.
5686 (c_parser_omp_taskgroup, c_parser_omp_cancel,
5687 c_parser_omp_cancellation_point, c_parser_omp_distribute,
5688 c_parser_omp_teams, c_parser_omp_target_data,
5689 c_parser_omp_target_update, c_parser_omp_target,
5690 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
5691 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
5692 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
5693 (c_parser_omp_construct): Add p_name and mask vars. Handle
5694 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
5695 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
5696 and c_parser_omp_sections callers.
5697 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
5698 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5699 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5700 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
5701 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
5702 OMP_CLAUSE_DEPEND.
5703 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5704 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5705 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5706 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5707 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5708 * c-typeck.c: Include tree-inline.h.
5709 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5710 handle_omp_array_sections_1, handle_omp_array_sections,
5711 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5712 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5713 user defined reductions.
5714 (c_tree_equal): New function.
5715 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5716 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5717 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5718 c_check_omp_declare_reduction_r): New prototypes.
5719 * c-decl.c (current_omp_declare_target_attribute): New variable.
5720 (c_decl_attributes): New function.
5721 (start_decl, start_function): Use it instead of decl_attributes.
5722 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5723 c_omp_reduction_decl, c_omp_reduction_lookup,
5724 c_check_omp_declare_reduction_r): New functions.
5725
0a6c2227
TT
57262013-09-25 Tom Tromey <tromey@redhat.com>
5727
5728 * Make-lang.in (c/gccspec.o): Remove.
5729 (CFLAGS-c/gccspec.o): New variable.
5730 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
5731 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
5732 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5733
f3bc55f0
TT
57342013-09-25 Tom Tromey <tromey@redhat.com>
5735
5736 * Make-lang.in (c/gccspec.o): Don't use subshell.
5737
a24d975c
MP
57382013-09-18 Marek Polacek <polacek@redhat.com>
5739
5740 PR sanitize/58443
5741 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5742 Remove unnecessary check.
5743
ce6923c5
MP
57442013-09-18 Marek Polacek <polacek@redhat.com>
5745
5746 PR sanitizer/58411
5747 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
5748 no_sanitize_undefined attribute.
5749
a1e51df9
KT
57502013-09-13 Kai Tietz <ktietz@redhat.com>
5751
5752 PR target/57848
5753 * c-decl.c (c_builtin_function_ext_scope): Remove
5754 wrong assumption that it is never called on prexisting
5755 symbol.
5756
0af94e6f
JR
57572013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
5758
5759 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
5760
20059c8b
GDR
57612013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5762
5763 * c-objc-common.c (c_tree_printer): Tidy.
5764
de5a5fa1
MP
57652013-08-30 Marek Polacek <polacek@redhat.com>
5766
5767 * c-typeck.c (build_binary_op): Add division by zero and shift
5768 instrumentation.
5769
2531a1d9 57702013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 5771 Joseph Myers <joseph@codesourcery.com>
2531a1d9 5772
6e2bcc98 5773 PR c/35649
2531a1d9
JR
5774 * c-typeck.c (c_common_type): Prefer double_type_node over
5775 other REAL_TYPE types with the same precision.
5776 (convert_arguments): Likewise.
5777
025311c4
GDR
57782013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5779
5780 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
5781 (c_initialize_diagnostics): Call a destructor for the early printer.
5782
da6ca2b5
GDR
57832013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5784
5785 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5786 printer initialization.
5787
318cda85 57882013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 5789
318cda85
BI
5790 PR c/57490
5791 * c-array-notation.c (fix_conditional_array_notations_1): Added a
5792 check for truth values.
5793 (expand_array_notation_exprs): Added truth values case. Removed an
5794 unwanted else. Added for-loop to walk through subtrees in default
5795 case.
5796
b066401f
GDR
57972013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5798
5799 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5800
fb48aadc
JM
58012013-07-23 Joseph Myers <joseph@codesourcery.com>
5802
5803 * c-parser.c (struct c_generic_association): Fix typo.
5804
433cc7b0
TT
58052013-07-23 Tom Tromey <tromey@redhat.com>
5806 Joseph Myers <joseph@codesourcery.com>
5807
5808 * c-parser.c (struct c_generic_association): New.
5809 (c_generic_association_d): New typedef.
5810 (c_parser_generic_selection): New function.
5811 (c_parser_postfix_expression): Handle RID_GENERIC.
5812
26d40c3d
JM
58132013-07-13 Jason Merrill <jason@redhat.com>
5814
5815 PR c++/57793
5816 * c-decl.c (finish_struct): Check for too-large class.
5817
ecdbd01a 58182013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
5819
5820 PR c/57821
5821 * c-typeck.c (set_init_index): When folding, check for index overflow.
5822
1141ed3f
BI
58232013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5824
5825 * c-parser.c (c_parser_array_notation): Removed rejection of array
5826 notations in an array of function pointers.
5827
713b46fa
BI
58282013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5829
5830 * c-array-notation.c (make_triplet_val_inv): New function.
5831 (create_cmp_incr): Likewise.
5832 (create_array_refs): Likewise.
5833 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5834 Also modularized common parts between functions and called the function.
5835 (build_array_notation_expr): Likewise.
5836 (fix_conditional_array_notations_1): Likewise.
5837 (fix_array_notation_expr): Likewise.
5838 (fix_array_notation_call_expr): Likewise.
5839
92f20202
MP
58402013-06-18 Marek Polacek <polacek@redhat.com>
5841
5842 PR c/57630
5843 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5844
73a23b06
BI
58452013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
5846
5847 * c-array-notation.c (build_array_notation_expr): Reject array notation
5848 mismatch between LHS and RHS even inside a call_expr. Also, removed
5849 a couple while statements that were dead code.
5850
00b8517d
BI
58512013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
5852
5853 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5854 excessive precision expressions in function parameters. Also removed
5855 couple unwanted while statements.
5856
1509bdda
BI
58572013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5858
5859 * c-array-notation.c (expand_array_notation_exprs): Added
5860 ARRAY_NOTATION_REF case.
5861
d60f1706
BI
58622013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5863
5864 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5865 function to c-family/array-notation-common.c.
5866 (is_cilkplus_reduce_builtin): Likewise.
5867 (find_rank): Likewise.
5868 (extract_array_notation_exprs): Likewise.
5869 (replace_array_notations): Likewise.
5870 (find_inv_trees): Likewise.
5871 (replace_inv_trees): Likewise.
5872 (contains_array_notation_expr): Likewise.
5873 (find_correct_array_notation_type): Likewise.
5874 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5875 (struct inv_list): Moved this to c-family/array-notation-common.c.
5876 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5877
6d6efbb3
BI
58782013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
5879
5880 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5881 reduction functions outside the for-loop. Added a check if the fundecl
5882 is non-NULL. Finally, removed an unwanted if-statement, and made the
5883 body unconditional.
5884
25c22937
BI
58852013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5886
5887 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5888 condition of the if-statement matches the rank of else-block and then-
5889 block when array notations are used.
5890 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5891 expression after the entire function body is parsed.
5892 (c_parser_expr_no_commas): Delayed creating array notation expressions
5893 to the end of function parsing.
5894 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5895 whole if-statement instead of just the condition.
5896 (expand_array_notation_exprs): Added MODIFY_EXPR case.
5897
edd25645
BI
58982013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5899
5900 PR c/57474
5901 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5902 array to NULL_TREE if they are unused. Also added a check for the
5903 field to be NULL before its fields are used in future.
5904
065ce7f1
RO
59052013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5906
5907 PR bootstrap/57450
5908 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5909 (build_array_notation_expr): Likewise.
5910
36536d79
BI
59112013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5912
5913 * c-typeck.c (build_array_ref): Added a check to see if array's
5914 index is greater than one. If true, then emit an error.
5915 (build_function_call_vec): Exclude error reporting and checking
5916 for builtin array-notation functions.
5917 (convert_arguments): Likewise.
5918 (c_finish_return): Added a check for array notations as a return
5919 expression. If true, then emit an error.
5920 (c_finish_loop): Added a check for array notations in a loop
5921 condition. If true then emit an error.
5922 (lvalue_p): Added a ARRAY_NOTATION_REF case.
5923 (build_binary_op): Added a check for array notation expr inside
5924 op1 and op0. If present, we call another function to find correct
5925 type.
5926 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
5927 * c-parser.c (c_parser_compound_statement): Check if array
5928 notation code is used in tree, if so, then transform them into
5929 appropriate C code.
5930 (c_parser_expr_no_commas): Check if array notation is used in LHS
5931 or RHS, if so, then build array notation expression instead of
5932 regular modify.
5933 (c_parser_postfix_expression_after_primary): Added a check for
5934 colon(s) after square braces, if so then handle it like an array
5935 notation. Also, break up array notations in unary op if found.
5936 (c_parser_direct_declarator_inner): Added a check for array
5937 notation.
5938 (c_parser_compound_statement): Added a check for array notation in
5939 a stmt. If one is present, then expand array notation expr.
5940 (c_parser_if_statement): Likewise.
5941 (c_parser_switch_statement): Added a check for array notations in
5942 a switch statement's condition. If true, then output an error.
5943 (c_parser_while_statement): Similarly, but for a while.
5944 (c_parser_do_statement): Similarly, but for a do-while.
5945 (c_parser_for_statement): Similarly, but for a for-loop.
5946 (c_parser_unary_expression): Check if array notation is used in a
5947 pre-increment or pre-decrement expression. If true, then expand
5948 them.
5949 (c_parser_array_notation): New function.
5950 * c-array-notation.c: New file.
5951 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5952
cd192ccc
MS
59532013-05-23 Mike Stump <mikestump@comcast.net>
5954
5955 * c-typeck.c (convert_for_assignment): Handle references to memory
5956 spaces better.
5957
427b248d
JM
59582013-05-16 Jason Merrill <jason@redhat.com>
5959
5960 * Make-lang.in (cc1$(exeext)): Use link mutex.
5961
44d90fe1
PC
59622013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5963
5964 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5965 to simply use OPT_Wpointer_arith.
5966 (build_unary_op): Likewise.
5967
4e7d7b3d
JJ
59682013-04-03 Jakub Jelinek <jakub@redhat.com>
5969
5970 PR c/19449
5971 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
5972 argument. If set, or it temporarily for parsing of the first
5973 argument into force_folding_builtin_constant_p.
5974 (c_parser_postfix_expression): Adjust callers.
5975
839b422f
RB
59762013-03-21 Richard Biener <rguenther@suse.de>
5977
5978 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
5979 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
5980
2ee028f1
MP
59812013-02-12 Marek Polacek <polacek@redhat.com>
5982
5983 PR c/44938
5984 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
5985 origtypes to NULL.
5986
8824edff
JJ
59872013-01-24 Jakub Jelinek <jakub@redhat.com>
5988
5989 PR c/56078
5990 * c-typeck.c (set_nonincremental_init_from_string): If
5991 constructor_max_index is NULL, treat it as if tree_int_cst_lt
5992 returned false.
5993 (process_init_element): Likewise.
5994
eadd3d0d
JJ
59952012-12-20 Jakub Jelinek <jakub@redhat.com>
5996
5997 PR c++/55619
5998 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
5999 argument, don't call default_function_array_conversion
6000 nor c_fully_fold here.
6001 (c_parser_asm_statement): Adjust callers.
6002 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
6003 and outputs here, and call default_function_array_conversion
6004 on inputs that don't need to be addressable.
6005
f8a93a2e
JJ
60062012-12-18 Jakub Jelinek <jakub@redhat.com>
6007
6008 PR c/39464
6009 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
6010 warning require that both c_common_unsigned_type as well as
6011 c_common_signed_type is the same for both mvl and mvr types.
6012
9771b263
DN
60132012-11-16 Diego Novillo <dnovillo@google.com>
6014
6015 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
6016
6017 * c-common.c: Use new vec API in vec.h.
6018 * c-common.h: Likewise.
6019 * c-gimplify.c: Likewise.
6020 * c-pragma.c: Likewise.
6021 * c-pretty-print.c: Likewise.
6022 * c-pretty-print.h: Likewise.
6023 * c-semantics.c: Likewise.
6024 * c-decl.c: Likewise.
6025 * c-parser.c: Likewise.
6026 * c-tree.h: Likewise.
6027 * c-typeck.c: Likewise.
6028
880661a4
JW
60292012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
6030
6031 PR c++/54930
6032 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
6033
077d1abe
MLI
60342012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6035
6036 PR c/53066
6037 * c-decl.c (warn_if_shadowing): Do not warn if a variable
6038 shadows a function, unless the variable is a function or a
6039 pointer-to-function.
6040
3a785c97
JJ
60412012-10-12 Jakub Jelinek <jakub@redhat.com>
6042
6043 PR c/54381
6044 * c-parser.c (struct c_tree_loc_pair): Removed.
6045 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
6046 add location_t * and tree * arguments, fill in array of 3
6047 sizeof_arg trees and corresponding locs.
6048 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
6049 c_parser_expr_list callers.
6050 (c_parser_postfix_expression_after_primary): Likewise. Pass
6051 array of 3 sizeof_arg trees and locs (corresponding to first
6052 3 arguments) to sizeof_pointer_memaccess_warning.
6053
703c8606
LC
60542012-10-09 Lawrence Crowl <crowl@google.com>
6055
6056 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
6057 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
6058 hash table.
6059
5d9de0d0
PC
60602012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
6061
6062 PR c++/54194
6063 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
6064 call.
6065
a212e43f
MG
60662012-10-09 Marc Glisse <marc.glisse@inria.fr>
6067
6068 PR c++/54427
6069 * c-typeck.c: Include c-common.h.
6070 (enum stv_conv): Moved to c-common.h.
6071 (scalar_to_vector): Moved to c-common.c.
6072 (build_binary_op): Adapt to scalar_to_vector's new prototype.
6073 * Make-lang.in: c-typeck.c depends on c-common.h.
6074
3b78de56
AC
60752012-10-04 Arnaud Charlet <charlet@adacore.com>
6076
6077 * c-decl.c (c_write_global_declarations): Fix handling of
6078 -fdump-ada-spec*.
6079
78c60e3d
SS
60802012-09-30 Sharad Singhai <singhai@google.com>
6081
6082 * c-decl.c (c_write_global_declarations): Use a different method
6083 to determine if the dump has ben initialized.
6084
9f33203d
JM
60852012-09-14 Joseph Myers <joseph@codesourcery.com>
6086
6087 PR c/54552
6088 * c-typeck.c (c_cast_expr): When casting to a type requiring
6089 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
6090 c_fully_fold first.
6091
a27d595d
JM
60922012-09-14 Joseph Myers <joseph@codesourcery.com>
6093
6094 PR c/54103
6095 * c-typeck.c (build_unary_op): Pass original argument of
6096 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
6097 any C_MAYBE_CONST_EXPR, if it has integer operands.
6098 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
6099 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
6100 to c_objc_common_truthvalue_conversion, then remove any
6101 C_MAYBE_CONST_EXPR, if they have integer operands. Use
6102 c_objc_common_truthvalue_conversion not
6103 c_common_truthvalue_conversion.
6104 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
6105 call note_integer_operands for arguments with integer operands
6106 that are not integer constants.
6107
9feb29df
JJ
61082012-09-13 Jakub Jelinek <jakub@redhat.com>
6109
6110 PR c/54559
6111 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
6112 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
6113
d409320c
JJ
61142012-08-31 Jakub Jelinek <jakub@redhat.com>
6115
6116 PR c/54428
6117 * c-convert.c (convert): Don't call fold_convert_loc if
6118 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
6119 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
6120 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
6121
6265d07c
JJ
61222012-08-24 Jakub Jelinek <jakub@redhat.com>
6123
6124 PR c/54355
6125 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
6126 for nested and empty_ok arguments in the call to
6127 c_parser_declaration_or_fndef.
6128
1a4049e7
JJ
61292012-08-17 Jakub Jelinek <jakub@redhat.com>
6130
6131 * c-tree.h (c_last_sizeof_arg): Declare.
6132 * c-parser.c (struct c_tree_loc_pair): New type.
6133 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
6134 non-NULL.
6135 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
6136 (c_parser_postfix_expression_after_primary): Likewise. Call
6137 sizeof_pointer_memaccess_warning if needed.
6138 (sizeof_ptr_memacc_comptypes): New function.
6139 * c-typeck.c (c_last_sizeof_arg): New global variable.
6140 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
6141
0229aee9
UB
61422012-07-24 Uros Bizjak <ubizjak@gmail.com>
6143
6144 * c-lang.h (lang_decl): Add variable_size GTY option.
6145
7ee2468b
SB
61462012-07-16 Steven Bosscher <steven@gcc.gnu.org>
6147
6148 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
6149 * Make-lang.in: Fix dependencies.
6150
d4a10d0a
SB
61512012-06-29 Steven Bosscher <steven@gcc.gnu.org>
6152
6153 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
6154 and add language Makefile hooks.
6155 * config-lang.in: New file.
6156 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
6157 add the required "normal" config-lang.in rules.
6158 * c-lang.h: Moved from gcc/ to here.
6159 * c-tree.h: Likewise.
6160 * c-objc-common.c: Likewise.
6161 * c-objc-common.h: Likewise.
6162 * c-typeck.c: Likewise.
6163 * c-convert.c: Likewise.
6164 * c-lang.c: Likewise.
6165 * c-aux-info.c: Likewise.
6166 * c-errors.c: Likewise.
6167 * gccspec.c: Likewise.
6168 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
6169 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
6170\f
a5544970 6171Copyright (C) 2012-2019 Free Software Foundation, Inc.
d4a10d0a
SB
6172
6173Copying and distribution of this file, with or without modification,
6174are permitted in any medium without royalty provided the copyright
6175notice and this notice are preserved.