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