]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
alpha.c (direct_return): Move down after struct machine_function definition...
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
e03436e7
TS
12019-05-17 Thomas Schwinge <thomas@codesourcery.com>
2
b48f44bf
TS
3 PR c/89433
4 * c-parser.c (c_finish_oacc_routine): Rework checking if already
5 marked with an OpenACC 'routine' directive.
6
5bf04509
TS
7 PR c/89433
8 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
9 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
10
e03436e7
TS
11 PR c/89433
12 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
13 clauses from "omp declare target" attribute.
14
a9c697b8
MS
152019-05-16 Martin Sebor <msebor@redhat.com>
16
17 * c-decl.c (start_decl): Quote keywords, operators, and
18 types in diagnostics.
19 (finish_decl): Same.
20 * c-parser.c (c_parser_asm_statement): Same.
21 (c_parser_conditional_expression): Same.
22 (c_parser_transaction_cancel): Same.
23 * c-typeck.c (c_common_type): Same.
24 (build_conditional_expr): Same.
25 (digest_init): Same.
26 (process_init_element): Same.
27 (build_binary_op): Same.
28
c4499192
RB
292019-05-17 Richard Biener <rguenther@suse.de>
30
31 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
32 (c_parser_gimple_unary_expression): Likewise.
33 (c_parser_gimple_parentized_ternary_expression): New function.
34
adfe6e4b
RB
352019-05-16 Richard Biener <rguenther@suse.de>
36
37 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
38 (c_parser_gimple_unary_expression): Likewise.
39
186dabf2
RB
402019-05-15 Richard Biener <rguenther@suse.de>
41
42 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
43 __BIT_FIELD_REF.
44
1158c5b4
RB
452019-05-14 Richard Biener <rguenther@suse.de>
46
47 * gimple-parser.c (c_parser_gimple_statement): Remove
48 questionable auto-promotion to VIEW_CONVERT_EXPR.
49 (c_parser_gimple_typespec): Split out from __MEM parsing.
50 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
51 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
52 as __VIEW_CONVERT with -gimple.
53
fd4485aa
ML
542019-05-09 Martin Liska <mliska@suse.cz>
55
56 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
57 __MAX.
58 (c_parser_gimple_unary_expression): Parse also binary expression
59 __MIN and __MAX.
60 (c_parser_gimple_parentized_binary_expression): New function.
61
d276406a
ML
622019-05-09 Martin Liska <mliska@suse.cz>
63
64 * gimple-parser.c (struct gimple_parser): Add probability.
65 for gimple_parser_edge.
66 (gimple_parser::push_edge): Add new argument probability.
67 (c_parser_gimple_parse_bb_spec): Parse also probability
68 if present.
69 (c_parser_parse_gimple_body): Set edge probability.
70 (c_parser_gimple_compound_statement): Consume token
71 before calling c_parser_gimple_goto_stmt.
72 Parse BB counts.
73 (c_parser_gimple_statement): Pass new argument.
74 (c_parser_gimple_goto_stmt): Likewise.
75 (c_parser_gimple_if_stmt): Likewise.
76 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
77 * c-parser.c (c_parser_declaration_or_fndef): Pass
78 hot_bb_threshold argument.
79 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
80 field.
81 (c_parser_gimple_parse_bb_spec_edge_probability): New.
82
f179b64e
JJ
832019-04-26 Jakub Jelinek <jakub@redhat.com>
84
85 PR debug/90197
86 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
87 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
88 (c_parser_do_statement): Likewise.
89 (c_parser_for_statement): Likewise. Formatting fixes.
90 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
91 emit DEBUG_BEGIN_STMTs if needed.
92
e7178413
JJ
932019-04-19 Jakub Jelinek <jakub@redhat.com>
94
c280b7ee
JJ
95 PR c/89888
96 * c-typeck.c (struct c_switch): Remove outside_range_p member.
97 (c_start_case): Don't clear it.
98 (do_case): Adjust c_add_case_label caller.
99 (c_finish_case): Adjust c_do_switch_warnings caller.
100
e7178413
JJ
101 PR c++/90108
102 * c-decl.c (merge_decls): If remove is main variant and
103 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
104 variant that has newdecl as TYPE_NAME if any.
105
60a2c645
JJ
1062019-04-12 Jakub Jelinek <jakub@redhat.com>
107
108 PR c/89933
109 * c-decl.c (merge_decls): When newdecl's type is its main variant,
110 don't try to remove it from the variant list, but instead assert
111 it has no variants.
112
2a82beaa
RB
1132019-04-01 Richard Biener <rguenther@suse.de>
114
115 PR c/71598
116 * c-tree.h (c_get_alias_set): Declare.
117 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
118 * c-objc-common.c (c_get_alias_set): Treat enumeral types
119 as the underlying integer type.
120
bec1da64
MS
1212019-03-19 Martin Sebor <msebor@redhat.com>
122
123 PR tree-optimization/89688
124 * c-decl.c (finish_decl): Call braced_lists_to_string for more
125 kinds of initializers.
126
855cd9b1
JJ
1272019-03-19 Jakub Jelinek <jakub@redhat.com>
128
129 PR c/89734
130 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
131 return type even if quals_used is 0. Formatting fixes.
132
baa09dc5
RB
1332019-03-14 Richard Biener <rguenther@suse.de>
134
135 * c-tree.h (enum c_declspec_il): New.
136 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
137 enum bitfield.
138 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
139 Pass start pass and declspec_il to c_parser_parse_gimple_body.
140 (c_parser_declspecs): Adjust.
141 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
142 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
143 and bitmap.h.
144 (struct gimple_parser): New.
145 (gimple_parser::push_edge): New method.
146 (c_parser_gimple_parse_bb_spec): New helper.
147 (c_parser_parse_gimple_body): Get start pass and IL specification.
148 Initialize SSA and CFG.
149 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
150 Build a gimple_parser parsing state and pass it along.
151 (c_parser_gimple_statement): Change intermittend __PHI internal
152 function argument for the edge.
153 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
154 (c_parser_gimple_goto_stmt): Record edges to build.
155 (c_parser_gimple_if_stmt): Likewise.
156 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
157 (c_parser_gimple_or_rtl_pass_list): Likewise.
158
a3f9f006
ML
1592019-03-11 Martin Liska <mliska@suse.cz>
160
161 * c-decl.c (check_for_loop_decls): Wrap an option name
162 in a string format message and fix GNU coding style.
163 * c-parser.c (c_parser_declspecs): Likewise.
164
1db01ff9
JJ
1652019-03-08 Jakub Jelinek <jakub@redhat.com>
166
167 PR tree-optimization/89550
168 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
169 returned true.
170 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
171 or warning returned true.
172
66dcb747
JJ
1732019-02-28 Jakub Jelinek <jakub@redhat.com>
174
175 PR c/89525
176 * c-typeck.c (convert_arguments): Call inform_declaration only if
177 the previous warning_at call returned true.
178
2263c9f2
TS
1792019-02-22 Thomas Schwinge <thomas@codesourcery.com>
180
181 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
182 parameter. Adjust all users.
183 (c_parser_oacc_simple_clause): Replace parser with loc formal
184 parameter. Adjust all users.
185
19695f4d
CLT
1862019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
187
188 PR c/87924
189 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
190 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
191
5f88ba10
JJ
1922019-02-15 Jakub Jelinek <jakub@redhat.com>
193
194 PR c/89340
195 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
196 before c_decl_attributes rather than after it.
197
cfc30fd1
JJ
1982019-02-06 Jakub Jelinek <jakub@redhat.com>
199
200 PR c/89211
201 * c-parser.c (c_parser_declaration_or_fndef): Don't update
202 DECL_ARGUMENTS of d if it has been defined already. Use a single if
203 instead of 3 nested ifs.
204
fbe83e6b
JM
2052019-02-06 Joseph Myers <joseph@codesourcery.com>
206
207 PR c/88584
208 * c-decl.c (finish_decl): Do not complete array types for arrays
209 with external linkage not at file scope.
210
f461f938
RB
2112019-02-05 Richard Biener <rguenther@suse.de>
212
213 PR c/88606
214 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
215 all type variants when not supported.
216
fe509359
JJ
2172019-01-30 Jakub Jelinek <jakub@redhat.com>
218
219 PR c/89061
220 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
221 * c-decl.c (decl_jump_unsafe): Return false for
222 C_DECL_COMPOUND_LITERAL_P decls.
223 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
224
6a335b96
JJ
2252019-01-29 Jakub Jelinek <jakub@redhat.com>
226
f4b7e754
JJ
227 PR c/89045
228 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
229 scope.
230
6a335b96
JJ
231 PR c/86125
232 * c-decl.c (last_fileptr_type): Remove.
233 (last_structptr_types): New variable.
234 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
235 {old,new}rettype instead of the types themselves. Assert
236 last_structptr_types array has the same number of elements
237 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
238 argument oldtype and newtype. Instead of handling
239 just fileptr_type_node specially, handle all builtin_structptr_types
240 pointer nodes. Formatting fix.
241
d8b5a1a0
MS
2422019-01-24 Martin Sebor <msebor@redhat.com>
243
244 PR c/86125
245 PR c/88886
246 PR middle-end/86308
247 * c-decl.c (match_builtin_function_types): Add arguments.
248 (diagnose_mismatched_decls): Diagnose mismatched declarations
249 of built-ins more strictly.
250
e21c4491
JJ
2512019-01-24 Jakub Jelinek <jakub@redhat.com>
252
253 PR c++/88976
254 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
255 on #pragma omp cancel with different modifiers.
256
420183d9
L
2572019-01-18 H.J. Lu <hongjiu.lu@intel.com>
258
259 PR c/51628
260 PR c/88664
261 * c-typeck.c (convert_for_assignment): Upate the
262 warn_for_address_or_pointer_of_packed_member call.
263
17ad43dd
TH
2642019-01-16 Tom Honermann <tom@honermann.net>
265 Jason Merrill <jason@redhat.com>
266
267 * c-typeck.c (digest_init): Revised the error message produced for
268 ill-formed cases of array initialization with a string literal.
269 (error_init): Make variadic.
270
5f07d78a
JJ
2712019-01-12 Jakub Jelinek <jakub@redhat.com>
272
273 * c-typeck.c (convert_for_assignment): Fix a comment typo.
274
c4581bbf
JJ
2752019-01-07 Jakub Jelinek <jakub@redhat.com>
276
277 PR c/88701
278 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
279 if current_function_decl is non-NULL.
280
65c5b1eb
JM
2812019-01-07 Joseph Myers <joseph@codesourcery.com>
282
283 PR c/88720
284 PR c/88726
285 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
286 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
287 functions declared but never defined only for external scope, not
288 for other scopes.
289
d8fcab68
JJ
2902019-01-07 Jakub Jelinek <jakub@redhat.com>
291
292 PR c++/85052
293 * c-parser.c (c_parser_postfix_expression): Parse
294 __builtin_convertvector.
295
a5544970
JJ
2962019-01-01 Jakub Jelinek <jakub@redhat.com>
297
298 Update copyright years.
299
da77eace
L
3002018-12-20 H.J. Lu <hongjiu.lu@intel.com>
301
302 PR c/51628
303 * c-typeck.c (convert_for_assignment): Call
304 warn_for_address_or_pointer_of_packed_member.
305
1edf8866
SB
3062018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
307
308 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
309 a more specific error message (instead of just falling through).
310
db4fd626
SB
3112018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
312
313 * c-parser.c (c_parser_asm_statement): Keep track of the location each
314 asm qualifier is first seen; use that to give nicer "duplicate asm
315 qualifier" messages. Delete 'quals" variable, instead pass the
316 "is_volatile_ flag to build_asm_stmt directly.
317 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
318 * c-typeck.c (build_asm_stmt): Ditto; adjust.
319
9c9cfcbb
SB
3202018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
321
322 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
323 "done" boolean variable.
324
a14feb3c
DM
3252018-12-19 David Malcolm <dmalcolm@redhat.com>
326
327 PR c++/87504
328 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
329 Move from here to gcc-rich-location.h and gcc-rich-location.c.
330 (build_binary_op): Use struct op_location_t and
331 class binary_op_rich_location.
332
6d939173
JJ
3332018-12-11 Jakub Jelinek <jakub@redhat.com>
334
335 PR sanitizer/88426
336 * c-convert.c (convert): Call c_fully_fold before calling
337 ubsan_instrument_float_cast.
338
b7055028
SB
3392018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
340
341 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
342 setting "quals".
343
5b76e75f
SB
3442018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
345
346 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
347 after asm. Pass a flag for it to build_asm_expr.
348 * c-tree.h (build_asm_expr): Update declaration.
349 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
350 set ASM_INLINE_P.
351
30bd42b9
SB
3522018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
353
354 PR inline-asm/55681
355 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
356 combination of volatile and goto, in any order, without repetitions.
357
9df6c0e4
JB
3582018-12-04 James Norris <jnorris@codesourcery.com>
359 Cesar Philippidis <cesar@codesourcery.com>
360 Julian Brown <julian@codesourcery.com>
361
362 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
363 code.
364
f44697b7
RB
3652018-11-30 Richard Biener <rguenther@suse.de>
366
367 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
368 _Literal (type) { ... } as empty aggregate or vector constructor.
369
550dfbdc
MS
3702018-11-29 Martin Sebor <msebor@redhat.com>
371
372 PR c/88091
373 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
374 (convert_arguments): Add comments. Pass additional argument to
375 the function above.
376
673670da
MS
3772018-11-29 Martin Sebor <msebor@redhat.com>
378
379 PR c/88172
380 PR testsuite/88208
381 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
382
db1d09b0
MS
3832018-11-23 Martin Sebor <msebor@redhat.com>
384
385 PR testsuite/88098
386 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
387 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
388
98f08eb8
MS
3892018-11-20 Martin Sebor <msebor@redhat.com>
390
391 * c-parser.c (c_parser_has_attribute_expression): New function.
392 (c_parser_attribute): New function.
393 (c_parser_attributes): Move code into c_parser_attribute.
394 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
395
cd5da983
MS
3962018-11-15 Martin Sebor <msebor@redhat.com>
397
398 PR c/83656
399 * c-decl.c (header_for_builtin_fn): Declare.
400 (diagnose_mismatched_decls): Diagnose declarations of built-in
401 functions without a prototype.
402 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
403 (convert_argument): Same.
404 (convert_arguments): Factor code out into convert_argument.
405 Detect mismatches between built-in formal arguments in calls
406 to built-in without prototype.
407 (build_conditional_expr): Same.
408 (type_or_builtin_type): New function.
409 (convert_for_assignment): Add argument. Conditionally issue
410 warnings instead of errors for mismatches.
411
620e594b
DM
4122018-11-13 David Malcolm <dmalcolm@redhat.com>
413
414 * c-decl.c: Replace "source_location" with "location_t".
415 * c-tree.h: Likewise.
416 * c-typeck.c: Likewise.
417 * gimple-parser.c: Likewise.
418
3179ebae
JJ
4192018-11-09 Jakub Jelinek <jakub@redhat.com>
420
81a227c6
JJ
421 * c-parser.c (c_parser_omp_clause_final): Use
422 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
423 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
424 parsing instead of c_parser_paren_condition.
425 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
426 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
427 c_fully_fold instead of c_parser_condition.
428 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
429 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
430 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
431 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
432 c_parser_expr_no_commas instead of c_parser_expression.
433
98c91c56
JJ
434 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
435 reduction clause with inscan modifier.
436
3179ebae
JJ
437 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
438 clauses other than atomic_default_mem_order.
439
28567c40
JJ
4402018-11-08 Jakub Jelinek <jakub@redhat.com>
441
442 * c-parser.c: Include memmode.h.
443 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
444 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
445 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
446 task_reduction clauses.
447 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
448 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
449 section, or lvalue assignment expression.
450 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
451 (c_parser_omp_clause_lastprivate): Parse optional
452 conditional: modifier.
453 (c_parser_omp_clause_hint): Require constant integer expression rather
454 than just integer expression.
455 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
456 clause.
457 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
458 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
459 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
460 functions.
461 (c_parser_omp_clause_depend): Parse iterator modifier and handle
462 iterators. Parse mutexinoutset and depobj kinds.
463 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
464 callers.
465 (c_parser_omp_all_clauses): Likewise. Handle
466 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
467 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
468 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
469 default memory order from requires directive if any. Adjust
470 c_finish_omp_atomic caller.
471 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
472 (c_parser_omp_flush): Parse flush with memory-order-clause.
473 (c_parser_omp_for_loop): Allow NE_EXPR even in
474 OpenMP loops, adjust c_finish_omp_for caller.
475 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
476 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
477 Allow to be called while parsing combined parallel master.
478 Parse combined master taskloop{, simd}.
479 (c_parser_omp_parallel): Parse combined
480 parallel master{, taskloop{, simd}} constructs.
481 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
482 (OMP_TASKGROUP_CLAUSE_MASK): Define.
483 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
484 (OMP_TASKWAIT_CLAUSE_MASK): Define.
485 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
486 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
487 around teams body. Use SET_EXPR_LOCATION.
488 (c_parser_omp_target_data): Allow target data
489 with only use_device_ptr clauses.
490 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
491 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
492 (c_parser_omp_requires): New function.
493 (c_finish_taskloop_clauses): New function.
494 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
495 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
496 declaration. Disallow in_reduction clause when combined with parallel
497 master.
498 (c_parser_omp_construct): Adjust c_parser_omp_master and
499 c_parser_omp_taskgroup callers.
500 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
501 other than cancel.
502 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
503 like OMP_CLAUSE_REDUCTION.
504 (handle_omp_array_sections): Likewise. Call save_expr on array
505 reductions before calling build_index_type. Handle depend clauses
506 with iterators.
507 (struct c_find_omp_var_s): New type.
508 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
509 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
510 with static, runtime or auto schedule kinds. Call save_expr for whole
511 array reduction sizes. Diagnose reductions with zero sized elements
512 or variable length structures. Diagnose nogroup clause used with
513 reduction clause(s). Handle depend clause with
514 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
515 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
516 some different type for other kinds. Use build_unary_op with
517 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
518 Handle depend clauses with iterators. Remove no longer needed special
519 case that predetermined const qualified vars may be specified in
520 firstprivate clause. Complain if const qualified vars are mentioned
521 in data-sharing clauses other than firstprivate or shared. Use
522 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
523 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
524 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
525 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
526
7e2de6df
DM
5272018-10-29 David Malcolm <dmalcolm@redhat.com>
528
529 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
530 logic for change to name_hint::operator bool.
531 (undeclared_variable): Likewise.
532 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
533 (c_parser_parameter_declaration): Likewise.
534
9f936c86
JM
5352018-10-17 Joseph Myers <joseph@codesourcery.com>
536
537 * c-errors.c (pedwarn_c11): New function.
538 * c-parser.c (disable_extension_diagnostics): Save
539 warn_c11_c2x_compat and set it to 0.
540 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
541 (c_parser_static_assert_declaration_no_semi): Handle
542 _Static_assert without string constant.
543 * c-tree.h (pedwarn_c11): New prototype.
544
033eb567
DM
5452018-10-17 David Malcolm <dmalcolm@redhat.com>
546
547 * Make-lang.in (selftest-c): New.
548 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
549 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
550 from gcc/Makefile.in.
551
0edf3afe
RB
5522018-10-02 Richard Biener <rguenther@suse.de>
553
554 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
555
8313a764
JM
5562018-09-26 Joseph Myers <joseph@codesourcery.com>
557
558 PR c/87390
559 * c-typeck.c (build_binary_op): Use excess precision for
560 comparisons of integers and floating-point for C11 and later.
561
ce6f0888
MJ
5622018-09-26 Martin Jambor <mjambor@suse.cz>
563
564 PR c/87347
565 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
566 comment.
567
9c4a4b3c
DM
5682018-09-17 David Malcolm <dmalcolm@redhat.com>
569
570 * c-objc-common.c (range_label_for_type_mismatch::get_text):
571 Update for new param.
572 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
573 Likewise.
574
80c6d1f4
MJ
5752018-09-17 Martin Jambor <mjambor@suse.cz>
576
577 PR c/63886
578 * c-parser.c: (warn_for_abs): New function.
579 (c_parser_postfix_expression_after_primary): Call it.
580
4a426e36
BE
5812018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
582
583 * c-typeck.c (digest_init): Shorten overlength strings.
584
6d900107
BE
5852018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
586
587 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
588
b5764229
BE
5892018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
590
591 * c-decl.c (finish_decl): Call braced_list_to_string here ...
592 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
593
22eea6b2
AM
5942018-08-30 Alexander Monakov <amonakov@ispras.ru>
595
596 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
597 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
598
85204e23
DM
5992018-08-27 David Malcolm <dmalcolm@redhat.com>
600
601 PR 87091
602 * c-decl.c (implicitly_declare): Update call to
603 maybe_add_include_fixit to suggest overriding the location, as it
604 is for a note.
605 * c-objc-common.c (c_tree_printer): Update for conversion of
606 show_caret_p to a tri-state.
607
3d78e008
ML
6082018-08-27 Martin Liska <mliska@suse.cz>
609
610 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
611 fndecl_built_in_p and remove check for FUNCTION_DECL if
612 possible.
3d78e008
ML
613 (diagnose_mismatched_decls): Likewise.
614 (merge_decls): Likewise.
615 (warn_if_shadowing): Likewise.
616 (pushdecl): Likewise.
617 (implicitly_declare): Likewise.
618 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
619 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
620 * c-typeck.c (build_function_call_vec): Likewise.
621 (convert_arguments): Likewise.
622
097f82ec
DM
6232018-08-20 David Malcolm <dmalcolm@redhat.com>
624
625 PR other/84889
626 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
627 (diagnose_mismatched_decls): Likewise, in various places.
628 (warn_if_shadowing): Likewise.
629 (implicit_decl_warning): Likewise.
630 (implicitly_declare): Likewise.
631 (undeclared_variable): Likewise.
632 (declare_label): Likewise.
633 (grokdeclarator): Likewise.
634 (start_function): Likewise.
635 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
636 (c_parser_parameter_declaration): Likewise.
637 (c_parser_binary_expression): Likewise.
638 * c-typeck.c (c_expr_sizeof_expr): Likewise.
639 (parser_build_binary_op): Likewise.
640 (build_unary_op): Likewise.
641 (error_init): Likewise.
642 (pedwarn_init): Likewise.
643 (warning_init): Likewise.
644 (convert_for_assignment): Likewise.
645
96e6ae57
DM
6462018-08-15 David Malcolm <dmalcolm@redhat.com>
647
648 * c-objc-common.c: Include "gcc-rich-location.h".
649 (c_tree_printer): Move implemenation of '%T' to...
650 (print_type): ...this new function.
651 (range_label_for_type_mismatch::get_text): New function.
652 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
653 range for the various ic_argpass cases.
654 (class maybe_range_label_for_tree_type_mismatch): New class.
655 (build_binary_op): Use it when calling binary_op_error.
656
0cd020ae
PK
6572018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
658
659 * c-decl.c (start_decl): Do not warn if variables is named as main
660 and is a local variable.
661
72733314
IS
6622018-08-15 Iain Sandoe <iain@sandoe.co.uk>
663
664 PR c/19315
665 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
666 objects of unknown size.
667
23aa9f7c
MS
6682018-08-13 Martin Sebor <msebor@redhat.com>
669
670 PR tree-optimization/71625
671 * c-parser.c (c_parser_declaration_or_fndef): Call
672 braced_list_to_string.
673
e5e7e50d
BH
6742018-08-03 Bogdan Harjoc <harjoc@gmail.com>
675
676 PR c/86690
677 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
678 errors.
679
8a45b051
MS
6802018-08-01 Martin Sebor <msebor@redhat.com>
681
682 PR tree-optimization/86650
683 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
684 and TREE_BLOCK (t) from within percent_K_format to this callsite.
685
5922dcb5
JJ
6862018-08-01 Jakub Jelinek <jakub@redhat.com>
687
688 PR c/85704
689 * c-typeck.c (init_field_decl_cmp): New function.
690 (output_pending_init_elements): Use it for field comparisons
691 instead of pure bit_position comparisons.
692
9b452033
JJ
6932018-07-12 Jakub Jelinek <jakub@redhat.com>
694
695 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
696 type here, instead add "omp declare target implicit" attribute.
697 (finish_decl): Diagnose vars without mappable type here.
698
829c6349
CLT
6992018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
700 Thomas Schwinge <thomas@codesourcery.com>
701 Cesar Philippidis <cesar@codesourcery.com>
702
703 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
704 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
705 to their non-present_or_* counterparts. Make 'self' an alias to
706 PRAGMA_OACC_CLAUSE_HOST.
707 (c_parser_oacc_data_clause): Update GOMP mappings for
708 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
709 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
710 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
711 Remove support for present_or_* clauses.
712 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
713 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
714 (OACC_DECLARE_CLAUSE_MASK): Likewise.
715 (OACC_DATA_CLAUSE_MASK): Likewise.
716 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
717 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
718 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
719 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
720 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
721
e197e64e
KV
7222018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
723
724 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
725 * gimple-parser.c (c_parser_gimple_statement): Likewise.
726 (c_parser_gimple_unary_expression): Likewise.
727
487f2f61
JJ
7282018-06-15 Jakub Jelinek <jakub@redhat.com>
729
730 PR c/86093
731 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
732 before doing POINTER_DIFF_EXPR.
733
e4d44a37
MP
7342018-06-07 Marek Polacek <polacek@redhat.com>
735
736 PR c/85318
737 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
738 for loop initial declarations.
739
b67b9225
DP
7402018-05-30 David Pagan <dave.pagan@oracle.com>
741
742 PR c/55976
743 * c-decl.c (grokdeclarator): Update check for return type warnings.
744 (start_function): Likewise.
745 (finish_function): Likewise.
746 * c-typeck.c (c_finish_return): Update check for return type warnings.
747 Pass OPT_Wreturn_type to pedwarn when appropriate.
748
c566cc9f
RS
7492018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
750
751 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
752 __FMA_EXPR handlng.
753
e4f81565
RS
7542018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
755
756 * gimple-parser.c: Include internal-fn.h.
757 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
758 (c_parser_gimple_call_internal): New function.
759 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
760 Fix typos in comment.
761
79e7b1fe
JJ
7622018-05-10 Jakub Jelinek <jakub@redhat.com>
763
764 PR c++/85662
765 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
766 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
767 fold_convert_loc.
768 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
769 fold_offsetof_1, pass argtype as TYPE to it and drop the
770 fold_convert_loc.
771
f7584c81
DP
7722018-05-02 David Pagan <dave.pagan@oracle.com>
773
774 PR c/30552
775 * c-decl.c (old_style_parameter_scope): New function.
776 * c-parser.c (c_parser_postfix_expression): Check for statement
777 expressions in old-style function parameter list declarations.
778 * c-parser.h (old_style_parameter_scope): New extern declaration.
779
b33a0cb3
JJ
7802018-04-25 Jakub Jelinek <jakub@redhat.com>
781
782 PR sanitizer/84307
783 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
784 it is not TREE_STATIC.
785 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
786 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
787 its COMPOUND_LITERAL_EXPR_DECL.
788
c5c5822a
JM
7892018-03-21 Joseph Myers <joseph@codesourcery.com>
790
791 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
792 where all functions return the same _FloatN or _FloatNx type,
793 treat integer types as _Float64 instead of double.
794
aa1c9429
JJ
7952018-03-21 Jakub Jelinek <jakub@redhat.com>
796
797 PR c/84999
798 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
799 building vector comparison, diagnose it and return error_mark_node.
800
9bb45a95
JJ
8012018-03-15 Jakub Jelinek <jakub@redhat.com>
802
803 PR c/84853
804 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
805 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
806 INTEGER_TYPE element type.
807
ada6bad9
DP
8082018-03-13 David Pagan <dave.pagan@oracle.com>
809
810 PR c/46921
811 * c-typeck.c (output_init_element): Ensure field initializer
812 expression is always evaluated if there are side effects.
813
849bbdb9
JJ
8142018-03-06 Jakub Jelinek <jakub@redhat.com>
815
816 PR c/84721
817 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
818 !building_stmt_list_p ().
819
d74641bd
RS
8202018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
821
822 PR c/84305
823 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
824 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
825 and include the BIND_EXPR in the list of things that need to be
826 pre-evaluated.
827
0444aa9c
NS
8282018-02-09 Nathan Sidwell <nathan@acm.org>
829
830 PR c/84293
831 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
832 to strict_aliasing_warning.
833
7c30b12a
PC
8342018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
835
836 * c-typeck.c (really_start_incremental_init, push_init_level,
837 set_nonincremental_init, output_init_element, process_init_element):
838 Use DECL_UNNAMED_BIT_FIELD.
839
2be4dfcb
MP
8402018-01-31 Marek Polacek <polacek@redhat.com>
841
842 PR c/81779
843 * c-parser.c (c_parser_compound_statement_nostart): Call
844 expansion_point_location_if_in_system_header.
845
bb9869d5
DM
8462018-01-17 David Malcolm <dmalcolm@redhat.com>
847
848 PR c++/83814
849 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
850 the C part.
851
b4923738
JJ
8522018-01-13 Jakub Jelinek <jakub@redhat.com>
853
854 PR c/83801
855 * c-tree.h (decl_constant_value_1): Add a bool argument.
856 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
857 returning a CONSTRUCTOR if it is true. Use error_operand_p.
858 (decl_constant_value): Adjust caller.
859 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
860 decl_constant_value_1 as IN_INIT. Otherwise, punt if
861 decl_constant_value returns initializer that has BLKmode or
862 array type.
863 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
864
928686b1
RS
8652018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
866 Alan Hayward <alan.hayward@arm.com>
867 David Sherwood <david.sherwood@arm.com>
868
869 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
870 TYPE_VECTOR_SUBPARTS.
871
85ec4feb
JJ
8722018-01-03 Jakub Jelinek <jakub@redhat.com>
873
874 Update copyright years.
875
913884f7
JJ
8762018-01-01 Jakub Jelinek <jakub@redhat.com>
877
878 PR c/83595
879 * c-parser.c (c_parser_braced_init, c_parser_initelt,
880 c_parser_conditional_expression, c_parser_cast_expression,
881 c_parser_sizeof_expression, c_parser_alignof_expression,
882 c_parser_postfix_expression, c_parser_omp_declare_reduction,
883 c_parser_transaction_expression): Use set_error () method instead
884 of setting value member to error_mark_node.
885
c6cfa2bf
MM
8862017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
887
888 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
889 and _Float<N>X built-in functions.
890
11d29d63
JJ
8912017-12-22 Jakub Jelinek <jakub@redhat.com>
892
14ec014e
JJ
893 PR debug/83550
894 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
895 TYPE_STUB_DECL and call rest_of_type_compilation before processing
896 incomplete vars rather than after it.
897
11d29d63
JJ
898 PR debug/83547
899 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
900 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
901 and consider empty ones if there are no other stmts. For
902 -Wunused-value walk all statements before the one only followed by
903 DEBUG_BEGIN_STMTs.
904
170a8bd6 9052017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 906 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
907
908 * c-parser.c (c_parser_while_statement): Add unroll parameter and
909 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
910 (c_parser_do_statement): Likewise.
911 (c_parser_for_statement): Likewise.
912 (c_parser_statement_after_labels): Adjust calls to above.
913 (c_parse_pragma_ivdep): New static function.
914 (c_parser_pragma_unroll): Likewise.
915 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
916 <PRAGMA_UNROLL>: New case.
917
01512446
JJ
9182017-12-19 Jakub Jelinek <jakub@redhat.com>
919
920 * c-typeck.c (comptypes_internal, function_types_compatible_p,
921 perform_integral_promotions, digest_init): Replace Yoda conditions
922 with typical order conditions.
923 * c-decl.c (check_bitfield_type_and_width): Likewise.
924
c65e18d3
BE
9252017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
926
927 * c-typeck.c (c_safe_arg_type_equiv_p,
928 c_safe_function_type_cast_p): New function.
929 (build_c_cast): Implement -Wcast-function-type.
930
b7280579
RB
9312017-12-14 Richard Biener <rguenther@suse.de>
932
933 PR c/83415
934 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
935 like REALPART_EXPR for the behavior of whether its operand
936 is an lvalue.
937
49e6a6c0
MP
9382017-12-12 Marek Polacek <polacek@redhat.com>
939
940 PR c/82679
941 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
942
96a95ac1
AO
9432017-12-12 Alexandre Oliva <aoliva@redhat.com>
944
945 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
946 * c-parser.c (add_debug_begin_stmt): New.
947 (c_parser_declaration_or_fndef): Call it.
948 (c_parser_compound_statement_nostart): Likewise.
949 (c_parser_statement_after_labels): Likewise.
950 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
951
4b2b493f
JM
9522017-12-07 Joseph Myers <joseph@codesourcery.com>
953
954 * c-decl.c (build_compound_literal): Add parameter alignas_align
955 and set alignment of decl if nonzero.
956 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
957 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
958 qualifier.
959 (c_parser_struct_declaration): Update syntax comment.
960 (c_parser_type_name): Add alignas_ok argument and pass it to
961 c_parser_declspecs.
962 (c_parser_cast_expression): Pass true to c_parser_type_name and
963 give error if a cast used an _Alignas specifier.
964 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
965 give error if sizeof (type-name) used an _Alignas specifier.
966 (c_parser_alignof_expression): Pass true to c_parser_type_name and
967 give error if _Alignof (type-name) used an _Alignas specifier.
968 (c_parser_postfix_expression_after_paren_type): Check specified
969 alignment for a compound literal and pass it to
970 build_compound_literal.
971 * c-parser.h (c_parser_type_name): Update prototype.
972 * c-tree.h (build_compound_literal): Update prototype.
973
5d9ae53d
MS
9742017-12-07 Martin Sebor <msebor@redhat.com>
975
976 PR c/81544
977 * c-decl.c (c_decl_attributes): Look up existing declaration and
978 pass it to decl_attributes.
979
c79144f8
DM
9802017-12-06 David Malcolm <dmalcolm@redhat.com>
981
982 PR c/83236
983 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
984 reserved for use by the implementation.
985
613bc14f
DM
9862017-12-06 David Malcolm <dmalcolm@redhat.com>
987
988 * c-decl.c: Include "c-family/c-spellcheck.h".
989
05abad4c
ML
9902017-12-05 Martin Liska <mliska@suse.cz>
991 Jakub Jelinek <jakub@redhat.com>
992
993 * c-typeck.c (pointer_diff): Add new argument and instrument
994 pointer subtraction.
995 (build_binary_op): Similar for pointer comparison.
996
cc6534d4
JJ
9972017-12-01 Jakub Jelinek <jakub@redhat.com>
998
65791f42
JJ
999 PR c/79153
1000 * c-parser.c: Include tree-iterator.h.
1001 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
1002 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
1003 on it.
1004
cc6534d4
JJ
1005 PR c/83222
1006 * c-tree.h (decl_constant_value_1): Declare.
1007 * c-typeck.c (decl_constant_value_1): New function.
1008 (decl_constant_value): Use it.
1009 * c-fold.c (c_fully_fold_internal): If in_init, use
1010 decl_constant_value_1 instead of decl_constant_value.
1011
5de73c05
JJ
10122017-11-30 Jakub Jelinek <jakub@redhat.com>
1013
1014 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
1015
058f0b9e
JJ
10162017-11-28 Jakub Jelinek <jakub@redhat.com>
1017
1018 PR sanitizer/81275
1019 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
1020 c_switch_covers_all_cases_p returns true.
1021
5e9d6aa4 10222017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 1023 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
1024
1025 * Make-lang.in (c/c-array-notation.o): Remove.
1026 * c-array-notation.c: Delete.
1027 * c-decl.c: Remove cilkplus condition.
1028 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
1029 c_parser_cilk_verify_simd, c_parser_array_notation,
1030 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
1031 c_parser_cilk_simd_fn_vector_attrs,
1032 c_finish_cilk_simd_fn_tokens): Delete.
1033 (c_parser_declaration_or_fndef): Remove cilkplus condition.
1034 (c_parser_direct_declarator_inner): Ditto.
1035 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
1036 (c_parser_attributes, c_parser_compound_statement,
1037 c_parser_statement_after_labels, c_parser_if_statement,
1038 c_parser_switch_statement, c_parser_while_statement,
1039 c_parser_do_statement, c_parser_for_statement,
1040 c_parser_unary_expression, c_parser_postfix_expression,
1041 c_parser_postfix_expression_after_primary,
1042 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
1043 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
1044 support.
1045 * c-typeck.c (build_array_ref, build_function_call_vec,
1046 convert_arguments,
1047 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
1048 c_finish_loop, build_binary_op): Remove cilkplus support.
1049
9e851845
JJ
10502017-11-28 Jakub Jelinek <jakub@redhat.com>
1051
1052 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
1053 of build3.
1054
8c7dbea9
BK
10552017-11-14 Boris Kolpackov <boris@codesynthesis.com>
1056
1057 * Make-lang.in (c.install-plugin): Install backend import library.
1058
41521dee
JJ
10592017-11-23 Jakub Jelinek <jakub@redhat.com>
1060
1061 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
1062 pragma_stmt context.
1063
ac9effed
EB
10642017-11-23 Mike Stump <mikestump@comcast.net>
1065 Eric Botcazou <ebotcazou@adacore.com>
1066
1067 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
1068 ANNOTATE_EXPR.
1069 (c_parser_do_statement): Likewise.
1070 (c_parser_for_statement): Likewise.
1071
ce95abc4
DM
10722017-11-22 David Malcolm <dmalcolm@redhat.com>
1073
1074 PR c++/62170
1075 * c-objc-common.c (c_tree_printer): Convert penultimate param from
1076 bool to bool *. Within '%T' handling, if showing an "aka", use
1077 "quoted" param to add appropriate quoting.
1078
974aedcc
MP
10792017-11-22 Marek Polacek <polacek@redhat.com>
1080
1081 PR c++/60336
1082 PR middle-end/67239
1083 PR target/68355
1084 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
1085
d4300cc6
DM
10862017-11-21 David Malcolm <dmalcolm@redhat.com>
1087
1088 PR c/83056
1089 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
1090 earlier failed lookups.
1091
1af4ebf5
MG
10922017-11-21 Marc Glisse <marc.glisse@inria.fr>
1093
1094 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
1095 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
1096
26edace6
DM
10972017-11-20 David Malcolm <dmalcolm@redhat.com>
1098
1099 PR c/81404
1100 * c-decl.c: Include "c-family/known-headers.h".
1101 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
1102 to known-headers.cc.
1103 (class suggest_missing_header): Move to known-header.h.
1104 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
1105 than get_c_name_hint.
1106
b1212255
DM
11072017-11-20 David Malcolm <dmalcolm@redhat.com>
1108
1109 * c-decl.c (get_c_name_hint): New function.
1110 (class suggest_missing_header): New class.
1111 (lookup_name_fuzzy): Call get_c_name_hint and use it to
1112 suggest missing headers to the user.
1113
6c7a259b
DM
11142017-11-20 David Malcolm <dmalcolm@redhat.com>
1115
1116 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1117 Include "c-family/name-hint.h"
1118 (implicit_decl_warning): Convert "hint" from
1119 const char * to name_hint. Pass location to
1120 lookup_name_fuzzy. Suppress any deferred diagnostic if the
1121 warning was not printed.
1122 (undeclared_variable): Likewise for "guessed_id".
1123 (lookup_name_fuzzy): Convert return type from const char *
1124 to name_hint. Add location_t param.
1125 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1126 Include "c-family/name-hint.h"
1127 (c_parser_declaration_or_fndef): Convert "hint" from
1128 const char * to name_hint. Pass location to lookup_name_fuzzy.
1129 (c_parser_parameter_declaration): Likewise.
1130
f9c59f7e
JJ
11312017-11-19 Jakub Jelinek <jakub@redhat.com>
1132
1133 PR c/66618
1134 PR c/69960
1135 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
1136 where needed.
1137 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
1138 handle_omp_array_sections): Likewise.
1139 (digest_init): Don't call decl_constant_value_for_optimization.
1140 * c-tree.h (decl_constant_value_for_optimization): Removed.
1141 * c-fold.c (c_fold_array_ref): New function.
1142 (c_fully_fold_internal): Add LVAL argument, propagate it through
1143 recursive calls. For VAR_P call decl_constant_value and
1144 unshare if not LVAL and either optimizing or IN_INIT. Remove
1145 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
1146 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
1147 (c_fully_fold): Add LVAL argument, pass it through to
1148 c_fully_fold_internal.
1149 (decl_constant_value_for_optimization): Removed.
1150
3ca0dc60
JM
11512017-11-15 Joseph Myers <joseph@codesourcery.com>
1152
1153 PR c/81156
1154 * c-parser.c (check_tgmath_function): New function.
1155 (enum tgmath_parm_kind): New enum.
1156 (c_parser_postfix_expression): Handle __builtin_tgmath.
1157
64a5912c
DM
11582017-10-31 David Malcolm <dmalcolm@redhat.com>
1159
1160 * c-decl.c (implicit_decl_warning): Update for renaming of
1161 pedwarn_at_rich_loc and warning_at_rich_loc.
1162 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
1163 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
1164 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1165 (c_parser_struct_or_union_specifier): Likewise for renaming of
1166 pedwarn_at_rich_loc.
1167 (c_parser_parameter_declaration): Likewise for renaming of
1168 error_at_rich_loc.
1169 * c-typeck.c (build_component_ref): Likewise.
1170 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
1171 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
1172 (set_init_label): Likewise for renaming of error_at_rich_loc.
1173
c1136864
RB
11742017-10-30 Richard Biener <rguenther@suse.de>
1175
1176 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
1177 stmts.
1178
ee5fd23a
MM
11792017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
1180
1181 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
1182 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
1183
1a59ccf2
DM
11842017-10-25 David Malcolm <dmalcolm@redhat.com>
1185
1186 PR c/7356
1187 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
1188 semicolons.
1189
bc1a75dd
JJ
11902017-10-25 Jakub Jelinek <jakub@redhat.com>
1191
1192 PR libstdc++/81706
1193 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
1194 newdecl to corresponding __builtin_ if any.
1195
ff1ff960
PC
11962017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
1197
1198 PR c++/82466
1199 * c-decl.c (diagnose_mismatched_decls): Use
1200 OPT_Wbuiltin_declaration_mismatch.
1201
62e1c678
DM
12022017-10-12 David Malcolm <dmalcolm@redhat.com>
1203
1204 * c-parser.c (c_parser_require): Add "type_is_unique" param and
1205 use it to guard calls to maybe_suggest_missing_token_insertion.
1206 (c_parser_parms_list_declarator): Override default value of new
1207 "type_is_unique" param to c_parser_require.
1208 (c_parser_asm_statement): Likewise.
1209 * c-parser.h (c_parser_require): Add "type_is_unique" param,
1210 defaulting to true.
1211
a92f6726
NS
12122017-10-11 Nathan Sidwell <nathan@acm.org>
1213
1214 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
1215
8e6cdc90
RS
12162017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1217
1218 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
1219 operating on trees as wide_ints.
1220 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
1221 (c_tree_equal): Likewise.
1222
8139a48e
DM
12232017-10-04 David Malcolm <dmalcolm@redhat.com>
1224
1225 * c-decl.c (push_parm_decl): Store c_parm's location into the
1226 PARAM_DECL.
1227 (build_c_parm): Add "loc" param and store it within the c_parm.
1228 * c-parser.c (struct c_parser): Add "last_token_location" field.
1229 (c_parser_consume_token): Store location of the token into the
1230 new field.
1231 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
1232 when handling a FUNCTION_DECL, if it doesn't already have them.
1233 (c_parser_parameter_declaration): Generate a location for the
1234 parameter, and pass it to the call to build_c_parm.
1235 * c-tree.h (struct c_parm): Add field "loc".
1236 (build_c_parm): Add location_t param.
1237 * c-typeck.c (get_fndecl_argument_location): New function.
1238 (inform_for_arg): New function.
1239 (convert_for_assignment): Use inform_for_arg when dealing with
1240 ic_argpass.
1241
2a389958
JJ
12422017-09-29 Jakub Jelinek <jakub@redhat.com>
1243
7d386d45
JJ
1244 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
1245 width is non-NULL.
1246 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
1247 don't SET_DECL_C_BIT_FIELD here.
1248
2a389958
JJ
1249 PR c/82340
1250 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
1251 instead of trying to set just TREE_READONLY manually.
1252
ebc6a85e
TV
12532017-09-16 Tom de Vries <tom@codesourcery.com>
1254
1255 PR c/81875
1256 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
1257 cond itself.
1258
bb75facd
JM
12592017-09-15 Joseph Myers <joseph@codesourcery.com>
1260
1261 PR c/82071
1262 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
1263 for C11.
1264 (build_conditional_expr): For C11, generate result with excess
1265 precision when one argument is an integer and the other is of a
1266 type using excess precision.
1267
1d933576
BE
12682017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
1269
1270 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
1271
267bbb6f
MP
12722017-09-13 Marek Polacek <polacek@redhat.com>
1273
1274 PR c/82167
1275 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
1276 than expr.original_type.
1277
6836632e
NS
12782017-09-12 Nathan Sidwell <nathan@acm.org>
1279
1280 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1281 resort_sorted_fields): Moved from c-family/c-common.c.
1282 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
1283
e035be33
JM
12842017-09-01 Joseph Myers <joseph@codesourcery.com>
1285
1286 PR c/82071
1287 * c-typeck.c (build_atomic_assign): Handle argument with excess
1288 precision. Ensure any EXCESS_PRECISION_EXPR is present in
1289 argument passed to build_binary_op and convert_for_assignment but
1290 not for call to c_fully_fold.
1291 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
1292 Ensure build_binary_op is called with argument with original
1293 semantic type. Avoid calling c_fully_fold with an
1294 EXCESS_PRECISION_EXPR from build_binary_op.
1295
d2e05fcb
JJ
12962017-09-01 Jakub Jelinek <jakub@redhat.com>
1297
1298 PR c/81887
1299 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
1300
b397965c
RS
13012017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1302 Alan Hayward <alan.hayward@arm.com>
1303 David Sherwood <david.sherwood@arm.com>
1304
1305 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
1306 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
1307 m1 and m2 to the signed equivalent of a fixed-point
1308 SCALAR_TYPE_MODE.
1309
14e18d71
DM
13102017-08-24 David Malcolm <dmalcolm@redhat.com>
1311
1312 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
1313 than CAN_HAVE_LOCATION_P when determining whether to use the
1314 location_t value within "value".
1315
7f204c0f
DM
13162017-08-21 David Malcolm <dmalcolm@redhat.com>
1317
1318 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
1319 rather than peeking the location of the first token.
1320 * c-tree.h (c_expr::get_location): New method.
1321
2f687306
DM
13222017-08-21 David Malcolm <dmalcolm@redhat.com>
1323
1324 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
1325 to check_function_arguments.
1326
3e7b80d7
MP
13272017-08-18 Marek Polacek <polacek@redhat.com>
1328
1329 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
1330 commentary.
1331
00aa1fa2
L
13322017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1333
1334 PR c/53037
1335 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
1336 (check_bitfield_type_and_width): Don't allow bit-field with
1337 warn_if_not_aligned type.
1338
da67acb9
MS
13392017-08-14 Martin Sebor <msebor@redhat.com>
1340
1341 PR c/81117
1342 * c-objc-common.c (c_objc_common_init): Handle 'G'.
1343
bb85aa74
MP
13442017-08-11 Marek Polacek <polacek@redhat.com>
1345
1346 PR c/81795
1347 * c-decl.c (pushtag): Only print inform if the warning was printed.
1348 (grokdeclarator): Likewise.
1349
32129a17
DM
13502017-08-10 David Malcolm <dmalcolm@redhat.com>
1351
1352 * c-parser.c (c_parser_error): Rename to...
1353 (c_parser_error_richloc): ...this, making static, and adding
1354 "richloc" parameter, passing it to the c_parse_error call,
1355 rather than calling c_parser_set_source_position_from_token.
1356 (c_parser_error): Reintroduce, reimplementing in terms of the
1357 above, converting return type from void to bool.
1358 (class token_pair): New class.
1359 (struct matching_paren_traits): New struct.
1360 (matching_parens): New typedef.
1361 (struct matching_brace_traits): New struct.
1362 (matching_braces): New typedef.
1363 (get_matching_symbol): New function.
1364 (c_parser_require): Add param MATCHING_LOCATION, using it to
1365 highlight matching "opening" tokens for missing "closing" tokens.
1366 (c_parser_skip_until_found): Likewise.
1367 (c_parser_static_assert_declaration_no_semi): Convert explicit
1368 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
1369 class matching_parens, so that the pertinent open parenthesis is
1370 highlighted when there are problems locating the close
1371 parenthesis.
1372 (c_parser_struct_or_union_specifier): Likewise.
1373 (c_parser_typeof_specifier): Likewise.
1374 (c_parser_alignas_specifier): Likewise.
1375 (c_parser_simple_asm_expr): Likewise.
1376 (c_parser_braced_init): Likewise, for matching_braces.
1377 (c_parser_paren_condition): Likewise, for matching_parens.
1378 (c_parser_switch_statement): Likewise.
1379 (c_parser_for_statement): Likewise.
1380 (c_parser_asm_statement): Likewise.
1381 (c_parser_asm_operands): Likewise.
1382 (c_parser_cast_expression): Likewise.
1383 (c_parser_sizeof_expression): Likewise.
1384 (c_parser_alignof_expression): Likewise.
1385 (c_parser_generic_selection): Likewise.
1386 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
1387 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
1388 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
1389 In case CPP_OPEN_PAREN, pass loc_open_paren to the
1390 c_parser_skip_until_found call.
1391 (c_parser_objc_class_definition): Use class matching_parens as
1392 above.
1393 (c_parser_objc_method_decl): Likewise.
1394 (c_parser_objc_try_catch_finally_statement): Likewise.
1395 (c_parser_objc_synchronized_statement): Likewise.
1396 (c_parser_objc_at_property_declaration): Likewise.
1397 (c_parser_oacc_wait_list): Likewise.
1398 (c_parser_omp_var_list_parens): Likewise.
1399 (c_parser_omp_clause_collapse): Likewise.
1400 (c_parser_omp_clause_default): Likewise.
1401 (c_parser_omp_clause_if): Likewise.
1402 (c_parser_omp_clause_num_threads): Likewise.
1403 (c_parser_omp_clause_num_tasks): Likewise.
1404 (c_parser_omp_clause_grainsize): Likewise.
1405 (c_parser_omp_clause_priority): Likewise.
1406 (c_parser_omp_clause_hint): Likewise.
1407 (c_parser_omp_clause_defaultmap): Likewise.
1408 (c_parser_oacc_single_int_clause): Likewise.
1409 (c_parser_omp_clause_ordered): Likewise.
1410 (c_parser_omp_clause_reduction): Likewise.
1411 (c_parser_omp_clause_schedule): Likewise.
1412 (c_parser_omp_clause_num_teams): Likewise.
1413 (c_parser_omp_clause_thread_limit): Likewise.
1414 (c_parser_omp_clause_aligned): Likewise.
1415 (c_parser_omp_clause_linear): Likewise.
1416 (c_parser_omp_clause_safelen): Likewise.
1417 (c_parser_omp_clause_simdlen): Likewise.
1418 (c_parser_omp_clause_depend): Likewise.
1419 (c_parser_omp_clause_map): Likewise.
1420 (c_parser_omp_clause_device): Likewise.
1421 (c_parser_omp_clause_dist_schedule): Likewise.
1422 (c_parser_omp_clause_proc_bind): Likewise.
1423 (c_parser_omp_clause_uniform): Likewise.
1424 (c_parser_omp_for_loop): Likewise.
1425 (c_parser_cilk_clause_vectorlength): Likewise.
1426 (c_parser_cilk_clause_linear): Likewise.
1427 (c_parser_transaction_expression): Likewise.
1428 * c-parser.h (c_parser_require): Add param matching_location with
1429 default UNKNOWN_LOCATION.
1430 (c_parser_error): Convert return type from void to bool.
1431 (c_parser_skip_until_found): Add param matching_location with
1432 default UNKNOWN_LOCATION.
1433
30af3a2b
MP
14342017-08-09 Marek Polacek <polacek@redhat.com>
1435
1436 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
1437 * c-tree.h (build_external_ref): Update declaration.
1438 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
1439 (build_external_ref): Change the type of a parameter to bool.
1440 (parser_build_binary_op): Use true/false instead of 1/0.
1441 (pointer_diff): Likewise.
1442 (build_modify_expr): Likewise.
1443 (set_designator): Change the type of a parameter to bool.
1444 (set_init_index): Use true/false instead of 1/0.
1445 (set_init_label): Likewise.
1446 (output_init_element): Change the type of a parameter to bool.
1447 (output_pending_init_elements): Use true/false instead of 1/0.
1448 (process_init_element): Likewise.
1449 (build_binary_op): Change the type of a parameter to bool.
1450
296c53ac
MP
14512017-08-09 Marek Polacek <polacek@redhat.com>
1452
1453 PR c/81233
1454 * c-typeck.c (pedwarn_init): Make the function take a variable list.
1455 Call emit_diagnostic_valist instead of pedwarn.
1456 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
1457 Print the relevant types in diagnostics.
1458
a32c8316
MP
14592017-08-09 Marek Polacek <polacek@redhat.com>
1460
1461 PR c/81417
1462 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
1463 build_conditional_expr.
1464 * c-parser.c (c_parser_conditional_expression): Create locations for
1465 EXP1 and EXP2 from their source ranges. Pass the locations down to
1466 build_conditional_expr.
1467 * c-tree.h (build_conditional_expr): Update declaration.
1468 * c-typeck.c (build_conditional_expr): Add location_t parameters.
1469 For -Wsign-compare, also print the types.
1470
314e6352
ML
14712017-08-08 Martin Liska <mliska@suse.cz>
1472
1473 * c-convert.c: Include header files.
1474 * c-typeck.c: Likewise.
1475
577eec56
ML
14762017-08-07 Martin Liska <mliska@suse.cz>
1477
1478 * c-parser.c (c_parser_attributes): Canonicalize name of an
1479 attribute.
1480
f7b6353a
MP
14812017-08-02 Marek Polacek <polacek@redhat.com>
1482
1483 PR c/81289
1484 * c-parser.c (c_parser_unary_expression): Use set_error.
1485
8a6eab34
MP
1486 PR c/81448
1487 PR c/81306
1488 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
1489 warnings. Avoid walking MACRO_MAP_LOCATIONS.
1490
7fef86d3
JH
14912017-07-31 Jan Hubicka <hubicka@ucw.cz>
1492 Martin Liska <mliska@suse.cz>
1493
1494 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 1495 statement.
7fef86d3 1496
f34ebeb2
ML
14972017-07-31 Martin Liska <mliska@suse.cz>
1498
1499 PR sanitize/81530
1500 * c-convert.c (convert): Guard condition with flag_sanitize_p
1501 also with current_function_decl non-null equality.
1502 * c-decl.c (grokdeclarator): Likewise.
1503 * c-typeck.c (build_binary_op): Likewise.
1504
8595f67b
MP
15052017-07-25 Marek Polacek <polacek@redhat.com>
1506
1507 * c-decl.c (grokfield): Remove local variable.
1508
d49718d6
MP
15092017-07-25 Marek Polacek <polacek@redhat.com>
1510
1511 PR c/81364
1512 * c-parser.c (c_parser_else_body): Don't warn about multistatement
1513 macro expansion if the body is in { }.
1514 (c_parser_while_statement): Likewise.
1515 (c_parser_for_statement): Likewise.
1516
ff22eb12
NS
15172017-07-18 Nathan Sidwell <nathan@acm.org>
1518
1519 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
1520
eea77d1f
DM
15212017-07-14 David Malcolm <dmalcolm@redhat.com>
1522
1523 * c-decl.c (implicitly_declare): When suggesting a missing
1524 #include, provide a fix-it hint.
1525
b6f43128
DM
15262017-07-06 David Malcolm <dmalcolm@redhat.com>
1527
1528 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
1529 and call that instead.
1530 * c-tree.h (selftest::run_c_tests): New decl.
1531
3e2becc4
MP
15322017-06-26 Marek Polacek <polacek@redhat.com>
1533
1534 PR c/80116
1535 * c-parser.c (c_parser_if_body): Set the location of the
1536 body of the conditional after parsing all the labels. Call
1537 warn_for_multistatement_macros.
1538 (c_parser_else_body): Likewise.
1539 (c_parser_switch_statement): Likewise.
1540 (c_parser_while_statement): Likewise.
1541 (c_parser_for_statement): Likewise.
1542 (c_parser_statement): Add a default argument. Save the location
1543 after labels have been parsed.
1544 (c_parser_c99_block_statement): Likewise.
1545
343ae898
RB
15462017-06-19 Richard Biener <rguenther@suse.de>
1547
1548 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1549 negated _Literals to parse _Literal (int) -1.
1550
45b2222a
ML
15512017-06-13 Martin Liska <mliska@suse.cz>
1552
1553 PR sanitize/78204
1554 * c-convert.c (convert): Use sanitize_flags_p.
1555 * c-decl.c (grokdeclarator): Likewise.
1556 * c-typeck.c (convert_for_assignment): Likewise.
1557 (c_finish_return): Likewise.
1558 (build_binary_op): Likewise.
1559
8ab7005b
JJ
15602017-06-08 Jakub Jelinek <jakub@redhat.com>
1561
1562 PR c/81006
1563 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
1564 to sizetype before size_binop.
1565
363dc72c
JJ
15662017-06-07 Jakub Jelinek <jakub@redhat.com>
1567
1568 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
1569 of TDI_generic.
1570
dc949728
MP
15712017-06-06 Marek Polacek <polacek@redhat.com>
1572
1573 PR c/79983
1574 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
1575 ref.
1576 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
1577
40ffd95f
BE
15782017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1579
1580 * c-parser.c (c_parser_binary_expression): Implement the
1581 -Wsizeof_pointer_div warning.
1582 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
1583 from a parenthesized expression.
1584 (c_parser_expr_list): Use c_last_sizeof_loc.
1585 * c-tree.h (c_last_sizeof_loc): New external.
1586 * c-typeck.c (c_last_sizeof_loc): New variable.
1587 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
1588
9fc5e7a4
MM
15892017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
1590
1591 PR testsuite/80580
1592 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
1593
f012c8ef
DM
15942017-05-30 David Malcolm <dmalcolm@redhat.com>
1595
1596 * c-objc-common.c (c_tree_printer): Gain bool and const char **
1597 parameters.
1598
3cd211af
MS
15992017-05-24 Martin Sebor <msebor@redhat.com>
1600
1601 PR c/80731
1602 * c-fold.c (c_fully_fold_internal): Adjust.
1603 * c-typeck.c (parser_build_unary_op): Adjust.
1604
fd71a9a2
TS
16052017-05-23 Thomas Schwinge <thomas@codesourcery.com>
1606
1607 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
1608 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
1609 "VECTOR_LENGTH".
1610
92fa0f9e
MP
16112017-05-23 Marek Polacek <polacek@redhat.com>
1612
1613 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
1614 quotes.
1615
d11c168a
JJ
16162017-05-22 Jakub Jelinek <jakub@redhat.com>
1617
1618 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
1619 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
1620 it returned invariant. Call tree_invariant_p unconditionally
1621 afterwards to decide whether to return expr or op0.
1622
58aca9d9
NS
16232017-05-22 Nathan Sidwell <nathan@acm.org>
1624
1625 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
1626
7fd549d2
TS
16272017-05-19 Thomas Schwinge <thomas@codesourcery.com>
1628
1629 * c-parser.c (c_parser_omp_clause_default): Handle
1630 "OMP_CLAUSE_DEFAULT_PRESENT".
1631
6ecd2339
BE
16322017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1633
1634 * config-lang.in (gtfiles): Add c-family/c-format.c.
1635
8a57ecff
NS
16362017-05-18 Nathan Sidwell <nathan@acm.org>
1637
1638 * c-decl.c (pushdecl_top_level): Delete unused function.
1639
6574d78e
MP
16402017-05-18 Marek Polacek <polacek@redhat.com>
1641
1642 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
1643 (check_earlier_gotos): Likewise.
1644 (define_label): Likewise.
1645 (pending_xref_error): Likewise.
1646 (smallest_type_quals_location): Likewise.
1647 (grokdeclarator): Likewise.
1648 (grokparms): Likewise.
1649 (identifier_global_value): Likewise.
1650 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
1651 (find_init_member): Likewise.
1652
e3455240
MP
16532017-05-18 Marek Polacek <polacek@redhat.com>
1654
1655 * c-decl.c (start_decl): Use false/true instead of 0/1.
1656 (grokdeclarator): Likewise.
1657 (finish_struct): Likewise.
1658 (start_function): Change the return type to bool. Use false/true
1659 instead of 0/1.
1660 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
1661 * c-tree.h (start_function): Update.
1662 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
1663 (set_designator): Change the return type to bool. Use false/true
1664 instead of 0/1.
1665
3fa8871b
MP
16662017-05-17 Marek Polacek <polacek@redhat.com>
1667
1668 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
1669 * c-typeck.c: Likewise.
1670
142473df
MP
16712017-05-17 Marek Polacek <polacek@redhat.com>
1672
1673 PR sanitizer/80659
1674 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
1675 DECL_IGNORED_P even for non-static compound literals.
1676
1a817418
ML
16772017-05-17 Martin Liska <mliska@suse.cz>
1678
1679 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1680 use it instead of int type.
1681
b2fa0a8b
MP
16822017-05-17 Marek Polacek <polacek@redhat.com>
1683
1684 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
1685 call c_fully_fold.
1686 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
1687 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
1688 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1689 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1690 save_expr.
1691 (c_parser_conditional_expression): Likewise.
1692 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1693 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1694 (process_init_element): Likewise.
1695 (build_binary_op): Likewise.
1696 (handle_omp_array_sections_1): Likewise.
1697
1e47f02b
TS
16982017-05-12 Thomas Schwinge <thomas@codesourcery.com>
1699
1700 * c-parser.c (c_parser_omp_clause_num_gangs)
1701 (c_parser_omp_clause_num_workers)
1702 (c_parser_omp_clause_vector_length): Merge functions into...
1703 (c_parser_oacc_single_int_clause): ... this new function. Adjust
1704 all users.
1705
c24e924f
NS
17062017-05-11 Nathan Sidwell <nathan@acm.org>
1707
1708 * gimple-parser.c: Don't #include tree-dump.h.
1709
c587104e
MM
17102017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1711
1712 PR testsuite/80580
1713 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
1714
67ac9a9d
MM
17152017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1716
1717 PR testsuite/80580
1718 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1719 incorrect __MEM syntax.
1720
ac4eb40f
MM
17212017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1722
1723 PR testsuite/80580
1724 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1725 type of unary '*'.
1726
641da50a
NS
17272017-05-09 Nathan Sidwell <nathan@acm.org>
1728
1729 * c-tree.h (pushdecl): Declare.
1730
56d35585
DM
17312017-05-05 David Malcolm <dmalcolm@redhat.com>
1732
1733 * c-decl.c (warn_defaults_to): Replace report_diagnostic
1734 with diagnostic_report_diagnostic.
1735 * c-errors.c (pedwarn_c99): Likewise.
1736 (pedwarn_c90): Likewise.
1737
815d9cc6
XR
17382017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1739
92a285c1 1740 PR c++/80038
815d9cc6
XR
1741 * c-gimplify.c (c_gimplify_expr): Remove calls to
1742 cilk_gimplifY_call_params_in_spawned_fn.
1743
1c4ea66f
DM
17442017-04-25 David Malcolm <dmalcolm@redhat.com>
1745
1746 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1747 hint for removing extra semicolon.
1748
666f7903
JJ
17492017-04-21 Jakub Jelinek <jakub@redhat.com>
1750
1751 PR c/80468
1752 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
1753 enabled, set specs->type to integer_type_node.
1754
5764ee3c
JW
17552017-04-03 Jonathan Wakely <jwakely@redhat.com>
1756
1757 * c-array-notation.c: Fix typo in comment.
1758
10fa8dfb
MP
17592017-03-29 Marek Polacek <polacek@redhat.com>
1760
1761 PR c/79730
1762 * c-decl.c (finish_decl): Check VAR_P.
1763
a9e4a1a5
JJ
17642017-03-27 Jakub Jelinek <jakub@redhat.com>
1765
1766 PR middle-end/80162
1767 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1768 * c-typeck.c (c_mark_addressable): Likewise. Look through
1769 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1770 to ARRAY_TYPE.
1771 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
1772
ee3ff394
MP
17732017-03-23 Marek Polacek <polacek@redhat.com>
1774
1775 * c-tree.h: Remove a C_RID_YYCODE reference.
1776
4d1b8e70
JJ
17772017-03-21 Jakub Jelinek <jakub@redhat.com>
1778
1779 PR c/80097
1780 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
1781 optional COMPOUND_EXPR with ubsan instrumentation.
1782
31dc71a8
MP
17832017-03-17 Marek Polacek <polacek@redhat.com>
1784
1785 * c-parser.c: Add C11 references.
1786
d579c385
MP
17872017-03-15 Marek Polacek <polacek@redhat.com>
1788
1789 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
1790
85059a38
MP
17912017-03-11 Marek Polacek <polacek@redhat.com>
1792
1793 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
1794
2f6f187a
DM
17952017-03-10 David Malcolm <dmalcolm@redhat.com>
1796
1797 PR translation/79848
1798 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1799 "%qs".
1800 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1801
36618428
MP
18022017-03-09 Marek Polacek <polacek@redhat.com>
1803
1804 PR sanitizer/79757
1805 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1806 parameter declarations with initializers.
1807
01e5af5a
JJ
18082017-03-09 Jakub Jelinek <jakub@redhat.com>
1809
1810 PR c/79969
1811 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
1812 TYPE_STUB_DECL.
1813
a71dbc63
JJ
18142017-03-07 Jakub Jelinek <jakub@redhat.com>
1815
1816 PR c/79834
1817 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1818 for "may only be used in compound statements" diagnostics, change it
1819 such that the same translatable string is used for all pragmas. For
1820 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1821 diagnostics.
1822 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1823 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1824 "may only be used in compound statements" diagnostics, such that the
1825 same translatable string is used for all pragmas.
1826
1ff4bae6
MP
18272017-03-04 Marek Polacek <polacek@redhat.com>
1828
1829 PR c/79847
1830 * c-decl.c (implicit_decl_warning): Add missing space.
1831
7f5a7d78
MP
18322017-03-03 Marek Polacek <polacek@redhat.com>
1833
1834 PR c/79758
1835 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1836 current_function_prototype_arg_types is error_mark_node. Fix
1837 formatting. Use TREE_VALUE instead of TREE_TYPE.
1838
883c8f06
JJ
18392017-03-03 Jakub Jelinek <jakub@redhat.com>
1840
79c9b7a8
JJ
1841 PR c/79837
1842 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1843 %<min%> or %<max%> in the diagnostics, instead mention identifier.
1844 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1845 diagnostics.
1846
883c8f06
JJ
1847 PR c/79836
1848 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1849 instead of %<_Generic>.
1850 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1851 (c_parser_omp_target_exit_data): Use %<release%> instead of
1852 %<release>.
1853
324ff1a0
JJ
18542017-02-28 Jakub Jelinek <jakub@redhat.com>
1855
1856 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1857 instead of just cond ? "..." : "...".
1858 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1859 for "enter"/"exit" keyword.
1860 (c_finish_oacc_routine): Don't use %s to supply portions of the
1861 message.
1862
4227c9ad
JJ
18632017-02-24 Jakub Jelinek <jakub@redhat.com>
1864
1865 PR c++/79588
1866 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1867 handle -Wrestrict here.
1868 * c-typeck.c (build_function_call_vec): Adjust
1869 check_function_arguments caller.
1870
5d972e66
RB
18712017-02-23 Richard Biener <rguenther@suse.de>
1872
1873 PR c/79684
1874 * gimple-parser.c (c_parser_gimple_statement): Use set_error
1875 to initialize c_exprs to return.
1876 (c_parser_gimple_binary_expression): Likewise.
1877 (c_parser_gimple_unary_expression): Likewise.
1878 (c_parser_gimple_postfix_expression): Likewise.
1879
61ac5ebe
MP
18802017-02-22 Marek Polacek <polacek@redhat.com>
1881
1882 PR c/79662
1883 * c-typeck.c (convert_arguments): Handle error_mark_node.
1884
41d1b0b1
PK
18852017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1886
1887 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1888 value of c_parser_parse_ssa_name against error_mark_node and emit
1889 error if ssa name is anonymous and written as default definition.
1890
eab1f169
PK
18912017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1892
1893 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1894 FMA_EXPR.
1895
bcac0b4d
JJ
18962017-02-16 Jakub Jelinek <jakub@redhat.com>
1897
1898 PR c++/79512
1899 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1900 ignore #pragma omp target even when not followed by identifier.
1901
1be33173
PK
19022017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1903
1904 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1905 (c_parser_gimple_unary_expression): Likewise.
1906
aa326bfb
JJ
19072017-02-13 Jakub Jelinek <jakub@redhat.com>
1908
1909 * c-parser.c (c_parser_oacc_declare): Add missing space in
1910 diagnostics.
1911
8a398bc5
PK
19122017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1913
1914 PR c/79478
1915 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1916 set_c_expr_source_range when parsing ssa-name.
1917
3dcde5ef
PG
19182017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
1919 Richard Biener <rguenther@suse.de>
1920
1921 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1922 building IL when arguments are error_mark_node.
1923 (c_parser_gimple_unary_expression): Likewise.
1924 (c_parser_gimple_if_stmt): Likewise.
1925 (c_parser_gimple_switch_stmt): Likewise.
1926 (c_parser_gimple_return_stmt): Likewise.
1927 (c_parser_parse_ssa_name): When name lookup fails do not build
1928 an SSA name. Use undeclared rather than not declared in error
1929 reporting.
1930
192b048b
MP
19312017-02-09 Marek Polacek <polacek@redhat.com>
1932
1933 PR c/79428
1934 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1935 instead of c_parser_skip_until_found.
1936
56f71478
JJ
19372017-02-09 Jakub Jelinek <jakub@redhat.com>
1938
1939 PR c/79431
1940 * c-parser.c (c_parser_omp_declare_target): Don't invoke
1941 symtab_node::get on automatic variables.
1942
02889d23
CLT
19432016-02-09 Nathan Sidwell <nathan@codesourcery.com>
1944 Chung-Lin Tang <cltang@codesourcery.com>
1945
1946 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1947 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1948 semantic checking.
1949 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1950
7af4b20d
RB
19512017-02-07 Richard Biener <rguenther@suse.de>
1952
1953 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1954 (c_parser_gimple_postfix_expression_after_primary):
1955 Do not use c_build_function_call_vec to avoid folding and promotion.
1956 Simplify.
1957
e5e391d6
MO
19582017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1959
1960 PR lto/79061
1961 * c-decl.c (pop_scope): Pass main_input_filename to
1962 build_translation_unit_decl.
1963
c2e84327
DM
19642017-01-24 David Malcolm <dmalcolm@redhat.com>
1965
1966 * c-parser.c: Include "read-rtl-function.h" and
1967 "run-rtl-passes.h".
1968 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
1969 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
1970 production. Update for renaming of field "gimple_pass" to
1971 "gimple_or_rtl_pass". If __RTL was seen, call
1972 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
1973 to an auto_timevar, to cope with early exit.
1974 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1975 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1976 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1977 Handle RID_RTL.
1978 (c_parser_parse_rtl_body): New function.
1979 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1980 (struct c_declspecs): Rename field "gimple_pass" to
1981 "gimple_or_rtl_pass". Add field "rtl_p".
1982 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1983 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1984 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1985 (c_parser_gimple_or_rtl_pass_list): ...this.
1986
2ebd93e1
MP
19872017-01-20 Marek Polacek <polacek@redhat.com>
1988
1989 PR c/64279
1990 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1991
b1c95bb5
RB
19922017-01-13 Richard Biener <rguenther@suse.de>
1993
1994 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1995 nops.
1996
25329913
RB
19972017-01-13 Richard Biener <rguenther@suse.de>
1998
1999 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2000 _Literal ( type-name ) number.
2001
6bb4ea5c
RB
20022017-01-12 Richard Biener <rguenther@suse.de>
2003
2004 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2005 __MEM.
2006
6b5b4e9c
JJ
20072017-01-11 Jakub Jelinek <jakub@redhat.com>
2008
2009 PR c++/72813
2010 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
2011 PCH file.
2012
e3252775
RB
20132017-01-11 Richard Biener <rguenther@suse.de>
2014
2015 PR bootstrap/79052
2016 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
2017 returns on parse errors.
2018
a9342885
MP
20192017-01-04 Marek Polacek <polacek@redhat.com>
2020
2021 PR c++/64767
2022 * c-parser.c (c_parser_postfix_expression): Mark zero character
2023 constants by setting original_type in c_expr.
2024 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
2025 with a zero character constant.
2026 (char_type_p): New function.
2027
5dd9a9d0
DM
20282017-01-04 David Malcolm <dmalcolm@redhat.com>
2029
2030 * c-parser.c (c_parser_declaration_or_fndef): Create a
2031 rich_location at init_loc and parse it to start_init.
2032 (last_init_list_comma): New global.
2033 (c_parser_braced_init): Update last_init_list_comma when parsing
2034 commas. Pass it to pop_init_level. Pass location of closing
2035 brace to pop_init_level.
2036 (c_parser_postfix_expression_after_paren_type): Create a
2037 rich_location at type_loc and parse it to start_init.
2038 (c_parser_omp_declare_reduction): Likewise for loc.
2039 * c-tree.h (start_init): Add rich_location * param.
2040 (pop_init_level): Add location_t param.
2041 * c-typeck.c (struct initializer_stack): Add field
2042 "missing_brace_richloc".
2043 (start_init): Add richloc param, use it to initialize
2044 the stack node's missing_brace_richloc.
2045 (last_init_list_comma): New decl.
2046 (finish_implicit_inits): Pass last_init_list_comma to
2047 pop_init_level.
2048 (push_init_level): When finding missing open braces, add fix-it
2049 hints to the richloc.
2050 (pop_init_level): Add "insert_before" param and pass it
2051 when calling pop_init_level. Add fixits about missing
2052 close braces to any richloc. Use the richloc for the
2053 -Wmissing-braces warning.
2054 (set_designator): Pass last_init_list_comma to pop_init_level.
2055 (process_init_element): Likewise.
2056
cbe34bb5
JJ
20572017-01-01 Jakub Jelinek <jakub@redhat.com>
2058
2059 Update copyright years.
2060
d17680f3
JJ
20612016-12-21 Jakub Jelinek <jakub@redhat.com>
2062
0dba7960
JJ
2063 PR bootstrap/78817
2064 * c-typeck.c (build_function_call_vec): If check_function_arguments
2065 returns true, set TREE_NO_WARNING on CALL_EXPR.
2066
d17680f3
JJ
2067 PR c/77767
2068 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
2069 to *expr instead of overwriting it.
2070
aa90531e
RB
20712016-12-20 Richard Biener <rguenther@suse.de>
2072
2073 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
2074 error recovery.
2075 (c_parser_gimple_statement): Only build assigns for non-error
2076 stmts.
2077 (c_parser_gimple_postfix_expression_after): Improve error recovery.
2078
629b3d75
MJ
20792016-12-14 Martin Jambor <mjambor@suse.cz>
2080
2081 * c-parser.c: Include omp-general.h and omp-offload.h instead of
2082 omp-low.h.
2083 (c_finish_oacc_routine): Adjusted call to
2084 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
2085 to use their new names.
2086 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
2087 use its new name.
2088 (c_parser_oacc_update): Likewise.
2089 (c_parser_omp_simd): Likewise.
2090 (c_parser_omp_target_update): Likewise.
2091 * c-typeck.c: Include omp-general.h instead of omp-low.h.
2092 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
2093 name.
2094 (c_finish_omp_cancellation_point): Likewise.
2095 * gimple-parser.c: Do not include omp-low.h
2096
c5af52eb
CP
20972016-12-02 Cesar Philippidis <cesar@codesourcery.com>
2098 James Norris <jnorris@codesourcery.com>
2099
2100 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
2101 EXIT_DATA,WAIT} are not used in compound statements.
2102 (c_parser_oacc_enter_exit_data): Update diagnostics.
2103
48330c93
BE
21042016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2105
2106 PR c++/71973
2107 * c-decl.c (diagnose_mismatched_decls): Use
2108 OPT_Wbuiltin_declaration_mismatch here too.
2109
899ca90e 21102016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
2111 Alan Hayward <alan.hayward@arm.com>
2112 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
2113
2114 * c-decl.c (merge_decls): Use SET_DECL_MODE.
2115 (make_label, finish_struct): Likewise.
2116
1ee62b92 21172016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 2118 Richard Biener <rguenther@suse.de>
22b15758 2119
8e745a17
JJ
2120 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
2121 * config-lang.in (gtfiles): Add c/c-parser.h.
2122 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
2123 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
2124 * c-parser.c (enum c_id_kind, struct c_token,
2125 c_parser_next_token_is, c_parser_next_token_is_not,
2126 c_parser_next_token_is_keyword,
2127 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
2128 Split out to ...
2129 * c-parser.h: ... new header.
2130 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 2131 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
2132 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2133 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2134 c_parser_error, c_parser_require, c_parser_skip_until_found,
2135 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2136 c_parser_type_name): Export.
2137 (c_parser_tokens_buf): New function.
2138 (c_parser_error): Likewise.
2139 (c_parser_set_error): Likewise.
2140 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
2141 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
2142 via c_parser_parse_gimple_body.
8e745a17
JJ
2143 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
2144 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2145 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2146 c_parser_error, c_parser_require, c_parser_skip_until_found,
2147 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2148 c_parser_type_name): Declare.
1ee62b92
PG
2149 (struct c_parser): Declare forward.
2150 (c_parser_tokens_buf): Declare.
8e745a17
JJ
2151 (c_parser_error): Likewise.
2152 (c_parser_set_error): Likewise.
2153 * gimple-parser.c: New file.
2154 * gimple-parser.h: Likewise.
1ee62b92 2155
22b15758
UB
21562016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2157
2158 PR c/35503
2159 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2160 warn_for_restrict.
2161
84ff4775
LCW
21622016-09-11 Le-Chun Wu <lcwu@google.com>
2163 Mark Wielaard <mjw@redhat.com>
2164
2165 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
2166 to the given -Wshadow= variant.
2167
4d0cdd0c
TP
21682016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2169
2170 * c-typeck.c: Include memmodel.h.
2171
1202f33e
JJ
21722016-10-13 Jakub Jelinek <jakub@redhat.com>
2173
2174 PR target/77957
2175 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
2176 instead of lhd_return_null_tree_v.
2177
8a14afd0
BS
21782016-10-07 Bernd Schmidt <bschmidt@redhat.com>
2179
2180 PR c++/69733
2181 * c-decl.c (smallest_type_quals_location): New static function.
2182 (grokdeclarator): Try to find the correct location for an ignored
2183 qualifier.
2184
81fea426
MP
21852016-09-26 Marek Polacek <polacek@redhat.com>
2186
2187 PR c/7652
2188 * c-decl.c (pop_scope): Add gcc_fallthrough.
2189
21902016-09-26 Marek Polacek <polacek@redhat.com>
2191
2192 PR c/7652
2193 * c-parser.c (struct c_token): Add flags field.
2194 (c_lex_one_token): Pass it to c_lex_with_flags.
2195 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
2196 into IFN_FALLTHROUGH.
2197 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
2198 attribute fallthrough after a case label or default label.
2199 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
2200
9a2300e9
MP
22012016-09-24 Marek Polacek <polacek@redhat.com>
2202
2203 PR c/77490
2204 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
2205 have boolean value. Warn about ++/-- on booleans.
2206
7de76362
JJ
22072016-09-23 Jakub Jelinek <jakub@redhat.com>
2208
2209 * c-parser.c (incomplete_record_decls): Remove unnecessary
2210 = vNULL initialization of file scope vec.
2211
5b73d2ab
MP
22122016-09-16 Marek Polacek <polacek@redhat.com>
2213
2214 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
2215
e51fbec3
MP
22162016-09-14 Marek Polacek <polacek@redhat.com>
2217
2218 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
2219 (fix_array_notation_expr): Likewise.
2220 * c-decl.c (finish_decl): Likewise.
2221 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2222 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
2223 (function_to_pointer_conversion): Use false instead of 0.
2224 (convert_lvalue_to_rvalue): Likewise.
2225 (parser_build_unary_op): Likewise.
2226 (build_atomic_assign): Likewise.
2227 (build_unary_op): Change nonconvert parameter type to bool, use
2228 true/false instead of 1/0.
2229 (build_binary_op): Use true instead of 1.
2230
254830ba
DM
22312016-09-13 David Malcolm <dmalcolm@redhat.com>
2232
2233 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
2234 of add_fixit_insert to add_fixit_insert_before.
2235
4c13ba17
MP
22362016-09-13 Marek Polacek <polacek@redhat.com>
2237
2238 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
2239 it.
2240
54dcdb88
BE
22412016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
2242
2243 PR c++/77496
2244 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
2245 COMPOUND_EXPR to warn_for_omitted_condop.
2246
e5106e27
DM
22472016-09-07 David Malcolm <dmalcolm@redhat.com>
2248
2249 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
2250 c_get_substring_location for this new langhook.
2251
9dc5773f
JJ
22522016-09-02 Jakub Jelinek <jakub@redhat.com>
2253
2254 PR c/65467
2255 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
2256 flag_openmp.
2257 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
2258 instead of mark_exp_read on low_bound/length expression.
2259 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
2260 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2261 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2262 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
2263 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
2264 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
2265 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
2266 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
2267 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
2268 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
2269 instead of mark_expr_read.
2270 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
2271 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
2272 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
2273 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
2274 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
2275 array section bases outside of depend clause, for depend clause
2276 use convert_lvalue_to_rvalue on the base.
2277 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
2278 linear, aligned, map, to and from clauses.
2279 (c_omp_clause_copy_ctor): New function.
2280
295844f6
MP
22812016-09-01 Marek Polacek <polacek@redhat.com>
2282
2283 PR c/7652
2284 * c-typeck.c (composite_type): Add FALLTHRU comment.
2285
089af25c
DM
22862016-08-31 David Malcolm <dmalcolm@redhat.com>
2287
2288 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
2289 to the insertion fixits for "struct", "union", and "enum".
2290
f9087798
DM
22912016-08-30 David Malcolm <dmalcolm@redhat.com>
2292
2293 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
2294 rather than add_fixit_misspelled_id.
2295 (undeclared_variable): Likewise.
2296 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
2297 now-redundant "here" params from add_fixit_insert method calls.
2298 (c_parser_parameter_declaration): Likewise.
2299 * c-typeck.c (build_component_ref): Remove now-redundant range
2300 param from add_fixit_replace method calls.
2301
ebef225f
MP
23022016-08-25 Marek Polacek <polacek@redhat.com>
2303
2304 * c-typeck.c (parser_build_binary_op): Pass LHS to
2305 warn_logical_not_parentheses.
2306
fe377a48
MP
23072016-08-25 Marek Polacek <polacek@redhat.com>
2308
2309 PR c/77323
2310 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
2311 or _FloatN or _FloatNx is not supported.
2312 (finish_declspecs): Set type to integer_type_node when _FloatN or
2313 _FloatNx is not supported.
2314
c65699ef
JM
23152016-08-19 Joseph Myers <joseph@codesourcery.com>
2316
2317 PR c/32187
2318 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
2319 (struct c_declspecs): Add field floatn_nx_idx.
2320 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
2321 and _FloatNx type specifiers.
2322 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
2323 (c_parser_declspecs, c_parser_attribute_any_word)
2324 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
2325 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
2326 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
2327 narrower than double.
2328
2f1364c2
JJ
23292016-08-12 Jakub Jelinek <jakub@redhat.com>
2330 Martin Liska <mliska@suse.cz>
2331
2332 PR c/67410
2333 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
2334 % to determine val element to change. Assert that
2335 wchar_bytes * charwidth fits into val array.
2336
191816a3
MP
23372016-08-12 Marek Polacek <polacek@redhat.com>
2338
2339 PR c/7652
2340 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
2341 (c_parser_postfix_expression): Likewise.
2342 * c-typeck.c (build_unary_op): Adjust fall through comment.
2343 (c_mark_addressable): Likewise.
2344
b95a64bb
JJ
23452016-08-11 Jakub Jelinek <jakub@redhat.com>
2346
2347 PR c/72816
2348 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
2349 array member through typedef, for orig_qual_indirect == 0 clear
2350 orig_qual_type.
2351
895aa8e1
DM
23522016-08-08 David Malcolm <dmalcolm@redhat.com>
2353
2354 PR c/64955
2355 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
2356 this up to selftest::run_c_tests.
2357 (selftest::run_c_tests): New function.
2358
0b212d8c
TS
23592016-08-04 Thomas Schwinge <thomas@codesourcery.com>
2360
ae9281fc
TS
2361 * c-parser.c (struct oacc_routine_data): Add error_seen and
2362 fndecl_seen members.
2363 (c_finish_oacc_routine): Use these.
2364 (c_parser_declaration_or_fndef): Adjust.
2365 (c_parser_oacc_routine): Likewise. Support more C language
2366 constructs, and improve diagnostics. Move pragma context
2367 checking...
2368 (c_parser_pragma): ... here.
2369
0b212d8c
TS
2370 * c-parser.c (struct oacc_routine_data): New.
2371 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
2372 Simplify code.
2373 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
2374 declare target" attribute.
2375
76e2c821
JB
23762016-08-01 Jan Beulich <jbeulich@suse.com>
2377
2378 * c-fold.c (c_fully_fold_internal): Also emit shift count
2379 warnings for vector types.
2380 * c-typeck.c (build_binary_op): Likewise.
2381
f618a472
MP
23822016-07-29 Marek Polacek <polacek@redhat.com>
2383
2384 PR c/71742
2385 * c-decl.c (finish_struct): Rephrase an error message.
2386
efd0786f
MP
2387 PR c/71853
2388 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
2389 to error node for invalid code.
2390
e00dceaf
MP
2391 PR c/71573
2392 * c-decl.c (implicitly_declare): Return decl early not only for
2393 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
2394
673a107a
JJ
23952016-07-29 Jakub Jelinek <jakub@redhat.com>
2396
2397 PR c/71969
2398 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
2399 on GNU extern inline functions.
2400
a5b5c8b6
MP
24012016-07-29 Marek Polacek <polacek@redhat.com>
2402
2403 PR c/71583
2404 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
2405 check expr.value.
2406
e3fe09c1
UB
24072016-07-22 Uros Bizjak <ubizjak@gmail.com>
2408
2409 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
2410
7c8f7eaa
DM
24112016-07-20 David Malcolm <dmalcolm@redhat.com>
2412
2413 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
2414 spellcheck-tree.h
2415 (best_macro_match): Likewise, converting from a typedef to a
2416 subclass.
2417 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
2418 (lookup_name_fuzzy): Update for change of best_macro_match to a
2419 subclass with a ctor that calls cpp_forall_identifiers.
2420
de6a69ee
DM
24212016-07-20 David Malcolm <dmalcolm@redhat.com>
2422
2423 * c-decl.c (implicit_decl_warning): Update for conversion of
2424 return type of lookup_name_fuzzy to const char *.
2425 (undeclared_variable): Likewise.
2426 (lookup_name_fuzzy): Convert return type from tree to
2427 const char *.
2428 * c-parser.c (c_parser_declaration_or_fndef): Update for
2429 conversion of return type of lookup_name_fuzzy to const char *.
2430 (c_parser_parameter_declaration): Likewise.
2431
b1c9c068
CP
24322016-07-15 Cesar Philippidis <cesar@codesourcery.com>
2433
2434 * c-parser.c (c_parser_oacc_declare): Don't scan for
2435 GOMP_MAP_POINTER.
2436 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
2437 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
2438 zero-length subarrays.
2439
ddbbcb19
JJ
24402016-07-15 Jakub Jelinek <jakub@redhat.com>
2441
2442 PR c/71858
2443 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
2444 instead of FUZZY_LOOKUP_NAME.
2445 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
2446 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
2447
dd36b877
JJ
24482016-07-14 Jakub Jelinek <jakub@redhat.com>
2449
2450 PR c/71858
2451 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
2452
8c681247
TS
24532016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2454
2455 * c-parser.c (c_parser_generic_selection): Make type of variable
2456 auto_vec.
2457 (c_parser_omp_declare_simd): Likewise.
2458
bf4fa671
TS
24592016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2460
2461 * c-decl.c (struct c_struct_parse_info): Change member types
2462 from vec to auto_vec.
2463 (start_struct): Adjust.
2464 (finish_struct): Likewise.
2465
557e8c49
JJ
24662016-07-02 Jakub Jelinek <jakub@redhat.com>
2467
2468 PR c/71719
2469 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
2470
54d19c3b
TS
24712016-06-29 Thomas Schwinge <thomas@codesourcery.com>
2472
2473 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
2474 Move pragma context checking into...
2475 (c_parser_omp_cancellation_point): ... here, and improve
2476 diagnostic messages.
2477 * c-typeck.c (c_finish_omp_cancel)
2478 (c_finish_omp_cancellation_point): Improve diagnostic messages.
2479
152ef731
JJ
24802016-06-29 Jakub Jelinek <jakub@redhat.com>
2481
2482 PR c/71685
2483 * c-typeck.c (c_build_qualified_type): Don't clear
2484 C_TYPE_INCOMPLETE_VARS for the main variant.
2485
24862016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
2487
2488 PR c/71552
2489 * c-typeck.c (output_init_element): Diagnose incompatible types
2490 before non-constant initializers.
2491
e9ac1f86
JJ
24922016-06-28 Jakub Jelinek <jakub@redhat.com>
2493
2494 * Make-lang.in: Don't cat ../stage_current if it does not exist.
2495
277d7ee0
AK
24962016-06-23 Andi Kleen <ak@linux.intel.com>
2497
2498 * Make-lang.in: Add support for autofdo.
2499
1a4f11c8
DM
25002016-06-22 David Malcolm <dmalcolm@redhat.com>
2501
2502 PR c/70339
2503 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
2504 (implicit_decl_warning): When issuing warnings for implicit
2505 declarations, attempt to provide a suggestion via
2506 lookup_name_fuzzy.
2507 (undeclared_variable): Likewise when issuing errors.
2508 (lookup_name_in_scope): Likewise.
2509 (struct edit_distance_traits<cpp_hashnode *>): New struct.
2510 (best_macro_match): New typedef.
2511 (find_closest_macro_cpp_cb): New function.
2512 (lookup_name_fuzzy): New function.
2513 * c-parser.c: Include gcc-rich-location.h.
2514 (c_token_starts_typename): Split out case CPP_KEYWORD into...
2515 (c_keyword_starts_typename): ...this new function.
2516 (c_parser_declaration_or_fndef): When issuing errors about
2517 missing "struct" etc, add a fixit. For other kinds of errors,
2518 attempt to provide a suggestion via lookup_name_fuzzy.
2519 (c_parser_parms_declarator): When looking ahead to detect typos in
2520 type names, also reject CPP_KEYWORD.
2521 (c_parser_parameter_declaration): When issuing errors about
2522 unknown type names, attempt to provide a suggestion via
2523 lookup_name_fuzzy.
2524 * c-tree.h (c_keyword_starts_typename): New prototype.
2525
5a578671
JM
25262016-06-20 Joseph Myers <joseph@codesourcery.com>
2527
2528 PR c/71601
2529 * c-typeck.c (build_conditional_expr): Return error_mark_node if
2530 c_common_type returns error_mark_node.
2531
3f8257db 25322016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
2533
2534 PR c/69507
2535 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
2536 __alignof__ (expression).
2537
6a3f203c
DM
25382016-06-14 David Malcolm <dmalcolm@redhat.com>
2539
2540 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
2541
264757fb
DM
25422016-06-14 David Malcolm <dmalcolm@redhat.com>
2543
2544 * c-typeck.c (build_component_ref): Simplify fixit code by
2545 using gcc_rich_location::add_fixit_misspelled_id.
2546 (set_init_label): Likewise.
2547
f7e4f2e3
DM
25482016-06-13 David Malcolm <dmalcolm@redhat.com>
2549
2550 * c-parser.c (c_parser_initelt): Provide location of name for new
2551 location_t param of set_init_label.
2552 * c-tree.h (set_init_label): Add location_t param.
2553 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
2554 param and use it when issuing error messages about unrecognized
2555 field names. Attempt to provide a fixit hint if appropriate,
2556 otherwise update the error message to provide the type name.
2557
4b1ffdb1
TS
25582016-06-10 Thomas Schwinge <thomas@codesourcery.com>
2559
2560 PR c/71381
2561 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
2562 Loosen checking.
2563
44a845ca
MS
25642016-06-08 Martin Sebor <msebor@redhat.com>
2565 Jakub Jelinek <jakub@redhat.com>
2566
2567 PR c++/70507
2568 PR c/68120
2569 * c-typeck.c (convert_arguments): Don't promote last argument
2570 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2571
92a5f2ba
MP
25722016-06-08 Marek Polacek <polacek@redhat.com>
2573
2574 PR c/71418
2575 * c-decl.c (grokdeclarator): Check TYPE_P.
2576
08203f73
MP
2577 PR c/71426
2578 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
2579 code.
2580
6ffd47b7
DM
25812016-06-07 David Malcolm <dmalcolm@redhat.com>
2582
2583 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
2584 and structure element reference, capture the location of the
2585 element name token and pass it to build_component_ref.
2586 (c_parser_postfix_expression_after_primary): Likewise for
2587 structure element dereference.
2588 (c_parser_omp_variable_list): Likewise for
2589 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
2590 * c-tree.h (build_component_ref): Add location_t param.
2591 * c-typeck.c (build_component_ref): Add location_t param
2592 COMPONENT_LOC. Use it, if available, when issuing hints about
2593 mispelled member names to provide a fixit replacement hint.
2594
1f40cff3
MP
25952016-06-06 Marek Polacek <polacek@redhat.com>
2596
2597 PR c/71362
2598 * c-parser.c (c_parser_direct_declarator): Set location.
2599
5545a907
MP
26002016-06-06 Marek Polacek <polacek@redhat.com>
2601
2602 * c-typeck.c (comptypes_internal): Handle comparisons of
2603 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
2604 TYPE_REF_CAN_ALIAS_ALL.
2605
b605f663
CLT
26062016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
2607
2608 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
2609 arguments as addressable when async clause exists.
2610
00631022
JJ
26112016-05-30 Jakub Jelinek <jakub@redhat.com>
2612
2613 PR c++/71349
2614 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
2615 when combined with target construct.
2616
7211a097
JJ
26172016-05-26 Jakub Jelinek <jakub@redhat.com>
2618
2619 * c-parser.c (c_parser_omp_clause_schedule): Warn if
2620 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
2621
95efe6b6
MP
26222016-05-25 Marek Polacek <polacek@redhat.com>
2623
2624 PR c/71265
2625 * c-decl.c (c_make_fname_decl): Don't check seen_error.
2626
a23faf7a
MP
2627 PR c/71266
2628 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
2629
e46c7770
CP
26302016-05-24 Cesar Philippidis <cesar@codesourcery.com>
2631
2632 * c-parser.c (c_parser_oacc_declare): Add support for
2633 GOMP_MAP_FIRSTPRIVATE_POINTER.
2634 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
2635 argument with enum c_omp_region_type ort.
2636 (handle_omp_array_sections): Likewise. Update call to
2637 handle_omp_array_sections_1.
2638 (c_finish_omp_clauses): Add specific errors and warning messages for
2639 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
2640 call to handle_omp_array_sections.
2641
a04e69c0
TS
26422016-05-24 Thomas Schwinge <thomas@codesourcery.com>
2643
2644 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
2645
f17a223d
RB
26462016-05-24 Richard Biener <rguenther@suse.de>
2647
2648 PR middle-end/70434
2649 PR c/69504
2650 * c-typeck.c (build_array_ref): Do not complain about indexing
2651 non-lvalue vectors. Adjust for function name change.
2652
79063edd
MS
26532016-05-20 Martin Sebor <msebor@redhat.com>
2654
2655 PR c/71115
2656 * c-typeck.c (error_init): Use
2657 expansion_point_location_if_in_system_header.
2658 (warning_init): Same.
2659
8a40fef3
DM
26602016-05-19 David Malcolm <dmalcolm@redhat.com>
2661
2662 PR c/71171
2663 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
2664 in error-handling.
2665 (c_parser_postfix_expression): Likewise.
2666 * c-tree.h (c_expr::set_error): New method.
2667 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
2668 that result's range is initialized.
2669
e9892350
JG
26702016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
2671
2672 * c-typeck.c (parser_build_unary_op): Fix formatting.
2673
8fad45f5
MW
26742016-05-16 Matthew Wahab <matthew.wahab@arm.com>
2675
2676 * c-decl.c (grokdeclarator): Remove errmsg and use of
2677 targetm.invalid_return_type.
2678 (grokparms): Remove errmsg and use of
2679 targetm.invalid_parameter_type.
2680
aa4b467b
JM
26812016-05-13 Joseph Myers <joseph@codesourcery.com>
2682
2683 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2684 function return type.
2685
4f2e1536
MP
26862016-05-12 Marek Polacek <polacek@redhat.com>
2687
2688 PR c/70756
2689 * c-decl.c (build_compound_literal): Pass LOC down to
2690 c_incomplete_type_error.
2691 * c-tree.h (require_complete_type): Adjust declaration.
2692 (c_incomplete_type_error): Likewise.
2693 * c-typeck.c (require_complete_type): Add location parameter, pass it
2694 down to c_incomplete_type_error.
2695 (c_incomplete_type_error): Add location parameter, pass it down to
2696 error_at.
2697 (build_component_ref): Pass location down to c_incomplete_type_error.
2698 (default_conversion): Pass location down to require_complete_type.
2699 (build_array_ref): Likewise.
2700 (build_function_call_vec): Likewise.
2701 (convert_arguments): Likewise.
2702 (build_unary_op): Likewise.
2703 (build_c_cast): Likewise.
2704 (build_modify_expr): Likewise.
2705 (convert_for_assignment): Likewise.
2706 (c_finish_omp_clauses): Likewise.
2707
d6e83a8d
MM
27082016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2709
2710 PR c/43651
2711 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
2712 is enabled.
2713 * c-errors.c (pedwarn_c90): Return true if warned.
2714 * c-tree.h (pedwarn_c90): Change return type to bool.
2715 (enum c_declspec_word): Add new enumerator cdw_atomic.
2716
5c3a10fb
MP
27172016-05-11 Marek Polacek <polacek@redhat.com>
2718
2719 PR c++/71024
2720 * c-decl.c (diagnose_mismatched_decls): Factor out code to
2721 diagnose_mismatched_attributes and call it.
2722
cf68d92c
MP
27232016-05-10 Marek Polacek <polacek@redhat.com>
2724
2725 PR c/70255
2726 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2727 on a declaration following the definition.
2728
351f85c5
JJ
27292016-05-05 Jakub Jelinek <jakub@redhat.com>
2730
2731 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2732 parse it through to c_parser_c99_block_statement.
2733 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2734 caller.
2735
deef7113
MP
27362016-05-04 Marek Polacek <polacek@redhat.com>
2737
2738 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2739 OPT_Wdangling_else.
2740
de55efd5
MP
27412016-05-04 Marek Polacek <polacek@redhat.com>
2742
2743 PR c/48778
2744 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2745 for macro expansions.
2746
79ce98bc
MP
27472016-05-03 Marek Polacek <polacek@redhat.com>
2748
2749 PR c/70859
2750 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
2751 check_builtin_function_arguments.
2752
fb2647aa
RB
27532016-05-03 Richard Biener <rguenther@suse.de>
2754
2755 * Make-lang.in (cc1-checksum.c): For stage-final re-use
2756 the checksum from the previous stage.
2757
77886428
CP
27582016-05-02 Cesar Philippidis <cesar@codesourcery.com>
2759
2760 * c-parser.c (c_parser_oacc_all_clauses): Update call to
2761 c_finish_omp_clauses.
2762 (c_parser_omp_all_clauses): Likewise.
2763 (c_parser_oacc_cache): Likewise.
2764 (c_parser_oacc_loop): Likewise.
2765 (omp_split_clauses): Likewise.
2766 (c_parser_omp_declare_target): Likewise.
2767 (c_parser_cilk_all_clauses): Likewise.
2768 (c_parser_cilk_for): Likewise.
2769 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
2770 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2771
7176a4a0
MP
27722016-05-02 Marek Polacek <polacek@redhat.com>
2773
2774 PR c/70851
2775 * c-decl.c (grokdeclarator): Diagnose when array's size has an
2776 incomplete type.
2777
e7ff0319
CP
27782016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2779
2780 PR middle-end/70626
2781 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
2782 OACC_LOOP_CLAUSE_MASK.
2783 (c_parser_oacc_kernels_parallel): Update call to
2784 c_oacc_split_loop_clauses.
2785
9f405ce1
AM
27862016-04-28 Andrew MacLeod <amacleod@redhat.com>
2787
2788 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
2789 argument to build_modify_expr in two cases.
2790
c1e1f433
BS
27912016-04-27 Bernd Schmidt <bschmidt@redhat.com>
2792
2793 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2794 warn_for_memset instead of warning directly here.
2795
2448a956
MP
27962016-04-26 Marek Polacek <polacek@redhat.com>
2797
2798 PR c/67784
2799 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2800 out of ...
2801 (c_parser_for_statement): ... here.
2802 (c_parser_if_statement): Use it.
2803 (c_parser_switch_statement): Use it.
2804 (c_parser_while_statement): Use it.
2805
b02a5e26
MP
2806 PR c/70791
2807 * c-decl.c (pushdecl): Pass LOCUS down to warning.
2808
477d4906
IV
28092016-04-20 Ilya Verbin <ilya.verbin@intel.com>
2810
2811 PR c++/69363
2812 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2813 instead of c_finish_cilk_clauses.
2814 * c-tree.h (c_finish_omp_clauses): Add new default argument.
2815 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
2816 floating-point variables in the linear clause for Cilk Plus.
2817
fe37c7af
MM
28182016-04-18 Michael Matz <matz@suse.de>
2819
2820 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2821 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2822
949505a9
MP
28232016-04-15 Marek Polacek <polacek@redhat.com>
2824
2825 PR c/70671
2826 * c-typeck.c (build_unary_op): Pass location down to error and
2827 warning call.
2828
dda1bf61
JJ
28292016-04-15 Jakub Jelinek <jakub@redhat.com>
2830
2831 PR c/70436
2832 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2833 where needed.
2834 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2835 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2836 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2837 Adjust c_parser_pragma callers.
2838 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
2839 caller.
2840 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2841 c_parser_statement.
2842 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2843 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2844 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2845 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2846 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2847 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2848 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2849 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2850 down where needed.
2851 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
2852 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2853 calls.
2854
99cd9857
MP
28552016-04-13 Marek Polacek <polacek@redhat.com>
2856
2857 PR c/70436
2858 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2859 adjust callers.
2860 (c_parser_statement): Likewise.
2861 (c_parser_c99_block_statement): Likewise.
2862 (c_parser_while_statement): Likewise.
2863 (c_parser_for_statement): Likewise.
2864 (c_parser_if_body): Don't set IF_P here.
2865 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
2866 about dangling else here.
2867 * c-tree.h (c_finish_if_stmt): Adjust declaration.
2868 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
2869 warn about dangling else here.
2870
f13355da
MP
28712016-04-04 Marek Polacek <polacek@redhat.com>
2872
2873 PR c/70307
2874 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2875
5fde6a45
MP
28762016-03-31 Marek Polacek <polacek@redhat.com>
2877
2878 PR c/70297
2879 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2880
4bbf545b
DM
28812016-03-18 David Malcolm <dmalcolm@redhat.com>
2882
2883 PR c/70281
2884 * c-parser.c (c_parser_postfix_expression): Set the source range
2885 for uses of "__builtin_types_compatible_p".
2886
fcc2b74f
JJ
28872016-03-17 Jakub Jelinek <jakub@redhat.com>
2888
2889 PR c/70280
2890 * c-typeck.c (composite_type): Don't count void_list_node
2891 into len, if the list is terminated by void_list_node, start
2892 with void_list_node instead of NULL for newargs. Stop
2893 at void_list_node.
2894
ab4c578f
MP
28952016-03-16 Marek Polacek <polacek@redhat.com>
2896
2897 PR c/70093
2898 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2899 nested functions returning VM types.
2900
96b3c82d
CP
29012016-03-09 Cesar Philippidis <cesar@codesourcery.com>
2902
2903 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2904 when calling c_finish_omp_clauses.
2905
29b9828f
BS
29062016-03-04 Bernd Schmidt <bschmidt@redhat.com>
2907
2908 PR c/69824
2909 * c-decl.c (get_parm_info): Don't queue implicit function declarations
2910 for later.
2911
7ff6ca38
MP
29122016-03-04 Marek Polacek <polacek@redhat.com>
2913
2914 PR c/69798
2915 * c-parser.c (c_parser_postfix_expression): Call
2916 c_parser_cast_expression rather than c_parser_postfix_expression.
2917
686e2237
JJ
29182016-03-01 Jakub Jelinek <jakub@redhat.com>
2919
2920 PR c/69796
2921 PR c/69974
2922 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2923 of incomplete decls to error_mark_node.
2924
0b05329b
MP
29252016-02-24 Marek Polacek <polacek@redhat.com>
2926
2927 PR c/69819
2928 * c-decl.c (finish_decl): Don't update the copy of the type of a
2929 different decl type.
2930
067fbd8b
JJ
29312016-02-23 Jakub Jelinek <jakub@redhat.com>
2932
2933 PR objc/69844
2934 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2935 in id_kind reclassification.
2936
bf14eba2
JJ
29372016-02-16 Jakub Jelinek <jakub@redhat.com>
2938
2939 PR c/69835
2940 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2941
ba539195
JN
29422016-02-16 James Norris <jnorris@codesourcery.com>
2943
2944 PR c/64748
2945 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2946
16595a1f
BS
29472016-02-12 Bernd Schmidt <bschmidt@redhat.com>
2948
f48dfe98
BS
2949 * c-decl.c (build_null_declspecs): Zero the entire struct.
2950
16595a1f
BS
2951 PR c/69522
2952 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
2953 callers changed. If nested_p is true, use it to call
2954 finish_implicit_inits.
2955 * c-tree.h (finish_implicit_inits): Declare.
2956 * c-typeck.c (finish_implicit_inits): New function. Move code
2957 from ...
2958 (push_init_level): ... here.
2959 (set_designator, process_init_element): Call finish_implicit_inits.
2960
66756373
JJ
29612016-02-11 Jakub Jelinek <jakub@redhat.com>
2962
2963 PR c/69768
2964 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
2965 arguments for -Waddress warning.
2966
1066e9b5
JJ
29672016-02-04 Jakub Jelinek <jakub@redhat.com>
2968
2969 PR c/69669
2970 * c-decl.c (finish_enum): When honoring mode attribute,
2971 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2972
3a5d2ba4
JJ
29732016-01-29 Jakub Jelinek <jakub@redhat.com>
2974
2975 PR debug/69518
2976 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2977 all type variants, not just TYPE_MAIN_VARIANT.
2978
cbdd8ae0
JJ
29792016-01-27 Jakub Jelinek <jakub@redhat.com>
2980
2981 PR debug/66869
2982 * c-decl.c (c_write_global_declarations_1): Warn with
2983 warn_unused_function if static prototype without definition
2984 is not C_DECL_USED.
2985
fa74a4bc
MP
29862016-01-27 Marek Polacek <polacek@redhat.com>
2987
2988 PR c/68062
2989 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2990 to unsigned, if needed. Add -Wsign-compare warning.
2991
13f92e8d
JJ
29922016-01-26 Jakub Jelinek <jakub@redhat.com>
2993
2994 PR tree-optimization/69483
2995 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2996
cd8e73dc 29972016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
2998
2999 PR c/24293
3000 * c-tree.h (incomplete_record_decls): Declare.
3001 * c-parser.c (incomplete_record_decls): Define.
3002 (c_parser_translation_unit): Iterate through incomplete_record_decls and
3003 report error if any decl has zero size.
3004 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
3005 or enum type to incomplete_record_decls.
3006
e6d6ec9e
TV
30072016-01-14 Tom de Vries <tom@codesourcery.com>
3008
3009 PR tree-optimization/68773
3010 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
3011 set force_output.
3012
00083992
MP
30132016-01-14 Marek Polacek <polacek@redhat.com>
3014
3015 PR c/69262
3016 * c-decl.c (grokdeclarator): Provide more information for invalid
3017 array declarations.
3018
7443cf13
DM
30192016-01-06 David Malcolm <dmalcolm@redhat.com>
3020
3021 * c-parser.c (c_parser_unary_expression): For dereferences, build
3022 a combined location before calling build_indirect_ref, so that
3023 error reports cover the full range, manually updating the c_expr
3024 src_range.
3025
6b131d5b
MP
30262016-01-06 Marek Polacek <polacek@redhat.com>
3027
3028 PR sanitizer/69099
3029 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
3030 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
3031 NULL.
3032
818ab71a
JJ
30332016-01-04 Jakub Jelinek <jakub@redhat.com>
3034
3035 Update copyright years.
3036
2fe0a208
MP
30372016-01-04 Marek Polacek <polacek@redhat.com>
3038
3039 PR c/68908
3040 * c-typeck.c (build_atomic_assign): Improve commentary. Add
3041 optimization to use __atomic_fetch_* built-in if possible.
3042
c7b48c8a
TS
30432015-12-23 Thomas Schwinge <thomas@codesourcery.com>
3044
3045 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
3046 into...
3047 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
3048 all users.
3049
fda5652f
MP
30502015-12-22 Marek Polacek <polacek@redhat.com>
3051
3052 PR c/69002
3053 * c-typeck.c (build_component_ref): Warn when acessing elements of
3054 atomic structures or unions.
3055
745e411d
DM
30562015-12-21 David Malcolm <dmalcolm@redhat.com>
3057
3058 * c-typeck.c: Include "gcc-rich-location.h".
3059 (build_binary_op): In the two places that call binary_op_error,
3060 create a gcc_rich_location and populate it with the location of
3061 the binary op and its two operands.
3062
94c40e19
DM
30632015-12-16 David Malcolm <dmalcolm@redhat.com>
3064
3065 * c-parser.c (c_parser_statement_after_labels): When calling
3066 c_finish_return, Use the return expression's location if it has
3067 one, falling back to the location of the first token within it.
3068 * c-typeck.c (c_finish_return): When issuing warnings about
3069 the incorrect presence/absence of a return value, issue a note
3070 showing the declaration of the function.
3071
de67c4c3
DM
30722015-12-16 David Malcolm <dmalcolm@redhat.com>
3073
3074 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
3075 to 4.
3076 (c_parser_peek_nth_token): New function.
3077 (c_parser_peek_conflict_marker): New function.
3078 (c_parser_error): Detect conflict markers and report them as such.
3079
a10704e1
DM
30802015-12-16 David Malcolm <dmalcolm@redhat.com>
3081
3082 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
3083 to preserve range information for the primary expression
3084 in the call to c_parser_postfix_expression_after_primary.
3085
8062bca6
DM
30862015-12-16 David Malcolm <dmalcolm@redhat.com>
3087
3088 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
3089 expression location, falling back on the first token location,
3090 rather than always using the latter.
3091
d06f8b75
MP
30922015-12-16 Marek Polacek <polacek@redhat.com>
3093
3094 PR c/64637
3095 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
3096 available.
3097
2994fb91
MP
30982015-12-15 Marek Polacek <polacek@redhat.com>
3099
3100 PR c/68907
3101 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
3102 artificial decl.
3103
a1b93f8d
DM
31042015-12-08 David Malcolm <dmalcolm@redhat.com>
3105
3106 * c-parser.c (c_parser_alignof_expression): Capture location of
3107 closing parenthesis (if any), or of end of unary expression, and
3108 use it to build a src_range for the expression.
3109
46c6e1e2
DM
31102015-12-08 David Malcolm <dmalcolm@redhat.com>
3111
3112 PR c/68757
3113 * c-parser.c (c_parser_get_builtin_args): Add
3114 "out_close_paren_loc" param, and write back to it.
3115 (c_parser_postfix_expression): Capture the closing
3116 parenthesis location for RID_CHOOSE_EXPR,
3117 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
3118 RID_BUILTIN_SHUFFLE and use it to set the source range
3119 for such expressions; within RID_BUILTIN_COMPLEX set
3120 the underlying location.
3121
66189108
MP
31222015-12-07 Marek Polacek <polacek@redhat.com>
3123
3124 PR c/68668
3125 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
3126 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
3127
f187980b
EB
31282015-12-04 Eric Botcazou <ebotcazou@adacore.com>
3129
3130 * c-tree.h (c_build_va_arg): Adjust prototype.
3131 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
3132 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
3133 parameter, adjust throughout and issue an error if EXPR is a component
3134 with reverse storage order.
3135
4250754e
JM
31362015-12-02 Jason Merrill <jason@redhat.com>
3137
3138 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
3139 (c_fully_fold_internal, decl_constant_value_for_optimization):
3140 Move from c-common.c.
3141 * c-tree.h: Declare decl_constant_value_for_optimization.
3142 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
3143
e9e32ee6
JM
31442015-12-02 Joseph Myers <joseph@codesourcery.com>
3145
3146 PR c/68162
3147 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
3148 following link from declarator to next declarator. Track original
3149 qualified type and pass it to c_build_qualified_type.
3150 * c-typeck.c (c_build_qualified_type): Add arguments
3151 orig_qual_type and orig_qual_indirect.
3152
ff7a55bf
TS
31532015-12-02 Thomas Schwinge <thomas@codesourcery.com>
3154
3155 * c-parser.c (c_parser_omp_clause_name)
3156 (c_parser_oacc_all_clauses): Alphabetical sorting.
3157
657e4e47
JJ
31582015-12-02 Jakub Jelinek <jakub@redhat.com>
3159
3160 PR c/68533
3161 * c-decl.c (get_parm_info): Use b->locus instead of input_location
3162 for diagnostics.
3163
37d5ad46
JB
31642015-12-01 Julian Brown <julian@codesourcery.com>
3165 Cesar Philippidis <cesar@codesourcery.com>
3166 James Norris <James_Norris@mentor.com>
3167
3168 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
3169 (c_parser_oacc_clause_use_device): New function.
3170 (c_parser_oacc_all_clauses): Add use_device support.
3171 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
3172 (c_parser_oacc_host_data): New function.
3173 (c_parser_omp_construct): Add host_data support.
3174 * c-tree.h (c_finish_oacc_host_data): Add prototype.
3175 * c-typeck.c (c_finish_oacc_host_data): New function.
3176 (c_finish_omp_clauses): Add use_device support.
3177
a4850ce9
JH
31782015-11-29 Jan Hubicka <hubicka@ucw.cz>
3179
3180 PR c/67106
3181 * c-decl.c: Set TYPE_PACKED in variants.
3182
b58d3df2
ML
31832015-11-27 Martin Liska <mliska@suse.cz>
3184
3185 PR c++/68312
3186 * c-array-notation.c (fix_builtin_array_notation_fn):
3187 Use release_vec_vec instead of vec::release.
3188 (build_array_notation_expr): Likewise.
3189 (fix_conditional_array_notations_1): Likewise.
3190 (fix_array_notation_expr): Likewise.
3191 (fix_array_notation_call_expr): Likewise.
3192
aec17bfe
JJ
31932015-11-27 Jakub Jelinek <jakub@redhat.com>
3194
3195 PR c/63326
3196 * c-parser.c (c_parser_compound_statement_nostart): If
3197 last_label is true, use pragma_stmt instead of pragma_compound
3198 as second c_parser_pragma argument.
3199 (c_parser_omp_ordered, c_parser_omp_target_update,
3200 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
3201 false as second argument to c_parser_skip_to_pragma_eol after
3202 diagnosing standalone directives used in pragma_stmt context.
3203
688c4de0
IV
32042015-11-24 Ilya Verbin <ilya.verbin@intel.com>
3205
3206 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
3207 with "if (ENABLE_OFFLOADING)".
3208
cbd03aee
DM
32092015-11-23 David Malcolm <dmalcolm@redhat.com>
3210
3211 PR objc/68438
3212 * c-parser.c (c_parser_postfix_expression): Set up source ranges
3213 for various Objective-C constructs: Class.name syntax,
3214 @selector(), @protocol(), @encode(), and [] message syntax.
3215
a87a86e1
DM
32162015-11-20 David Malcolm <dmalcolm@redhat.com>
3217
3218 PR 62314
3219 * c-typeck.c (should_suggest_deref_p): New function.
3220 (build_component_ref): Special-case POINTER_TYPE when
3221 generating a "not a structure of union" error message, and
3222 suggest a "->" rather than a ".", providing a fix-it hint.
3223
8ece8dfb
DM
32242015-11-19 David Malcolm <dmalcolm@redhat.com>
3225
3226 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
3227 candidate into a new function, find_closest_identifier.
3228
433068cc
MP
32292015-11-19 Marek Polacek <polacek@redhat.com>
3230
3231 PR c/68412
3232 * c-typeck.c (parser_build_binary_op): Properly handle
3233 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
3234
bef08b71
DM
32352015-11-17 David Malcolm <dmalcolm@redhat.com>
3236
3237 * c-parser.c (set_c_expr_source_range): Bulletproof both
3238 overloaded implementations against NULL expr->value.
3239 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
3240 values.
3241 (c_parser_unary_expression): Likewise when handling addresses of
3242 labels.
3243 (c_parser_postfix_expression): Likewise for statement expressions,
3244 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
3245 __builtin_va_arg, and for __builtin_offset_of.
3246 (c_parser_postfix_expression_after_paren_type): Initialize expr's
3247 src_range using the range of the braced initializer.
3248 (c_parser_transaction_expression): Set src_range for "ret" to a
3249 sane pair of values.
3250
fff77217
KY
32512015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
3252
3253 * c-parser.c (c_finish_omp_declare_simd): Look for
3254 "simd" attribute as well. Update error message.
3255
1d899da2
TS
32562015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3257
3258 * c-parser.c (c_parser_omp_declare_target): Adjust.
3259
e4606348
JJ
32602015-11-14 Jakub Jelinek <jakub@redhat.com>
3261
3262 * c-typeck.c (c_finish_omp_clauses): Don't mark
3263 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
3264
3e636daf
MP
32652015-11-14 Marek Polacek <polacek@redhat.com>
3266
3267 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
3268 * c-typeck.c: Likewise.
3269
ebedc9a3
DM
32702015-11-13 David Malcolm <dmalcolm@redhat.com>
3271
3272 * c-decl.c (warn_defaults_to): Pass line_table to
3273 rich_location ctor.
3274 * c-errors.c (pedwarn_c99): Likewise.
3275 (pedwarn_c90): Likewise.
3276 * c-parser.c (set_c_expr_source_range): New functions.
3277 (c_token::get_range): New method.
3278 (c_token::get_finish): New method.
3279 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
3280 based on the range from the start of the LHS to the end of the
3281 RHS.
3282 (c_parser_conditional_expression): Likewise, based on the range
3283 from the start of the cond.value to the end of exp2.value.
3284 (c_parser_binary_expression): Call set_c_expr_source_range on
3285 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
3286 (c_parser_cast_expression): Call set_c_expr_source_range on ret
3287 based on the cast_loc through to the end of the expr.
3288 (c_parser_unary_expression): Likewise, based on the
3289 op_loc through to the end of op.
3290 (c_parser_sizeof_expression) Likewise, based on the start of the
3291 sizeof token through to either the closing paren or the end of
3292 expr.
3293 (c_parser_postfix_expression): Likewise, using the token range,
3294 or from the open paren through to the close paren for
3295 parenthesized expressions.
3296 (c_parser_postfix_expression_after_primary): Likewise, for
3297 various kinds of expression.
3298 * c-tree.h (struct c_expr): Add field "src_range".
3299 (c_expr::get_start): New method.
3300 (c_expr::get_finish): New method.
3301 (set_c_expr_source_range): New decls.
3302 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
3303 on ret for prefix unary ops.
3304 (parser_build_binary_op): Likewise, running from the start of
3305 arg1.value through to the end of arg2.value.
3306
ec8b536f
MP
33072015-11-13 Marek Polacek <polacek@redhat.com>
3308
3309 PR c/68320
3310 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
3311
277fe616
DM
33122015-11-13 David Malcolm <dmalcolm@redhat.com>
3313
3314 * c-typeck.c: Include spellcheck.h.
3315 (lookup_field_fuzzy_find_candidates): New function.
3316 (lookup_field_fuzzy): New function.
3317 (build_component_ref): If the field was not found, try using
3318 lookup_field_fuzzy and potentially offer a suggestion.
3319
6e232ba4
JN
33202015-11-12 James Norris <jnorris@codesourcery.com>
3321 Joseph Myers <joseph@codesourcery.com>
3322
3323 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
3324 (c_parser_omp_clause_name): Handle 'device_resident' clause.
3325 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3326 and PRAGMA_OMP_CLAUSE_LINK.
3327 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3328 and PRAGMA_OACC_CLAUSE_LINK.
3329 (OACC_DECLARE_CLAUSE_MASK): New definition.
3330 (c_parser_oacc_declare): New function.
3331
9be4f715
MP
33322015-11-12 Marek Polacek <polacek@redhat.com>
3333
3334 PR c/67784
3335 * c-parser.c (c_parser_for_statement): Reclassify the token in
3336 a correct scope.
3337
e78bede6
MP
33382015-11-11 Marek Polacek <polacek@redhat.com>
3339
3340 PR c/68107
3341 PR c++/68266
3342 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
3343 checking the size of an array.
3344
69f293c9
AM
33452015-11-11 Andrew MacLeod <amacleod@redhat.com>
3346
3347 * c-array-notation.c: Remove unused header files.
3348 * c-aux-info.c: Likewise.
3349 * c-convert.c: Likewise.
3350 * c-decl.c: Likewise.
3351 * c-errors.c: Likewise.
3352 * c-lang.c: Likewise.
3353 * c-objc-common.c: Likewise.
3354 * c-parser.c: Likewise.
3355 * c-typeck.c: Likewise.
3356 * gccspec.c: Likewise.
3357
3a40d81d
NS
33582015-11-09 Thomas Schwinge <thomas@codesourcery.com>
3359 Cesar Philippidis <cesar@codesourcery.com>
3360 James Norris <jnorris@codesourcery.com>
3361 Julian Brown <julian@codesourcery.com>
3362 Nathan Sidwell <nathan@codesourcery.com>
3363
3364 c/
3365 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
3366 routine arg.
3367 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
3368 (c_parser_pragma): Parse 'acc routine'.
3369 (OACC_ROUTINE_CLAUSE_MARK): Define.
3370 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
3371
fc402eec
AA
33722015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3373
3374 PR debug/67192
3375 * c-typeck.c (c_finish_loop): For unconditional loops, set the
3376 location of the backward-goto to the start of the loop body.
3377
f6b0b3db
AA
33782015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3379
3380 PR debug/67192
3381 * c-parser.c (c_parser_while_statement): Finish the loop before
3382 parsing ahead for misleading indentation.
3383 (c_parser_for_statement): Likewise.
3384
ee45a32d
EB
33852015-11-08 Eric Botcazou <ebotcazou@adacore.com>
3386
3387 * c-decl.c (finish_struct): If the structure has reverse storage
3388 order, rewrite the type of array fields with scalar component. Call
3389 maybe_apply_pragma_scalar_storage_order on entry.
3390 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
3391 errors on bit-fields and reverse SSO here and not...
3392 (c_mark_addressable): ...here.
3393 (output_init_element): Adjust call to initializer_constant_valid_p.
3394 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
3395
8a645150
DM
33962015-11-06 David Malcolm <dmalcolm@redhat.com>
3397
3398 * c-decl.c (warn_defaults_to): Update for change in signature
3399 of diagnostic_set_info.
3400 * c-errors.c (pedwarn_c99): Likewise.
3401 (pedwarn_c90): Likewise.
3402 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
3403 for textinfo::set_location.
3404
7a5e4956
CP
34052015-11-05 Cesar Philippidis <cesar@codesourcery.com>
3406 Thomas Schwinge <thomas@codesourcery.com>
3407 James Norris <jnorris@codesourcery.com>
3408
3409 * c-parser.c (c_parser_omp_clause_name): Add support for
3410 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
3411 (c_parser_omp_clause_default): Add is_oacc argument. Handle
3412 default(none) in OpenACC.
3413 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
3414 arguments.
3415 (c_parser_oacc_clause_tile): New function.
3416 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
3417 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
3418 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
3419 TILE}.
3420 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
3421 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
3422 FIRSTPRIVATE}.
3423 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
3424 (c_parser_oacc_update): Update the error message for missing clauses.
3425 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
3426 and OMP_CLAUSE_INDEPENDENT.
3427
bfcfbfa0
MP
34282015-11-05 Marek Polacek <polacek@redhat.com>
3429
3430 PR c/68090
3431 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
3432 deal with pre-evaluation on invalid types.
3433
e01d41e5
JJ
34342015-11-05 Jakub Jelinek <jakub@redhat.com>
3435 Ilya Verbin <ilya.verbin@intel.com>
3436
3437 * c-parser.c: Include context.h and gimple-expr.h.
3438 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
3439 monotonic together with nonmonotonic.
3440 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
3441 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
3442 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
3443 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
3444 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
3445 expressions on combined target teams before the target.
3446 (c_parser_omp_declare_target): If decl has "omp declare target" or
3447 "omp declare target link" attribute, and cgraph or varpool node already
3448 exists, then set corresponding flags. Call c_finish_omp_clauses
3449 in the parenthesized extended-list syntax case.
3450 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
3451 declare target.
3452 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
3453 on OMP_CLAUSE_REDUCTION array sections.
3454 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
3455 into the constant offset, or for variable low-bound using
3456 POINTER_PLUS_EXPR. For structure element based array sections use
3457 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
3458 (c_finish_omp_clauses): Drop generic_field_head, structure
3459 elements are now always mapped even as array section bases,
3460 diagnose same var in data sharing and mapping clauses. Diagnose if
3461 linear step on declare simd is neither a constant nor a uniform
3462 parameter. Look through POINTER_PLUS_EXPR for array section
3463 reductions. Diagnose the same var or function appearing multiple
3464 times on the same directive. Fix up wording for the to clause if t
3465 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
3466 modifier on kinds other than dynamic or guided or nonmonotonic
3467 modifier together with ordered clause.
3468
4bf9e5a8
TS
34692015-11-03 Thomas Schwinge <thomas@codesourcery.com>
3470 Chung-Lin Tang <cltang@codesourcery.com>
3471
3472 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
3473
2adfab87
AM
34742015-10-29 Andrew MacLeod <amacleod@redhat.com>
3475
3476 * c-array-notation.c: Reorder #include's and remove duplicates.
3477 * c-aux-info.c: Likewise.
3478 * c-convert.c: Likewise.
3479 * c-decl.c: Likewise.
3480 * c-errors.c: Likewise.
3481 * c-lang.c: Likewise.
3482 * c-objc-common.c: Likewise.
3483 * c-parser.c: Likewise.
3484 * c-typeck.c: Likewise.
3485
e922069e
JW
34862015-10-26 Jim Wilson <jim.wilson@linaro.org>
3487
3488 PR debug/66068
3489 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
3490 after calling build_qualified_type.
3491
765dd391
CP
34922015-10-27 Cesar Philippidis <cesar@codesourcery.com>
3493 Thomas Schwinge <thomas@codesourcery.com>
3494 James Norris <jnorris@codesourcery.com>
3495 Joseph Myers <joseph@codesourcery.com>
3496 Julian Brown <julian@codesourcery.com>
3497 Bernd Schmidt <bschmidt@redhat.com>
3498
3499 * c-parser.c (c_parser_oacc_shape_clause): New.
3500 (c_parser_oacc_simple_clause): New.
3501 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
3502 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
3503
88bae6f4
TS
35042015-10-27 Thomas Schwinge <thomas@codesourcery.com>
3505 James Norris <jnorris@codesourcery.com>
3506 Cesar Philippidis <cesar@codesourcery.com>
3507
3508 PR c/64765
3509 PR c/64880
3510 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
3511 parameters, and handle these. Adjust all users.
3512 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
3513 into...
3514 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
3515 all users.
3516 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
3517 declare functions.
3518 (c_finish_omp_construct): Declare function.
3519 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
3520 Merge functions into...
3521 (c_finish_omp_construct): ... this new function.
3522
a8fc2579
RB
35232015-10-22 Richard Biener <rguenther@suse.de>
3524
3525 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
3526 before folding a MINUS_EXPR.
3527
e9122ef6
MP
35282015-10-21 Marek Polacek <polacek@redhat.com>
3529
3530 PR c/68024
3531 * c-decl.c (start_function): Warn about vararg functions without
3532 a prototype.
3533
9f47c7e5
IE
35342015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
3535
3536 * c-typeck.c (build_conditional_expr): Use boolean vector
3537 type for vector comparison.
3538 (build_vec_cmp): New.
3539 (build_binary_op): Use build_vec_cmp for comparison.
3540
fa60eeb9
MP
35412015-10-20 Marek Polacek <polacek@redhat.com>
3542
3543 * c-parser.c (is_cilkplus_vector_p): Don't define here.
3544
2c7020eb
MP
35452015-10-20 Marek Polacek <polacek@redhat.com>
3546
3547 PR c/67964
3548 * c-parser.c (c_parser_attributes): Break out of the loop if the
3549 token after an attribute isn't a comma.
3550
d9a6bd32
JJ
35512015-10-13 Jakub Jelinek <jakub@redhat.com>
3552 Aldy Hernandez <aldyh@redhat.com>
3553
3554 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
3555 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
3556 (c_parser_omp_variable_list): Handle structure elements for
3557 map, to and from clauses. Handle array sections in reduction
3558 clause. Formatting fixes.
3559 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
3560 if clause modifiers.
3561 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3562 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3563 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
3564 c_parser_omp_clause_is_device_ptr): New functions.
3565 (c_parser_omp_clause_ordered): Parse optional parameter.
3566 (c_parser_omp_clause_reduction): Handle array reductions.
3567 (c_parser_omp_clause_schedule): Parse optional simd modifier.
3568 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
3569 functions.
3570 (c_parser_omp_clause_linear): Parse linear clause modifiers.
3571 (c_parser_omp_clause_depend_sink): New function.
3572 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
3573 (c_parser_omp_clause_map): Parse release/delete map kinds and
3574 optional always modifier.
3575 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
3576 and c_finish_omp_clauses callers.
3577 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
3578 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
3579 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
3580 (OMP_CRITICAL_CLAUSE_MASK): Define.
3581 (c_parser_omp_critical): Parse critical clauses.
3582 (c_parser_omp_for_loop): Handle doacross loops, adjust
3583 c_finish_omp_for and c_finish_omp_clauses callers.
3584 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
3585 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
3586 (OMP_FOR_CLAUSE_MASK): Add linear clause.
3587 (c_parser_omp_for): Disallow ordered clause when combined with
3588 distribute. Disallow linear clause when combined with distribute
3589 and not combined with simd.
3590 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
3591 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
3592 parse clauses and if depend clause is found, don't parse a body.
3593 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
3594 Allow target parallel without for after it.
3595 (OMP_TASK_CLAUSE_MASK): Add priority clause.
3596 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
3597 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
3598 invalid kinds.
3599 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
3600 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
3601 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
3602 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
3603 functions.
3604 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
3605 defaultmap and is_device_ptr clauses.
3606 (c_parser_omp_target): Parse target parallel and target simd. Set
3607 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
3608 and target exit data. Diagnose invalid map kinds.
3609 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
3610 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
3611 construct.
3612 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
3613 &omp_priv.
3614 (OMP_TASKLOOP_CLAUSE_MASK): Define.
3615 (c_parser_omp_taskloop): New function.
3616 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
3617 handle PRAGMA_OMP_TASKLOOP.
3618 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
3619 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
3620 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
3621 Add IS_OMP argument, handle structure element bases, diagnose
3622 bitfields, pass IS_OMP recursively, diagnose known zero length
3623 array sections in depend clauses, handle array sections in reduction
3624 clause, diagnose negative length even for pointers.
3625 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
3626 types, pass IS_OMP down to handle_omp_array_sections_1, handle
3627 array sections in reduction clause, set
3628 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
3629 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
3630 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
3631 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
3632
21ba0cea
MP
36332015-10-06 Marek Polacek <polacek@redhat.com>
3634
3635 * c-parser.c (c_parser_statement_after_labels): Use
3636 protected_set_expr_location.
3637 (c_parser_omp_clause_num_gangs): Likewise.
3638 (c_parser_omp_clause_num_threads): Likewise.
3639 (c_parser_omp_clause_num_workers): Likewise.
3640 (c_parser_omp_clause_vector_length): Likewise.
3641 (c_parser_omp_clause_num_teams): Likewise.
3642 (c_parser_omp_clause_thread_limit): Likewise.
3643 * c-typeck.c (build_c_cast): Likewise.
3644 (c_cast_expr): Likewise.
3645
624d31fe
RS
36462015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3647
3648 * c-typeck.c (c_tree_equal): Use real_equal instead of
3649 REAL_VALUES_EQUAL.
3650
b8fd7909
JM
36512015-10-04 Jason Merrill <jason@redhat.com>
3652
3653 * c-parser.c (c_lex_one_token): Handle @synchronized.
3654 * c-decl.c (match_builtin_function_types): A declaration of a built-in
3655 can change whether the function is transaction_safe.
3656
1c7485af
MP
36572015-10-02 Marek Polacek <polacek@redhat.com>
3658
3659 PR c/67730
3660 * c-typeck.c (convert_for_assignment): Use the expansion point
3661 location throughout.
3662
3e3b8d63
MP
36632015-10-02 Marek Polacek <polacek@redhat.com>
3664
3665 PR c/64249
3666 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
3667 and pass it down to c_parser_if_statement.
3668 (c_parser_else_body): Add CHAIN parameter and pass it down to
3669 c_parser_statement_after_labels.
3670 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
3671 duplicated if-else-if conditions.
3672
aabef2de
MP
36732015-10-01 Marek Polacek <polacek@redhat.com>
3674
3675 * c-typeck.c (convert_for_assignment): Improve commentary.
3676
de8ddd5f
MP
36772015-09-30 Marek Polacek <polacek@redhat.com>
3678
3679 PR c/67730
3680 * c-typeck.c (c_finish_return): Use the expansion point location for
3681 certain "return with value" warnings.
3682
c4914de6
MLI
36832015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3684
3685 * c-parser.c (pragma_lex): Add loc argument.
3686
0e36f5c7
MP
36872015-09-15 Marek Polacek <polacek@redhat.com>
3688
3689 PR c/67580
3690 * c-decl.c (tag_exists_p): New function.
3691 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3692 struct/union/enum keywords are missing.
3693 * c-tree.h (tag_exists_p): Declare.
3694
2f3bb934
MP
36952015-09-15 Marek Polacek <polacek@redhat.com>
3696
3697 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3698 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3699 Return NULL_TREE instead of 0.
3700 (lookup_name): Return NULL_TREE instead of 0.
3701 (lookup_name_in_scope): Likewise.
3702 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3703 (parser_xref_tag): Use false instead of 0.
3704 (start_struct): Use true instead of 1.
3705 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3706
aa256c4a
MP
37072015-09-14 Marek Polacek <polacek@redhat.com>
3708
3709 * c-typeck.c (set_nonincremental_init_from_string): Use
3710 HOST_WIDE_INT_M1U when shifting a negative value.
3711
dbb68221
MW
37122015-09-09 Mark Wielaard <mjw@redhat.com>
3713
3714 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
3715 parm against NULL.
3716
a8a098ac
JJ
37172015-09-10 Jakub Jelinek <jakub@redhat.com>
3718
3719 PR c/67502
3720 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
3721 into OMP_FOR_PRE_BODY rather than before the loop.
3722
f4b189d5
JJ
37232015-09-09 Jakub Jelinek <jakub@redhat.com>
3724
0bb99c11
JJ
3725 PR c/67501
3726 * c-parser.c (c_parser_oacc_all_clauses,
3727 c_parser_omp_all_clauses): Remove invalid clause from
3728 list of clauses even if parser->error is set.
3729
fce5e5e3
JJ
3730 PR c/67500
3731 * c-parser.c (c_parser_omp_clause_aligned,
3732 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3733 test for errors.
3734 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3735 error_mark_node.
3736
f4b189d5
JJ
3737 PR c/67495
3738 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3739 instead of c_parser_unary_expression. If the result is !lvalue_p,
3740 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3741
b2aaf235
MP
37422015-09-04 Marek Polacek <polacek@redhat.com>
3743
3744 PR sanitizer/67279
3745 * c-typeck.c (build_binary_op): Don't instrument static initializers.
3746
1807ffc1
MS
37472015-09-03 Martin Sebor <msebor@redhat.com>
3748
3749 PR c/66516
8b652e65
JJ
3750 * c-typeck.c (convert_arguments, parser_build_unary_op,
3751 build_conditional_expr, c_cast_expr, convert_for_assignment,
3752 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
3753 reject_gcc_builtin.
3754 (c_decl_implicit): Define.
3755
d04ff417
MP
37562015-09-02 Marek Polacek <polacek@redhat.com>
3757
3758 PR c/67432
3759 * c-parser.c (c_parser_enum_specifier): Give a better error for
3760 an empty enum.
3761
a79683d5
TS
37622015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3763
3764 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3765
191a6b94
MP
37662015-08-12 Marek Polacek <polacek@redhat.com>
3767
3768 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
3769 LOC to it.
3770
420a9d9b
MP
37712015-08-03 Marek Polacek <polacek@redhat.com>
3772
3773 PR c/67088
3774 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
3775 Use it.
3776 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
3777
992118a1
PP
37782015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3779
3780 * c-parser.c (c_parser_if_body): Take token_indent_info
3781 argument. Call warn_for_misleading_indentation even when the
3782 body is a semicolon. Extract token_indent_infos corresponding
3783 to the guard, body and next tokens. Adjust call to
3784 warn_for_misleading_indentation accordingly.
3785 (c_parser_else_body): Likewise.
3786 (c_parser_if_statement): Likewise.
3787 (c_parser_while_statement): Likewise.
3788 (c_parser_for_statement): Likewise.
3789
46308474
LFSM
37902015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
3791 Manuel López-Ibáñez <manu@gcc.gnu.org>
3792
3793 * c-decl.c (get_parm_info): Remove static var. Update warning
3794 message.
3795
05b28fd6
MP
37962015-07-27 Marek Polacek <polacek@redhat.com>
3797
3798 PR c++/66555
3799 PR c/54979
3800 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3801
451b5e48
MP
38022015-07-20 Marek Polacek <polacek@redhat.com>
3803
3804 PR c++/55095
3805 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3806 (build_binary_op): Warn about left shift overflows.
3807
1916bcb5
AM
38082015-07-09 Andrew MacLeod <amacleod@redhat.com>
3809
3810 * c-array-notation.c: Adjust includes for flags.h changes.
3811 * c-objc-common.c: Likewise.
3812
c7131fb2
AM
38132015-07-07 Andrew MacLeod <amacleod@redhat.com>
3814
3815 * c-array-notation.c: Adjust includes.
3816 * c-aux-info.c: Likewise.
3817 * c-convert.c: Likewise.
3818 * c-decl.c: Likewise.
3819 * c-errors.c: Likewise.
3820 * c-lang.c: Likewise.
3821 * c-objc-common.c: Likewise.
3822 * c-parser.c: Likewise.
3823 * c-typeck.c: Likewise.
3824
da2e71c9
MLI
38252015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3826
3827 PR fortran/66605
3828 * c-decl.c (finish_function): Call do_warn_unused_parameter.
3829
b155cfd9
MP
38302015-06-29 Marek Polacek <polacek@redhat.com>
3831
3832 PR c/66322
3833 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3834 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
3835 about -Wswitch-bool here.
3836 (do_case): Update c_add_case_label call.
3837 (c_finish_case): Update c_do_switch_warnings call.
3838
31521951
MP
38392015-06-27 Marek Polacek <polacek@redhat.com>
3840
3841 * c-typeck.c: Use VECTOR_TYPE_P throughout.
3842
22d03525
MP
38432015-06-26 Marek Polacek <polacek@redhat.com>
3844
3845 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3846 INDIRECT_REF_P.
3847 * c-typeck.c (array_to_pointer_conversion): Likewise.
3848 (build_unary_op): Likewise.
3849 (c_finish_return): Likewise.
3850
f0889939
AM
38512015-06-25 Andrew MacLeod <amacleod@redhat.com>
3852
3853 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3854 * c-parser.c: Likewise.
3855
8d67ee55
RS
38562015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3857
3858 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3859 instead of pointer_hash.
3860 (detect_field_duplicates): Likewise.
3861
0ae9bd27
MP
38622015-06-25 Marek Polacek <polacek@redhat.com>
3863
3864 * c-array-notation.c: Use VAR_P throughout.
3865 * c-decl.c: Likewise.
3866 * c-objc-common.c: Likewise.
3867 * c-parser.c: Likewise.
3868 * c-typeck.c: Likewise.
3869
62f9079a
MP
38702015-06-25 Marek Polacek <polacek@redhat.com>
3871
3872 * c-decl.c: Use is_global_var throughout.
3873 * c-parser.c: Likewise.
3874 * c-typeck.c: Likewise.
3875
abb226c9
AM
38762015-06-17 Andrew MacLeod <amacleod@redhat.com>
3877
3878 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3879 * c-aux-info.c: Likewise.
3880 * c-convert.c: Likewise.
3881 * c-decl.c: Likewise.
3882 * c-errors.c: Likewise.
3883 * c-lang.c: Likewise.
3884 * c-objc-common.c: Likewise.
3885 * c-parser.c: Likewise.
3886 * c-typeck.c: Likewise.
3887
8cbababc
JH
38882015-06-11 Jan Hubicka <hubicka@ucw.cz>
3889
3890 PR middle-end/66325
3891 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3892 variants.
3893
a0349665
PMR
38942015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
3895
3896 * c-decl.c (pop_scope): Register the main translation unit
3897 through the new debug hook.
3898
13fdf2e2
AM
38992015-06-08 Andrew MacLeod <amacleod@redhat.com>
3900
3901 * c-array-notation.c : Adjust include files.
3902 * c-aux-info.c : Likewise.
3903 * c-convert.c : Likewise.
3904 * c-decl.c : Likewise.
3905 * c-errors.c : Likewise.
3906 * c-lang.c : Likewise.
3907 * c-lang.h : Likewise.
3908 * c-objc-common.c : Likewise.
3909 * c-parser.c : Likewise.
3910 * c-typeck.c : Likewise.
3911
d7438551
AH
39122015-06-05 Aldy Hernandez <aldyh@redhat.com>
3913
3914 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3915 immediately clobber it.
3916 (c_write_global_declarations_1): Remove call to
3917 check_global_declaration_1.
3918 (c_write_global_declarations_2): Remove.
3919 (c_write_final_cleanups): Rename from c_write_global_declarations.
3920 Remove call to finalize_compilation_unit.
3921 Remove calls to debugging hooks.
3922 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3923 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3924 * c-tree.h: Remove c_write_global_declarations.
3925
ecb9f223
AM
39262015-06-04 Andrew MacLeod <amacleod@redhat.com>
3927
3928 * c-array-notation.c: Adjust includes for restructured coretypes.h.
3929 * c-aux-info.c: Likewise.
3930 * c-convert.c: Likewise.
3931 * c-decl.c: Likewise.
3932 * c-errors.c: Likewise.
3933 * c-lang.c: Likewise.
3934 * c-objc-common.c: Likewise.
3935 * c-parser.c: Likewise.
3936 * c-typeck.c: Likewise.
3937
9482b620
MP
39382015-06-04 Marek Polacek <polacek@redhat.com>
3939
3940 PR c/66341
3941 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3942 it is a lvalue.
3943
bc51ace3
PK
39442015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3945
3946 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3947 Warn for empty struct.
3948 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3949
ea5b45b6
AT
39502015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
3951
3952 * c-decl.c (start_function): Call plugin before parsing.
3953 (finish_function): Call plugin after parsing.
3954
c2d47482
PK
39552015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3956
3957 PR c/49551
3958 * c-decl.c (merge_decls): Merge DECL_COMMON.
3959
a95492ab
JW
39602015-05-22 Jim Wilson <jim.wilson@linaro.org>
3961
3962 * Make-lang.in (check_gcc_pallelize): Define.
3963
fd5c817a
MP
39642015-05-22 Marek Polacek <polacek@redhat.com>
3965
3966 PR c/47043
3967 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
3968 attributes.
3969
c7b70a3c
MP
39702015-05-21 Marek Polacek <polacek@redhat.com>
3971
3972 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3973 DECL_BUILT_IN.
3974
21b634ae
MP
39752015-05-20 Marek Polacek <polacek@redhat.com>
3976
3977 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3978 * c-typeck.c: Likewise.
3979
296a8c2f
MP
39802015-05-19 Marek Polacek <polacek@redhat.com>
3981
3982 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3983
41b37d5e
JJ
39842015-05-19 Jakub Jelinek <jakub@redhat.com>
3985
3986 PR middle-end/66199
3987 * c-parser.c (c_parser_omp_for_loop): Don't add
3988 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3989 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3990 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3991 constructs.
3992
fab27f52
MM
39932015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
3994
3995 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 3996 swaps.
fab27f52 3997
40de31cf
MLI
39982015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3999
4000 PR fortran/44054
4001 * c-objc-common.c (c_tree_printer): Replace locus pointer with
4002 accessor function.
4003
3aa3c9fc
MP
40042015-05-14 Marek Polacek <polacek@redhat.com>
4005
4006 PR c/66066
4007 PR c/66127
4008 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
4009 rather than with 0.
4010
c3388e62
DM
40112015-05-12 David Malcolm <dmalcolm@redhat.com>
4012
4013 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
4014 to add a call to warn_for_misleading_indentation.
4015 (c_parser_else_body): Likewise, adding param "else_loc".
4016 (c_parser_if_statement): Check for misleading indentation.
4017 (c_parser_while_statement): Likewise.
4018 (c_parser_for_statement): Likewise.
4019
755e528f
MP
40202015-05-08 Marek Polacek <polacek@redhat.com>
4021
4022 PR c/64918
4023 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
4024 (output_init_element): Likewise.
4025
0173bd2a
MP
40262015-05-07 Marek Polacek <polacek@redhat.com>
4027
4028 PR c/65179
4029 * c-typeck.c (build_binary_op): Warn when left shifting a negative
4030 value.
4031
9babc352
MP
40322015-04-30 Marek Polacek <polacek@redhat.com>
4033
4034 * c-typeck.c (set_init_label): Call error_at instead of error and
4035 pass LOC to it.
4036
ac9f18db
MP
4037 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
4038 the type of a decl.
4039
ec3fba51
MP
4040 * c-typeck.c (c_build_va_arg): Clarify the error message.
4041
b811915d
TS
40422015-04-29 Thomas Schwinge <thomas@codesourcery.com>
4043
4044 * c-parser.c (c_parser_oacc_enter_exit_data): Use
4045 OMP_STANDALONE_CLAUSES.
4046
f3075008
MP
40472015-04-28 Marek Polacek <polacek@redhat.com>
4048
4049 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
4050
4e81b788
MP
40512015-04-28 Marek Polacek <polacek@redhat.com>
4052
4053 PR c/65901
4054 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
4055
6c1db78e
MP
40562015-04-25 Marek Polacek <polacek@redhat.com>
4057
4058 PR c/52085
4059 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
4060 attribute.
4061
5c4abbb8
MP
40622015-04-23 Marek Polacek <polacek@redhat.com>
4063
4064 PR c/65345
4065 * c-decl.c (set_labels_context_r): New function.
4066 (store_parm_decls): Call it via walk_tree_without_duplicates.
4067 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
4068 instead of create_tmp_var. Build TARGET_EXPR instead of
4069 COMPOUND_EXPR.
4070 (build_atomic_assign): Use create_tmp_var_raw instead of
4071 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
4072
06aca1d5
IV
40732015-04-20 Ilya Verbin <ilya.verbin@intel.com>
4074
4075 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
4076 (c_parser_omp_target_update): Add missed %> to error_at ().
4077
8fba1830
BRF
40782015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
4079
4080 PR target/55143
4081 * c-decl.c (c_default_pointer_mode): Remove definition.
4082 * c-tree.h (c_default_pointer_mode): Remove declaration.
4083
62021f64
TB
40842015-03-27 Tobias Burnus <burnus@net-b.de>
4085
4086 PR c/65586
4087 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
4088 error out.
4089 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
4090 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
4091 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
4092
9b65e171
JJ
40932015-03-19 Jakub Jelinek <jakub@redhat.com>
4094
4095 * c-decl.c (c_decl_attributes): Also add "omp declare target"
4096 attribute for DECL_EXTERNAL VAR_DECLs.
4097
17958621
JJ
40982015-03-11 Jakub Jelinek <jakub@redhat.com>
4099
4100 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
4101 argument.
4102
7ccb1a11
JJ
41032015-03-10 Jakub Jelinek <jakub@redhat.com>
4104
4105 PR c/65120
4106 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
4107 before preparing arguments to warn_logical_not_parentheses.
4108
01177669
JJ
41092015-03-09 Jakub Jelinek <jakub@redhat.com>
4110
4111 PR c/65120
4112 * c-typeck.c (parser_build_binary_op): Don't warn for
4113 !!x == y or !b == y where b is _Bool.
4114
802ac282
MP
41152015-03-09 Marek Polacek <polacek@redhat.com>
4116
4117 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
4118 * c-decl.c (grokdeclarator): Likewise.
4119 * c-typeck.c (build_binary_op): Likewise.
4120
e5165b60
MP
41212015-02-27 Marek Polacek <polacek@redhat.com>
4122
4123 PR c/65228
4124 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
4125
065d214c
MP
41262015-02-14 Marek Polacek <polacek@redhat.com>
4127
4128 PR c/64768
4129 * c-decl.c (grokdeclarator): Set the range of a flexible array member
4130 declared through a typedef name.
4131
e5d9235b
MP
41322015-02-13 Marek Polacek <polacek@redhat.com>
4133
4134 PR c/65050
4135 * c-decl.c (grokdeclarator): Print also the type when giving
4136 the error message about array's incomplete element type.
4137
fa01ffcc
JJ
41382015-02-11 Jakub Jelinek <jakub@redhat.com>
4139
4140 PR c/64824
4141 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
4142 check in the POP macro.
4143
c3e38a03
MP
41442015-02-09 Marek Polacek <polacek@redhat.com>
4145
4146 PR c/64856
4147 * c-typeck.c (process_init_element): Don't always wrap
4148 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
4149 initializing a range of elements.
4150
4886ec8e
JJ
41512015-02-04 Jakub Jelinek <jakub@redhat.com>
4152
4153 PR c/64824
4154 PR c/64868
4155 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
4156
c3e38a03 41572015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
4158
4159 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
4160 processing enum declaration.
4161
7b33f0c8
MP
41622015-01-29 Marek Polacek <polacek@redhat.com>
4163
4164 PR c/64709
4165 * c-typeck.c (pop_init_level): If constructor_elements has
4166 exactly one element with integer_zerop value, set constructor_zeroinit
4167 to 1. Remove braces around warning_init call.
4168
dea63e49
JJ
41692015-01-27 Jakub Jelinek <jakub@redhat.com>
4170
4171 PR c/64766
4172 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
4173 of FUNCTION_DECLs with error_mark_node.
4174
d38f7dce
JJ
41752015-01-26 Jakub Jelinek <jakub@redhat.com>
4176
4177 PR c/64778
4178 * c-typeck.c (convert_arguments): Return -1 if there are
4179 error_args, even if we've diagnosed too many arguments.
4180
cbf5d0e7
RB
41812015-01-21 Richard Biener <rguenther@suse.de>
4182
4183 PR middle-end/64313
4184 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
4185 for builtins the user declared correctly.
4186
41dbbb37
TS
41872015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4188 Bernd Schmidt <bernds@codesourcery.com>
4189 Cesar Philippidis <cesar@codesourcery.com>
4190 James Norris <jnorris@codesourcery.com>
4191 Jakub Jelinek <jakub@redhat.com>
4192 Ilmir Usmanov <i.usmanov@samsung.com>
4193
4194 * c-parser.c: Include "gomp-constants.h".
4195 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
4196 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
4197 Use OMP_CLAUSE_SET_MAP_KIND.
4198 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
4199 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
4200 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
4201 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
4202 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
4203 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
4204 "copyout", "create", "delete", "deviceptr", "gang", "host",
4205 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
4206 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
4207 "present_or_create", "pcreate", "seq", "self", "vector",
4208 "vector_length", "wait", "worker".
4209 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
4210 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
4211 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
4212 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
4213 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
4214 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
4215 (c_parser_oacc_data_clause_deviceptr)
4216 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
4217 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
4218 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
4219 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
4220 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
4221 (c_parser_oacc_parallel, c_parser_oacc_update)
4222 (c_parser_oacc_wait): New functions.
4223 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
4224 (c_finish_oacc_data): New prototypes.
4225 * c-typeck.c: Include "gomp-constants.h".
4226 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
4227 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
4228 OMP_CLAUSE_SET_MAP_KIND.
4229 (c_finish_oacc_parallel, c_finish_oacc_kernels)
4230 (c_finish_oacc_data): New functions.
4231 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
4232 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
4233 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
4234 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
4235 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
4236 GOMP_MAP_FORCE_DEVICEPTR.
4237
adfac8df
JJ
42382015-01-09 Michael Collison <michael.collison@linaro.org>
4239
4240 * c-array-notation.c: Include hash-set.h, machmode.h,
4241 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4242 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
4243 * c-aux-info.c: Ditto.
4244 * c-convert.c: Ditto.
4245 * c-decl.c: Ditto.
4246 * c-errors.c: Ditto.
4247 * c-lang.c: Dittoxs.
4248 * c-objc-common.c: Ditto.
4249 * c-parser.c: Ditto.
4250 * c-typeck.c: Include hash-set.h, machmode.h,
4251 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4252 fold-const.h, wide-int.h, inchash.h, real.h and
4253 fixed-value.h due to flattening of tree.h.
4254
2cc901dc
MP
42552015-01-07 Marek Polacek <polacek@redhat.com>
4256
4257 PR c/64417
4258 * c-typeck.c (process_init_element): Disallow initialization of
4259 a flexible array member with a string constant if the structure
4260 is in an array.
4261
5624e564
JJ
42622015-01-05 Jakub Jelinek <jakub@redhat.com>
4263
e5341100
JJ
4264 PR sanitizer/64344
4265 * c-typeck.c (convert_for_assignment, c_finish_return): For
4266 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
4267 types also set in_late_binary_op around convert call.
4268 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
4269 to integral type casts, if not in_late_binary_op, pass c_fully_fold
4270 result on expr as last argument to ubsan_instrument_float_cast,
4271 if in_late_binary_op, don't use c_save_expr but save_expr.
4272
5624e564
JJ
4273 Update copyright years.
4274
5bd012f8
MP
42752015-01-05 Marek Polacek <polacek@redhat.com>
4276
4277 PR c/64423
4278 * c-typeck.c (build_array_ref): Pass loc down to
4279 warn_array_subscript_with_type_char.
4280
3f8257db 42812014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
4282
4283 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 4284 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 4285 element type.
8e745a17 4286 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 4287 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 4288 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 4289 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 4290 to PEDWARN_FOR_QUALIFIERS.
768952be 4291
8f94a8c4
JJ
42922014-12-17 Jakub Jelinek <jakub@redhat.com>
4293
4294 PR sanitizer/64289
4295 * c-convert.c: Include ubsan.h.
4296 (convert): For real -> integral casts and
4297 -fsanitize=float-cast-overflow don't call convert_to_integer, but
4298 instead instrument the float cast directly.
4299
b731b390
JJ
43002014-11-29 Jakub Jelinek <jakub@redhat.com>
4301
4302 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
4303 c_finish_stmt_expr): Remove NULL last argument from
4304 create_tmp_var_raw and create_tmp_var calls.
4305 * c-array-notation.c (fix_builtin_array_notation_fn,
4306 build_array_notation_expr, fix_conditional_array_notations_1,
4307 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
4308
541e35a6
MP
43092014-11-28 Marek Polacek <polacek@redhat.com>
4310
4311 PR c/63862
4312 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
4313 convert the right operand to integer type.
4314
b286be94
MP
43152014-11-25 Marek Polacek <polacek@redhat.com>
4316
4317 PR c/63877
4318 * c-decl.c (start_function): Disable -Wmissing-declarations warning
4319 for inline functions.
4320
aa7da51a
JJ
43212014-11-21 Jakub Jelinek <jakub@redhat.com>
4322
4323 PR target/63764
4324 * c-typeck.c (build_array_ref): Adjust
4325 convert_vector_to_pointer_for_subscript caller. If it returns true,
4326 call non_lvalue_loc on the result.
4327
d876207f
RB
43282014-11-11 Richard Biener <rguenther@suse.de>
4329
4330 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
4331 to true.
4332
e5e44252
AK
43332014-11-10 Andi Kleen <ak@linux.intel.com>
4334
4335 PR c/60804
4336 * c-parser.c (c_parser_statement_after_labels): Call
4337 check_no_cilk.
4338 (c_parser_if_statement): Dito.
4339 (c_parser_switch_statement): Dito.
4340 (c_parser_while_statement): Dito.
4341 (c_parser_do_statement): Dito.
4342 (c_parser_for_statement): Dito.
4343 * c-typeck.c (c_finish_loop): Dito.
4344
13c21655
PC
43452014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
4346
4347 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
4348 OPT_Wshift_count_overflow in the warnings.
4349
2d51fcef
MP
43502014-10-30 Marek Polacek <polacek@redhat.com>
4351
4352 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
4353 print the stripped version as well, if they're not the same.
4354
ef4bddc2
RS
43552014-10-29 Richard Sandiford <richard.sandiford@arm.com>
4356
4357 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
4358 machine_mode.
4359
c582198b
AM
43602014-10-28 Andrew MacLeod <amacleod@redhat.com>
4361
4362 * c-decl.c: Adjust include files.
4363 * c-parser.c: Ditto.
4364
ddc8de03
PM
43652014-10-27 Phil Muldoon <pmuldoon@redhat.com>
4366 Tom Tromey <tromey@redhat.com>
4367
4368 * c-tree.h (enum c_oracle_request): New.
4369 (c_binding_oracle_function): New typedef.
4370 (c_binding_oracle, c_pushtag, c_bind): Declare.
4371 * c-decl.c (c_binding_oracle): New global.
4372 (I_SYMBOL_CHECKED): New macro.
4373 (i_symbol_binding): New function.
4374 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
4375 (I_TAG_CHECKED): New macro.
4376 (i_tag_binding): New function.
4377 (I_TAG_BINDING, I_TAG_DECL): Redefine.
4378 (I_LABEL_CHECKED): New macro.
4379 (i_label_binding): New function.
4380 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
4381 (c_print_identifier): Save and restore c_binding_oracle.
4382 (c_pushtag, c_bind): New functions.
4383
60393bbc
AM
43842014-10-27 Andrew MacLeod <amacleod@redhat.com>
4385
4386 * c-typeck.c: Adjust include files.
4387
d723bb7c
MLI
43882014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
4389
4390 PR c++/53061
4391 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
4392 initialization here...
4393 (c_initialize_diagnostics): ... but here. Set defaults after
4394 building pretty-printer.
4395
1bc5a451
MP
43962014-10-23 Marek Polacek <polacek@redhat.com>
4397
4398 PR c/63626
4399 * c-decl.c (pop_scope): Don't print warning in external_scope.
4400
4435bb92
MP
44012014-10-19 Marek Polacek <polacek@redhat.com>
4402
4403 PR c/63567
4404 * c-typeck.c (output_init_element): Allow initializing objects with
4405 static storage duration with compound literals even in C99 and add
4406 pedwarn for it.
4407
7278465e
MP
44082014-10-17 Marek Polacek <polacek@redhat.com>
4409
4410 PR c/63567
4411 * c-typeck.c (digest_init): Allow initializing objects with static
4412 storage duration with compound literals even in C99 and add pedwarn
4413 for it.
4414
d9b7be2e
MP
44152014-10-17 Marek Polacek <polacek@redhat.com>
4416
4417 PR c/63543
4418 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
4419 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
4420 error multiple times. Print the type.
4421
f406ae1f
MP
44222014-10-17 Marek Polacek <polacek@redhat.com>
4423
4424 PR c/63549
4425 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
4426 type.
4427
92574c7c
MP
44282014-10-17 Marek Polacek <polacek@redhat.com>
4429
4430 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
4431 (start_function): Use OPT_Wimplicit_int instead of 0.
4432 (store_parm_decls_oldstyle): Likewise.
4433
1bc4a978
MT
44342014-10-17 Alan Modra <amodra@gmail.com>
4435
4436 PR middle-end/61848
4437 * c-decl.c (merge_decls): Don't merge section name or tls model
4438 to newdecl symtab node, instead merge to olddecl. Override
4439 existing olddecl section name. Set tls_model for all thread-local
4440 vars, not just OMP thread-private ones. Remove incorrect comment.
4441
83685514
AM
44422014-10-16 Andrew MacLeod <amacleod@redhat.com>
4443
4444 * c-decl.c: Adjust include files.
4445
78a7c317
DD
44462014-10-14 DJ Delorie <dj@redhat.com>
4447
4448 * c-parser.c (c_parse_init): Add RID entries for each __intN.
4449 (c_token_starts_typename): Check all __intN, not just __int128.
4450 (c_token_starts_declspecs): Likewise.
4451 (c_parser_declspecs): Likewise.
4452 (c_parser_attribute_any_word): Likewise.
4453 (c_parser_objc_selector): Likewise.
4454 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
4455 (struct c_declspecs): Add int_n_idx field to record *which* __intN
4456 is specified.
4457 * c-decl.c (declspecs_add_type): Check for all __intN, not just
4458 __int128.
4459 (finish_declspecs): Likewise.
4460
74d98c1e
AB
44612014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
4462
8e745a17 4463 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 4464 the duplicate code.
8e745a17 4465 (c_parser_statement): Call the new function.
74d98c1e 4466
84937de2
MP
44672014-10-09 Marek Polacek <polacek@redhat.com>
4468
4469 PR c/63480
4470 * c-typeck.c (pop_init_level): Don't warn about initializing
4471 with { }.
4472
0382aaa0
MP
44732014-10-07 Marek Polacek <polacek@redhat.com>
4474
4475 PR c/59717
4476 * c-decl.c (header_for_builtin_fn): New function.
4477 (implicitly_declare): Suggest which header to include.
4478
7a0ca710
MP
44792014-10-07 Marek Polacek <polacek@redhat.com>
4480
4481 * c-convert.c (convert): Use error_operand_p.
4482 * c-typeck.c (require_complete_type): Likewise.
4483 (really_atomic_lvalue): Likewise.
4484 (digest_init): Likewise.
4485 (handle_omp_array_sections_1): Likewise.
4486
6bc8a126
MP
44872014-10-03 Marek Polacek <polacek@redhat.com>
4488
4489 PR c/63453
4490 * c-decl.c (pop_scope): Don't warn about "inline function declared
4491 but never defined" for functions marked with gnu_inline attribute.
4492
d90c0a59
JJ
44932014-09-25 Jakub Jelinek <jakub@redhat.com>
4494
4495 PR c++/63249
4496 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
4497 on low_bound and length.
4498
083e891e
MP
44992014-09-24 Marek Polacek <polacek@redhat.com>
4500
4501 PR c/61405
4502 PR c/53874
4503 * c-parser.c: Don't define CPP_KEYWORD.
4504 (c_parser_switch_statement): Pass original type to c_finish_case.
4505 * c-tree.h (c_finish_case): Update declaration.
4506 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
4507 conditionally to c_do_switch_warnings.
4508
8d95fe25
MP
45092014-09-03 Marek Polacek <polacek@redhat.com>
4510
4511 PR c/62024
4512 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
4513 conversions.
4514
9a771876
JJ
45152014-09-02 Jakub Jelinek <jakub@redhat.com>
4516 Balaji V. Iyer <balaji.v.iyer@intel.com>
4517 Igor Zamyatin <igor.zamyatin@intel.com>
4518
4519 * c-parser.c (c_parser_cilk_for): New function.
4520 (c_parser_cilk_grainsize): Likewise.
4521 (c_get_temp_regvar): Likewise.
4522 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
4523 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
4524 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
4525 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
4526 case.
4527
b7679d96
CG
45282014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
4529
4530 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
4531 with using HOST_WIDE_INT without truncation to 'int'
4532
59ea0364
MP
45332014-08-22 Marek Polacek <polacek@redhat.com>
4534
4535 PR c++/62199
4536 * c-typeck.c (parser_build_binary_op): Adjust call to
4537 warn_logical_not_parentheses.
4538
671a475e
IZ
45392014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
4540
4541 PR other/62008
4542 * c-parser.c (c_parser_array_notation): Check for correct
4543 type of an array added.
4544
04159acf
MP
45452014-08-19 Marek Polacek <polacek@redhat.com>
4546
4547 PR c++/62153
4548 * c-typeck.c (build_binary_op): If either operand of a comparison
4549 is a boolean expression, call maybe_warn_bool_compare.
4550
c77935ee
PP
45512014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
4552
4553 PR c/45584
4554 * c-typeck.c (build_c_cast): Do a conversion even when the
4555 TYPE_MAIN_VARIANTs are the same.
4556
35aff4fb
MP
45572014-08-19 Marek Polacek <polacek@redhat.com>
4558
4559 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
4560 pedwarn_c99 instead of pedwarn.
4561 (grokfield): Likewise.
4562 (warn_defaults_to): New function.
4563 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
4564 Unconditionally call pedwarn_c99 instead of pedwarn.
4565 (start_function): Call warn_defaults_to instead of pedwarn_c99.
4566 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
4567 check flag_isoc11 before.
4568 * c-errors.c (pedwarn_c99): Change the return type to bool.
4569 Handle -Wc99-c11-compat.
4570 * c-parser.c (disable_extension_diagnostics): Handle
4571 warn_c99_c11_compat.
4572 (restore_extension_diagnostics): Likewise.
4573 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
4574 instead of pedwarn, don't check flag_isoc11 before.
4575 (c_parser_declspecs): Likewise.
4576 (c_parser_alignas_specifier): Likewise.
4577 (c_parser_alignof_expression): Likewise.
4578 (c_parser_generic_selection): Likewise.
4579 * c-tree.h (pedwarn_c99): Update declaration.
4580 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
4581 of pedwarn_c99.
4582
177cce46
MP
45832014-08-19 Marek Polacek <polacek@redhat.com>
4584
4585 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
4586 to pedwarn_c90.
4587 * c-errors.c: Include "opts.h".
4588 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
4589 * c-parser.c (disable_extension_diagnostics): Handle negative value
4590 of warn_c90_c99_compat, too.
4591 (restore_extension_diagnostics): Likewise.
4592 (c_parser_compound_statement_nostart): Pass
4593 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
4594
6dc99c33
MP
45952014-08-12 Marek Polacek <polacek@redhat.com>
4596
4597 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
4598 Add pedwarn.
4599 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
4600 Likewise.
4601 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
4602
3f8257db 46032014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
4604
4605 PR c/51849
4606 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
4607 Call pedwarn_c90 instead of pedwarn.
4608 (check_bitfield_type_and_width): Likewise.
4609 (declspecs_add_qual): Likewise.
4610 (declspecs_add_type): Likewise.
4611 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
4612 Adjust to only call pedwarn_c90.
4613 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
4614 pedwarn_c90 instead of pedwarn.
4615 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
4616 * c-parser.c (disable_extension_diagnostics): Handle
4617 warn_c90_c99_compat.
4618 (restore_extension_diagnostics): Likewise.
4619 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
4620 pedwarn_c90 instead of pedwarn.
4621 (c_parser_initelt): Likewise.
4622 (c_parser_postfix_expression): Likewise.
4623 (c_parser_postfix_expression_after_paren_type): Likewise.
4624 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
4625 * c-tree.h: Fix formatting.
4626 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
4627 pedwarn_c90 instead of pedwarn.
4628
9f25a338
TS
46292014-08-07 Trevor Saunders <tsaunders@mozilla.com>
4630
4631 * c-typeck.c: Remove include of pointer-set.h.
4632
044331a8
MP
46332014-08-07 Marek Polacek <polacek@redhat.com>
4634
4635 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
4636
b787e7a2
TS
46372014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4638
4639 * c-typeck.c: Use hash_map instead of pointer_map.
4640
6e2830c3
TS
46412014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4642
4643 * c-decl.c: Use hash_set instead of pointer_set.
4644
a7ee52fb
IZ
46452014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
4646
4647 PR middle-end/61455
4648 * c-array-notation.c (expand_array_notations): Handling
4649 of DECL_EXPR added.
4650
b4dfdc11
MG
46512014-07-31 Marc Glisse <marc.glisse@inria.fr>
4652
4653 PR c++/60517
4654 * c-typeck.c (c_finish_return): Return 0 instead of the address of
4655 a local variable.
4656
976d5a22
TT
46572014-07-30 Tom Tromey <tromey@redhat.com>
4658
4659 * c-typeck.c (struct constructor_stack) <designator_depth>: New
4660 field.
4661 (really_start_incremental_init, push_init_level): Initialize
4662 designator_depth.
4663 (pop_init_level): Set global designator_depth.
4664 (process_init_element): Check for designated_init attribute.
4665
30281de2
MP
46662014-07-20 Marek Polacek <polacek@redhat.com>
4667
4668 PR c/61852
4669 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
4670 (implicitly_declare): Pass location to implicit_decl_warning.
4671
b108f48f
JJ
46722014-07-14 Jakub Jelinek <jakub@redhat.com>
4673
4674 PR middle-end/61294
4675 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
4676 If non-NULL, call c_parser_check_literal_zero.
4677 (c_parser_check_literal_zero): New function.
4678 (c_parser_postfix_expression_after_primary): Adjust
4679 c_parser_expr_list caller, handle -Wmemset-transposed-args.
4680
773ec47f
MP
46812014-07-06 Marek Polacek <polacek@redhat.com>
4682
4683 PR c/6940
4684 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4685 * c-tree.h (C_ARRAY_PARAMETER): Define.
4686 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4687 function parameter.
4688
22e1cf1c 46892014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 4690 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
4691
4692 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4693 releasing symbol.
4694
52ec0ea3
MP
46952014-07-01 Marek Polacek <polacek@redhat.com>
4696
4697 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4698 instead of 0 to WARN_FOR_ASSIGNMENT.
4699
d5c3d343
MP
47002014-07-01 Marek Polacek <polacek@redhat.com>
4701
4702 PR c/58286
4703 * c-typeck.c (convert_for_assignment): Pass
4704 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4705
6a7253a4
MP
47062014-06-30 Marek Polacek <polacek@redhat.com>
4707
4708 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4709 has no_sanitize_undefined attribute.
4710
5e88a8f4
IZ
47112014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
4712
4713 PR middle-end/57541
4714 * c-array-notation.c (fix_builtin_array_notation_fn):
4715 Check for 0 arguments in builtin call. Check that bultin argument is
4716 correct.
4717 * c-parser.c (c_parser_array_notation): Check for incorrect initial
4718 index.
4719
9698b078
SH
47202014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
4721
4722 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
4723 qualifiers in __auto_type for atomic types.
4724 (c_parser_typeof_specifier): Discard all type qualifiers in
4725 __typeof__ for atomic types.
4726
6e07c515
MP
47272014-06-25 Marek Polacek <polacek@redhat.com>
4728
4729 PR c/61162
4730 * c-parser.c (c_parser_statement_after_labels): Pass the location of
4731 the return expression to c_finish_return.
4732
da6f124d
JJ
47332014-06-25 Jakub Jelinek <jakub@redhat.com>
4734
4735 * c-typeck.c (c_finish_omp_clauses): Make sure
4736 OMP_CLAUSE_LINEAR_STEP has correct type.
4737
c203e8a7
TS
47382014-06-24 Trevor Saunders <tsaunders@mozilla.com>
4739
4740 * c-decl.c: Adjust.
4741
56ad0e38
JJ
47422014-06-24 Jakub Jelinek <jakub@redhat.com>
4743
4744 * c-parser.c (c_parser_omp_for_loop): For
4745 #pragma omp parallel for simd move lastprivate clause from parallel
4746 to for rather than simd.
4747
47c2554f
MP
47482014-06-23 Marek Polacek <polacek@redhat.com>
4749
4750 * c-typeck.c (parser_build_binary_op): Don't call
4751 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
4752
56363ffd
JH
47532014-06-15 Jan Hubicka <hubicka@ucw.cz>
4754
4755 * c-parser.c (c_parser_omp_threadprivate): Likewise.
4756 * c-decl.c (merge_decls): Likewise.
4757
d7ff7ae5
MP
47582014-06-09 Marek Polacek <polacek@redhat.com>
4759
4760 PR c/36446
4761 * c-typeck.c (error_init): Call inform instead of error_at.
4762 (pedwarn_init): Call inform instead of pedwarn.
4763 (warning_init): Call inform instead of warning_at.
4764
24d047a3
JH
47652014-06-07 Jan Hubicka <hubicka@ucw.cz>
4766
4767 * c-decl.c (merge_decls): Use set_decl_section_name.
4768 (duplicate_decls): Remove node if it exists.
4769
9bac5cbb
G
47702014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
4771
4772 PR c/53119
4773 * c-typeck.c (push_init_level, process_init_element,
4774 pop_init_level): Correct check for zero initialization, move
4775 missing brace warning to respect zero initialization.
4776
8ffcdea8
MP
47772014-06-05 Marek Polacek <polacek@redhat.com>
4778
4779 PR c/56724
4780 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
4781
742938c9
MP
47822014-06-05 Marek Polacek <polacek@redhat.com>
4783
4784 PR c/49706
4785 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
4786 on the left hand side operand of a comparison.
4787
6447c55d
MP
47882014-06-05 Marek Polacek <polacek@redhat.com>
4789
4790 PR c/48062
4791 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
4792 Print note only if the warning was printed.
4793
9dc7743c
IZ
47942014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
4795
4796 PR c/58942
4797 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4798 with a pointer.
4799
fedfecef
MP
48002014-06-03 Marek Polacek <polacek@redhat.com>
4801
4802 PR c/60439
4803 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4804 c_start_case.
4805 * c-tree.h (c_start_case): Update.
4806 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
4807 switch condition has boolean value.
4808
9b2b7279
AM
48092014-06-02 Andrew MacLeod <amacleod@redhat.com>
4810
4811 * c-decl.c: Include builtins.h.
4812 * c-parser.c: Likewise.
4813
5c1bc275
MP
48142014-05-27 Marek Polacek <polacek@redhat.com>
4815
4816 PR c/56724
4817 * c-typeck.c (convert_arguments): Get location of a parameter. Change
4818 error and warning calls to error_at and warning_at. Pass location of
4819 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
4820 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4821 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
4822
97563bc8
IZ
48232014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
4824
4825 PR c/61191
4826 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4827 function parameters.
4828
aede2c10
JH
48292014-05-23 Jan Hubicka <hubicka@ucw.cz>
4830
4831 * c-decl.c (merge_decls): Preserve symtab node pointers.
4832 (duplicate_decls): Free new decl.
4833
edbba2ce
TS
48342014-05-23 Thomas Schwinge <thomas@codesourcery.com>
4835
f3316c6d
TS
4836 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4837 initialization.
4838
edbba2ce
TS
4839 * c-parser.c (c_parser_omp_target): Return bool values.
4840
68c81f24
TS
48412014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4842
4843 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4844 num_teams_loc variable to num_thread_limit_loc.
4845
632f2871
RS
48462014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4847
4848 * c-array-notation.c (expand_array_notations): Use void_node
4849 instead of void_zero_node.
4850
766090c2
TS
48512014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4852
4853 * c-decl.c (finish_struct): Adjust.
4854 (finish_enum): Likewise.
4855 (bind): Adjust.
4856 (record_inline_static): Likewise.
4857 (push_scope): Likewise.
4858 (make_label): Likewise.
4859 (lookup_label_for_goto): Likewise.
4860 (finish_struct): Likewise.
4861 (finish_enum): Likewise.
4862 (store_parm_decls): Likewise.
4863 (c_push_function_context): Likewise.
4864 * c-lang.h: Remove usage of variable_size gty attribute.
4865 * c-parser.c (c_parse_init): Adjust.
4866 (c_parse_file): Likewise.
4867
2b107f6b
MP
48682014-05-13 Marek Polacek <polacek@redhat.com>
4869
4870 PR c/61162
4871 * c-typeck.c (convert_for_assignment): Pass location to
4872 WARN_FOR_ASSIGNMENT instead of input_location.
4873
d033409e
MP
48742014-05-10 Marek Polacek <polacek@redhat.com>
4875
4876 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4877 maybe_warn_string_init.
4878 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4879 maybe_warn_string_init.
4880 * c-tree.h (maybe_warn_string_init): Update declaration.
4881 * c-typeck.c (maybe_warn_string_init): Add location parameter.
4882 Call pedwarn_init with loc instead of with input_location.
4883 (digest_init): Pass init_loc to maybe_warn_string_init.
4884 (pop_init_level): Call pedwarn_init with loc instead of with
4885 input_location.
4886 (set_init_index): Likewise.
4887 (process_init_element): Likewise.
4888
ea58ef42
MP
48892014-05-09 Marek Polacek <polacek@redhat.com>
4890
4891 PR c/61096
4892 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4893 (c_parser_initelt): Pass location to set_init_label. Pass array index
4894 location to set_init_index.
4895 * c-tree.h (push_init_level): Update declaration.
4896 (pop_init_level): Likewise.
4897 (set_init_index): Likewise.
4898 (set_init_label): Likewise.
4899 * c-typeck.c (error_init): Add location parameter. Call error_at
4900 instead of error.
4901 (digest_init): Pass init_loc to error_init.
4902 (really_start_incremental_init):
4903 (push_init_level): Add location parameter. Pass loc to pop_init_level
4904 and error_init.
4905 (pop_init_level): Likewise.
4906 (set_designator): Add location parameter. Pass loc to pop_init_level,
4907 push_init_level, and error_init.
4908 (set_init_index): Add location parameter. Pass loc to error_init and
4909 set_designator.
4910 (set_init_label): Likewise.
4911 (output_init_element): Pass loc to error_init.
4912 (process_init_element): Pass loc to error_init, pop_init_level,
4913 pedwarn_init, and push_init_level.
4914
661a0813
MP
49152014-05-09 Marek Polacek <polacek@redhat.com>
4916
4917 PR c/50459
4918 * c-parser.c (c_parser_attributes): Parse the arguments as an
4919 expression-list if the attribute takes identifier.
4920
2793eeab
MP
49212014-05-08 Marek Polacek <polacek@redhat.com>
4922
4923 PR c/61053
4924 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4925 TYPE_ALIGN_UNIT.
4926
f827930a
MP
49272014-05-08 Marek Polacek <polacek@redhat.com>
4928
4929 PR c/61077
4930 * c-decl.c (start_function): Warn for _Atomic-qualified return type
4931 of main.
4932
1d60af08
KZ
49332014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4934 Mike Stump <mikestump@comcast.net>
4935 Richard Sandiford <rdsandiford@googlemail.com>
4936
4937 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4938 (finish_enum): Use wide-int interfaces.
4939 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4940 * c-typeck.c (build_c_cast): Likewise.
4941 (set_nonincremental_init_from_string): Likewise.
4942 (c_tree_equal): Likewise.
4943
a0e24419
MP
49442014-05-02 Marek Polacek <polacek@redhat.com>
4945
4946 PR c/25801
4947 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
4948 Return size_one_node when the type is not complete.
4949 (pointer_diff): Remove comment.
4950 (build_unary_op): Improve error messages.
4951
19fc9faa
MP
49522014-05-02 Marek Polacek <polacek@redhat.com>
4953
4954 * c-typeck.c (c_finish_return): Separate warning_at calls.
4955
63bc4e87
MP
49562014-05-02 Marek Polacek <polacek@redhat.com>
4957
4958 * c-tree.h (error_init): Remove declaration.
4959 (pedwarn_init): Likewise.
4960 * c-typeck.c (error_init): Make static and move above.
4961 (pedwarn_init): Likewise.
4962 (warning_init): Move above.
4963 (maybe_warn_string_init): Likewise.
4964
4bd2511b
JL
49652014-05-01 Jeff Law <law@redhat.com>
4966
4967 Revert:
4968
4969 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4970 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
4971 avoid goto.
4972
6a358dcb
MP
49732014-05-02 Marek Polacek <polacek@redhat.com>
4974
4975 PR c/60784
4976 * c-typeck.c (push_init_level): Set constructor_designated to
4977 p->designated for structures.
4978
ae5ebda4
MP
49792014-05-01 Marek Polacek <polacek@redhat.com>
4980
4981 PR c/60915
4982 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4983 function-definition has an attribute after the declarator.
4984
96b40f8d
MP
49852014-05-01 Marek Polacek <polacek@redhat.com>
4986
4987 PR c/60257
4988 * c-typeck.c (warning_init): Add location_t parameter. Call
4989 warning_at instead of warning.
4990 (push_init_level): Pass input_location to warning_init.
4991 (add_pending_init): Add location_t parameter. Pass loc to
4992 warning_init.
4993 (set_nonincremental_init): Pass input_location to add_pending_init.
4994 (set_nonincremental_init_from_string): Likewise.
4995 (output_init_element): Pass loc to warning_init and to
4996 add_pending_init.
4997
32e00768
MP
49982014-05-01 Marek Polacek <polacek@redhat.com>
4999
5000 PR c/43395
5001 * c-typeck.c (c_finish_return): Distinguish between label and variable
5002 when warning about returning local address.
5003
c9379ce2
MP
50042014-05-01 Marek Polacek <polacek@redhat.com>
5005
5006 PR c/29467
5007 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
5008 in C89 mode.
5009
d00887e8
MP
50102014-05-01 Marek Polacek <polacek@redhat.com>
5011
5012 PR c/43245
5013 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
5014 instead of 0 to WARN_FOR_QUALIFIERS.
5015
5436fa2e
MP
50162014-05-01 Marek Polacek <polacek@redhat.com>
5017
5018 PR c/56989
5019 * c-typeck.c (default_conversion): Use better location for
5020 error call.
5021
f8ed5150
MP
50222014-04-30 Marek Polacek <polacek@redhat.com>
5023
5024 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
5025 also when SANITIZE_FLOAT_DIVIDE is on.
5026
8337d1db
MP
50272014-04-30 Marek Polacek <polacek@redhat.com>
5028
5029 PR c/60139
5030 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
5031 and pedwarn_init. Use loc insted of input_location.
5032
c4bdc42f
MP
50332014-04-30 Marek Polacek <polacek@redhat.com>
5034
5035 PR c/60351
5036 * c-typeck.c (build_binary_op): Use location when warning about
5037 shift count.
5038
45484dcf
MP
50392014-04-25 Marek Polacek <polacek@redhat.com>
5040
5041 PR c/18079
5042 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
5043 always_inline/noinline and hot/cold attributes.
5044
34cf811f
MP
50452014-04-25 Marek Polacek <polacek@redhat.com>
5046
5047 PR c/60114
5048 * c-parser.c (c_parser_initelt): Pass input_location to
5049 process_init_element.
5050 (c_parser_initval): Pass loc to process_init_element.
5051 * c-tree.h (process_init_element): Adjust declaration.
5052 * c-typeck.c (push_init_level): Pass input_location to
5053 process_init_element.
5054 (pop_init_level): Likewise.
5055 (set_designator): Likewise.
5056 (output_init_element): Add location_t parameter. Pass loc to
5057 digest_init.
5058 (output_pending_init_elements): Pass input_location to
5059 output_init_element.
5060 (process_init_element): Add location_t parameter. Pass loc to
5061 output_init_element.
5062
42056eac
JJ
50632014-04-24 Jakub Jelinek <jakub@redhat.com>
5064
5065 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
5066 atomic-clause, allow comma in between atomic-clause and
5067 seq_cst.
5068
e162a134
JJ
50692014-04-22 Jakub Jelinek <jakub@redhat.com>
5070
5071 PR c/59073
5072 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
5073 fails, don't set OM_PARALLEL_COMBINED and return NULL.
5074
2f6babac
IZ
50752014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
5076
5077 PR middle-end/60469
5078 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5079 create_tmp_var instead build_decl for creating temps.
5080 (build_array_notation_expr): Likewise.
5081 (fix_conditional_array_notations_1): Likewise.
5082 (fix_array_notation_expr): Likewise.
5083 (fix_array_notation_call_expr): Likewise.
5084
8edbfaa6
JJ
50852014-03-28 Jakub Jelinek <jakub@redhat.com>
5086
5087 PR c++/60689
5088 * c-tree.h (c_build_function_call_vec): New prototype.
5089 * c-typeck.c (build_function_call_vec): Don't call
5090 resolve_overloaded_builtin here.
5091 (c_build_function_call_vec): New wrapper function around
5092 build_function_call_vec. Call resolve_overloaded_builtin here.
5093 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
5094 Call c_build_function_call_vec instead of build_function_call_vec.
5095 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
5096 * c-decl.c (finish_decl): Likewise.
5097
7485aeea
MLI
50982014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5099
5100 PR c/55383
5101 * c-typeck.c: Use correct format string in cast-qual warning
5102
b17a8b07
TS
51032014-03-07 Thomas Schwinge <thomas@codesourcery.com>
5104
5105 * c-decl.c (c_decl_attributes): Use
5106 lang_hooks.types.omp_mappable_type.
5107 * c-typeck.c (c_finish_omp_clauses): Likewise.
5108
3af9c5e9
MP
51092014-03-06 Marek Polacek <polacek@redhat.com>
5110
5111 PR c/60197
5112 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
5113 of checking tree code.
5114
1c9f5f33
PK
51152014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5116
5117 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
5118 (c_parser_parameter_declaration): Likewise.
5119
cc28fc7f
MP
51202014-02-19 Marek Polacek <polacek@redhat.com>
5121
5122 PR c/60195
5123 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
5124 Call mark_exp_read on exp.value.
5125 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
5126 TREE_ADDRESSABLE on old instead of val.
5127 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
5128
b581c05c
PK
51292014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5130
5131 * c-parser.c (c_parser_get_builtin_args): Replace calls to
5132 C_EXPR_APPEND by vec_safe_push.
5133 * c-tree.h (C_EXPR_APPEND): Remove.
5134
81e5eca8
MP
51352014-01-31 Marek Polacek <polacek@redhat.com>
5136
5137 PR c/59963
5138 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
5139 build_function_call_vec.
5140 (build_function_call): Likewise.
5141 (build_atomic_assign): Likewise.
5142 (build_function_call_vec): Add arg_loc parameter. Use it.
5143 (convert_arguments): Likewise.
5144 (convert_for_assignment): Rename rhs_loc to expr_loc.
5145 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
5146 (c_parser_objc_keywordexpr): Likewise.
5147 (c_parser_postfix_expression_after_primary): Call
5148 build_function_call_vec with expr_loc rather than op_loc.
5149 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
5150 build_function_call_vec.
5151 (c_parser_expr_list): Add locations parameter. Fill it with locations
5152 of function arguments.
5153 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
5154
68fca595
MP
51552014-01-30 Marek Polacek <polacek@redhat.com>
5156
5157 PR c/59940
5158 * c-typeck.c (build_function_call_vec): Use loc parameter.
5159 (convert_arguments): Add location parameter. Use it.
5160 (ep_convert_and_check): Likewise.
5161 (build_atomic_assign): Adjust convert_for_assignment call.
5162 (build_modify_expr): Likewise.
5163 (digest_init): Likewise.
5164 (c_finish_return): Likewise.
5165 (build_conditional_expr): Adjust ep_convert_and_check calls.
5166 (convert_for_assignment): Add rhs_loc parameter. Use it.
5167 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
5168 calls.
5169
fa337f3a
RB
51702014-01-30 Richard Biener <rguenther@suse.de>
5171
5172 PR c/59905
5173 * c-typeck.c (build_function_call_vec): Do not replace calls
5174 to a function via an incompatible type with a runtime abort.
5175
b72271b9
BI
51762014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
5177
5178 * c-parser.c (c_parser_declaration_or_fndef): Replaced
5179 flag_enable_cilkplus with flag_cilkplus.
5180 (c_parser_direct_declarator_inner): Likewise.
5181 (c_parser_attribute_any_word): Likewise.
5182 (c_parser_attributes): Likewise.
5183 (c_parser_compound_statement): Likewise.
5184 (c_parser_statement_after_labels): Likewise.
5185 (c_parser_if_statement): Likewise.
5186 (c_parser_switch_statement): Likewise.
5187 (c_parser_do_statement): Likewise.
5188 (c_parser_for_statement): Likewise.
5189 (c_parser_unary_expression): Likewise.
5190 (c_parser_postfix_expression): Likewise.
5191 (c_parser_postfix_expression_after_primary): Likewise.
5192 (c_parser_postfix_expression_after_primary): Likewise.
5193 (c_parser_omp_clause_name): Likewise.
5194 (c_finish_omp_declare_simd): Likewise.
5195 (c_parser_cilk_verify_simd): Likewise.
5196 * c-typeck.c (build_array_ref): Likewise.
5197 (build_function_call_vec): Likewise.
5198 (convert_arguments): Likewise.
5199 (build_compound_expr): Likewise.
5200 (c_finish_return): Likewise.
5201 (c_finish_if_stmt): Likewise.
5202 (c_finish_loop): Likewise.
5203 (build_binary_op): Likewise.
5204
393e8e8b
MP
52052014-01-23 Marek Polacek <polacek@redhat.com>
5206
5207 PR c/59846
5208 * c-typeck.c (parser_build_binary_op): Use location instead of
5209 input_location.
5210 (build_binary_op): Pass location to shorten_compare.
5211
f04dda30
MP
52122014-01-23 Marek Polacek <polacek@redhat.com>
5213
5214 PR c/58346
5215 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
5216 an empty aggregate.
5217
789eadcd
MP
52182014-01-23 Marek Polacek <polacek@redhat.com>
5219
5220 PR c/59871
5221 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
5222 of a comma expression.
5223 (emit_side_effect_warnings): Likewise.
5224
40f14e9f
BI
52252014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5226
5227 PR c/59825
5228 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
5229 function to use walk_tree and moved a lot of its functionality to
5230 expand_array_notations.
5231 (expand_array_notations): New function.
5232
74558dd9
BI
52332014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5234
5235 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
5236 attribute an attribute without value.
5237
652fea39
JJ
52382014-01-23 Jakub Jelinek <jakub@redhat.com>
5239
5240 PR middle-end/58809
5241 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
5242 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
5243
f34f1c87
MP
52442014-01-22 Marek Polacek <polacek@redhat.com>
5245
5246 PR c/59891
5247 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
5248 of remove_c_maybe_const_expr on op1 and op2.
5249
241f845a
JJ
52502014-01-15 Jakub Jelinek <jakub@redhat.com>
5251
5252 PR c/58943
5253 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
5254 effects, preevaluate rhs using SAVE_EXPR first.
5255
9a74f20c
BI
52562014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
5257
5258 PR c++/59631
5259 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
5260 statements with if-elseif statements.
5261
96066ce1
MP
52622014-01-06 Marek Polacek <polacek@redhat.com>
5263
5264 PR c/57773
5265 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
5266 defined bit-field types only in ISO C.
5267
23a5b65a
RS
52682014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5269
5270 Update copyright years
5271
f9030485
RS
52722014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5273
5274 * c-array-notation.c: Use the standard form for the copyright notice.
5275
41958c28
BI
52762013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
5277
5278 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
5279 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
5280 field in parser is not empty. If not-empty, call the function
5281 c_parser_finish_omp_declare_simd.
5282 (c_parser_cilk_clause_vectorlength): Modified function to be shared
5283 between SIMD-enabled functions and #pragma simd. Added new parameter.
5284 (c_parser_cilk_all_clauses): Modified the usage of the function
5285 c_parser_cilk_clause_vectorlength as mentioned above.
5286 (c_parser_cilk_simd_fn_vector_attrs): New function.
5287 (c_finish_cilk_simd_fn_tokens): Likewise.
5288 (is_cilkplus_vector_p): Likewise.
5289 (c_parser_omp_clause_name): Added checking for "vectorlength,"
5290 "nomask," and "mask" strings in clause name.
5291 (c_parser_omp_all_clauses): Added 3 new case statements:
5292 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
5293 PRAGMA_CILK_CLAUSE_NOMASK.
5294 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
5295 check for vector attribute and if so call the function
5296 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
5297 called the function c_finish_cilk_simd_fn_tokens.
5298 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
5299 parser field is non-empty. If so, parse them as you would parse
5300 the omp declare simd pragma.
5301 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
5302 Added a check when step is a parameter and flag it as error.
5303 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
5304 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
5305 pragma_omp_clause.
5306
cef0fd0e
TS
53072013-12-17 Thomas Schwinge <thomas@codesourcery.com>
5308
5309 * c-parser.c (c_parser_omp_parallel): Fix description.
5310
12893402
BI
53112013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
5312
5313 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
5314 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5315 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
5316 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
5317
296674db
JM
53182013-12-04 Joseph Myers <joseph@codesourcery.com>
5319
5320 PR c/52023
5321 * c-parser.c (c_parser_alignas_specifier): Use
5322 c_sizeof_or_alignof_type instead of c_alignof.
5323 (c_parser_alignof_expression): Likewise, with min_alignof
5324 parameter depending on alignof spelling used.
5325
edd28054
MP
53262013-12-04 Marek Polacek <polacek@redhat.com>
5327
5328 PR c/54113
5329 * c-decl.c (start_function): Don't warn for missing prototype for
5330 inline functions.
5331
da0fc454
MP
53322013-12-03 Marek Polacek <polacek@redhat.com>
5333
5334 PR c/59351
5335 * c-decl.c (build_compound_literal): Allow compound literals with
5336 empty initial value.
5337
4c2ecab0
JM
53382013-12-02 Joseph Myers <joseph@codesourcery.com>
5339
5340 PR c/58235
5341 * c-typeck.c (build_modify_expr): Diagnose assignment to
5342 expression with array type.
5343
340baef7
JM
53442013-11-29 Joseph Myers <joseph@codesourcery.com>
5345
5346 PR c/42262
5347 * c-typeck.c (process_init_element): Do not treat a string as
5348 initializing a whole array when used with a designator for an
5349 individual element.
5350
6763b9f7
JM
53512013-11-29 Joseph Myers <joseph@codesourcery.com>
5352
5353 PR c/57574
5354 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
5355 an inline function following a static declaration.
5356
e7bd1de1
JJ
53572013-11-28 Jakub Jelinek <jakub@redhat.com>
5358
5359 PR c/59310
5360 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
5361 to p_name before calling c_parser_omp_teams instead of after.
5362 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
5363 argument. Remove unused p_name variable.
5364
0136f8f0
AH
53652013-11-27 Aldy Hernandez <aldyh@redhat.com>
5366 Jakub Jelinek <jakub@redhat.com>
5367
5368 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
5369 external_scope is NULL.
5370
241b71bb
TV
53712013-11-27 Tom de Vries <tom@codesourcery.com>
5372 Marc Glisse <marc.glisse@inria.fr>
5373
5374 PR c++/59032
5375 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
5376
2fb9a547
AM
53772013-11-22 Andrew MacLeod <amacleod@redhat.com>
5378
5379 * c-typeck.c: Add required include files from gimple.h.
5380
8400e75e
DM
53812013-11-22 David Malcolm <dmalcolm@redhat.com>
5382
5383 * c-decl.c (define_label, shadow_tag_warned)
5384 (check_bitfield_type_and_width, grokdeclarator, grokparms,
5385 store_parm_decls_newstyle, store_parm_decls_oldstyle)
5386 (declspecs_add_type): Remove use of in_system_header macro.
5387 * c-parser.c (c_parser_unary_expression): Likewise.
5388 * c-typeck.c (store_init_value, process_init_element)
5389 (c_start_case): Likewise.
5390
5391 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
5392 macro.
5393
5394 * c-parser.c (c_parser_set_source_position_from_token): Remove
5395 reference to in_system_header from comment.
5396
386b1f1f
RS
53972013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5398
5399 * c-decl.c (grokdeclarator): Update comment to refer to
5400 tree_to_[su]hwi rather than tree_low_cst.
5401
ae7e9ddd
RS
54022013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5403
5404 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
5405 tree_to_uhwi throughout.
5406
9439e9a1
RS
54072013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5408
5409 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
5410 throughout.
5411
9541ffee
RS
54122013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5413
5414 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
5415 throughout.
5416
c02065fc
AH
54172013-11-15 Aldy Hernandez <aldyh@redhat.com>
5418
5419 * c-parser.c (c_parser_cilk_simd): New.
5420 (c_parser_cilk_verify_simd): New.
5421 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
5422 (c_parser_omp_for_loop): Add case for NE_EXPR.
5423 Set c_break_label for CILK_SIMD.
5424 (c_parser_cilk_clause_vectorlength): New.
5425 (c_parser_cilk_clause_linear): New.
5426 (c_parser_cilk_clause_name): New.
5427 (c_parser_cilk_all_clauses): New.
5428 * c-typeck.c (build_unary_op): Pass location argument to
5429 readonly_error.
5430 (build_modify_expr): Same.
5431 (build_asm_expr): Same.
5432 (c_finish_bc_stmt): Error on break/continue in loops.
5433
18f429e2
AM
54342013-11-14 Andrew MacLeod <amacleod@redhat.com>
5435
5436 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
5437
d8a2d370
DN
54382013-11-14 Diego Novillo <dnovillo@google.com>
5439
5440 * c-decl.c: Include print-tree.h.
5441 Include stor-layout.h.
5442 Include varasm.h.
5443 Include attribs.h.
5444 Include stringpool.h.
5445 * c-lang.c: Include fold-const.h.
5446 * c-parser.c: Include stringpool.h.
5447 Include attribs.h.
5448 Include stor-layout.h.
5449 Include varasm.h.
5450 Include trans-mem.h.
5451 * c-typeck.c: Include stor-layout.h.
5452 Include trans-mem.h.
5453 Include varasm.h.
5454 Include stmt.h.
5455
38b7bc7f
JM
54562013-11-13 Joseph Myers <joseph@codesourcery.com>
5457
5458 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
5459 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
5460 __auto_type.
5461 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
5462 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
5463 RID_AUTO_TYPE.
5464 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
5465 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
5466 (c_parser_declarator, c_parser_direct_declarator_inner)
5467 (c_parser_parameter_declaration, c_parser_type_name): All callers
5468 changed.
5469 (c_parser_declaration_or_fndef): Handle declarations with type
5470 determined from the initializer.
5471
45b0be94
AM
54722013-11-12 Andrew MacLeod <amacleod@redhat.com>
5473
18f429e2 5474 * c-typeck.c: Include gimplify.h.
45b0be94 5475
582d9b50
JM
54762013-11-12 Joseph Myers <joseph@codesourcery.com>
5477
5478 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
5479 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
5480 comment.
5481 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
5482 or _Thread_local as appropriate in diagnostics.
5483 (build_null_declspecs): Initialize ret->thread_gnu_p.
5484 (declspecs_add_scspec): Handle either __thread or _Thread_local
5485 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
5486 pedantic. Do not disallow _Thread_local extern and _Thread_local
5487 static.
5488
267bac10
JM
54892013-11-07 Joseph Myers <joseph@codesourcery.com>
5490 Andrew MacLeod <amacleod@redhat.com>
5491
5492 * c-aux-info.c (gen_type): Handle atomic qualifier.
5493 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
5494 qualifiers when compating types.
5495 (shadow_tag_warned): Handle atomic_p in declspecs.
5496 (quals_from_declspecs): Likewise.
5497 (start_decl): Use c_type_promotes_to when promoting argument
5498 types.
5499 (grokdeclarator): Handle _Atomic.
5500 (get_parm_info): Diagnose any qualifier on "void" as only
5501 parameter.
5502 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
5503 comparing types. Use c_type_promotes_to when promoting argument
5504 types.
5505 (finish_function): Use c_type_promotes_to when promoting argument
5506 types.
5507 (build_null_declspecs): Handle atomic_p in declspecs.
5508 (declspecs_add_qual): Handle RID_ATOMIC.
5509 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
5510 (c_token_starts_declspecs): Handle RID_ATOMIC.
5511 (c_parser_declspecs): Handle atomic type specifiers and
5512 qualifiers.
5513 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
5514 from types of expressions with atomic type.
5515 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
5516 (c_parser_attribute_any_word): Handle RID_ATOMIC.
5517 (c_parser_initializer, c_parser_initelt, c_parser_initval)
5518 (c_parser_statement_after_labels, c_parser_switch_statement)
5519 (c_parser_for_statement, c_parser_expr_no_commas)
5520 (c_parser_conditional_expression, c_parser_binary_expression)
5521 (c_parser_cast_expression, c_parser_unary_expression)
5522 (c_parser_postfix_expression)
5523 (c_parser_postfix_expression_after_primary, c_parser_expression):
5524 Use convert_lvalue_to_rvalue.
5525 (c_parser_expression_conv, c_parser_expr_list): Document
5526 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
5527 (c_parser_objc_synchronized_statement): Use
5528 convert_lvalue_to_rvalue.
5529 (c_parser_objc_selector): Handle RID_ATOMIC.
5530 (c_parser_objc_receiver, c_parser_array_notation): Use
5531 convert_lvalue_to_rvalue.
5532 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
5533 _Atomic (type-name).
5534 (struct c_declspecs): Add atomic_p field.
5535 (convert_lvalue_to_rvalue): Declare.
5536 * c-typeck.c (c_type_promotes_to): Promote atomic types to
5537 corresponding atomic types.
5538 (qualify_type): Don't add _Atomic qualifiers from second argument.
5539 (comp_target_types): Do not allow _Atomic mismatches.
5540 (type_lists_compatible_p): Do not remove atomic qualifiers when
5541 comparing types.
5542 (really_atomic_lvalue, convert_lvalue_to_rvalue)
5543 (build_atomic_assign): New functions.
5544 (build_unary_op): Use build_atomic_assign for atomic increment and
5545 decrement.
5546 (build_conditional_expr): Do not treat _Atomic void as a qualified
5547 version of void.
5548 (build_modify_expr): Use build_atomic_assign for atomic LHS.
5549 (find_anonymous_field_with_type, convert_to_anonymous_field)
5550 (convert_for_assignment): Do not remove atomic qualifiers when
5551 comparing types.
5552 (digest_init): Do not accept initialization of arrays of atomic
5553 elements by string constants.
5554 (build_asm_expr): Use convert_lvalue_to_rvalue.
5555 (build_binary_op): Do not treat _Atomic void as a qualified
5556 version of void.
5557
0c249d4b
DD
55582013-11-06 DJ Delorie <dj@redhat.com>
5559
5560 * c-decl.c (locate_old_decl): If a previous conflicting decl is
5561 both explicit and builtin, print the location of the explicit one.
5562
6d7f7e0a
TB
55632013-11-05 Tobias Burnus <burnus@net-b.de>
5564
5565 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
5566 c_parser_omp_distribute, c_parser_omp_teams,
5567 c_parser_omp_target, c_parser_omp_declare): Handle
5568 -fopenmp-simd.
5569
b906f4ca
MP
55702013-11-03 Marek Polacek <polacek@redhat.com>
5571
5572 * c-decl.c (grokdeclarator): Add VLA instrumentation.
5573
ee1d5a02
JJ
55742013-11-01 Jakub Jelinek <jakub@redhat.com>
5575
5576 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
5577 check_dup_generic at the end, unless remove is true.
5578 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
5579 remove = true;.
5580 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
5581
5a9785fb
JJ
55822013-10-31 Jakub Jelinek <jakub@redhat.com>
5583
5584 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
5585 with decl that is not pointer nor array.
5586
939b37da
BI
55872013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
5588
5589 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
5590 a spawning function is found.
5591 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
5592 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
5593 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5594 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
5595 case.
5596 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
5597 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
5598 expr.
5599 (c_finish_return): Added a check to reject _Cilk_spawn in return
5600 expression.
5601 (build_cilk_spawn): New function.
5602 (build_cilk_sync): Likewise.
5603 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
5604
d4af74d4
TB
56052013-10-27 Tobias Burnus <burnus@net-b.de>
5606
5607 PR other/33426
5608 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
5609 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
5610 (c_parser_statement_after_labels): Update calls.
5611
d73749df 56122013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
5613
5614 PR other/33426
5615 * c-parser.c (c_parser_pragma, c_parser_for_statement):
5616 Handle PRAGMA_IVDEP.
5617 (c_parser_statement_after_labels): Update call.
5618
f28aa681
MP
56192013-10-24 Marek Polacek <polacek@redhat.com>
5620
5621 * c-parser.c (c_parser_struct_declaration): Add a comment.
5622 (c_parser_declarator): Don't allow _Alignas here.
5623
0645c1a2
AM
56242013-10-17 Andrew MacLeod <amacleod@redhat.com>
5625
5626 * c-parser.c: Include omp-low.h.
5627 * c-typeck.c: Likewise.
5628
568a31f2
MP
56292013-10-17 Marek Polacek <polacek@redhat.com>
5630
5631 PR c/58267
5632 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
5633 Document syntax of the array-declarator.
5634 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
5635 are not permitted.
5636 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
5637 (c_parser_struct_declaration): Likewise.
5638 (c_parser_declarator): Likewise.
5639 (c_parser_direct_declarator_inner): Likewise.
5640 (c_parser_parameter_declaration): Likewise.
5641 (c_parser_type_name): Likewise.
5642
acf0174b
JJ
56432013-10-11 Jakub Jelinek <jakub@redhat.com>
5644
5645 * c-lang.h (current_omp_declare_target_attribute): New extern
5646 decl.
5647 * c-parser.c: Include c-lang.h.
5648 (struct c_parser): Change tokens to c_token *.
5649 Add tokens_buf field. Change tokens_avail type to unsigned int.
5650 (c_parser_consume_token): If parser->tokens isn't
5651 &parser->tokens_buf[0], increment parser->tokens.
5652 (c_parser_consume_pragma): Likewise.
5653 (enum pragma_context): Add pragma_struct and pragma_param.
5654 (c_parser_external_declaration): Adjust
5655 c_parser_declaration_or_fndef caller.
5656 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
5657 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
5658 Adjust recursive call.
5659 (c_parser_struct_or_union_specifier): Use pragma_struct instead
5660 of pragma_external.
5661 (c_parser_parameter_declaration): Use pragma_param instead of
5662 pragma_external.
5663 (c_parser_compound_statement_nostart, c_parser_label,
5664 c_parser_for_statement): Adjust
5665 c_parser_declaration_or_fndef callers.
5666 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
5667 it through to c_parser_conditional_expression.
5668 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
5669 pass it through to c_parser_binary_expression. Adjust recursive
5670 call.
5671 (c_parser_binary_expression): Remove prec argument, add
5672 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
5673 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
5674 binop matches it, use build2 instead of parser_build_binary_op.
5675 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
5676 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
5677 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
5678 Handle pragma_struct and pragma_param the same as pragma_external.
5679 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5680 (c_parser_omp_variable_list): Parse array sections for
5681 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5682 (c_parser_omp_clause_collapse): Fully fold collapse expression.
5683 (c_parser_omp_clause_reduction): Handle user defined reductions.
5684 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5685 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5686 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5687 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5688 c_parser_omp_clause_depend, c_parser_omp_clause_map,
5689 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5690 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5691 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5692 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
5693 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
5694 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5695 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
5696 (c_parser_omp_for_loop): Add CODE argument, pass it through
5697 to c_finish_omp_for. Change last argument to cclauses,
5698 and adjust uses to grab parallel clauses from the array of all
5699 the split clauses. Adjust c_parser_binary_expression,
5700 c_parser_declaration_or_fndef and c_finish_omp_for callers.
5701 (omp_split_clauses): New function.
5702 (c_parser_omp_simd): New function.
5703 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5704 Allow the function to be called also when parsing combined constructs,
5705 and call c_parser_omp_simd when parsing for simd.
5706 (c_parser_omp_sections_scope): If section-sequence doesn't start with
5707 #pragma omp section, require exactly one structured-block instead of
5708 sequence of statements.
5709 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5710 Allow the function to be called also when parsing combined constructs.
5711 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
5712 Allow the function to be called also when parsing combined
5713 constructs.
5714 (c_parser_omp_taskgroup, c_parser_omp_cancel,
5715 c_parser_omp_cancellation_point, c_parser_omp_distribute,
5716 c_parser_omp_teams, c_parser_omp_target_data,
5717 c_parser_omp_target_update, c_parser_omp_target,
5718 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
5719 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
5720 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
5721 (c_parser_omp_construct): Add p_name and mask vars. Handle
5722 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
5723 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
5724 and c_parser_omp_sections callers.
5725 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
5726 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5727 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5728 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
5729 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
5730 OMP_CLAUSE_DEPEND.
5731 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5732 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5733 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5734 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5735 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5736 * c-typeck.c: Include tree-inline.h.
5737 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5738 handle_omp_array_sections_1, handle_omp_array_sections,
5739 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5740 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5741 user defined reductions.
5742 (c_tree_equal): New function.
5743 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5744 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5745 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5746 c_check_omp_declare_reduction_r): New prototypes.
5747 * c-decl.c (current_omp_declare_target_attribute): New variable.
5748 (c_decl_attributes): New function.
5749 (start_decl, start_function): Use it instead of decl_attributes.
5750 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5751 c_omp_reduction_decl, c_omp_reduction_lookup,
5752 c_check_omp_declare_reduction_r): New functions.
5753
0a6c2227
TT
57542013-09-25 Tom Tromey <tromey@redhat.com>
5755
5756 * Make-lang.in (c/gccspec.o): Remove.
5757 (CFLAGS-c/gccspec.o): New variable.
5758 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
5759 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
5760 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5761
f3bc55f0
TT
57622013-09-25 Tom Tromey <tromey@redhat.com>
5763
5764 * Make-lang.in (c/gccspec.o): Don't use subshell.
5765
a24d975c
MP
57662013-09-18 Marek Polacek <polacek@redhat.com>
5767
5768 PR sanitize/58443
5769 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5770 Remove unnecessary check.
5771
ce6923c5
MP
57722013-09-18 Marek Polacek <polacek@redhat.com>
5773
5774 PR sanitizer/58411
5775 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
5776 no_sanitize_undefined attribute.
5777
a1e51df9
KT
57782013-09-13 Kai Tietz <ktietz@redhat.com>
5779
5780 PR target/57848
5781 * c-decl.c (c_builtin_function_ext_scope): Remove
5782 wrong assumption that it is never called on prexisting
5783 symbol.
5784
0af94e6f
JR
57852013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
5786
5787 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
5788
20059c8b
GDR
57892013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5790
5791 * c-objc-common.c (c_tree_printer): Tidy.
5792
de5a5fa1
MP
57932013-08-30 Marek Polacek <polacek@redhat.com>
5794
5795 * c-typeck.c (build_binary_op): Add division by zero and shift
5796 instrumentation.
5797
2531a1d9 57982013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 5799 Joseph Myers <joseph@codesourcery.com>
2531a1d9 5800
6e2bcc98 5801 PR c/35649
2531a1d9
JR
5802 * c-typeck.c (c_common_type): Prefer double_type_node over
5803 other REAL_TYPE types with the same precision.
5804 (convert_arguments): Likewise.
5805
025311c4
GDR
58062013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5807
5808 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
5809 (c_initialize_diagnostics): Call a destructor for the early printer.
5810
da6ca2b5
GDR
58112013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5812
5813 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5814 printer initialization.
5815
318cda85 58162013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 5817
318cda85
BI
5818 PR c/57490
5819 * c-array-notation.c (fix_conditional_array_notations_1): Added a
5820 check for truth values.
5821 (expand_array_notation_exprs): Added truth values case. Removed an
5822 unwanted else. Added for-loop to walk through subtrees in default
5823 case.
5824
b066401f
GDR
58252013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5826
5827 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5828
fb48aadc
JM
58292013-07-23 Joseph Myers <joseph@codesourcery.com>
5830
5831 * c-parser.c (struct c_generic_association): Fix typo.
5832
433cc7b0
TT
58332013-07-23 Tom Tromey <tromey@redhat.com>
5834 Joseph Myers <joseph@codesourcery.com>
5835
5836 * c-parser.c (struct c_generic_association): New.
5837 (c_generic_association_d): New typedef.
5838 (c_parser_generic_selection): New function.
5839 (c_parser_postfix_expression): Handle RID_GENERIC.
5840
26d40c3d
JM
58412013-07-13 Jason Merrill <jason@redhat.com>
5842
5843 PR c++/57793
5844 * c-decl.c (finish_struct): Check for too-large class.
5845
ecdbd01a 58462013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
5847
5848 PR c/57821
5849 * c-typeck.c (set_init_index): When folding, check for index overflow.
5850
1141ed3f
BI
58512013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5852
5853 * c-parser.c (c_parser_array_notation): Removed rejection of array
5854 notations in an array of function pointers.
5855
713b46fa
BI
58562013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5857
5858 * c-array-notation.c (make_triplet_val_inv): New function.
5859 (create_cmp_incr): Likewise.
5860 (create_array_refs): Likewise.
5861 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5862 Also modularized common parts between functions and called the function.
5863 (build_array_notation_expr): Likewise.
5864 (fix_conditional_array_notations_1): Likewise.
5865 (fix_array_notation_expr): Likewise.
5866 (fix_array_notation_call_expr): Likewise.
5867
92f20202
MP
58682013-06-18 Marek Polacek <polacek@redhat.com>
5869
5870 PR c/57630
5871 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5872
73a23b06
BI
58732013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
5874
5875 * c-array-notation.c (build_array_notation_expr): Reject array notation
5876 mismatch between LHS and RHS even inside a call_expr. Also, removed
5877 a couple while statements that were dead code.
5878
00b8517d
BI
58792013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
5880
5881 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5882 excessive precision expressions in function parameters. Also removed
5883 couple unwanted while statements.
5884
1509bdda
BI
58852013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5886
5887 * c-array-notation.c (expand_array_notation_exprs): Added
5888 ARRAY_NOTATION_REF case.
5889
d60f1706
BI
58902013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5891
5892 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5893 function to c-family/array-notation-common.c.
5894 (is_cilkplus_reduce_builtin): Likewise.
5895 (find_rank): Likewise.
5896 (extract_array_notation_exprs): Likewise.
5897 (replace_array_notations): Likewise.
5898 (find_inv_trees): Likewise.
5899 (replace_inv_trees): Likewise.
5900 (contains_array_notation_expr): Likewise.
5901 (find_correct_array_notation_type): Likewise.
5902 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5903 (struct inv_list): Moved this to c-family/array-notation-common.c.
5904 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5905
6d6efbb3
BI
59062013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
5907
5908 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5909 reduction functions outside the for-loop. Added a check if the fundecl
5910 is non-NULL. Finally, removed an unwanted if-statement, and made the
5911 body unconditional.
5912
25c22937
BI
59132013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5914
5915 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5916 condition of the if-statement matches the rank of else-block and then-
5917 block when array notations are used.
5918 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5919 expression after the entire function body is parsed.
5920 (c_parser_expr_no_commas): Delayed creating array notation expressions
5921 to the end of function parsing.
5922 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5923 whole if-statement instead of just the condition.
5924 (expand_array_notation_exprs): Added MODIFY_EXPR case.
5925
edd25645
BI
59262013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5927
5928 PR c/57474
5929 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5930 array to NULL_TREE if they are unused. Also added a check for the
5931 field to be NULL before its fields are used in future.
5932
065ce7f1
RO
59332013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5934
5935 PR bootstrap/57450
5936 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5937 (build_array_notation_expr): Likewise.
5938
36536d79
BI
59392013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5940
5941 * c-typeck.c (build_array_ref): Added a check to see if array's
5942 index is greater than one. If true, then emit an error.
5943 (build_function_call_vec): Exclude error reporting and checking
5944 for builtin array-notation functions.
5945 (convert_arguments): Likewise.
5946 (c_finish_return): Added a check for array notations as a return
5947 expression. If true, then emit an error.
5948 (c_finish_loop): Added a check for array notations in a loop
5949 condition. If true then emit an error.
5950 (lvalue_p): Added a ARRAY_NOTATION_REF case.
5951 (build_binary_op): Added a check for array notation expr inside
5952 op1 and op0. If present, we call another function to find correct
5953 type.
5954 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
5955 * c-parser.c (c_parser_compound_statement): Check if array
5956 notation code is used in tree, if so, then transform them into
5957 appropriate C code.
5958 (c_parser_expr_no_commas): Check if array notation is used in LHS
5959 or RHS, if so, then build array notation expression instead of
5960 regular modify.
5961 (c_parser_postfix_expression_after_primary): Added a check for
5962 colon(s) after square braces, if so then handle it like an array
5963 notation. Also, break up array notations in unary op if found.
5964 (c_parser_direct_declarator_inner): Added a check for array
5965 notation.
5966 (c_parser_compound_statement): Added a check for array notation in
5967 a stmt. If one is present, then expand array notation expr.
5968 (c_parser_if_statement): Likewise.
5969 (c_parser_switch_statement): Added a check for array notations in
5970 a switch statement's condition. If true, then output an error.
5971 (c_parser_while_statement): Similarly, but for a while.
5972 (c_parser_do_statement): Similarly, but for a do-while.
5973 (c_parser_for_statement): Similarly, but for a for-loop.
5974 (c_parser_unary_expression): Check if array notation is used in a
5975 pre-increment or pre-decrement expression. If true, then expand
5976 them.
5977 (c_parser_array_notation): New function.
5978 * c-array-notation.c: New file.
5979 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5980
cd192ccc
MS
59812013-05-23 Mike Stump <mikestump@comcast.net>
5982
5983 * c-typeck.c (convert_for_assignment): Handle references to memory
5984 spaces better.
5985
427b248d
JM
59862013-05-16 Jason Merrill <jason@redhat.com>
5987
5988 * Make-lang.in (cc1$(exeext)): Use link mutex.
5989
44d90fe1
PC
59902013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5991
5992 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5993 to simply use OPT_Wpointer_arith.
5994 (build_unary_op): Likewise.
5995
4e7d7b3d
JJ
59962013-04-03 Jakub Jelinek <jakub@redhat.com>
5997
5998 PR c/19449
5999 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
6000 argument. If set, or it temporarily for parsing of the first
6001 argument into force_folding_builtin_constant_p.
6002 (c_parser_postfix_expression): Adjust callers.
6003
839b422f
RB
60042013-03-21 Richard Biener <rguenther@suse.de>
6005
6006 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
6007 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
6008
2ee028f1
MP
60092013-02-12 Marek Polacek <polacek@redhat.com>
6010
6011 PR c/44938
6012 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
6013 origtypes to NULL.
6014
8824edff
JJ
60152013-01-24 Jakub Jelinek <jakub@redhat.com>
6016
6017 PR c/56078
6018 * c-typeck.c (set_nonincremental_init_from_string): If
6019 constructor_max_index is NULL, treat it as if tree_int_cst_lt
6020 returned false.
6021 (process_init_element): Likewise.
6022
eadd3d0d
JJ
60232012-12-20 Jakub Jelinek <jakub@redhat.com>
6024
6025 PR c++/55619
6026 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
6027 argument, don't call default_function_array_conversion
6028 nor c_fully_fold here.
6029 (c_parser_asm_statement): Adjust callers.
6030 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
6031 and outputs here, and call default_function_array_conversion
6032 on inputs that don't need to be addressable.
6033
f8a93a2e
JJ
60342012-12-18 Jakub Jelinek <jakub@redhat.com>
6035
6036 PR c/39464
6037 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
6038 warning require that both c_common_unsigned_type as well as
6039 c_common_signed_type is the same for both mvl and mvr types.
6040
9771b263
DN
60412012-11-16 Diego Novillo <dnovillo@google.com>
6042
6043 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
6044
6045 * c-common.c: Use new vec API in vec.h.
6046 * c-common.h: Likewise.
6047 * c-gimplify.c: Likewise.
6048 * c-pragma.c: Likewise.
6049 * c-pretty-print.c: Likewise.
6050 * c-pretty-print.h: Likewise.
6051 * c-semantics.c: Likewise.
6052 * c-decl.c: Likewise.
6053 * c-parser.c: Likewise.
6054 * c-tree.h: Likewise.
6055 * c-typeck.c: Likewise.
6056
880661a4
JW
60572012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
6058
6059 PR c++/54930
6060 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
6061
077d1abe
MLI
60622012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6063
6064 PR c/53066
6065 * c-decl.c (warn_if_shadowing): Do not warn if a variable
6066 shadows a function, unless the variable is a function or a
6067 pointer-to-function.
6068
3a785c97
JJ
60692012-10-12 Jakub Jelinek <jakub@redhat.com>
6070
6071 PR c/54381
6072 * c-parser.c (struct c_tree_loc_pair): Removed.
6073 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
6074 add location_t * and tree * arguments, fill in array of 3
6075 sizeof_arg trees and corresponding locs.
6076 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
6077 c_parser_expr_list callers.
6078 (c_parser_postfix_expression_after_primary): Likewise. Pass
6079 array of 3 sizeof_arg trees and locs (corresponding to first
6080 3 arguments) to sizeof_pointer_memaccess_warning.
6081
703c8606
LC
60822012-10-09 Lawrence Crowl <crowl@google.com>
6083
6084 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
6085 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
6086 hash table.
6087
5d9de0d0
PC
60882012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
6089
6090 PR c++/54194
6091 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
6092 call.
6093
a212e43f
MG
60942012-10-09 Marc Glisse <marc.glisse@inria.fr>
6095
6096 PR c++/54427
6097 * c-typeck.c: Include c-common.h.
6098 (enum stv_conv): Moved to c-common.h.
6099 (scalar_to_vector): Moved to c-common.c.
6100 (build_binary_op): Adapt to scalar_to_vector's new prototype.
6101 * Make-lang.in: c-typeck.c depends on c-common.h.
6102
3b78de56
AC
61032012-10-04 Arnaud Charlet <charlet@adacore.com>
6104
6105 * c-decl.c (c_write_global_declarations): Fix handling of
6106 -fdump-ada-spec*.
6107
78c60e3d
SS
61082012-09-30 Sharad Singhai <singhai@google.com>
6109
6110 * c-decl.c (c_write_global_declarations): Use a different method
6111 to determine if the dump has ben initialized.
6112
9f33203d
JM
61132012-09-14 Joseph Myers <joseph@codesourcery.com>
6114
6115 PR c/54552
6116 * c-typeck.c (c_cast_expr): When casting to a type requiring
6117 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
6118 c_fully_fold first.
6119
a27d595d
JM
61202012-09-14 Joseph Myers <joseph@codesourcery.com>
6121
6122 PR c/54103
6123 * c-typeck.c (build_unary_op): Pass original argument of
6124 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
6125 any C_MAYBE_CONST_EXPR, if it has integer operands.
6126 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
6127 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
6128 to c_objc_common_truthvalue_conversion, then remove any
6129 C_MAYBE_CONST_EXPR, if they have integer operands. Use
6130 c_objc_common_truthvalue_conversion not
6131 c_common_truthvalue_conversion.
6132 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
6133 call note_integer_operands for arguments with integer operands
6134 that are not integer constants.
6135
9feb29df
JJ
61362012-09-13 Jakub Jelinek <jakub@redhat.com>
6137
6138 PR c/54559
6139 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
6140 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
6141
d409320c
JJ
61422012-08-31 Jakub Jelinek <jakub@redhat.com>
6143
6144 PR c/54428
6145 * c-convert.c (convert): Don't call fold_convert_loc if
6146 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
6147 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
6148 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
6149
6265d07c
JJ
61502012-08-24 Jakub Jelinek <jakub@redhat.com>
6151
6152 PR c/54355
6153 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
6154 for nested and empty_ok arguments in the call to
6155 c_parser_declaration_or_fndef.
6156
1a4049e7
JJ
61572012-08-17 Jakub Jelinek <jakub@redhat.com>
6158
6159 * c-tree.h (c_last_sizeof_arg): Declare.
6160 * c-parser.c (struct c_tree_loc_pair): New type.
6161 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
6162 non-NULL.
6163 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
6164 (c_parser_postfix_expression_after_primary): Likewise. Call
6165 sizeof_pointer_memaccess_warning if needed.
6166 (sizeof_ptr_memacc_comptypes): New function.
6167 * c-typeck.c (c_last_sizeof_arg): New global variable.
6168 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
6169
0229aee9
UB
61702012-07-24 Uros Bizjak <ubizjak@gmail.com>
6171
6172 * c-lang.h (lang_decl): Add variable_size GTY option.
6173
7ee2468b
SB
61742012-07-16 Steven Bosscher <steven@gcc.gnu.org>
6175
6176 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
6177 * Make-lang.in: Fix dependencies.
6178
d4a10d0a
SB
61792012-06-29 Steven Bosscher <steven@gcc.gnu.org>
6180
6181 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
6182 and add language Makefile hooks.
6183 * config-lang.in: New file.
6184 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
6185 add the required "normal" config-lang.in rules.
6186 * c-lang.h: Moved from gcc/ to here.
6187 * c-tree.h: Likewise.
6188 * c-objc-common.c: Likewise.
6189 * c-objc-common.h: Likewise.
6190 * c-typeck.c: Likewise.
6191 * c-convert.c: Likewise.
6192 * c-lang.c: Likewise.
6193 * c-aux-info.c: Likewise.
6194 * c-errors.c: Likewise.
6195 * gccspec.c: Likewise.
6196 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
6197 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
6198\f
a5544970 6199Copyright (C) 2012-2019 Free Software Foundation, Inc.
d4a10d0a
SB
6200
6201Copying and distribution of this file, with or without modification,
6202are permitted in any medium without royalty provided the copyright
6203notice and this notice are preserved.