]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
PR c++/61339 - add mismatch between struct and class [-Wmismatched-tags] to non-bugs
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
99b1c316
MS
12019-07-09 Martin Sebor <msebor@redhat.com>
2
3 PR c++/61339
4 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
5 to class.
6 (field_decl_cmp): Same.
7 * c-parser.c (c_parser_struct_or_union_specifier): Same.
8 * c-tree.h: Same.
9 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
10
6c1dae73
MS
112019-07-09 Martin Sebor <msebor@redhat.com>
12
13 PR c++/61339
14 * c-decl.c: Change class-key from class to struct and vice versa
15 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
16 * gimple-parser.c: Same.
17
69b5279e
RB
182019-07-01 Richard Biener <rguenther@suse.de>
19
20 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
21 _Literal (char *) &"foo" for address literals pointing to
22 STRING_CSTs.
23
1e3d475e
MS
242019-06-24 Martin Sebor <msebor@redhat.com>
25
26 * c-typeck.c (build_binary_op): Hyphenate floating-point.
27
bf38f7e9
JJ
282019-06-10 Jakub Jelinek <jakub@redhat.com>
29
30 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
31 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
32 (c_parser_omp_scan_loop_body): New function.
33 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
34 inscan reduction clauses.
35 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
36 non-inscan reductions on the same construct, or inscan reductions with
37 ordered or schedule clauses, or inscan array reductions.
38
65985d78
MS
392019-06-05 Martin Sebor <msebor@redhat.com>
40
41 PR c/90737
42 * c-typeck.c (c_finish_return): Only consider functions returning
43 pointers as candidates for -Wreturn-local-addr.
44
0ecf545c
MS
452019-06-05 Martin Sebor <msebor@redhat.com>
46
47 * c-decl.c (start_decl): Adjust quoting and hyphenation
48 in diagnostics.
49 (finish_decl): Same.
50 (finish_enum): Same.
51 (start_function): Same.
52 (declspecs_add_type): Same.
53 * c-parser.c (warn_for_abs): Same.
54 * c-typeck.c (build_binary_op): Same.
55
e03436e7
TS
562019-05-17 Thomas Schwinge <thomas@codesourcery.com>
57
b48f44bf
TS
58 PR c/89433
59 * c-parser.c (c_finish_oacc_routine): Rework checking if already
60 marked with an OpenACC 'routine' directive.
61
5bf04509
TS
62 PR c/89433
63 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
64 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
65
e03436e7
TS
66 PR c/89433
67 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
68 clauses from "omp declare target" attribute.
69
a9c697b8
MS
702019-05-16 Martin Sebor <msebor@redhat.com>
71
72 * c-decl.c (start_decl): Quote keywords, operators, and
73 types in diagnostics.
74 (finish_decl): Same.
75 * c-parser.c (c_parser_asm_statement): Same.
76 (c_parser_conditional_expression): Same.
77 (c_parser_transaction_cancel): Same.
78 * c-typeck.c (c_common_type): Same.
79 (build_conditional_expr): Same.
80 (digest_init): Same.
81 (process_init_element): Same.
82 (build_binary_op): Same.
83
c4499192
RB
842019-05-17 Richard Biener <rguenther@suse.de>
85
86 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
87 (c_parser_gimple_unary_expression): Likewise.
88 (c_parser_gimple_parentized_ternary_expression): New function.
89
adfe6e4b
RB
902019-05-16 Richard Biener <rguenther@suse.de>
91
92 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
93 (c_parser_gimple_unary_expression): Likewise.
94
186dabf2
RB
952019-05-15 Richard Biener <rguenther@suse.de>
96
97 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
98 __BIT_FIELD_REF.
99
1158c5b4
RB
1002019-05-14 Richard Biener <rguenther@suse.de>
101
102 * gimple-parser.c (c_parser_gimple_statement): Remove
103 questionable auto-promotion to VIEW_CONVERT_EXPR.
104 (c_parser_gimple_typespec): Split out from __MEM parsing.
105 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
106 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
107 as __VIEW_CONVERT with -gimple.
108
fd4485aa
ML
1092019-05-09 Martin Liska <mliska@suse.cz>
110
111 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
112 __MAX.
113 (c_parser_gimple_unary_expression): Parse also binary expression
114 __MIN and __MAX.
115 (c_parser_gimple_parentized_binary_expression): New function.
116
d276406a
ML
1172019-05-09 Martin Liska <mliska@suse.cz>
118
119 * gimple-parser.c (struct gimple_parser): Add probability.
120 for gimple_parser_edge.
121 (gimple_parser::push_edge): Add new argument probability.
122 (c_parser_gimple_parse_bb_spec): Parse also probability
123 if present.
124 (c_parser_parse_gimple_body): Set edge probability.
125 (c_parser_gimple_compound_statement): Consume token
126 before calling c_parser_gimple_goto_stmt.
127 Parse BB counts.
128 (c_parser_gimple_statement): Pass new argument.
129 (c_parser_gimple_goto_stmt): Likewise.
130 (c_parser_gimple_if_stmt): Likewise.
131 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
132 * c-parser.c (c_parser_declaration_or_fndef): Pass
133 hot_bb_threshold argument.
134 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
135 field.
136 (c_parser_gimple_parse_bb_spec_edge_probability): New.
137
f179b64e
JJ
1382019-04-26 Jakub Jelinek <jakub@redhat.com>
139
140 PR debug/90197
141 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
142 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
143 (c_parser_do_statement): Likewise.
144 (c_parser_for_statement): Likewise. Formatting fixes.
145 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
146 emit DEBUG_BEGIN_STMTs if needed.
147
e7178413
JJ
1482019-04-19 Jakub Jelinek <jakub@redhat.com>
149
c280b7ee
JJ
150 PR c/89888
151 * c-typeck.c (struct c_switch): Remove outside_range_p member.
152 (c_start_case): Don't clear it.
153 (do_case): Adjust c_add_case_label caller.
154 (c_finish_case): Adjust c_do_switch_warnings caller.
155
e7178413
JJ
156 PR c++/90108
157 * c-decl.c (merge_decls): If remove is main variant and
158 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
159 variant that has newdecl as TYPE_NAME if any.
160
60a2c645
JJ
1612019-04-12 Jakub Jelinek <jakub@redhat.com>
162
163 PR c/89933
164 * c-decl.c (merge_decls): When newdecl's type is its main variant,
165 don't try to remove it from the variant list, but instead assert
166 it has no variants.
167
2a82beaa
RB
1682019-04-01 Richard Biener <rguenther@suse.de>
169
170 PR c/71598
171 * c-tree.h (c_get_alias_set): Declare.
172 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
173 * c-objc-common.c (c_get_alias_set): Treat enumeral types
174 as the underlying integer type.
175
bec1da64
MS
1762019-03-19 Martin Sebor <msebor@redhat.com>
177
178 PR tree-optimization/89688
179 * c-decl.c (finish_decl): Call braced_lists_to_string for more
180 kinds of initializers.
181
855cd9b1
JJ
1822019-03-19 Jakub Jelinek <jakub@redhat.com>
183
184 PR c/89734
185 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
186 return type even if quals_used is 0. Formatting fixes.
187
baa09dc5
RB
1882019-03-14 Richard Biener <rguenther@suse.de>
189
190 * c-tree.h (enum c_declspec_il): New.
191 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
192 enum bitfield.
193 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
194 Pass start pass and declspec_il to c_parser_parse_gimple_body.
195 (c_parser_declspecs): Adjust.
196 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
197 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
198 and bitmap.h.
199 (struct gimple_parser): New.
200 (gimple_parser::push_edge): New method.
201 (c_parser_gimple_parse_bb_spec): New helper.
202 (c_parser_parse_gimple_body): Get start pass and IL specification.
203 Initialize SSA and CFG.
204 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
205 Build a gimple_parser parsing state and pass it along.
206 (c_parser_gimple_statement): Change intermittend __PHI internal
207 function argument for the edge.
208 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
209 (c_parser_gimple_goto_stmt): Record edges to build.
210 (c_parser_gimple_if_stmt): Likewise.
211 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
212 (c_parser_gimple_or_rtl_pass_list): Likewise.
213
a3f9f006
ML
2142019-03-11 Martin Liska <mliska@suse.cz>
215
216 * c-decl.c (check_for_loop_decls): Wrap an option name
217 in a string format message and fix GNU coding style.
218 * c-parser.c (c_parser_declspecs): Likewise.
219
1db01ff9
JJ
2202019-03-08 Jakub Jelinek <jakub@redhat.com>
221
222 PR tree-optimization/89550
223 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
224 returned true.
225 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
226 or warning returned true.
227
66dcb747
JJ
2282019-02-28 Jakub Jelinek <jakub@redhat.com>
229
230 PR c/89525
231 * c-typeck.c (convert_arguments): Call inform_declaration only if
232 the previous warning_at call returned true.
233
2263c9f2
TS
2342019-02-22 Thomas Schwinge <thomas@codesourcery.com>
235
236 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
237 parameter. Adjust all users.
238 (c_parser_oacc_simple_clause): Replace parser with loc formal
239 parameter. Adjust all users.
240
19695f4d
CLT
2412019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
242
243 PR c/87924
244 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
245 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
246
5f88ba10
JJ
2472019-02-15 Jakub Jelinek <jakub@redhat.com>
248
249 PR c/89340
250 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
251 before c_decl_attributes rather than after it.
252
cfc30fd1
JJ
2532019-02-06 Jakub Jelinek <jakub@redhat.com>
254
255 PR c/89211
256 * c-parser.c (c_parser_declaration_or_fndef): Don't update
257 DECL_ARGUMENTS of d if it has been defined already. Use a single if
258 instead of 3 nested ifs.
259
fbe83e6b
JM
2602019-02-06 Joseph Myers <joseph@codesourcery.com>
261
262 PR c/88584
263 * c-decl.c (finish_decl): Do not complete array types for arrays
264 with external linkage not at file scope.
265
f461f938
RB
2662019-02-05 Richard Biener <rguenther@suse.de>
267
268 PR c/88606
269 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
270 all type variants when not supported.
271
fe509359
JJ
2722019-01-30 Jakub Jelinek <jakub@redhat.com>
273
274 PR c/89061
275 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
276 * c-decl.c (decl_jump_unsafe): Return false for
277 C_DECL_COMPOUND_LITERAL_P decls.
278 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
279
6a335b96
JJ
2802019-01-29 Jakub Jelinek <jakub@redhat.com>
281
f4b7e754
JJ
282 PR c/89045
283 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
284 scope.
285
6a335b96
JJ
286 PR c/86125
287 * c-decl.c (last_fileptr_type): Remove.
288 (last_structptr_types): New variable.
289 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
290 {old,new}rettype instead of the types themselves. Assert
291 last_structptr_types array has the same number of elements
292 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
293 argument oldtype and newtype. Instead of handling
294 just fileptr_type_node specially, handle all builtin_structptr_types
295 pointer nodes. Formatting fix.
296
d8b5a1a0
MS
2972019-01-24 Martin Sebor <msebor@redhat.com>
298
299 PR c/86125
300 PR c/88886
301 PR middle-end/86308
302 * c-decl.c (match_builtin_function_types): Add arguments.
303 (diagnose_mismatched_decls): Diagnose mismatched declarations
304 of built-ins more strictly.
305
e21c4491
JJ
3062019-01-24 Jakub Jelinek <jakub@redhat.com>
307
308 PR c++/88976
309 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
310 on #pragma omp cancel with different modifiers.
311
420183d9
L
3122019-01-18 H.J. Lu <hongjiu.lu@intel.com>
313
314 PR c/51628
315 PR c/88664
316 * c-typeck.c (convert_for_assignment): Upate the
317 warn_for_address_or_pointer_of_packed_member call.
318
17ad43dd
TH
3192019-01-16 Tom Honermann <tom@honermann.net>
320 Jason Merrill <jason@redhat.com>
321
322 * c-typeck.c (digest_init): Revised the error message produced for
323 ill-formed cases of array initialization with a string literal.
324 (error_init): Make variadic.
325
5f07d78a
JJ
3262019-01-12 Jakub Jelinek <jakub@redhat.com>
327
328 * c-typeck.c (convert_for_assignment): Fix a comment typo.
329
c4581bbf
JJ
3302019-01-07 Jakub Jelinek <jakub@redhat.com>
331
332 PR c/88701
333 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
334 if current_function_decl is non-NULL.
335
65c5b1eb
JM
3362019-01-07 Joseph Myers <joseph@codesourcery.com>
337
338 PR c/88720
339 PR c/88726
340 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
341 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
342 functions declared but never defined only for external scope, not
343 for other scopes.
344
d8fcab68
JJ
3452019-01-07 Jakub Jelinek <jakub@redhat.com>
346
347 PR c++/85052
348 * c-parser.c (c_parser_postfix_expression): Parse
349 __builtin_convertvector.
350
a5544970
JJ
3512019-01-01 Jakub Jelinek <jakub@redhat.com>
352
353 Update copyright years.
354
da77eace
L
3552018-12-20 H.J. Lu <hongjiu.lu@intel.com>
356
357 PR c/51628
358 * c-typeck.c (convert_for_assignment): Call
359 warn_for_address_or_pointer_of_packed_member.
360
1edf8866
SB
3612018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
362
363 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
364 a more specific error message (instead of just falling through).
365
db4fd626
SB
3662018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
367
368 * c-parser.c (c_parser_asm_statement): Keep track of the location each
369 asm qualifier is first seen; use that to give nicer "duplicate asm
370 qualifier" messages. Delete 'quals" variable, instead pass the
371 "is_volatile_ flag to build_asm_stmt directly.
372 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
373 * c-typeck.c (build_asm_stmt): Ditto; adjust.
374
9c9cfcbb
SB
3752018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
376
377 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
378 "done" boolean variable.
379
a14feb3c
DM
3802018-12-19 David Malcolm <dmalcolm@redhat.com>
381
382 PR c++/87504
383 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
384 Move from here to gcc-rich-location.h and gcc-rich-location.c.
385 (build_binary_op): Use struct op_location_t and
386 class binary_op_rich_location.
387
6d939173
JJ
3882018-12-11 Jakub Jelinek <jakub@redhat.com>
389
390 PR sanitizer/88426
391 * c-convert.c (convert): Call c_fully_fold before calling
392 ubsan_instrument_float_cast.
393
b7055028
SB
3942018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
395
396 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
397 setting "quals".
398
5b76e75f
SB
3992018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
400
401 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
402 after asm. Pass a flag for it to build_asm_expr.
403 * c-tree.h (build_asm_expr): Update declaration.
404 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
405 set ASM_INLINE_P.
406
30bd42b9
SB
4072018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
408
409 PR inline-asm/55681
410 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
411 combination of volatile and goto, in any order, without repetitions.
412
9df6c0e4
JB
4132018-12-04 James Norris <jnorris@codesourcery.com>
414 Cesar Philippidis <cesar@codesourcery.com>
415 Julian Brown <julian@codesourcery.com>
416
417 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
418 code.
419
f44697b7
RB
4202018-11-30 Richard Biener <rguenther@suse.de>
421
422 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
423 _Literal (type) { ... } as empty aggregate or vector constructor.
424
550dfbdc
MS
4252018-11-29 Martin Sebor <msebor@redhat.com>
426
427 PR c/88091
428 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
429 (convert_arguments): Add comments. Pass additional argument to
430 the function above.
431
673670da
MS
4322018-11-29 Martin Sebor <msebor@redhat.com>
433
434 PR c/88172
435 PR testsuite/88208
436 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
437
db1d09b0
MS
4382018-11-23 Martin Sebor <msebor@redhat.com>
439
440 PR testsuite/88098
441 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
442 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
443
98f08eb8
MS
4442018-11-20 Martin Sebor <msebor@redhat.com>
445
446 * c-parser.c (c_parser_has_attribute_expression): New function.
447 (c_parser_attribute): New function.
448 (c_parser_attributes): Move code into c_parser_attribute.
449 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
450
cd5da983
MS
4512018-11-15 Martin Sebor <msebor@redhat.com>
452
453 PR c/83656
454 * c-decl.c (header_for_builtin_fn): Declare.
455 (diagnose_mismatched_decls): Diagnose declarations of built-in
456 functions without a prototype.
457 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
458 (convert_argument): Same.
459 (convert_arguments): Factor code out into convert_argument.
460 Detect mismatches between built-in formal arguments in calls
461 to built-in without prototype.
462 (build_conditional_expr): Same.
463 (type_or_builtin_type): New function.
464 (convert_for_assignment): Add argument. Conditionally issue
465 warnings instead of errors for mismatches.
466
620e594b
DM
4672018-11-13 David Malcolm <dmalcolm@redhat.com>
468
469 * c-decl.c: Replace "source_location" with "location_t".
470 * c-tree.h: Likewise.
471 * c-typeck.c: Likewise.
472 * gimple-parser.c: Likewise.
473
3179ebae
JJ
4742018-11-09 Jakub Jelinek <jakub@redhat.com>
475
81a227c6
JJ
476 * c-parser.c (c_parser_omp_clause_final): Use
477 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
478 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
479 parsing instead of c_parser_paren_condition.
480 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
481 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
482 c_fully_fold instead of c_parser_condition.
483 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
484 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
485 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
486 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
487 c_parser_expr_no_commas instead of c_parser_expression.
488
98c91c56
JJ
489 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
490 reduction clause with inscan modifier.
491
3179ebae
JJ
492 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
493 clauses other than atomic_default_mem_order.
494
28567c40
JJ
4952018-11-08 Jakub Jelinek <jakub@redhat.com>
496
497 * c-parser.c: Include memmode.h.
498 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
499 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
500 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
501 task_reduction clauses.
502 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
503 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
504 section, or lvalue assignment expression.
505 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
506 (c_parser_omp_clause_lastprivate): Parse optional
507 conditional: modifier.
508 (c_parser_omp_clause_hint): Require constant integer expression rather
509 than just integer expression.
510 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
511 clause.
512 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
513 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
514 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
515 functions.
516 (c_parser_omp_clause_depend): Parse iterator modifier and handle
517 iterators. Parse mutexinoutset and depobj kinds.
518 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
519 callers.
520 (c_parser_omp_all_clauses): Likewise. Handle
521 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
522 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
523 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
524 default memory order from requires directive if any. Adjust
525 c_finish_omp_atomic caller.
526 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
527 (c_parser_omp_flush): Parse flush with memory-order-clause.
528 (c_parser_omp_for_loop): Allow NE_EXPR even in
529 OpenMP loops, adjust c_finish_omp_for caller.
530 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
531 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
532 Allow to be called while parsing combined parallel master.
533 Parse combined master taskloop{, simd}.
534 (c_parser_omp_parallel): Parse combined
535 parallel master{, taskloop{, simd}} constructs.
536 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
537 (OMP_TASKGROUP_CLAUSE_MASK): Define.
538 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
539 (OMP_TASKWAIT_CLAUSE_MASK): Define.
540 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
541 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
542 around teams body. Use SET_EXPR_LOCATION.
543 (c_parser_omp_target_data): Allow target data
544 with only use_device_ptr clauses.
545 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
546 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
547 (c_parser_omp_requires): New function.
548 (c_finish_taskloop_clauses): New function.
549 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
550 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
551 declaration. Disallow in_reduction clause when combined with parallel
552 master.
553 (c_parser_omp_construct): Adjust c_parser_omp_master and
554 c_parser_omp_taskgroup callers.
555 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
556 other than cancel.
557 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
558 like OMP_CLAUSE_REDUCTION.
559 (handle_omp_array_sections): Likewise. Call save_expr on array
560 reductions before calling build_index_type. Handle depend clauses
561 with iterators.
562 (struct c_find_omp_var_s): New type.
563 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
564 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
565 with static, runtime or auto schedule kinds. Call save_expr for whole
566 array reduction sizes. Diagnose reductions with zero sized elements
567 or variable length structures. Diagnose nogroup clause used with
568 reduction clause(s). Handle depend clause with
569 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
570 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
571 some different type for other kinds. Use build_unary_op with
572 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
573 Handle depend clauses with iterators. Remove no longer needed special
574 case that predetermined const qualified vars may be specified in
575 firstprivate clause. Complain if const qualified vars are mentioned
576 in data-sharing clauses other than firstprivate or shared. Use
577 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
578 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
579 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
580 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
581
7e2de6df
DM
5822018-10-29 David Malcolm <dmalcolm@redhat.com>
583
584 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
585 logic for change to name_hint::operator bool.
586 (undeclared_variable): Likewise.
587 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
588 (c_parser_parameter_declaration): Likewise.
589
9f936c86
JM
5902018-10-17 Joseph Myers <joseph@codesourcery.com>
591
592 * c-errors.c (pedwarn_c11): New function.
593 * c-parser.c (disable_extension_diagnostics): Save
594 warn_c11_c2x_compat and set it to 0.
595 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
596 (c_parser_static_assert_declaration_no_semi): Handle
597 _Static_assert without string constant.
598 * c-tree.h (pedwarn_c11): New prototype.
599
033eb567
DM
6002018-10-17 David Malcolm <dmalcolm@redhat.com>
601
602 * Make-lang.in (selftest-c): New.
603 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
604 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
605 from gcc/Makefile.in.
606
0edf3afe
RB
6072018-10-02 Richard Biener <rguenther@suse.de>
608
609 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
610
8313a764
JM
6112018-09-26 Joseph Myers <joseph@codesourcery.com>
612
613 PR c/87390
614 * c-typeck.c (build_binary_op): Use excess precision for
615 comparisons of integers and floating-point for C11 and later.
616
ce6f0888
MJ
6172018-09-26 Martin Jambor <mjambor@suse.cz>
618
619 PR c/87347
620 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
621 comment.
622
9c4a4b3c
DM
6232018-09-17 David Malcolm <dmalcolm@redhat.com>
624
625 * c-objc-common.c (range_label_for_type_mismatch::get_text):
626 Update for new param.
627 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
628 Likewise.
629
80c6d1f4
MJ
6302018-09-17 Martin Jambor <mjambor@suse.cz>
631
632 PR c/63886
633 * c-parser.c: (warn_for_abs): New function.
634 (c_parser_postfix_expression_after_primary): Call it.
635
4a426e36
BE
6362018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
637
638 * c-typeck.c (digest_init): Shorten overlength strings.
639
6d900107
BE
6402018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
641
642 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
643
b5764229
BE
6442018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
645
646 * c-decl.c (finish_decl): Call braced_list_to_string here ...
647 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
648
22eea6b2
AM
6492018-08-30 Alexander Monakov <amonakov@ispras.ru>
650
651 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
652 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
653
85204e23
DM
6542018-08-27 David Malcolm <dmalcolm@redhat.com>
655
656 PR 87091
657 * c-decl.c (implicitly_declare): Update call to
658 maybe_add_include_fixit to suggest overriding the location, as it
659 is for a note.
660 * c-objc-common.c (c_tree_printer): Update for conversion of
661 show_caret_p to a tri-state.
662
3d78e008
ML
6632018-08-27 Martin Liska <mliska@suse.cz>
664
665 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
666 fndecl_built_in_p and remove check for FUNCTION_DECL if
667 possible.
3d78e008
ML
668 (diagnose_mismatched_decls): Likewise.
669 (merge_decls): Likewise.
670 (warn_if_shadowing): Likewise.
671 (pushdecl): Likewise.
672 (implicitly_declare): Likewise.
673 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
674 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
675 * c-typeck.c (build_function_call_vec): Likewise.
676 (convert_arguments): Likewise.
677
097f82ec
DM
6782018-08-20 David Malcolm <dmalcolm@redhat.com>
679
680 PR other/84889
681 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
682 (diagnose_mismatched_decls): Likewise, in various places.
683 (warn_if_shadowing): Likewise.
684 (implicit_decl_warning): Likewise.
685 (implicitly_declare): Likewise.
686 (undeclared_variable): Likewise.
687 (declare_label): Likewise.
688 (grokdeclarator): Likewise.
689 (start_function): Likewise.
690 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
691 (c_parser_parameter_declaration): Likewise.
692 (c_parser_binary_expression): Likewise.
693 * c-typeck.c (c_expr_sizeof_expr): Likewise.
694 (parser_build_binary_op): Likewise.
695 (build_unary_op): Likewise.
696 (error_init): Likewise.
697 (pedwarn_init): Likewise.
698 (warning_init): Likewise.
699 (convert_for_assignment): Likewise.
700
96e6ae57
DM
7012018-08-15 David Malcolm <dmalcolm@redhat.com>
702
703 * c-objc-common.c: Include "gcc-rich-location.h".
704 (c_tree_printer): Move implemenation of '%T' to...
705 (print_type): ...this new function.
706 (range_label_for_type_mismatch::get_text): New function.
707 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
708 range for the various ic_argpass cases.
709 (class maybe_range_label_for_tree_type_mismatch): New class.
710 (build_binary_op): Use it when calling binary_op_error.
711
0cd020ae
PK
7122018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
713
714 * c-decl.c (start_decl): Do not warn if variables is named as main
715 and is a local variable.
716
72733314
IS
7172018-08-15 Iain Sandoe <iain@sandoe.co.uk>
718
719 PR c/19315
720 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
721 objects of unknown size.
722
23aa9f7c
MS
7232018-08-13 Martin Sebor <msebor@redhat.com>
724
725 PR tree-optimization/71625
726 * c-parser.c (c_parser_declaration_or_fndef): Call
727 braced_list_to_string.
728
e5e7e50d
BH
7292018-08-03 Bogdan Harjoc <harjoc@gmail.com>
730
731 PR c/86690
732 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
733 errors.
734
8a45b051
MS
7352018-08-01 Martin Sebor <msebor@redhat.com>
736
737 PR tree-optimization/86650
738 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
739 and TREE_BLOCK (t) from within percent_K_format to this callsite.
740
5922dcb5
JJ
7412018-08-01 Jakub Jelinek <jakub@redhat.com>
742
743 PR c/85704
744 * c-typeck.c (init_field_decl_cmp): New function.
745 (output_pending_init_elements): Use it for field comparisons
746 instead of pure bit_position comparisons.
747
9b452033
JJ
7482018-07-12 Jakub Jelinek <jakub@redhat.com>
749
750 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
751 type here, instead add "omp declare target implicit" attribute.
752 (finish_decl): Diagnose vars without mappable type here.
753
829c6349
CLT
7542018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
755 Thomas Schwinge <thomas@codesourcery.com>
756 Cesar Philippidis <cesar@codesourcery.com>
757
758 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
759 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
760 to their non-present_or_* counterparts. Make 'self' an alias to
761 PRAGMA_OACC_CLAUSE_HOST.
762 (c_parser_oacc_data_clause): Update GOMP mappings for
763 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
764 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
765 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
766 Remove support for present_or_* clauses.
767 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
768 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
769 (OACC_DECLARE_CLAUSE_MASK): Likewise.
770 (OACC_DATA_CLAUSE_MASK): Likewise.
771 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
772 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
773 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
774 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
775 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
776
e197e64e
KV
7772018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
778
779 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
780 * gimple-parser.c (c_parser_gimple_statement): Likewise.
781 (c_parser_gimple_unary_expression): Likewise.
782
487f2f61
JJ
7832018-06-15 Jakub Jelinek <jakub@redhat.com>
784
785 PR c/86093
786 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
787 before doing POINTER_DIFF_EXPR.
788
e4d44a37
MP
7892018-06-07 Marek Polacek <polacek@redhat.com>
790
791 PR c/85318
792 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
793 for loop initial declarations.
794
b67b9225
DP
7952018-05-30 David Pagan <dave.pagan@oracle.com>
796
797 PR c/55976
798 * c-decl.c (grokdeclarator): Update check for return type warnings.
799 (start_function): Likewise.
800 (finish_function): Likewise.
801 * c-typeck.c (c_finish_return): Update check for return type warnings.
802 Pass OPT_Wreturn_type to pedwarn when appropriate.
803
c566cc9f
RS
8042018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
805
806 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
807 __FMA_EXPR handlng.
808
e4f81565
RS
8092018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
810
811 * gimple-parser.c: Include internal-fn.h.
812 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
813 (c_parser_gimple_call_internal): New function.
814 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
815 Fix typos in comment.
816
79e7b1fe
JJ
8172018-05-10 Jakub Jelinek <jakub@redhat.com>
818
819 PR c++/85662
820 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
821 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
822 fold_convert_loc.
823 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
824 fold_offsetof_1, pass argtype as TYPE to it and drop the
825 fold_convert_loc.
826
f7584c81
DP
8272018-05-02 David Pagan <dave.pagan@oracle.com>
828
829 PR c/30552
830 * c-decl.c (old_style_parameter_scope): New function.
831 * c-parser.c (c_parser_postfix_expression): Check for statement
832 expressions in old-style function parameter list declarations.
833 * c-parser.h (old_style_parameter_scope): New extern declaration.
834
b33a0cb3
JJ
8352018-04-25 Jakub Jelinek <jakub@redhat.com>
836
837 PR sanitizer/84307
838 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
839 it is not TREE_STATIC.
840 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
841 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
842 its COMPOUND_LITERAL_EXPR_DECL.
843
c5c5822a
JM
8442018-03-21 Joseph Myers <joseph@codesourcery.com>
845
846 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
847 where all functions return the same _FloatN or _FloatNx type,
848 treat integer types as _Float64 instead of double.
849
aa1c9429
JJ
8502018-03-21 Jakub Jelinek <jakub@redhat.com>
851
852 PR c/84999
853 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
854 building vector comparison, diagnose it and return error_mark_node.
855
9bb45a95
JJ
8562018-03-15 Jakub Jelinek <jakub@redhat.com>
857
858 PR c/84853
859 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
860 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
861 INTEGER_TYPE element type.
862
ada6bad9
DP
8632018-03-13 David Pagan <dave.pagan@oracle.com>
864
865 PR c/46921
866 * c-typeck.c (output_init_element): Ensure field initializer
867 expression is always evaluated if there are side effects.
868
849bbdb9
JJ
8692018-03-06 Jakub Jelinek <jakub@redhat.com>
870
871 PR c/84721
872 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
873 !building_stmt_list_p ().
874
d74641bd
RS
8752018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
876
877 PR c/84305
878 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
879 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
880 and include the BIND_EXPR in the list of things that need to be
881 pre-evaluated.
882
0444aa9c
NS
8832018-02-09 Nathan Sidwell <nathan@acm.org>
884
885 PR c/84293
886 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
887 to strict_aliasing_warning.
888
7c30b12a
PC
8892018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
890
891 * c-typeck.c (really_start_incremental_init, push_init_level,
892 set_nonincremental_init, output_init_element, process_init_element):
893 Use DECL_UNNAMED_BIT_FIELD.
894
2be4dfcb
MP
8952018-01-31 Marek Polacek <polacek@redhat.com>
896
897 PR c/81779
898 * c-parser.c (c_parser_compound_statement_nostart): Call
899 expansion_point_location_if_in_system_header.
900
bb9869d5
DM
9012018-01-17 David Malcolm <dmalcolm@redhat.com>
902
903 PR c++/83814
904 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
905 the C part.
906
b4923738
JJ
9072018-01-13 Jakub Jelinek <jakub@redhat.com>
908
909 PR c/83801
910 * c-tree.h (decl_constant_value_1): Add a bool argument.
911 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
912 returning a CONSTRUCTOR if it is true. Use error_operand_p.
913 (decl_constant_value): Adjust caller.
914 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
915 decl_constant_value_1 as IN_INIT. Otherwise, punt if
916 decl_constant_value returns initializer that has BLKmode or
917 array type.
918 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
919
928686b1
RS
9202018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
921 Alan Hayward <alan.hayward@arm.com>
922 David Sherwood <david.sherwood@arm.com>
923
924 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
925 TYPE_VECTOR_SUBPARTS.
926
85ec4feb
JJ
9272018-01-03 Jakub Jelinek <jakub@redhat.com>
928
929 Update copyright years.
930
913884f7
JJ
9312018-01-01 Jakub Jelinek <jakub@redhat.com>
932
933 PR c/83595
934 * c-parser.c (c_parser_braced_init, c_parser_initelt,
935 c_parser_conditional_expression, c_parser_cast_expression,
936 c_parser_sizeof_expression, c_parser_alignof_expression,
937 c_parser_postfix_expression, c_parser_omp_declare_reduction,
938 c_parser_transaction_expression): Use set_error () method instead
939 of setting value member to error_mark_node.
940
c6cfa2bf
MM
9412017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
942
943 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
944 and _Float<N>X built-in functions.
945
11d29d63
JJ
9462017-12-22 Jakub Jelinek <jakub@redhat.com>
947
14ec014e
JJ
948 PR debug/83550
949 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
950 TYPE_STUB_DECL and call rest_of_type_compilation before processing
951 incomplete vars rather than after it.
952
11d29d63
JJ
953 PR debug/83547
954 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
955 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
956 and consider empty ones if there are no other stmts. For
957 -Wunused-value walk all statements before the one only followed by
958 DEBUG_BEGIN_STMTs.
959
170a8bd6 9602017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 961 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
962
963 * c-parser.c (c_parser_while_statement): Add unroll parameter and
964 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
965 (c_parser_do_statement): Likewise.
966 (c_parser_for_statement): Likewise.
967 (c_parser_statement_after_labels): Adjust calls to above.
968 (c_parse_pragma_ivdep): New static function.
969 (c_parser_pragma_unroll): Likewise.
970 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
971 <PRAGMA_UNROLL>: New case.
972
01512446
JJ
9732017-12-19 Jakub Jelinek <jakub@redhat.com>
974
975 * c-typeck.c (comptypes_internal, function_types_compatible_p,
976 perform_integral_promotions, digest_init): Replace Yoda conditions
977 with typical order conditions.
978 * c-decl.c (check_bitfield_type_and_width): Likewise.
979
c65e18d3
BE
9802017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
981
982 * c-typeck.c (c_safe_arg_type_equiv_p,
983 c_safe_function_type_cast_p): New function.
984 (build_c_cast): Implement -Wcast-function-type.
985
b7280579
RB
9862017-12-14 Richard Biener <rguenther@suse.de>
987
988 PR c/83415
989 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
990 like REALPART_EXPR for the behavior of whether its operand
991 is an lvalue.
992
49e6a6c0
MP
9932017-12-12 Marek Polacek <polacek@redhat.com>
994
995 PR c/82679
996 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
997
96a95ac1
AO
9982017-12-12 Alexandre Oliva <aoliva@redhat.com>
999
1000 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
1001 * c-parser.c (add_debug_begin_stmt): New.
1002 (c_parser_declaration_or_fndef): Call it.
1003 (c_parser_compound_statement_nostart): Likewise.
1004 (c_parser_statement_after_labels): Likewise.
1005 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
1006
4b2b493f
JM
10072017-12-07 Joseph Myers <joseph@codesourcery.com>
1008
1009 * c-decl.c (build_compound_literal): Add parameter alignas_align
1010 and set alignment of decl if nonzero.
1011 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
1012 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
1013 qualifier.
1014 (c_parser_struct_declaration): Update syntax comment.
1015 (c_parser_type_name): Add alignas_ok argument and pass it to
1016 c_parser_declspecs.
1017 (c_parser_cast_expression): Pass true to c_parser_type_name and
1018 give error if a cast used an _Alignas specifier.
1019 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
1020 give error if sizeof (type-name) used an _Alignas specifier.
1021 (c_parser_alignof_expression): Pass true to c_parser_type_name and
1022 give error if _Alignof (type-name) used an _Alignas specifier.
1023 (c_parser_postfix_expression_after_paren_type): Check specified
1024 alignment for a compound literal and pass it to
1025 build_compound_literal.
1026 * c-parser.h (c_parser_type_name): Update prototype.
1027 * c-tree.h (build_compound_literal): Update prototype.
1028
5d9ae53d
MS
10292017-12-07 Martin Sebor <msebor@redhat.com>
1030
1031 PR c/81544
1032 * c-decl.c (c_decl_attributes): Look up existing declaration and
1033 pass it to decl_attributes.
1034
c79144f8
DM
10352017-12-06 David Malcolm <dmalcolm@redhat.com>
1036
1037 PR c/83236
1038 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
1039 reserved for use by the implementation.
1040
613bc14f
DM
10412017-12-06 David Malcolm <dmalcolm@redhat.com>
1042
1043 * c-decl.c: Include "c-family/c-spellcheck.h".
1044
05abad4c
ML
10452017-12-05 Martin Liska <mliska@suse.cz>
1046 Jakub Jelinek <jakub@redhat.com>
1047
1048 * c-typeck.c (pointer_diff): Add new argument and instrument
1049 pointer subtraction.
1050 (build_binary_op): Similar for pointer comparison.
1051
cc6534d4
JJ
10522017-12-01 Jakub Jelinek <jakub@redhat.com>
1053
65791f42
JJ
1054 PR c/79153
1055 * c-parser.c: Include tree-iterator.h.
1056 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
1057 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
1058 on it.
1059
cc6534d4
JJ
1060 PR c/83222
1061 * c-tree.h (decl_constant_value_1): Declare.
1062 * c-typeck.c (decl_constant_value_1): New function.
1063 (decl_constant_value): Use it.
1064 * c-fold.c (c_fully_fold_internal): If in_init, use
1065 decl_constant_value_1 instead of decl_constant_value.
1066
5de73c05
JJ
10672017-11-30 Jakub Jelinek <jakub@redhat.com>
1068
1069 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
1070
058f0b9e
JJ
10712017-11-28 Jakub Jelinek <jakub@redhat.com>
1072
1073 PR sanitizer/81275
1074 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
1075 c_switch_covers_all_cases_p returns true.
1076
5e9d6aa4 10772017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 1078 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
1079
1080 * Make-lang.in (c/c-array-notation.o): Remove.
1081 * c-array-notation.c: Delete.
1082 * c-decl.c: Remove cilkplus condition.
1083 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
1084 c_parser_cilk_verify_simd, c_parser_array_notation,
1085 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
1086 c_parser_cilk_simd_fn_vector_attrs,
1087 c_finish_cilk_simd_fn_tokens): Delete.
1088 (c_parser_declaration_or_fndef): Remove cilkplus condition.
1089 (c_parser_direct_declarator_inner): Ditto.
1090 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
1091 (c_parser_attributes, c_parser_compound_statement,
1092 c_parser_statement_after_labels, c_parser_if_statement,
1093 c_parser_switch_statement, c_parser_while_statement,
1094 c_parser_do_statement, c_parser_for_statement,
1095 c_parser_unary_expression, c_parser_postfix_expression,
1096 c_parser_postfix_expression_after_primary,
1097 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
1098 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
1099 support.
1100 * c-typeck.c (build_array_ref, build_function_call_vec,
1101 convert_arguments,
1102 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
1103 c_finish_loop, build_binary_op): Remove cilkplus support.
1104
9e851845
JJ
11052017-11-28 Jakub Jelinek <jakub@redhat.com>
1106
1107 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
1108 of build3.
1109
8c7dbea9
BK
11102017-11-14 Boris Kolpackov <boris@codesynthesis.com>
1111
1112 * Make-lang.in (c.install-plugin): Install backend import library.
1113
41521dee
JJ
11142017-11-23 Jakub Jelinek <jakub@redhat.com>
1115
1116 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
1117 pragma_stmt context.
1118
ac9effed
EB
11192017-11-23 Mike Stump <mikestump@comcast.net>
1120 Eric Botcazou <ebotcazou@adacore.com>
1121
1122 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
1123 ANNOTATE_EXPR.
1124 (c_parser_do_statement): Likewise.
1125 (c_parser_for_statement): Likewise.
1126
ce95abc4
DM
11272017-11-22 David Malcolm <dmalcolm@redhat.com>
1128
1129 PR c++/62170
1130 * c-objc-common.c (c_tree_printer): Convert penultimate param from
1131 bool to bool *. Within '%T' handling, if showing an "aka", use
1132 "quoted" param to add appropriate quoting.
1133
974aedcc
MP
11342017-11-22 Marek Polacek <polacek@redhat.com>
1135
1136 PR c++/60336
1137 PR middle-end/67239
1138 PR target/68355
1139 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
1140
d4300cc6
DM
11412017-11-21 David Malcolm <dmalcolm@redhat.com>
1142
1143 PR c/83056
1144 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
1145 earlier failed lookups.
1146
1af4ebf5
MG
11472017-11-21 Marc Glisse <marc.glisse@inria.fr>
1148
1149 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
1150 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
1151
26edace6
DM
11522017-11-20 David Malcolm <dmalcolm@redhat.com>
1153
1154 PR c/81404
1155 * c-decl.c: Include "c-family/known-headers.h".
1156 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
1157 to known-headers.cc.
1158 (class suggest_missing_header): Move to known-header.h.
1159 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
1160 than get_c_name_hint.
1161
b1212255
DM
11622017-11-20 David Malcolm <dmalcolm@redhat.com>
1163
1164 * c-decl.c (get_c_name_hint): New function.
1165 (class suggest_missing_header): New class.
1166 (lookup_name_fuzzy): Call get_c_name_hint and use it to
1167 suggest missing headers to the user.
1168
6c7a259b
DM
11692017-11-20 David Malcolm <dmalcolm@redhat.com>
1170
1171 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1172 Include "c-family/name-hint.h"
1173 (implicit_decl_warning): Convert "hint" from
1174 const char * to name_hint. Pass location to
1175 lookup_name_fuzzy. Suppress any deferred diagnostic if the
1176 warning was not printed.
1177 (undeclared_variable): Likewise for "guessed_id".
1178 (lookup_name_fuzzy): Convert return type from const char *
1179 to name_hint. Add location_t param.
1180 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1181 Include "c-family/name-hint.h"
1182 (c_parser_declaration_or_fndef): Convert "hint" from
1183 const char * to name_hint. Pass location to lookup_name_fuzzy.
1184 (c_parser_parameter_declaration): Likewise.
1185
f9c59f7e
JJ
11862017-11-19 Jakub Jelinek <jakub@redhat.com>
1187
1188 PR c/66618
1189 PR c/69960
1190 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
1191 where needed.
1192 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
1193 handle_omp_array_sections): Likewise.
1194 (digest_init): Don't call decl_constant_value_for_optimization.
1195 * c-tree.h (decl_constant_value_for_optimization): Removed.
1196 * c-fold.c (c_fold_array_ref): New function.
1197 (c_fully_fold_internal): Add LVAL argument, propagate it through
1198 recursive calls. For VAR_P call decl_constant_value and
1199 unshare if not LVAL and either optimizing or IN_INIT. Remove
1200 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
1201 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
1202 (c_fully_fold): Add LVAL argument, pass it through to
1203 c_fully_fold_internal.
1204 (decl_constant_value_for_optimization): Removed.
1205
3ca0dc60
JM
12062017-11-15 Joseph Myers <joseph@codesourcery.com>
1207
1208 PR c/81156
1209 * c-parser.c (check_tgmath_function): New function.
1210 (enum tgmath_parm_kind): New enum.
1211 (c_parser_postfix_expression): Handle __builtin_tgmath.
1212
64a5912c
DM
12132017-10-31 David Malcolm <dmalcolm@redhat.com>
1214
1215 * c-decl.c (implicit_decl_warning): Update for renaming of
1216 pedwarn_at_rich_loc and warning_at_rich_loc.
1217 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
1218 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
1219 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1220 (c_parser_struct_or_union_specifier): Likewise for renaming of
1221 pedwarn_at_rich_loc.
1222 (c_parser_parameter_declaration): Likewise for renaming of
1223 error_at_rich_loc.
1224 * c-typeck.c (build_component_ref): Likewise.
1225 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
1226 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
1227 (set_init_label): Likewise for renaming of error_at_rich_loc.
1228
c1136864
RB
12292017-10-30 Richard Biener <rguenther@suse.de>
1230
1231 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
1232 stmts.
1233
ee5fd23a
MM
12342017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
1235
1236 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
1237 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
1238
1a59ccf2
DM
12392017-10-25 David Malcolm <dmalcolm@redhat.com>
1240
1241 PR c/7356
1242 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
1243 semicolons.
1244
bc1a75dd
JJ
12452017-10-25 Jakub Jelinek <jakub@redhat.com>
1246
1247 PR libstdc++/81706
1248 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
1249 newdecl to corresponding __builtin_ if any.
1250
ff1ff960
PC
12512017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
1252
1253 PR c++/82466
1254 * c-decl.c (diagnose_mismatched_decls): Use
1255 OPT_Wbuiltin_declaration_mismatch.
1256
62e1c678
DM
12572017-10-12 David Malcolm <dmalcolm@redhat.com>
1258
1259 * c-parser.c (c_parser_require): Add "type_is_unique" param and
1260 use it to guard calls to maybe_suggest_missing_token_insertion.
1261 (c_parser_parms_list_declarator): Override default value of new
1262 "type_is_unique" param to c_parser_require.
1263 (c_parser_asm_statement): Likewise.
1264 * c-parser.h (c_parser_require): Add "type_is_unique" param,
1265 defaulting to true.
1266
a92f6726
NS
12672017-10-11 Nathan Sidwell <nathan@acm.org>
1268
1269 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
1270
8e6cdc90
RS
12712017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1272
1273 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
1274 operating on trees as wide_ints.
1275 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
1276 (c_tree_equal): Likewise.
1277
8139a48e
DM
12782017-10-04 David Malcolm <dmalcolm@redhat.com>
1279
1280 * c-decl.c (push_parm_decl): Store c_parm's location into the
1281 PARAM_DECL.
1282 (build_c_parm): Add "loc" param and store it within the c_parm.
1283 * c-parser.c (struct c_parser): Add "last_token_location" field.
1284 (c_parser_consume_token): Store location of the token into the
1285 new field.
1286 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
1287 when handling a FUNCTION_DECL, if it doesn't already have them.
1288 (c_parser_parameter_declaration): Generate a location for the
1289 parameter, and pass it to the call to build_c_parm.
1290 * c-tree.h (struct c_parm): Add field "loc".
1291 (build_c_parm): Add location_t param.
1292 * c-typeck.c (get_fndecl_argument_location): New function.
1293 (inform_for_arg): New function.
1294 (convert_for_assignment): Use inform_for_arg when dealing with
1295 ic_argpass.
1296
2a389958
JJ
12972017-09-29 Jakub Jelinek <jakub@redhat.com>
1298
7d386d45
JJ
1299 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
1300 width is non-NULL.
1301 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
1302 don't SET_DECL_C_BIT_FIELD here.
1303
2a389958
JJ
1304 PR c/82340
1305 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
1306 instead of trying to set just TREE_READONLY manually.
1307
ebc6a85e
TV
13082017-09-16 Tom de Vries <tom@codesourcery.com>
1309
1310 PR c/81875
1311 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
1312 cond itself.
1313
bb75facd
JM
13142017-09-15 Joseph Myers <joseph@codesourcery.com>
1315
1316 PR c/82071
1317 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
1318 for C11.
1319 (build_conditional_expr): For C11, generate result with excess
1320 precision when one argument is an integer and the other is of a
1321 type using excess precision.
1322
1d933576
BE
13232017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
1324
1325 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
1326
267bbb6f
MP
13272017-09-13 Marek Polacek <polacek@redhat.com>
1328
1329 PR c/82167
1330 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
1331 than expr.original_type.
1332
6836632e
NS
13332017-09-12 Nathan Sidwell <nathan@acm.org>
1334
1335 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1336 resort_sorted_fields): Moved from c-family/c-common.c.
1337 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
1338
e035be33
JM
13392017-09-01 Joseph Myers <joseph@codesourcery.com>
1340
1341 PR c/82071
1342 * c-typeck.c (build_atomic_assign): Handle argument with excess
1343 precision. Ensure any EXCESS_PRECISION_EXPR is present in
1344 argument passed to build_binary_op and convert_for_assignment but
1345 not for call to c_fully_fold.
1346 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
1347 Ensure build_binary_op is called with argument with original
1348 semantic type. Avoid calling c_fully_fold with an
1349 EXCESS_PRECISION_EXPR from build_binary_op.
1350
d2e05fcb
JJ
13512017-09-01 Jakub Jelinek <jakub@redhat.com>
1352
1353 PR c/81887
1354 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
1355
b397965c
RS
13562017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1357 Alan Hayward <alan.hayward@arm.com>
1358 David Sherwood <david.sherwood@arm.com>
1359
1360 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
1361 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
1362 m1 and m2 to the signed equivalent of a fixed-point
1363 SCALAR_TYPE_MODE.
1364
14e18d71
DM
13652017-08-24 David Malcolm <dmalcolm@redhat.com>
1366
1367 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
1368 than CAN_HAVE_LOCATION_P when determining whether to use the
1369 location_t value within "value".
1370
7f204c0f
DM
13712017-08-21 David Malcolm <dmalcolm@redhat.com>
1372
1373 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
1374 rather than peeking the location of the first token.
1375 * c-tree.h (c_expr::get_location): New method.
1376
2f687306
DM
13772017-08-21 David Malcolm <dmalcolm@redhat.com>
1378
1379 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
1380 to check_function_arguments.
1381
3e7b80d7
MP
13822017-08-18 Marek Polacek <polacek@redhat.com>
1383
1384 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
1385 commentary.
1386
00aa1fa2
L
13872017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1388
1389 PR c/53037
1390 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
1391 (check_bitfield_type_and_width): Don't allow bit-field with
1392 warn_if_not_aligned type.
1393
da67acb9
MS
13942017-08-14 Martin Sebor <msebor@redhat.com>
1395
1396 PR c/81117
1397 * c-objc-common.c (c_objc_common_init): Handle 'G'.
1398
bb85aa74
MP
13992017-08-11 Marek Polacek <polacek@redhat.com>
1400
1401 PR c/81795
1402 * c-decl.c (pushtag): Only print inform if the warning was printed.
1403 (grokdeclarator): Likewise.
1404
32129a17
DM
14052017-08-10 David Malcolm <dmalcolm@redhat.com>
1406
1407 * c-parser.c (c_parser_error): Rename to...
1408 (c_parser_error_richloc): ...this, making static, and adding
1409 "richloc" parameter, passing it to the c_parse_error call,
1410 rather than calling c_parser_set_source_position_from_token.
1411 (c_parser_error): Reintroduce, reimplementing in terms of the
1412 above, converting return type from void to bool.
1413 (class token_pair): New class.
1414 (struct matching_paren_traits): New struct.
1415 (matching_parens): New typedef.
1416 (struct matching_brace_traits): New struct.
1417 (matching_braces): New typedef.
1418 (get_matching_symbol): New function.
1419 (c_parser_require): Add param MATCHING_LOCATION, using it to
1420 highlight matching "opening" tokens for missing "closing" tokens.
1421 (c_parser_skip_until_found): Likewise.
1422 (c_parser_static_assert_declaration_no_semi): Convert explicit
1423 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
1424 class matching_parens, so that the pertinent open parenthesis is
1425 highlighted when there are problems locating the close
1426 parenthesis.
1427 (c_parser_struct_or_union_specifier): Likewise.
1428 (c_parser_typeof_specifier): Likewise.
1429 (c_parser_alignas_specifier): Likewise.
1430 (c_parser_simple_asm_expr): Likewise.
1431 (c_parser_braced_init): Likewise, for matching_braces.
1432 (c_parser_paren_condition): Likewise, for matching_parens.
1433 (c_parser_switch_statement): Likewise.
1434 (c_parser_for_statement): Likewise.
1435 (c_parser_asm_statement): Likewise.
1436 (c_parser_asm_operands): Likewise.
1437 (c_parser_cast_expression): Likewise.
1438 (c_parser_sizeof_expression): Likewise.
1439 (c_parser_alignof_expression): Likewise.
1440 (c_parser_generic_selection): Likewise.
1441 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
1442 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
1443 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
1444 In case CPP_OPEN_PAREN, pass loc_open_paren to the
1445 c_parser_skip_until_found call.
1446 (c_parser_objc_class_definition): Use class matching_parens as
1447 above.
1448 (c_parser_objc_method_decl): Likewise.
1449 (c_parser_objc_try_catch_finally_statement): Likewise.
1450 (c_parser_objc_synchronized_statement): Likewise.
1451 (c_parser_objc_at_property_declaration): Likewise.
1452 (c_parser_oacc_wait_list): Likewise.
1453 (c_parser_omp_var_list_parens): Likewise.
1454 (c_parser_omp_clause_collapse): Likewise.
1455 (c_parser_omp_clause_default): Likewise.
1456 (c_parser_omp_clause_if): Likewise.
1457 (c_parser_omp_clause_num_threads): Likewise.
1458 (c_parser_omp_clause_num_tasks): Likewise.
1459 (c_parser_omp_clause_grainsize): Likewise.
1460 (c_parser_omp_clause_priority): Likewise.
1461 (c_parser_omp_clause_hint): Likewise.
1462 (c_parser_omp_clause_defaultmap): Likewise.
1463 (c_parser_oacc_single_int_clause): Likewise.
1464 (c_parser_omp_clause_ordered): Likewise.
1465 (c_parser_omp_clause_reduction): Likewise.
1466 (c_parser_omp_clause_schedule): Likewise.
1467 (c_parser_omp_clause_num_teams): Likewise.
1468 (c_parser_omp_clause_thread_limit): Likewise.
1469 (c_parser_omp_clause_aligned): Likewise.
1470 (c_parser_omp_clause_linear): Likewise.
1471 (c_parser_omp_clause_safelen): Likewise.
1472 (c_parser_omp_clause_simdlen): Likewise.
1473 (c_parser_omp_clause_depend): Likewise.
1474 (c_parser_omp_clause_map): Likewise.
1475 (c_parser_omp_clause_device): Likewise.
1476 (c_parser_omp_clause_dist_schedule): Likewise.
1477 (c_parser_omp_clause_proc_bind): Likewise.
1478 (c_parser_omp_clause_uniform): Likewise.
1479 (c_parser_omp_for_loop): Likewise.
1480 (c_parser_cilk_clause_vectorlength): Likewise.
1481 (c_parser_cilk_clause_linear): Likewise.
1482 (c_parser_transaction_expression): Likewise.
1483 * c-parser.h (c_parser_require): Add param matching_location with
1484 default UNKNOWN_LOCATION.
1485 (c_parser_error): Convert return type from void to bool.
1486 (c_parser_skip_until_found): Add param matching_location with
1487 default UNKNOWN_LOCATION.
1488
30af3a2b
MP
14892017-08-09 Marek Polacek <polacek@redhat.com>
1490
1491 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
1492 * c-tree.h (build_external_ref): Update declaration.
1493 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
1494 (build_external_ref): Change the type of a parameter to bool.
1495 (parser_build_binary_op): Use true/false instead of 1/0.
1496 (pointer_diff): Likewise.
1497 (build_modify_expr): Likewise.
1498 (set_designator): Change the type of a parameter to bool.
1499 (set_init_index): Use true/false instead of 1/0.
1500 (set_init_label): Likewise.
1501 (output_init_element): Change the type of a parameter to bool.
1502 (output_pending_init_elements): Use true/false instead of 1/0.
1503 (process_init_element): Likewise.
1504 (build_binary_op): Change the type of a parameter to bool.
1505
296c53ac
MP
15062017-08-09 Marek Polacek <polacek@redhat.com>
1507
1508 PR c/81233
1509 * c-typeck.c (pedwarn_init): Make the function take a variable list.
1510 Call emit_diagnostic_valist instead of pedwarn.
1511 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
1512 Print the relevant types in diagnostics.
1513
a32c8316
MP
15142017-08-09 Marek Polacek <polacek@redhat.com>
1515
1516 PR c/81417
1517 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
1518 build_conditional_expr.
1519 * c-parser.c (c_parser_conditional_expression): Create locations for
1520 EXP1 and EXP2 from their source ranges. Pass the locations down to
1521 build_conditional_expr.
1522 * c-tree.h (build_conditional_expr): Update declaration.
1523 * c-typeck.c (build_conditional_expr): Add location_t parameters.
1524 For -Wsign-compare, also print the types.
1525
314e6352
ML
15262017-08-08 Martin Liska <mliska@suse.cz>
1527
1528 * c-convert.c: Include header files.
1529 * c-typeck.c: Likewise.
1530
577eec56
ML
15312017-08-07 Martin Liska <mliska@suse.cz>
1532
1533 * c-parser.c (c_parser_attributes): Canonicalize name of an
1534 attribute.
1535
f7b6353a
MP
15362017-08-02 Marek Polacek <polacek@redhat.com>
1537
1538 PR c/81289
1539 * c-parser.c (c_parser_unary_expression): Use set_error.
1540
8a6eab34
MP
1541 PR c/81448
1542 PR c/81306
1543 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
1544 warnings. Avoid walking MACRO_MAP_LOCATIONS.
1545
7fef86d3
JH
15462017-07-31 Jan Hubicka <hubicka@ucw.cz>
1547 Martin Liska <mliska@suse.cz>
1548
1549 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 1550 statement.
7fef86d3 1551
f34ebeb2
ML
15522017-07-31 Martin Liska <mliska@suse.cz>
1553
1554 PR sanitize/81530
1555 * c-convert.c (convert): Guard condition with flag_sanitize_p
1556 also with current_function_decl non-null equality.
1557 * c-decl.c (grokdeclarator): Likewise.
1558 * c-typeck.c (build_binary_op): Likewise.
1559
8595f67b
MP
15602017-07-25 Marek Polacek <polacek@redhat.com>
1561
1562 * c-decl.c (grokfield): Remove local variable.
1563
d49718d6
MP
15642017-07-25 Marek Polacek <polacek@redhat.com>
1565
1566 PR c/81364
1567 * c-parser.c (c_parser_else_body): Don't warn about multistatement
1568 macro expansion if the body is in { }.
1569 (c_parser_while_statement): Likewise.
1570 (c_parser_for_statement): Likewise.
1571
ff22eb12
NS
15722017-07-18 Nathan Sidwell <nathan@acm.org>
1573
1574 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
1575
eea77d1f
DM
15762017-07-14 David Malcolm <dmalcolm@redhat.com>
1577
1578 * c-decl.c (implicitly_declare): When suggesting a missing
1579 #include, provide a fix-it hint.
1580
b6f43128
DM
15812017-07-06 David Malcolm <dmalcolm@redhat.com>
1582
1583 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
1584 and call that instead.
1585 * c-tree.h (selftest::run_c_tests): New decl.
1586
3e2becc4
MP
15872017-06-26 Marek Polacek <polacek@redhat.com>
1588
1589 PR c/80116
1590 * c-parser.c (c_parser_if_body): Set the location of the
1591 body of the conditional after parsing all the labels. Call
1592 warn_for_multistatement_macros.
1593 (c_parser_else_body): Likewise.
1594 (c_parser_switch_statement): Likewise.
1595 (c_parser_while_statement): Likewise.
1596 (c_parser_for_statement): Likewise.
1597 (c_parser_statement): Add a default argument. Save the location
1598 after labels have been parsed.
1599 (c_parser_c99_block_statement): Likewise.
1600
343ae898
RB
16012017-06-19 Richard Biener <rguenther@suse.de>
1602
1603 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1604 negated _Literals to parse _Literal (int) -1.
1605
45b2222a
ML
16062017-06-13 Martin Liska <mliska@suse.cz>
1607
1608 PR sanitize/78204
1609 * c-convert.c (convert): Use sanitize_flags_p.
1610 * c-decl.c (grokdeclarator): Likewise.
1611 * c-typeck.c (convert_for_assignment): Likewise.
1612 (c_finish_return): Likewise.
1613 (build_binary_op): Likewise.
1614
8ab7005b
JJ
16152017-06-08 Jakub Jelinek <jakub@redhat.com>
1616
1617 PR c/81006
1618 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
1619 to sizetype before size_binop.
1620
363dc72c
JJ
16212017-06-07 Jakub Jelinek <jakub@redhat.com>
1622
1623 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
1624 of TDI_generic.
1625
dc949728
MP
16262017-06-06 Marek Polacek <polacek@redhat.com>
1627
1628 PR c/79983
1629 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
1630 ref.
1631 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
1632
40ffd95f
BE
16332017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1634
1635 * c-parser.c (c_parser_binary_expression): Implement the
1636 -Wsizeof_pointer_div warning.
1637 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
1638 from a parenthesized expression.
1639 (c_parser_expr_list): Use c_last_sizeof_loc.
1640 * c-tree.h (c_last_sizeof_loc): New external.
1641 * c-typeck.c (c_last_sizeof_loc): New variable.
1642 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
1643
9fc5e7a4
MM
16442017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
1645
1646 PR testsuite/80580
1647 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
1648
f012c8ef
DM
16492017-05-30 David Malcolm <dmalcolm@redhat.com>
1650
1651 * c-objc-common.c (c_tree_printer): Gain bool and const char **
1652 parameters.
1653
3cd211af
MS
16542017-05-24 Martin Sebor <msebor@redhat.com>
1655
1656 PR c/80731
1657 * c-fold.c (c_fully_fold_internal): Adjust.
1658 * c-typeck.c (parser_build_unary_op): Adjust.
1659
fd71a9a2
TS
16602017-05-23 Thomas Schwinge <thomas@codesourcery.com>
1661
1662 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
1663 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
1664 "VECTOR_LENGTH".
1665
92fa0f9e
MP
16662017-05-23 Marek Polacek <polacek@redhat.com>
1667
1668 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
1669 quotes.
1670
d11c168a
JJ
16712017-05-22 Jakub Jelinek <jakub@redhat.com>
1672
1673 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
1674 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
1675 it returned invariant. Call tree_invariant_p unconditionally
1676 afterwards to decide whether to return expr or op0.
1677
58aca9d9
NS
16782017-05-22 Nathan Sidwell <nathan@acm.org>
1679
1680 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
1681
7fd549d2
TS
16822017-05-19 Thomas Schwinge <thomas@codesourcery.com>
1683
1684 * c-parser.c (c_parser_omp_clause_default): Handle
1685 "OMP_CLAUSE_DEFAULT_PRESENT".
1686
6ecd2339
BE
16872017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1688
1689 * config-lang.in (gtfiles): Add c-family/c-format.c.
1690
8a57ecff
NS
16912017-05-18 Nathan Sidwell <nathan@acm.org>
1692
1693 * c-decl.c (pushdecl_top_level): Delete unused function.
1694
6574d78e
MP
16952017-05-18 Marek Polacek <polacek@redhat.com>
1696
1697 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
1698 (check_earlier_gotos): Likewise.
1699 (define_label): Likewise.
1700 (pending_xref_error): Likewise.
1701 (smallest_type_quals_location): Likewise.
1702 (grokdeclarator): Likewise.
1703 (grokparms): Likewise.
1704 (identifier_global_value): Likewise.
1705 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
1706 (find_init_member): Likewise.
1707
e3455240
MP
17082017-05-18 Marek Polacek <polacek@redhat.com>
1709
1710 * c-decl.c (start_decl): Use false/true instead of 0/1.
1711 (grokdeclarator): Likewise.
1712 (finish_struct): Likewise.
1713 (start_function): Change the return type to bool. Use false/true
1714 instead of 0/1.
1715 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
1716 * c-tree.h (start_function): Update.
1717 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
1718 (set_designator): Change the return type to bool. Use false/true
1719 instead of 0/1.
1720
3fa8871b
MP
17212017-05-17 Marek Polacek <polacek@redhat.com>
1722
1723 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
1724 * c-typeck.c: Likewise.
1725
142473df
MP
17262017-05-17 Marek Polacek <polacek@redhat.com>
1727
1728 PR sanitizer/80659
1729 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
1730 DECL_IGNORED_P even for non-static compound literals.
1731
1a817418
ML
17322017-05-17 Martin Liska <mliska@suse.cz>
1733
1734 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1735 use it instead of int type.
1736
b2fa0a8b
MP
17372017-05-17 Marek Polacek <polacek@redhat.com>
1738
1739 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
1740 call c_fully_fold.
1741 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
1742 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
1743 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1744 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1745 save_expr.
1746 (c_parser_conditional_expression): Likewise.
1747 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1748 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1749 (process_init_element): Likewise.
1750 (build_binary_op): Likewise.
1751 (handle_omp_array_sections_1): Likewise.
1752
1e47f02b
TS
17532017-05-12 Thomas Schwinge <thomas@codesourcery.com>
1754
1755 * c-parser.c (c_parser_omp_clause_num_gangs)
1756 (c_parser_omp_clause_num_workers)
1757 (c_parser_omp_clause_vector_length): Merge functions into...
1758 (c_parser_oacc_single_int_clause): ... this new function. Adjust
1759 all users.
1760
c24e924f
NS
17612017-05-11 Nathan Sidwell <nathan@acm.org>
1762
1763 * gimple-parser.c: Don't #include tree-dump.h.
1764
c587104e
MM
17652017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1766
1767 PR testsuite/80580
1768 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
1769
67ac9a9d
MM
17702017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1771
1772 PR testsuite/80580
1773 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1774 incorrect __MEM syntax.
1775
ac4eb40f
MM
17762017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1777
1778 PR testsuite/80580
1779 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1780 type of unary '*'.
1781
641da50a
NS
17822017-05-09 Nathan Sidwell <nathan@acm.org>
1783
1784 * c-tree.h (pushdecl): Declare.
1785
56d35585
DM
17862017-05-05 David Malcolm <dmalcolm@redhat.com>
1787
1788 * c-decl.c (warn_defaults_to): Replace report_diagnostic
1789 with diagnostic_report_diagnostic.
1790 * c-errors.c (pedwarn_c99): Likewise.
1791 (pedwarn_c90): Likewise.
1792
815d9cc6
XR
17932017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1794
92a285c1 1795 PR c++/80038
815d9cc6
XR
1796 * c-gimplify.c (c_gimplify_expr): Remove calls to
1797 cilk_gimplifY_call_params_in_spawned_fn.
1798
1c4ea66f
DM
17992017-04-25 David Malcolm <dmalcolm@redhat.com>
1800
1801 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1802 hint for removing extra semicolon.
1803
666f7903
JJ
18042017-04-21 Jakub Jelinek <jakub@redhat.com>
1805
1806 PR c/80468
1807 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
1808 enabled, set specs->type to integer_type_node.
1809
5764ee3c
JW
18102017-04-03 Jonathan Wakely <jwakely@redhat.com>
1811
1812 * c-array-notation.c: Fix typo in comment.
1813
10fa8dfb
MP
18142017-03-29 Marek Polacek <polacek@redhat.com>
1815
1816 PR c/79730
1817 * c-decl.c (finish_decl): Check VAR_P.
1818
a9e4a1a5
JJ
18192017-03-27 Jakub Jelinek <jakub@redhat.com>
1820
1821 PR middle-end/80162
1822 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1823 * c-typeck.c (c_mark_addressable): Likewise. Look through
1824 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1825 to ARRAY_TYPE.
1826 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
1827
ee3ff394
MP
18282017-03-23 Marek Polacek <polacek@redhat.com>
1829
1830 * c-tree.h: Remove a C_RID_YYCODE reference.
1831
4d1b8e70
JJ
18322017-03-21 Jakub Jelinek <jakub@redhat.com>
1833
1834 PR c/80097
1835 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
1836 optional COMPOUND_EXPR with ubsan instrumentation.
1837
31dc71a8
MP
18382017-03-17 Marek Polacek <polacek@redhat.com>
1839
1840 * c-parser.c: Add C11 references.
1841
d579c385
MP
18422017-03-15 Marek Polacek <polacek@redhat.com>
1843
1844 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
1845
85059a38
MP
18462017-03-11 Marek Polacek <polacek@redhat.com>
1847
1848 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
1849
2f6f187a
DM
18502017-03-10 David Malcolm <dmalcolm@redhat.com>
1851
1852 PR translation/79848
1853 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1854 "%qs".
1855 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1856
36618428
MP
18572017-03-09 Marek Polacek <polacek@redhat.com>
1858
1859 PR sanitizer/79757
1860 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1861 parameter declarations with initializers.
1862
01e5af5a
JJ
18632017-03-09 Jakub Jelinek <jakub@redhat.com>
1864
1865 PR c/79969
1866 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
1867 TYPE_STUB_DECL.
1868
a71dbc63
JJ
18692017-03-07 Jakub Jelinek <jakub@redhat.com>
1870
1871 PR c/79834
1872 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1873 for "may only be used in compound statements" diagnostics, change it
1874 such that the same translatable string is used for all pragmas. For
1875 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1876 diagnostics.
1877 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1878 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1879 "may only be used in compound statements" diagnostics, such that the
1880 same translatable string is used for all pragmas.
1881
1ff4bae6
MP
18822017-03-04 Marek Polacek <polacek@redhat.com>
1883
1884 PR c/79847
1885 * c-decl.c (implicit_decl_warning): Add missing space.
1886
7f5a7d78
MP
18872017-03-03 Marek Polacek <polacek@redhat.com>
1888
1889 PR c/79758
1890 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1891 current_function_prototype_arg_types is error_mark_node. Fix
1892 formatting. Use TREE_VALUE instead of TREE_TYPE.
1893
883c8f06
JJ
18942017-03-03 Jakub Jelinek <jakub@redhat.com>
1895
79c9b7a8
JJ
1896 PR c/79837
1897 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1898 %<min%> or %<max%> in the diagnostics, instead mention identifier.
1899 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1900 diagnostics.
1901
883c8f06
JJ
1902 PR c/79836
1903 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1904 instead of %<_Generic>.
1905 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1906 (c_parser_omp_target_exit_data): Use %<release%> instead of
1907 %<release>.
1908
324ff1a0
JJ
19092017-02-28 Jakub Jelinek <jakub@redhat.com>
1910
1911 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1912 instead of just cond ? "..." : "...".
1913 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1914 for "enter"/"exit" keyword.
1915 (c_finish_oacc_routine): Don't use %s to supply portions of the
1916 message.
1917
4227c9ad
JJ
19182017-02-24 Jakub Jelinek <jakub@redhat.com>
1919
1920 PR c++/79588
1921 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1922 handle -Wrestrict here.
1923 * c-typeck.c (build_function_call_vec): Adjust
1924 check_function_arguments caller.
1925
5d972e66
RB
19262017-02-23 Richard Biener <rguenther@suse.de>
1927
1928 PR c/79684
1929 * gimple-parser.c (c_parser_gimple_statement): Use set_error
1930 to initialize c_exprs to return.
1931 (c_parser_gimple_binary_expression): Likewise.
1932 (c_parser_gimple_unary_expression): Likewise.
1933 (c_parser_gimple_postfix_expression): Likewise.
1934
61ac5ebe
MP
19352017-02-22 Marek Polacek <polacek@redhat.com>
1936
1937 PR c/79662
1938 * c-typeck.c (convert_arguments): Handle error_mark_node.
1939
41d1b0b1
PK
19402017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1941
1942 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1943 value of c_parser_parse_ssa_name against error_mark_node and emit
1944 error if ssa name is anonymous and written as default definition.
1945
eab1f169
PK
19462017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1947
1948 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1949 FMA_EXPR.
1950
bcac0b4d
JJ
19512017-02-16 Jakub Jelinek <jakub@redhat.com>
1952
1953 PR c++/79512
1954 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1955 ignore #pragma omp target even when not followed by identifier.
1956
1be33173
PK
19572017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1958
1959 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1960 (c_parser_gimple_unary_expression): Likewise.
1961
aa326bfb
JJ
19622017-02-13 Jakub Jelinek <jakub@redhat.com>
1963
1964 * c-parser.c (c_parser_oacc_declare): Add missing space in
1965 diagnostics.
1966
8a398bc5
PK
19672017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1968
1969 PR c/79478
1970 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1971 set_c_expr_source_range when parsing ssa-name.
1972
3dcde5ef
PG
19732017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
1974 Richard Biener <rguenther@suse.de>
1975
1976 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1977 building IL when arguments are error_mark_node.
1978 (c_parser_gimple_unary_expression): Likewise.
1979 (c_parser_gimple_if_stmt): Likewise.
1980 (c_parser_gimple_switch_stmt): Likewise.
1981 (c_parser_gimple_return_stmt): Likewise.
1982 (c_parser_parse_ssa_name): When name lookup fails do not build
1983 an SSA name. Use undeclared rather than not declared in error
1984 reporting.
1985
192b048b
MP
19862017-02-09 Marek Polacek <polacek@redhat.com>
1987
1988 PR c/79428
1989 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1990 instead of c_parser_skip_until_found.
1991
56f71478
JJ
19922017-02-09 Jakub Jelinek <jakub@redhat.com>
1993
1994 PR c/79431
1995 * c-parser.c (c_parser_omp_declare_target): Don't invoke
1996 symtab_node::get on automatic variables.
1997
02889d23
CLT
19982016-02-09 Nathan Sidwell <nathan@codesourcery.com>
1999 Chung-Lin Tang <cltang@codesourcery.com>
2000
2001 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
2002 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
2003 semantic checking.
2004 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
2005
7af4b20d
RB
20062017-02-07 Richard Biener <rguenther@suse.de>
2007
2008 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
2009 (c_parser_gimple_postfix_expression_after_primary):
2010 Do not use c_build_function_call_vec to avoid folding and promotion.
2011 Simplify.
2012
e5e391d6
MO
20132017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
2014
2015 PR lto/79061
2016 * c-decl.c (pop_scope): Pass main_input_filename to
2017 build_translation_unit_decl.
2018
c2e84327
DM
20192017-01-24 David Malcolm <dmalcolm@redhat.com>
2020
2021 * c-parser.c: Include "read-rtl-function.h" and
2022 "run-rtl-passes.h".
2023 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
2024 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
2025 production. Update for renaming of field "gimple_pass" to
2026 "gimple_or_rtl_pass". If __RTL was seen, call
2027 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
2028 to an auto_timevar, to cope with early exit.
2029 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
2030 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
2031 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
2032 Handle RID_RTL.
2033 (c_parser_parse_rtl_body): New function.
2034 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
2035 (struct c_declspecs): Rename field "gimple_pass" to
2036 "gimple_or_rtl_pass". Add field "rtl_p".
2037 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
2038 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
2039 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
2040 (c_parser_gimple_or_rtl_pass_list): ...this.
2041
2ebd93e1
MP
20422017-01-20 Marek Polacek <polacek@redhat.com>
2043
2044 PR c/64279
2045 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
2046
b1c95bb5
RB
20472017-01-13 Richard Biener <rguenther@suse.de>
2048
2049 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
2050 nops.
2051
25329913
RB
20522017-01-13 Richard Biener <rguenther@suse.de>
2053
2054 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2055 _Literal ( type-name ) number.
2056
6bb4ea5c
RB
20572017-01-12 Richard Biener <rguenther@suse.de>
2058
2059 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2060 __MEM.
2061
6b5b4e9c
JJ
20622017-01-11 Jakub Jelinek <jakub@redhat.com>
2063
2064 PR c++/72813
2065 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
2066 PCH file.
2067
e3252775
RB
20682017-01-11 Richard Biener <rguenther@suse.de>
2069
2070 PR bootstrap/79052
2071 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
2072 returns on parse errors.
2073
a9342885
MP
20742017-01-04 Marek Polacek <polacek@redhat.com>
2075
2076 PR c++/64767
2077 * c-parser.c (c_parser_postfix_expression): Mark zero character
2078 constants by setting original_type in c_expr.
2079 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
2080 with a zero character constant.
2081 (char_type_p): New function.
2082
5dd9a9d0
DM
20832017-01-04 David Malcolm <dmalcolm@redhat.com>
2084
2085 * c-parser.c (c_parser_declaration_or_fndef): Create a
2086 rich_location at init_loc and parse it to start_init.
2087 (last_init_list_comma): New global.
2088 (c_parser_braced_init): Update last_init_list_comma when parsing
2089 commas. Pass it to pop_init_level. Pass location of closing
2090 brace to pop_init_level.
2091 (c_parser_postfix_expression_after_paren_type): Create a
2092 rich_location at type_loc and parse it to start_init.
2093 (c_parser_omp_declare_reduction): Likewise for loc.
2094 * c-tree.h (start_init): Add rich_location * param.
2095 (pop_init_level): Add location_t param.
2096 * c-typeck.c (struct initializer_stack): Add field
2097 "missing_brace_richloc".
2098 (start_init): Add richloc param, use it to initialize
2099 the stack node's missing_brace_richloc.
2100 (last_init_list_comma): New decl.
2101 (finish_implicit_inits): Pass last_init_list_comma to
2102 pop_init_level.
2103 (push_init_level): When finding missing open braces, add fix-it
2104 hints to the richloc.
2105 (pop_init_level): Add "insert_before" param and pass it
2106 when calling pop_init_level. Add fixits about missing
2107 close braces to any richloc. Use the richloc for the
2108 -Wmissing-braces warning.
2109 (set_designator): Pass last_init_list_comma to pop_init_level.
2110 (process_init_element): Likewise.
2111
cbe34bb5
JJ
21122017-01-01 Jakub Jelinek <jakub@redhat.com>
2113
2114 Update copyright years.
2115
d17680f3
JJ
21162016-12-21 Jakub Jelinek <jakub@redhat.com>
2117
0dba7960
JJ
2118 PR bootstrap/78817
2119 * c-typeck.c (build_function_call_vec): If check_function_arguments
2120 returns true, set TREE_NO_WARNING on CALL_EXPR.
2121
d17680f3
JJ
2122 PR c/77767
2123 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
2124 to *expr instead of overwriting it.
2125
aa90531e
RB
21262016-12-20 Richard Biener <rguenther@suse.de>
2127
2128 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
2129 error recovery.
2130 (c_parser_gimple_statement): Only build assigns for non-error
2131 stmts.
2132 (c_parser_gimple_postfix_expression_after): Improve error recovery.
2133
629b3d75
MJ
21342016-12-14 Martin Jambor <mjambor@suse.cz>
2135
2136 * c-parser.c: Include omp-general.h and omp-offload.h instead of
2137 omp-low.h.
2138 (c_finish_oacc_routine): Adjusted call to
2139 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
2140 to use their new names.
2141 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
2142 use its new name.
2143 (c_parser_oacc_update): Likewise.
2144 (c_parser_omp_simd): Likewise.
2145 (c_parser_omp_target_update): Likewise.
2146 * c-typeck.c: Include omp-general.h instead of omp-low.h.
2147 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
2148 name.
2149 (c_finish_omp_cancellation_point): Likewise.
2150 * gimple-parser.c: Do not include omp-low.h
2151
c5af52eb
CP
21522016-12-02 Cesar Philippidis <cesar@codesourcery.com>
2153 James Norris <jnorris@codesourcery.com>
2154
2155 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
2156 EXIT_DATA,WAIT} are not used in compound statements.
2157 (c_parser_oacc_enter_exit_data): Update diagnostics.
2158
48330c93
BE
21592016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2160
2161 PR c++/71973
2162 * c-decl.c (diagnose_mismatched_decls): Use
2163 OPT_Wbuiltin_declaration_mismatch here too.
2164
899ca90e 21652016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
2166 Alan Hayward <alan.hayward@arm.com>
2167 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
2168
2169 * c-decl.c (merge_decls): Use SET_DECL_MODE.
2170 (make_label, finish_struct): Likewise.
2171
1ee62b92 21722016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 2173 Richard Biener <rguenther@suse.de>
22b15758 2174
8e745a17
JJ
2175 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
2176 * config-lang.in (gtfiles): Add c/c-parser.h.
2177 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
2178 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
2179 * c-parser.c (enum c_id_kind, struct c_token,
2180 c_parser_next_token_is, c_parser_next_token_is_not,
2181 c_parser_next_token_is_keyword,
2182 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
2183 Split out to ...
2184 * c-parser.h: ... new header.
2185 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 2186 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
2187 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2188 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2189 c_parser_error, c_parser_require, c_parser_skip_until_found,
2190 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2191 c_parser_type_name): Export.
2192 (c_parser_tokens_buf): New function.
2193 (c_parser_error): Likewise.
2194 (c_parser_set_error): Likewise.
2195 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
2196 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
2197 via c_parser_parse_gimple_body.
8e745a17
JJ
2198 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
2199 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2200 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2201 c_parser_error, c_parser_require, c_parser_skip_until_found,
2202 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2203 c_parser_type_name): Declare.
1ee62b92
PG
2204 (struct c_parser): Declare forward.
2205 (c_parser_tokens_buf): Declare.
8e745a17
JJ
2206 (c_parser_error): Likewise.
2207 (c_parser_set_error): Likewise.
2208 * gimple-parser.c: New file.
2209 * gimple-parser.h: Likewise.
1ee62b92 2210
22b15758
UB
22112016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2212
2213 PR c/35503
2214 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2215 warn_for_restrict.
2216
84ff4775
LCW
22172016-09-11 Le-Chun Wu <lcwu@google.com>
2218 Mark Wielaard <mjw@redhat.com>
2219
2220 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
2221 to the given -Wshadow= variant.
2222
4d0cdd0c
TP
22232016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2224
2225 * c-typeck.c: Include memmodel.h.
2226
1202f33e
JJ
22272016-10-13 Jakub Jelinek <jakub@redhat.com>
2228
2229 PR target/77957
2230 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
2231 instead of lhd_return_null_tree_v.
2232
8a14afd0
BS
22332016-10-07 Bernd Schmidt <bschmidt@redhat.com>
2234
2235 PR c++/69733
2236 * c-decl.c (smallest_type_quals_location): New static function.
2237 (grokdeclarator): Try to find the correct location for an ignored
2238 qualifier.
2239
81fea426
MP
22402016-09-26 Marek Polacek <polacek@redhat.com>
2241
2242 PR c/7652
2243 * c-decl.c (pop_scope): Add gcc_fallthrough.
2244
22452016-09-26 Marek Polacek <polacek@redhat.com>
2246
2247 PR c/7652
2248 * c-parser.c (struct c_token): Add flags field.
2249 (c_lex_one_token): Pass it to c_lex_with_flags.
2250 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
2251 into IFN_FALLTHROUGH.
2252 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
2253 attribute fallthrough after a case label or default label.
2254 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
2255
9a2300e9
MP
22562016-09-24 Marek Polacek <polacek@redhat.com>
2257
2258 PR c/77490
2259 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
2260 have boolean value. Warn about ++/-- on booleans.
2261
7de76362
JJ
22622016-09-23 Jakub Jelinek <jakub@redhat.com>
2263
2264 * c-parser.c (incomplete_record_decls): Remove unnecessary
2265 = vNULL initialization of file scope vec.
2266
5b73d2ab
MP
22672016-09-16 Marek Polacek <polacek@redhat.com>
2268
2269 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
2270
e51fbec3
MP
22712016-09-14 Marek Polacek <polacek@redhat.com>
2272
2273 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
2274 (fix_array_notation_expr): Likewise.
2275 * c-decl.c (finish_decl): Likewise.
2276 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2277 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
2278 (function_to_pointer_conversion): Use false instead of 0.
2279 (convert_lvalue_to_rvalue): Likewise.
2280 (parser_build_unary_op): Likewise.
2281 (build_atomic_assign): Likewise.
2282 (build_unary_op): Change nonconvert parameter type to bool, use
2283 true/false instead of 1/0.
2284 (build_binary_op): Use true instead of 1.
2285
254830ba
DM
22862016-09-13 David Malcolm <dmalcolm@redhat.com>
2287
2288 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
2289 of add_fixit_insert to add_fixit_insert_before.
2290
4c13ba17
MP
22912016-09-13 Marek Polacek <polacek@redhat.com>
2292
2293 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
2294 it.
2295
54dcdb88
BE
22962016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
2297
2298 PR c++/77496
2299 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
2300 COMPOUND_EXPR to warn_for_omitted_condop.
2301
e5106e27
DM
23022016-09-07 David Malcolm <dmalcolm@redhat.com>
2303
2304 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
2305 c_get_substring_location for this new langhook.
2306
9dc5773f
JJ
23072016-09-02 Jakub Jelinek <jakub@redhat.com>
2308
2309 PR c/65467
2310 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
2311 flag_openmp.
2312 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
2313 instead of mark_exp_read on low_bound/length expression.
2314 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
2315 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2316 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2317 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
2318 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
2319 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
2320 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
2321 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
2322 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
2323 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
2324 instead of mark_expr_read.
2325 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
2326 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
2327 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
2328 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
2329 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
2330 array section bases outside of depend clause, for depend clause
2331 use convert_lvalue_to_rvalue on the base.
2332 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
2333 linear, aligned, map, to and from clauses.
2334 (c_omp_clause_copy_ctor): New function.
2335
295844f6
MP
23362016-09-01 Marek Polacek <polacek@redhat.com>
2337
2338 PR c/7652
2339 * c-typeck.c (composite_type): Add FALLTHRU comment.
2340
089af25c
DM
23412016-08-31 David Malcolm <dmalcolm@redhat.com>
2342
2343 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
2344 to the insertion fixits for "struct", "union", and "enum".
2345
f9087798
DM
23462016-08-30 David Malcolm <dmalcolm@redhat.com>
2347
2348 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
2349 rather than add_fixit_misspelled_id.
2350 (undeclared_variable): Likewise.
2351 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
2352 now-redundant "here" params from add_fixit_insert method calls.
2353 (c_parser_parameter_declaration): Likewise.
2354 * c-typeck.c (build_component_ref): Remove now-redundant range
2355 param from add_fixit_replace method calls.
2356
ebef225f
MP
23572016-08-25 Marek Polacek <polacek@redhat.com>
2358
2359 * c-typeck.c (parser_build_binary_op): Pass LHS to
2360 warn_logical_not_parentheses.
2361
fe377a48
MP
23622016-08-25 Marek Polacek <polacek@redhat.com>
2363
2364 PR c/77323
2365 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
2366 or _FloatN or _FloatNx is not supported.
2367 (finish_declspecs): Set type to integer_type_node when _FloatN or
2368 _FloatNx is not supported.
2369
c65699ef
JM
23702016-08-19 Joseph Myers <joseph@codesourcery.com>
2371
2372 PR c/32187
2373 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
2374 (struct c_declspecs): Add field floatn_nx_idx.
2375 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
2376 and _FloatNx type specifiers.
2377 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
2378 (c_parser_declspecs, c_parser_attribute_any_word)
2379 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
2380 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
2381 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
2382 narrower than double.
2383
2f1364c2
JJ
23842016-08-12 Jakub Jelinek <jakub@redhat.com>
2385 Martin Liska <mliska@suse.cz>
2386
2387 PR c/67410
2388 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
2389 % to determine val element to change. Assert that
2390 wchar_bytes * charwidth fits into val array.
2391
191816a3
MP
23922016-08-12 Marek Polacek <polacek@redhat.com>
2393
2394 PR c/7652
2395 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
2396 (c_parser_postfix_expression): Likewise.
2397 * c-typeck.c (build_unary_op): Adjust fall through comment.
2398 (c_mark_addressable): Likewise.
2399
b95a64bb
JJ
24002016-08-11 Jakub Jelinek <jakub@redhat.com>
2401
2402 PR c/72816
2403 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
2404 array member through typedef, for orig_qual_indirect == 0 clear
2405 orig_qual_type.
2406
895aa8e1
DM
24072016-08-08 David Malcolm <dmalcolm@redhat.com>
2408
2409 PR c/64955
2410 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
2411 this up to selftest::run_c_tests.
2412 (selftest::run_c_tests): New function.
2413
0b212d8c
TS
24142016-08-04 Thomas Schwinge <thomas@codesourcery.com>
2415
ae9281fc
TS
2416 * c-parser.c (struct oacc_routine_data): Add error_seen and
2417 fndecl_seen members.
2418 (c_finish_oacc_routine): Use these.
2419 (c_parser_declaration_or_fndef): Adjust.
2420 (c_parser_oacc_routine): Likewise. Support more C language
2421 constructs, and improve diagnostics. Move pragma context
2422 checking...
2423 (c_parser_pragma): ... here.
2424
0b212d8c
TS
2425 * c-parser.c (struct oacc_routine_data): New.
2426 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
2427 Simplify code.
2428 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
2429 declare target" attribute.
2430
76e2c821
JB
24312016-08-01 Jan Beulich <jbeulich@suse.com>
2432
2433 * c-fold.c (c_fully_fold_internal): Also emit shift count
2434 warnings for vector types.
2435 * c-typeck.c (build_binary_op): Likewise.
2436
f618a472
MP
24372016-07-29 Marek Polacek <polacek@redhat.com>
2438
2439 PR c/71742
2440 * c-decl.c (finish_struct): Rephrase an error message.
2441
efd0786f
MP
2442 PR c/71853
2443 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
2444 to error node for invalid code.
2445
e00dceaf
MP
2446 PR c/71573
2447 * c-decl.c (implicitly_declare): Return decl early not only for
2448 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
2449
673a107a
JJ
24502016-07-29 Jakub Jelinek <jakub@redhat.com>
2451
2452 PR c/71969
2453 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
2454 on GNU extern inline functions.
2455
a5b5c8b6
MP
24562016-07-29 Marek Polacek <polacek@redhat.com>
2457
2458 PR c/71583
2459 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
2460 check expr.value.
2461
e3fe09c1
UB
24622016-07-22 Uros Bizjak <ubizjak@gmail.com>
2463
2464 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
2465
7c8f7eaa
DM
24662016-07-20 David Malcolm <dmalcolm@redhat.com>
2467
2468 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
2469 spellcheck-tree.h
2470 (best_macro_match): Likewise, converting from a typedef to a
2471 subclass.
2472 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
2473 (lookup_name_fuzzy): Update for change of best_macro_match to a
2474 subclass with a ctor that calls cpp_forall_identifiers.
2475
de6a69ee
DM
24762016-07-20 David Malcolm <dmalcolm@redhat.com>
2477
2478 * c-decl.c (implicit_decl_warning): Update for conversion of
2479 return type of lookup_name_fuzzy to const char *.
2480 (undeclared_variable): Likewise.
2481 (lookup_name_fuzzy): Convert return type from tree to
2482 const char *.
2483 * c-parser.c (c_parser_declaration_or_fndef): Update for
2484 conversion of return type of lookup_name_fuzzy to const char *.
2485 (c_parser_parameter_declaration): Likewise.
2486
b1c9c068
CP
24872016-07-15 Cesar Philippidis <cesar@codesourcery.com>
2488
2489 * c-parser.c (c_parser_oacc_declare): Don't scan for
2490 GOMP_MAP_POINTER.
2491 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
2492 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
2493 zero-length subarrays.
2494
ddbbcb19
JJ
24952016-07-15 Jakub Jelinek <jakub@redhat.com>
2496
2497 PR c/71858
2498 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
2499 instead of FUZZY_LOOKUP_NAME.
2500 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
2501 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
2502
dd36b877
JJ
25032016-07-14 Jakub Jelinek <jakub@redhat.com>
2504
2505 PR c/71858
2506 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
2507
8c681247
TS
25082016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2509
2510 * c-parser.c (c_parser_generic_selection): Make type of variable
2511 auto_vec.
2512 (c_parser_omp_declare_simd): Likewise.
2513
bf4fa671
TS
25142016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2515
2516 * c-decl.c (struct c_struct_parse_info): Change member types
2517 from vec to auto_vec.
2518 (start_struct): Adjust.
2519 (finish_struct): Likewise.
2520
557e8c49
JJ
25212016-07-02 Jakub Jelinek <jakub@redhat.com>
2522
2523 PR c/71719
2524 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
2525
54d19c3b
TS
25262016-06-29 Thomas Schwinge <thomas@codesourcery.com>
2527
2528 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
2529 Move pragma context checking into...
2530 (c_parser_omp_cancellation_point): ... here, and improve
2531 diagnostic messages.
2532 * c-typeck.c (c_finish_omp_cancel)
2533 (c_finish_omp_cancellation_point): Improve diagnostic messages.
2534
152ef731
JJ
25352016-06-29 Jakub Jelinek <jakub@redhat.com>
2536
2537 PR c/71685
2538 * c-typeck.c (c_build_qualified_type): Don't clear
2539 C_TYPE_INCOMPLETE_VARS for the main variant.
2540
25412016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
2542
2543 PR c/71552
2544 * c-typeck.c (output_init_element): Diagnose incompatible types
2545 before non-constant initializers.
2546
e9ac1f86
JJ
25472016-06-28 Jakub Jelinek <jakub@redhat.com>
2548
2549 * Make-lang.in: Don't cat ../stage_current if it does not exist.
2550
277d7ee0
AK
25512016-06-23 Andi Kleen <ak@linux.intel.com>
2552
2553 * Make-lang.in: Add support for autofdo.
2554
1a4f11c8
DM
25552016-06-22 David Malcolm <dmalcolm@redhat.com>
2556
2557 PR c/70339
2558 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
2559 (implicit_decl_warning): When issuing warnings for implicit
2560 declarations, attempt to provide a suggestion via
2561 lookup_name_fuzzy.
2562 (undeclared_variable): Likewise when issuing errors.
2563 (lookup_name_in_scope): Likewise.
2564 (struct edit_distance_traits<cpp_hashnode *>): New struct.
2565 (best_macro_match): New typedef.
2566 (find_closest_macro_cpp_cb): New function.
2567 (lookup_name_fuzzy): New function.
2568 * c-parser.c: Include gcc-rich-location.h.
2569 (c_token_starts_typename): Split out case CPP_KEYWORD into...
2570 (c_keyword_starts_typename): ...this new function.
2571 (c_parser_declaration_or_fndef): When issuing errors about
2572 missing "struct" etc, add a fixit. For other kinds of errors,
2573 attempt to provide a suggestion via lookup_name_fuzzy.
2574 (c_parser_parms_declarator): When looking ahead to detect typos in
2575 type names, also reject CPP_KEYWORD.
2576 (c_parser_parameter_declaration): When issuing errors about
2577 unknown type names, attempt to provide a suggestion via
2578 lookup_name_fuzzy.
2579 * c-tree.h (c_keyword_starts_typename): New prototype.
2580
5a578671
JM
25812016-06-20 Joseph Myers <joseph@codesourcery.com>
2582
2583 PR c/71601
2584 * c-typeck.c (build_conditional_expr): Return error_mark_node if
2585 c_common_type returns error_mark_node.
2586
3f8257db 25872016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
2588
2589 PR c/69507
2590 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
2591 __alignof__ (expression).
2592
6a3f203c
DM
25932016-06-14 David Malcolm <dmalcolm@redhat.com>
2594
2595 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
2596
264757fb
DM
25972016-06-14 David Malcolm <dmalcolm@redhat.com>
2598
2599 * c-typeck.c (build_component_ref): Simplify fixit code by
2600 using gcc_rich_location::add_fixit_misspelled_id.
2601 (set_init_label): Likewise.
2602
f7e4f2e3
DM
26032016-06-13 David Malcolm <dmalcolm@redhat.com>
2604
2605 * c-parser.c (c_parser_initelt): Provide location of name for new
2606 location_t param of set_init_label.
2607 * c-tree.h (set_init_label): Add location_t param.
2608 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
2609 param and use it when issuing error messages about unrecognized
2610 field names. Attempt to provide a fixit hint if appropriate,
2611 otherwise update the error message to provide the type name.
2612
4b1ffdb1
TS
26132016-06-10 Thomas Schwinge <thomas@codesourcery.com>
2614
2615 PR c/71381
2616 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
2617 Loosen checking.
2618
44a845ca
MS
26192016-06-08 Martin Sebor <msebor@redhat.com>
2620 Jakub Jelinek <jakub@redhat.com>
2621
2622 PR c++/70507
2623 PR c/68120
2624 * c-typeck.c (convert_arguments): Don't promote last argument
2625 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2626
92a5f2ba
MP
26272016-06-08 Marek Polacek <polacek@redhat.com>
2628
2629 PR c/71418
2630 * c-decl.c (grokdeclarator): Check TYPE_P.
2631
08203f73
MP
2632 PR c/71426
2633 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
2634 code.
2635
6ffd47b7
DM
26362016-06-07 David Malcolm <dmalcolm@redhat.com>
2637
2638 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
2639 and structure element reference, capture the location of the
2640 element name token and pass it to build_component_ref.
2641 (c_parser_postfix_expression_after_primary): Likewise for
2642 structure element dereference.
2643 (c_parser_omp_variable_list): Likewise for
2644 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
2645 * c-tree.h (build_component_ref): Add location_t param.
2646 * c-typeck.c (build_component_ref): Add location_t param
2647 COMPONENT_LOC. Use it, if available, when issuing hints about
2648 mispelled member names to provide a fixit replacement hint.
2649
1f40cff3
MP
26502016-06-06 Marek Polacek <polacek@redhat.com>
2651
2652 PR c/71362
2653 * c-parser.c (c_parser_direct_declarator): Set location.
2654
5545a907
MP
26552016-06-06 Marek Polacek <polacek@redhat.com>
2656
2657 * c-typeck.c (comptypes_internal): Handle comparisons of
2658 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
2659 TYPE_REF_CAN_ALIAS_ALL.
2660
b605f663
CLT
26612016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
2662
2663 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
2664 arguments as addressable when async clause exists.
2665
00631022
JJ
26662016-05-30 Jakub Jelinek <jakub@redhat.com>
2667
2668 PR c++/71349
2669 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
2670 when combined with target construct.
2671
7211a097
JJ
26722016-05-26 Jakub Jelinek <jakub@redhat.com>
2673
2674 * c-parser.c (c_parser_omp_clause_schedule): Warn if
2675 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
2676
95efe6b6
MP
26772016-05-25 Marek Polacek <polacek@redhat.com>
2678
2679 PR c/71265
2680 * c-decl.c (c_make_fname_decl): Don't check seen_error.
2681
a23faf7a
MP
2682 PR c/71266
2683 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
2684
e46c7770
CP
26852016-05-24 Cesar Philippidis <cesar@codesourcery.com>
2686
2687 * c-parser.c (c_parser_oacc_declare): Add support for
2688 GOMP_MAP_FIRSTPRIVATE_POINTER.
2689 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
2690 argument with enum c_omp_region_type ort.
2691 (handle_omp_array_sections): Likewise. Update call to
2692 handle_omp_array_sections_1.
2693 (c_finish_omp_clauses): Add specific errors and warning messages for
2694 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
2695 call to handle_omp_array_sections.
2696
a04e69c0
TS
26972016-05-24 Thomas Schwinge <thomas@codesourcery.com>
2698
2699 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
2700
f17a223d
RB
27012016-05-24 Richard Biener <rguenther@suse.de>
2702
2703 PR middle-end/70434
2704 PR c/69504
2705 * c-typeck.c (build_array_ref): Do not complain about indexing
2706 non-lvalue vectors. Adjust for function name change.
2707
79063edd
MS
27082016-05-20 Martin Sebor <msebor@redhat.com>
2709
2710 PR c/71115
2711 * c-typeck.c (error_init): Use
2712 expansion_point_location_if_in_system_header.
2713 (warning_init): Same.
2714
8a40fef3
DM
27152016-05-19 David Malcolm <dmalcolm@redhat.com>
2716
2717 PR c/71171
2718 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
2719 in error-handling.
2720 (c_parser_postfix_expression): Likewise.
2721 * c-tree.h (c_expr::set_error): New method.
2722 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
2723 that result's range is initialized.
2724
e9892350
JG
27252016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
2726
2727 * c-typeck.c (parser_build_unary_op): Fix formatting.
2728
8fad45f5
MW
27292016-05-16 Matthew Wahab <matthew.wahab@arm.com>
2730
2731 * c-decl.c (grokdeclarator): Remove errmsg and use of
2732 targetm.invalid_return_type.
2733 (grokparms): Remove errmsg and use of
2734 targetm.invalid_parameter_type.
2735
aa4b467b
JM
27362016-05-13 Joseph Myers <joseph@codesourcery.com>
2737
2738 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2739 function return type.
2740
4f2e1536
MP
27412016-05-12 Marek Polacek <polacek@redhat.com>
2742
2743 PR c/70756
2744 * c-decl.c (build_compound_literal): Pass LOC down to
2745 c_incomplete_type_error.
2746 * c-tree.h (require_complete_type): Adjust declaration.
2747 (c_incomplete_type_error): Likewise.
2748 * c-typeck.c (require_complete_type): Add location parameter, pass it
2749 down to c_incomplete_type_error.
2750 (c_incomplete_type_error): Add location parameter, pass it down to
2751 error_at.
2752 (build_component_ref): Pass location down to c_incomplete_type_error.
2753 (default_conversion): Pass location down to require_complete_type.
2754 (build_array_ref): Likewise.
2755 (build_function_call_vec): Likewise.
2756 (convert_arguments): Likewise.
2757 (build_unary_op): Likewise.
2758 (build_c_cast): Likewise.
2759 (build_modify_expr): Likewise.
2760 (convert_for_assignment): Likewise.
2761 (c_finish_omp_clauses): Likewise.
2762
d6e83a8d
MM
27632016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2764
2765 PR c/43651
2766 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
2767 is enabled.
2768 * c-errors.c (pedwarn_c90): Return true if warned.
2769 * c-tree.h (pedwarn_c90): Change return type to bool.
2770 (enum c_declspec_word): Add new enumerator cdw_atomic.
2771
5c3a10fb
MP
27722016-05-11 Marek Polacek <polacek@redhat.com>
2773
2774 PR c++/71024
2775 * c-decl.c (diagnose_mismatched_decls): Factor out code to
2776 diagnose_mismatched_attributes and call it.
2777
cf68d92c
MP
27782016-05-10 Marek Polacek <polacek@redhat.com>
2779
2780 PR c/70255
2781 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2782 on a declaration following the definition.
2783
351f85c5
JJ
27842016-05-05 Jakub Jelinek <jakub@redhat.com>
2785
2786 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2787 parse it through to c_parser_c99_block_statement.
2788 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2789 caller.
2790
deef7113
MP
27912016-05-04 Marek Polacek <polacek@redhat.com>
2792
2793 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2794 OPT_Wdangling_else.
2795
de55efd5
MP
27962016-05-04 Marek Polacek <polacek@redhat.com>
2797
2798 PR c/48778
2799 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2800 for macro expansions.
2801
79ce98bc
MP
28022016-05-03 Marek Polacek <polacek@redhat.com>
2803
2804 PR c/70859
2805 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
2806 check_builtin_function_arguments.
2807
fb2647aa
RB
28082016-05-03 Richard Biener <rguenther@suse.de>
2809
2810 * Make-lang.in (cc1-checksum.c): For stage-final re-use
2811 the checksum from the previous stage.
2812
77886428
CP
28132016-05-02 Cesar Philippidis <cesar@codesourcery.com>
2814
2815 * c-parser.c (c_parser_oacc_all_clauses): Update call to
2816 c_finish_omp_clauses.
2817 (c_parser_omp_all_clauses): Likewise.
2818 (c_parser_oacc_cache): Likewise.
2819 (c_parser_oacc_loop): Likewise.
2820 (omp_split_clauses): Likewise.
2821 (c_parser_omp_declare_target): Likewise.
2822 (c_parser_cilk_all_clauses): Likewise.
2823 (c_parser_cilk_for): Likewise.
2824 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
2825 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2826
7176a4a0
MP
28272016-05-02 Marek Polacek <polacek@redhat.com>
2828
2829 PR c/70851
2830 * c-decl.c (grokdeclarator): Diagnose when array's size has an
2831 incomplete type.
2832
e7ff0319
CP
28332016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2834
2835 PR middle-end/70626
2836 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
2837 OACC_LOOP_CLAUSE_MASK.
2838 (c_parser_oacc_kernels_parallel): Update call to
2839 c_oacc_split_loop_clauses.
2840
9f405ce1
AM
28412016-04-28 Andrew MacLeod <amacleod@redhat.com>
2842
2843 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
2844 argument to build_modify_expr in two cases.
2845
c1e1f433
BS
28462016-04-27 Bernd Schmidt <bschmidt@redhat.com>
2847
2848 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2849 warn_for_memset instead of warning directly here.
2850
2448a956
MP
28512016-04-26 Marek Polacek <polacek@redhat.com>
2852
2853 PR c/67784
2854 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2855 out of ...
2856 (c_parser_for_statement): ... here.
2857 (c_parser_if_statement): Use it.
2858 (c_parser_switch_statement): Use it.
2859 (c_parser_while_statement): Use it.
2860
b02a5e26
MP
2861 PR c/70791
2862 * c-decl.c (pushdecl): Pass LOCUS down to warning.
2863
477d4906
IV
28642016-04-20 Ilya Verbin <ilya.verbin@intel.com>
2865
2866 PR c++/69363
2867 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2868 instead of c_finish_cilk_clauses.
2869 * c-tree.h (c_finish_omp_clauses): Add new default argument.
2870 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
2871 floating-point variables in the linear clause for Cilk Plus.
2872
fe37c7af
MM
28732016-04-18 Michael Matz <matz@suse.de>
2874
2875 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2876 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2877
949505a9
MP
28782016-04-15 Marek Polacek <polacek@redhat.com>
2879
2880 PR c/70671
2881 * c-typeck.c (build_unary_op): Pass location down to error and
2882 warning call.
2883
dda1bf61
JJ
28842016-04-15 Jakub Jelinek <jakub@redhat.com>
2885
2886 PR c/70436
2887 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2888 where needed.
2889 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2890 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2891 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2892 Adjust c_parser_pragma callers.
2893 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
2894 caller.
2895 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2896 c_parser_statement.
2897 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2898 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2899 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2900 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2901 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2902 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2903 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2904 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2905 down where needed.
2906 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
2907 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2908 calls.
2909
99cd9857
MP
29102016-04-13 Marek Polacek <polacek@redhat.com>
2911
2912 PR c/70436
2913 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2914 adjust callers.
2915 (c_parser_statement): Likewise.
2916 (c_parser_c99_block_statement): Likewise.
2917 (c_parser_while_statement): Likewise.
2918 (c_parser_for_statement): Likewise.
2919 (c_parser_if_body): Don't set IF_P here.
2920 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
2921 about dangling else here.
2922 * c-tree.h (c_finish_if_stmt): Adjust declaration.
2923 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
2924 warn about dangling else here.
2925
f13355da
MP
29262016-04-04 Marek Polacek <polacek@redhat.com>
2927
2928 PR c/70307
2929 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2930
5fde6a45
MP
29312016-03-31 Marek Polacek <polacek@redhat.com>
2932
2933 PR c/70297
2934 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2935
4bbf545b
DM
29362016-03-18 David Malcolm <dmalcolm@redhat.com>
2937
2938 PR c/70281
2939 * c-parser.c (c_parser_postfix_expression): Set the source range
2940 for uses of "__builtin_types_compatible_p".
2941
fcc2b74f
JJ
29422016-03-17 Jakub Jelinek <jakub@redhat.com>
2943
2944 PR c/70280
2945 * c-typeck.c (composite_type): Don't count void_list_node
2946 into len, if the list is terminated by void_list_node, start
2947 with void_list_node instead of NULL for newargs. Stop
2948 at void_list_node.
2949
ab4c578f
MP
29502016-03-16 Marek Polacek <polacek@redhat.com>
2951
2952 PR c/70093
2953 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2954 nested functions returning VM types.
2955
96b3c82d
CP
29562016-03-09 Cesar Philippidis <cesar@codesourcery.com>
2957
2958 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2959 when calling c_finish_omp_clauses.
2960
29b9828f
BS
29612016-03-04 Bernd Schmidt <bschmidt@redhat.com>
2962
2963 PR c/69824
2964 * c-decl.c (get_parm_info): Don't queue implicit function declarations
2965 for later.
2966
7ff6ca38
MP
29672016-03-04 Marek Polacek <polacek@redhat.com>
2968
2969 PR c/69798
2970 * c-parser.c (c_parser_postfix_expression): Call
2971 c_parser_cast_expression rather than c_parser_postfix_expression.
2972
686e2237
JJ
29732016-03-01 Jakub Jelinek <jakub@redhat.com>
2974
2975 PR c/69796
2976 PR c/69974
2977 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2978 of incomplete decls to error_mark_node.
2979
0b05329b
MP
29802016-02-24 Marek Polacek <polacek@redhat.com>
2981
2982 PR c/69819
2983 * c-decl.c (finish_decl): Don't update the copy of the type of a
2984 different decl type.
2985
067fbd8b
JJ
29862016-02-23 Jakub Jelinek <jakub@redhat.com>
2987
2988 PR objc/69844
2989 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2990 in id_kind reclassification.
2991
bf14eba2
JJ
29922016-02-16 Jakub Jelinek <jakub@redhat.com>
2993
2994 PR c/69835
2995 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2996
ba539195
JN
29972016-02-16 James Norris <jnorris@codesourcery.com>
2998
2999 PR c/64748
3000 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
3001
16595a1f
BS
30022016-02-12 Bernd Schmidt <bschmidt@redhat.com>
3003
f48dfe98
BS
3004 * c-decl.c (build_null_declspecs): Zero the entire struct.
3005
16595a1f
BS
3006 PR c/69522
3007 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
3008 callers changed. If nested_p is true, use it to call
3009 finish_implicit_inits.
3010 * c-tree.h (finish_implicit_inits): Declare.
3011 * c-typeck.c (finish_implicit_inits): New function. Move code
3012 from ...
3013 (push_init_level): ... here.
3014 (set_designator, process_init_element): Call finish_implicit_inits.
3015
66756373
JJ
30162016-02-11 Jakub Jelinek <jakub@redhat.com>
3017
3018 PR c/69768
3019 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
3020 arguments for -Waddress warning.
3021
1066e9b5
JJ
30222016-02-04 Jakub Jelinek <jakub@redhat.com>
3023
3024 PR c/69669
3025 * c-decl.c (finish_enum): When honoring mode attribute,
3026 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
3027
3a5d2ba4
JJ
30282016-01-29 Jakub Jelinek <jakub@redhat.com>
3029
3030 PR debug/69518
3031 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
3032 all type variants, not just TYPE_MAIN_VARIANT.
3033
cbdd8ae0
JJ
30342016-01-27 Jakub Jelinek <jakub@redhat.com>
3035
3036 PR debug/66869
3037 * c-decl.c (c_write_global_declarations_1): Warn with
3038 warn_unused_function if static prototype without definition
3039 is not C_DECL_USED.
3040
fa74a4bc
MP
30412016-01-27 Marek Polacek <polacek@redhat.com>
3042
3043 PR c/68062
3044 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
3045 to unsigned, if needed. Add -Wsign-compare warning.
3046
13f92e8d
JJ
30472016-01-26 Jakub Jelinek <jakub@redhat.com>
3048
3049 PR tree-optimization/69483
3050 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
3051
cd8e73dc 30522016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
3053
3054 PR c/24293
3055 * c-tree.h (incomplete_record_decls): Declare.
3056 * c-parser.c (incomplete_record_decls): Define.
3057 (c_parser_translation_unit): Iterate through incomplete_record_decls and
3058 report error if any decl has zero size.
3059 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
3060 or enum type to incomplete_record_decls.
3061
e6d6ec9e
TV
30622016-01-14 Tom de Vries <tom@codesourcery.com>
3063
3064 PR tree-optimization/68773
3065 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
3066 set force_output.
3067
00083992
MP
30682016-01-14 Marek Polacek <polacek@redhat.com>
3069
3070 PR c/69262
3071 * c-decl.c (grokdeclarator): Provide more information for invalid
3072 array declarations.
3073
7443cf13
DM
30742016-01-06 David Malcolm <dmalcolm@redhat.com>
3075
3076 * c-parser.c (c_parser_unary_expression): For dereferences, build
3077 a combined location before calling build_indirect_ref, so that
3078 error reports cover the full range, manually updating the c_expr
3079 src_range.
3080
6b131d5b
MP
30812016-01-06 Marek Polacek <polacek@redhat.com>
3082
3083 PR sanitizer/69099
3084 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
3085 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
3086 NULL.
3087
818ab71a
JJ
30882016-01-04 Jakub Jelinek <jakub@redhat.com>
3089
3090 Update copyright years.
3091
2fe0a208
MP
30922016-01-04 Marek Polacek <polacek@redhat.com>
3093
3094 PR c/68908
3095 * c-typeck.c (build_atomic_assign): Improve commentary. Add
3096 optimization to use __atomic_fetch_* built-in if possible.
3097
c7b48c8a
TS
30982015-12-23 Thomas Schwinge <thomas@codesourcery.com>
3099
3100 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
3101 into...
3102 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
3103 all users.
3104
fda5652f
MP
31052015-12-22 Marek Polacek <polacek@redhat.com>
3106
3107 PR c/69002
3108 * c-typeck.c (build_component_ref): Warn when acessing elements of
3109 atomic structures or unions.
3110
745e411d
DM
31112015-12-21 David Malcolm <dmalcolm@redhat.com>
3112
3113 * c-typeck.c: Include "gcc-rich-location.h".
3114 (build_binary_op): In the two places that call binary_op_error,
3115 create a gcc_rich_location and populate it with the location of
3116 the binary op and its two operands.
3117
94c40e19
DM
31182015-12-16 David Malcolm <dmalcolm@redhat.com>
3119
3120 * c-parser.c (c_parser_statement_after_labels): When calling
3121 c_finish_return, Use the return expression's location if it has
3122 one, falling back to the location of the first token within it.
3123 * c-typeck.c (c_finish_return): When issuing warnings about
3124 the incorrect presence/absence of a return value, issue a note
3125 showing the declaration of the function.
3126
de67c4c3
DM
31272015-12-16 David Malcolm <dmalcolm@redhat.com>
3128
3129 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
3130 to 4.
3131 (c_parser_peek_nth_token): New function.
3132 (c_parser_peek_conflict_marker): New function.
3133 (c_parser_error): Detect conflict markers and report them as such.
3134
a10704e1
DM
31352015-12-16 David Malcolm <dmalcolm@redhat.com>
3136
3137 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
3138 to preserve range information for the primary expression
3139 in the call to c_parser_postfix_expression_after_primary.
3140
8062bca6
DM
31412015-12-16 David Malcolm <dmalcolm@redhat.com>
3142
3143 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
3144 expression location, falling back on the first token location,
3145 rather than always using the latter.
3146
d06f8b75
MP
31472015-12-16 Marek Polacek <polacek@redhat.com>
3148
3149 PR c/64637
3150 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
3151 available.
3152
2994fb91
MP
31532015-12-15 Marek Polacek <polacek@redhat.com>
3154
3155 PR c/68907
3156 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
3157 artificial decl.
3158
a1b93f8d
DM
31592015-12-08 David Malcolm <dmalcolm@redhat.com>
3160
3161 * c-parser.c (c_parser_alignof_expression): Capture location of
3162 closing parenthesis (if any), or of end of unary expression, and
3163 use it to build a src_range for the expression.
3164
46c6e1e2
DM
31652015-12-08 David Malcolm <dmalcolm@redhat.com>
3166
3167 PR c/68757
3168 * c-parser.c (c_parser_get_builtin_args): Add
3169 "out_close_paren_loc" param, and write back to it.
3170 (c_parser_postfix_expression): Capture the closing
3171 parenthesis location for RID_CHOOSE_EXPR,
3172 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
3173 RID_BUILTIN_SHUFFLE and use it to set the source range
3174 for such expressions; within RID_BUILTIN_COMPLEX set
3175 the underlying location.
3176
66189108
MP
31772015-12-07 Marek Polacek <polacek@redhat.com>
3178
3179 PR c/68668
3180 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
3181 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
3182
f187980b
EB
31832015-12-04 Eric Botcazou <ebotcazou@adacore.com>
3184
3185 * c-tree.h (c_build_va_arg): Adjust prototype.
3186 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
3187 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
3188 parameter, adjust throughout and issue an error if EXPR is a component
3189 with reverse storage order.
3190
4250754e
JM
31912015-12-02 Jason Merrill <jason@redhat.com>
3192
3193 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
3194 (c_fully_fold_internal, decl_constant_value_for_optimization):
3195 Move from c-common.c.
3196 * c-tree.h: Declare decl_constant_value_for_optimization.
3197 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
3198
e9e32ee6
JM
31992015-12-02 Joseph Myers <joseph@codesourcery.com>
3200
3201 PR c/68162
3202 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
3203 following link from declarator to next declarator. Track original
3204 qualified type and pass it to c_build_qualified_type.
3205 * c-typeck.c (c_build_qualified_type): Add arguments
3206 orig_qual_type and orig_qual_indirect.
3207
ff7a55bf
TS
32082015-12-02 Thomas Schwinge <thomas@codesourcery.com>
3209
3210 * c-parser.c (c_parser_omp_clause_name)
3211 (c_parser_oacc_all_clauses): Alphabetical sorting.
3212
657e4e47
JJ
32132015-12-02 Jakub Jelinek <jakub@redhat.com>
3214
3215 PR c/68533
3216 * c-decl.c (get_parm_info): Use b->locus instead of input_location
3217 for diagnostics.
3218
37d5ad46
JB
32192015-12-01 Julian Brown <julian@codesourcery.com>
3220 Cesar Philippidis <cesar@codesourcery.com>
3221 James Norris <James_Norris@mentor.com>
3222
3223 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
3224 (c_parser_oacc_clause_use_device): New function.
3225 (c_parser_oacc_all_clauses): Add use_device support.
3226 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
3227 (c_parser_oacc_host_data): New function.
3228 (c_parser_omp_construct): Add host_data support.
3229 * c-tree.h (c_finish_oacc_host_data): Add prototype.
3230 * c-typeck.c (c_finish_oacc_host_data): New function.
3231 (c_finish_omp_clauses): Add use_device support.
3232
a4850ce9
JH
32332015-11-29 Jan Hubicka <hubicka@ucw.cz>
3234
3235 PR c/67106
3236 * c-decl.c: Set TYPE_PACKED in variants.
3237
b58d3df2
ML
32382015-11-27 Martin Liska <mliska@suse.cz>
3239
3240 PR c++/68312
3241 * c-array-notation.c (fix_builtin_array_notation_fn):
3242 Use release_vec_vec instead of vec::release.
3243 (build_array_notation_expr): Likewise.
3244 (fix_conditional_array_notations_1): Likewise.
3245 (fix_array_notation_expr): Likewise.
3246 (fix_array_notation_call_expr): Likewise.
3247
aec17bfe
JJ
32482015-11-27 Jakub Jelinek <jakub@redhat.com>
3249
3250 PR c/63326
3251 * c-parser.c (c_parser_compound_statement_nostart): If
3252 last_label is true, use pragma_stmt instead of pragma_compound
3253 as second c_parser_pragma argument.
3254 (c_parser_omp_ordered, c_parser_omp_target_update,
3255 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
3256 false as second argument to c_parser_skip_to_pragma_eol after
3257 diagnosing standalone directives used in pragma_stmt context.
3258
688c4de0
IV
32592015-11-24 Ilya Verbin <ilya.verbin@intel.com>
3260
3261 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
3262 with "if (ENABLE_OFFLOADING)".
3263
cbd03aee
DM
32642015-11-23 David Malcolm <dmalcolm@redhat.com>
3265
3266 PR objc/68438
3267 * c-parser.c (c_parser_postfix_expression): Set up source ranges
3268 for various Objective-C constructs: Class.name syntax,
3269 @selector(), @protocol(), @encode(), and [] message syntax.
3270
a87a86e1
DM
32712015-11-20 David Malcolm <dmalcolm@redhat.com>
3272
3273 PR 62314
3274 * c-typeck.c (should_suggest_deref_p): New function.
3275 (build_component_ref): Special-case POINTER_TYPE when
3276 generating a "not a structure of union" error message, and
3277 suggest a "->" rather than a ".", providing a fix-it hint.
3278
8ece8dfb
DM
32792015-11-19 David Malcolm <dmalcolm@redhat.com>
3280
3281 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
3282 candidate into a new function, find_closest_identifier.
3283
433068cc
MP
32842015-11-19 Marek Polacek <polacek@redhat.com>
3285
3286 PR c/68412
3287 * c-typeck.c (parser_build_binary_op): Properly handle
3288 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
3289
bef08b71
DM
32902015-11-17 David Malcolm <dmalcolm@redhat.com>
3291
3292 * c-parser.c (set_c_expr_source_range): Bulletproof both
3293 overloaded implementations against NULL expr->value.
3294 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
3295 values.
3296 (c_parser_unary_expression): Likewise when handling addresses of
3297 labels.
3298 (c_parser_postfix_expression): Likewise for statement expressions,
3299 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
3300 __builtin_va_arg, and for __builtin_offset_of.
3301 (c_parser_postfix_expression_after_paren_type): Initialize expr's
3302 src_range using the range of the braced initializer.
3303 (c_parser_transaction_expression): Set src_range for "ret" to a
3304 sane pair of values.
3305
fff77217
KY
33062015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
3307
3308 * c-parser.c (c_finish_omp_declare_simd): Look for
3309 "simd" attribute as well. Update error message.
3310
1d899da2
TS
33112015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3312
3313 * c-parser.c (c_parser_omp_declare_target): Adjust.
3314
e4606348
JJ
33152015-11-14 Jakub Jelinek <jakub@redhat.com>
3316
3317 * c-typeck.c (c_finish_omp_clauses): Don't mark
3318 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
3319
3e636daf
MP
33202015-11-14 Marek Polacek <polacek@redhat.com>
3321
3322 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
3323 * c-typeck.c: Likewise.
3324
ebedc9a3
DM
33252015-11-13 David Malcolm <dmalcolm@redhat.com>
3326
3327 * c-decl.c (warn_defaults_to): Pass line_table to
3328 rich_location ctor.
3329 * c-errors.c (pedwarn_c99): Likewise.
3330 (pedwarn_c90): Likewise.
3331 * c-parser.c (set_c_expr_source_range): New functions.
3332 (c_token::get_range): New method.
3333 (c_token::get_finish): New method.
3334 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
3335 based on the range from the start of the LHS to the end of the
3336 RHS.
3337 (c_parser_conditional_expression): Likewise, based on the range
3338 from the start of the cond.value to the end of exp2.value.
3339 (c_parser_binary_expression): Call set_c_expr_source_range on
3340 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
3341 (c_parser_cast_expression): Call set_c_expr_source_range on ret
3342 based on the cast_loc through to the end of the expr.
3343 (c_parser_unary_expression): Likewise, based on the
3344 op_loc through to the end of op.
3345 (c_parser_sizeof_expression) Likewise, based on the start of the
3346 sizeof token through to either the closing paren or the end of
3347 expr.
3348 (c_parser_postfix_expression): Likewise, using the token range,
3349 or from the open paren through to the close paren for
3350 parenthesized expressions.
3351 (c_parser_postfix_expression_after_primary): Likewise, for
3352 various kinds of expression.
3353 * c-tree.h (struct c_expr): Add field "src_range".
3354 (c_expr::get_start): New method.
3355 (c_expr::get_finish): New method.
3356 (set_c_expr_source_range): New decls.
3357 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
3358 on ret for prefix unary ops.
3359 (parser_build_binary_op): Likewise, running from the start of
3360 arg1.value through to the end of arg2.value.
3361
ec8b536f
MP
33622015-11-13 Marek Polacek <polacek@redhat.com>
3363
3364 PR c/68320
3365 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
3366
277fe616
DM
33672015-11-13 David Malcolm <dmalcolm@redhat.com>
3368
3369 * c-typeck.c: Include spellcheck.h.
3370 (lookup_field_fuzzy_find_candidates): New function.
3371 (lookup_field_fuzzy): New function.
3372 (build_component_ref): If the field was not found, try using
3373 lookup_field_fuzzy and potentially offer a suggestion.
3374
6e232ba4
JN
33752015-11-12 James Norris <jnorris@codesourcery.com>
3376 Joseph Myers <joseph@codesourcery.com>
3377
3378 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
3379 (c_parser_omp_clause_name): Handle 'device_resident' clause.
3380 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3381 and PRAGMA_OMP_CLAUSE_LINK.
3382 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3383 and PRAGMA_OACC_CLAUSE_LINK.
3384 (OACC_DECLARE_CLAUSE_MASK): New definition.
3385 (c_parser_oacc_declare): New function.
3386
9be4f715
MP
33872015-11-12 Marek Polacek <polacek@redhat.com>
3388
3389 PR c/67784
3390 * c-parser.c (c_parser_for_statement): Reclassify the token in
3391 a correct scope.
3392
e78bede6
MP
33932015-11-11 Marek Polacek <polacek@redhat.com>
3394
3395 PR c/68107
3396 PR c++/68266
3397 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
3398 checking the size of an array.
3399
69f293c9
AM
34002015-11-11 Andrew MacLeod <amacleod@redhat.com>
3401
3402 * c-array-notation.c: Remove unused header files.
3403 * c-aux-info.c: Likewise.
3404 * c-convert.c: Likewise.
3405 * c-decl.c: Likewise.
3406 * c-errors.c: Likewise.
3407 * c-lang.c: Likewise.
3408 * c-objc-common.c: Likewise.
3409 * c-parser.c: Likewise.
3410 * c-typeck.c: Likewise.
3411 * gccspec.c: Likewise.
3412
3a40d81d
NS
34132015-11-09 Thomas Schwinge <thomas@codesourcery.com>
3414 Cesar Philippidis <cesar@codesourcery.com>
3415 James Norris <jnorris@codesourcery.com>
3416 Julian Brown <julian@codesourcery.com>
3417 Nathan Sidwell <nathan@codesourcery.com>
3418
3419 c/
3420 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
3421 routine arg.
3422 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
3423 (c_parser_pragma): Parse 'acc routine'.
3424 (OACC_ROUTINE_CLAUSE_MARK): Define.
3425 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
3426
fc402eec
AA
34272015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3428
3429 PR debug/67192
3430 * c-typeck.c (c_finish_loop): For unconditional loops, set the
3431 location of the backward-goto to the start of the loop body.
3432
f6b0b3db
AA
34332015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3434
3435 PR debug/67192
3436 * c-parser.c (c_parser_while_statement): Finish the loop before
3437 parsing ahead for misleading indentation.
3438 (c_parser_for_statement): Likewise.
3439
ee45a32d
EB
34402015-11-08 Eric Botcazou <ebotcazou@adacore.com>
3441
3442 * c-decl.c (finish_struct): If the structure has reverse storage
3443 order, rewrite the type of array fields with scalar component. Call
3444 maybe_apply_pragma_scalar_storage_order on entry.
3445 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
3446 errors on bit-fields and reverse SSO here and not...
3447 (c_mark_addressable): ...here.
3448 (output_init_element): Adjust call to initializer_constant_valid_p.
3449 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
3450
8a645150
DM
34512015-11-06 David Malcolm <dmalcolm@redhat.com>
3452
3453 * c-decl.c (warn_defaults_to): Update for change in signature
3454 of diagnostic_set_info.
3455 * c-errors.c (pedwarn_c99): Likewise.
3456 (pedwarn_c90): Likewise.
3457 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
3458 for textinfo::set_location.
3459
7a5e4956
CP
34602015-11-05 Cesar Philippidis <cesar@codesourcery.com>
3461 Thomas Schwinge <thomas@codesourcery.com>
3462 James Norris <jnorris@codesourcery.com>
3463
3464 * c-parser.c (c_parser_omp_clause_name): Add support for
3465 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
3466 (c_parser_omp_clause_default): Add is_oacc argument. Handle
3467 default(none) in OpenACC.
3468 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
3469 arguments.
3470 (c_parser_oacc_clause_tile): New function.
3471 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
3472 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
3473 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
3474 TILE}.
3475 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
3476 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
3477 FIRSTPRIVATE}.
3478 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
3479 (c_parser_oacc_update): Update the error message for missing clauses.
3480 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
3481 and OMP_CLAUSE_INDEPENDENT.
3482
bfcfbfa0
MP
34832015-11-05 Marek Polacek <polacek@redhat.com>
3484
3485 PR c/68090
3486 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
3487 deal with pre-evaluation on invalid types.
3488
e01d41e5
JJ
34892015-11-05 Jakub Jelinek <jakub@redhat.com>
3490 Ilya Verbin <ilya.verbin@intel.com>
3491
3492 * c-parser.c: Include context.h and gimple-expr.h.
3493 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
3494 monotonic together with nonmonotonic.
3495 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
3496 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
3497 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
3498 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
3499 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
3500 expressions on combined target teams before the target.
3501 (c_parser_omp_declare_target): If decl has "omp declare target" or
3502 "omp declare target link" attribute, and cgraph or varpool node already
3503 exists, then set corresponding flags. Call c_finish_omp_clauses
3504 in the parenthesized extended-list syntax case.
3505 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
3506 declare target.
3507 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
3508 on OMP_CLAUSE_REDUCTION array sections.
3509 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
3510 into the constant offset, or for variable low-bound using
3511 POINTER_PLUS_EXPR. For structure element based array sections use
3512 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
3513 (c_finish_omp_clauses): Drop generic_field_head, structure
3514 elements are now always mapped even as array section bases,
3515 diagnose same var in data sharing and mapping clauses. Diagnose if
3516 linear step on declare simd is neither a constant nor a uniform
3517 parameter. Look through POINTER_PLUS_EXPR for array section
3518 reductions. Diagnose the same var or function appearing multiple
3519 times on the same directive. Fix up wording for the to clause if t
3520 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
3521 modifier on kinds other than dynamic or guided or nonmonotonic
3522 modifier together with ordered clause.
3523
4bf9e5a8
TS
35242015-11-03 Thomas Schwinge <thomas@codesourcery.com>
3525 Chung-Lin Tang <cltang@codesourcery.com>
3526
3527 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
3528
2adfab87
AM
35292015-10-29 Andrew MacLeod <amacleod@redhat.com>
3530
3531 * c-array-notation.c: Reorder #include's and remove duplicates.
3532 * c-aux-info.c: Likewise.
3533 * c-convert.c: Likewise.
3534 * c-decl.c: Likewise.
3535 * c-errors.c: Likewise.
3536 * c-lang.c: Likewise.
3537 * c-objc-common.c: Likewise.
3538 * c-parser.c: Likewise.
3539 * c-typeck.c: Likewise.
3540
e922069e
JW
35412015-10-26 Jim Wilson <jim.wilson@linaro.org>
3542
3543 PR debug/66068
3544 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
3545 after calling build_qualified_type.
3546
765dd391
CP
35472015-10-27 Cesar Philippidis <cesar@codesourcery.com>
3548 Thomas Schwinge <thomas@codesourcery.com>
3549 James Norris <jnorris@codesourcery.com>
3550 Joseph Myers <joseph@codesourcery.com>
3551 Julian Brown <julian@codesourcery.com>
3552 Bernd Schmidt <bschmidt@redhat.com>
3553
3554 * c-parser.c (c_parser_oacc_shape_clause): New.
3555 (c_parser_oacc_simple_clause): New.
3556 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
3557 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
3558
88bae6f4
TS
35592015-10-27 Thomas Schwinge <thomas@codesourcery.com>
3560 James Norris <jnorris@codesourcery.com>
3561 Cesar Philippidis <cesar@codesourcery.com>
3562
3563 PR c/64765
3564 PR c/64880
3565 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
3566 parameters, and handle these. Adjust all users.
3567 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
3568 into...
3569 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
3570 all users.
3571 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
3572 declare functions.
3573 (c_finish_omp_construct): Declare function.
3574 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
3575 Merge functions into...
3576 (c_finish_omp_construct): ... this new function.
3577
a8fc2579
RB
35782015-10-22 Richard Biener <rguenther@suse.de>
3579
3580 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
3581 before folding a MINUS_EXPR.
3582
e9122ef6
MP
35832015-10-21 Marek Polacek <polacek@redhat.com>
3584
3585 PR c/68024
3586 * c-decl.c (start_function): Warn about vararg functions without
3587 a prototype.
3588
9f47c7e5
IE
35892015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
3590
3591 * c-typeck.c (build_conditional_expr): Use boolean vector
3592 type for vector comparison.
3593 (build_vec_cmp): New.
3594 (build_binary_op): Use build_vec_cmp for comparison.
3595
fa60eeb9
MP
35962015-10-20 Marek Polacek <polacek@redhat.com>
3597
3598 * c-parser.c (is_cilkplus_vector_p): Don't define here.
3599
2c7020eb
MP
36002015-10-20 Marek Polacek <polacek@redhat.com>
3601
3602 PR c/67964
3603 * c-parser.c (c_parser_attributes): Break out of the loop if the
3604 token after an attribute isn't a comma.
3605
d9a6bd32
JJ
36062015-10-13 Jakub Jelinek <jakub@redhat.com>
3607 Aldy Hernandez <aldyh@redhat.com>
3608
3609 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
3610 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
3611 (c_parser_omp_variable_list): Handle structure elements for
3612 map, to and from clauses. Handle array sections in reduction
3613 clause. Formatting fixes.
3614 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
3615 if clause modifiers.
3616 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3617 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3618 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
3619 c_parser_omp_clause_is_device_ptr): New functions.
3620 (c_parser_omp_clause_ordered): Parse optional parameter.
3621 (c_parser_omp_clause_reduction): Handle array reductions.
3622 (c_parser_omp_clause_schedule): Parse optional simd modifier.
3623 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
3624 functions.
3625 (c_parser_omp_clause_linear): Parse linear clause modifiers.
3626 (c_parser_omp_clause_depend_sink): New function.
3627 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
3628 (c_parser_omp_clause_map): Parse release/delete map kinds and
3629 optional always modifier.
3630 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
3631 and c_finish_omp_clauses callers.
3632 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
3633 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
3634 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
3635 (OMP_CRITICAL_CLAUSE_MASK): Define.
3636 (c_parser_omp_critical): Parse critical clauses.
3637 (c_parser_omp_for_loop): Handle doacross loops, adjust
3638 c_finish_omp_for and c_finish_omp_clauses callers.
3639 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
3640 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
3641 (OMP_FOR_CLAUSE_MASK): Add linear clause.
3642 (c_parser_omp_for): Disallow ordered clause when combined with
3643 distribute. Disallow linear clause when combined with distribute
3644 and not combined with simd.
3645 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
3646 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
3647 parse clauses and if depend clause is found, don't parse a body.
3648 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
3649 Allow target parallel without for after it.
3650 (OMP_TASK_CLAUSE_MASK): Add priority clause.
3651 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
3652 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
3653 invalid kinds.
3654 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
3655 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
3656 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
3657 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
3658 functions.
3659 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
3660 defaultmap and is_device_ptr clauses.
3661 (c_parser_omp_target): Parse target parallel and target simd. Set
3662 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
3663 and target exit data. Diagnose invalid map kinds.
3664 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
3665 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
3666 construct.
3667 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
3668 &omp_priv.
3669 (OMP_TASKLOOP_CLAUSE_MASK): Define.
3670 (c_parser_omp_taskloop): New function.
3671 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
3672 handle PRAGMA_OMP_TASKLOOP.
3673 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
3674 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
3675 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
3676 Add IS_OMP argument, handle structure element bases, diagnose
3677 bitfields, pass IS_OMP recursively, diagnose known zero length
3678 array sections in depend clauses, handle array sections in reduction
3679 clause, diagnose negative length even for pointers.
3680 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
3681 types, pass IS_OMP down to handle_omp_array_sections_1, handle
3682 array sections in reduction clause, set
3683 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
3684 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
3685 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
3686 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
3687
21ba0cea
MP
36882015-10-06 Marek Polacek <polacek@redhat.com>
3689
3690 * c-parser.c (c_parser_statement_after_labels): Use
3691 protected_set_expr_location.
3692 (c_parser_omp_clause_num_gangs): Likewise.
3693 (c_parser_omp_clause_num_threads): Likewise.
3694 (c_parser_omp_clause_num_workers): Likewise.
3695 (c_parser_omp_clause_vector_length): Likewise.
3696 (c_parser_omp_clause_num_teams): Likewise.
3697 (c_parser_omp_clause_thread_limit): Likewise.
3698 * c-typeck.c (build_c_cast): Likewise.
3699 (c_cast_expr): Likewise.
3700
624d31fe
RS
37012015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3702
3703 * c-typeck.c (c_tree_equal): Use real_equal instead of
3704 REAL_VALUES_EQUAL.
3705
b8fd7909
JM
37062015-10-04 Jason Merrill <jason@redhat.com>
3707
3708 * c-parser.c (c_lex_one_token): Handle @synchronized.
3709 * c-decl.c (match_builtin_function_types): A declaration of a built-in
3710 can change whether the function is transaction_safe.
3711
1c7485af
MP
37122015-10-02 Marek Polacek <polacek@redhat.com>
3713
3714 PR c/67730
3715 * c-typeck.c (convert_for_assignment): Use the expansion point
3716 location throughout.
3717
3e3b8d63
MP
37182015-10-02 Marek Polacek <polacek@redhat.com>
3719
3720 PR c/64249
3721 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
3722 and pass it down to c_parser_if_statement.
3723 (c_parser_else_body): Add CHAIN parameter and pass it down to
3724 c_parser_statement_after_labels.
3725 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
3726 duplicated if-else-if conditions.
3727
aabef2de
MP
37282015-10-01 Marek Polacek <polacek@redhat.com>
3729
3730 * c-typeck.c (convert_for_assignment): Improve commentary.
3731
de8ddd5f
MP
37322015-09-30 Marek Polacek <polacek@redhat.com>
3733
3734 PR c/67730
3735 * c-typeck.c (c_finish_return): Use the expansion point location for
3736 certain "return with value" warnings.
3737
c4914de6
MLI
37382015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3739
3740 * c-parser.c (pragma_lex): Add loc argument.
3741
0e36f5c7
MP
37422015-09-15 Marek Polacek <polacek@redhat.com>
3743
3744 PR c/67580
3745 * c-decl.c (tag_exists_p): New function.
3746 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3747 struct/union/enum keywords are missing.
3748 * c-tree.h (tag_exists_p): Declare.
3749
2f3bb934
MP
37502015-09-15 Marek Polacek <polacek@redhat.com>
3751
3752 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3753 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3754 Return NULL_TREE instead of 0.
3755 (lookup_name): Return NULL_TREE instead of 0.
3756 (lookup_name_in_scope): Likewise.
3757 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3758 (parser_xref_tag): Use false instead of 0.
3759 (start_struct): Use true instead of 1.
3760 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3761
aa256c4a
MP
37622015-09-14 Marek Polacek <polacek@redhat.com>
3763
3764 * c-typeck.c (set_nonincremental_init_from_string): Use
3765 HOST_WIDE_INT_M1U when shifting a negative value.
3766
dbb68221
MW
37672015-09-09 Mark Wielaard <mjw@redhat.com>
3768
3769 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
3770 parm against NULL.
3771
a8a098ac
JJ
37722015-09-10 Jakub Jelinek <jakub@redhat.com>
3773
3774 PR c/67502
3775 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
3776 into OMP_FOR_PRE_BODY rather than before the loop.
3777
f4b189d5
JJ
37782015-09-09 Jakub Jelinek <jakub@redhat.com>
3779
0bb99c11
JJ
3780 PR c/67501
3781 * c-parser.c (c_parser_oacc_all_clauses,
3782 c_parser_omp_all_clauses): Remove invalid clause from
3783 list of clauses even if parser->error is set.
3784
fce5e5e3
JJ
3785 PR c/67500
3786 * c-parser.c (c_parser_omp_clause_aligned,
3787 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3788 test for errors.
3789 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3790 error_mark_node.
3791
f4b189d5
JJ
3792 PR c/67495
3793 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3794 instead of c_parser_unary_expression. If the result is !lvalue_p,
3795 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3796
b2aaf235
MP
37972015-09-04 Marek Polacek <polacek@redhat.com>
3798
3799 PR sanitizer/67279
3800 * c-typeck.c (build_binary_op): Don't instrument static initializers.
3801
1807ffc1
MS
38022015-09-03 Martin Sebor <msebor@redhat.com>
3803
3804 PR c/66516
8b652e65
JJ
3805 * c-typeck.c (convert_arguments, parser_build_unary_op,
3806 build_conditional_expr, c_cast_expr, convert_for_assignment,
3807 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
3808 reject_gcc_builtin.
3809 (c_decl_implicit): Define.
3810
d04ff417
MP
38112015-09-02 Marek Polacek <polacek@redhat.com>
3812
3813 PR c/67432
3814 * c-parser.c (c_parser_enum_specifier): Give a better error for
3815 an empty enum.
3816
a79683d5
TS
38172015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3818
3819 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3820
191a6b94
MP
38212015-08-12 Marek Polacek <polacek@redhat.com>
3822
3823 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
3824 LOC to it.
3825
420a9d9b
MP
38262015-08-03 Marek Polacek <polacek@redhat.com>
3827
3828 PR c/67088
3829 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
3830 Use it.
3831 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
3832
992118a1
PP
38332015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3834
3835 * c-parser.c (c_parser_if_body): Take token_indent_info
3836 argument. Call warn_for_misleading_indentation even when the
3837 body is a semicolon. Extract token_indent_infos corresponding
3838 to the guard, body and next tokens. Adjust call to
3839 warn_for_misleading_indentation accordingly.
3840 (c_parser_else_body): Likewise.
3841 (c_parser_if_statement): Likewise.
3842 (c_parser_while_statement): Likewise.
3843 (c_parser_for_statement): Likewise.
3844
46308474
LFSM
38452015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
3846 Manuel López-Ibáñez <manu@gcc.gnu.org>
3847
3848 * c-decl.c (get_parm_info): Remove static var. Update warning
3849 message.
3850
05b28fd6
MP
38512015-07-27 Marek Polacek <polacek@redhat.com>
3852
3853 PR c++/66555
3854 PR c/54979
3855 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3856
451b5e48
MP
38572015-07-20 Marek Polacek <polacek@redhat.com>
3858
3859 PR c++/55095
3860 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3861 (build_binary_op): Warn about left shift overflows.
3862
1916bcb5
AM
38632015-07-09 Andrew MacLeod <amacleod@redhat.com>
3864
3865 * c-array-notation.c: Adjust includes for flags.h changes.
3866 * c-objc-common.c: Likewise.
3867
c7131fb2
AM
38682015-07-07 Andrew MacLeod <amacleod@redhat.com>
3869
3870 * c-array-notation.c: Adjust includes.
3871 * c-aux-info.c: Likewise.
3872 * c-convert.c: Likewise.
3873 * c-decl.c: Likewise.
3874 * c-errors.c: Likewise.
3875 * c-lang.c: Likewise.
3876 * c-objc-common.c: Likewise.
3877 * c-parser.c: Likewise.
3878 * c-typeck.c: Likewise.
3879
da2e71c9
MLI
38802015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3881
3882 PR fortran/66605
3883 * c-decl.c (finish_function): Call do_warn_unused_parameter.
3884
b155cfd9
MP
38852015-06-29 Marek Polacek <polacek@redhat.com>
3886
3887 PR c/66322
3888 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3889 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
3890 about -Wswitch-bool here.
3891 (do_case): Update c_add_case_label call.
3892 (c_finish_case): Update c_do_switch_warnings call.
3893
31521951
MP
38942015-06-27 Marek Polacek <polacek@redhat.com>
3895
3896 * c-typeck.c: Use VECTOR_TYPE_P throughout.
3897
22d03525
MP
38982015-06-26 Marek Polacek <polacek@redhat.com>
3899
3900 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3901 INDIRECT_REF_P.
3902 * c-typeck.c (array_to_pointer_conversion): Likewise.
3903 (build_unary_op): Likewise.
3904 (c_finish_return): Likewise.
3905
f0889939
AM
39062015-06-25 Andrew MacLeod <amacleod@redhat.com>
3907
3908 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3909 * c-parser.c: Likewise.
3910
8d67ee55
RS
39112015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3912
3913 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3914 instead of pointer_hash.
3915 (detect_field_duplicates): Likewise.
3916
0ae9bd27
MP
39172015-06-25 Marek Polacek <polacek@redhat.com>
3918
3919 * c-array-notation.c: Use VAR_P throughout.
3920 * c-decl.c: Likewise.
3921 * c-objc-common.c: Likewise.
3922 * c-parser.c: Likewise.
3923 * c-typeck.c: Likewise.
3924
62f9079a
MP
39252015-06-25 Marek Polacek <polacek@redhat.com>
3926
3927 * c-decl.c: Use is_global_var throughout.
3928 * c-parser.c: Likewise.
3929 * c-typeck.c: Likewise.
3930
abb226c9
AM
39312015-06-17 Andrew MacLeod <amacleod@redhat.com>
3932
3933 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3934 * c-aux-info.c: Likewise.
3935 * c-convert.c: Likewise.
3936 * c-decl.c: Likewise.
3937 * c-errors.c: Likewise.
3938 * c-lang.c: Likewise.
3939 * c-objc-common.c: Likewise.
3940 * c-parser.c: Likewise.
3941 * c-typeck.c: Likewise.
3942
8cbababc
JH
39432015-06-11 Jan Hubicka <hubicka@ucw.cz>
3944
3945 PR middle-end/66325
3946 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3947 variants.
3948
a0349665
PMR
39492015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
3950
3951 * c-decl.c (pop_scope): Register the main translation unit
3952 through the new debug hook.
3953
13fdf2e2
AM
39542015-06-08 Andrew MacLeod <amacleod@redhat.com>
3955
3956 * c-array-notation.c : Adjust include files.
3957 * c-aux-info.c : Likewise.
3958 * c-convert.c : Likewise.
3959 * c-decl.c : Likewise.
3960 * c-errors.c : Likewise.
3961 * c-lang.c : Likewise.
3962 * c-lang.h : Likewise.
3963 * c-objc-common.c : Likewise.
3964 * c-parser.c : Likewise.
3965 * c-typeck.c : Likewise.
3966
d7438551
AH
39672015-06-05 Aldy Hernandez <aldyh@redhat.com>
3968
3969 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3970 immediately clobber it.
3971 (c_write_global_declarations_1): Remove call to
3972 check_global_declaration_1.
3973 (c_write_global_declarations_2): Remove.
3974 (c_write_final_cleanups): Rename from c_write_global_declarations.
3975 Remove call to finalize_compilation_unit.
3976 Remove calls to debugging hooks.
3977 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3978 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3979 * c-tree.h: Remove c_write_global_declarations.
3980
ecb9f223
AM
39812015-06-04 Andrew MacLeod <amacleod@redhat.com>
3982
3983 * c-array-notation.c: Adjust includes for restructured coretypes.h.
3984 * c-aux-info.c: Likewise.
3985 * c-convert.c: Likewise.
3986 * c-decl.c: Likewise.
3987 * c-errors.c: Likewise.
3988 * c-lang.c: Likewise.
3989 * c-objc-common.c: Likewise.
3990 * c-parser.c: Likewise.
3991 * c-typeck.c: Likewise.
3992
9482b620
MP
39932015-06-04 Marek Polacek <polacek@redhat.com>
3994
3995 PR c/66341
3996 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3997 it is a lvalue.
3998
bc51ace3
PK
39992015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4000
4001 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
4002 Warn for empty struct.
4003 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
4004
ea5b45b6
AT
40052015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
4006
4007 * c-decl.c (start_function): Call plugin before parsing.
4008 (finish_function): Call plugin after parsing.
4009
c2d47482
PK
40102015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4011
4012 PR c/49551
4013 * c-decl.c (merge_decls): Merge DECL_COMMON.
4014
a95492ab
JW
40152015-05-22 Jim Wilson <jim.wilson@linaro.org>
4016
4017 * Make-lang.in (check_gcc_pallelize): Define.
4018
fd5c817a
MP
40192015-05-22 Marek Polacek <polacek@redhat.com>
4020
4021 PR c/47043
4022 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
4023 attributes.
4024
c7b70a3c
MP
40252015-05-21 Marek Polacek <polacek@redhat.com>
4026
4027 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
4028 DECL_BUILT_IN.
4029
21b634ae
MP
40302015-05-20 Marek Polacek <polacek@redhat.com>
4031
4032 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
4033 * c-typeck.c: Likewise.
4034
296a8c2f
MP
40352015-05-19 Marek Polacek <polacek@redhat.com>
4036
4037 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
4038
41b37d5e
JJ
40392015-05-19 Jakub Jelinek <jakub@redhat.com>
4040
4041 PR middle-end/66199
4042 * c-parser.c (c_parser_omp_for_loop): Don't add
4043 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
4044 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
4045 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
4046 constructs.
4047
fab27f52
MM
40482015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
4049
4050 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 4051 swaps.
fab27f52 4052
40de31cf
MLI
40532015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
4054
4055 PR fortran/44054
4056 * c-objc-common.c (c_tree_printer): Replace locus pointer with
4057 accessor function.
4058
3aa3c9fc
MP
40592015-05-14 Marek Polacek <polacek@redhat.com>
4060
4061 PR c/66066
4062 PR c/66127
4063 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
4064 rather than with 0.
4065
c3388e62
DM
40662015-05-12 David Malcolm <dmalcolm@redhat.com>
4067
4068 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
4069 to add a call to warn_for_misleading_indentation.
4070 (c_parser_else_body): Likewise, adding param "else_loc".
4071 (c_parser_if_statement): Check for misleading indentation.
4072 (c_parser_while_statement): Likewise.
4073 (c_parser_for_statement): Likewise.
4074
755e528f
MP
40752015-05-08 Marek Polacek <polacek@redhat.com>
4076
4077 PR c/64918
4078 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
4079 (output_init_element): Likewise.
4080
0173bd2a
MP
40812015-05-07 Marek Polacek <polacek@redhat.com>
4082
4083 PR c/65179
4084 * c-typeck.c (build_binary_op): Warn when left shifting a negative
4085 value.
4086
9babc352
MP
40872015-04-30 Marek Polacek <polacek@redhat.com>
4088
4089 * c-typeck.c (set_init_label): Call error_at instead of error and
4090 pass LOC to it.
4091
ac9f18db
MP
4092 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
4093 the type of a decl.
4094
ec3fba51
MP
4095 * c-typeck.c (c_build_va_arg): Clarify the error message.
4096
b811915d
TS
40972015-04-29 Thomas Schwinge <thomas@codesourcery.com>
4098
4099 * c-parser.c (c_parser_oacc_enter_exit_data): Use
4100 OMP_STANDALONE_CLAUSES.
4101
f3075008
MP
41022015-04-28 Marek Polacek <polacek@redhat.com>
4103
4104 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
4105
4e81b788
MP
41062015-04-28 Marek Polacek <polacek@redhat.com>
4107
4108 PR c/65901
4109 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
4110
6c1db78e
MP
41112015-04-25 Marek Polacek <polacek@redhat.com>
4112
4113 PR c/52085
4114 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
4115 attribute.
4116
5c4abbb8
MP
41172015-04-23 Marek Polacek <polacek@redhat.com>
4118
4119 PR c/65345
4120 * c-decl.c (set_labels_context_r): New function.
4121 (store_parm_decls): Call it via walk_tree_without_duplicates.
4122 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
4123 instead of create_tmp_var. Build TARGET_EXPR instead of
4124 COMPOUND_EXPR.
4125 (build_atomic_assign): Use create_tmp_var_raw instead of
4126 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
4127
06aca1d5
IV
41282015-04-20 Ilya Verbin <ilya.verbin@intel.com>
4129
4130 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
4131 (c_parser_omp_target_update): Add missed %> to error_at ().
4132
8fba1830
BRF
41332015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
4134
4135 PR target/55143
4136 * c-decl.c (c_default_pointer_mode): Remove definition.
4137 * c-tree.h (c_default_pointer_mode): Remove declaration.
4138
62021f64
TB
41392015-03-27 Tobias Burnus <burnus@net-b.de>
4140
4141 PR c/65586
4142 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
4143 error out.
4144 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
4145 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
4146 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
4147
9b65e171
JJ
41482015-03-19 Jakub Jelinek <jakub@redhat.com>
4149
4150 * c-decl.c (c_decl_attributes): Also add "omp declare target"
4151 attribute for DECL_EXTERNAL VAR_DECLs.
4152
17958621
JJ
41532015-03-11 Jakub Jelinek <jakub@redhat.com>
4154
4155 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
4156 argument.
4157
7ccb1a11
JJ
41582015-03-10 Jakub Jelinek <jakub@redhat.com>
4159
4160 PR c/65120
4161 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
4162 before preparing arguments to warn_logical_not_parentheses.
4163
01177669
JJ
41642015-03-09 Jakub Jelinek <jakub@redhat.com>
4165
4166 PR c/65120
4167 * c-typeck.c (parser_build_binary_op): Don't warn for
4168 !!x == y or !b == y where b is _Bool.
4169
802ac282
MP
41702015-03-09 Marek Polacek <polacek@redhat.com>
4171
4172 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
4173 * c-decl.c (grokdeclarator): Likewise.
4174 * c-typeck.c (build_binary_op): Likewise.
4175
e5165b60
MP
41762015-02-27 Marek Polacek <polacek@redhat.com>
4177
4178 PR c/65228
4179 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
4180
065d214c
MP
41812015-02-14 Marek Polacek <polacek@redhat.com>
4182
4183 PR c/64768
4184 * c-decl.c (grokdeclarator): Set the range of a flexible array member
4185 declared through a typedef name.
4186
e5d9235b
MP
41872015-02-13 Marek Polacek <polacek@redhat.com>
4188
4189 PR c/65050
4190 * c-decl.c (grokdeclarator): Print also the type when giving
4191 the error message about array's incomplete element type.
4192
fa01ffcc
JJ
41932015-02-11 Jakub Jelinek <jakub@redhat.com>
4194
4195 PR c/64824
4196 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
4197 check in the POP macro.
4198
c3e38a03
MP
41992015-02-09 Marek Polacek <polacek@redhat.com>
4200
4201 PR c/64856
4202 * c-typeck.c (process_init_element): Don't always wrap
4203 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
4204 initializing a range of elements.
4205
4886ec8e
JJ
42062015-02-04 Jakub Jelinek <jakub@redhat.com>
4207
4208 PR c/64824
4209 PR c/64868
4210 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
4211
c3e38a03 42122015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
4213
4214 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
4215 processing enum declaration.
4216
7b33f0c8
MP
42172015-01-29 Marek Polacek <polacek@redhat.com>
4218
4219 PR c/64709
4220 * c-typeck.c (pop_init_level): If constructor_elements has
4221 exactly one element with integer_zerop value, set constructor_zeroinit
4222 to 1. Remove braces around warning_init call.
4223
dea63e49
JJ
42242015-01-27 Jakub Jelinek <jakub@redhat.com>
4225
4226 PR c/64766
4227 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
4228 of FUNCTION_DECLs with error_mark_node.
4229
d38f7dce
JJ
42302015-01-26 Jakub Jelinek <jakub@redhat.com>
4231
4232 PR c/64778
4233 * c-typeck.c (convert_arguments): Return -1 if there are
4234 error_args, even if we've diagnosed too many arguments.
4235
cbf5d0e7
RB
42362015-01-21 Richard Biener <rguenther@suse.de>
4237
4238 PR middle-end/64313
4239 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
4240 for builtins the user declared correctly.
4241
41dbbb37
TS
42422015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4243 Bernd Schmidt <bernds@codesourcery.com>
4244 Cesar Philippidis <cesar@codesourcery.com>
4245 James Norris <jnorris@codesourcery.com>
4246 Jakub Jelinek <jakub@redhat.com>
4247 Ilmir Usmanov <i.usmanov@samsung.com>
4248
4249 * c-parser.c: Include "gomp-constants.h".
4250 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
4251 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
4252 Use OMP_CLAUSE_SET_MAP_KIND.
4253 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
4254 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
4255 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
4256 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
4257 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
4258 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
4259 "copyout", "create", "delete", "deviceptr", "gang", "host",
4260 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
4261 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
4262 "present_or_create", "pcreate", "seq", "self", "vector",
4263 "vector_length", "wait", "worker".
4264 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
4265 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
4266 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
4267 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
4268 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
4269 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
4270 (c_parser_oacc_data_clause_deviceptr)
4271 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
4272 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
4273 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
4274 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
4275 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
4276 (c_parser_oacc_parallel, c_parser_oacc_update)
4277 (c_parser_oacc_wait): New functions.
4278 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
4279 (c_finish_oacc_data): New prototypes.
4280 * c-typeck.c: Include "gomp-constants.h".
4281 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
4282 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
4283 OMP_CLAUSE_SET_MAP_KIND.
4284 (c_finish_oacc_parallel, c_finish_oacc_kernels)
4285 (c_finish_oacc_data): New functions.
4286 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
4287 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
4288 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
4289 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
4290 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
4291 GOMP_MAP_FORCE_DEVICEPTR.
4292
adfac8df
JJ
42932015-01-09 Michael Collison <michael.collison@linaro.org>
4294
4295 * c-array-notation.c: Include hash-set.h, machmode.h,
4296 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4297 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
4298 * c-aux-info.c: Ditto.
4299 * c-convert.c: Ditto.
4300 * c-decl.c: Ditto.
4301 * c-errors.c: Ditto.
4302 * c-lang.c: Dittoxs.
4303 * c-objc-common.c: Ditto.
4304 * c-parser.c: Ditto.
4305 * c-typeck.c: Include hash-set.h, machmode.h,
4306 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4307 fold-const.h, wide-int.h, inchash.h, real.h and
4308 fixed-value.h due to flattening of tree.h.
4309
2cc901dc
MP
43102015-01-07 Marek Polacek <polacek@redhat.com>
4311
4312 PR c/64417
4313 * c-typeck.c (process_init_element): Disallow initialization of
4314 a flexible array member with a string constant if the structure
4315 is in an array.
4316
5624e564
JJ
43172015-01-05 Jakub Jelinek <jakub@redhat.com>
4318
e5341100
JJ
4319 PR sanitizer/64344
4320 * c-typeck.c (convert_for_assignment, c_finish_return): For
4321 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
4322 types also set in_late_binary_op around convert call.
4323 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
4324 to integral type casts, if not in_late_binary_op, pass c_fully_fold
4325 result on expr as last argument to ubsan_instrument_float_cast,
4326 if in_late_binary_op, don't use c_save_expr but save_expr.
4327
5624e564
JJ
4328 Update copyright years.
4329
5bd012f8
MP
43302015-01-05 Marek Polacek <polacek@redhat.com>
4331
4332 PR c/64423
4333 * c-typeck.c (build_array_ref): Pass loc down to
4334 warn_array_subscript_with_type_char.
4335
3f8257db 43362014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
4337
4338 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 4339 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 4340 element type.
8e745a17 4341 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 4342 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 4343 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 4344 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 4345 to PEDWARN_FOR_QUALIFIERS.
768952be 4346
8f94a8c4
JJ
43472014-12-17 Jakub Jelinek <jakub@redhat.com>
4348
4349 PR sanitizer/64289
4350 * c-convert.c: Include ubsan.h.
4351 (convert): For real -> integral casts and
4352 -fsanitize=float-cast-overflow don't call convert_to_integer, but
4353 instead instrument the float cast directly.
4354
b731b390
JJ
43552014-11-29 Jakub Jelinek <jakub@redhat.com>
4356
4357 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
4358 c_finish_stmt_expr): Remove NULL last argument from
4359 create_tmp_var_raw and create_tmp_var calls.
4360 * c-array-notation.c (fix_builtin_array_notation_fn,
4361 build_array_notation_expr, fix_conditional_array_notations_1,
4362 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
4363
541e35a6
MP
43642014-11-28 Marek Polacek <polacek@redhat.com>
4365
4366 PR c/63862
4367 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
4368 convert the right operand to integer type.
4369
b286be94
MP
43702014-11-25 Marek Polacek <polacek@redhat.com>
4371
4372 PR c/63877
4373 * c-decl.c (start_function): Disable -Wmissing-declarations warning
4374 for inline functions.
4375
aa7da51a
JJ
43762014-11-21 Jakub Jelinek <jakub@redhat.com>
4377
4378 PR target/63764
4379 * c-typeck.c (build_array_ref): Adjust
4380 convert_vector_to_pointer_for_subscript caller. If it returns true,
4381 call non_lvalue_loc on the result.
4382
d876207f
RB
43832014-11-11 Richard Biener <rguenther@suse.de>
4384
4385 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
4386 to true.
4387
e5e44252
AK
43882014-11-10 Andi Kleen <ak@linux.intel.com>
4389
4390 PR c/60804
4391 * c-parser.c (c_parser_statement_after_labels): Call
4392 check_no_cilk.
4393 (c_parser_if_statement): Dito.
4394 (c_parser_switch_statement): Dito.
4395 (c_parser_while_statement): Dito.
4396 (c_parser_do_statement): Dito.
4397 (c_parser_for_statement): Dito.
4398 * c-typeck.c (c_finish_loop): Dito.
4399
13c21655
PC
44002014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
4401
4402 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
4403 OPT_Wshift_count_overflow in the warnings.
4404
2d51fcef
MP
44052014-10-30 Marek Polacek <polacek@redhat.com>
4406
4407 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
4408 print the stripped version as well, if they're not the same.
4409
ef4bddc2
RS
44102014-10-29 Richard Sandiford <richard.sandiford@arm.com>
4411
4412 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
4413 machine_mode.
4414
c582198b
AM
44152014-10-28 Andrew MacLeod <amacleod@redhat.com>
4416
4417 * c-decl.c: Adjust include files.
4418 * c-parser.c: Ditto.
4419
ddc8de03
PM
44202014-10-27 Phil Muldoon <pmuldoon@redhat.com>
4421 Tom Tromey <tromey@redhat.com>
4422
4423 * c-tree.h (enum c_oracle_request): New.
4424 (c_binding_oracle_function): New typedef.
4425 (c_binding_oracle, c_pushtag, c_bind): Declare.
4426 * c-decl.c (c_binding_oracle): New global.
4427 (I_SYMBOL_CHECKED): New macro.
4428 (i_symbol_binding): New function.
4429 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
4430 (I_TAG_CHECKED): New macro.
4431 (i_tag_binding): New function.
4432 (I_TAG_BINDING, I_TAG_DECL): Redefine.
4433 (I_LABEL_CHECKED): New macro.
4434 (i_label_binding): New function.
4435 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
4436 (c_print_identifier): Save and restore c_binding_oracle.
4437 (c_pushtag, c_bind): New functions.
4438
60393bbc
AM
44392014-10-27 Andrew MacLeod <amacleod@redhat.com>
4440
4441 * c-typeck.c: Adjust include files.
4442
d723bb7c
MLI
44432014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
4444
4445 PR c++/53061
4446 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
4447 initialization here...
4448 (c_initialize_diagnostics): ... but here. Set defaults after
4449 building pretty-printer.
4450
1bc5a451
MP
44512014-10-23 Marek Polacek <polacek@redhat.com>
4452
4453 PR c/63626
4454 * c-decl.c (pop_scope): Don't print warning in external_scope.
4455
4435bb92
MP
44562014-10-19 Marek Polacek <polacek@redhat.com>
4457
4458 PR c/63567
4459 * c-typeck.c (output_init_element): Allow initializing objects with
4460 static storage duration with compound literals even in C99 and add
4461 pedwarn for it.
4462
7278465e
MP
44632014-10-17 Marek Polacek <polacek@redhat.com>
4464
4465 PR c/63567
4466 * c-typeck.c (digest_init): Allow initializing objects with static
4467 storage duration with compound literals even in C99 and add pedwarn
4468 for it.
4469
d9b7be2e
MP
44702014-10-17 Marek Polacek <polacek@redhat.com>
4471
4472 PR c/63543
4473 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
4474 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
4475 error multiple times. Print the type.
4476
f406ae1f
MP
44772014-10-17 Marek Polacek <polacek@redhat.com>
4478
4479 PR c/63549
4480 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
4481 type.
4482
92574c7c
MP
44832014-10-17 Marek Polacek <polacek@redhat.com>
4484
4485 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
4486 (start_function): Use OPT_Wimplicit_int instead of 0.
4487 (store_parm_decls_oldstyle): Likewise.
4488
1bc4a978
MT
44892014-10-17 Alan Modra <amodra@gmail.com>
4490
4491 PR middle-end/61848
4492 * c-decl.c (merge_decls): Don't merge section name or tls model
4493 to newdecl symtab node, instead merge to olddecl. Override
4494 existing olddecl section name. Set tls_model for all thread-local
4495 vars, not just OMP thread-private ones. Remove incorrect comment.
4496
83685514
AM
44972014-10-16 Andrew MacLeod <amacleod@redhat.com>
4498
4499 * c-decl.c: Adjust include files.
4500
78a7c317
DD
45012014-10-14 DJ Delorie <dj@redhat.com>
4502
4503 * c-parser.c (c_parse_init): Add RID entries for each __intN.
4504 (c_token_starts_typename): Check all __intN, not just __int128.
4505 (c_token_starts_declspecs): Likewise.
4506 (c_parser_declspecs): Likewise.
4507 (c_parser_attribute_any_word): Likewise.
4508 (c_parser_objc_selector): Likewise.
4509 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
4510 (struct c_declspecs): Add int_n_idx field to record *which* __intN
4511 is specified.
4512 * c-decl.c (declspecs_add_type): Check for all __intN, not just
4513 __int128.
4514 (finish_declspecs): Likewise.
4515
74d98c1e
AB
45162014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
4517
8e745a17 4518 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 4519 the duplicate code.
8e745a17 4520 (c_parser_statement): Call the new function.
74d98c1e 4521
84937de2
MP
45222014-10-09 Marek Polacek <polacek@redhat.com>
4523
4524 PR c/63480
4525 * c-typeck.c (pop_init_level): Don't warn about initializing
4526 with { }.
4527
0382aaa0
MP
45282014-10-07 Marek Polacek <polacek@redhat.com>
4529
4530 PR c/59717
4531 * c-decl.c (header_for_builtin_fn): New function.
4532 (implicitly_declare): Suggest which header to include.
4533
7a0ca710
MP
45342014-10-07 Marek Polacek <polacek@redhat.com>
4535
4536 * c-convert.c (convert): Use error_operand_p.
4537 * c-typeck.c (require_complete_type): Likewise.
4538 (really_atomic_lvalue): Likewise.
4539 (digest_init): Likewise.
4540 (handle_omp_array_sections_1): Likewise.
4541
6bc8a126
MP
45422014-10-03 Marek Polacek <polacek@redhat.com>
4543
4544 PR c/63453
4545 * c-decl.c (pop_scope): Don't warn about "inline function declared
4546 but never defined" for functions marked with gnu_inline attribute.
4547
d90c0a59
JJ
45482014-09-25 Jakub Jelinek <jakub@redhat.com>
4549
4550 PR c++/63249
4551 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
4552 on low_bound and length.
4553
083e891e
MP
45542014-09-24 Marek Polacek <polacek@redhat.com>
4555
4556 PR c/61405
4557 PR c/53874
4558 * c-parser.c: Don't define CPP_KEYWORD.
4559 (c_parser_switch_statement): Pass original type to c_finish_case.
4560 * c-tree.h (c_finish_case): Update declaration.
4561 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
4562 conditionally to c_do_switch_warnings.
4563
8d95fe25
MP
45642014-09-03 Marek Polacek <polacek@redhat.com>
4565
4566 PR c/62024
4567 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
4568 conversions.
4569
9a771876
JJ
45702014-09-02 Jakub Jelinek <jakub@redhat.com>
4571 Balaji V. Iyer <balaji.v.iyer@intel.com>
4572 Igor Zamyatin <igor.zamyatin@intel.com>
4573
4574 * c-parser.c (c_parser_cilk_for): New function.
4575 (c_parser_cilk_grainsize): Likewise.
4576 (c_get_temp_regvar): Likewise.
4577 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
4578 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
4579 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
4580 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
4581 case.
4582
b7679d96
CG
45832014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
4584
4585 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
4586 with using HOST_WIDE_INT without truncation to 'int'
4587
59ea0364
MP
45882014-08-22 Marek Polacek <polacek@redhat.com>
4589
4590 PR c++/62199
4591 * c-typeck.c (parser_build_binary_op): Adjust call to
4592 warn_logical_not_parentheses.
4593
671a475e
IZ
45942014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
4595
4596 PR other/62008
4597 * c-parser.c (c_parser_array_notation): Check for correct
4598 type of an array added.
4599
04159acf
MP
46002014-08-19 Marek Polacek <polacek@redhat.com>
4601
4602 PR c++/62153
4603 * c-typeck.c (build_binary_op): If either operand of a comparison
4604 is a boolean expression, call maybe_warn_bool_compare.
4605
c77935ee
PP
46062014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
4607
4608 PR c/45584
4609 * c-typeck.c (build_c_cast): Do a conversion even when the
4610 TYPE_MAIN_VARIANTs are the same.
4611
35aff4fb
MP
46122014-08-19 Marek Polacek <polacek@redhat.com>
4613
4614 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
4615 pedwarn_c99 instead of pedwarn.
4616 (grokfield): Likewise.
4617 (warn_defaults_to): New function.
4618 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
4619 Unconditionally call pedwarn_c99 instead of pedwarn.
4620 (start_function): Call warn_defaults_to instead of pedwarn_c99.
4621 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
4622 check flag_isoc11 before.
4623 * c-errors.c (pedwarn_c99): Change the return type to bool.
4624 Handle -Wc99-c11-compat.
4625 * c-parser.c (disable_extension_diagnostics): Handle
4626 warn_c99_c11_compat.
4627 (restore_extension_diagnostics): Likewise.
4628 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
4629 instead of pedwarn, don't check flag_isoc11 before.
4630 (c_parser_declspecs): Likewise.
4631 (c_parser_alignas_specifier): Likewise.
4632 (c_parser_alignof_expression): Likewise.
4633 (c_parser_generic_selection): Likewise.
4634 * c-tree.h (pedwarn_c99): Update declaration.
4635 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
4636 of pedwarn_c99.
4637
177cce46
MP
46382014-08-19 Marek Polacek <polacek@redhat.com>
4639
4640 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
4641 to pedwarn_c90.
4642 * c-errors.c: Include "opts.h".
4643 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
4644 * c-parser.c (disable_extension_diagnostics): Handle negative value
4645 of warn_c90_c99_compat, too.
4646 (restore_extension_diagnostics): Likewise.
4647 (c_parser_compound_statement_nostart): Pass
4648 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
4649
6dc99c33
MP
46502014-08-12 Marek Polacek <polacek@redhat.com>
4651
4652 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
4653 Add pedwarn.
4654 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
4655 Likewise.
4656 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
4657
3f8257db 46582014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
4659
4660 PR c/51849
4661 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
4662 Call pedwarn_c90 instead of pedwarn.
4663 (check_bitfield_type_and_width): Likewise.
4664 (declspecs_add_qual): Likewise.
4665 (declspecs_add_type): Likewise.
4666 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
4667 Adjust to only call pedwarn_c90.
4668 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
4669 pedwarn_c90 instead of pedwarn.
4670 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
4671 * c-parser.c (disable_extension_diagnostics): Handle
4672 warn_c90_c99_compat.
4673 (restore_extension_diagnostics): Likewise.
4674 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
4675 pedwarn_c90 instead of pedwarn.
4676 (c_parser_initelt): Likewise.
4677 (c_parser_postfix_expression): Likewise.
4678 (c_parser_postfix_expression_after_paren_type): Likewise.
4679 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
4680 * c-tree.h: Fix formatting.
4681 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
4682 pedwarn_c90 instead of pedwarn.
4683
9f25a338
TS
46842014-08-07 Trevor Saunders <tsaunders@mozilla.com>
4685
4686 * c-typeck.c: Remove include of pointer-set.h.
4687
044331a8
MP
46882014-08-07 Marek Polacek <polacek@redhat.com>
4689
4690 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
4691
b787e7a2
TS
46922014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4693
4694 * c-typeck.c: Use hash_map instead of pointer_map.
4695
6e2830c3
TS
46962014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4697
4698 * c-decl.c: Use hash_set instead of pointer_set.
4699
a7ee52fb
IZ
47002014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
4701
4702 PR middle-end/61455
4703 * c-array-notation.c (expand_array_notations): Handling
4704 of DECL_EXPR added.
4705
b4dfdc11
MG
47062014-07-31 Marc Glisse <marc.glisse@inria.fr>
4707
4708 PR c++/60517
4709 * c-typeck.c (c_finish_return): Return 0 instead of the address of
4710 a local variable.
4711
976d5a22
TT
47122014-07-30 Tom Tromey <tromey@redhat.com>
4713
4714 * c-typeck.c (struct constructor_stack) <designator_depth>: New
4715 field.
4716 (really_start_incremental_init, push_init_level): Initialize
4717 designator_depth.
4718 (pop_init_level): Set global designator_depth.
4719 (process_init_element): Check for designated_init attribute.
4720
30281de2
MP
47212014-07-20 Marek Polacek <polacek@redhat.com>
4722
4723 PR c/61852
4724 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
4725 (implicitly_declare): Pass location to implicit_decl_warning.
4726
b108f48f
JJ
47272014-07-14 Jakub Jelinek <jakub@redhat.com>
4728
4729 PR middle-end/61294
4730 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
4731 If non-NULL, call c_parser_check_literal_zero.
4732 (c_parser_check_literal_zero): New function.
4733 (c_parser_postfix_expression_after_primary): Adjust
4734 c_parser_expr_list caller, handle -Wmemset-transposed-args.
4735
773ec47f
MP
47362014-07-06 Marek Polacek <polacek@redhat.com>
4737
4738 PR c/6940
4739 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4740 * c-tree.h (C_ARRAY_PARAMETER): Define.
4741 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4742 function parameter.
4743
22e1cf1c 47442014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 4745 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
4746
4747 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4748 releasing symbol.
4749
52ec0ea3
MP
47502014-07-01 Marek Polacek <polacek@redhat.com>
4751
4752 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4753 instead of 0 to WARN_FOR_ASSIGNMENT.
4754
d5c3d343
MP
47552014-07-01 Marek Polacek <polacek@redhat.com>
4756
4757 PR c/58286
4758 * c-typeck.c (convert_for_assignment): Pass
4759 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4760
6a7253a4
MP
47612014-06-30 Marek Polacek <polacek@redhat.com>
4762
4763 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4764 has no_sanitize_undefined attribute.
4765
5e88a8f4
IZ
47662014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
4767
4768 PR middle-end/57541
4769 * c-array-notation.c (fix_builtin_array_notation_fn):
4770 Check for 0 arguments in builtin call. Check that bultin argument is
4771 correct.
4772 * c-parser.c (c_parser_array_notation): Check for incorrect initial
4773 index.
4774
9698b078
SH
47752014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
4776
4777 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
4778 qualifiers in __auto_type for atomic types.
4779 (c_parser_typeof_specifier): Discard all type qualifiers in
4780 __typeof__ for atomic types.
4781
6e07c515
MP
47822014-06-25 Marek Polacek <polacek@redhat.com>
4783
4784 PR c/61162
4785 * c-parser.c (c_parser_statement_after_labels): Pass the location of
4786 the return expression to c_finish_return.
4787
da6f124d
JJ
47882014-06-25 Jakub Jelinek <jakub@redhat.com>
4789
4790 * c-typeck.c (c_finish_omp_clauses): Make sure
4791 OMP_CLAUSE_LINEAR_STEP has correct type.
4792
c203e8a7
TS
47932014-06-24 Trevor Saunders <tsaunders@mozilla.com>
4794
4795 * c-decl.c: Adjust.
4796
56ad0e38
JJ
47972014-06-24 Jakub Jelinek <jakub@redhat.com>
4798
4799 * c-parser.c (c_parser_omp_for_loop): For
4800 #pragma omp parallel for simd move lastprivate clause from parallel
4801 to for rather than simd.
4802
47c2554f
MP
48032014-06-23 Marek Polacek <polacek@redhat.com>
4804
4805 * c-typeck.c (parser_build_binary_op): Don't call
4806 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
4807
56363ffd
JH
48082014-06-15 Jan Hubicka <hubicka@ucw.cz>
4809
4810 * c-parser.c (c_parser_omp_threadprivate): Likewise.
4811 * c-decl.c (merge_decls): Likewise.
4812
d7ff7ae5
MP
48132014-06-09 Marek Polacek <polacek@redhat.com>
4814
4815 PR c/36446
4816 * c-typeck.c (error_init): Call inform instead of error_at.
4817 (pedwarn_init): Call inform instead of pedwarn.
4818 (warning_init): Call inform instead of warning_at.
4819
24d047a3
JH
48202014-06-07 Jan Hubicka <hubicka@ucw.cz>
4821
4822 * c-decl.c (merge_decls): Use set_decl_section_name.
4823 (duplicate_decls): Remove node if it exists.
4824
9bac5cbb
G
48252014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
4826
4827 PR c/53119
4828 * c-typeck.c (push_init_level, process_init_element,
4829 pop_init_level): Correct check for zero initialization, move
4830 missing brace warning to respect zero initialization.
4831
8ffcdea8
MP
48322014-06-05 Marek Polacek <polacek@redhat.com>
4833
4834 PR c/56724
4835 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
4836
742938c9
MP
48372014-06-05 Marek Polacek <polacek@redhat.com>
4838
4839 PR c/49706
4840 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
4841 on the left hand side operand of a comparison.
4842
6447c55d
MP
48432014-06-05 Marek Polacek <polacek@redhat.com>
4844
4845 PR c/48062
4846 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
4847 Print note only if the warning was printed.
4848
9dc7743c
IZ
48492014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
4850
4851 PR c/58942
4852 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4853 with a pointer.
4854
fedfecef
MP
48552014-06-03 Marek Polacek <polacek@redhat.com>
4856
4857 PR c/60439
4858 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4859 c_start_case.
4860 * c-tree.h (c_start_case): Update.
4861 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
4862 switch condition has boolean value.
4863
9b2b7279
AM
48642014-06-02 Andrew MacLeod <amacleod@redhat.com>
4865
4866 * c-decl.c: Include builtins.h.
4867 * c-parser.c: Likewise.
4868
5c1bc275
MP
48692014-05-27 Marek Polacek <polacek@redhat.com>
4870
4871 PR c/56724
4872 * c-typeck.c (convert_arguments): Get location of a parameter. Change
4873 error and warning calls to error_at and warning_at. Pass location of
4874 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
4875 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4876 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
4877
97563bc8
IZ
48782014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
4879
4880 PR c/61191
4881 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4882 function parameters.
4883
aede2c10
JH
48842014-05-23 Jan Hubicka <hubicka@ucw.cz>
4885
4886 * c-decl.c (merge_decls): Preserve symtab node pointers.
4887 (duplicate_decls): Free new decl.
4888
edbba2ce
TS
48892014-05-23 Thomas Schwinge <thomas@codesourcery.com>
4890
f3316c6d
TS
4891 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4892 initialization.
4893
edbba2ce
TS
4894 * c-parser.c (c_parser_omp_target): Return bool values.
4895
68c81f24
TS
48962014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4897
4898 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4899 num_teams_loc variable to num_thread_limit_loc.
4900
632f2871
RS
49012014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4902
4903 * c-array-notation.c (expand_array_notations): Use void_node
4904 instead of void_zero_node.
4905
766090c2
TS
49062014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4907
4908 * c-decl.c (finish_struct): Adjust.
4909 (finish_enum): Likewise.
4910 (bind): Adjust.
4911 (record_inline_static): Likewise.
4912 (push_scope): Likewise.
4913 (make_label): Likewise.
4914 (lookup_label_for_goto): Likewise.
4915 (finish_struct): Likewise.
4916 (finish_enum): Likewise.
4917 (store_parm_decls): Likewise.
4918 (c_push_function_context): Likewise.
4919 * c-lang.h: Remove usage of variable_size gty attribute.
4920 * c-parser.c (c_parse_init): Adjust.
4921 (c_parse_file): Likewise.
4922
2b107f6b
MP
49232014-05-13 Marek Polacek <polacek@redhat.com>
4924
4925 PR c/61162
4926 * c-typeck.c (convert_for_assignment): Pass location to
4927 WARN_FOR_ASSIGNMENT instead of input_location.
4928
d033409e
MP
49292014-05-10 Marek Polacek <polacek@redhat.com>
4930
4931 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4932 maybe_warn_string_init.
4933 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4934 maybe_warn_string_init.
4935 * c-tree.h (maybe_warn_string_init): Update declaration.
4936 * c-typeck.c (maybe_warn_string_init): Add location parameter.
4937 Call pedwarn_init with loc instead of with input_location.
4938 (digest_init): Pass init_loc to maybe_warn_string_init.
4939 (pop_init_level): Call pedwarn_init with loc instead of with
4940 input_location.
4941 (set_init_index): Likewise.
4942 (process_init_element): Likewise.
4943
ea58ef42
MP
49442014-05-09 Marek Polacek <polacek@redhat.com>
4945
4946 PR c/61096
4947 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4948 (c_parser_initelt): Pass location to set_init_label. Pass array index
4949 location to set_init_index.
4950 * c-tree.h (push_init_level): Update declaration.
4951 (pop_init_level): Likewise.
4952 (set_init_index): Likewise.
4953 (set_init_label): Likewise.
4954 * c-typeck.c (error_init): Add location parameter. Call error_at
4955 instead of error.
4956 (digest_init): Pass init_loc to error_init.
4957 (really_start_incremental_init):
4958 (push_init_level): Add location parameter. Pass loc to pop_init_level
4959 and error_init.
4960 (pop_init_level): Likewise.
4961 (set_designator): Add location parameter. Pass loc to pop_init_level,
4962 push_init_level, and error_init.
4963 (set_init_index): Add location parameter. Pass loc to error_init and
4964 set_designator.
4965 (set_init_label): Likewise.
4966 (output_init_element): Pass loc to error_init.
4967 (process_init_element): Pass loc to error_init, pop_init_level,
4968 pedwarn_init, and push_init_level.
4969
661a0813
MP
49702014-05-09 Marek Polacek <polacek@redhat.com>
4971
4972 PR c/50459
4973 * c-parser.c (c_parser_attributes): Parse the arguments as an
4974 expression-list if the attribute takes identifier.
4975
2793eeab
MP
49762014-05-08 Marek Polacek <polacek@redhat.com>
4977
4978 PR c/61053
4979 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4980 TYPE_ALIGN_UNIT.
4981
f827930a
MP
49822014-05-08 Marek Polacek <polacek@redhat.com>
4983
4984 PR c/61077
4985 * c-decl.c (start_function): Warn for _Atomic-qualified return type
4986 of main.
4987
1d60af08
KZ
49882014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4989 Mike Stump <mikestump@comcast.net>
4990 Richard Sandiford <rdsandiford@googlemail.com>
4991
4992 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4993 (finish_enum): Use wide-int interfaces.
4994 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4995 * c-typeck.c (build_c_cast): Likewise.
4996 (set_nonincremental_init_from_string): Likewise.
4997 (c_tree_equal): Likewise.
4998
a0e24419
MP
49992014-05-02 Marek Polacek <polacek@redhat.com>
5000
5001 PR c/25801
5002 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
5003 Return size_one_node when the type is not complete.
5004 (pointer_diff): Remove comment.
5005 (build_unary_op): Improve error messages.
5006
19fc9faa
MP
50072014-05-02 Marek Polacek <polacek@redhat.com>
5008
5009 * c-typeck.c (c_finish_return): Separate warning_at calls.
5010
63bc4e87
MP
50112014-05-02 Marek Polacek <polacek@redhat.com>
5012
5013 * c-tree.h (error_init): Remove declaration.
5014 (pedwarn_init): Likewise.
5015 * c-typeck.c (error_init): Make static and move above.
5016 (pedwarn_init): Likewise.
5017 (warning_init): Move above.
5018 (maybe_warn_string_init): Likewise.
5019
4bd2511b
JL
50202014-05-01 Jeff Law <law@redhat.com>
5021
5022 Revert:
5023
5024 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5025 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
5026 avoid goto.
5027
6a358dcb
MP
50282014-05-02 Marek Polacek <polacek@redhat.com>
5029
5030 PR c/60784
5031 * c-typeck.c (push_init_level): Set constructor_designated to
5032 p->designated for structures.
5033
ae5ebda4
MP
50342014-05-01 Marek Polacek <polacek@redhat.com>
5035
5036 PR c/60915
5037 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
5038 function-definition has an attribute after the declarator.
5039
96b40f8d
MP
50402014-05-01 Marek Polacek <polacek@redhat.com>
5041
5042 PR c/60257
5043 * c-typeck.c (warning_init): Add location_t parameter. Call
5044 warning_at instead of warning.
5045 (push_init_level): Pass input_location to warning_init.
5046 (add_pending_init): Add location_t parameter. Pass loc to
5047 warning_init.
5048 (set_nonincremental_init): Pass input_location to add_pending_init.
5049 (set_nonincremental_init_from_string): Likewise.
5050 (output_init_element): Pass loc to warning_init and to
5051 add_pending_init.
5052
32e00768
MP
50532014-05-01 Marek Polacek <polacek@redhat.com>
5054
5055 PR c/43395
5056 * c-typeck.c (c_finish_return): Distinguish between label and variable
5057 when warning about returning local address.
5058
c9379ce2
MP
50592014-05-01 Marek Polacek <polacek@redhat.com>
5060
5061 PR c/29467
5062 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
5063 in C89 mode.
5064
d00887e8
MP
50652014-05-01 Marek Polacek <polacek@redhat.com>
5066
5067 PR c/43245
5068 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
5069 instead of 0 to WARN_FOR_QUALIFIERS.
5070
5436fa2e
MP
50712014-05-01 Marek Polacek <polacek@redhat.com>
5072
5073 PR c/56989
5074 * c-typeck.c (default_conversion): Use better location for
5075 error call.
5076
f8ed5150
MP
50772014-04-30 Marek Polacek <polacek@redhat.com>
5078
5079 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
5080 also when SANITIZE_FLOAT_DIVIDE is on.
5081
8337d1db
MP
50822014-04-30 Marek Polacek <polacek@redhat.com>
5083
5084 PR c/60139
5085 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
5086 and pedwarn_init. Use loc insted of input_location.
5087
c4bdc42f
MP
50882014-04-30 Marek Polacek <polacek@redhat.com>
5089
5090 PR c/60351
5091 * c-typeck.c (build_binary_op): Use location when warning about
5092 shift count.
5093
45484dcf
MP
50942014-04-25 Marek Polacek <polacek@redhat.com>
5095
5096 PR c/18079
5097 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
5098 always_inline/noinline and hot/cold attributes.
5099
34cf811f
MP
51002014-04-25 Marek Polacek <polacek@redhat.com>
5101
5102 PR c/60114
5103 * c-parser.c (c_parser_initelt): Pass input_location to
5104 process_init_element.
5105 (c_parser_initval): Pass loc to process_init_element.
5106 * c-tree.h (process_init_element): Adjust declaration.
5107 * c-typeck.c (push_init_level): Pass input_location to
5108 process_init_element.
5109 (pop_init_level): Likewise.
5110 (set_designator): Likewise.
5111 (output_init_element): Add location_t parameter. Pass loc to
5112 digest_init.
5113 (output_pending_init_elements): Pass input_location to
5114 output_init_element.
5115 (process_init_element): Add location_t parameter. Pass loc to
5116 output_init_element.
5117
42056eac
JJ
51182014-04-24 Jakub Jelinek <jakub@redhat.com>
5119
5120 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
5121 atomic-clause, allow comma in between atomic-clause and
5122 seq_cst.
5123
e162a134
JJ
51242014-04-22 Jakub Jelinek <jakub@redhat.com>
5125
5126 PR c/59073
5127 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
5128 fails, don't set OM_PARALLEL_COMBINED and return NULL.
5129
2f6babac
IZ
51302014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
5131
5132 PR middle-end/60469
5133 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5134 create_tmp_var instead build_decl for creating temps.
5135 (build_array_notation_expr): Likewise.
5136 (fix_conditional_array_notations_1): Likewise.
5137 (fix_array_notation_expr): Likewise.
5138 (fix_array_notation_call_expr): Likewise.
5139
8edbfaa6
JJ
51402014-03-28 Jakub Jelinek <jakub@redhat.com>
5141
5142 PR c++/60689
5143 * c-tree.h (c_build_function_call_vec): New prototype.
5144 * c-typeck.c (build_function_call_vec): Don't call
5145 resolve_overloaded_builtin here.
5146 (c_build_function_call_vec): New wrapper function around
5147 build_function_call_vec. Call resolve_overloaded_builtin here.
5148 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
5149 Call c_build_function_call_vec instead of build_function_call_vec.
5150 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
5151 * c-decl.c (finish_decl): Likewise.
5152
7485aeea
MLI
51532014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5154
5155 PR c/55383
5156 * c-typeck.c: Use correct format string in cast-qual warning
5157
b17a8b07
TS
51582014-03-07 Thomas Schwinge <thomas@codesourcery.com>
5159
5160 * c-decl.c (c_decl_attributes): Use
5161 lang_hooks.types.omp_mappable_type.
5162 * c-typeck.c (c_finish_omp_clauses): Likewise.
5163
3af9c5e9
MP
51642014-03-06 Marek Polacek <polacek@redhat.com>
5165
5166 PR c/60197
5167 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
5168 of checking tree code.
5169
1c9f5f33
PK
51702014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5171
5172 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
5173 (c_parser_parameter_declaration): Likewise.
5174
cc28fc7f
MP
51752014-02-19 Marek Polacek <polacek@redhat.com>
5176
5177 PR c/60195
5178 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
5179 Call mark_exp_read on exp.value.
5180 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
5181 TREE_ADDRESSABLE on old instead of val.
5182 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
5183
b581c05c
PK
51842014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5185
5186 * c-parser.c (c_parser_get_builtin_args): Replace calls to
5187 C_EXPR_APPEND by vec_safe_push.
5188 * c-tree.h (C_EXPR_APPEND): Remove.
5189
81e5eca8
MP
51902014-01-31 Marek Polacek <polacek@redhat.com>
5191
5192 PR c/59963
5193 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
5194 build_function_call_vec.
5195 (build_function_call): Likewise.
5196 (build_atomic_assign): Likewise.
5197 (build_function_call_vec): Add arg_loc parameter. Use it.
5198 (convert_arguments): Likewise.
5199 (convert_for_assignment): Rename rhs_loc to expr_loc.
5200 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
5201 (c_parser_objc_keywordexpr): Likewise.
5202 (c_parser_postfix_expression_after_primary): Call
5203 build_function_call_vec with expr_loc rather than op_loc.
5204 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
5205 build_function_call_vec.
5206 (c_parser_expr_list): Add locations parameter. Fill it with locations
5207 of function arguments.
5208 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
5209
68fca595
MP
52102014-01-30 Marek Polacek <polacek@redhat.com>
5211
5212 PR c/59940
5213 * c-typeck.c (build_function_call_vec): Use loc parameter.
5214 (convert_arguments): Add location parameter. Use it.
5215 (ep_convert_and_check): Likewise.
5216 (build_atomic_assign): Adjust convert_for_assignment call.
5217 (build_modify_expr): Likewise.
5218 (digest_init): Likewise.
5219 (c_finish_return): Likewise.
5220 (build_conditional_expr): Adjust ep_convert_and_check calls.
5221 (convert_for_assignment): Add rhs_loc parameter. Use it.
5222 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
5223 calls.
5224
fa337f3a
RB
52252014-01-30 Richard Biener <rguenther@suse.de>
5226
5227 PR c/59905
5228 * c-typeck.c (build_function_call_vec): Do not replace calls
5229 to a function via an incompatible type with a runtime abort.
5230
b72271b9
BI
52312014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
5232
5233 * c-parser.c (c_parser_declaration_or_fndef): Replaced
5234 flag_enable_cilkplus with flag_cilkplus.
5235 (c_parser_direct_declarator_inner): Likewise.
5236 (c_parser_attribute_any_word): Likewise.
5237 (c_parser_attributes): Likewise.
5238 (c_parser_compound_statement): Likewise.
5239 (c_parser_statement_after_labels): Likewise.
5240 (c_parser_if_statement): Likewise.
5241 (c_parser_switch_statement): Likewise.
5242 (c_parser_do_statement): Likewise.
5243 (c_parser_for_statement): Likewise.
5244 (c_parser_unary_expression): Likewise.
5245 (c_parser_postfix_expression): Likewise.
5246 (c_parser_postfix_expression_after_primary): Likewise.
5247 (c_parser_postfix_expression_after_primary): Likewise.
5248 (c_parser_omp_clause_name): Likewise.
5249 (c_finish_omp_declare_simd): Likewise.
5250 (c_parser_cilk_verify_simd): Likewise.
5251 * c-typeck.c (build_array_ref): Likewise.
5252 (build_function_call_vec): Likewise.
5253 (convert_arguments): Likewise.
5254 (build_compound_expr): Likewise.
5255 (c_finish_return): Likewise.
5256 (c_finish_if_stmt): Likewise.
5257 (c_finish_loop): Likewise.
5258 (build_binary_op): Likewise.
5259
393e8e8b
MP
52602014-01-23 Marek Polacek <polacek@redhat.com>
5261
5262 PR c/59846
5263 * c-typeck.c (parser_build_binary_op): Use location instead of
5264 input_location.
5265 (build_binary_op): Pass location to shorten_compare.
5266
f04dda30
MP
52672014-01-23 Marek Polacek <polacek@redhat.com>
5268
5269 PR c/58346
5270 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
5271 an empty aggregate.
5272
789eadcd
MP
52732014-01-23 Marek Polacek <polacek@redhat.com>
5274
5275 PR c/59871
5276 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
5277 of a comma expression.
5278 (emit_side_effect_warnings): Likewise.
5279
40f14e9f
BI
52802014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5281
5282 PR c/59825
5283 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
5284 function to use walk_tree and moved a lot of its functionality to
5285 expand_array_notations.
5286 (expand_array_notations): New function.
5287
74558dd9
BI
52882014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5289
5290 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
5291 attribute an attribute without value.
5292
652fea39
JJ
52932014-01-23 Jakub Jelinek <jakub@redhat.com>
5294
5295 PR middle-end/58809
5296 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
5297 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
5298
f34f1c87
MP
52992014-01-22 Marek Polacek <polacek@redhat.com>
5300
5301 PR c/59891
5302 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
5303 of remove_c_maybe_const_expr on op1 and op2.
5304
241f845a
JJ
53052014-01-15 Jakub Jelinek <jakub@redhat.com>
5306
5307 PR c/58943
5308 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
5309 effects, preevaluate rhs using SAVE_EXPR first.
5310
9a74f20c
BI
53112014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
5312
5313 PR c++/59631
5314 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
5315 statements with if-elseif statements.
5316
96066ce1
MP
53172014-01-06 Marek Polacek <polacek@redhat.com>
5318
5319 PR c/57773
5320 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
5321 defined bit-field types only in ISO C.
5322
23a5b65a
RS
53232014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5324
5325 Update copyright years
5326
f9030485
RS
53272014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5328
5329 * c-array-notation.c: Use the standard form for the copyright notice.
5330
41958c28
BI
53312013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
5332
5333 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
5334 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
5335 field in parser is not empty. If not-empty, call the function
5336 c_parser_finish_omp_declare_simd.
5337 (c_parser_cilk_clause_vectorlength): Modified function to be shared
5338 between SIMD-enabled functions and #pragma simd. Added new parameter.
5339 (c_parser_cilk_all_clauses): Modified the usage of the function
5340 c_parser_cilk_clause_vectorlength as mentioned above.
5341 (c_parser_cilk_simd_fn_vector_attrs): New function.
5342 (c_finish_cilk_simd_fn_tokens): Likewise.
5343 (is_cilkplus_vector_p): Likewise.
5344 (c_parser_omp_clause_name): Added checking for "vectorlength,"
5345 "nomask," and "mask" strings in clause name.
5346 (c_parser_omp_all_clauses): Added 3 new case statements:
5347 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
5348 PRAGMA_CILK_CLAUSE_NOMASK.
5349 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
5350 check for vector attribute and if so call the function
5351 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
5352 called the function c_finish_cilk_simd_fn_tokens.
5353 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
5354 parser field is non-empty. If so, parse them as you would parse
5355 the omp declare simd pragma.
5356 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
5357 Added a check when step is a parameter and flag it as error.
5358 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
5359 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
5360 pragma_omp_clause.
5361
cef0fd0e
TS
53622013-12-17 Thomas Schwinge <thomas@codesourcery.com>
5363
5364 * c-parser.c (c_parser_omp_parallel): Fix description.
5365
12893402
BI
53662013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
5367
5368 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
5369 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5370 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
5371 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
5372
296674db
JM
53732013-12-04 Joseph Myers <joseph@codesourcery.com>
5374
5375 PR c/52023
5376 * c-parser.c (c_parser_alignas_specifier): Use
5377 c_sizeof_or_alignof_type instead of c_alignof.
5378 (c_parser_alignof_expression): Likewise, with min_alignof
5379 parameter depending on alignof spelling used.
5380
edd28054
MP
53812013-12-04 Marek Polacek <polacek@redhat.com>
5382
5383 PR c/54113
5384 * c-decl.c (start_function): Don't warn for missing prototype for
5385 inline functions.
5386
da0fc454
MP
53872013-12-03 Marek Polacek <polacek@redhat.com>
5388
5389 PR c/59351
5390 * c-decl.c (build_compound_literal): Allow compound literals with
5391 empty initial value.
5392
4c2ecab0
JM
53932013-12-02 Joseph Myers <joseph@codesourcery.com>
5394
5395 PR c/58235
5396 * c-typeck.c (build_modify_expr): Diagnose assignment to
5397 expression with array type.
5398
340baef7
JM
53992013-11-29 Joseph Myers <joseph@codesourcery.com>
5400
5401 PR c/42262
5402 * c-typeck.c (process_init_element): Do not treat a string as
5403 initializing a whole array when used with a designator for an
5404 individual element.
5405
6763b9f7
JM
54062013-11-29 Joseph Myers <joseph@codesourcery.com>
5407
5408 PR c/57574
5409 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
5410 an inline function following a static declaration.
5411
e7bd1de1
JJ
54122013-11-28 Jakub Jelinek <jakub@redhat.com>
5413
5414 PR c/59310
5415 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
5416 to p_name before calling c_parser_omp_teams instead of after.
5417 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
5418 argument. Remove unused p_name variable.
5419
0136f8f0
AH
54202013-11-27 Aldy Hernandez <aldyh@redhat.com>
5421 Jakub Jelinek <jakub@redhat.com>
5422
5423 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
5424 external_scope is NULL.
5425
241b71bb
TV
54262013-11-27 Tom de Vries <tom@codesourcery.com>
5427 Marc Glisse <marc.glisse@inria.fr>
5428
5429 PR c++/59032
5430 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
5431
2fb9a547
AM
54322013-11-22 Andrew MacLeod <amacleod@redhat.com>
5433
5434 * c-typeck.c: Add required include files from gimple.h.
5435
8400e75e
DM
54362013-11-22 David Malcolm <dmalcolm@redhat.com>
5437
5438 * c-decl.c (define_label, shadow_tag_warned)
5439 (check_bitfield_type_and_width, grokdeclarator, grokparms,
5440 store_parm_decls_newstyle, store_parm_decls_oldstyle)
5441 (declspecs_add_type): Remove use of in_system_header macro.
5442 * c-parser.c (c_parser_unary_expression): Likewise.
5443 * c-typeck.c (store_init_value, process_init_element)
5444 (c_start_case): Likewise.
5445
5446 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
5447 macro.
5448
5449 * c-parser.c (c_parser_set_source_position_from_token): Remove
5450 reference to in_system_header from comment.
5451
386b1f1f
RS
54522013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5453
5454 * c-decl.c (grokdeclarator): Update comment to refer to
5455 tree_to_[su]hwi rather than tree_low_cst.
5456
ae7e9ddd
RS
54572013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5458
5459 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
5460 tree_to_uhwi throughout.
5461
9439e9a1
RS
54622013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5463
5464 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
5465 throughout.
5466
9541ffee
RS
54672013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5468
5469 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
5470 throughout.
5471
c02065fc
AH
54722013-11-15 Aldy Hernandez <aldyh@redhat.com>
5473
5474 * c-parser.c (c_parser_cilk_simd): New.
5475 (c_parser_cilk_verify_simd): New.
5476 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
5477 (c_parser_omp_for_loop): Add case for NE_EXPR.
5478 Set c_break_label for CILK_SIMD.
5479 (c_parser_cilk_clause_vectorlength): New.
5480 (c_parser_cilk_clause_linear): New.
5481 (c_parser_cilk_clause_name): New.
5482 (c_parser_cilk_all_clauses): New.
5483 * c-typeck.c (build_unary_op): Pass location argument to
5484 readonly_error.
5485 (build_modify_expr): Same.
5486 (build_asm_expr): Same.
5487 (c_finish_bc_stmt): Error on break/continue in loops.
5488
18f429e2
AM
54892013-11-14 Andrew MacLeod <amacleod@redhat.com>
5490
5491 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
5492
d8a2d370
DN
54932013-11-14 Diego Novillo <dnovillo@google.com>
5494
5495 * c-decl.c: Include print-tree.h.
5496 Include stor-layout.h.
5497 Include varasm.h.
5498 Include attribs.h.
5499 Include stringpool.h.
5500 * c-lang.c: Include fold-const.h.
5501 * c-parser.c: Include stringpool.h.
5502 Include attribs.h.
5503 Include stor-layout.h.
5504 Include varasm.h.
5505 Include trans-mem.h.
5506 * c-typeck.c: Include stor-layout.h.
5507 Include trans-mem.h.
5508 Include varasm.h.
5509 Include stmt.h.
5510
38b7bc7f
JM
55112013-11-13 Joseph Myers <joseph@codesourcery.com>
5512
5513 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
5514 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
5515 __auto_type.
5516 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
5517 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
5518 RID_AUTO_TYPE.
5519 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
5520 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
5521 (c_parser_declarator, c_parser_direct_declarator_inner)
5522 (c_parser_parameter_declaration, c_parser_type_name): All callers
5523 changed.
5524 (c_parser_declaration_or_fndef): Handle declarations with type
5525 determined from the initializer.
5526
45b0be94
AM
55272013-11-12 Andrew MacLeod <amacleod@redhat.com>
5528
18f429e2 5529 * c-typeck.c: Include gimplify.h.
45b0be94 5530
582d9b50
JM
55312013-11-12 Joseph Myers <joseph@codesourcery.com>
5532
5533 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
5534 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
5535 comment.
5536 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
5537 or _Thread_local as appropriate in diagnostics.
5538 (build_null_declspecs): Initialize ret->thread_gnu_p.
5539 (declspecs_add_scspec): Handle either __thread or _Thread_local
5540 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
5541 pedantic. Do not disallow _Thread_local extern and _Thread_local
5542 static.
5543
267bac10
JM
55442013-11-07 Joseph Myers <joseph@codesourcery.com>
5545 Andrew MacLeod <amacleod@redhat.com>
5546
5547 * c-aux-info.c (gen_type): Handle atomic qualifier.
5548 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
5549 qualifiers when compating types.
5550 (shadow_tag_warned): Handle atomic_p in declspecs.
5551 (quals_from_declspecs): Likewise.
5552 (start_decl): Use c_type_promotes_to when promoting argument
5553 types.
5554 (grokdeclarator): Handle _Atomic.
5555 (get_parm_info): Diagnose any qualifier on "void" as only
5556 parameter.
5557 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
5558 comparing types. Use c_type_promotes_to when promoting argument
5559 types.
5560 (finish_function): Use c_type_promotes_to when promoting argument
5561 types.
5562 (build_null_declspecs): Handle atomic_p in declspecs.
5563 (declspecs_add_qual): Handle RID_ATOMIC.
5564 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
5565 (c_token_starts_declspecs): Handle RID_ATOMIC.
5566 (c_parser_declspecs): Handle atomic type specifiers and
5567 qualifiers.
5568 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
5569 from types of expressions with atomic type.
5570 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
5571 (c_parser_attribute_any_word): Handle RID_ATOMIC.
5572 (c_parser_initializer, c_parser_initelt, c_parser_initval)
5573 (c_parser_statement_after_labels, c_parser_switch_statement)
5574 (c_parser_for_statement, c_parser_expr_no_commas)
5575 (c_parser_conditional_expression, c_parser_binary_expression)
5576 (c_parser_cast_expression, c_parser_unary_expression)
5577 (c_parser_postfix_expression)
5578 (c_parser_postfix_expression_after_primary, c_parser_expression):
5579 Use convert_lvalue_to_rvalue.
5580 (c_parser_expression_conv, c_parser_expr_list): Document
5581 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
5582 (c_parser_objc_synchronized_statement): Use
5583 convert_lvalue_to_rvalue.
5584 (c_parser_objc_selector): Handle RID_ATOMIC.
5585 (c_parser_objc_receiver, c_parser_array_notation): Use
5586 convert_lvalue_to_rvalue.
5587 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
5588 _Atomic (type-name).
5589 (struct c_declspecs): Add atomic_p field.
5590 (convert_lvalue_to_rvalue): Declare.
5591 * c-typeck.c (c_type_promotes_to): Promote atomic types to
5592 corresponding atomic types.
5593 (qualify_type): Don't add _Atomic qualifiers from second argument.
5594 (comp_target_types): Do not allow _Atomic mismatches.
5595 (type_lists_compatible_p): Do not remove atomic qualifiers when
5596 comparing types.
5597 (really_atomic_lvalue, convert_lvalue_to_rvalue)
5598 (build_atomic_assign): New functions.
5599 (build_unary_op): Use build_atomic_assign for atomic increment and
5600 decrement.
5601 (build_conditional_expr): Do not treat _Atomic void as a qualified
5602 version of void.
5603 (build_modify_expr): Use build_atomic_assign for atomic LHS.
5604 (find_anonymous_field_with_type, convert_to_anonymous_field)
5605 (convert_for_assignment): Do not remove atomic qualifiers when
5606 comparing types.
5607 (digest_init): Do not accept initialization of arrays of atomic
5608 elements by string constants.
5609 (build_asm_expr): Use convert_lvalue_to_rvalue.
5610 (build_binary_op): Do not treat _Atomic void as a qualified
5611 version of void.
5612
0c249d4b
DD
56132013-11-06 DJ Delorie <dj@redhat.com>
5614
5615 * c-decl.c (locate_old_decl): If a previous conflicting decl is
5616 both explicit and builtin, print the location of the explicit one.
5617
6d7f7e0a
TB
56182013-11-05 Tobias Burnus <burnus@net-b.de>
5619
5620 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
5621 c_parser_omp_distribute, c_parser_omp_teams,
5622 c_parser_omp_target, c_parser_omp_declare): Handle
5623 -fopenmp-simd.
5624
b906f4ca
MP
56252013-11-03 Marek Polacek <polacek@redhat.com>
5626
5627 * c-decl.c (grokdeclarator): Add VLA instrumentation.
5628
ee1d5a02
JJ
56292013-11-01 Jakub Jelinek <jakub@redhat.com>
5630
5631 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
5632 check_dup_generic at the end, unless remove is true.
5633 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
5634 remove = true;.
5635 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
5636
5a9785fb
JJ
56372013-10-31 Jakub Jelinek <jakub@redhat.com>
5638
5639 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
5640 with decl that is not pointer nor array.
5641
939b37da
BI
56422013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
5643
5644 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
5645 a spawning function is found.
5646 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
5647 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
5648 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5649 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
5650 case.
5651 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
5652 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
5653 expr.
5654 (c_finish_return): Added a check to reject _Cilk_spawn in return
5655 expression.
5656 (build_cilk_spawn): New function.
5657 (build_cilk_sync): Likewise.
5658 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
5659
d4af74d4
TB
56602013-10-27 Tobias Burnus <burnus@net-b.de>
5661
5662 PR other/33426
5663 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
5664 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
5665 (c_parser_statement_after_labels): Update calls.
5666
d73749df 56672013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
5668
5669 PR other/33426
5670 * c-parser.c (c_parser_pragma, c_parser_for_statement):
5671 Handle PRAGMA_IVDEP.
5672 (c_parser_statement_after_labels): Update call.
5673
f28aa681
MP
56742013-10-24 Marek Polacek <polacek@redhat.com>
5675
5676 * c-parser.c (c_parser_struct_declaration): Add a comment.
5677 (c_parser_declarator): Don't allow _Alignas here.
5678
0645c1a2
AM
56792013-10-17 Andrew MacLeod <amacleod@redhat.com>
5680
5681 * c-parser.c: Include omp-low.h.
5682 * c-typeck.c: Likewise.
5683
568a31f2
MP
56842013-10-17 Marek Polacek <polacek@redhat.com>
5685
5686 PR c/58267
5687 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
5688 Document syntax of the array-declarator.
5689 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
5690 are not permitted.
5691 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
5692 (c_parser_struct_declaration): Likewise.
5693 (c_parser_declarator): Likewise.
5694 (c_parser_direct_declarator_inner): Likewise.
5695 (c_parser_parameter_declaration): Likewise.
5696 (c_parser_type_name): Likewise.
5697
acf0174b
JJ
56982013-10-11 Jakub Jelinek <jakub@redhat.com>
5699
5700 * c-lang.h (current_omp_declare_target_attribute): New extern
5701 decl.
5702 * c-parser.c: Include c-lang.h.
5703 (struct c_parser): Change tokens to c_token *.
5704 Add tokens_buf field. Change tokens_avail type to unsigned int.
5705 (c_parser_consume_token): If parser->tokens isn't
5706 &parser->tokens_buf[0], increment parser->tokens.
5707 (c_parser_consume_pragma): Likewise.
5708 (enum pragma_context): Add pragma_struct and pragma_param.
5709 (c_parser_external_declaration): Adjust
5710 c_parser_declaration_or_fndef caller.
5711 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
5712 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
5713 Adjust recursive call.
5714 (c_parser_struct_or_union_specifier): Use pragma_struct instead
5715 of pragma_external.
5716 (c_parser_parameter_declaration): Use pragma_param instead of
5717 pragma_external.
5718 (c_parser_compound_statement_nostart, c_parser_label,
5719 c_parser_for_statement): Adjust
5720 c_parser_declaration_or_fndef callers.
5721 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
5722 it through to c_parser_conditional_expression.
5723 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
5724 pass it through to c_parser_binary_expression. Adjust recursive
5725 call.
5726 (c_parser_binary_expression): Remove prec argument, add
5727 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
5728 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
5729 binop matches it, use build2 instead of parser_build_binary_op.
5730 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
5731 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
5732 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
5733 Handle pragma_struct and pragma_param the same as pragma_external.
5734 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5735 (c_parser_omp_variable_list): Parse array sections for
5736 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5737 (c_parser_omp_clause_collapse): Fully fold collapse expression.
5738 (c_parser_omp_clause_reduction): Handle user defined reductions.
5739 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5740 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5741 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5742 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5743 c_parser_omp_clause_depend, c_parser_omp_clause_map,
5744 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5745 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5746 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5747 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
5748 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
5749 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5750 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
5751 (c_parser_omp_for_loop): Add CODE argument, pass it through
5752 to c_finish_omp_for. Change last argument to cclauses,
5753 and adjust uses to grab parallel clauses from the array of all
5754 the split clauses. Adjust c_parser_binary_expression,
5755 c_parser_declaration_or_fndef and c_finish_omp_for callers.
5756 (omp_split_clauses): New function.
5757 (c_parser_omp_simd): New function.
5758 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5759 Allow the function to be called also when parsing combined constructs,
5760 and call c_parser_omp_simd when parsing for simd.
5761 (c_parser_omp_sections_scope): If section-sequence doesn't start with
5762 #pragma omp section, require exactly one structured-block instead of
5763 sequence of statements.
5764 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5765 Allow the function to be called also when parsing combined constructs.
5766 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
5767 Allow the function to be called also when parsing combined
5768 constructs.
5769 (c_parser_omp_taskgroup, c_parser_omp_cancel,
5770 c_parser_omp_cancellation_point, c_parser_omp_distribute,
5771 c_parser_omp_teams, c_parser_omp_target_data,
5772 c_parser_omp_target_update, c_parser_omp_target,
5773 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
5774 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
5775 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
5776 (c_parser_omp_construct): Add p_name and mask vars. Handle
5777 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
5778 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
5779 and c_parser_omp_sections callers.
5780 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
5781 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5782 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5783 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
5784 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
5785 OMP_CLAUSE_DEPEND.
5786 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5787 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5788 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5789 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5790 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5791 * c-typeck.c: Include tree-inline.h.
5792 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5793 handle_omp_array_sections_1, handle_omp_array_sections,
5794 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5795 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5796 user defined reductions.
5797 (c_tree_equal): New function.
5798 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5799 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5800 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5801 c_check_omp_declare_reduction_r): New prototypes.
5802 * c-decl.c (current_omp_declare_target_attribute): New variable.
5803 (c_decl_attributes): New function.
5804 (start_decl, start_function): Use it instead of decl_attributes.
5805 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5806 c_omp_reduction_decl, c_omp_reduction_lookup,
5807 c_check_omp_declare_reduction_r): New functions.
5808
0a6c2227
TT
58092013-09-25 Tom Tromey <tromey@redhat.com>
5810
5811 * Make-lang.in (c/gccspec.o): Remove.
5812 (CFLAGS-c/gccspec.o): New variable.
5813 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
5814 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
5815 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5816
f3bc55f0
TT
58172013-09-25 Tom Tromey <tromey@redhat.com>
5818
5819 * Make-lang.in (c/gccspec.o): Don't use subshell.
5820
a24d975c
MP
58212013-09-18 Marek Polacek <polacek@redhat.com>
5822
5823 PR sanitize/58443
5824 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5825 Remove unnecessary check.
5826
ce6923c5
MP
58272013-09-18 Marek Polacek <polacek@redhat.com>
5828
5829 PR sanitizer/58411
5830 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
5831 no_sanitize_undefined attribute.
5832
a1e51df9
KT
58332013-09-13 Kai Tietz <ktietz@redhat.com>
5834
5835 PR target/57848
5836 * c-decl.c (c_builtin_function_ext_scope): Remove
5837 wrong assumption that it is never called on prexisting
5838 symbol.
5839
0af94e6f
JR
58402013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
5841
5842 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
5843
20059c8b
GDR
58442013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5845
5846 * c-objc-common.c (c_tree_printer): Tidy.
5847
de5a5fa1
MP
58482013-08-30 Marek Polacek <polacek@redhat.com>
5849
5850 * c-typeck.c (build_binary_op): Add division by zero and shift
5851 instrumentation.
5852
2531a1d9 58532013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 5854 Joseph Myers <joseph@codesourcery.com>
2531a1d9 5855
6e2bcc98 5856 PR c/35649
2531a1d9
JR
5857 * c-typeck.c (c_common_type): Prefer double_type_node over
5858 other REAL_TYPE types with the same precision.
5859 (convert_arguments): Likewise.
5860
025311c4
GDR
58612013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5862
5863 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
5864 (c_initialize_diagnostics): Call a destructor for the early printer.
5865
da6ca2b5
GDR
58662013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5867
5868 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5869 printer initialization.
5870
318cda85 58712013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 5872
318cda85
BI
5873 PR c/57490
5874 * c-array-notation.c (fix_conditional_array_notations_1): Added a
5875 check for truth values.
5876 (expand_array_notation_exprs): Added truth values case. Removed an
5877 unwanted else. Added for-loop to walk through subtrees in default
5878 case.
5879
b066401f
GDR
58802013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5881
5882 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5883
fb48aadc
JM
58842013-07-23 Joseph Myers <joseph@codesourcery.com>
5885
5886 * c-parser.c (struct c_generic_association): Fix typo.
5887
433cc7b0
TT
58882013-07-23 Tom Tromey <tromey@redhat.com>
5889 Joseph Myers <joseph@codesourcery.com>
5890
5891 * c-parser.c (struct c_generic_association): New.
5892 (c_generic_association_d): New typedef.
5893 (c_parser_generic_selection): New function.
5894 (c_parser_postfix_expression): Handle RID_GENERIC.
5895
26d40c3d
JM
58962013-07-13 Jason Merrill <jason@redhat.com>
5897
5898 PR c++/57793
5899 * c-decl.c (finish_struct): Check for too-large class.
5900
ecdbd01a 59012013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
5902
5903 PR c/57821
5904 * c-typeck.c (set_init_index): When folding, check for index overflow.
5905
1141ed3f
BI
59062013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5907
5908 * c-parser.c (c_parser_array_notation): Removed rejection of array
5909 notations in an array of function pointers.
5910
713b46fa
BI
59112013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5912
5913 * c-array-notation.c (make_triplet_val_inv): New function.
5914 (create_cmp_incr): Likewise.
5915 (create_array_refs): Likewise.
5916 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5917 Also modularized common parts between functions and called the function.
5918 (build_array_notation_expr): Likewise.
5919 (fix_conditional_array_notations_1): Likewise.
5920 (fix_array_notation_expr): Likewise.
5921 (fix_array_notation_call_expr): Likewise.
5922
92f20202
MP
59232013-06-18 Marek Polacek <polacek@redhat.com>
5924
5925 PR c/57630
5926 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5927
73a23b06
BI
59282013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
5929
5930 * c-array-notation.c (build_array_notation_expr): Reject array notation
5931 mismatch between LHS and RHS even inside a call_expr. Also, removed
5932 a couple while statements that were dead code.
5933
00b8517d
BI
59342013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
5935
5936 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5937 excessive precision expressions in function parameters. Also removed
5938 couple unwanted while statements.
5939
1509bdda
BI
59402013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5941
5942 * c-array-notation.c (expand_array_notation_exprs): Added
5943 ARRAY_NOTATION_REF case.
5944
d60f1706
BI
59452013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5946
5947 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5948 function to c-family/array-notation-common.c.
5949 (is_cilkplus_reduce_builtin): Likewise.
5950 (find_rank): Likewise.
5951 (extract_array_notation_exprs): Likewise.
5952 (replace_array_notations): Likewise.
5953 (find_inv_trees): Likewise.
5954 (replace_inv_trees): Likewise.
5955 (contains_array_notation_expr): Likewise.
5956 (find_correct_array_notation_type): Likewise.
5957 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5958 (struct inv_list): Moved this to c-family/array-notation-common.c.
5959 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5960
6d6efbb3
BI
59612013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
5962
5963 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5964 reduction functions outside the for-loop. Added a check if the fundecl
5965 is non-NULL. Finally, removed an unwanted if-statement, and made the
5966 body unconditional.
5967
25c22937
BI
59682013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5969
5970 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5971 condition of the if-statement matches the rank of else-block and then-
5972 block when array notations are used.
5973 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5974 expression after the entire function body is parsed.
5975 (c_parser_expr_no_commas): Delayed creating array notation expressions
5976 to the end of function parsing.
5977 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5978 whole if-statement instead of just the condition.
5979 (expand_array_notation_exprs): Added MODIFY_EXPR case.
5980
edd25645
BI
59812013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5982
5983 PR c/57474
5984 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5985 array to NULL_TREE if they are unused. Also added a check for the
5986 field to be NULL before its fields are used in future.
5987
065ce7f1
RO
59882013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5989
5990 PR bootstrap/57450
5991 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5992 (build_array_notation_expr): Likewise.
5993
36536d79
BI
59942013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5995
5996 * c-typeck.c (build_array_ref): Added a check to see if array's
5997 index is greater than one. If true, then emit an error.
5998 (build_function_call_vec): Exclude error reporting and checking
5999 for builtin array-notation functions.
6000 (convert_arguments): Likewise.
6001 (c_finish_return): Added a check for array notations as a return
6002 expression. If true, then emit an error.
6003 (c_finish_loop): Added a check for array notations in a loop
6004 condition. If true then emit an error.
6005 (lvalue_p): Added a ARRAY_NOTATION_REF case.
6006 (build_binary_op): Added a check for array notation expr inside
6007 op1 and op0. If present, we call another function to find correct
6008 type.
6009 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
6010 * c-parser.c (c_parser_compound_statement): Check if array
6011 notation code is used in tree, if so, then transform them into
6012 appropriate C code.
6013 (c_parser_expr_no_commas): Check if array notation is used in LHS
6014 or RHS, if so, then build array notation expression instead of
6015 regular modify.
6016 (c_parser_postfix_expression_after_primary): Added a check for
6017 colon(s) after square braces, if so then handle it like an array
6018 notation. Also, break up array notations in unary op if found.
6019 (c_parser_direct_declarator_inner): Added a check for array
6020 notation.
6021 (c_parser_compound_statement): Added a check for array notation in
6022 a stmt. If one is present, then expand array notation expr.
6023 (c_parser_if_statement): Likewise.
6024 (c_parser_switch_statement): Added a check for array notations in
6025 a switch statement's condition. If true, then output an error.
6026 (c_parser_while_statement): Similarly, but for a while.
6027 (c_parser_do_statement): Similarly, but for a do-while.
6028 (c_parser_for_statement): Similarly, but for a for-loop.
6029 (c_parser_unary_expression): Check if array notation is used in a
6030 pre-increment or pre-decrement expression. If true, then expand
6031 them.
6032 (c_parser_array_notation): New function.
6033 * c-array-notation.c: New file.
6034 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
6035
cd192ccc
MS
60362013-05-23 Mike Stump <mikestump@comcast.net>
6037
6038 * c-typeck.c (convert_for_assignment): Handle references to memory
6039 spaces better.
6040
427b248d
JM
60412013-05-16 Jason Merrill <jason@redhat.com>
6042
6043 * Make-lang.in (cc1$(exeext)): Use link mutex.
6044
44d90fe1
PC
60452013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6046
6047 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
6048 to simply use OPT_Wpointer_arith.
6049 (build_unary_op): Likewise.
6050
4e7d7b3d
JJ
60512013-04-03 Jakub Jelinek <jakub@redhat.com>
6052
6053 PR c/19449
6054 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
6055 argument. If set, or it temporarily for parsing of the first
6056 argument into force_folding_builtin_constant_p.
6057 (c_parser_postfix_expression): Adjust callers.
6058
839b422f
RB
60592013-03-21 Richard Biener <rguenther@suse.de>
6060
6061 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
6062 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
6063
2ee028f1
MP
60642013-02-12 Marek Polacek <polacek@redhat.com>
6065
6066 PR c/44938
6067 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
6068 origtypes to NULL.
6069
8824edff
JJ
60702013-01-24 Jakub Jelinek <jakub@redhat.com>
6071
6072 PR c/56078
6073 * c-typeck.c (set_nonincremental_init_from_string): If
6074 constructor_max_index is NULL, treat it as if tree_int_cst_lt
6075 returned false.
6076 (process_init_element): Likewise.
6077
eadd3d0d
JJ
60782012-12-20 Jakub Jelinek <jakub@redhat.com>
6079
6080 PR c++/55619
6081 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
6082 argument, don't call default_function_array_conversion
6083 nor c_fully_fold here.
6084 (c_parser_asm_statement): Adjust callers.
6085 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
6086 and outputs here, and call default_function_array_conversion
6087 on inputs that don't need to be addressable.
6088
f8a93a2e
JJ
60892012-12-18 Jakub Jelinek <jakub@redhat.com>
6090
6091 PR c/39464
6092 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
6093 warning require that both c_common_unsigned_type as well as
6094 c_common_signed_type is the same for both mvl and mvr types.
6095
9771b263
DN
60962012-11-16 Diego Novillo <dnovillo@google.com>
6097
6098 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
6099
6100 * c-common.c: Use new vec API in vec.h.
6101 * c-common.h: Likewise.
6102 * c-gimplify.c: Likewise.
6103 * c-pragma.c: Likewise.
6104 * c-pretty-print.c: Likewise.
6105 * c-pretty-print.h: Likewise.
6106 * c-semantics.c: Likewise.
6107 * c-decl.c: Likewise.
6108 * c-parser.c: Likewise.
6109 * c-tree.h: Likewise.
6110 * c-typeck.c: Likewise.
6111
880661a4
JW
61122012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
6113
6114 PR c++/54930
6115 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
6116
077d1abe
MLI
61172012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6118
6119 PR c/53066
6120 * c-decl.c (warn_if_shadowing): Do not warn if a variable
6121 shadows a function, unless the variable is a function or a
6122 pointer-to-function.
6123
3a785c97
JJ
61242012-10-12 Jakub Jelinek <jakub@redhat.com>
6125
6126 PR c/54381
6127 * c-parser.c (struct c_tree_loc_pair): Removed.
6128 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
6129 add location_t * and tree * arguments, fill in array of 3
6130 sizeof_arg trees and corresponding locs.
6131 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
6132 c_parser_expr_list callers.
6133 (c_parser_postfix_expression_after_primary): Likewise. Pass
6134 array of 3 sizeof_arg trees and locs (corresponding to first
6135 3 arguments) to sizeof_pointer_memaccess_warning.
6136
703c8606
LC
61372012-10-09 Lawrence Crowl <crowl@google.com>
6138
6139 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
6140 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
6141 hash table.
6142
5d9de0d0
PC
61432012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
6144
6145 PR c++/54194
6146 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
6147 call.
6148
a212e43f
MG
61492012-10-09 Marc Glisse <marc.glisse@inria.fr>
6150
6151 PR c++/54427
6152 * c-typeck.c: Include c-common.h.
6153 (enum stv_conv): Moved to c-common.h.
6154 (scalar_to_vector): Moved to c-common.c.
6155 (build_binary_op): Adapt to scalar_to_vector's new prototype.
6156 * Make-lang.in: c-typeck.c depends on c-common.h.
6157
3b78de56
AC
61582012-10-04 Arnaud Charlet <charlet@adacore.com>
6159
6160 * c-decl.c (c_write_global_declarations): Fix handling of
6161 -fdump-ada-spec*.
6162
78c60e3d
SS
61632012-09-30 Sharad Singhai <singhai@google.com>
6164
6165 * c-decl.c (c_write_global_declarations): Use a different method
6166 to determine if the dump has ben initialized.
6167
9f33203d
JM
61682012-09-14 Joseph Myers <joseph@codesourcery.com>
6169
6170 PR c/54552
6171 * c-typeck.c (c_cast_expr): When casting to a type requiring
6172 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
6173 c_fully_fold first.
6174
a27d595d
JM
61752012-09-14 Joseph Myers <joseph@codesourcery.com>
6176
6177 PR c/54103
6178 * c-typeck.c (build_unary_op): Pass original argument of
6179 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
6180 any C_MAYBE_CONST_EXPR, if it has integer operands.
6181 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
6182 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
6183 to c_objc_common_truthvalue_conversion, then remove any
6184 C_MAYBE_CONST_EXPR, if they have integer operands. Use
6185 c_objc_common_truthvalue_conversion not
6186 c_common_truthvalue_conversion.
6187 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
6188 call note_integer_operands for arguments with integer operands
6189 that are not integer constants.
6190
9feb29df
JJ
61912012-09-13 Jakub Jelinek <jakub@redhat.com>
6192
6193 PR c/54559
6194 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
6195 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
6196
d409320c
JJ
61972012-08-31 Jakub Jelinek <jakub@redhat.com>
6198
6199 PR c/54428
6200 * c-convert.c (convert): Don't call fold_convert_loc if
6201 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
6202 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
6203 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
6204
6265d07c
JJ
62052012-08-24 Jakub Jelinek <jakub@redhat.com>
6206
6207 PR c/54355
6208 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
6209 for nested and empty_ok arguments in the call to
6210 c_parser_declaration_or_fndef.
6211
1a4049e7
JJ
62122012-08-17 Jakub Jelinek <jakub@redhat.com>
6213
6214 * c-tree.h (c_last_sizeof_arg): Declare.
6215 * c-parser.c (struct c_tree_loc_pair): New type.
6216 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
6217 non-NULL.
6218 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
6219 (c_parser_postfix_expression_after_primary): Likewise. Call
6220 sizeof_pointer_memaccess_warning if needed.
6221 (sizeof_ptr_memacc_comptypes): New function.
6222 * c-typeck.c (c_last_sizeof_arg): New global variable.
6223 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
6224
0229aee9
UB
62252012-07-24 Uros Bizjak <ubizjak@gmail.com>
6226
6227 * c-lang.h (lang_decl): Add variable_size GTY option.
6228
7ee2468b
SB
62292012-07-16 Steven Bosscher <steven@gcc.gnu.org>
6230
6231 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
6232 * Make-lang.in: Fix dependencies.
6233
d4a10d0a
SB
62342012-06-29 Steven Bosscher <steven@gcc.gnu.org>
6235
6236 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
6237 and add language Makefile hooks.
6238 * config-lang.in: New file.
6239 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
6240 add the required "normal" config-lang.in rules.
6241 * c-lang.h: Moved from gcc/ to here.
6242 * c-tree.h: Likewise.
6243 * c-objc-common.c: Likewise.
6244 * c-objc-common.h: Likewise.
6245 * c-typeck.c: Likewise.
6246 * c-convert.c: Likewise.
6247 * c-lang.c: Likewise.
6248 * c-aux-info.c: Likewise.
6249 * c-errors.c: Likewise.
6250 * gccspec.c: Likewise.
6251 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
6252 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
6253\f
a5544970 6254Copyright (C) 2012-2019 Free Software Foundation, Inc.
d4a10d0a
SB
6255
6256Copying and distribution of this file, with or without modification,
6257are permitted in any medium without royalty provided the copyright
6258notice and this notice are preserved.