]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
sse.md (define_mode_suffix vecmemsuffix): New.
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
0ecf545c
MS
12019-06-05 Martin Sebor <msebor@redhat.com>
2
3 * c-decl.c (start_decl): Adjust quoting and hyphenation
4 in diagnostics.
5 (finish_decl): Same.
6 (finish_enum): Same.
7 (start_function): Same.
8 (declspecs_add_type): Same.
9 * c-parser.c (warn_for_abs): Same.
10 * c-typeck.c (build_binary_op): Same.
11
e03436e7
TS
122019-05-17 Thomas Schwinge <thomas@codesourcery.com>
13
b48f44bf
TS
14 PR c/89433
15 * c-parser.c (c_finish_oacc_routine): Rework checking if already
16 marked with an OpenACC 'routine' directive.
17
5bf04509
TS
18 PR c/89433
19 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
20 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
21
e03436e7
TS
22 PR c/89433
23 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
24 clauses from "omp declare target" attribute.
25
a9c697b8
MS
262019-05-16 Martin Sebor <msebor@redhat.com>
27
28 * c-decl.c (start_decl): Quote keywords, operators, and
29 types in diagnostics.
30 (finish_decl): Same.
31 * c-parser.c (c_parser_asm_statement): Same.
32 (c_parser_conditional_expression): Same.
33 (c_parser_transaction_cancel): Same.
34 * c-typeck.c (c_common_type): Same.
35 (build_conditional_expr): Same.
36 (digest_init): Same.
37 (process_init_element): Same.
38 (build_binary_op): Same.
39
c4499192
RB
402019-05-17 Richard Biener <rguenther@suse.de>
41
42 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
43 (c_parser_gimple_unary_expression): Likewise.
44 (c_parser_gimple_parentized_ternary_expression): New function.
45
adfe6e4b
RB
462019-05-16 Richard Biener <rguenther@suse.de>
47
48 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
49 (c_parser_gimple_unary_expression): Likewise.
50
186dabf2
RB
512019-05-15 Richard Biener <rguenther@suse.de>
52
53 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
54 __BIT_FIELD_REF.
55
1158c5b4
RB
562019-05-14 Richard Biener <rguenther@suse.de>
57
58 * gimple-parser.c (c_parser_gimple_statement): Remove
59 questionable auto-promotion to VIEW_CONVERT_EXPR.
60 (c_parser_gimple_typespec): Split out from __MEM parsing.
61 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
62 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
63 as __VIEW_CONVERT with -gimple.
64
fd4485aa
ML
652019-05-09 Martin Liska <mliska@suse.cz>
66
67 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
68 __MAX.
69 (c_parser_gimple_unary_expression): Parse also binary expression
70 __MIN and __MAX.
71 (c_parser_gimple_parentized_binary_expression): New function.
72
d276406a
ML
732019-05-09 Martin Liska <mliska@suse.cz>
74
75 * gimple-parser.c (struct gimple_parser): Add probability.
76 for gimple_parser_edge.
77 (gimple_parser::push_edge): Add new argument probability.
78 (c_parser_gimple_parse_bb_spec): Parse also probability
79 if present.
80 (c_parser_parse_gimple_body): Set edge probability.
81 (c_parser_gimple_compound_statement): Consume token
82 before calling c_parser_gimple_goto_stmt.
83 Parse BB counts.
84 (c_parser_gimple_statement): Pass new argument.
85 (c_parser_gimple_goto_stmt): Likewise.
86 (c_parser_gimple_if_stmt): Likewise.
87 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
88 * c-parser.c (c_parser_declaration_or_fndef): Pass
89 hot_bb_threshold argument.
90 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
91 field.
92 (c_parser_gimple_parse_bb_spec_edge_probability): New.
93
f179b64e
JJ
942019-04-26 Jakub Jelinek <jakub@redhat.com>
95
96 PR debug/90197
97 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
98 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
99 (c_parser_do_statement): Likewise.
100 (c_parser_for_statement): Likewise. Formatting fixes.
101 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
102 emit DEBUG_BEGIN_STMTs if needed.
103
e7178413
JJ
1042019-04-19 Jakub Jelinek <jakub@redhat.com>
105
c280b7ee
JJ
106 PR c/89888
107 * c-typeck.c (struct c_switch): Remove outside_range_p member.
108 (c_start_case): Don't clear it.
109 (do_case): Adjust c_add_case_label caller.
110 (c_finish_case): Adjust c_do_switch_warnings caller.
111
e7178413
JJ
112 PR c++/90108
113 * c-decl.c (merge_decls): If remove is main variant and
114 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
115 variant that has newdecl as TYPE_NAME if any.
116
60a2c645
JJ
1172019-04-12 Jakub Jelinek <jakub@redhat.com>
118
119 PR c/89933
120 * c-decl.c (merge_decls): When newdecl's type is its main variant,
121 don't try to remove it from the variant list, but instead assert
122 it has no variants.
123
2a82beaa
RB
1242019-04-01 Richard Biener <rguenther@suse.de>
125
126 PR c/71598
127 * c-tree.h (c_get_alias_set): Declare.
128 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
129 * c-objc-common.c (c_get_alias_set): Treat enumeral types
130 as the underlying integer type.
131
bec1da64
MS
1322019-03-19 Martin Sebor <msebor@redhat.com>
133
134 PR tree-optimization/89688
135 * c-decl.c (finish_decl): Call braced_lists_to_string for more
136 kinds of initializers.
137
855cd9b1
JJ
1382019-03-19 Jakub Jelinek <jakub@redhat.com>
139
140 PR c/89734
141 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
142 return type even if quals_used is 0. Formatting fixes.
143
baa09dc5
RB
1442019-03-14 Richard Biener <rguenther@suse.de>
145
146 * c-tree.h (enum c_declspec_il): New.
147 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
148 enum bitfield.
149 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
150 Pass start pass and declspec_il to c_parser_parse_gimple_body.
151 (c_parser_declspecs): Adjust.
152 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
153 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
154 and bitmap.h.
155 (struct gimple_parser): New.
156 (gimple_parser::push_edge): New method.
157 (c_parser_gimple_parse_bb_spec): New helper.
158 (c_parser_parse_gimple_body): Get start pass and IL specification.
159 Initialize SSA and CFG.
160 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
161 Build a gimple_parser parsing state and pass it along.
162 (c_parser_gimple_statement): Change intermittend __PHI internal
163 function argument for the edge.
164 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
165 (c_parser_gimple_goto_stmt): Record edges to build.
166 (c_parser_gimple_if_stmt): Likewise.
167 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
168 (c_parser_gimple_or_rtl_pass_list): Likewise.
169
a3f9f006
ML
1702019-03-11 Martin Liska <mliska@suse.cz>
171
172 * c-decl.c (check_for_loop_decls): Wrap an option name
173 in a string format message and fix GNU coding style.
174 * c-parser.c (c_parser_declspecs): Likewise.
175
1db01ff9
JJ
1762019-03-08 Jakub Jelinek <jakub@redhat.com>
177
178 PR tree-optimization/89550
179 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
180 returned true.
181 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
182 or warning returned true.
183
66dcb747
JJ
1842019-02-28 Jakub Jelinek <jakub@redhat.com>
185
186 PR c/89525
187 * c-typeck.c (convert_arguments): Call inform_declaration only if
188 the previous warning_at call returned true.
189
2263c9f2
TS
1902019-02-22 Thomas Schwinge <thomas@codesourcery.com>
191
192 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
193 parameter. Adjust all users.
194 (c_parser_oacc_simple_clause): Replace parser with loc formal
195 parameter. Adjust all users.
196
19695f4d
CLT
1972019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
198
199 PR c/87924
200 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
201 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
202
5f88ba10
JJ
2032019-02-15 Jakub Jelinek <jakub@redhat.com>
204
205 PR c/89340
206 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
207 before c_decl_attributes rather than after it.
208
cfc30fd1
JJ
2092019-02-06 Jakub Jelinek <jakub@redhat.com>
210
211 PR c/89211
212 * c-parser.c (c_parser_declaration_or_fndef): Don't update
213 DECL_ARGUMENTS of d if it has been defined already. Use a single if
214 instead of 3 nested ifs.
215
fbe83e6b
JM
2162019-02-06 Joseph Myers <joseph@codesourcery.com>
217
218 PR c/88584
219 * c-decl.c (finish_decl): Do not complete array types for arrays
220 with external linkage not at file scope.
221
f461f938
RB
2222019-02-05 Richard Biener <rguenther@suse.de>
223
224 PR c/88606
225 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
226 all type variants when not supported.
227
fe509359
JJ
2282019-01-30 Jakub Jelinek <jakub@redhat.com>
229
230 PR c/89061
231 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
232 * c-decl.c (decl_jump_unsafe): Return false for
233 C_DECL_COMPOUND_LITERAL_P decls.
234 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
235
6a335b96
JJ
2362019-01-29 Jakub Jelinek <jakub@redhat.com>
237
f4b7e754
JJ
238 PR c/89045
239 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
240 scope.
241
6a335b96
JJ
242 PR c/86125
243 * c-decl.c (last_fileptr_type): Remove.
244 (last_structptr_types): New variable.
245 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
246 {old,new}rettype instead of the types themselves. Assert
247 last_structptr_types array has the same number of elements
248 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
249 argument oldtype and newtype. Instead of handling
250 just fileptr_type_node specially, handle all builtin_structptr_types
251 pointer nodes. Formatting fix.
252
d8b5a1a0
MS
2532019-01-24 Martin Sebor <msebor@redhat.com>
254
255 PR c/86125
256 PR c/88886
257 PR middle-end/86308
258 * c-decl.c (match_builtin_function_types): Add arguments.
259 (diagnose_mismatched_decls): Diagnose mismatched declarations
260 of built-ins more strictly.
261
e21c4491
JJ
2622019-01-24 Jakub Jelinek <jakub@redhat.com>
263
264 PR c++/88976
265 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
266 on #pragma omp cancel with different modifiers.
267
420183d9
L
2682019-01-18 H.J. Lu <hongjiu.lu@intel.com>
269
270 PR c/51628
271 PR c/88664
272 * c-typeck.c (convert_for_assignment): Upate the
273 warn_for_address_or_pointer_of_packed_member call.
274
17ad43dd
TH
2752019-01-16 Tom Honermann <tom@honermann.net>
276 Jason Merrill <jason@redhat.com>
277
278 * c-typeck.c (digest_init): Revised the error message produced for
279 ill-formed cases of array initialization with a string literal.
280 (error_init): Make variadic.
281
5f07d78a
JJ
2822019-01-12 Jakub Jelinek <jakub@redhat.com>
283
284 * c-typeck.c (convert_for_assignment): Fix a comment typo.
285
c4581bbf
JJ
2862019-01-07 Jakub Jelinek <jakub@redhat.com>
287
288 PR c/88701
289 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
290 if current_function_decl is non-NULL.
291
65c5b1eb
JM
2922019-01-07 Joseph Myers <joseph@codesourcery.com>
293
294 PR c/88720
295 PR c/88726
296 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
297 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
298 functions declared but never defined only for external scope, not
299 for other scopes.
300
d8fcab68
JJ
3012019-01-07 Jakub Jelinek <jakub@redhat.com>
302
303 PR c++/85052
304 * c-parser.c (c_parser_postfix_expression): Parse
305 __builtin_convertvector.
306
a5544970
JJ
3072019-01-01 Jakub Jelinek <jakub@redhat.com>
308
309 Update copyright years.
310
da77eace
L
3112018-12-20 H.J. Lu <hongjiu.lu@intel.com>
312
313 PR c/51628
314 * c-typeck.c (convert_for_assignment): Call
315 warn_for_address_or_pointer_of_packed_member.
316
1edf8866
SB
3172018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
318
319 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
320 a more specific error message (instead of just falling through).
321
db4fd626
SB
3222018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
323
324 * c-parser.c (c_parser_asm_statement): Keep track of the location each
325 asm qualifier is first seen; use that to give nicer "duplicate asm
326 qualifier" messages. Delete 'quals" variable, instead pass the
327 "is_volatile_ flag to build_asm_stmt directly.
328 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
329 * c-typeck.c (build_asm_stmt): Ditto; adjust.
330
9c9cfcbb
SB
3312018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
332
333 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
334 "done" boolean variable.
335
a14feb3c
DM
3362018-12-19 David Malcolm <dmalcolm@redhat.com>
337
338 PR c++/87504
339 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
340 Move from here to gcc-rich-location.h and gcc-rich-location.c.
341 (build_binary_op): Use struct op_location_t and
342 class binary_op_rich_location.
343
6d939173
JJ
3442018-12-11 Jakub Jelinek <jakub@redhat.com>
345
346 PR sanitizer/88426
347 * c-convert.c (convert): Call c_fully_fold before calling
348 ubsan_instrument_float_cast.
349
b7055028
SB
3502018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
351
352 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
353 setting "quals".
354
5b76e75f
SB
3552018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
356
357 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
358 after asm. Pass a flag for it to build_asm_expr.
359 * c-tree.h (build_asm_expr): Update declaration.
360 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
361 set ASM_INLINE_P.
362
30bd42b9
SB
3632018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
364
365 PR inline-asm/55681
366 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
367 combination of volatile and goto, in any order, without repetitions.
368
9df6c0e4
JB
3692018-12-04 James Norris <jnorris@codesourcery.com>
370 Cesar Philippidis <cesar@codesourcery.com>
371 Julian Brown <julian@codesourcery.com>
372
373 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
374 code.
375
f44697b7
RB
3762018-11-30 Richard Biener <rguenther@suse.de>
377
378 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
379 _Literal (type) { ... } as empty aggregate or vector constructor.
380
550dfbdc
MS
3812018-11-29 Martin Sebor <msebor@redhat.com>
382
383 PR c/88091
384 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
385 (convert_arguments): Add comments. Pass additional argument to
386 the function above.
387
673670da
MS
3882018-11-29 Martin Sebor <msebor@redhat.com>
389
390 PR c/88172
391 PR testsuite/88208
392 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
393
db1d09b0
MS
3942018-11-23 Martin Sebor <msebor@redhat.com>
395
396 PR testsuite/88098
397 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
398 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
399
98f08eb8
MS
4002018-11-20 Martin Sebor <msebor@redhat.com>
401
402 * c-parser.c (c_parser_has_attribute_expression): New function.
403 (c_parser_attribute): New function.
404 (c_parser_attributes): Move code into c_parser_attribute.
405 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
406
cd5da983
MS
4072018-11-15 Martin Sebor <msebor@redhat.com>
408
409 PR c/83656
410 * c-decl.c (header_for_builtin_fn): Declare.
411 (diagnose_mismatched_decls): Diagnose declarations of built-in
412 functions without a prototype.
413 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
414 (convert_argument): Same.
415 (convert_arguments): Factor code out into convert_argument.
416 Detect mismatches between built-in formal arguments in calls
417 to built-in without prototype.
418 (build_conditional_expr): Same.
419 (type_or_builtin_type): New function.
420 (convert_for_assignment): Add argument. Conditionally issue
421 warnings instead of errors for mismatches.
422
620e594b
DM
4232018-11-13 David Malcolm <dmalcolm@redhat.com>
424
425 * c-decl.c: Replace "source_location" with "location_t".
426 * c-tree.h: Likewise.
427 * c-typeck.c: Likewise.
428 * gimple-parser.c: Likewise.
429
3179ebae
JJ
4302018-11-09 Jakub Jelinek <jakub@redhat.com>
431
81a227c6
JJ
432 * c-parser.c (c_parser_omp_clause_final): Use
433 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
434 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
435 parsing instead of c_parser_paren_condition.
436 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
437 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
438 c_fully_fold instead of c_parser_condition.
439 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
440 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
441 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
442 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
443 c_parser_expr_no_commas instead of c_parser_expression.
444
98c91c56
JJ
445 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
446 reduction clause with inscan modifier.
447
3179ebae
JJ
448 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
449 clauses other than atomic_default_mem_order.
450
28567c40
JJ
4512018-11-08 Jakub Jelinek <jakub@redhat.com>
452
453 * c-parser.c: Include memmode.h.
454 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
455 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
456 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
457 task_reduction clauses.
458 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
459 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
460 section, or lvalue assignment expression.
461 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
462 (c_parser_omp_clause_lastprivate): Parse optional
463 conditional: modifier.
464 (c_parser_omp_clause_hint): Require constant integer expression rather
465 than just integer expression.
466 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
467 clause.
468 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
469 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
470 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
471 functions.
472 (c_parser_omp_clause_depend): Parse iterator modifier and handle
473 iterators. Parse mutexinoutset and depobj kinds.
474 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
475 callers.
476 (c_parser_omp_all_clauses): Likewise. Handle
477 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
478 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
479 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
480 default memory order from requires directive if any. Adjust
481 c_finish_omp_atomic caller.
482 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
483 (c_parser_omp_flush): Parse flush with memory-order-clause.
484 (c_parser_omp_for_loop): Allow NE_EXPR even in
485 OpenMP loops, adjust c_finish_omp_for caller.
486 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
487 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
488 Allow to be called while parsing combined parallel master.
489 Parse combined master taskloop{, simd}.
490 (c_parser_omp_parallel): Parse combined
491 parallel master{, taskloop{, simd}} constructs.
492 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
493 (OMP_TASKGROUP_CLAUSE_MASK): Define.
494 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
495 (OMP_TASKWAIT_CLAUSE_MASK): Define.
496 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
497 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
498 around teams body. Use SET_EXPR_LOCATION.
499 (c_parser_omp_target_data): Allow target data
500 with only use_device_ptr clauses.
501 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
502 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
503 (c_parser_omp_requires): New function.
504 (c_finish_taskloop_clauses): New function.
505 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
506 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
507 declaration. Disallow in_reduction clause when combined with parallel
508 master.
509 (c_parser_omp_construct): Adjust c_parser_omp_master and
510 c_parser_omp_taskgroup callers.
511 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
512 other than cancel.
513 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
514 like OMP_CLAUSE_REDUCTION.
515 (handle_omp_array_sections): Likewise. Call save_expr on array
516 reductions before calling build_index_type. Handle depend clauses
517 with iterators.
518 (struct c_find_omp_var_s): New type.
519 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
520 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
521 with static, runtime or auto schedule kinds. Call save_expr for whole
522 array reduction sizes. Diagnose reductions with zero sized elements
523 or variable length structures. Diagnose nogroup clause used with
524 reduction clause(s). Handle depend clause with
525 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
526 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
527 some different type for other kinds. Use build_unary_op with
528 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
529 Handle depend clauses with iterators. Remove no longer needed special
530 case that predetermined const qualified vars may be specified in
531 firstprivate clause. Complain if const qualified vars are mentioned
532 in data-sharing clauses other than firstprivate or shared. Use
533 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
534 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
535 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
536 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
537
7e2de6df
DM
5382018-10-29 David Malcolm <dmalcolm@redhat.com>
539
540 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
541 logic for change to name_hint::operator bool.
542 (undeclared_variable): Likewise.
543 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
544 (c_parser_parameter_declaration): Likewise.
545
9f936c86
JM
5462018-10-17 Joseph Myers <joseph@codesourcery.com>
547
548 * c-errors.c (pedwarn_c11): New function.
549 * c-parser.c (disable_extension_diagnostics): Save
550 warn_c11_c2x_compat and set it to 0.
551 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
552 (c_parser_static_assert_declaration_no_semi): Handle
553 _Static_assert without string constant.
554 * c-tree.h (pedwarn_c11): New prototype.
555
033eb567
DM
5562018-10-17 David Malcolm <dmalcolm@redhat.com>
557
558 * Make-lang.in (selftest-c): New.
559 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
560 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
561 from gcc/Makefile.in.
562
0edf3afe
RB
5632018-10-02 Richard Biener <rguenther@suse.de>
564
565 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
566
8313a764
JM
5672018-09-26 Joseph Myers <joseph@codesourcery.com>
568
569 PR c/87390
570 * c-typeck.c (build_binary_op): Use excess precision for
571 comparisons of integers and floating-point for C11 and later.
572
ce6f0888
MJ
5732018-09-26 Martin Jambor <mjambor@suse.cz>
574
575 PR c/87347
576 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
577 comment.
578
9c4a4b3c
DM
5792018-09-17 David Malcolm <dmalcolm@redhat.com>
580
581 * c-objc-common.c (range_label_for_type_mismatch::get_text):
582 Update for new param.
583 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
584 Likewise.
585
80c6d1f4
MJ
5862018-09-17 Martin Jambor <mjambor@suse.cz>
587
588 PR c/63886
589 * c-parser.c: (warn_for_abs): New function.
590 (c_parser_postfix_expression_after_primary): Call it.
591
4a426e36
BE
5922018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
593
594 * c-typeck.c (digest_init): Shorten overlength strings.
595
6d900107
BE
5962018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
597
598 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
599
b5764229
BE
6002018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
601
602 * c-decl.c (finish_decl): Call braced_list_to_string here ...
603 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
604
22eea6b2
AM
6052018-08-30 Alexander Monakov <amonakov@ispras.ru>
606
607 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
608 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
609
85204e23
DM
6102018-08-27 David Malcolm <dmalcolm@redhat.com>
611
612 PR 87091
613 * c-decl.c (implicitly_declare): Update call to
614 maybe_add_include_fixit to suggest overriding the location, as it
615 is for a note.
616 * c-objc-common.c (c_tree_printer): Update for conversion of
617 show_caret_p to a tri-state.
618
3d78e008
ML
6192018-08-27 Martin Liska <mliska@suse.cz>
620
621 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
622 fndecl_built_in_p and remove check for FUNCTION_DECL if
623 possible.
3d78e008
ML
624 (diagnose_mismatched_decls): Likewise.
625 (merge_decls): Likewise.
626 (warn_if_shadowing): Likewise.
627 (pushdecl): Likewise.
628 (implicitly_declare): Likewise.
629 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
630 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
631 * c-typeck.c (build_function_call_vec): Likewise.
632 (convert_arguments): Likewise.
633
097f82ec
DM
6342018-08-20 David Malcolm <dmalcolm@redhat.com>
635
636 PR other/84889
637 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
638 (diagnose_mismatched_decls): Likewise, in various places.
639 (warn_if_shadowing): Likewise.
640 (implicit_decl_warning): Likewise.
641 (implicitly_declare): Likewise.
642 (undeclared_variable): Likewise.
643 (declare_label): Likewise.
644 (grokdeclarator): Likewise.
645 (start_function): Likewise.
646 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
647 (c_parser_parameter_declaration): Likewise.
648 (c_parser_binary_expression): Likewise.
649 * c-typeck.c (c_expr_sizeof_expr): Likewise.
650 (parser_build_binary_op): Likewise.
651 (build_unary_op): Likewise.
652 (error_init): Likewise.
653 (pedwarn_init): Likewise.
654 (warning_init): Likewise.
655 (convert_for_assignment): Likewise.
656
96e6ae57
DM
6572018-08-15 David Malcolm <dmalcolm@redhat.com>
658
659 * c-objc-common.c: Include "gcc-rich-location.h".
660 (c_tree_printer): Move implemenation of '%T' to...
661 (print_type): ...this new function.
662 (range_label_for_type_mismatch::get_text): New function.
663 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
664 range for the various ic_argpass cases.
665 (class maybe_range_label_for_tree_type_mismatch): New class.
666 (build_binary_op): Use it when calling binary_op_error.
667
0cd020ae
PK
6682018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
669
670 * c-decl.c (start_decl): Do not warn if variables is named as main
671 and is a local variable.
672
72733314
IS
6732018-08-15 Iain Sandoe <iain@sandoe.co.uk>
674
675 PR c/19315
676 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
677 objects of unknown size.
678
23aa9f7c
MS
6792018-08-13 Martin Sebor <msebor@redhat.com>
680
681 PR tree-optimization/71625
682 * c-parser.c (c_parser_declaration_or_fndef): Call
683 braced_list_to_string.
684
e5e7e50d
BH
6852018-08-03 Bogdan Harjoc <harjoc@gmail.com>
686
687 PR c/86690
688 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
689 errors.
690
8a45b051
MS
6912018-08-01 Martin Sebor <msebor@redhat.com>
692
693 PR tree-optimization/86650
694 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
695 and TREE_BLOCK (t) from within percent_K_format to this callsite.
696
5922dcb5
JJ
6972018-08-01 Jakub Jelinek <jakub@redhat.com>
698
699 PR c/85704
700 * c-typeck.c (init_field_decl_cmp): New function.
701 (output_pending_init_elements): Use it for field comparisons
702 instead of pure bit_position comparisons.
703
9b452033
JJ
7042018-07-12 Jakub Jelinek <jakub@redhat.com>
705
706 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
707 type here, instead add "omp declare target implicit" attribute.
708 (finish_decl): Diagnose vars without mappable type here.
709
829c6349
CLT
7102018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
711 Thomas Schwinge <thomas@codesourcery.com>
712 Cesar Philippidis <cesar@codesourcery.com>
713
714 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
715 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
716 to their non-present_or_* counterparts. Make 'self' an alias to
717 PRAGMA_OACC_CLAUSE_HOST.
718 (c_parser_oacc_data_clause): Update GOMP mappings for
719 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
720 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
721 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
722 Remove support for present_or_* clauses.
723 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
724 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
725 (OACC_DECLARE_CLAUSE_MASK): Likewise.
726 (OACC_DATA_CLAUSE_MASK): Likewise.
727 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
728 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
729 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
730 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
731 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
732
e197e64e
KV
7332018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
734
735 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
736 * gimple-parser.c (c_parser_gimple_statement): Likewise.
737 (c_parser_gimple_unary_expression): Likewise.
738
487f2f61
JJ
7392018-06-15 Jakub Jelinek <jakub@redhat.com>
740
741 PR c/86093
742 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
743 before doing POINTER_DIFF_EXPR.
744
e4d44a37
MP
7452018-06-07 Marek Polacek <polacek@redhat.com>
746
747 PR c/85318
748 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
749 for loop initial declarations.
750
b67b9225
DP
7512018-05-30 David Pagan <dave.pagan@oracle.com>
752
753 PR c/55976
754 * c-decl.c (grokdeclarator): Update check for return type warnings.
755 (start_function): Likewise.
756 (finish_function): Likewise.
757 * c-typeck.c (c_finish_return): Update check for return type warnings.
758 Pass OPT_Wreturn_type to pedwarn when appropriate.
759
c566cc9f
RS
7602018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
761
762 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
763 __FMA_EXPR handlng.
764
e4f81565
RS
7652018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
766
767 * gimple-parser.c: Include internal-fn.h.
768 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
769 (c_parser_gimple_call_internal): New function.
770 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
771 Fix typos in comment.
772
79e7b1fe
JJ
7732018-05-10 Jakub Jelinek <jakub@redhat.com>
774
775 PR c++/85662
776 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
777 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
778 fold_convert_loc.
779 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
780 fold_offsetof_1, pass argtype as TYPE to it and drop the
781 fold_convert_loc.
782
f7584c81
DP
7832018-05-02 David Pagan <dave.pagan@oracle.com>
784
785 PR c/30552
786 * c-decl.c (old_style_parameter_scope): New function.
787 * c-parser.c (c_parser_postfix_expression): Check for statement
788 expressions in old-style function parameter list declarations.
789 * c-parser.h (old_style_parameter_scope): New extern declaration.
790
b33a0cb3
JJ
7912018-04-25 Jakub Jelinek <jakub@redhat.com>
792
793 PR sanitizer/84307
794 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
795 it is not TREE_STATIC.
796 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
797 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
798 its COMPOUND_LITERAL_EXPR_DECL.
799
c5c5822a
JM
8002018-03-21 Joseph Myers <joseph@codesourcery.com>
801
802 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
803 where all functions return the same _FloatN or _FloatNx type,
804 treat integer types as _Float64 instead of double.
805
aa1c9429
JJ
8062018-03-21 Jakub Jelinek <jakub@redhat.com>
807
808 PR c/84999
809 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
810 building vector comparison, diagnose it and return error_mark_node.
811
9bb45a95
JJ
8122018-03-15 Jakub Jelinek <jakub@redhat.com>
813
814 PR c/84853
815 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
816 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
817 INTEGER_TYPE element type.
818
ada6bad9
DP
8192018-03-13 David Pagan <dave.pagan@oracle.com>
820
821 PR c/46921
822 * c-typeck.c (output_init_element): Ensure field initializer
823 expression is always evaluated if there are side effects.
824
849bbdb9
JJ
8252018-03-06 Jakub Jelinek <jakub@redhat.com>
826
827 PR c/84721
828 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
829 !building_stmt_list_p ().
830
d74641bd
RS
8312018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
832
833 PR c/84305
834 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
835 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
836 and include the BIND_EXPR in the list of things that need to be
837 pre-evaluated.
838
0444aa9c
NS
8392018-02-09 Nathan Sidwell <nathan@acm.org>
840
841 PR c/84293
842 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
843 to strict_aliasing_warning.
844
7c30b12a
PC
8452018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
846
847 * c-typeck.c (really_start_incremental_init, push_init_level,
848 set_nonincremental_init, output_init_element, process_init_element):
849 Use DECL_UNNAMED_BIT_FIELD.
850
2be4dfcb
MP
8512018-01-31 Marek Polacek <polacek@redhat.com>
852
853 PR c/81779
854 * c-parser.c (c_parser_compound_statement_nostart): Call
855 expansion_point_location_if_in_system_header.
856
bb9869d5
DM
8572018-01-17 David Malcolm <dmalcolm@redhat.com>
858
859 PR c++/83814
860 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
861 the C part.
862
b4923738
JJ
8632018-01-13 Jakub Jelinek <jakub@redhat.com>
864
865 PR c/83801
866 * c-tree.h (decl_constant_value_1): Add a bool argument.
867 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
868 returning a CONSTRUCTOR if it is true. Use error_operand_p.
869 (decl_constant_value): Adjust caller.
870 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
871 decl_constant_value_1 as IN_INIT. Otherwise, punt if
872 decl_constant_value returns initializer that has BLKmode or
873 array type.
874 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
875
928686b1
RS
8762018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
877 Alan Hayward <alan.hayward@arm.com>
878 David Sherwood <david.sherwood@arm.com>
879
880 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
881 TYPE_VECTOR_SUBPARTS.
882
85ec4feb
JJ
8832018-01-03 Jakub Jelinek <jakub@redhat.com>
884
885 Update copyright years.
886
913884f7
JJ
8872018-01-01 Jakub Jelinek <jakub@redhat.com>
888
889 PR c/83595
890 * c-parser.c (c_parser_braced_init, c_parser_initelt,
891 c_parser_conditional_expression, c_parser_cast_expression,
892 c_parser_sizeof_expression, c_parser_alignof_expression,
893 c_parser_postfix_expression, c_parser_omp_declare_reduction,
894 c_parser_transaction_expression): Use set_error () method instead
895 of setting value member to error_mark_node.
896
c6cfa2bf
MM
8972017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
898
899 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
900 and _Float<N>X built-in functions.
901
11d29d63
JJ
9022017-12-22 Jakub Jelinek <jakub@redhat.com>
903
14ec014e
JJ
904 PR debug/83550
905 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
906 TYPE_STUB_DECL and call rest_of_type_compilation before processing
907 incomplete vars rather than after it.
908
11d29d63
JJ
909 PR debug/83547
910 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
911 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
912 and consider empty ones if there are no other stmts. For
913 -Wunused-value walk all statements before the one only followed by
914 DEBUG_BEGIN_STMTs.
915
170a8bd6 9162017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 917 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
918
919 * c-parser.c (c_parser_while_statement): Add unroll parameter and
920 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
921 (c_parser_do_statement): Likewise.
922 (c_parser_for_statement): Likewise.
923 (c_parser_statement_after_labels): Adjust calls to above.
924 (c_parse_pragma_ivdep): New static function.
925 (c_parser_pragma_unroll): Likewise.
926 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
927 <PRAGMA_UNROLL>: New case.
928
01512446
JJ
9292017-12-19 Jakub Jelinek <jakub@redhat.com>
930
931 * c-typeck.c (comptypes_internal, function_types_compatible_p,
932 perform_integral_promotions, digest_init): Replace Yoda conditions
933 with typical order conditions.
934 * c-decl.c (check_bitfield_type_and_width): Likewise.
935
c65e18d3
BE
9362017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
937
938 * c-typeck.c (c_safe_arg_type_equiv_p,
939 c_safe_function_type_cast_p): New function.
940 (build_c_cast): Implement -Wcast-function-type.
941
b7280579
RB
9422017-12-14 Richard Biener <rguenther@suse.de>
943
944 PR c/83415
945 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
946 like REALPART_EXPR for the behavior of whether its operand
947 is an lvalue.
948
49e6a6c0
MP
9492017-12-12 Marek Polacek <polacek@redhat.com>
950
951 PR c/82679
952 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
953
96a95ac1
AO
9542017-12-12 Alexandre Oliva <aoliva@redhat.com>
955
956 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
957 * c-parser.c (add_debug_begin_stmt): New.
958 (c_parser_declaration_or_fndef): Call it.
959 (c_parser_compound_statement_nostart): Likewise.
960 (c_parser_statement_after_labels): Likewise.
961 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
962
4b2b493f
JM
9632017-12-07 Joseph Myers <joseph@codesourcery.com>
964
965 * c-decl.c (build_compound_literal): Add parameter alignas_align
966 and set alignment of decl if nonzero.
967 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
968 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
969 qualifier.
970 (c_parser_struct_declaration): Update syntax comment.
971 (c_parser_type_name): Add alignas_ok argument and pass it to
972 c_parser_declspecs.
973 (c_parser_cast_expression): Pass true to c_parser_type_name and
974 give error if a cast used an _Alignas specifier.
975 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
976 give error if sizeof (type-name) used an _Alignas specifier.
977 (c_parser_alignof_expression): Pass true to c_parser_type_name and
978 give error if _Alignof (type-name) used an _Alignas specifier.
979 (c_parser_postfix_expression_after_paren_type): Check specified
980 alignment for a compound literal and pass it to
981 build_compound_literal.
982 * c-parser.h (c_parser_type_name): Update prototype.
983 * c-tree.h (build_compound_literal): Update prototype.
984
5d9ae53d
MS
9852017-12-07 Martin Sebor <msebor@redhat.com>
986
987 PR c/81544
988 * c-decl.c (c_decl_attributes): Look up existing declaration and
989 pass it to decl_attributes.
990
c79144f8
DM
9912017-12-06 David Malcolm <dmalcolm@redhat.com>
992
993 PR c/83236
994 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
995 reserved for use by the implementation.
996
613bc14f
DM
9972017-12-06 David Malcolm <dmalcolm@redhat.com>
998
999 * c-decl.c: Include "c-family/c-spellcheck.h".
1000
05abad4c
ML
10012017-12-05 Martin Liska <mliska@suse.cz>
1002 Jakub Jelinek <jakub@redhat.com>
1003
1004 * c-typeck.c (pointer_diff): Add new argument and instrument
1005 pointer subtraction.
1006 (build_binary_op): Similar for pointer comparison.
1007
cc6534d4
JJ
10082017-12-01 Jakub Jelinek <jakub@redhat.com>
1009
65791f42
JJ
1010 PR c/79153
1011 * c-parser.c: Include tree-iterator.h.
1012 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
1013 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
1014 on it.
1015
cc6534d4
JJ
1016 PR c/83222
1017 * c-tree.h (decl_constant_value_1): Declare.
1018 * c-typeck.c (decl_constant_value_1): New function.
1019 (decl_constant_value): Use it.
1020 * c-fold.c (c_fully_fold_internal): If in_init, use
1021 decl_constant_value_1 instead of decl_constant_value.
1022
5de73c05
JJ
10232017-11-30 Jakub Jelinek <jakub@redhat.com>
1024
1025 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
1026
058f0b9e
JJ
10272017-11-28 Jakub Jelinek <jakub@redhat.com>
1028
1029 PR sanitizer/81275
1030 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
1031 c_switch_covers_all_cases_p returns true.
1032
5e9d6aa4 10332017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 1034 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
1035
1036 * Make-lang.in (c/c-array-notation.o): Remove.
1037 * c-array-notation.c: Delete.
1038 * c-decl.c: Remove cilkplus condition.
1039 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
1040 c_parser_cilk_verify_simd, c_parser_array_notation,
1041 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
1042 c_parser_cilk_simd_fn_vector_attrs,
1043 c_finish_cilk_simd_fn_tokens): Delete.
1044 (c_parser_declaration_or_fndef): Remove cilkplus condition.
1045 (c_parser_direct_declarator_inner): Ditto.
1046 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
1047 (c_parser_attributes, c_parser_compound_statement,
1048 c_parser_statement_after_labels, c_parser_if_statement,
1049 c_parser_switch_statement, c_parser_while_statement,
1050 c_parser_do_statement, c_parser_for_statement,
1051 c_parser_unary_expression, c_parser_postfix_expression,
1052 c_parser_postfix_expression_after_primary,
1053 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
1054 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
1055 support.
1056 * c-typeck.c (build_array_ref, build_function_call_vec,
1057 convert_arguments,
1058 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
1059 c_finish_loop, build_binary_op): Remove cilkplus support.
1060
9e851845
JJ
10612017-11-28 Jakub Jelinek <jakub@redhat.com>
1062
1063 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
1064 of build3.
1065
8c7dbea9
BK
10662017-11-14 Boris Kolpackov <boris@codesynthesis.com>
1067
1068 * Make-lang.in (c.install-plugin): Install backend import library.
1069
41521dee
JJ
10702017-11-23 Jakub Jelinek <jakub@redhat.com>
1071
1072 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
1073 pragma_stmt context.
1074
ac9effed
EB
10752017-11-23 Mike Stump <mikestump@comcast.net>
1076 Eric Botcazou <ebotcazou@adacore.com>
1077
1078 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
1079 ANNOTATE_EXPR.
1080 (c_parser_do_statement): Likewise.
1081 (c_parser_for_statement): Likewise.
1082
ce95abc4
DM
10832017-11-22 David Malcolm <dmalcolm@redhat.com>
1084
1085 PR c++/62170
1086 * c-objc-common.c (c_tree_printer): Convert penultimate param from
1087 bool to bool *. Within '%T' handling, if showing an "aka", use
1088 "quoted" param to add appropriate quoting.
1089
974aedcc
MP
10902017-11-22 Marek Polacek <polacek@redhat.com>
1091
1092 PR c++/60336
1093 PR middle-end/67239
1094 PR target/68355
1095 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
1096
d4300cc6
DM
10972017-11-21 David Malcolm <dmalcolm@redhat.com>
1098
1099 PR c/83056
1100 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
1101 earlier failed lookups.
1102
1af4ebf5
MG
11032017-11-21 Marc Glisse <marc.glisse@inria.fr>
1104
1105 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
1106 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
1107
26edace6
DM
11082017-11-20 David Malcolm <dmalcolm@redhat.com>
1109
1110 PR c/81404
1111 * c-decl.c: Include "c-family/known-headers.h".
1112 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
1113 to known-headers.cc.
1114 (class suggest_missing_header): Move to known-header.h.
1115 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
1116 than get_c_name_hint.
1117
b1212255
DM
11182017-11-20 David Malcolm <dmalcolm@redhat.com>
1119
1120 * c-decl.c (get_c_name_hint): New function.
1121 (class suggest_missing_header): New class.
1122 (lookup_name_fuzzy): Call get_c_name_hint and use it to
1123 suggest missing headers to the user.
1124
6c7a259b
DM
11252017-11-20 David Malcolm <dmalcolm@redhat.com>
1126
1127 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1128 Include "c-family/name-hint.h"
1129 (implicit_decl_warning): Convert "hint" from
1130 const char * to name_hint. Pass location to
1131 lookup_name_fuzzy. Suppress any deferred diagnostic if the
1132 warning was not printed.
1133 (undeclared_variable): Likewise for "guessed_id".
1134 (lookup_name_fuzzy): Convert return type from const char *
1135 to name_hint. Add location_t param.
1136 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1137 Include "c-family/name-hint.h"
1138 (c_parser_declaration_or_fndef): Convert "hint" from
1139 const char * to name_hint. Pass location to lookup_name_fuzzy.
1140 (c_parser_parameter_declaration): Likewise.
1141
f9c59f7e
JJ
11422017-11-19 Jakub Jelinek <jakub@redhat.com>
1143
1144 PR c/66618
1145 PR c/69960
1146 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
1147 where needed.
1148 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
1149 handle_omp_array_sections): Likewise.
1150 (digest_init): Don't call decl_constant_value_for_optimization.
1151 * c-tree.h (decl_constant_value_for_optimization): Removed.
1152 * c-fold.c (c_fold_array_ref): New function.
1153 (c_fully_fold_internal): Add LVAL argument, propagate it through
1154 recursive calls. For VAR_P call decl_constant_value and
1155 unshare if not LVAL and either optimizing or IN_INIT. Remove
1156 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
1157 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
1158 (c_fully_fold): Add LVAL argument, pass it through to
1159 c_fully_fold_internal.
1160 (decl_constant_value_for_optimization): Removed.
1161
3ca0dc60
JM
11622017-11-15 Joseph Myers <joseph@codesourcery.com>
1163
1164 PR c/81156
1165 * c-parser.c (check_tgmath_function): New function.
1166 (enum tgmath_parm_kind): New enum.
1167 (c_parser_postfix_expression): Handle __builtin_tgmath.
1168
64a5912c
DM
11692017-10-31 David Malcolm <dmalcolm@redhat.com>
1170
1171 * c-decl.c (implicit_decl_warning): Update for renaming of
1172 pedwarn_at_rich_loc and warning_at_rich_loc.
1173 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
1174 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
1175 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1176 (c_parser_struct_or_union_specifier): Likewise for renaming of
1177 pedwarn_at_rich_loc.
1178 (c_parser_parameter_declaration): Likewise for renaming of
1179 error_at_rich_loc.
1180 * c-typeck.c (build_component_ref): Likewise.
1181 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
1182 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
1183 (set_init_label): Likewise for renaming of error_at_rich_loc.
1184
c1136864
RB
11852017-10-30 Richard Biener <rguenther@suse.de>
1186
1187 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
1188 stmts.
1189
ee5fd23a
MM
11902017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
1191
1192 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
1193 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
1194
1a59ccf2
DM
11952017-10-25 David Malcolm <dmalcolm@redhat.com>
1196
1197 PR c/7356
1198 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
1199 semicolons.
1200
bc1a75dd
JJ
12012017-10-25 Jakub Jelinek <jakub@redhat.com>
1202
1203 PR libstdc++/81706
1204 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
1205 newdecl to corresponding __builtin_ if any.
1206
ff1ff960
PC
12072017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
1208
1209 PR c++/82466
1210 * c-decl.c (diagnose_mismatched_decls): Use
1211 OPT_Wbuiltin_declaration_mismatch.
1212
62e1c678
DM
12132017-10-12 David Malcolm <dmalcolm@redhat.com>
1214
1215 * c-parser.c (c_parser_require): Add "type_is_unique" param and
1216 use it to guard calls to maybe_suggest_missing_token_insertion.
1217 (c_parser_parms_list_declarator): Override default value of new
1218 "type_is_unique" param to c_parser_require.
1219 (c_parser_asm_statement): Likewise.
1220 * c-parser.h (c_parser_require): Add "type_is_unique" param,
1221 defaulting to true.
1222
a92f6726
NS
12232017-10-11 Nathan Sidwell <nathan@acm.org>
1224
1225 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
1226
8e6cdc90
RS
12272017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1228
1229 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
1230 operating on trees as wide_ints.
1231 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
1232 (c_tree_equal): Likewise.
1233
8139a48e
DM
12342017-10-04 David Malcolm <dmalcolm@redhat.com>
1235
1236 * c-decl.c (push_parm_decl): Store c_parm's location into the
1237 PARAM_DECL.
1238 (build_c_parm): Add "loc" param and store it within the c_parm.
1239 * c-parser.c (struct c_parser): Add "last_token_location" field.
1240 (c_parser_consume_token): Store location of the token into the
1241 new field.
1242 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
1243 when handling a FUNCTION_DECL, if it doesn't already have them.
1244 (c_parser_parameter_declaration): Generate a location for the
1245 parameter, and pass it to the call to build_c_parm.
1246 * c-tree.h (struct c_parm): Add field "loc".
1247 (build_c_parm): Add location_t param.
1248 * c-typeck.c (get_fndecl_argument_location): New function.
1249 (inform_for_arg): New function.
1250 (convert_for_assignment): Use inform_for_arg when dealing with
1251 ic_argpass.
1252
2a389958
JJ
12532017-09-29 Jakub Jelinek <jakub@redhat.com>
1254
7d386d45
JJ
1255 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
1256 width is non-NULL.
1257 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
1258 don't SET_DECL_C_BIT_FIELD here.
1259
2a389958
JJ
1260 PR c/82340
1261 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
1262 instead of trying to set just TREE_READONLY manually.
1263
ebc6a85e
TV
12642017-09-16 Tom de Vries <tom@codesourcery.com>
1265
1266 PR c/81875
1267 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
1268 cond itself.
1269
bb75facd
JM
12702017-09-15 Joseph Myers <joseph@codesourcery.com>
1271
1272 PR c/82071
1273 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
1274 for C11.
1275 (build_conditional_expr): For C11, generate result with excess
1276 precision when one argument is an integer and the other is of a
1277 type using excess precision.
1278
1d933576
BE
12792017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
1280
1281 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
1282
267bbb6f
MP
12832017-09-13 Marek Polacek <polacek@redhat.com>
1284
1285 PR c/82167
1286 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
1287 than expr.original_type.
1288
6836632e
NS
12892017-09-12 Nathan Sidwell <nathan@acm.org>
1290
1291 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1292 resort_sorted_fields): Moved from c-family/c-common.c.
1293 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
1294
e035be33
JM
12952017-09-01 Joseph Myers <joseph@codesourcery.com>
1296
1297 PR c/82071
1298 * c-typeck.c (build_atomic_assign): Handle argument with excess
1299 precision. Ensure any EXCESS_PRECISION_EXPR is present in
1300 argument passed to build_binary_op and convert_for_assignment but
1301 not for call to c_fully_fold.
1302 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
1303 Ensure build_binary_op is called with argument with original
1304 semantic type. Avoid calling c_fully_fold with an
1305 EXCESS_PRECISION_EXPR from build_binary_op.
1306
d2e05fcb
JJ
13072017-09-01 Jakub Jelinek <jakub@redhat.com>
1308
1309 PR c/81887
1310 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
1311
b397965c
RS
13122017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1313 Alan Hayward <alan.hayward@arm.com>
1314 David Sherwood <david.sherwood@arm.com>
1315
1316 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
1317 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
1318 m1 and m2 to the signed equivalent of a fixed-point
1319 SCALAR_TYPE_MODE.
1320
14e18d71
DM
13212017-08-24 David Malcolm <dmalcolm@redhat.com>
1322
1323 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
1324 than CAN_HAVE_LOCATION_P when determining whether to use the
1325 location_t value within "value".
1326
7f204c0f
DM
13272017-08-21 David Malcolm <dmalcolm@redhat.com>
1328
1329 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
1330 rather than peeking the location of the first token.
1331 * c-tree.h (c_expr::get_location): New method.
1332
2f687306
DM
13332017-08-21 David Malcolm <dmalcolm@redhat.com>
1334
1335 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
1336 to check_function_arguments.
1337
3e7b80d7
MP
13382017-08-18 Marek Polacek <polacek@redhat.com>
1339
1340 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
1341 commentary.
1342
00aa1fa2
L
13432017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1344
1345 PR c/53037
1346 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
1347 (check_bitfield_type_and_width): Don't allow bit-field with
1348 warn_if_not_aligned type.
1349
da67acb9
MS
13502017-08-14 Martin Sebor <msebor@redhat.com>
1351
1352 PR c/81117
1353 * c-objc-common.c (c_objc_common_init): Handle 'G'.
1354
bb85aa74
MP
13552017-08-11 Marek Polacek <polacek@redhat.com>
1356
1357 PR c/81795
1358 * c-decl.c (pushtag): Only print inform if the warning was printed.
1359 (grokdeclarator): Likewise.
1360
32129a17
DM
13612017-08-10 David Malcolm <dmalcolm@redhat.com>
1362
1363 * c-parser.c (c_parser_error): Rename to...
1364 (c_parser_error_richloc): ...this, making static, and adding
1365 "richloc" parameter, passing it to the c_parse_error call,
1366 rather than calling c_parser_set_source_position_from_token.
1367 (c_parser_error): Reintroduce, reimplementing in terms of the
1368 above, converting return type from void to bool.
1369 (class token_pair): New class.
1370 (struct matching_paren_traits): New struct.
1371 (matching_parens): New typedef.
1372 (struct matching_brace_traits): New struct.
1373 (matching_braces): New typedef.
1374 (get_matching_symbol): New function.
1375 (c_parser_require): Add param MATCHING_LOCATION, using it to
1376 highlight matching "opening" tokens for missing "closing" tokens.
1377 (c_parser_skip_until_found): Likewise.
1378 (c_parser_static_assert_declaration_no_semi): Convert explicit
1379 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
1380 class matching_parens, so that the pertinent open parenthesis is
1381 highlighted when there are problems locating the close
1382 parenthesis.
1383 (c_parser_struct_or_union_specifier): Likewise.
1384 (c_parser_typeof_specifier): Likewise.
1385 (c_parser_alignas_specifier): Likewise.
1386 (c_parser_simple_asm_expr): Likewise.
1387 (c_parser_braced_init): Likewise, for matching_braces.
1388 (c_parser_paren_condition): Likewise, for matching_parens.
1389 (c_parser_switch_statement): Likewise.
1390 (c_parser_for_statement): Likewise.
1391 (c_parser_asm_statement): Likewise.
1392 (c_parser_asm_operands): Likewise.
1393 (c_parser_cast_expression): Likewise.
1394 (c_parser_sizeof_expression): Likewise.
1395 (c_parser_alignof_expression): Likewise.
1396 (c_parser_generic_selection): Likewise.
1397 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
1398 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
1399 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
1400 In case CPP_OPEN_PAREN, pass loc_open_paren to the
1401 c_parser_skip_until_found call.
1402 (c_parser_objc_class_definition): Use class matching_parens as
1403 above.
1404 (c_parser_objc_method_decl): Likewise.
1405 (c_parser_objc_try_catch_finally_statement): Likewise.
1406 (c_parser_objc_synchronized_statement): Likewise.
1407 (c_parser_objc_at_property_declaration): Likewise.
1408 (c_parser_oacc_wait_list): Likewise.
1409 (c_parser_omp_var_list_parens): Likewise.
1410 (c_parser_omp_clause_collapse): Likewise.
1411 (c_parser_omp_clause_default): Likewise.
1412 (c_parser_omp_clause_if): Likewise.
1413 (c_parser_omp_clause_num_threads): Likewise.
1414 (c_parser_omp_clause_num_tasks): Likewise.
1415 (c_parser_omp_clause_grainsize): Likewise.
1416 (c_parser_omp_clause_priority): Likewise.
1417 (c_parser_omp_clause_hint): Likewise.
1418 (c_parser_omp_clause_defaultmap): Likewise.
1419 (c_parser_oacc_single_int_clause): Likewise.
1420 (c_parser_omp_clause_ordered): Likewise.
1421 (c_parser_omp_clause_reduction): Likewise.
1422 (c_parser_omp_clause_schedule): Likewise.
1423 (c_parser_omp_clause_num_teams): Likewise.
1424 (c_parser_omp_clause_thread_limit): Likewise.
1425 (c_parser_omp_clause_aligned): Likewise.
1426 (c_parser_omp_clause_linear): Likewise.
1427 (c_parser_omp_clause_safelen): Likewise.
1428 (c_parser_omp_clause_simdlen): Likewise.
1429 (c_parser_omp_clause_depend): Likewise.
1430 (c_parser_omp_clause_map): Likewise.
1431 (c_parser_omp_clause_device): Likewise.
1432 (c_parser_omp_clause_dist_schedule): Likewise.
1433 (c_parser_omp_clause_proc_bind): Likewise.
1434 (c_parser_omp_clause_uniform): Likewise.
1435 (c_parser_omp_for_loop): Likewise.
1436 (c_parser_cilk_clause_vectorlength): Likewise.
1437 (c_parser_cilk_clause_linear): Likewise.
1438 (c_parser_transaction_expression): Likewise.
1439 * c-parser.h (c_parser_require): Add param matching_location with
1440 default UNKNOWN_LOCATION.
1441 (c_parser_error): Convert return type from void to bool.
1442 (c_parser_skip_until_found): Add param matching_location with
1443 default UNKNOWN_LOCATION.
1444
30af3a2b
MP
14452017-08-09 Marek Polacek <polacek@redhat.com>
1446
1447 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
1448 * c-tree.h (build_external_ref): Update declaration.
1449 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
1450 (build_external_ref): Change the type of a parameter to bool.
1451 (parser_build_binary_op): Use true/false instead of 1/0.
1452 (pointer_diff): Likewise.
1453 (build_modify_expr): Likewise.
1454 (set_designator): Change the type of a parameter to bool.
1455 (set_init_index): Use true/false instead of 1/0.
1456 (set_init_label): Likewise.
1457 (output_init_element): Change the type of a parameter to bool.
1458 (output_pending_init_elements): Use true/false instead of 1/0.
1459 (process_init_element): Likewise.
1460 (build_binary_op): Change the type of a parameter to bool.
1461
296c53ac
MP
14622017-08-09 Marek Polacek <polacek@redhat.com>
1463
1464 PR c/81233
1465 * c-typeck.c (pedwarn_init): Make the function take a variable list.
1466 Call emit_diagnostic_valist instead of pedwarn.
1467 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
1468 Print the relevant types in diagnostics.
1469
a32c8316
MP
14702017-08-09 Marek Polacek <polacek@redhat.com>
1471
1472 PR c/81417
1473 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
1474 build_conditional_expr.
1475 * c-parser.c (c_parser_conditional_expression): Create locations for
1476 EXP1 and EXP2 from their source ranges. Pass the locations down to
1477 build_conditional_expr.
1478 * c-tree.h (build_conditional_expr): Update declaration.
1479 * c-typeck.c (build_conditional_expr): Add location_t parameters.
1480 For -Wsign-compare, also print the types.
1481
314e6352
ML
14822017-08-08 Martin Liska <mliska@suse.cz>
1483
1484 * c-convert.c: Include header files.
1485 * c-typeck.c: Likewise.
1486
577eec56
ML
14872017-08-07 Martin Liska <mliska@suse.cz>
1488
1489 * c-parser.c (c_parser_attributes): Canonicalize name of an
1490 attribute.
1491
f7b6353a
MP
14922017-08-02 Marek Polacek <polacek@redhat.com>
1493
1494 PR c/81289
1495 * c-parser.c (c_parser_unary_expression): Use set_error.
1496
8a6eab34
MP
1497 PR c/81448
1498 PR c/81306
1499 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
1500 warnings. Avoid walking MACRO_MAP_LOCATIONS.
1501
7fef86d3
JH
15022017-07-31 Jan Hubicka <hubicka@ucw.cz>
1503 Martin Liska <mliska@suse.cz>
1504
1505 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 1506 statement.
7fef86d3 1507
f34ebeb2
ML
15082017-07-31 Martin Liska <mliska@suse.cz>
1509
1510 PR sanitize/81530
1511 * c-convert.c (convert): Guard condition with flag_sanitize_p
1512 also with current_function_decl non-null equality.
1513 * c-decl.c (grokdeclarator): Likewise.
1514 * c-typeck.c (build_binary_op): Likewise.
1515
8595f67b
MP
15162017-07-25 Marek Polacek <polacek@redhat.com>
1517
1518 * c-decl.c (grokfield): Remove local variable.
1519
d49718d6
MP
15202017-07-25 Marek Polacek <polacek@redhat.com>
1521
1522 PR c/81364
1523 * c-parser.c (c_parser_else_body): Don't warn about multistatement
1524 macro expansion if the body is in { }.
1525 (c_parser_while_statement): Likewise.
1526 (c_parser_for_statement): Likewise.
1527
ff22eb12
NS
15282017-07-18 Nathan Sidwell <nathan@acm.org>
1529
1530 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
1531
eea77d1f
DM
15322017-07-14 David Malcolm <dmalcolm@redhat.com>
1533
1534 * c-decl.c (implicitly_declare): When suggesting a missing
1535 #include, provide a fix-it hint.
1536
b6f43128
DM
15372017-07-06 David Malcolm <dmalcolm@redhat.com>
1538
1539 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
1540 and call that instead.
1541 * c-tree.h (selftest::run_c_tests): New decl.
1542
3e2becc4
MP
15432017-06-26 Marek Polacek <polacek@redhat.com>
1544
1545 PR c/80116
1546 * c-parser.c (c_parser_if_body): Set the location of the
1547 body of the conditional after parsing all the labels. Call
1548 warn_for_multistatement_macros.
1549 (c_parser_else_body): Likewise.
1550 (c_parser_switch_statement): Likewise.
1551 (c_parser_while_statement): Likewise.
1552 (c_parser_for_statement): Likewise.
1553 (c_parser_statement): Add a default argument. Save the location
1554 after labels have been parsed.
1555 (c_parser_c99_block_statement): Likewise.
1556
343ae898
RB
15572017-06-19 Richard Biener <rguenther@suse.de>
1558
1559 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1560 negated _Literals to parse _Literal (int) -1.
1561
45b2222a
ML
15622017-06-13 Martin Liska <mliska@suse.cz>
1563
1564 PR sanitize/78204
1565 * c-convert.c (convert): Use sanitize_flags_p.
1566 * c-decl.c (grokdeclarator): Likewise.
1567 * c-typeck.c (convert_for_assignment): Likewise.
1568 (c_finish_return): Likewise.
1569 (build_binary_op): Likewise.
1570
8ab7005b
JJ
15712017-06-08 Jakub Jelinek <jakub@redhat.com>
1572
1573 PR c/81006
1574 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
1575 to sizetype before size_binop.
1576
363dc72c
JJ
15772017-06-07 Jakub Jelinek <jakub@redhat.com>
1578
1579 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
1580 of TDI_generic.
1581
dc949728
MP
15822017-06-06 Marek Polacek <polacek@redhat.com>
1583
1584 PR c/79983
1585 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
1586 ref.
1587 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
1588
40ffd95f
BE
15892017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1590
1591 * c-parser.c (c_parser_binary_expression): Implement the
1592 -Wsizeof_pointer_div warning.
1593 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
1594 from a parenthesized expression.
1595 (c_parser_expr_list): Use c_last_sizeof_loc.
1596 * c-tree.h (c_last_sizeof_loc): New external.
1597 * c-typeck.c (c_last_sizeof_loc): New variable.
1598 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
1599
9fc5e7a4
MM
16002017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
1601
1602 PR testsuite/80580
1603 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
1604
f012c8ef
DM
16052017-05-30 David Malcolm <dmalcolm@redhat.com>
1606
1607 * c-objc-common.c (c_tree_printer): Gain bool and const char **
1608 parameters.
1609
3cd211af
MS
16102017-05-24 Martin Sebor <msebor@redhat.com>
1611
1612 PR c/80731
1613 * c-fold.c (c_fully_fold_internal): Adjust.
1614 * c-typeck.c (parser_build_unary_op): Adjust.
1615
fd71a9a2
TS
16162017-05-23 Thomas Schwinge <thomas@codesourcery.com>
1617
1618 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
1619 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
1620 "VECTOR_LENGTH".
1621
92fa0f9e
MP
16222017-05-23 Marek Polacek <polacek@redhat.com>
1623
1624 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
1625 quotes.
1626
d11c168a
JJ
16272017-05-22 Jakub Jelinek <jakub@redhat.com>
1628
1629 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
1630 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
1631 it returned invariant. Call tree_invariant_p unconditionally
1632 afterwards to decide whether to return expr or op0.
1633
58aca9d9
NS
16342017-05-22 Nathan Sidwell <nathan@acm.org>
1635
1636 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
1637
7fd549d2
TS
16382017-05-19 Thomas Schwinge <thomas@codesourcery.com>
1639
1640 * c-parser.c (c_parser_omp_clause_default): Handle
1641 "OMP_CLAUSE_DEFAULT_PRESENT".
1642
6ecd2339
BE
16432017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1644
1645 * config-lang.in (gtfiles): Add c-family/c-format.c.
1646
8a57ecff
NS
16472017-05-18 Nathan Sidwell <nathan@acm.org>
1648
1649 * c-decl.c (pushdecl_top_level): Delete unused function.
1650
6574d78e
MP
16512017-05-18 Marek Polacek <polacek@redhat.com>
1652
1653 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
1654 (check_earlier_gotos): Likewise.
1655 (define_label): Likewise.
1656 (pending_xref_error): Likewise.
1657 (smallest_type_quals_location): Likewise.
1658 (grokdeclarator): Likewise.
1659 (grokparms): Likewise.
1660 (identifier_global_value): Likewise.
1661 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
1662 (find_init_member): Likewise.
1663
e3455240
MP
16642017-05-18 Marek Polacek <polacek@redhat.com>
1665
1666 * c-decl.c (start_decl): Use false/true instead of 0/1.
1667 (grokdeclarator): Likewise.
1668 (finish_struct): Likewise.
1669 (start_function): Change the return type to bool. Use false/true
1670 instead of 0/1.
1671 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
1672 * c-tree.h (start_function): Update.
1673 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
1674 (set_designator): Change the return type to bool. Use false/true
1675 instead of 0/1.
1676
3fa8871b
MP
16772017-05-17 Marek Polacek <polacek@redhat.com>
1678
1679 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
1680 * c-typeck.c: Likewise.
1681
142473df
MP
16822017-05-17 Marek Polacek <polacek@redhat.com>
1683
1684 PR sanitizer/80659
1685 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
1686 DECL_IGNORED_P even for non-static compound literals.
1687
1a817418
ML
16882017-05-17 Martin Liska <mliska@suse.cz>
1689
1690 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1691 use it instead of int type.
1692
b2fa0a8b
MP
16932017-05-17 Marek Polacek <polacek@redhat.com>
1694
1695 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
1696 call c_fully_fold.
1697 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
1698 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
1699 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1700 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1701 save_expr.
1702 (c_parser_conditional_expression): Likewise.
1703 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1704 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1705 (process_init_element): Likewise.
1706 (build_binary_op): Likewise.
1707 (handle_omp_array_sections_1): Likewise.
1708
1e47f02b
TS
17092017-05-12 Thomas Schwinge <thomas@codesourcery.com>
1710
1711 * c-parser.c (c_parser_omp_clause_num_gangs)
1712 (c_parser_omp_clause_num_workers)
1713 (c_parser_omp_clause_vector_length): Merge functions into...
1714 (c_parser_oacc_single_int_clause): ... this new function. Adjust
1715 all users.
1716
c24e924f
NS
17172017-05-11 Nathan Sidwell <nathan@acm.org>
1718
1719 * gimple-parser.c: Don't #include tree-dump.h.
1720
c587104e
MM
17212017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1722
1723 PR testsuite/80580
1724 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
1725
67ac9a9d
MM
17262017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1727
1728 PR testsuite/80580
1729 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1730 incorrect __MEM syntax.
1731
ac4eb40f
MM
17322017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1733
1734 PR testsuite/80580
1735 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1736 type of unary '*'.
1737
641da50a
NS
17382017-05-09 Nathan Sidwell <nathan@acm.org>
1739
1740 * c-tree.h (pushdecl): Declare.
1741
56d35585
DM
17422017-05-05 David Malcolm <dmalcolm@redhat.com>
1743
1744 * c-decl.c (warn_defaults_to): Replace report_diagnostic
1745 with diagnostic_report_diagnostic.
1746 * c-errors.c (pedwarn_c99): Likewise.
1747 (pedwarn_c90): Likewise.
1748
815d9cc6
XR
17492017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1750
92a285c1 1751 PR c++/80038
815d9cc6
XR
1752 * c-gimplify.c (c_gimplify_expr): Remove calls to
1753 cilk_gimplifY_call_params_in_spawned_fn.
1754
1c4ea66f
DM
17552017-04-25 David Malcolm <dmalcolm@redhat.com>
1756
1757 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1758 hint for removing extra semicolon.
1759
666f7903
JJ
17602017-04-21 Jakub Jelinek <jakub@redhat.com>
1761
1762 PR c/80468
1763 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
1764 enabled, set specs->type to integer_type_node.
1765
5764ee3c
JW
17662017-04-03 Jonathan Wakely <jwakely@redhat.com>
1767
1768 * c-array-notation.c: Fix typo in comment.
1769
10fa8dfb
MP
17702017-03-29 Marek Polacek <polacek@redhat.com>
1771
1772 PR c/79730
1773 * c-decl.c (finish_decl): Check VAR_P.
1774
a9e4a1a5
JJ
17752017-03-27 Jakub Jelinek <jakub@redhat.com>
1776
1777 PR middle-end/80162
1778 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1779 * c-typeck.c (c_mark_addressable): Likewise. Look through
1780 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1781 to ARRAY_TYPE.
1782 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
1783
ee3ff394
MP
17842017-03-23 Marek Polacek <polacek@redhat.com>
1785
1786 * c-tree.h: Remove a C_RID_YYCODE reference.
1787
4d1b8e70
JJ
17882017-03-21 Jakub Jelinek <jakub@redhat.com>
1789
1790 PR c/80097
1791 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
1792 optional COMPOUND_EXPR with ubsan instrumentation.
1793
31dc71a8
MP
17942017-03-17 Marek Polacek <polacek@redhat.com>
1795
1796 * c-parser.c: Add C11 references.
1797
d579c385
MP
17982017-03-15 Marek Polacek <polacek@redhat.com>
1799
1800 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
1801
85059a38
MP
18022017-03-11 Marek Polacek <polacek@redhat.com>
1803
1804 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
1805
2f6f187a
DM
18062017-03-10 David Malcolm <dmalcolm@redhat.com>
1807
1808 PR translation/79848
1809 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1810 "%qs".
1811 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1812
36618428
MP
18132017-03-09 Marek Polacek <polacek@redhat.com>
1814
1815 PR sanitizer/79757
1816 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1817 parameter declarations with initializers.
1818
01e5af5a
JJ
18192017-03-09 Jakub Jelinek <jakub@redhat.com>
1820
1821 PR c/79969
1822 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
1823 TYPE_STUB_DECL.
1824
a71dbc63
JJ
18252017-03-07 Jakub Jelinek <jakub@redhat.com>
1826
1827 PR c/79834
1828 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1829 for "may only be used in compound statements" diagnostics, change it
1830 such that the same translatable string is used for all pragmas. For
1831 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1832 diagnostics.
1833 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1834 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1835 "may only be used in compound statements" diagnostics, such that the
1836 same translatable string is used for all pragmas.
1837
1ff4bae6
MP
18382017-03-04 Marek Polacek <polacek@redhat.com>
1839
1840 PR c/79847
1841 * c-decl.c (implicit_decl_warning): Add missing space.
1842
7f5a7d78
MP
18432017-03-03 Marek Polacek <polacek@redhat.com>
1844
1845 PR c/79758
1846 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1847 current_function_prototype_arg_types is error_mark_node. Fix
1848 formatting. Use TREE_VALUE instead of TREE_TYPE.
1849
883c8f06
JJ
18502017-03-03 Jakub Jelinek <jakub@redhat.com>
1851
79c9b7a8
JJ
1852 PR c/79837
1853 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1854 %<min%> or %<max%> in the diagnostics, instead mention identifier.
1855 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1856 diagnostics.
1857
883c8f06
JJ
1858 PR c/79836
1859 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1860 instead of %<_Generic>.
1861 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1862 (c_parser_omp_target_exit_data): Use %<release%> instead of
1863 %<release>.
1864
324ff1a0
JJ
18652017-02-28 Jakub Jelinek <jakub@redhat.com>
1866
1867 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1868 instead of just cond ? "..." : "...".
1869 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1870 for "enter"/"exit" keyword.
1871 (c_finish_oacc_routine): Don't use %s to supply portions of the
1872 message.
1873
4227c9ad
JJ
18742017-02-24 Jakub Jelinek <jakub@redhat.com>
1875
1876 PR c++/79588
1877 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1878 handle -Wrestrict here.
1879 * c-typeck.c (build_function_call_vec): Adjust
1880 check_function_arguments caller.
1881
5d972e66
RB
18822017-02-23 Richard Biener <rguenther@suse.de>
1883
1884 PR c/79684
1885 * gimple-parser.c (c_parser_gimple_statement): Use set_error
1886 to initialize c_exprs to return.
1887 (c_parser_gimple_binary_expression): Likewise.
1888 (c_parser_gimple_unary_expression): Likewise.
1889 (c_parser_gimple_postfix_expression): Likewise.
1890
61ac5ebe
MP
18912017-02-22 Marek Polacek <polacek@redhat.com>
1892
1893 PR c/79662
1894 * c-typeck.c (convert_arguments): Handle error_mark_node.
1895
41d1b0b1
PK
18962017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1897
1898 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1899 value of c_parser_parse_ssa_name against error_mark_node and emit
1900 error if ssa name is anonymous and written as default definition.
1901
eab1f169
PK
19022017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1903
1904 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1905 FMA_EXPR.
1906
bcac0b4d
JJ
19072017-02-16 Jakub Jelinek <jakub@redhat.com>
1908
1909 PR c++/79512
1910 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1911 ignore #pragma omp target even when not followed by identifier.
1912
1be33173
PK
19132017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1914
1915 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1916 (c_parser_gimple_unary_expression): Likewise.
1917
aa326bfb
JJ
19182017-02-13 Jakub Jelinek <jakub@redhat.com>
1919
1920 * c-parser.c (c_parser_oacc_declare): Add missing space in
1921 diagnostics.
1922
8a398bc5
PK
19232017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1924
1925 PR c/79478
1926 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1927 set_c_expr_source_range when parsing ssa-name.
1928
3dcde5ef
PG
19292017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
1930 Richard Biener <rguenther@suse.de>
1931
1932 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1933 building IL when arguments are error_mark_node.
1934 (c_parser_gimple_unary_expression): Likewise.
1935 (c_parser_gimple_if_stmt): Likewise.
1936 (c_parser_gimple_switch_stmt): Likewise.
1937 (c_parser_gimple_return_stmt): Likewise.
1938 (c_parser_parse_ssa_name): When name lookup fails do not build
1939 an SSA name. Use undeclared rather than not declared in error
1940 reporting.
1941
192b048b
MP
19422017-02-09 Marek Polacek <polacek@redhat.com>
1943
1944 PR c/79428
1945 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1946 instead of c_parser_skip_until_found.
1947
56f71478
JJ
19482017-02-09 Jakub Jelinek <jakub@redhat.com>
1949
1950 PR c/79431
1951 * c-parser.c (c_parser_omp_declare_target): Don't invoke
1952 symtab_node::get on automatic variables.
1953
02889d23
CLT
19542016-02-09 Nathan Sidwell <nathan@codesourcery.com>
1955 Chung-Lin Tang <cltang@codesourcery.com>
1956
1957 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1958 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1959 semantic checking.
1960 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1961
7af4b20d
RB
19622017-02-07 Richard Biener <rguenther@suse.de>
1963
1964 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1965 (c_parser_gimple_postfix_expression_after_primary):
1966 Do not use c_build_function_call_vec to avoid folding and promotion.
1967 Simplify.
1968
e5e391d6
MO
19692017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1970
1971 PR lto/79061
1972 * c-decl.c (pop_scope): Pass main_input_filename to
1973 build_translation_unit_decl.
1974
c2e84327
DM
19752017-01-24 David Malcolm <dmalcolm@redhat.com>
1976
1977 * c-parser.c: Include "read-rtl-function.h" and
1978 "run-rtl-passes.h".
1979 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
1980 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
1981 production. Update for renaming of field "gimple_pass" to
1982 "gimple_or_rtl_pass". If __RTL was seen, call
1983 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
1984 to an auto_timevar, to cope with early exit.
1985 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1986 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1987 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1988 Handle RID_RTL.
1989 (c_parser_parse_rtl_body): New function.
1990 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1991 (struct c_declspecs): Rename field "gimple_pass" to
1992 "gimple_or_rtl_pass". Add field "rtl_p".
1993 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1994 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1995 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1996 (c_parser_gimple_or_rtl_pass_list): ...this.
1997
2ebd93e1
MP
19982017-01-20 Marek Polacek <polacek@redhat.com>
1999
2000 PR c/64279
2001 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
2002
b1c95bb5
RB
20032017-01-13 Richard Biener <rguenther@suse.de>
2004
2005 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
2006 nops.
2007
25329913
RB
20082017-01-13 Richard Biener <rguenther@suse.de>
2009
2010 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2011 _Literal ( type-name ) number.
2012
6bb4ea5c
RB
20132017-01-12 Richard Biener <rguenther@suse.de>
2014
2015 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2016 __MEM.
2017
6b5b4e9c
JJ
20182017-01-11 Jakub Jelinek <jakub@redhat.com>
2019
2020 PR c++/72813
2021 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
2022 PCH file.
2023
e3252775
RB
20242017-01-11 Richard Biener <rguenther@suse.de>
2025
2026 PR bootstrap/79052
2027 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
2028 returns on parse errors.
2029
a9342885
MP
20302017-01-04 Marek Polacek <polacek@redhat.com>
2031
2032 PR c++/64767
2033 * c-parser.c (c_parser_postfix_expression): Mark zero character
2034 constants by setting original_type in c_expr.
2035 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
2036 with a zero character constant.
2037 (char_type_p): New function.
2038
5dd9a9d0
DM
20392017-01-04 David Malcolm <dmalcolm@redhat.com>
2040
2041 * c-parser.c (c_parser_declaration_or_fndef): Create a
2042 rich_location at init_loc and parse it to start_init.
2043 (last_init_list_comma): New global.
2044 (c_parser_braced_init): Update last_init_list_comma when parsing
2045 commas. Pass it to pop_init_level. Pass location of closing
2046 brace to pop_init_level.
2047 (c_parser_postfix_expression_after_paren_type): Create a
2048 rich_location at type_loc and parse it to start_init.
2049 (c_parser_omp_declare_reduction): Likewise for loc.
2050 * c-tree.h (start_init): Add rich_location * param.
2051 (pop_init_level): Add location_t param.
2052 * c-typeck.c (struct initializer_stack): Add field
2053 "missing_brace_richloc".
2054 (start_init): Add richloc param, use it to initialize
2055 the stack node's missing_brace_richloc.
2056 (last_init_list_comma): New decl.
2057 (finish_implicit_inits): Pass last_init_list_comma to
2058 pop_init_level.
2059 (push_init_level): When finding missing open braces, add fix-it
2060 hints to the richloc.
2061 (pop_init_level): Add "insert_before" param and pass it
2062 when calling pop_init_level. Add fixits about missing
2063 close braces to any richloc. Use the richloc for the
2064 -Wmissing-braces warning.
2065 (set_designator): Pass last_init_list_comma to pop_init_level.
2066 (process_init_element): Likewise.
2067
cbe34bb5
JJ
20682017-01-01 Jakub Jelinek <jakub@redhat.com>
2069
2070 Update copyright years.
2071
d17680f3
JJ
20722016-12-21 Jakub Jelinek <jakub@redhat.com>
2073
0dba7960
JJ
2074 PR bootstrap/78817
2075 * c-typeck.c (build_function_call_vec): If check_function_arguments
2076 returns true, set TREE_NO_WARNING on CALL_EXPR.
2077
d17680f3
JJ
2078 PR c/77767
2079 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
2080 to *expr instead of overwriting it.
2081
aa90531e
RB
20822016-12-20 Richard Biener <rguenther@suse.de>
2083
2084 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
2085 error recovery.
2086 (c_parser_gimple_statement): Only build assigns for non-error
2087 stmts.
2088 (c_parser_gimple_postfix_expression_after): Improve error recovery.
2089
629b3d75
MJ
20902016-12-14 Martin Jambor <mjambor@suse.cz>
2091
2092 * c-parser.c: Include omp-general.h and omp-offload.h instead of
2093 omp-low.h.
2094 (c_finish_oacc_routine): Adjusted call to
2095 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
2096 to use their new names.
2097 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
2098 use its new name.
2099 (c_parser_oacc_update): Likewise.
2100 (c_parser_omp_simd): Likewise.
2101 (c_parser_omp_target_update): Likewise.
2102 * c-typeck.c: Include omp-general.h instead of omp-low.h.
2103 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
2104 name.
2105 (c_finish_omp_cancellation_point): Likewise.
2106 * gimple-parser.c: Do not include omp-low.h
2107
c5af52eb
CP
21082016-12-02 Cesar Philippidis <cesar@codesourcery.com>
2109 James Norris <jnorris@codesourcery.com>
2110
2111 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
2112 EXIT_DATA,WAIT} are not used in compound statements.
2113 (c_parser_oacc_enter_exit_data): Update diagnostics.
2114
48330c93
BE
21152016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2116
2117 PR c++/71973
2118 * c-decl.c (diagnose_mismatched_decls): Use
2119 OPT_Wbuiltin_declaration_mismatch here too.
2120
899ca90e 21212016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
2122 Alan Hayward <alan.hayward@arm.com>
2123 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
2124
2125 * c-decl.c (merge_decls): Use SET_DECL_MODE.
2126 (make_label, finish_struct): Likewise.
2127
1ee62b92 21282016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 2129 Richard Biener <rguenther@suse.de>
22b15758 2130
8e745a17
JJ
2131 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
2132 * config-lang.in (gtfiles): Add c/c-parser.h.
2133 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
2134 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
2135 * c-parser.c (enum c_id_kind, struct c_token,
2136 c_parser_next_token_is, c_parser_next_token_is_not,
2137 c_parser_next_token_is_keyword,
2138 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
2139 Split out to ...
2140 * c-parser.h: ... new header.
2141 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 2142 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
2143 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2144 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2145 c_parser_error, c_parser_require, c_parser_skip_until_found,
2146 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2147 c_parser_type_name): Export.
2148 (c_parser_tokens_buf): New function.
2149 (c_parser_error): Likewise.
2150 (c_parser_set_error): Likewise.
2151 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
2152 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
2153 via c_parser_parse_gimple_body.
8e745a17
JJ
2154 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
2155 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2156 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2157 c_parser_error, c_parser_require, c_parser_skip_until_found,
2158 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2159 c_parser_type_name): Declare.
1ee62b92
PG
2160 (struct c_parser): Declare forward.
2161 (c_parser_tokens_buf): Declare.
8e745a17
JJ
2162 (c_parser_error): Likewise.
2163 (c_parser_set_error): Likewise.
2164 * gimple-parser.c: New file.
2165 * gimple-parser.h: Likewise.
1ee62b92 2166
22b15758
UB
21672016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2168
2169 PR c/35503
2170 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2171 warn_for_restrict.
2172
84ff4775
LCW
21732016-09-11 Le-Chun Wu <lcwu@google.com>
2174 Mark Wielaard <mjw@redhat.com>
2175
2176 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
2177 to the given -Wshadow= variant.
2178
4d0cdd0c
TP
21792016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2180
2181 * c-typeck.c: Include memmodel.h.
2182
1202f33e
JJ
21832016-10-13 Jakub Jelinek <jakub@redhat.com>
2184
2185 PR target/77957
2186 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
2187 instead of lhd_return_null_tree_v.
2188
8a14afd0
BS
21892016-10-07 Bernd Schmidt <bschmidt@redhat.com>
2190
2191 PR c++/69733
2192 * c-decl.c (smallest_type_quals_location): New static function.
2193 (grokdeclarator): Try to find the correct location for an ignored
2194 qualifier.
2195
81fea426
MP
21962016-09-26 Marek Polacek <polacek@redhat.com>
2197
2198 PR c/7652
2199 * c-decl.c (pop_scope): Add gcc_fallthrough.
2200
22012016-09-26 Marek Polacek <polacek@redhat.com>
2202
2203 PR c/7652
2204 * c-parser.c (struct c_token): Add flags field.
2205 (c_lex_one_token): Pass it to c_lex_with_flags.
2206 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
2207 into IFN_FALLTHROUGH.
2208 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
2209 attribute fallthrough after a case label or default label.
2210 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
2211
9a2300e9
MP
22122016-09-24 Marek Polacek <polacek@redhat.com>
2213
2214 PR c/77490
2215 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
2216 have boolean value. Warn about ++/-- on booleans.
2217
7de76362
JJ
22182016-09-23 Jakub Jelinek <jakub@redhat.com>
2219
2220 * c-parser.c (incomplete_record_decls): Remove unnecessary
2221 = vNULL initialization of file scope vec.
2222
5b73d2ab
MP
22232016-09-16 Marek Polacek <polacek@redhat.com>
2224
2225 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
2226
e51fbec3
MP
22272016-09-14 Marek Polacek <polacek@redhat.com>
2228
2229 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
2230 (fix_array_notation_expr): Likewise.
2231 * c-decl.c (finish_decl): Likewise.
2232 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2233 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
2234 (function_to_pointer_conversion): Use false instead of 0.
2235 (convert_lvalue_to_rvalue): Likewise.
2236 (parser_build_unary_op): Likewise.
2237 (build_atomic_assign): Likewise.
2238 (build_unary_op): Change nonconvert parameter type to bool, use
2239 true/false instead of 1/0.
2240 (build_binary_op): Use true instead of 1.
2241
254830ba
DM
22422016-09-13 David Malcolm <dmalcolm@redhat.com>
2243
2244 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
2245 of add_fixit_insert to add_fixit_insert_before.
2246
4c13ba17
MP
22472016-09-13 Marek Polacek <polacek@redhat.com>
2248
2249 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
2250 it.
2251
54dcdb88
BE
22522016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
2253
2254 PR c++/77496
2255 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
2256 COMPOUND_EXPR to warn_for_omitted_condop.
2257
e5106e27
DM
22582016-09-07 David Malcolm <dmalcolm@redhat.com>
2259
2260 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
2261 c_get_substring_location for this new langhook.
2262
9dc5773f
JJ
22632016-09-02 Jakub Jelinek <jakub@redhat.com>
2264
2265 PR c/65467
2266 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
2267 flag_openmp.
2268 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
2269 instead of mark_exp_read on low_bound/length expression.
2270 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
2271 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2272 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2273 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
2274 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
2275 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
2276 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
2277 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
2278 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
2279 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
2280 instead of mark_expr_read.
2281 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
2282 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
2283 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
2284 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
2285 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
2286 array section bases outside of depend clause, for depend clause
2287 use convert_lvalue_to_rvalue on the base.
2288 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
2289 linear, aligned, map, to and from clauses.
2290 (c_omp_clause_copy_ctor): New function.
2291
295844f6
MP
22922016-09-01 Marek Polacek <polacek@redhat.com>
2293
2294 PR c/7652
2295 * c-typeck.c (composite_type): Add FALLTHRU comment.
2296
089af25c
DM
22972016-08-31 David Malcolm <dmalcolm@redhat.com>
2298
2299 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
2300 to the insertion fixits for "struct", "union", and "enum".
2301
f9087798
DM
23022016-08-30 David Malcolm <dmalcolm@redhat.com>
2303
2304 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
2305 rather than add_fixit_misspelled_id.
2306 (undeclared_variable): Likewise.
2307 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
2308 now-redundant "here" params from add_fixit_insert method calls.
2309 (c_parser_parameter_declaration): Likewise.
2310 * c-typeck.c (build_component_ref): Remove now-redundant range
2311 param from add_fixit_replace method calls.
2312
ebef225f
MP
23132016-08-25 Marek Polacek <polacek@redhat.com>
2314
2315 * c-typeck.c (parser_build_binary_op): Pass LHS to
2316 warn_logical_not_parentheses.
2317
fe377a48
MP
23182016-08-25 Marek Polacek <polacek@redhat.com>
2319
2320 PR c/77323
2321 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
2322 or _FloatN or _FloatNx is not supported.
2323 (finish_declspecs): Set type to integer_type_node when _FloatN or
2324 _FloatNx is not supported.
2325
c65699ef
JM
23262016-08-19 Joseph Myers <joseph@codesourcery.com>
2327
2328 PR c/32187
2329 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
2330 (struct c_declspecs): Add field floatn_nx_idx.
2331 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
2332 and _FloatNx type specifiers.
2333 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
2334 (c_parser_declspecs, c_parser_attribute_any_word)
2335 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
2336 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
2337 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
2338 narrower than double.
2339
2f1364c2
JJ
23402016-08-12 Jakub Jelinek <jakub@redhat.com>
2341 Martin Liska <mliska@suse.cz>
2342
2343 PR c/67410
2344 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
2345 % to determine val element to change. Assert that
2346 wchar_bytes * charwidth fits into val array.
2347
191816a3
MP
23482016-08-12 Marek Polacek <polacek@redhat.com>
2349
2350 PR c/7652
2351 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
2352 (c_parser_postfix_expression): Likewise.
2353 * c-typeck.c (build_unary_op): Adjust fall through comment.
2354 (c_mark_addressable): Likewise.
2355
b95a64bb
JJ
23562016-08-11 Jakub Jelinek <jakub@redhat.com>
2357
2358 PR c/72816
2359 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
2360 array member through typedef, for orig_qual_indirect == 0 clear
2361 orig_qual_type.
2362
895aa8e1
DM
23632016-08-08 David Malcolm <dmalcolm@redhat.com>
2364
2365 PR c/64955
2366 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
2367 this up to selftest::run_c_tests.
2368 (selftest::run_c_tests): New function.
2369
0b212d8c
TS
23702016-08-04 Thomas Schwinge <thomas@codesourcery.com>
2371
ae9281fc
TS
2372 * c-parser.c (struct oacc_routine_data): Add error_seen and
2373 fndecl_seen members.
2374 (c_finish_oacc_routine): Use these.
2375 (c_parser_declaration_or_fndef): Adjust.
2376 (c_parser_oacc_routine): Likewise. Support more C language
2377 constructs, and improve diagnostics. Move pragma context
2378 checking...
2379 (c_parser_pragma): ... here.
2380
0b212d8c
TS
2381 * c-parser.c (struct oacc_routine_data): New.
2382 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
2383 Simplify code.
2384 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
2385 declare target" attribute.
2386
76e2c821
JB
23872016-08-01 Jan Beulich <jbeulich@suse.com>
2388
2389 * c-fold.c (c_fully_fold_internal): Also emit shift count
2390 warnings for vector types.
2391 * c-typeck.c (build_binary_op): Likewise.
2392
f618a472
MP
23932016-07-29 Marek Polacek <polacek@redhat.com>
2394
2395 PR c/71742
2396 * c-decl.c (finish_struct): Rephrase an error message.
2397
efd0786f
MP
2398 PR c/71853
2399 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
2400 to error node for invalid code.
2401
e00dceaf
MP
2402 PR c/71573
2403 * c-decl.c (implicitly_declare): Return decl early not only for
2404 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
2405
673a107a
JJ
24062016-07-29 Jakub Jelinek <jakub@redhat.com>
2407
2408 PR c/71969
2409 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
2410 on GNU extern inline functions.
2411
a5b5c8b6
MP
24122016-07-29 Marek Polacek <polacek@redhat.com>
2413
2414 PR c/71583
2415 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
2416 check expr.value.
2417
e3fe09c1
UB
24182016-07-22 Uros Bizjak <ubizjak@gmail.com>
2419
2420 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
2421
7c8f7eaa
DM
24222016-07-20 David Malcolm <dmalcolm@redhat.com>
2423
2424 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
2425 spellcheck-tree.h
2426 (best_macro_match): Likewise, converting from a typedef to a
2427 subclass.
2428 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
2429 (lookup_name_fuzzy): Update for change of best_macro_match to a
2430 subclass with a ctor that calls cpp_forall_identifiers.
2431
de6a69ee
DM
24322016-07-20 David Malcolm <dmalcolm@redhat.com>
2433
2434 * c-decl.c (implicit_decl_warning): Update for conversion of
2435 return type of lookup_name_fuzzy to const char *.
2436 (undeclared_variable): Likewise.
2437 (lookup_name_fuzzy): Convert return type from tree to
2438 const char *.
2439 * c-parser.c (c_parser_declaration_or_fndef): Update for
2440 conversion of return type of lookup_name_fuzzy to const char *.
2441 (c_parser_parameter_declaration): Likewise.
2442
b1c9c068
CP
24432016-07-15 Cesar Philippidis <cesar@codesourcery.com>
2444
2445 * c-parser.c (c_parser_oacc_declare): Don't scan for
2446 GOMP_MAP_POINTER.
2447 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
2448 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
2449 zero-length subarrays.
2450
ddbbcb19
JJ
24512016-07-15 Jakub Jelinek <jakub@redhat.com>
2452
2453 PR c/71858
2454 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
2455 instead of FUZZY_LOOKUP_NAME.
2456 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
2457 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
2458
dd36b877
JJ
24592016-07-14 Jakub Jelinek <jakub@redhat.com>
2460
2461 PR c/71858
2462 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
2463
8c681247
TS
24642016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2465
2466 * c-parser.c (c_parser_generic_selection): Make type of variable
2467 auto_vec.
2468 (c_parser_omp_declare_simd): Likewise.
2469
bf4fa671
TS
24702016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2471
2472 * c-decl.c (struct c_struct_parse_info): Change member types
2473 from vec to auto_vec.
2474 (start_struct): Adjust.
2475 (finish_struct): Likewise.
2476
557e8c49
JJ
24772016-07-02 Jakub Jelinek <jakub@redhat.com>
2478
2479 PR c/71719
2480 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
2481
54d19c3b
TS
24822016-06-29 Thomas Schwinge <thomas@codesourcery.com>
2483
2484 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
2485 Move pragma context checking into...
2486 (c_parser_omp_cancellation_point): ... here, and improve
2487 diagnostic messages.
2488 * c-typeck.c (c_finish_omp_cancel)
2489 (c_finish_omp_cancellation_point): Improve diagnostic messages.
2490
152ef731
JJ
24912016-06-29 Jakub Jelinek <jakub@redhat.com>
2492
2493 PR c/71685
2494 * c-typeck.c (c_build_qualified_type): Don't clear
2495 C_TYPE_INCOMPLETE_VARS for the main variant.
2496
24972016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
2498
2499 PR c/71552
2500 * c-typeck.c (output_init_element): Diagnose incompatible types
2501 before non-constant initializers.
2502
e9ac1f86
JJ
25032016-06-28 Jakub Jelinek <jakub@redhat.com>
2504
2505 * Make-lang.in: Don't cat ../stage_current if it does not exist.
2506
277d7ee0
AK
25072016-06-23 Andi Kleen <ak@linux.intel.com>
2508
2509 * Make-lang.in: Add support for autofdo.
2510
1a4f11c8
DM
25112016-06-22 David Malcolm <dmalcolm@redhat.com>
2512
2513 PR c/70339
2514 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
2515 (implicit_decl_warning): When issuing warnings for implicit
2516 declarations, attempt to provide a suggestion via
2517 lookup_name_fuzzy.
2518 (undeclared_variable): Likewise when issuing errors.
2519 (lookup_name_in_scope): Likewise.
2520 (struct edit_distance_traits<cpp_hashnode *>): New struct.
2521 (best_macro_match): New typedef.
2522 (find_closest_macro_cpp_cb): New function.
2523 (lookup_name_fuzzy): New function.
2524 * c-parser.c: Include gcc-rich-location.h.
2525 (c_token_starts_typename): Split out case CPP_KEYWORD into...
2526 (c_keyword_starts_typename): ...this new function.
2527 (c_parser_declaration_or_fndef): When issuing errors about
2528 missing "struct" etc, add a fixit. For other kinds of errors,
2529 attempt to provide a suggestion via lookup_name_fuzzy.
2530 (c_parser_parms_declarator): When looking ahead to detect typos in
2531 type names, also reject CPP_KEYWORD.
2532 (c_parser_parameter_declaration): When issuing errors about
2533 unknown type names, attempt to provide a suggestion via
2534 lookup_name_fuzzy.
2535 * c-tree.h (c_keyword_starts_typename): New prototype.
2536
5a578671
JM
25372016-06-20 Joseph Myers <joseph@codesourcery.com>
2538
2539 PR c/71601
2540 * c-typeck.c (build_conditional_expr): Return error_mark_node if
2541 c_common_type returns error_mark_node.
2542
3f8257db 25432016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
2544
2545 PR c/69507
2546 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
2547 __alignof__ (expression).
2548
6a3f203c
DM
25492016-06-14 David Malcolm <dmalcolm@redhat.com>
2550
2551 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
2552
264757fb
DM
25532016-06-14 David Malcolm <dmalcolm@redhat.com>
2554
2555 * c-typeck.c (build_component_ref): Simplify fixit code by
2556 using gcc_rich_location::add_fixit_misspelled_id.
2557 (set_init_label): Likewise.
2558
f7e4f2e3
DM
25592016-06-13 David Malcolm <dmalcolm@redhat.com>
2560
2561 * c-parser.c (c_parser_initelt): Provide location of name for new
2562 location_t param of set_init_label.
2563 * c-tree.h (set_init_label): Add location_t param.
2564 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
2565 param and use it when issuing error messages about unrecognized
2566 field names. Attempt to provide a fixit hint if appropriate,
2567 otherwise update the error message to provide the type name.
2568
4b1ffdb1
TS
25692016-06-10 Thomas Schwinge <thomas@codesourcery.com>
2570
2571 PR c/71381
2572 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
2573 Loosen checking.
2574
44a845ca
MS
25752016-06-08 Martin Sebor <msebor@redhat.com>
2576 Jakub Jelinek <jakub@redhat.com>
2577
2578 PR c++/70507
2579 PR c/68120
2580 * c-typeck.c (convert_arguments): Don't promote last argument
2581 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2582
92a5f2ba
MP
25832016-06-08 Marek Polacek <polacek@redhat.com>
2584
2585 PR c/71418
2586 * c-decl.c (grokdeclarator): Check TYPE_P.
2587
08203f73
MP
2588 PR c/71426
2589 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
2590 code.
2591
6ffd47b7
DM
25922016-06-07 David Malcolm <dmalcolm@redhat.com>
2593
2594 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
2595 and structure element reference, capture the location of the
2596 element name token and pass it to build_component_ref.
2597 (c_parser_postfix_expression_after_primary): Likewise for
2598 structure element dereference.
2599 (c_parser_omp_variable_list): Likewise for
2600 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
2601 * c-tree.h (build_component_ref): Add location_t param.
2602 * c-typeck.c (build_component_ref): Add location_t param
2603 COMPONENT_LOC. Use it, if available, when issuing hints about
2604 mispelled member names to provide a fixit replacement hint.
2605
1f40cff3
MP
26062016-06-06 Marek Polacek <polacek@redhat.com>
2607
2608 PR c/71362
2609 * c-parser.c (c_parser_direct_declarator): Set location.
2610
5545a907
MP
26112016-06-06 Marek Polacek <polacek@redhat.com>
2612
2613 * c-typeck.c (comptypes_internal): Handle comparisons of
2614 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
2615 TYPE_REF_CAN_ALIAS_ALL.
2616
b605f663
CLT
26172016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
2618
2619 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
2620 arguments as addressable when async clause exists.
2621
00631022
JJ
26222016-05-30 Jakub Jelinek <jakub@redhat.com>
2623
2624 PR c++/71349
2625 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
2626 when combined with target construct.
2627
7211a097
JJ
26282016-05-26 Jakub Jelinek <jakub@redhat.com>
2629
2630 * c-parser.c (c_parser_omp_clause_schedule): Warn if
2631 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
2632
95efe6b6
MP
26332016-05-25 Marek Polacek <polacek@redhat.com>
2634
2635 PR c/71265
2636 * c-decl.c (c_make_fname_decl): Don't check seen_error.
2637
a23faf7a
MP
2638 PR c/71266
2639 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
2640
e46c7770
CP
26412016-05-24 Cesar Philippidis <cesar@codesourcery.com>
2642
2643 * c-parser.c (c_parser_oacc_declare): Add support for
2644 GOMP_MAP_FIRSTPRIVATE_POINTER.
2645 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
2646 argument with enum c_omp_region_type ort.
2647 (handle_omp_array_sections): Likewise. Update call to
2648 handle_omp_array_sections_1.
2649 (c_finish_omp_clauses): Add specific errors and warning messages for
2650 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
2651 call to handle_omp_array_sections.
2652
a04e69c0
TS
26532016-05-24 Thomas Schwinge <thomas@codesourcery.com>
2654
2655 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
2656
f17a223d
RB
26572016-05-24 Richard Biener <rguenther@suse.de>
2658
2659 PR middle-end/70434
2660 PR c/69504
2661 * c-typeck.c (build_array_ref): Do not complain about indexing
2662 non-lvalue vectors. Adjust for function name change.
2663
79063edd
MS
26642016-05-20 Martin Sebor <msebor@redhat.com>
2665
2666 PR c/71115
2667 * c-typeck.c (error_init): Use
2668 expansion_point_location_if_in_system_header.
2669 (warning_init): Same.
2670
8a40fef3
DM
26712016-05-19 David Malcolm <dmalcolm@redhat.com>
2672
2673 PR c/71171
2674 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
2675 in error-handling.
2676 (c_parser_postfix_expression): Likewise.
2677 * c-tree.h (c_expr::set_error): New method.
2678 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
2679 that result's range is initialized.
2680
e9892350
JG
26812016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
2682
2683 * c-typeck.c (parser_build_unary_op): Fix formatting.
2684
8fad45f5
MW
26852016-05-16 Matthew Wahab <matthew.wahab@arm.com>
2686
2687 * c-decl.c (grokdeclarator): Remove errmsg and use of
2688 targetm.invalid_return_type.
2689 (grokparms): Remove errmsg and use of
2690 targetm.invalid_parameter_type.
2691
aa4b467b
JM
26922016-05-13 Joseph Myers <joseph@codesourcery.com>
2693
2694 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2695 function return type.
2696
4f2e1536
MP
26972016-05-12 Marek Polacek <polacek@redhat.com>
2698
2699 PR c/70756
2700 * c-decl.c (build_compound_literal): Pass LOC down to
2701 c_incomplete_type_error.
2702 * c-tree.h (require_complete_type): Adjust declaration.
2703 (c_incomplete_type_error): Likewise.
2704 * c-typeck.c (require_complete_type): Add location parameter, pass it
2705 down to c_incomplete_type_error.
2706 (c_incomplete_type_error): Add location parameter, pass it down to
2707 error_at.
2708 (build_component_ref): Pass location down to c_incomplete_type_error.
2709 (default_conversion): Pass location down to require_complete_type.
2710 (build_array_ref): Likewise.
2711 (build_function_call_vec): Likewise.
2712 (convert_arguments): Likewise.
2713 (build_unary_op): Likewise.
2714 (build_c_cast): Likewise.
2715 (build_modify_expr): Likewise.
2716 (convert_for_assignment): Likewise.
2717 (c_finish_omp_clauses): Likewise.
2718
d6e83a8d
MM
27192016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2720
2721 PR c/43651
2722 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
2723 is enabled.
2724 * c-errors.c (pedwarn_c90): Return true if warned.
2725 * c-tree.h (pedwarn_c90): Change return type to bool.
2726 (enum c_declspec_word): Add new enumerator cdw_atomic.
2727
5c3a10fb
MP
27282016-05-11 Marek Polacek <polacek@redhat.com>
2729
2730 PR c++/71024
2731 * c-decl.c (diagnose_mismatched_decls): Factor out code to
2732 diagnose_mismatched_attributes and call it.
2733
cf68d92c
MP
27342016-05-10 Marek Polacek <polacek@redhat.com>
2735
2736 PR c/70255
2737 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2738 on a declaration following the definition.
2739
351f85c5
JJ
27402016-05-05 Jakub Jelinek <jakub@redhat.com>
2741
2742 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2743 parse it through to c_parser_c99_block_statement.
2744 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2745 caller.
2746
deef7113
MP
27472016-05-04 Marek Polacek <polacek@redhat.com>
2748
2749 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2750 OPT_Wdangling_else.
2751
de55efd5
MP
27522016-05-04 Marek Polacek <polacek@redhat.com>
2753
2754 PR c/48778
2755 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2756 for macro expansions.
2757
79ce98bc
MP
27582016-05-03 Marek Polacek <polacek@redhat.com>
2759
2760 PR c/70859
2761 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
2762 check_builtin_function_arguments.
2763
fb2647aa
RB
27642016-05-03 Richard Biener <rguenther@suse.de>
2765
2766 * Make-lang.in (cc1-checksum.c): For stage-final re-use
2767 the checksum from the previous stage.
2768
77886428
CP
27692016-05-02 Cesar Philippidis <cesar@codesourcery.com>
2770
2771 * c-parser.c (c_parser_oacc_all_clauses): Update call to
2772 c_finish_omp_clauses.
2773 (c_parser_omp_all_clauses): Likewise.
2774 (c_parser_oacc_cache): Likewise.
2775 (c_parser_oacc_loop): Likewise.
2776 (omp_split_clauses): Likewise.
2777 (c_parser_omp_declare_target): Likewise.
2778 (c_parser_cilk_all_clauses): Likewise.
2779 (c_parser_cilk_for): Likewise.
2780 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
2781 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2782
7176a4a0
MP
27832016-05-02 Marek Polacek <polacek@redhat.com>
2784
2785 PR c/70851
2786 * c-decl.c (grokdeclarator): Diagnose when array's size has an
2787 incomplete type.
2788
e7ff0319
CP
27892016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2790
2791 PR middle-end/70626
2792 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
2793 OACC_LOOP_CLAUSE_MASK.
2794 (c_parser_oacc_kernels_parallel): Update call to
2795 c_oacc_split_loop_clauses.
2796
9f405ce1
AM
27972016-04-28 Andrew MacLeod <amacleod@redhat.com>
2798
2799 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
2800 argument to build_modify_expr in two cases.
2801
c1e1f433
BS
28022016-04-27 Bernd Schmidt <bschmidt@redhat.com>
2803
2804 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2805 warn_for_memset instead of warning directly here.
2806
2448a956
MP
28072016-04-26 Marek Polacek <polacek@redhat.com>
2808
2809 PR c/67784
2810 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2811 out of ...
2812 (c_parser_for_statement): ... here.
2813 (c_parser_if_statement): Use it.
2814 (c_parser_switch_statement): Use it.
2815 (c_parser_while_statement): Use it.
2816
b02a5e26
MP
2817 PR c/70791
2818 * c-decl.c (pushdecl): Pass LOCUS down to warning.
2819
477d4906
IV
28202016-04-20 Ilya Verbin <ilya.verbin@intel.com>
2821
2822 PR c++/69363
2823 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2824 instead of c_finish_cilk_clauses.
2825 * c-tree.h (c_finish_omp_clauses): Add new default argument.
2826 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
2827 floating-point variables in the linear clause for Cilk Plus.
2828
fe37c7af
MM
28292016-04-18 Michael Matz <matz@suse.de>
2830
2831 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2832 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2833
949505a9
MP
28342016-04-15 Marek Polacek <polacek@redhat.com>
2835
2836 PR c/70671
2837 * c-typeck.c (build_unary_op): Pass location down to error and
2838 warning call.
2839
dda1bf61
JJ
28402016-04-15 Jakub Jelinek <jakub@redhat.com>
2841
2842 PR c/70436
2843 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2844 where needed.
2845 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2846 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2847 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2848 Adjust c_parser_pragma callers.
2849 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
2850 caller.
2851 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2852 c_parser_statement.
2853 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2854 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2855 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2856 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2857 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2858 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2859 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2860 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2861 down where needed.
2862 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
2863 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2864 calls.
2865
99cd9857
MP
28662016-04-13 Marek Polacek <polacek@redhat.com>
2867
2868 PR c/70436
2869 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2870 adjust callers.
2871 (c_parser_statement): Likewise.
2872 (c_parser_c99_block_statement): Likewise.
2873 (c_parser_while_statement): Likewise.
2874 (c_parser_for_statement): Likewise.
2875 (c_parser_if_body): Don't set IF_P here.
2876 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
2877 about dangling else here.
2878 * c-tree.h (c_finish_if_stmt): Adjust declaration.
2879 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
2880 warn about dangling else here.
2881
f13355da
MP
28822016-04-04 Marek Polacek <polacek@redhat.com>
2883
2884 PR c/70307
2885 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2886
5fde6a45
MP
28872016-03-31 Marek Polacek <polacek@redhat.com>
2888
2889 PR c/70297
2890 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2891
4bbf545b
DM
28922016-03-18 David Malcolm <dmalcolm@redhat.com>
2893
2894 PR c/70281
2895 * c-parser.c (c_parser_postfix_expression): Set the source range
2896 for uses of "__builtin_types_compatible_p".
2897
fcc2b74f
JJ
28982016-03-17 Jakub Jelinek <jakub@redhat.com>
2899
2900 PR c/70280
2901 * c-typeck.c (composite_type): Don't count void_list_node
2902 into len, if the list is terminated by void_list_node, start
2903 with void_list_node instead of NULL for newargs. Stop
2904 at void_list_node.
2905
ab4c578f
MP
29062016-03-16 Marek Polacek <polacek@redhat.com>
2907
2908 PR c/70093
2909 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2910 nested functions returning VM types.
2911
96b3c82d
CP
29122016-03-09 Cesar Philippidis <cesar@codesourcery.com>
2913
2914 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2915 when calling c_finish_omp_clauses.
2916
29b9828f
BS
29172016-03-04 Bernd Schmidt <bschmidt@redhat.com>
2918
2919 PR c/69824
2920 * c-decl.c (get_parm_info): Don't queue implicit function declarations
2921 for later.
2922
7ff6ca38
MP
29232016-03-04 Marek Polacek <polacek@redhat.com>
2924
2925 PR c/69798
2926 * c-parser.c (c_parser_postfix_expression): Call
2927 c_parser_cast_expression rather than c_parser_postfix_expression.
2928
686e2237
JJ
29292016-03-01 Jakub Jelinek <jakub@redhat.com>
2930
2931 PR c/69796
2932 PR c/69974
2933 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2934 of incomplete decls to error_mark_node.
2935
0b05329b
MP
29362016-02-24 Marek Polacek <polacek@redhat.com>
2937
2938 PR c/69819
2939 * c-decl.c (finish_decl): Don't update the copy of the type of a
2940 different decl type.
2941
067fbd8b
JJ
29422016-02-23 Jakub Jelinek <jakub@redhat.com>
2943
2944 PR objc/69844
2945 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2946 in id_kind reclassification.
2947
bf14eba2
JJ
29482016-02-16 Jakub Jelinek <jakub@redhat.com>
2949
2950 PR c/69835
2951 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2952
ba539195
JN
29532016-02-16 James Norris <jnorris@codesourcery.com>
2954
2955 PR c/64748
2956 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2957
16595a1f
BS
29582016-02-12 Bernd Schmidt <bschmidt@redhat.com>
2959
f48dfe98
BS
2960 * c-decl.c (build_null_declspecs): Zero the entire struct.
2961
16595a1f
BS
2962 PR c/69522
2963 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
2964 callers changed. If nested_p is true, use it to call
2965 finish_implicit_inits.
2966 * c-tree.h (finish_implicit_inits): Declare.
2967 * c-typeck.c (finish_implicit_inits): New function. Move code
2968 from ...
2969 (push_init_level): ... here.
2970 (set_designator, process_init_element): Call finish_implicit_inits.
2971
66756373
JJ
29722016-02-11 Jakub Jelinek <jakub@redhat.com>
2973
2974 PR c/69768
2975 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
2976 arguments for -Waddress warning.
2977
1066e9b5
JJ
29782016-02-04 Jakub Jelinek <jakub@redhat.com>
2979
2980 PR c/69669
2981 * c-decl.c (finish_enum): When honoring mode attribute,
2982 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2983
3a5d2ba4
JJ
29842016-01-29 Jakub Jelinek <jakub@redhat.com>
2985
2986 PR debug/69518
2987 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2988 all type variants, not just TYPE_MAIN_VARIANT.
2989
cbdd8ae0
JJ
29902016-01-27 Jakub Jelinek <jakub@redhat.com>
2991
2992 PR debug/66869
2993 * c-decl.c (c_write_global_declarations_1): Warn with
2994 warn_unused_function if static prototype without definition
2995 is not C_DECL_USED.
2996
fa74a4bc
MP
29972016-01-27 Marek Polacek <polacek@redhat.com>
2998
2999 PR c/68062
3000 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
3001 to unsigned, if needed. Add -Wsign-compare warning.
3002
13f92e8d
JJ
30032016-01-26 Jakub Jelinek <jakub@redhat.com>
3004
3005 PR tree-optimization/69483
3006 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
3007
cd8e73dc 30082016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
3009
3010 PR c/24293
3011 * c-tree.h (incomplete_record_decls): Declare.
3012 * c-parser.c (incomplete_record_decls): Define.
3013 (c_parser_translation_unit): Iterate through incomplete_record_decls and
3014 report error if any decl has zero size.
3015 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
3016 or enum type to incomplete_record_decls.
3017
e6d6ec9e
TV
30182016-01-14 Tom de Vries <tom@codesourcery.com>
3019
3020 PR tree-optimization/68773
3021 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
3022 set force_output.
3023
00083992
MP
30242016-01-14 Marek Polacek <polacek@redhat.com>
3025
3026 PR c/69262
3027 * c-decl.c (grokdeclarator): Provide more information for invalid
3028 array declarations.
3029
7443cf13
DM
30302016-01-06 David Malcolm <dmalcolm@redhat.com>
3031
3032 * c-parser.c (c_parser_unary_expression): For dereferences, build
3033 a combined location before calling build_indirect_ref, so that
3034 error reports cover the full range, manually updating the c_expr
3035 src_range.
3036
6b131d5b
MP
30372016-01-06 Marek Polacek <polacek@redhat.com>
3038
3039 PR sanitizer/69099
3040 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
3041 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
3042 NULL.
3043
818ab71a
JJ
30442016-01-04 Jakub Jelinek <jakub@redhat.com>
3045
3046 Update copyright years.
3047
2fe0a208
MP
30482016-01-04 Marek Polacek <polacek@redhat.com>
3049
3050 PR c/68908
3051 * c-typeck.c (build_atomic_assign): Improve commentary. Add
3052 optimization to use __atomic_fetch_* built-in if possible.
3053
c7b48c8a
TS
30542015-12-23 Thomas Schwinge <thomas@codesourcery.com>
3055
3056 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
3057 into...
3058 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
3059 all users.
3060
fda5652f
MP
30612015-12-22 Marek Polacek <polacek@redhat.com>
3062
3063 PR c/69002
3064 * c-typeck.c (build_component_ref): Warn when acessing elements of
3065 atomic structures or unions.
3066
745e411d
DM
30672015-12-21 David Malcolm <dmalcolm@redhat.com>
3068
3069 * c-typeck.c: Include "gcc-rich-location.h".
3070 (build_binary_op): In the two places that call binary_op_error,
3071 create a gcc_rich_location and populate it with the location of
3072 the binary op and its two operands.
3073
94c40e19
DM
30742015-12-16 David Malcolm <dmalcolm@redhat.com>
3075
3076 * c-parser.c (c_parser_statement_after_labels): When calling
3077 c_finish_return, Use the return expression's location if it has
3078 one, falling back to the location of the first token within it.
3079 * c-typeck.c (c_finish_return): When issuing warnings about
3080 the incorrect presence/absence of a return value, issue a note
3081 showing the declaration of the function.
3082
de67c4c3
DM
30832015-12-16 David Malcolm <dmalcolm@redhat.com>
3084
3085 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
3086 to 4.
3087 (c_parser_peek_nth_token): New function.
3088 (c_parser_peek_conflict_marker): New function.
3089 (c_parser_error): Detect conflict markers and report them as such.
3090
a10704e1
DM
30912015-12-16 David Malcolm <dmalcolm@redhat.com>
3092
3093 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
3094 to preserve range information for the primary expression
3095 in the call to c_parser_postfix_expression_after_primary.
3096
8062bca6
DM
30972015-12-16 David Malcolm <dmalcolm@redhat.com>
3098
3099 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
3100 expression location, falling back on the first token location,
3101 rather than always using the latter.
3102
d06f8b75
MP
31032015-12-16 Marek Polacek <polacek@redhat.com>
3104
3105 PR c/64637
3106 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
3107 available.
3108
2994fb91
MP
31092015-12-15 Marek Polacek <polacek@redhat.com>
3110
3111 PR c/68907
3112 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
3113 artificial decl.
3114
a1b93f8d
DM
31152015-12-08 David Malcolm <dmalcolm@redhat.com>
3116
3117 * c-parser.c (c_parser_alignof_expression): Capture location of
3118 closing parenthesis (if any), or of end of unary expression, and
3119 use it to build a src_range for the expression.
3120
46c6e1e2
DM
31212015-12-08 David Malcolm <dmalcolm@redhat.com>
3122
3123 PR c/68757
3124 * c-parser.c (c_parser_get_builtin_args): Add
3125 "out_close_paren_loc" param, and write back to it.
3126 (c_parser_postfix_expression): Capture the closing
3127 parenthesis location for RID_CHOOSE_EXPR,
3128 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
3129 RID_BUILTIN_SHUFFLE and use it to set the source range
3130 for such expressions; within RID_BUILTIN_COMPLEX set
3131 the underlying location.
3132
66189108
MP
31332015-12-07 Marek Polacek <polacek@redhat.com>
3134
3135 PR c/68668
3136 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
3137 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
3138
f187980b
EB
31392015-12-04 Eric Botcazou <ebotcazou@adacore.com>
3140
3141 * c-tree.h (c_build_va_arg): Adjust prototype.
3142 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
3143 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
3144 parameter, adjust throughout and issue an error if EXPR is a component
3145 with reverse storage order.
3146
4250754e
JM
31472015-12-02 Jason Merrill <jason@redhat.com>
3148
3149 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
3150 (c_fully_fold_internal, decl_constant_value_for_optimization):
3151 Move from c-common.c.
3152 * c-tree.h: Declare decl_constant_value_for_optimization.
3153 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
3154
e9e32ee6
JM
31552015-12-02 Joseph Myers <joseph@codesourcery.com>
3156
3157 PR c/68162
3158 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
3159 following link from declarator to next declarator. Track original
3160 qualified type and pass it to c_build_qualified_type.
3161 * c-typeck.c (c_build_qualified_type): Add arguments
3162 orig_qual_type and orig_qual_indirect.
3163
ff7a55bf
TS
31642015-12-02 Thomas Schwinge <thomas@codesourcery.com>
3165
3166 * c-parser.c (c_parser_omp_clause_name)
3167 (c_parser_oacc_all_clauses): Alphabetical sorting.
3168
657e4e47
JJ
31692015-12-02 Jakub Jelinek <jakub@redhat.com>
3170
3171 PR c/68533
3172 * c-decl.c (get_parm_info): Use b->locus instead of input_location
3173 for diagnostics.
3174
37d5ad46
JB
31752015-12-01 Julian Brown <julian@codesourcery.com>
3176 Cesar Philippidis <cesar@codesourcery.com>
3177 James Norris <James_Norris@mentor.com>
3178
3179 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
3180 (c_parser_oacc_clause_use_device): New function.
3181 (c_parser_oacc_all_clauses): Add use_device support.
3182 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
3183 (c_parser_oacc_host_data): New function.
3184 (c_parser_omp_construct): Add host_data support.
3185 * c-tree.h (c_finish_oacc_host_data): Add prototype.
3186 * c-typeck.c (c_finish_oacc_host_data): New function.
3187 (c_finish_omp_clauses): Add use_device support.
3188
a4850ce9
JH
31892015-11-29 Jan Hubicka <hubicka@ucw.cz>
3190
3191 PR c/67106
3192 * c-decl.c: Set TYPE_PACKED in variants.
3193
b58d3df2
ML
31942015-11-27 Martin Liska <mliska@suse.cz>
3195
3196 PR c++/68312
3197 * c-array-notation.c (fix_builtin_array_notation_fn):
3198 Use release_vec_vec instead of vec::release.
3199 (build_array_notation_expr): Likewise.
3200 (fix_conditional_array_notations_1): Likewise.
3201 (fix_array_notation_expr): Likewise.
3202 (fix_array_notation_call_expr): Likewise.
3203
aec17bfe
JJ
32042015-11-27 Jakub Jelinek <jakub@redhat.com>
3205
3206 PR c/63326
3207 * c-parser.c (c_parser_compound_statement_nostart): If
3208 last_label is true, use pragma_stmt instead of pragma_compound
3209 as second c_parser_pragma argument.
3210 (c_parser_omp_ordered, c_parser_omp_target_update,
3211 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
3212 false as second argument to c_parser_skip_to_pragma_eol after
3213 diagnosing standalone directives used in pragma_stmt context.
3214
688c4de0
IV
32152015-11-24 Ilya Verbin <ilya.verbin@intel.com>
3216
3217 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
3218 with "if (ENABLE_OFFLOADING)".
3219
cbd03aee
DM
32202015-11-23 David Malcolm <dmalcolm@redhat.com>
3221
3222 PR objc/68438
3223 * c-parser.c (c_parser_postfix_expression): Set up source ranges
3224 for various Objective-C constructs: Class.name syntax,
3225 @selector(), @protocol(), @encode(), and [] message syntax.
3226
a87a86e1
DM
32272015-11-20 David Malcolm <dmalcolm@redhat.com>
3228
3229 PR 62314
3230 * c-typeck.c (should_suggest_deref_p): New function.
3231 (build_component_ref): Special-case POINTER_TYPE when
3232 generating a "not a structure of union" error message, and
3233 suggest a "->" rather than a ".", providing a fix-it hint.
3234
8ece8dfb
DM
32352015-11-19 David Malcolm <dmalcolm@redhat.com>
3236
3237 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
3238 candidate into a new function, find_closest_identifier.
3239
433068cc
MP
32402015-11-19 Marek Polacek <polacek@redhat.com>
3241
3242 PR c/68412
3243 * c-typeck.c (parser_build_binary_op): Properly handle
3244 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
3245
bef08b71
DM
32462015-11-17 David Malcolm <dmalcolm@redhat.com>
3247
3248 * c-parser.c (set_c_expr_source_range): Bulletproof both
3249 overloaded implementations against NULL expr->value.
3250 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
3251 values.
3252 (c_parser_unary_expression): Likewise when handling addresses of
3253 labels.
3254 (c_parser_postfix_expression): Likewise for statement expressions,
3255 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
3256 __builtin_va_arg, and for __builtin_offset_of.
3257 (c_parser_postfix_expression_after_paren_type): Initialize expr's
3258 src_range using the range of the braced initializer.
3259 (c_parser_transaction_expression): Set src_range for "ret" to a
3260 sane pair of values.
3261
fff77217
KY
32622015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
3263
3264 * c-parser.c (c_finish_omp_declare_simd): Look for
3265 "simd" attribute as well. Update error message.
3266
1d899da2
TS
32672015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3268
3269 * c-parser.c (c_parser_omp_declare_target): Adjust.
3270
e4606348
JJ
32712015-11-14 Jakub Jelinek <jakub@redhat.com>
3272
3273 * c-typeck.c (c_finish_omp_clauses): Don't mark
3274 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
3275
3e636daf
MP
32762015-11-14 Marek Polacek <polacek@redhat.com>
3277
3278 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
3279 * c-typeck.c: Likewise.
3280
ebedc9a3
DM
32812015-11-13 David Malcolm <dmalcolm@redhat.com>
3282
3283 * c-decl.c (warn_defaults_to): Pass line_table to
3284 rich_location ctor.
3285 * c-errors.c (pedwarn_c99): Likewise.
3286 (pedwarn_c90): Likewise.
3287 * c-parser.c (set_c_expr_source_range): New functions.
3288 (c_token::get_range): New method.
3289 (c_token::get_finish): New method.
3290 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
3291 based on the range from the start of the LHS to the end of the
3292 RHS.
3293 (c_parser_conditional_expression): Likewise, based on the range
3294 from the start of the cond.value to the end of exp2.value.
3295 (c_parser_binary_expression): Call set_c_expr_source_range on
3296 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
3297 (c_parser_cast_expression): Call set_c_expr_source_range on ret
3298 based on the cast_loc through to the end of the expr.
3299 (c_parser_unary_expression): Likewise, based on the
3300 op_loc through to the end of op.
3301 (c_parser_sizeof_expression) Likewise, based on the start of the
3302 sizeof token through to either the closing paren or the end of
3303 expr.
3304 (c_parser_postfix_expression): Likewise, using the token range,
3305 or from the open paren through to the close paren for
3306 parenthesized expressions.
3307 (c_parser_postfix_expression_after_primary): Likewise, for
3308 various kinds of expression.
3309 * c-tree.h (struct c_expr): Add field "src_range".
3310 (c_expr::get_start): New method.
3311 (c_expr::get_finish): New method.
3312 (set_c_expr_source_range): New decls.
3313 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
3314 on ret for prefix unary ops.
3315 (parser_build_binary_op): Likewise, running from the start of
3316 arg1.value through to the end of arg2.value.
3317
ec8b536f
MP
33182015-11-13 Marek Polacek <polacek@redhat.com>
3319
3320 PR c/68320
3321 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
3322
277fe616
DM
33232015-11-13 David Malcolm <dmalcolm@redhat.com>
3324
3325 * c-typeck.c: Include spellcheck.h.
3326 (lookup_field_fuzzy_find_candidates): New function.
3327 (lookup_field_fuzzy): New function.
3328 (build_component_ref): If the field was not found, try using
3329 lookup_field_fuzzy and potentially offer a suggestion.
3330
6e232ba4
JN
33312015-11-12 James Norris <jnorris@codesourcery.com>
3332 Joseph Myers <joseph@codesourcery.com>
3333
3334 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
3335 (c_parser_omp_clause_name): Handle 'device_resident' clause.
3336 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3337 and PRAGMA_OMP_CLAUSE_LINK.
3338 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3339 and PRAGMA_OACC_CLAUSE_LINK.
3340 (OACC_DECLARE_CLAUSE_MASK): New definition.
3341 (c_parser_oacc_declare): New function.
3342
9be4f715
MP
33432015-11-12 Marek Polacek <polacek@redhat.com>
3344
3345 PR c/67784
3346 * c-parser.c (c_parser_for_statement): Reclassify the token in
3347 a correct scope.
3348
e78bede6
MP
33492015-11-11 Marek Polacek <polacek@redhat.com>
3350
3351 PR c/68107
3352 PR c++/68266
3353 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
3354 checking the size of an array.
3355
69f293c9
AM
33562015-11-11 Andrew MacLeod <amacleod@redhat.com>
3357
3358 * c-array-notation.c: Remove unused header files.
3359 * c-aux-info.c: Likewise.
3360 * c-convert.c: Likewise.
3361 * c-decl.c: Likewise.
3362 * c-errors.c: Likewise.
3363 * c-lang.c: Likewise.
3364 * c-objc-common.c: Likewise.
3365 * c-parser.c: Likewise.
3366 * c-typeck.c: Likewise.
3367 * gccspec.c: Likewise.
3368
3a40d81d
NS
33692015-11-09 Thomas Schwinge <thomas@codesourcery.com>
3370 Cesar Philippidis <cesar@codesourcery.com>
3371 James Norris <jnorris@codesourcery.com>
3372 Julian Brown <julian@codesourcery.com>
3373 Nathan Sidwell <nathan@codesourcery.com>
3374
3375 c/
3376 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
3377 routine arg.
3378 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
3379 (c_parser_pragma): Parse 'acc routine'.
3380 (OACC_ROUTINE_CLAUSE_MARK): Define.
3381 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
3382
fc402eec
AA
33832015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3384
3385 PR debug/67192
3386 * c-typeck.c (c_finish_loop): For unconditional loops, set the
3387 location of the backward-goto to the start of the loop body.
3388
f6b0b3db
AA
33892015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3390
3391 PR debug/67192
3392 * c-parser.c (c_parser_while_statement): Finish the loop before
3393 parsing ahead for misleading indentation.
3394 (c_parser_for_statement): Likewise.
3395
ee45a32d
EB
33962015-11-08 Eric Botcazou <ebotcazou@adacore.com>
3397
3398 * c-decl.c (finish_struct): If the structure has reverse storage
3399 order, rewrite the type of array fields with scalar component. Call
3400 maybe_apply_pragma_scalar_storage_order on entry.
3401 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
3402 errors on bit-fields and reverse SSO here and not...
3403 (c_mark_addressable): ...here.
3404 (output_init_element): Adjust call to initializer_constant_valid_p.
3405 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
3406
8a645150
DM
34072015-11-06 David Malcolm <dmalcolm@redhat.com>
3408
3409 * c-decl.c (warn_defaults_to): Update for change in signature
3410 of diagnostic_set_info.
3411 * c-errors.c (pedwarn_c99): Likewise.
3412 (pedwarn_c90): Likewise.
3413 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
3414 for textinfo::set_location.
3415
7a5e4956
CP
34162015-11-05 Cesar Philippidis <cesar@codesourcery.com>
3417 Thomas Schwinge <thomas@codesourcery.com>
3418 James Norris <jnorris@codesourcery.com>
3419
3420 * c-parser.c (c_parser_omp_clause_name): Add support for
3421 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
3422 (c_parser_omp_clause_default): Add is_oacc argument. Handle
3423 default(none) in OpenACC.
3424 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
3425 arguments.
3426 (c_parser_oacc_clause_tile): New function.
3427 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
3428 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
3429 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
3430 TILE}.
3431 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
3432 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
3433 FIRSTPRIVATE}.
3434 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
3435 (c_parser_oacc_update): Update the error message for missing clauses.
3436 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
3437 and OMP_CLAUSE_INDEPENDENT.
3438
bfcfbfa0
MP
34392015-11-05 Marek Polacek <polacek@redhat.com>
3440
3441 PR c/68090
3442 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
3443 deal with pre-evaluation on invalid types.
3444
e01d41e5
JJ
34452015-11-05 Jakub Jelinek <jakub@redhat.com>
3446 Ilya Verbin <ilya.verbin@intel.com>
3447
3448 * c-parser.c: Include context.h and gimple-expr.h.
3449 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
3450 monotonic together with nonmonotonic.
3451 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
3452 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
3453 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
3454 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
3455 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
3456 expressions on combined target teams before the target.
3457 (c_parser_omp_declare_target): If decl has "omp declare target" or
3458 "omp declare target link" attribute, and cgraph or varpool node already
3459 exists, then set corresponding flags. Call c_finish_omp_clauses
3460 in the parenthesized extended-list syntax case.
3461 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
3462 declare target.
3463 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
3464 on OMP_CLAUSE_REDUCTION array sections.
3465 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
3466 into the constant offset, or for variable low-bound using
3467 POINTER_PLUS_EXPR. For structure element based array sections use
3468 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
3469 (c_finish_omp_clauses): Drop generic_field_head, structure
3470 elements are now always mapped even as array section bases,
3471 diagnose same var in data sharing and mapping clauses. Diagnose if
3472 linear step on declare simd is neither a constant nor a uniform
3473 parameter. Look through POINTER_PLUS_EXPR for array section
3474 reductions. Diagnose the same var or function appearing multiple
3475 times on the same directive. Fix up wording for the to clause if t
3476 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
3477 modifier on kinds other than dynamic or guided or nonmonotonic
3478 modifier together with ordered clause.
3479
4bf9e5a8
TS
34802015-11-03 Thomas Schwinge <thomas@codesourcery.com>
3481 Chung-Lin Tang <cltang@codesourcery.com>
3482
3483 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
3484
2adfab87
AM
34852015-10-29 Andrew MacLeod <amacleod@redhat.com>
3486
3487 * c-array-notation.c: Reorder #include's and remove duplicates.
3488 * c-aux-info.c: Likewise.
3489 * c-convert.c: Likewise.
3490 * c-decl.c: Likewise.
3491 * c-errors.c: Likewise.
3492 * c-lang.c: Likewise.
3493 * c-objc-common.c: Likewise.
3494 * c-parser.c: Likewise.
3495 * c-typeck.c: Likewise.
3496
e922069e
JW
34972015-10-26 Jim Wilson <jim.wilson@linaro.org>
3498
3499 PR debug/66068
3500 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
3501 after calling build_qualified_type.
3502
765dd391
CP
35032015-10-27 Cesar Philippidis <cesar@codesourcery.com>
3504 Thomas Schwinge <thomas@codesourcery.com>
3505 James Norris <jnorris@codesourcery.com>
3506 Joseph Myers <joseph@codesourcery.com>
3507 Julian Brown <julian@codesourcery.com>
3508 Bernd Schmidt <bschmidt@redhat.com>
3509
3510 * c-parser.c (c_parser_oacc_shape_clause): New.
3511 (c_parser_oacc_simple_clause): New.
3512 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
3513 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
3514
88bae6f4
TS
35152015-10-27 Thomas Schwinge <thomas@codesourcery.com>
3516 James Norris <jnorris@codesourcery.com>
3517 Cesar Philippidis <cesar@codesourcery.com>
3518
3519 PR c/64765
3520 PR c/64880
3521 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
3522 parameters, and handle these. Adjust all users.
3523 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
3524 into...
3525 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
3526 all users.
3527 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
3528 declare functions.
3529 (c_finish_omp_construct): Declare function.
3530 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
3531 Merge functions into...
3532 (c_finish_omp_construct): ... this new function.
3533
a8fc2579
RB
35342015-10-22 Richard Biener <rguenther@suse.de>
3535
3536 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
3537 before folding a MINUS_EXPR.
3538
e9122ef6
MP
35392015-10-21 Marek Polacek <polacek@redhat.com>
3540
3541 PR c/68024
3542 * c-decl.c (start_function): Warn about vararg functions without
3543 a prototype.
3544
9f47c7e5
IE
35452015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
3546
3547 * c-typeck.c (build_conditional_expr): Use boolean vector
3548 type for vector comparison.
3549 (build_vec_cmp): New.
3550 (build_binary_op): Use build_vec_cmp for comparison.
3551
fa60eeb9
MP
35522015-10-20 Marek Polacek <polacek@redhat.com>
3553
3554 * c-parser.c (is_cilkplus_vector_p): Don't define here.
3555
2c7020eb
MP
35562015-10-20 Marek Polacek <polacek@redhat.com>
3557
3558 PR c/67964
3559 * c-parser.c (c_parser_attributes): Break out of the loop if the
3560 token after an attribute isn't a comma.
3561
d9a6bd32
JJ
35622015-10-13 Jakub Jelinek <jakub@redhat.com>
3563 Aldy Hernandez <aldyh@redhat.com>
3564
3565 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
3566 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
3567 (c_parser_omp_variable_list): Handle structure elements for
3568 map, to and from clauses. Handle array sections in reduction
3569 clause. Formatting fixes.
3570 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
3571 if clause modifiers.
3572 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3573 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3574 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
3575 c_parser_omp_clause_is_device_ptr): New functions.
3576 (c_parser_omp_clause_ordered): Parse optional parameter.
3577 (c_parser_omp_clause_reduction): Handle array reductions.
3578 (c_parser_omp_clause_schedule): Parse optional simd modifier.
3579 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
3580 functions.
3581 (c_parser_omp_clause_linear): Parse linear clause modifiers.
3582 (c_parser_omp_clause_depend_sink): New function.
3583 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
3584 (c_parser_omp_clause_map): Parse release/delete map kinds and
3585 optional always modifier.
3586 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
3587 and c_finish_omp_clauses callers.
3588 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
3589 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
3590 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
3591 (OMP_CRITICAL_CLAUSE_MASK): Define.
3592 (c_parser_omp_critical): Parse critical clauses.
3593 (c_parser_omp_for_loop): Handle doacross loops, adjust
3594 c_finish_omp_for and c_finish_omp_clauses callers.
3595 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
3596 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
3597 (OMP_FOR_CLAUSE_MASK): Add linear clause.
3598 (c_parser_omp_for): Disallow ordered clause when combined with
3599 distribute. Disallow linear clause when combined with distribute
3600 and not combined with simd.
3601 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
3602 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
3603 parse clauses and if depend clause is found, don't parse a body.
3604 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
3605 Allow target parallel without for after it.
3606 (OMP_TASK_CLAUSE_MASK): Add priority clause.
3607 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
3608 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
3609 invalid kinds.
3610 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
3611 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
3612 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
3613 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
3614 functions.
3615 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
3616 defaultmap and is_device_ptr clauses.
3617 (c_parser_omp_target): Parse target parallel and target simd. Set
3618 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
3619 and target exit data. Diagnose invalid map kinds.
3620 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
3621 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
3622 construct.
3623 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
3624 &omp_priv.
3625 (OMP_TASKLOOP_CLAUSE_MASK): Define.
3626 (c_parser_omp_taskloop): New function.
3627 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
3628 handle PRAGMA_OMP_TASKLOOP.
3629 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
3630 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
3631 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
3632 Add IS_OMP argument, handle structure element bases, diagnose
3633 bitfields, pass IS_OMP recursively, diagnose known zero length
3634 array sections in depend clauses, handle array sections in reduction
3635 clause, diagnose negative length even for pointers.
3636 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
3637 types, pass IS_OMP down to handle_omp_array_sections_1, handle
3638 array sections in reduction clause, set
3639 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
3640 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
3641 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
3642 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
3643
21ba0cea
MP
36442015-10-06 Marek Polacek <polacek@redhat.com>
3645
3646 * c-parser.c (c_parser_statement_after_labels): Use
3647 protected_set_expr_location.
3648 (c_parser_omp_clause_num_gangs): Likewise.
3649 (c_parser_omp_clause_num_threads): Likewise.
3650 (c_parser_omp_clause_num_workers): Likewise.
3651 (c_parser_omp_clause_vector_length): Likewise.
3652 (c_parser_omp_clause_num_teams): Likewise.
3653 (c_parser_omp_clause_thread_limit): Likewise.
3654 * c-typeck.c (build_c_cast): Likewise.
3655 (c_cast_expr): Likewise.
3656
624d31fe
RS
36572015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3658
3659 * c-typeck.c (c_tree_equal): Use real_equal instead of
3660 REAL_VALUES_EQUAL.
3661
b8fd7909
JM
36622015-10-04 Jason Merrill <jason@redhat.com>
3663
3664 * c-parser.c (c_lex_one_token): Handle @synchronized.
3665 * c-decl.c (match_builtin_function_types): A declaration of a built-in
3666 can change whether the function is transaction_safe.
3667
1c7485af
MP
36682015-10-02 Marek Polacek <polacek@redhat.com>
3669
3670 PR c/67730
3671 * c-typeck.c (convert_for_assignment): Use the expansion point
3672 location throughout.
3673
3e3b8d63
MP
36742015-10-02 Marek Polacek <polacek@redhat.com>
3675
3676 PR c/64249
3677 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
3678 and pass it down to c_parser_if_statement.
3679 (c_parser_else_body): Add CHAIN parameter and pass it down to
3680 c_parser_statement_after_labels.
3681 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
3682 duplicated if-else-if conditions.
3683
aabef2de
MP
36842015-10-01 Marek Polacek <polacek@redhat.com>
3685
3686 * c-typeck.c (convert_for_assignment): Improve commentary.
3687
de8ddd5f
MP
36882015-09-30 Marek Polacek <polacek@redhat.com>
3689
3690 PR c/67730
3691 * c-typeck.c (c_finish_return): Use the expansion point location for
3692 certain "return with value" warnings.
3693
c4914de6
MLI
36942015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3695
3696 * c-parser.c (pragma_lex): Add loc argument.
3697
0e36f5c7
MP
36982015-09-15 Marek Polacek <polacek@redhat.com>
3699
3700 PR c/67580
3701 * c-decl.c (tag_exists_p): New function.
3702 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3703 struct/union/enum keywords are missing.
3704 * c-tree.h (tag_exists_p): Declare.
3705
2f3bb934
MP
37062015-09-15 Marek Polacek <polacek@redhat.com>
3707
3708 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3709 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3710 Return NULL_TREE instead of 0.
3711 (lookup_name): Return NULL_TREE instead of 0.
3712 (lookup_name_in_scope): Likewise.
3713 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3714 (parser_xref_tag): Use false instead of 0.
3715 (start_struct): Use true instead of 1.
3716 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3717
aa256c4a
MP
37182015-09-14 Marek Polacek <polacek@redhat.com>
3719
3720 * c-typeck.c (set_nonincremental_init_from_string): Use
3721 HOST_WIDE_INT_M1U when shifting a negative value.
3722
dbb68221
MW
37232015-09-09 Mark Wielaard <mjw@redhat.com>
3724
3725 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
3726 parm against NULL.
3727
a8a098ac
JJ
37282015-09-10 Jakub Jelinek <jakub@redhat.com>
3729
3730 PR c/67502
3731 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
3732 into OMP_FOR_PRE_BODY rather than before the loop.
3733
f4b189d5
JJ
37342015-09-09 Jakub Jelinek <jakub@redhat.com>
3735
0bb99c11
JJ
3736 PR c/67501
3737 * c-parser.c (c_parser_oacc_all_clauses,
3738 c_parser_omp_all_clauses): Remove invalid clause from
3739 list of clauses even if parser->error is set.
3740
fce5e5e3
JJ
3741 PR c/67500
3742 * c-parser.c (c_parser_omp_clause_aligned,
3743 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3744 test for errors.
3745 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3746 error_mark_node.
3747
f4b189d5
JJ
3748 PR c/67495
3749 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3750 instead of c_parser_unary_expression. If the result is !lvalue_p,
3751 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3752
b2aaf235
MP
37532015-09-04 Marek Polacek <polacek@redhat.com>
3754
3755 PR sanitizer/67279
3756 * c-typeck.c (build_binary_op): Don't instrument static initializers.
3757
1807ffc1
MS
37582015-09-03 Martin Sebor <msebor@redhat.com>
3759
3760 PR c/66516
8b652e65
JJ
3761 * c-typeck.c (convert_arguments, parser_build_unary_op,
3762 build_conditional_expr, c_cast_expr, convert_for_assignment,
3763 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
3764 reject_gcc_builtin.
3765 (c_decl_implicit): Define.
3766
d04ff417
MP
37672015-09-02 Marek Polacek <polacek@redhat.com>
3768
3769 PR c/67432
3770 * c-parser.c (c_parser_enum_specifier): Give a better error for
3771 an empty enum.
3772
a79683d5
TS
37732015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3774
3775 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3776
191a6b94
MP
37772015-08-12 Marek Polacek <polacek@redhat.com>
3778
3779 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
3780 LOC to it.
3781
420a9d9b
MP
37822015-08-03 Marek Polacek <polacek@redhat.com>
3783
3784 PR c/67088
3785 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
3786 Use it.
3787 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
3788
992118a1
PP
37892015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3790
3791 * c-parser.c (c_parser_if_body): Take token_indent_info
3792 argument. Call warn_for_misleading_indentation even when the
3793 body is a semicolon. Extract token_indent_infos corresponding
3794 to the guard, body and next tokens. Adjust call to
3795 warn_for_misleading_indentation accordingly.
3796 (c_parser_else_body): Likewise.
3797 (c_parser_if_statement): Likewise.
3798 (c_parser_while_statement): Likewise.
3799 (c_parser_for_statement): Likewise.
3800
46308474
LFSM
38012015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
3802 Manuel López-Ibáñez <manu@gcc.gnu.org>
3803
3804 * c-decl.c (get_parm_info): Remove static var. Update warning
3805 message.
3806
05b28fd6
MP
38072015-07-27 Marek Polacek <polacek@redhat.com>
3808
3809 PR c++/66555
3810 PR c/54979
3811 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3812
451b5e48
MP
38132015-07-20 Marek Polacek <polacek@redhat.com>
3814
3815 PR c++/55095
3816 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3817 (build_binary_op): Warn about left shift overflows.
3818
1916bcb5
AM
38192015-07-09 Andrew MacLeod <amacleod@redhat.com>
3820
3821 * c-array-notation.c: Adjust includes for flags.h changes.
3822 * c-objc-common.c: Likewise.
3823
c7131fb2
AM
38242015-07-07 Andrew MacLeod <amacleod@redhat.com>
3825
3826 * c-array-notation.c: Adjust includes.
3827 * c-aux-info.c: Likewise.
3828 * c-convert.c: Likewise.
3829 * c-decl.c: Likewise.
3830 * c-errors.c: Likewise.
3831 * c-lang.c: Likewise.
3832 * c-objc-common.c: Likewise.
3833 * c-parser.c: Likewise.
3834 * c-typeck.c: Likewise.
3835
da2e71c9
MLI
38362015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3837
3838 PR fortran/66605
3839 * c-decl.c (finish_function): Call do_warn_unused_parameter.
3840
b155cfd9
MP
38412015-06-29 Marek Polacek <polacek@redhat.com>
3842
3843 PR c/66322
3844 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3845 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
3846 about -Wswitch-bool here.
3847 (do_case): Update c_add_case_label call.
3848 (c_finish_case): Update c_do_switch_warnings call.
3849
31521951
MP
38502015-06-27 Marek Polacek <polacek@redhat.com>
3851
3852 * c-typeck.c: Use VECTOR_TYPE_P throughout.
3853
22d03525
MP
38542015-06-26 Marek Polacek <polacek@redhat.com>
3855
3856 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3857 INDIRECT_REF_P.
3858 * c-typeck.c (array_to_pointer_conversion): Likewise.
3859 (build_unary_op): Likewise.
3860 (c_finish_return): Likewise.
3861
f0889939
AM
38622015-06-25 Andrew MacLeod <amacleod@redhat.com>
3863
3864 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3865 * c-parser.c: Likewise.
3866
8d67ee55
RS
38672015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3868
3869 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3870 instead of pointer_hash.
3871 (detect_field_duplicates): Likewise.
3872
0ae9bd27
MP
38732015-06-25 Marek Polacek <polacek@redhat.com>
3874
3875 * c-array-notation.c: Use VAR_P throughout.
3876 * c-decl.c: Likewise.
3877 * c-objc-common.c: Likewise.
3878 * c-parser.c: Likewise.
3879 * c-typeck.c: Likewise.
3880
62f9079a
MP
38812015-06-25 Marek Polacek <polacek@redhat.com>
3882
3883 * c-decl.c: Use is_global_var throughout.
3884 * c-parser.c: Likewise.
3885 * c-typeck.c: Likewise.
3886
abb226c9
AM
38872015-06-17 Andrew MacLeod <amacleod@redhat.com>
3888
3889 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3890 * c-aux-info.c: Likewise.
3891 * c-convert.c: Likewise.
3892 * c-decl.c: Likewise.
3893 * c-errors.c: Likewise.
3894 * c-lang.c: Likewise.
3895 * c-objc-common.c: Likewise.
3896 * c-parser.c: Likewise.
3897 * c-typeck.c: Likewise.
3898
8cbababc
JH
38992015-06-11 Jan Hubicka <hubicka@ucw.cz>
3900
3901 PR middle-end/66325
3902 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3903 variants.
3904
a0349665
PMR
39052015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
3906
3907 * c-decl.c (pop_scope): Register the main translation unit
3908 through the new debug hook.
3909
13fdf2e2
AM
39102015-06-08 Andrew MacLeod <amacleod@redhat.com>
3911
3912 * c-array-notation.c : Adjust include files.
3913 * c-aux-info.c : Likewise.
3914 * c-convert.c : Likewise.
3915 * c-decl.c : Likewise.
3916 * c-errors.c : Likewise.
3917 * c-lang.c : Likewise.
3918 * c-lang.h : Likewise.
3919 * c-objc-common.c : Likewise.
3920 * c-parser.c : Likewise.
3921 * c-typeck.c : Likewise.
3922
d7438551
AH
39232015-06-05 Aldy Hernandez <aldyh@redhat.com>
3924
3925 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3926 immediately clobber it.
3927 (c_write_global_declarations_1): Remove call to
3928 check_global_declaration_1.
3929 (c_write_global_declarations_2): Remove.
3930 (c_write_final_cleanups): Rename from c_write_global_declarations.
3931 Remove call to finalize_compilation_unit.
3932 Remove calls to debugging hooks.
3933 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3934 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3935 * c-tree.h: Remove c_write_global_declarations.
3936
ecb9f223
AM
39372015-06-04 Andrew MacLeod <amacleod@redhat.com>
3938
3939 * c-array-notation.c: Adjust includes for restructured coretypes.h.
3940 * c-aux-info.c: Likewise.
3941 * c-convert.c: Likewise.
3942 * c-decl.c: Likewise.
3943 * c-errors.c: Likewise.
3944 * c-lang.c: Likewise.
3945 * c-objc-common.c: Likewise.
3946 * c-parser.c: Likewise.
3947 * c-typeck.c: Likewise.
3948
9482b620
MP
39492015-06-04 Marek Polacek <polacek@redhat.com>
3950
3951 PR c/66341
3952 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3953 it is a lvalue.
3954
bc51ace3
PK
39552015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3956
3957 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3958 Warn for empty struct.
3959 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3960
ea5b45b6
AT
39612015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
3962
3963 * c-decl.c (start_function): Call plugin before parsing.
3964 (finish_function): Call plugin after parsing.
3965
c2d47482
PK
39662015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3967
3968 PR c/49551
3969 * c-decl.c (merge_decls): Merge DECL_COMMON.
3970
a95492ab
JW
39712015-05-22 Jim Wilson <jim.wilson@linaro.org>
3972
3973 * Make-lang.in (check_gcc_pallelize): Define.
3974
fd5c817a
MP
39752015-05-22 Marek Polacek <polacek@redhat.com>
3976
3977 PR c/47043
3978 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
3979 attributes.
3980
c7b70a3c
MP
39812015-05-21 Marek Polacek <polacek@redhat.com>
3982
3983 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3984 DECL_BUILT_IN.
3985
21b634ae
MP
39862015-05-20 Marek Polacek <polacek@redhat.com>
3987
3988 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3989 * c-typeck.c: Likewise.
3990
296a8c2f
MP
39912015-05-19 Marek Polacek <polacek@redhat.com>
3992
3993 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3994
41b37d5e
JJ
39952015-05-19 Jakub Jelinek <jakub@redhat.com>
3996
3997 PR middle-end/66199
3998 * c-parser.c (c_parser_omp_for_loop): Don't add
3999 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
4000 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
4001 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
4002 constructs.
4003
fab27f52
MM
40042015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
4005
4006 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 4007 swaps.
fab27f52 4008
40de31cf
MLI
40092015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
4010
4011 PR fortran/44054
4012 * c-objc-common.c (c_tree_printer): Replace locus pointer with
4013 accessor function.
4014
3aa3c9fc
MP
40152015-05-14 Marek Polacek <polacek@redhat.com>
4016
4017 PR c/66066
4018 PR c/66127
4019 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
4020 rather than with 0.
4021
c3388e62
DM
40222015-05-12 David Malcolm <dmalcolm@redhat.com>
4023
4024 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
4025 to add a call to warn_for_misleading_indentation.
4026 (c_parser_else_body): Likewise, adding param "else_loc".
4027 (c_parser_if_statement): Check for misleading indentation.
4028 (c_parser_while_statement): Likewise.
4029 (c_parser_for_statement): Likewise.
4030
755e528f
MP
40312015-05-08 Marek Polacek <polacek@redhat.com>
4032
4033 PR c/64918
4034 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
4035 (output_init_element): Likewise.
4036
0173bd2a
MP
40372015-05-07 Marek Polacek <polacek@redhat.com>
4038
4039 PR c/65179
4040 * c-typeck.c (build_binary_op): Warn when left shifting a negative
4041 value.
4042
9babc352
MP
40432015-04-30 Marek Polacek <polacek@redhat.com>
4044
4045 * c-typeck.c (set_init_label): Call error_at instead of error and
4046 pass LOC to it.
4047
ac9f18db
MP
4048 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
4049 the type of a decl.
4050
ec3fba51
MP
4051 * c-typeck.c (c_build_va_arg): Clarify the error message.
4052
b811915d
TS
40532015-04-29 Thomas Schwinge <thomas@codesourcery.com>
4054
4055 * c-parser.c (c_parser_oacc_enter_exit_data): Use
4056 OMP_STANDALONE_CLAUSES.
4057
f3075008
MP
40582015-04-28 Marek Polacek <polacek@redhat.com>
4059
4060 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
4061
4e81b788
MP
40622015-04-28 Marek Polacek <polacek@redhat.com>
4063
4064 PR c/65901
4065 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
4066
6c1db78e
MP
40672015-04-25 Marek Polacek <polacek@redhat.com>
4068
4069 PR c/52085
4070 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
4071 attribute.
4072
5c4abbb8
MP
40732015-04-23 Marek Polacek <polacek@redhat.com>
4074
4075 PR c/65345
4076 * c-decl.c (set_labels_context_r): New function.
4077 (store_parm_decls): Call it via walk_tree_without_duplicates.
4078 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
4079 instead of create_tmp_var. Build TARGET_EXPR instead of
4080 COMPOUND_EXPR.
4081 (build_atomic_assign): Use create_tmp_var_raw instead of
4082 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
4083
06aca1d5
IV
40842015-04-20 Ilya Verbin <ilya.verbin@intel.com>
4085
4086 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
4087 (c_parser_omp_target_update): Add missed %> to error_at ().
4088
8fba1830
BRF
40892015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
4090
4091 PR target/55143
4092 * c-decl.c (c_default_pointer_mode): Remove definition.
4093 * c-tree.h (c_default_pointer_mode): Remove declaration.
4094
62021f64
TB
40952015-03-27 Tobias Burnus <burnus@net-b.de>
4096
4097 PR c/65586
4098 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
4099 error out.
4100 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
4101 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
4102 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
4103
9b65e171
JJ
41042015-03-19 Jakub Jelinek <jakub@redhat.com>
4105
4106 * c-decl.c (c_decl_attributes): Also add "omp declare target"
4107 attribute for DECL_EXTERNAL VAR_DECLs.
4108
17958621
JJ
41092015-03-11 Jakub Jelinek <jakub@redhat.com>
4110
4111 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
4112 argument.
4113
7ccb1a11
JJ
41142015-03-10 Jakub Jelinek <jakub@redhat.com>
4115
4116 PR c/65120
4117 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
4118 before preparing arguments to warn_logical_not_parentheses.
4119
01177669
JJ
41202015-03-09 Jakub Jelinek <jakub@redhat.com>
4121
4122 PR c/65120
4123 * c-typeck.c (parser_build_binary_op): Don't warn for
4124 !!x == y or !b == y where b is _Bool.
4125
802ac282
MP
41262015-03-09 Marek Polacek <polacek@redhat.com>
4127
4128 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
4129 * c-decl.c (grokdeclarator): Likewise.
4130 * c-typeck.c (build_binary_op): Likewise.
4131
e5165b60
MP
41322015-02-27 Marek Polacek <polacek@redhat.com>
4133
4134 PR c/65228
4135 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
4136
065d214c
MP
41372015-02-14 Marek Polacek <polacek@redhat.com>
4138
4139 PR c/64768
4140 * c-decl.c (grokdeclarator): Set the range of a flexible array member
4141 declared through a typedef name.
4142
e5d9235b
MP
41432015-02-13 Marek Polacek <polacek@redhat.com>
4144
4145 PR c/65050
4146 * c-decl.c (grokdeclarator): Print also the type when giving
4147 the error message about array's incomplete element type.
4148
fa01ffcc
JJ
41492015-02-11 Jakub Jelinek <jakub@redhat.com>
4150
4151 PR c/64824
4152 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
4153 check in the POP macro.
4154
c3e38a03
MP
41552015-02-09 Marek Polacek <polacek@redhat.com>
4156
4157 PR c/64856
4158 * c-typeck.c (process_init_element): Don't always wrap
4159 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
4160 initializing a range of elements.
4161
4886ec8e
JJ
41622015-02-04 Jakub Jelinek <jakub@redhat.com>
4163
4164 PR c/64824
4165 PR c/64868
4166 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
4167
c3e38a03 41682015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
4169
4170 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
4171 processing enum declaration.
4172
7b33f0c8
MP
41732015-01-29 Marek Polacek <polacek@redhat.com>
4174
4175 PR c/64709
4176 * c-typeck.c (pop_init_level): If constructor_elements has
4177 exactly one element with integer_zerop value, set constructor_zeroinit
4178 to 1. Remove braces around warning_init call.
4179
dea63e49
JJ
41802015-01-27 Jakub Jelinek <jakub@redhat.com>
4181
4182 PR c/64766
4183 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
4184 of FUNCTION_DECLs with error_mark_node.
4185
d38f7dce
JJ
41862015-01-26 Jakub Jelinek <jakub@redhat.com>
4187
4188 PR c/64778
4189 * c-typeck.c (convert_arguments): Return -1 if there are
4190 error_args, even if we've diagnosed too many arguments.
4191
cbf5d0e7
RB
41922015-01-21 Richard Biener <rguenther@suse.de>
4193
4194 PR middle-end/64313
4195 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
4196 for builtins the user declared correctly.
4197
41dbbb37
TS
41982015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4199 Bernd Schmidt <bernds@codesourcery.com>
4200 Cesar Philippidis <cesar@codesourcery.com>
4201 James Norris <jnorris@codesourcery.com>
4202 Jakub Jelinek <jakub@redhat.com>
4203 Ilmir Usmanov <i.usmanov@samsung.com>
4204
4205 * c-parser.c: Include "gomp-constants.h".
4206 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
4207 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
4208 Use OMP_CLAUSE_SET_MAP_KIND.
4209 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
4210 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
4211 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
4212 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
4213 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
4214 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
4215 "copyout", "create", "delete", "deviceptr", "gang", "host",
4216 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
4217 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
4218 "present_or_create", "pcreate", "seq", "self", "vector",
4219 "vector_length", "wait", "worker".
4220 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
4221 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
4222 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
4223 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
4224 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
4225 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
4226 (c_parser_oacc_data_clause_deviceptr)
4227 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
4228 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
4229 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
4230 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
4231 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
4232 (c_parser_oacc_parallel, c_parser_oacc_update)
4233 (c_parser_oacc_wait): New functions.
4234 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
4235 (c_finish_oacc_data): New prototypes.
4236 * c-typeck.c: Include "gomp-constants.h".
4237 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
4238 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
4239 OMP_CLAUSE_SET_MAP_KIND.
4240 (c_finish_oacc_parallel, c_finish_oacc_kernels)
4241 (c_finish_oacc_data): New functions.
4242 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
4243 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
4244 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
4245 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
4246 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
4247 GOMP_MAP_FORCE_DEVICEPTR.
4248
adfac8df
JJ
42492015-01-09 Michael Collison <michael.collison@linaro.org>
4250
4251 * c-array-notation.c: Include hash-set.h, machmode.h,
4252 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4253 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
4254 * c-aux-info.c: Ditto.
4255 * c-convert.c: Ditto.
4256 * c-decl.c: Ditto.
4257 * c-errors.c: Ditto.
4258 * c-lang.c: Dittoxs.
4259 * c-objc-common.c: Ditto.
4260 * c-parser.c: Ditto.
4261 * c-typeck.c: Include hash-set.h, machmode.h,
4262 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4263 fold-const.h, wide-int.h, inchash.h, real.h and
4264 fixed-value.h due to flattening of tree.h.
4265
2cc901dc
MP
42662015-01-07 Marek Polacek <polacek@redhat.com>
4267
4268 PR c/64417
4269 * c-typeck.c (process_init_element): Disallow initialization of
4270 a flexible array member with a string constant if the structure
4271 is in an array.
4272
5624e564
JJ
42732015-01-05 Jakub Jelinek <jakub@redhat.com>
4274
e5341100
JJ
4275 PR sanitizer/64344
4276 * c-typeck.c (convert_for_assignment, c_finish_return): For
4277 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
4278 types also set in_late_binary_op around convert call.
4279 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
4280 to integral type casts, if not in_late_binary_op, pass c_fully_fold
4281 result on expr as last argument to ubsan_instrument_float_cast,
4282 if in_late_binary_op, don't use c_save_expr but save_expr.
4283
5624e564
JJ
4284 Update copyright years.
4285
5bd012f8
MP
42862015-01-05 Marek Polacek <polacek@redhat.com>
4287
4288 PR c/64423
4289 * c-typeck.c (build_array_ref): Pass loc down to
4290 warn_array_subscript_with_type_char.
4291
3f8257db 42922014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
4293
4294 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 4295 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 4296 element type.
8e745a17 4297 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 4298 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 4299 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 4300 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 4301 to PEDWARN_FOR_QUALIFIERS.
768952be 4302
8f94a8c4
JJ
43032014-12-17 Jakub Jelinek <jakub@redhat.com>
4304
4305 PR sanitizer/64289
4306 * c-convert.c: Include ubsan.h.
4307 (convert): For real -> integral casts and
4308 -fsanitize=float-cast-overflow don't call convert_to_integer, but
4309 instead instrument the float cast directly.
4310
b731b390
JJ
43112014-11-29 Jakub Jelinek <jakub@redhat.com>
4312
4313 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
4314 c_finish_stmt_expr): Remove NULL last argument from
4315 create_tmp_var_raw and create_tmp_var calls.
4316 * c-array-notation.c (fix_builtin_array_notation_fn,
4317 build_array_notation_expr, fix_conditional_array_notations_1,
4318 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
4319
541e35a6
MP
43202014-11-28 Marek Polacek <polacek@redhat.com>
4321
4322 PR c/63862
4323 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
4324 convert the right operand to integer type.
4325
b286be94
MP
43262014-11-25 Marek Polacek <polacek@redhat.com>
4327
4328 PR c/63877
4329 * c-decl.c (start_function): Disable -Wmissing-declarations warning
4330 for inline functions.
4331
aa7da51a
JJ
43322014-11-21 Jakub Jelinek <jakub@redhat.com>
4333
4334 PR target/63764
4335 * c-typeck.c (build_array_ref): Adjust
4336 convert_vector_to_pointer_for_subscript caller. If it returns true,
4337 call non_lvalue_loc on the result.
4338
d876207f
RB
43392014-11-11 Richard Biener <rguenther@suse.de>
4340
4341 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
4342 to true.
4343
e5e44252
AK
43442014-11-10 Andi Kleen <ak@linux.intel.com>
4345
4346 PR c/60804
4347 * c-parser.c (c_parser_statement_after_labels): Call
4348 check_no_cilk.
4349 (c_parser_if_statement): Dito.
4350 (c_parser_switch_statement): Dito.
4351 (c_parser_while_statement): Dito.
4352 (c_parser_do_statement): Dito.
4353 (c_parser_for_statement): Dito.
4354 * c-typeck.c (c_finish_loop): Dito.
4355
13c21655
PC
43562014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
4357
4358 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
4359 OPT_Wshift_count_overflow in the warnings.
4360
2d51fcef
MP
43612014-10-30 Marek Polacek <polacek@redhat.com>
4362
4363 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
4364 print the stripped version as well, if they're not the same.
4365
ef4bddc2
RS
43662014-10-29 Richard Sandiford <richard.sandiford@arm.com>
4367
4368 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
4369 machine_mode.
4370
c582198b
AM
43712014-10-28 Andrew MacLeod <amacleod@redhat.com>
4372
4373 * c-decl.c: Adjust include files.
4374 * c-parser.c: Ditto.
4375
ddc8de03
PM
43762014-10-27 Phil Muldoon <pmuldoon@redhat.com>
4377 Tom Tromey <tromey@redhat.com>
4378
4379 * c-tree.h (enum c_oracle_request): New.
4380 (c_binding_oracle_function): New typedef.
4381 (c_binding_oracle, c_pushtag, c_bind): Declare.
4382 * c-decl.c (c_binding_oracle): New global.
4383 (I_SYMBOL_CHECKED): New macro.
4384 (i_symbol_binding): New function.
4385 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
4386 (I_TAG_CHECKED): New macro.
4387 (i_tag_binding): New function.
4388 (I_TAG_BINDING, I_TAG_DECL): Redefine.
4389 (I_LABEL_CHECKED): New macro.
4390 (i_label_binding): New function.
4391 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
4392 (c_print_identifier): Save and restore c_binding_oracle.
4393 (c_pushtag, c_bind): New functions.
4394
60393bbc
AM
43952014-10-27 Andrew MacLeod <amacleod@redhat.com>
4396
4397 * c-typeck.c: Adjust include files.
4398
d723bb7c
MLI
43992014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
4400
4401 PR c++/53061
4402 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
4403 initialization here...
4404 (c_initialize_diagnostics): ... but here. Set defaults after
4405 building pretty-printer.
4406
1bc5a451
MP
44072014-10-23 Marek Polacek <polacek@redhat.com>
4408
4409 PR c/63626
4410 * c-decl.c (pop_scope): Don't print warning in external_scope.
4411
4435bb92
MP
44122014-10-19 Marek Polacek <polacek@redhat.com>
4413
4414 PR c/63567
4415 * c-typeck.c (output_init_element): Allow initializing objects with
4416 static storage duration with compound literals even in C99 and add
4417 pedwarn for it.
4418
7278465e
MP
44192014-10-17 Marek Polacek <polacek@redhat.com>
4420
4421 PR c/63567
4422 * c-typeck.c (digest_init): Allow initializing objects with static
4423 storage duration with compound literals even in C99 and add pedwarn
4424 for it.
4425
d9b7be2e
MP
44262014-10-17 Marek Polacek <polacek@redhat.com>
4427
4428 PR c/63543
4429 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
4430 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
4431 error multiple times. Print the type.
4432
f406ae1f
MP
44332014-10-17 Marek Polacek <polacek@redhat.com>
4434
4435 PR c/63549
4436 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
4437 type.
4438
92574c7c
MP
44392014-10-17 Marek Polacek <polacek@redhat.com>
4440
4441 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
4442 (start_function): Use OPT_Wimplicit_int instead of 0.
4443 (store_parm_decls_oldstyle): Likewise.
4444
1bc4a978
MT
44452014-10-17 Alan Modra <amodra@gmail.com>
4446
4447 PR middle-end/61848
4448 * c-decl.c (merge_decls): Don't merge section name or tls model
4449 to newdecl symtab node, instead merge to olddecl. Override
4450 existing olddecl section name. Set tls_model for all thread-local
4451 vars, not just OMP thread-private ones. Remove incorrect comment.
4452
83685514
AM
44532014-10-16 Andrew MacLeod <amacleod@redhat.com>
4454
4455 * c-decl.c: Adjust include files.
4456
78a7c317
DD
44572014-10-14 DJ Delorie <dj@redhat.com>
4458
4459 * c-parser.c (c_parse_init): Add RID entries for each __intN.
4460 (c_token_starts_typename): Check all __intN, not just __int128.
4461 (c_token_starts_declspecs): Likewise.
4462 (c_parser_declspecs): Likewise.
4463 (c_parser_attribute_any_word): Likewise.
4464 (c_parser_objc_selector): Likewise.
4465 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
4466 (struct c_declspecs): Add int_n_idx field to record *which* __intN
4467 is specified.
4468 * c-decl.c (declspecs_add_type): Check for all __intN, not just
4469 __int128.
4470 (finish_declspecs): Likewise.
4471
74d98c1e
AB
44722014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
4473
8e745a17 4474 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 4475 the duplicate code.
8e745a17 4476 (c_parser_statement): Call the new function.
74d98c1e 4477
84937de2
MP
44782014-10-09 Marek Polacek <polacek@redhat.com>
4479
4480 PR c/63480
4481 * c-typeck.c (pop_init_level): Don't warn about initializing
4482 with { }.
4483
0382aaa0
MP
44842014-10-07 Marek Polacek <polacek@redhat.com>
4485
4486 PR c/59717
4487 * c-decl.c (header_for_builtin_fn): New function.
4488 (implicitly_declare): Suggest which header to include.
4489
7a0ca710
MP
44902014-10-07 Marek Polacek <polacek@redhat.com>
4491
4492 * c-convert.c (convert): Use error_operand_p.
4493 * c-typeck.c (require_complete_type): Likewise.
4494 (really_atomic_lvalue): Likewise.
4495 (digest_init): Likewise.
4496 (handle_omp_array_sections_1): Likewise.
4497
6bc8a126
MP
44982014-10-03 Marek Polacek <polacek@redhat.com>
4499
4500 PR c/63453
4501 * c-decl.c (pop_scope): Don't warn about "inline function declared
4502 but never defined" for functions marked with gnu_inline attribute.
4503
d90c0a59
JJ
45042014-09-25 Jakub Jelinek <jakub@redhat.com>
4505
4506 PR c++/63249
4507 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
4508 on low_bound and length.
4509
083e891e
MP
45102014-09-24 Marek Polacek <polacek@redhat.com>
4511
4512 PR c/61405
4513 PR c/53874
4514 * c-parser.c: Don't define CPP_KEYWORD.
4515 (c_parser_switch_statement): Pass original type to c_finish_case.
4516 * c-tree.h (c_finish_case): Update declaration.
4517 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
4518 conditionally to c_do_switch_warnings.
4519
8d95fe25
MP
45202014-09-03 Marek Polacek <polacek@redhat.com>
4521
4522 PR c/62024
4523 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
4524 conversions.
4525
9a771876
JJ
45262014-09-02 Jakub Jelinek <jakub@redhat.com>
4527 Balaji V. Iyer <balaji.v.iyer@intel.com>
4528 Igor Zamyatin <igor.zamyatin@intel.com>
4529
4530 * c-parser.c (c_parser_cilk_for): New function.
4531 (c_parser_cilk_grainsize): Likewise.
4532 (c_get_temp_regvar): Likewise.
4533 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
4534 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
4535 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
4536 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
4537 case.
4538
b7679d96
CG
45392014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
4540
4541 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
4542 with using HOST_WIDE_INT without truncation to 'int'
4543
59ea0364
MP
45442014-08-22 Marek Polacek <polacek@redhat.com>
4545
4546 PR c++/62199
4547 * c-typeck.c (parser_build_binary_op): Adjust call to
4548 warn_logical_not_parentheses.
4549
671a475e
IZ
45502014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
4551
4552 PR other/62008
4553 * c-parser.c (c_parser_array_notation): Check for correct
4554 type of an array added.
4555
04159acf
MP
45562014-08-19 Marek Polacek <polacek@redhat.com>
4557
4558 PR c++/62153
4559 * c-typeck.c (build_binary_op): If either operand of a comparison
4560 is a boolean expression, call maybe_warn_bool_compare.
4561
c77935ee
PP
45622014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
4563
4564 PR c/45584
4565 * c-typeck.c (build_c_cast): Do a conversion even when the
4566 TYPE_MAIN_VARIANTs are the same.
4567
35aff4fb
MP
45682014-08-19 Marek Polacek <polacek@redhat.com>
4569
4570 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
4571 pedwarn_c99 instead of pedwarn.
4572 (grokfield): Likewise.
4573 (warn_defaults_to): New function.
4574 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
4575 Unconditionally call pedwarn_c99 instead of pedwarn.
4576 (start_function): Call warn_defaults_to instead of pedwarn_c99.
4577 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
4578 check flag_isoc11 before.
4579 * c-errors.c (pedwarn_c99): Change the return type to bool.
4580 Handle -Wc99-c11-compat.
4581 * c-parser.c (disable_extension_diagnostics): Handle
4582 warn_c99_c11_compat.
4583 (restore_extension_diagnostics): Likewise.
4584 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
4585 instead of pedwarn, don't check flag_isoc11 before.
4586 (c_parser_declspecs): Likewise.
4587 (c_parser_alignas_specifier): Likewise.
4588 (c_parser_alignof_expression): Likewise.
4589 (c_parser_generic_selection): Likewise.
4590 * c-tree.h (pedwarn_c99): Update declaration.
4591 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
4592 of pedwarn_c99.
4593
177cce46
MP
45942014-08-19 Marek Polacek <polacek@redhat.com>
4595
4596 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
4597 to pedwarn_c90.
4598 * c-errors.c: Include "opts.h".
4599 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
4600 * c-parser.c (disable_extension_diagnostics): Handle negative value
4601 of warn_c90_c99_compat, too.
4602 (restore_extension_diagnostics): Likewise.
4603 (c_parser_compound_statement_nostart): Pass
4604 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
4605
6dc99c33
MP
46062014-08-12 Marek Polacek <polacek@redhat.com>
4607
4608 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
4609 Add pedwarn.
4610 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
4611 Likewise.
4612 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
4613
3f8257db 46142014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
4615
4616 PR c/51849
4617 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
4618 Call pedwarn_c90 instead of pedwarn.
4619 (check_bitfield_type_and_width): Likewise.
4620 (declspecs_add_qual): Likewise.
4621 (declspecs_add_type): Likewise.
4622 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
4623 Adjust to only call pedwarn_c90.
4624 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
4625 pedwarn_c90 instead of pedwarn.
4626 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
4627 * c-parser.c (disable_extension_diagnostics): Handle
4628 warn_c90_c99_compat.
4629 (restore_extension_diagnostics): Likewise.
4630 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
4631 pedwarn_c90 instead of pedwarn.
4632 (c_parser_initelt): Likewise.
4633 (c_parser_postfix_expression): Likewise.
4634 (c_parser_postfix_expression_after_paren_type): Likewise.
4635 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
4636 * c-tree.h: Fix formatting.
4637 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
4638 pedwarn_c90 instead of pedwarn.
4639
9f25a338
TS
46402014-08-07 Trevor Saunders <tsaunders@mozilla.com>
4641
4642 * c-typeck.c: Remove include of pointer-set.h.
4643
044331a8
MP
46442014-08-07 Marek Polacek <polacek@redhat.com>
4645
4646 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
4647
b787e7a2
TS
46482014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4649
4650 * c-typeck.c: Use hash_map instead of pointer_map.
4651
6e2830c3
TS
46522014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4653
4654 * c-decl.c: Use hash_set instead of pointer_set.
4655
a7ee52fb
IZ
46562014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
4657
4658 PR middle-end/61455
4659 * c-array-notation.c (expand_array_notations): Handling
4660 of DECL_EXPR added.
4661
b4dfdc11
MG
46622014-07-31 Marc Glisse <marc.glisse@inria.fr>
4663
4664 PR c++/60517
4665 * c-typeck.c (c_finish_return): Return 0 instead of the address of
4666 a local variable.
4667
976d5a22
TT
46682014-07-30 Tom Tromey <tromey@redhat.com>
4669
4670 * c-typeck.c (struct constructor_stack) <designator_depth>: New
4671 field.
4672 (really_start_incremental_init, push_init_level): Initialize
4673 designator_depth.
4674 (pop_init_level): Set global designator_depth.
4675 (process_init_element): Check for designated_init attribute.
4676
30281de2
MP
46772014-07-20 Marek Polacek <polacek@redhat.com>
4678
4679 PR c/61852
4680 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
4681 (implicitly_declare): Pass location to implicit_decl_warning.
4682
b108f48f
JJ
46832014-07-14 Jakub Jelinek <jakub@redhat.com>
4684
4685 PR middle-end/61294
4686 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
4687 If non-NULL, call c_parser_check_literal_zero.
4688 (c_parser_check_literal_zero): New function.
4689 (c_parser_postfix_expression_after_primary): Adjust
4690 c_parser_expr_list caller, handle -Wmemset-transposed-args.
4691
773ec47f
MP
46922014-07-06 Marek Polacek <polacek@redhat.com>
4693
4694 PR c/6940
4695 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4696 * c-tree.h (C_ARRAY_PARAMETER): Define.
4697 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4698 function parameter.
4699
22e1cf1c 47002014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 4701 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
4702
4703 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4704 releasing symbol.
4705
52ec0ea3
MP
47062014-07-01 Marek Polacek <polacek@redhat.com>
4707
4708 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4709 instead of 0 to WARN_FOR_ASSIGNMENT.
4710
d5c3d343
MP
47112014-07-01 Marek Polacek <polacek@redhat.com>
4712
4713 PR c/58286
4714 * c-typeck.c (convert_for_assignment): Pass
4715 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4716
6a7253a4
MP
47172014-06-30 Marek Polacek <polacek@redhat.com>
4718
4719 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4720 has no_sanitize_undefined attribute.
4721
5e88a8f4
IZ
47222014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
4723
4724 PR middle-end/57541
4725 * c-array-notation.c (fix_builtin_array_notation_fn):
4726 Check for 0 arguments in builtin call. Check that bultin argument is
4727 correct.
4728 * c-parser.c (c_parser_array_notation): Check for incorrect initial
4729 index.
4730
9698b078
SH
47312014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
4732
4733 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
4734 qualifiers in __auto_type for atomic types.
4735 (c_parser_typeof_specifier): Discard all type qualifiers in
4736 __typeof__ for atomic types.
4737
6e07c515
MP
47382014-06-25 Marek Polacek <polacek@redhat.com>
4739
4740 PR c/61162
4741 * c-parser.c (c_parser_statement_after_labels): Pass the location of
4742 the return expression to c_finish_return.
4743
da6f124d
JJ
47442014-06-25 Jakub Jelinek <jakub@redhat.com>
4745
4746 * c-typeck.c (c_finish_omp_clauses): Make sure
4747 OMP_CLAUSE_LINEAR_STEP has correct type.
4748
c203e8a7
TS
47492014-06-24 Trevor Saunders <tsaunders@mozilla.com>
4750
4751 * c-decl.c: Adjust.
4752
56ad0e38
JJ
47532014-06-24 Jakub Jelinek <jakub@redhat.com>
4754
4755 * c-parser.c (c_parser_omp_for_loop): For
4756 #pragma omp parallel for simd move lastprivate clause from parallel
4757 to for rather than simd.
4758
47c2554f
MP
47592014-06-23 Marek Polacek <polacek@redhat.com>
4760
4761 * c-typeck.c (parser_build_binary_op): Don't call
4762 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
4763
56363ffd
JH
47642014-06-15 Jan Hubicka <hubicka@ucw.cz>
4765
4766 * c-parser.c (c_parser_omp_threadprivate): Likewise.
4767 * c-decl.c (merge_decls): Likewise.
4768
d7ff7ae5
MP
47692014-06-09 Marek Polacek <polacek@redhat.com>
4770
4771 PR c/36446
4772 * c-typeck.c (error_init): Call inform instead of error_at.
4773 (pedwarn_init): Call inform instead of pedwarn.
4774 (warning_init): Call inform instead of warning_at.
4775
24d047a3
JH
47762014-06-07 Jan Hubicka <hubicka@ucw.cz>
4777
4778 * c-decl.c (merge_decls): Use set_decl_section_name.
4779 (duplicate_decls): Remove node if it exists.
4780
9bac5cbb
G
47812014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
4782
4783 PR c/53119
4784 * c-typeck.c (push_init_level, process_init_element,
4785 pop_init_level): Correct check for zero initialization, move
4786 missing brace warning to respect zero initialization.
4787
8ffcdea8
MP
47882014-06-05 Marek Polacek <polacek@redhat.com>
4789
4790 PR c/56724
4791 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
4792
742938c9
MP
47932014-06-05 Marek Polacek <polacek@redhat.com>
4794
4795 PR c/49706
4796 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
4797 on the left hand side operand of a comparison.
4798
6447c55d
MP
47992014-06-05 Marek Polacek <polacek@redhat.com>
4800
4801 PR c/48062
4802 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
4803 Print note only if the warning was printed.
4804
9dc7743c
IZ
48052014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
4806
4807 PR c/58942
4808 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4809 with a pointer.
4810
fedfecef
MP
48112014-06-03 Marek Polacek <polacek@redhat.com>
4812
4813 PR c/60439
4814 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4815 c_start_case.
4816 * c-tree.h (c_start_case): Update.
4817 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
4818 switch condition has boolean value.
4819
9b2b7279
AM
48202014-06-02 Andrew MacLeod <amacleod@redhat.com>
4821
4822 * c-decl.c: Include builtins.h.
4823 * c-parser.c: Likewise.
4824
5c1bc275
MP
48252014-05-27 Marek Polacek <polacek@redhat.com>
4826
4827 PR c/56724
4828 * c-typeck.c (convert_arguments): Get location of a parameter. Change
4829 error and warning calls to error_at and warning_at. Pass location of
4830 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
4831 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4832 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
4833
97563bc8
IZ
48342014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
4835
4836 PR c/61191
4837 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4838 function parameters.
4839
aede2c10
JH
48402014-05-23 Jan Hubicka <hubicka@ucw.cz>
4841
4842 * c-decl.c (merge_decls): Preserve symtab node pointers.
4843 (duplicate_decls): Free new decl.
4844
edbba2ce
TS
48452014-05-23 Thomas Schwinge <thomas@codesourcery.com>
4846
f3316c6d
TS
4847 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4848 initialization.
4849
edbba2ce
TS
4850 * c-parser.c (c_parser_omp_target): Return bool values.
4851
68c81f24
TS
48522014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4853
4854 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4855 num_teams_loc variable to num_thread_limit_loc.
4856
632f2871
RS
48572014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4858
4859 * c-array-notation.c (expand_array_notations): Use void_node
4860 instead of void_zero_node.
4861
766090c2
TS
48622014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4863
4864 * c-decl.c (finish_struct): Adjust.
4865 (finish_enum): Likewise.
4866 (bind): Adjust.
4867 (record_inline_static): Likewise.
4868 (push_scope): Likewise.
4869 (make_label): Likewise.
4870 (lookup_label_for_goto): Likewise.
4871 (finish_struct): Likewise.
4872 (finish_enum): Likewise.
4873 (store_parm_decls): Likewise.
4874 (c_push_function_context): Likewise.
4875 * c-lang.h: Remove usage of variable_size gty attribute.
4876 * c-parser.c (c_parse_init): Adjust.
4877 (c_parse_file): Likewise.
4878
2b107f6b
MP
48792014-05-13 Marek Polacek <polacek@redhat.com>
4880
4881 PR c/61162
4882 * c-typeck.c (convert_for_assignment): Pass location to
4883 WARN_FOR_ASSIGNMENT instead of input_location.
4884
d033409e
MP
48852014-05-10 Marek Polacek <polacek@redhat.com>
4886
4887 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4888 maybe_warn_string_init.
4889 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4890 maybe_warn_string_init.
4891 * c-tree.h (maybe_warn_string_init): Update declaration.
4892 * c-typeck.c (maybe_warn_string_init): Add location parameter.
4893 Call pedwarn_init with loc instead of with input_location.
4894 (digest_init): Pass init_loc to maybe_warn_string_init.
4895 (pop_init_level): Call pedwarn_init with loc instead of with
4896 input_location.
4897 (set_init_index): Likewise.
4898 (process_init_element): Likewise.
4899
ea58ef42
MP
49002014-05-09 Marek Polacek <polacek@redhat.com>
4901
4902 PR c/61096
4903 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4904 (c_parser_initelt): Pass location to set_init_label. Pass array index
4905 location to set_init_index.
4906 * c-tree.h (push_init_level): Update declaration.
4907 (pop_init_level): Likewise.
4908 (set_init_index): Likewise.
4909 (set_init_label): Likewise.
4910 * c-typeck.c (error_init): Add location parameter. Call error_at
4911 instead of error.
4912 (digest_init): Pass init_loc to error_init.
4913 (really_start_incremental_init):
4914 (push_init_level): Add location parameter. Pass loc to pop_init_level
4915 and error_init.
4916 (pop_init_level): Likewise.
4917 (set_designator): Add location parameter. Pass loc to pop_init_level,
4918 push_init_level, and error_init.
4919 (set_init_index): Add location parameter. Pass loc to error_init and
4920 set_designator.
4921 (set_init_label): Likewise.
4922 (output_init_element): Pass loc to error_init.
4923 (process_init_element): Pass loc to error_init, pop_init_level,
4924 pedwarn_init, and push_init_level.
4925
661a0813
MP
49262014-05-09 Marek Polacek <polacek@redhat.com>
4927
4928 PR c/50459
4929 * c-parser.c (c_parser_attributes): Parse the arguments as an
4930 expression-list if the attribute takes identifier.
4931
2793eeab
MP
49322014-05-08 Marek Polacek <polacek@redhat.com>
4933
4934 PR c/61053
4935 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4936 TYPE_ALIGN_UNIT.
4937
f827930a
MP
49382014-05-08 Marek Polacek <polacek@redhat.com>
4939
4940 PR c/61077
4941 * c-decl.c (start_function): Warn for _Atomic-qualified return type
4942 of main.
4943
1d60af08
KZ
49442014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4945 Mike Stump <mikestump@comcast.net>
4946 Richard Sandiford <rdsandiford@googlemail.com>
4947
4948 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4949 (finish_enum): Use wide-int interfaces.
4950 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4951 * c-typeck.c (build_c_cast): Likewise.
4952 (set_nonincremental_init_from_string): Likewise.
4953 (c_tree_equal): Likewise.
4954
a0e24419
MP
49552014-05-02 Marek Polacek <polacek@redhat.com>
4956
4957 PR c/25801
4958 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
4959 Return size_one_node when the type is not complete.
4960 (pointer_diff): Remove comment.
4961 (build_unary_op): Improve error messages.
4962
19fc9faa
MP
49632014-05-02 Marek Polacek <polacek@redhat.com>
4964
4965 * c-typeck.c (c_finish_return): Separate warning_at calls.
4966
63bc4e87
MP
49672014-05-02 Marek Polacek <polacek@redhat.com>
4968
4969 * c-tree.h (error_init): Remove declaration.
4970 (pedwarn_init): Likewise.
4971 * c-typeck.c (error_init): Make static and move above.
4972 (pedwarn_init): Likewise.
4973 (warning_init): Move above.
4974 (maybe_warn_string_init): Likewise.
4975
4bd2511b
JL
49762014-05-01 Jeff Law <law@redhat.com>
4977
4978 Revert:
4979
4980 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4981 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
4982 avoid goto.
4983
6a358dcb
MP
49842014-05-02 Marek Polacek <polacek@redhat.com>
4985
4986 PR c/60784
4987 * c-typeck.c (push_init_level): Set constructor_designated to
4988 p->designated for structures.
4989
ae5ebda4
MP
49902014-05-01 Marek Polacek <polacek@redhat.com>
4991
4992 PR c/60915
4993 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4994 function-definition has an attribute after the declarator.
4995
96b40f8d
MP
49962014-05-01 Marek Polacek <polacek@redhat.com>
4997
4998 PR c/60257
4999 * c-typeck.c (warning_init): Add location_t parameter. Call
5000 warning_at instead of warning.
5001 (push_init_level): Pass input_location to warning_init.
5002 (add_pending_init): Add location_t parameter. Pass loc to
5003 warning_init.
5004 (set_nonincremental_init): Pass input_location to add_pending_init.
5005 (set_nonincremental_init_from_string): Likewise.
5006 (output_init_element): Pass loc to warning_init and to
5007 add_pending_init.
5008
32e00768
MP
50092014-05-01 Marek Polacek <polacek@redhat.com>
5010
5011 PR c/43395
5012 * c-typeck.c (c_finish_return): Distinguish between label and variable
5013 when warning about returning local address.
5014
c9379ce2
MP
50152014-05-01 Marek Polacek <polacek@redhat.com>
5016
5017 PR c/29467
5018 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
5019 in C89 mode.
5020
d00887e8
MP
50212014-05-01 Marek Polacek <polacek@redhat.com>
5022
5023 PR c/43245
5024 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
5025 instead of 0 to WARN_FOR_QUALIFIERS.
5026
5436fa2e
MP
50272014-05-01 Marek Polacek <polacek@redhat.com>
5028
5029 PR c/56989
5030 * c-typeck.c (default_conversion): Use better location for
5031 error call.
5032
f8ed5150
MP
50332014-04-30 Marek Polacek <polacek@redhat.com>
5034
5035 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
5036 also when SANITIZE_FLOAT_DIVIDE is on.
5037
8337d1db
MP
50382014-04-30 Marek Polacek <polacek@redhat.com>
5039
5040 PR c/60139
5041 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
5042 and pedwarn_init. Use loc insted of input_location.
5043
c4bdc42f
MP
50442014-04-30 Marek Polacek <polacek@redhat.com>
5045
5046 PR c/60351
5047 * c-typeck.c (build_binary_op): Use location when warning about
5048 shift count.
5049
45484dcf
MP
50502014-04-25 Marek Polacek <polacek@redhat.com>
5051
5052 PR c/18079
5053 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
5054 always_inline/noinline and hot/cold attributes.
5055
34cf811f
MP
50562014-04-25 Marek Polacek <polacek@redhat.com>
5057
5058 PR c/60114
5059 * c-parser.c (c_parser_initelt): Pass input_location to
5060 process_init_element.
5061 (c_parser_initval): Pass loc to process_init_element.
5062 * c-tree.h (process_init_element): Adjust declaration.
5063 * c-typeck.c (push_init_level): Pass input_location to
5064 process_init_element.
5065 (pop_init_level): Likewise.
5066 (set_designator): Likewise.
5067 (output_init_element): Add location_t parameter. Pass loc to
5068 digest_init.
5069 (output_pending_init_elements): Pass input_location to
5070 output_init_element.
5071 (process_init_element): Add location_t parameter. Pass loc to
5072 output_init_element.
5073
42056eac
JJ
50742014-04-24 Jakub Jelinek <jakub@redhat.com>
5075
5076 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
5077 atomic-clause, allow comma in between atomic-clause and
5078 seq_cst.
5079
e162a134
JJ
50802014-04-22 Jakub Jelinek <jakub@redhat.com>
5081
5082 PR c/59073
5083 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
5084 fails, don't set OM_PARALLEL_COMBINED and return NULL.
5085
2f6babac
IZ
50862014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
5087
5088 PR middle-end/60469
5089 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5090 create_tmp_var instead build_decl for creating temps.
5091 (build_array_notation_expr): Likewise.
5092 (fix_conditional_array_notations_1): Likewise.
5093 (fix_array_notation_expr): Likewise.
5094 (fix_array_notation_call_expr): Likewise.
5095
8edbfaa6
JJ
50962014-03-28 Jakub Jelinek <jakub@redhat.com>
5097
5098 PR c++/60689
5099 * c-tree.h (c_build_function_call_vec): New prototype.
5100 * c-typeck.c (build_function_call_vec): Don't call
5101 resolve_overloaded_builtin here.
5102 (c_build_function_call_vec): New wrapper function around
5103 build_function_call_vec. Call resolve_overloaded_builtin here.
5104 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
5105 Call c_build_function_call_vec instead of build_function_call_vec.
5106 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
5107 * c-decl.c (finish_decl): Likewise.
5108
7485aeea
MLI
51092014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5110
5111 PR c/55383
5112 * c-typeck.c: Use correct format string in cast-qual warning
5113
b17a8b07
TS
51142014-03-07 Thomas Schwinge <thomas@codesourcery.com>
5115
5116 * c-decl.c (c_decl_attributes): Use
5117 lang_hooks.types.omp_mappable_type.
5118 * c-typeck.c (c_finish_omp_clauses): Likewise.
5119
3af9c5e9
MP
51202014-03-06 Marek Polacek <polacek@redhat.com>
5121
5122 PR c/60197
5123 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
5124 of checking tree code.
5125
1c9f5f33
PK
51262014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5127
5128 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
5129 (c_parser_parameter_declaration): Likewise.
5130
cc28fc7f
MP
51312014-02-19 Marek Polacek <polacek@redhat.com>
5132
5133 PR c/60195
5134 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
5135 Call mark_exp_read on exp.value.
5136 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
5137 TREE_ADDRESSABLE on old instead of val.
5138 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
5139
b581c05c
PK
51402014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5141
5142 * c-parser.c (c_parser_get_builtin_args): Replace calls to
5143 C_EXPR_APPEND by vec_safe_push.
5144 * c-tree.h (C_EXPR_APPEND): Remove.
5145
81e5eca8
MP
51462014-01-31 Marek Polacek <polacek@redhat.com>
5147
5148 PR c/59963
5149 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
5150 build_function_call_vec.
5151 (build_function_call): Likewise.
5152 (build_atomic_assign): Likewise.
5153 (build_function_call_vec): Add arg_loc parameter. Use it.
5154 (convert_arguments): Likewise.
5155 (convert_for_assignment): Rename rhs_loc to expr_loc.
5156 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
5157 (c_parser_objc_keywordexpr): Likewise.
5158 (c_parser_postfix_expression_after_primary): Call
5159 build_function_call_vec with expr_loc rather than op_loc.
5160 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
5161 build_function_call_vec.
5162 (c_parser_expr_list): Add locations parameter. Fill it with locations
5163 of function arguments.
5164 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
5165
68fca595
MP
51662014-01-30 Marek Polacek <polacek@redhat.com>
5167
5168 PR c/59940
5169 * c-typeck.c (build_function_call_vec): Use loc parameter.
5170 (convert_arguments): Add location parameter. Use it.
5171 (ep_convert_and_check): Likewise.
5172 (build_atomic_assign): Adjust convert_for_assignment call.
5173 (build_modify_expr): Likewise.
5174 (digest_init): Likewise.
5175 (c_finish_return): Likewise.
5176 (build_conditional_expr): Adjust ep_convert_and_check calls.
5177 (convert_for_assignment): Add rhs_loc parameter. Use it.
5178 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
5179 calls.
5180
fa337f3a
RB
51812014-01-30 Richard Biener <rguenther@suse.de>
5182
5183 PR c/59905
5184 * c-typeck.c (build_function_call_vec): Do not replace calls
5185 to a function via an incompatible type with a runtime abort.
5186
b72271b9
BI
51872014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
5188
5189 * c-parser.c (c_parser_declaration_or_fndef): Replaced
5190 flag_enable_cilkplus with flag_cilkplus.
5191 (c_parser_direct_declarator_inner): Likewise.
5192 (c_parser_attribute_any_word): Likewise.
5193 (c_parser_attributes): Likewise.
5194 (c_parser_compound_statement): Likewise.
5195 (c_parser_statement_after_labels): Likewise.
5196 (c_parser_if_statement): Likewise.
5197 (c_parser_switch_statement): Likewise.
5198 (c_parser_do_statement): Likewise.
5199 (c_parser_for_statement): Likewise.
5200 (c_parser_unary_expression): Likewise.
5201 (c_parser_postfix_expression): Likewise.
5202 (c_parser_postfix_expression_after_primary): Likewise.
5203 (c_parser_postfix_expression_after_primary): Likewise.
5204 (c_parser_omp_clause_name): Likewise.
5205 (c_finish_omp_declare_simd): Likewise.
5206 (c_parser_cilk_verify_simd): Likewise.
5207 * c-typeck.c (build_array_ref): Likewise.
5208 (build_function_call_vec): Likewise.
5209 (convert_arguments): Likewise.
5210 (build_compound_expr): Likewise.
5211 (c_finish_return): Likewise.
5212 (c_finish_if_stmt): Likewise.
5213 (c_finish_loop): Likewise.
5214 (build_binary_op): Likewise.
5215
393e8e8b
MP
52162014-01-23 Marek Polacek <polacek@redhat.com>
5217
5218 PR c/59846
5219 * c-typeck.c (parser_build_binary_op): Use location instead of
5220 input_location.
5221 (build_binary_op): Pass location to shorten_compare.
5222
f04dda30
MP
52232014-01-23 Marek Polacek <polacek@redhat.com>
5224
5225 PR c/58346
5226 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
5227 an empty aggregate.
5228
789eadcd
MP
52292014-01-23 Marek Polacek <polacek@redhat.com>
5230
5231 PR c/59871
5232 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
5233 of a comma expression.
5234 (emit_side_effect_warnings): Likewise.
5235
40f14e9f
BI
52362014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5237
5238 PR c/59825
5239 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
5240 function to use walk_tree and moved a lot of its functionality to
5241 expand_array_notations.
5242 (expand_array_notations): New function.
5243
74558dd9
BI
52442014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5245
5246 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
5247 attribute an attribute without value.
5248
652fea39
JJ
52492014-01-23 Jakub Jelinek <jakub@redhat.com>
5250
5251 PR middle-end/58809
5252 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
5253 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
5254
f34f1c87
MP
52552014-01-22 Marek Polacek <polacek@redhat.com>
5256
5257 PR c/59891
5258 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
5259 of remove_c_maybe_const_expr on op1 and op2.
5260
241f845a
JJ
52612014-01-15 Jakub Jelinek <jakub@redhat.com>
5262
5263 PR c/58943
5264 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
5265 effects, preevaluate rhs using SAVE_EXPR first.
5266
9a74f20c
BI
52672014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
5268
5269 PR c++/59631
5270 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
5271 statements with if-elseif statements.
5272
96066ce1
MP
52732014-01-06 Marek Polacek <polacek@redhat.com>
5274
5275 PR c/57773
5276 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
5277 defined bit-field types only in ISO C.
5278
23a5b65a
RS
52792014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5280
5281 Update copyright years
5282
f9030485
RS
52832014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5284
5285 * c-array-notation.c: Use the standard form for the copyright notice.
5286
41958c28
BI
52872013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
5288
5289 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
5290 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
5291 field in parser is not empty. If not-empty, call the function
5292 c_parser_finish_omp_declare_simd.
5293 (c_parser_cilk_clause_vectorlength): Modified function to be shared
5294 between SIMD-enabled functions and #pragma simd. Added new parameter.
5295 (c_parser_cilk_all_clauses): Modified the usage of the function
5296 c_parser_cilk_clause_vectorlength as mentioned above.
5297 (c_parser_cilk_simd_fn_vector_attrs): New function.
5298 (c_finish_cilk_simd_fn_tokens): Likewise.
5299 (is_cilkplus_vector_p): Likewise.
5300 (c_parser_omp_clause_name): Added checking for "vectorlength,"
5301 "nomask," and "mask" strings in clause name.
5302 (c_parser_omp_all_clauses): Added 3 new case statements:
5303 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
5304 PRAGMA_CILK_CLAUSE_NOMASK.
5305 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
5306 check for vector attribute and if so call the function
5307 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
5308 called the function c_finish_cilk_simd_fn_tokens.
5309 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
5310 parser field is non-empty. If so, parse them as you would parse
5311 the omp declare simd pragma.
5312 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
5313 Added a check when step is a parameter and flag it as error.
5314 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
5315 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
5316 pragma_omp_clause.
5317
cef0fd0e
TS
53182013-12-17 Thomas Schwinge <thomas@codesourcery.com>
5319
5320 * c-parser.c (c_parser_omp_parallel): Fix description.
5321
12893402
BI
53222013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
5323
5324 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
5325 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5326 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
5327 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
5328
296674db
JM
53292013-12-04 Joseph Myers <joseph@codesourcery.com>
5330
5331 PR c/52023
5332 * c-parser.c (c_parser_alignas_specifier): Use
5333 c_sizeof_or_alignof_type instead of c_alignof.
5334 (c_parser_alignof_expression): Likewise, with min_alignof
5335 parameter depending on alignof spelling used.
5336
edd28054
MP
53372013-12-04 Marek Polacek <polacek@redhat.com>
5338
5339 PR c/54113
5340 * c-decl.c (start_function): Don't warn for missing prototype for
5341 inline functions.
5342
da0fc454
MP
53432013-12-03 Marek Polacek <polacek@redhat.com>
5344
5345 PR c/59351
5346 * c-decl.c (build_compound_literal): Allow compound literals with
5347 empty initial value.
5348
4c2ecab0
JM
53492013-12-02 Joseph Myers <joseph@codesourcery.com>
5350
5351 PR c/58235
5352 * c-typeck.c (build_modify_expr): Diagnose assignment to
5353 expression with array type.
5354
340baef7
JM
53552013-11-29 Joseph Myers <joseph@codesourcery.com>
5356
5357 PR c/42262
5358 * c-typeck.c (process_init_element): Do not treat a string as
5359 initializing a whole array when used with a designator for an
5360 individual element.
5361
6763b9f7
JM
53622013-11-29 Joseph Myers <joseph@codesourcery.com>
5363
5364 PR c/57574
5365 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
5366 an inline function following a static declaration.
5367
e7bd1de1
JJ
53682013-11-28 Jakub Jelinek <jakub@redhat.com>
5369
5370 PR c/59310
5371 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
5372 to p_name before calling c_parser_omp_teams instead of after.
5373 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
5374 argument. Remove unused p_name variable.
5375
0136f8f0
AH
53762013-11-27 Aldy Hernandez <aldyh@redhat.com>
5377 Jakub Jelinek <jakub@redhat.com>
5378
5379 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
5380 external_scope is NULL.
5381
241b71bb
TV
53822013-11-27 Tom de Vries <tom@codesourcery.com>
5383 Marc Glisse <marc.glisse@inria.fr>
5384
5385 PR c++/59032
5386 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
5387
2fb9a547
AM
53882013-11-22 Andrew MacLeod <amacleod@redhat.com>
5389
5390 * c-typeck.c: Add required include files from gimple.h.
5391
8400e75e
DM
53922013-11-22 David Malcolm <dmalcolm@redhat.com>
5393
5394 * c-decl.c (define_label, shadow_tag_warned)
5395 (check_bitfield_type_and_width, grokdeclarator, grokparms,
5396 store_parm_decls_newstyle, store_parm_decls_oldstyle)
5397 (declspecs_add_type): Remove use of in_system_header macro.
5398 * c-parser.c (c_parser_unary_expression): Likewise.
5399 * c-typeck.c (store_init_value, process_init_element)
5400 (c_start_case): Likewise.
5401
5402 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
5403 macro.
5404
5405 * c-parser.c (c_parser_set_source_position_from_token): Remove
5406 reference to in_system_header from comment.
5407
386b1f1f
RS
54082013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5409
5410 * c-decl.c (grokdeclarator): Update comment to refer to
5411 tree_to_[su]hwi rather than tree_low_cst.
5412
ae7e9ddd
RS
54132013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5414
5415 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
5416 tree_to_uhwi throughout.
5417
9439e9a1
RS
54182013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5419
5420 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
5421 throughout.
5422
9541ffee
RS
54232013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5424
5425 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
5426 throughout.
5427
c02065fc
AH
54282013-11-15 Aldy Hernandez <aldyh@redhat.com>
5429
5430 * c-parser.c (c_parser_cilk_simd): New.
5431 (c_parser_cilk_verify_simd): New.
5432 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
5433 (c_parser_omp_for_loop): Add case for NE_EXPR.
5434 Set c_break_label for CILK_SIMD.
5435 (c_parser_cilk_clause_vectorlength): New.
5436 (c_parser_cilk_clause_linear): New.
5437 (c_parser_cilk_clause_name): New.
5438 (c_parser_cilk_all_clauses): New.
5439 * c-typeck.c (build_unary_op): Pass location argument to
5440 readonly_error.
5441 (build_modify_expr): Same.
5442 (build_asm_expr): Same.
5443 (c_finish_bc_stmt): Error on break/continue in loops.
5444
18f429e2
AM
54452013-11-14 Andrew MacLeod <amacleod@redhat.com>
5446
5447 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
5448
d8a2d370
DN
54492013-11-14 Diego Novillo <dnovillo@google.com>
5450
5451 * c-decl.c: Include print-tree.h.
5452 Include stor-layout.h.
5453 Include varasm.h.
5454 Include attribs.h.
5455 Include stringpool.h.
5456 * c-lang.c: Include fold-const.h.
5457 * c-parser.c: Include stringpool.h.
5458 Include attribs.h.
5459 Include stor-layout.h.
5460 Include varasm.h.
5461 Include trans-mem.h.
5462 * c-typeck.c: Include stor-layout.h.
5463 Include trans-mem.h.
5464 Include varasm.h.
5465 Include stmt.h.
5466
38b7bc7f
JM
54672013-11-13 Joseph Myers <joseph@codesourcery.com>
5468
5469 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
5470 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
5471 __auto_type.
5472 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
5473 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
5474 RID_AUTO_TYPE.
5475 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
5476 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
5477 (c_parser_declarator, c_parser_direct_declarator_inner)
5478 (c_parser_parameter_declaration, c_parser_type_name): All callers
5479 changed.
5480 (c_parser_declaration_or_fndef): Handle declarations with type
5481 determined from the initializer.
5482
45b0be94
AM
54832013-11-12 Andrew MacLeod <amacleod@redhat.com>
5484
18f429e2 5485 * c-typeck.c: Include gimplify.h.
45b0be94 5486
582d9b50
JM
54872013-11-12 Joseph Myers <joseph@codesourcery.com>
5488
5489 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
5490 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
5491 comment.
5492 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
5493 or _Thread_local as appropriate in diagnostics.
5494 (build_null_declspecs): Initialize ret->thread_gnu_p.
5495 (declspecs_add_scspec): Handle either __thread or _Thread_local
5496 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
5497 pedantic. Do not disallow _Thread_local extern and _Thread_local
5498 static.
5499
267bac10
JM
55002013-11-07 Joseph Myers <joseph@codesourcery.com>
5501 Andrew MacLeod <amacleod@redhat.com>
5502
5503 * c-aux-info.c (gen_type): Handle atomic qualifier.
5504 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
5505 qualifiers when compating types.
5506 (shadow_tag_warned): Handle atomic_p in declspecs.
5507 (quals_from_declspecs): Likewise.
5508 (start_decl): Use c_type_promotes_to when promoting argument
5509 types.
5510 (grokdeclarator): Handle _Atomic.
5511 (get_parm_info): Diagnose any qualifier on "void" as only
5512 parameter.
5513 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
5514 comparing types. Use c_type_promotes_to when promoting argument
5515 types.
5516 (finish_function): Use c_type_promotes_to when promoting argument
5517 types.
5518 (build_null_declspecs): Handle atomic_p in declspecs.
5519 (declspecs_add_qual): Handle RID_ATOMIC.
5520 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
5521 (c_token_starts_declspecs): Handle RID_ATOMIC.
5522 (c_parser_declspecs): Handle atomic type specifiers and
5523 qualifiers.
5524 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
5525 from types of expressions with atomic type.
5526 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
5527 (c_parser_attribute_any_word): Handle RID_ATOMIC.
5528 (c_parser_initializer, c_parser_initelt, c_parser_initval)
5529 (c_parser_statement_after_labels, c_parser_switch_statement)
5530 (c_parser_for_statement, c_parser_expr_no_commas)
5531 (c_parser_conditional_expression, c_parser_binary_expression)
5532 (c_parser_cast_expression, c_parser_unary_expression)
5533 (c_parser_postfix_expression)
5534 (c_parser_postfix_expression_after_primary, c_parser_expression):
5535 Use convert_lvalue_to_rvalue.
5536 (c_parser_expression_conv, c_parser_expr_list): Document
5537 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
5538 (c_parser_objc_synchronized_statement): Use
5539 convert_lvalue_to_rvalue.
5540 (c_parser_objc_selector): Handle RID_ATOMIC.
5541 (c_parser_objc_receiver, c_parser_array_notation): Use
5542 convert_lvalue_to_rvalue.
5543 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
5544 _Atomic (type-name).
5545 (struct c_declspecs): Add atomic_p field.
5546 (convert_lvalue_to_rvalue): Declare.
5547 * c-typeck.c (c_type_promotes_to): Promote atomic types to
5548 corresponding atomic types.
5549 (qualify_type): Don't add _Atomic qualifiers from second argument.
5550 (comp_target_types): Do not allow _Atomic mismatches.
5551 (type_lists_compatible_p): Do not remove atomic qualifiers when
5552 comparing types.
5553 (really_atomic_lvalue, convert_lvalue_to_rvalue)
5554 (build_atomic_assign): New functions.
5555 (build_unary_op): Use build_atomic_assign for atomic increment and
5556 decrement.
5557 (build_conditional_expr): Do not treat _Atomic void as a qualified
5558 version of void.
5559 (build_modify_expr): Use build_atomic_assign for atomic LHS.
5560 (find_anonymous_field_with_type, convert_to_anonymous_field)
5561 (convert_for_assignment): Do not remove atomic qualifiers when
5562 comparing types.
5563 (digest_init): Do not accept initialization of arrays of atomic
5564 elements by string constants.
5565 (build_asm_expr): Use convert_lvalue_to_rvalue.
5566 (build_binary_op): Do not treat _Atomic void as a qualified
5567 version of void.
5568
0c249d4b
DD
55692013-11-06 DJ Delorie <dj@redhat.com>
5570
5571 * c-decl.c (locate_old_decl): If a previous conflicting decl is
5572 both explicit and builtin, print the location of the explicit one.
5573
6d7f7e0a
TB
55742013-11-05 Tobias Burnus <burnus@net-b.de>
5575
5576 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
5577 c_parser_omp_distribute, c_parser_omp_teams,
5578 c_parser_omp_target, c_parser_omp_declare): Handle
5579 -fopenmp-simd.
5580
b906f4ca
MP
55812013-11-03 Marek Polacek <polacek@redhat.com>
5582
5583 * c-decl.c (grokdeclarator): Add VLA instrumentation.
5584
ee1d5a02
JJ
55852013-11-01 Jakub Jelinek <jakub@redhat.com>
5586
5587 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
5588 check_dup_generic at the end, unless remove is true.
5589 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
5590 remove = true;.
5591 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
5592
5a9785fb
JJ
55932013-10-31 Jakub Jelinek <jakub@redhat.com>
5594
5595 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
5596 with decl that is not pointer nor array.
5597
939b37da
BI
55982013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
5599
5600 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
5601 a spawning function is found.
5602 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
5603 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
5604 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5605 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
5606 case.
5607 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
5608 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
5609 expr.
5610 (c_finish_return): Added a check to reject _Cilk_spawn in return
5611 expression.
5612 (build_cilk_spawn): New function.
5613 (build_cilk_sync): Likewise.
5614 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
5615
d4af74d4
TB
56162013-10-27 Tobias Burnus <burnus@net-b.de>
5617
5618 PR other/33426
5619 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
5620 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
5621 (c_parser_statement_after_labels): Update calls.
5622
d73749df 56232013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
5624
5625 PR other/33426
5626 * c-parser.c (c_parser_pragma, c_parser_for_statement):
5627 Handle PRAGMA_IVDEP.
5628 (c_parser_statement_after_labels): Update call.
5629
f28aa681
MP
56302013-10-24 Marek Polacek <polacek@redhat.com>
5631
5632 * c-parser.c (c_parser_struct_declaration): Add a comment.
5633 (c_parser_declarator): Don't allow _Alignas here.
5634
0645c1a2
AM
56352013-10-17 Andrew MacLeod <amacleod@redhat.com>
5636
5637 * c-parser.c: Include omp-low.h.
5638 * c-typeck.c: Likewise.
5639
568a31f2
MP
56402013-10-17 Marek Polacek <polacek@redhat.com>
5641
5642 PR c/58267
5643 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
5644 Document syntax of the array-declarator.
5645 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
5646 are not permitted.
5647 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
5648 (c_parser_struct_declaration): Likewise.
5649 (c_parser_declarator): Likewise.
5650 (c_parser_direct_declarator_inner): Likewise.
5651 (c_parser_parameter_declaration): Likewise.
5652 (c_parser_type_name): Likewise.
5653
acf0174b
JJ
56542013-10-11 Jakub Jelinek <jakub@redhat.com>
5655
5656 * c-lang.h (current_omp_declare_target_attribute): New extern
5657 decl.
5658 * c-parser.c: Include c-lang.h.
5659 (struct c_parser): Change tokens to c_token *.
5660 Add tokens_buf field. Change tokens_avail type to unsigned int.
5661 (c_parser_consume_token): If parser->tokens isn't
5662 &parser->tokens_buf[0], increment parser->tokens.
5663 (c_parser_consume_pragma): Likewise.
5664 (enum pragma_context): Add pragma_struct and pragma_param.
5665 (c_parser_external_declaration): Adjust
5666 c_parser_declaration_or_fndef caller.
5667 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
5668 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
5669 Adjust recursive call.
5670 (c_parser_struct_or_union_specifier): Use pragma_struct instead
5671 of pragma_external.
5672 (c_parser_parameter_declaration): Use pragma_param instead of
5673 pragma_external.
5674 (c_parser_compound_statement_nostart, c_parser_label,
5675 c_parser_for_statement): Adjust
5676 c_parser_declaration_or_fndef callers.
5677 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
5678 it through to c_parser_conditional_expression.
5679 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
5680 pass it through to c_parser_binary_expression. Adjust recursive
5681 call.
5682 (c_parser_binary_expression): Remove prec argument, add
5683 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
5684 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
5685 binop matches it, use build2 instead of parser_build_binary_op.
5686 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
5687 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
5688 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
5689 Handle pragma_struct and pragma_param the same as pragma_external.
5690 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5691 (c_parser_omp_variable_list): Parse array sections for
5692 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5693 (c_parser_omp_clause_collapse): Fully fold collapse expression.
5694 (c_parser_omp_clause_reduction): Handle user defined reductions.
5695 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5696 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5697 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5698 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5699 c_parser_omp_clause_depend, c_parser_omp_clause_map,
5700 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5701 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5702 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5703 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
5704 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
5705 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5706 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
5707 (c_parser_omp_for_loop): Add CODE argument, pass it through
5708 to c_finish_omp_for. Change last argument to cclauses,
5709 and adjust uses to grab parallel clauses from the array of all
5710 the split clauses. Adjust c_parser_binary_expression,
5711 c_parser_declaration_or_fndef and c_finish_omp_for callers.
5712 (omp_split_clauses): New function.
5713 (c_parser_omp_simd): New function.
5714 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5715 Allow the function to be called also when parsing combined constructs,
5716 and call c_parser_omp_simd when parsing for simd.
5717 (c_parser_omp_sections_scope): If section-sequence doesn't start with
5718 #pragma omp section, require exactly one structured-block instead of
5719 sequence of statements.
5720 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5721 Allow the function to be called also when parsing combined constructs.
5722 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
5723 Allow the function to be called also when parsing combined
5724 constructs.
5725 (c_parser_omp_taskgroup, c_parser_omp_cancel,
5726 c_parser_omp_cancellation_point, c_parser_omp_distribute,
5727 c_parser_omp_teams, c_parser_omp_target_data,
5728 c_parser_omp_target_update, c_parser_omp_target,
5729 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
5730 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
5731 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
5732 (c_parser_omp_construct): Add p_name and mask vars. Handle
5733 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
5734 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
5735 and c_parser_omp_sections callers.
5736 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
5737 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5738 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5739 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
5740 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
5741 OMP_CLAUSE_DEPEND.
5742 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5743 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5744 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5745 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5746 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5747 * c-typeck.c: Include tree-inline.h.
5748 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5749 handle_omp_array_sections_1, handle_omp_array_sections,
5750 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5751 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5752 user defined reductions.
5753 (c_tree_equal): New function.
5754 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5755 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5756 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5757 c_check_omp_declare_reduction_r): New prototypes.
5758 * c-decl.c (current_omp_declare_target_attribute): New variable.
5759 (c_decl_attributes): New function.
5760 (start_decl, start_function): Use it instead of decl_attributes.
5761 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5762 c_omp_reduction_decl, c_omp_reduction_lookup,
5763 c_check_omp_declare_reduction_r): New functions.
5764
0a6c2227
TT
57652013-09-25 Tom Tromey <tromey@redhat.com>
5766
5767 * Make-lang.in (c/gccspec.o): Remove.
5768 (CFLAGS-c/gccspec.o): New variable.
5769 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
5770 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
5771 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5772
f3bc55f0
TT
57732013-09-25 Tom Tromey <tromey@redhat.com>
5774
5775 * Make-lang.in (c/gccspec.o): Don't use subshell.
5776
a24d975c
MP
57772013-09-18 Marek Polacek <polacek@redhat.com>
5778
5779 PR sanitize/58443
5780 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5781 Remove unnecessary check.
5782
ce6923c5
MP
57832013-09-18 Marek Polacek <polacek@redhat.com>
5784
5785 PR sanitizer/58411
5786 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
5787 no_sanitize_undefined attribute.
5788
a1e51df9
KT
57892013-09-13 Kai Tietz <ktietz@redhat.com>
5790
5791 PR target/57848
5792 * c-decl.c (c_builtin_function_ext_scope): Remove
5793 wrong assumption that it is never called on prexisting
5794 symbol.
5795
0af94e6f
JR
57962013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
5797
5798 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
5799
20059c8b
GDR
58002013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5801
5802 * c-objc-common.c (c_tree_printer): Tidy.
5803
de5a5fa1
MP
58042013-08-30 Marek Polacek <polacek@redhat.com>
5805
5806 * c-typeck.c (build_binary_op): Add division by zero and shift
5807 instrumentation.
5808
2531a1d9 58092013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 5810 Joseph Myers <joseph@codesourcery.com>
2531a1d9 5811
6e2bcc98 5812 PR c/35649
2531a1d9
JR
5813 * c-typeck.c (c_common_type): Prefer double_type_node over
5814 other REAL_TYPE types with the same precision.
5815 (convert_arguments): Likewise.
5816
025311c4
GDR
58172013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5818
5819 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
5820 (c_initialize_diagnostics): Call a destructor for the early printer.
5821
da6ca2b5
GDR
58222013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5823
5824 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5825 printer initialization.
5826
318cda85 58272013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 5828
318cda85
BI
5829 PR c/57490
5830 * c-array-notation.c (fix_conditional_array_notations_1): Added a
5831 check for truth values.
5832 (expand_array_notation_exprs): Added truth values case. Removed an
5833 unwanted else. Added for-loop to walk through subtrees in default
5834 case.
5835
b066401f
GDR
58362013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5837
5838 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5839
fb48aadc
JM
58402013-07-23 Joseph Myers <joseph@codesourcery.com>
5841
5842 * c-parser.c (struct c_generic_association): Fix typo.
5843
433cc7b0
TT
58442013-07-23 Tom Tromey <tromey@redhat.com>
5845 Joseph Myers <joseph@codesourcery.com>
5846
5847 * c-parser.c (struct c_generic_association): New.
5848 (c_generic_association_d): New typedef.
5849 (c_parser_generic_selection): New function.
5850 (c_parser_postfix_expression): Handle RID_GENERIC.
5851
26d40c3d
JM
58522013-07-13 Jason Merrill <jason@redhat.com>
5853
5854 PR c++/57793
5855 * c-decl.c (finish_struct): Check for too-large class.
5856
ecdbd01a 58572013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
5858
5859 PR c/57821
5860 * c-typeck.c (set_init_index): When folding, check for index overflow.
5861
1141ed3f
BI
58622013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5863
5864 * c-parser.c (c_parser_array_notation): Removed rejection of array
5865 notations in an array of function pointers.
5866
713b46fa
BI
58672013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5868
5869 * c-array-notation.c (make_triplet_val_inv): New function.
5870 (create_cmp_incr): Likewise.
5871 (create_array_refs): Likewise.
5872 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5873 Also modularized common parts between functions and called the function.
5874 (build_array_notation_expr): Likewise.
5875 (fix_conditional_array_notations_1): Likewise.
5876 (fix_array_notation_expr): Likewise.
5877 (fix_array_notation_call_expr): Likewise.
5878
92f20202
MP
58792013-06-18 Marek Polacek <polacek@redhat.com>
5880
5881 PR c/57630
5882 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5883
73a23b06
BI
58842013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
5885
5886 * c-array-notation.c (build_array_notation_expr): Reject array notation
5887 mismatch between LHS and RHS even inside a call_expr. Also, removed
5888 a couple while statements that were dead code.
5889
00b8517d
BI
58902013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
5891
5892 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5893 excessive precision expressions in function parameters. Also removed
5894 couple unwanted while statements.
5895
1509bdda
BI
58962013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5897
5898 * c-array-notation.c (expand_array_notation_exprs): Added
5899 ARRAY_NOTATION_REF case.
5900
d60f1706
BI
59012013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5902
5903 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5904 function to c-family/array-notation-common.c.
5905 (is_cilkplus_reduce_builtin): Likewise.
5906 (find_rank): Likewise.
5907 (extract_array_notation_exprs): Likewise.
5908 (replace_array_notations): Likewise.
5909 (find_inv_trees): Likewise.
5910 (replace_inv_trees): Likewise.
5911 (contains_array_notation_expr): Likewise.
5912 (find_correct_array_notation_type): Likewise.
5913 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5914 (struct inv_list): Moved this to c-family/array-notation-common.c.
5915 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5916
6d6efbb3
BI
59172013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
5918
5919 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5920 reduction functions outside the for-loop. Added a check if the fundecl
5921 is non-NULL. Finally, removed an unwanted if-statement, and made the
5922 body unconditional.
5923
25c22937
BI
59242013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5925
5926 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5927 condition of the if-statement matches the rank of else-block and then-
5928 block when array notations are used.
5929 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5930 expression after the entire function body is parsed.
5931 (c_parser_expr_no_commas): Delayed creating array notation expressions
5932 to the end of function parsing.
5933 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5934 whole if-statement instead of just the condition.
5935 (expand_array_notation_exprs): Added MODIFY_EXPR case.
5936
edd25645
BI
59372013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5938
5939 PR c/57474
5940 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5941 array to NULL_TREE if they are unused. Also added a check for the
5942 field to be NULL before its fields are used in future.
5943
065ce7f1
RO
59442013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5945
5946 PR bootstrap/57450
5947 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5948 (build_array_notation_expr): Likewise.
5949
36536d79
BI
59502013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5951
5952 * c-typeck.c (build_array_ref): Added a check to see if array's
5953 index is greater than one. If true, then emit an error.
5954 (build_function_call_vec): Exclude error reporting and checking
5955 for builtin array-notation functions.
5956 (convert_arguments): Likewise.
5957 (c_finish_return): Added a check for array notations as a return
5958 expression. If true, then emit an error.
5959 (c_finish_loop): Added a check for array notations in a loop
5960 condition. If true then emit an error.
5961 (lvalue_p): Added a ARRAY_NOTATION_REF case.
5962 (build_binary_op): Added a check for array notation expr inside
5963 op1 and op0. If present, we call another function to find correct
5964 type.
5965 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
5966 * c-parser.c (c_parser_compound_statement): Check if array
5967 notation code is used in tree, if so, then transform them into
5968 appropriate C code.
5969 (c_parser_expr_no_commas): Check if array notation is used in LHS
5970 or RHS, if so, then build array notation expression instead of
5971 regular modify.
5972 (c_parser_postfix_expression_after_primary): Added a check for
5973 colon(s) after square braces, if so then handle it like an array
5974 notation. Also, break up array notations in unary op if found.
5975 (c_parser_direct_declarator_inner): Added a check for array
5976 notation.
5977 (c_parser_compound_statement): Added a check for array notation in
5978 a stmt. If one is present, then expand array notation expr.
5979 (c_parser_if_statement): Likewise.
5980 (c_parser_switch_statement): Added a check for array notations in
5981 a switch statement's condition. If true, then output an error.
5982 (c_parser_while_statement): Similarly, but for a while.
5983 (c_parser_do_statement): Similarly, but for a do-while.
5984 (c_parser_for_statement): Similarly, but for a for-loop.
5985 (c_parser_unary_expression): Check if array notation is used in a
5986 pre-increment or pre-decrement expression. If true, then expand
5987 them.
5988 (c_parser_array_notation): New function.
5989 * c-array-notation.c: New file.
5990 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5991
cd192ccc
MS
59922013-05-23 Mike Stump <mikestump@comcast.net>
5993
5994 * c-typeck.c (convert_for_assignment): Handle references to memory
5995 spaces better.
5996
427b248d
JM
59972013-05-16 Jason Merrill <jason@redhat.com>
5998
5999 * Make-lang.in (cc1$(exeext)): Use link mutex.
6000
44d90fe1
PC
60012013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6002
6003 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
6004 to simply use OPT_Wpointer_arith.
6005 (build_unary_op): Likewise.
6006
4e7d7b3d
JJ
60072013-04-03 Jakub Jelinek <jakub@redhat.com>
6008
6009 PR c/19449
6010 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
6011 argument. If set, or it temporarily for parsing of the first
6012 argument into force_folding_builtin_constant_p.
6013 (c_parser_postfix_expression): Adjust callers.
6014
839b422f
RB
60152013-03-21 Richard Biener <rguenther@suse.de>
6016
6017 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
6018 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
6019
2ee028f1
MP
60202013-02-12 Marek Polacek <polacek@redhat.com>
6021
6022 PR c/44938
6023 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
6024 origtypes to NULL.
6025
8824edff
JJ
60262013-01-24 Jakub Jelinek <jakub@redhat.com>
6027
6028 PR c/56078
6029 * c-typeck.c (set_nonincremental_init_from_string): If
6030 constructor_max_index is NULL, treat it as if tree_int_cst_lt
6031 returned false.
6032 (process_init_element): Likewise.
6033
eadd3d0d
JJ
60342012-12-20 Jakub Jelinek <jakub@redhat.com>
6035
6036 PR c++/55619
6037 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
6038 argument, don't call default_function_array_conversion
6039 nor c_fully_fold here.
6040 (c_parser_asm_statement): Adjust callers.
6041 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
6042 and outputs here, and call default_function_array_conversion
6043 on inputs that don't need to be addressable.
6044
f8a93a2e
JJ
60452012-12-18 Jakub Jelinek <jakub@redhat.com>
6046
6047 PR c/39464
6048 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
6049 warning require that both c_common_unsigned_type as well as
6050 c_common_signed_type is the same for both mvl and mvr types.
6051
9771b263
DN
60522012-11-16 Diego Novillo <dnovillo@google.com>
6053
6054 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
6055
6056 * c-common.c: Use new vec API in vec.h.
6057 * c-common.h: Likewise.
6058 * c-gimplify.c: Likewise.
6059 * c-pragma.c: Likewise.
6060 * c-pretty-print.c: Likewise.
6061 * c-pretty-print.h: Likewise.
6062 * c-semantics.c: Likewise.
6063 * c-decl.c: Likewise.
6064 * c-parser.c: Likewise.
6065 * c-tree.h: Likewise.
6066 * c-typeck.c: Likewise.
6067
880661a4
JW
60682012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
6069
6070 PR c++/54930
6071 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
6072
077d1abe
MLI
60732012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6074
6075 PR c/53066
6076 * c-decl.c (warn_if_shadowing): Do not warn if a variable
6077 shadows a function, unless the variable is a function or a
6078 pointer-to-function.
6079
3a785c97
JJ
60802012-10-12 Jakub Jelinek <jakub@redhat.com>
6081
6082 PR c/54381
6083 * c-parser.c (struct c_tree_loc_pair): Removed.
6084 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
6085 add location_t * and tree * arguments, fill in array of 3
6086 sizeof_arg trees and corresponding locs.
6087 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
6088 c_parser_expr_list callers.
6089 (c_parser_postfix_expression_after_primary): Likewise. Pass
6090 array of 3 sizeof_arg trees and locs (corresponding to first
6091 3 arguments) to sizeof_pointer_memaccess_warning.
6092
703c8606
LC
60932012-10-09 Lawrence Crowl <crowl@google.com>
6094
6095 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
6096 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
6097 hash table.
6098
5d9de0d0
PC
60992012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
6100
6101 PR c++/54194
6102 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
6103 call.
6104
a212e43f
MG
61052012-10-09 Marc Glisse <marc.glisse@inria.fr>
6106
6107 PR c++/54427
6108 * c-typeck.c: Include c-common.h.
6109 (enum stv_conv): Moved to c-common.h.
6110 (scalar_to_vector): Moved to c-common.c.
6111 (build_binary_op): Adapt to scalar_to_vector's new prototype.
6112 * Make-lang.in: c-typeck.c depends on c-common.h.
6113
3b78de56
AC
61142012-10-04 Arnaud Charlet <charlet@adacore.com>
6115
6116 * c-decl.c (c_write_global_declarations): Fix handling of
6117 -fdump-ada-spec*.
6118
78c60e3d
SS
61192012-09-30 Sharad Singhai <singhai@google.com>
6120
6121 * c-decl.c (c_write_global_declarations): Use a different method
6122 to determine if the dump has ben initialized.
6123
9f33203d
JM
61242012-09-14 Joseph Myers <joseph@codesourcery.com>
6125
6126 PR c/54552
6127 * c-typeck.c (c_cast_expr): When casting to a type requiring
6128 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
6129 c_fully_fold first.
6130
a27d595d
JM
61312012-09-14 Joseph Myers <joseph@codesourcery.com>
6132
6133 PR c/54103
6134 * c-typeck.c (build_unary_op): Pass original argument of
6135 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
6136 any C_MAYBE_CONST_EXPR, if it has integer operands.
6137 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
6138 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
6139 to c_objc_common_truthvalue_conversion, then remove any
6140 C_MAYBE_CONST_EXPR, if they have integer operands. Use
6141 c_objc_common_truthvalue_conversion not
6142 c_common_truthvalue_conversion.
6143 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
6144 call note_integer_operands for arguments with integer operands
6145 that are not integer constants.
6146
9feb29df
JJ
61472012-09-13 Jakub Jelinek <jakub@redhat.com>
6148
6149 PR c/54559
6150 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
6151 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
6152
d409320c
JJ
61532012-08-31 Jakub Jelinek <jakub@redhat.com>
6154
6155 PR c/54428
6156 * c-convert.c (convert): Don't call fold_convert_loc if
6157 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
6158 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
6159 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
6160
6265d07c
JJ
61612012-08-24 Jakub Jelinek <jakub@redhat.com>
6162
6163 PR c/54355
6164 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
6165 for nested and empty_ok arguments in the call to
6166 c_parser_declaration_or_fndef.
6167
1a4049e7
JJ
61682012-08-17 Jakub Jelinek <jakub@redhat.com>
6169
6170 * c-tree.h (c_last_sizeof_arg): Declare.
6171 * c-parser.c (struct c_tree_loc_pair): New type.
6172 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
6173 non-NULL.
6174 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
6175 (c_parser_postfix_expression_after_primary): Likewise. Call
6176 sizeof_pointer_memaccess_warning if needed.
6177 (sizeof_ptr_memacc_comptypes): New function.
6178 * c-typeck.c (c_last_sizeof_arg): New global variable.
6179 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
6180
0229aee9
UB
61812012-07-24 Uros Bizjak <ubizjak@gmail.com>
6182
6183 * c-lang.h (lang_decl): Add variable_size GTY option.
6184
7ee2468b
SB
61852012-07-16 Steven Bosscher <steven@gcc.gnu.org>
6186
6187 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
6188 * Make-lang.in: Fix dependencies.
6189
d4a10d0a
SB
61902012-06-29 Steven Bosscher <steven@gcc.gnu.org>
6191
6192 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
6193 and add language Makefile hooks.
6194 * config-lang.in: New file.
6195 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
6196 add the required "normal" config-lang.in rules.
6197 * c-lang.h: Moved from gcc/ to here.
6198 * c-tree.h: Likewise.
6199 * c-objc-common.c: Likewise.
6200 * c-objc-common.h: Likewise.
6201 * c-typeck.c: Likewise.
6202 * c-convert.c: Likewise.
6203 * c-lang.c: Likewise.
6204 * c-aux-info.c: Likewise.
6205 * c-errors.c: Likewise.
6206 * gccspec.c: Likewise.
6207 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
6208 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
6209\f
a5544970 6210Copyright (C) 2012-2019 Free Software Foundation, Inc.
d4a10d0a
SB
6211
6212Copying and distribution of this file, with or without modification,
6213are permitted in any medium without royalty provided the copyright
6214notice and this notice are preserved.