]> gcc.gnu.org Git - gcc.git/blame - gcc/c/ChangeLog
rs6000: support vector int type rotatert
[gcc.git] / gcc / c / ChangeLog
CommitLineData
a28351e7
JJ
12019-07-31 Jakub Jelinek <jakub@redhat.com>
2
3 PR c/91192
4 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
5 even if finish is UNKNOWN_LOCATION, just use start as finish in that
6 case.
7
6343b6bf
ML
82019-07-25 Martin Liska <mliska@suse.cz>
9 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
10
11 PR c++/23383
12 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
13
cb50701e
ML
142019-07-25 Martin Liska <mliska@suse.cz>
15
16 * c-decl.c (merge_decls): Use new macros
17 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
18
62e3e66f
RB
192019-07-23 Richard Biener <rguenther@suse.de>
20
21 PR tree-optimization/83518
22 * gimple-parser.c (c_parser_parse_gimple_body): When we have
23 a CFG also rebuild cgraph edges.
24
554a530f
JJ
252019-07-20 Jakub Jelinek <jakub@redhat.com>
26
27 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
28 (c_parser_omp_clause_bind): New function.
29 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
30 (OMP_LOOP_CLAUSE_MASK): Define.
31 (c_parser_omp_loop): New function.
32 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
33 loop combined with parallel or teams.
34 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
35 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
36
d119bf79
RS
372019-07-18 Richard Sandiford <richard.sandiford@arm.com>
38
39 PR c/53633
40 * c-decl.c (finish_function): Check targetm.warn_func_return
41 before issuing a -Wreturn-type warning.
42
fdc1f343
AO
432019-07-12 Alexandre Oliva <oliva@adacore.com>
44
45 * gimple-parser.c (c_parser_gimple_try_stmt): New.
46 (c_parser_compound_statement): Call it.
47
1fdd6f04
JJ
482019-07-12 Jakub Jelinek <jakub@redhat.com>
49
50 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
51 (c_parser_omp_clause_order): New function.
52 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
53 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
54 PRAGMA_OMP_CLAUSE_ORDER.
55 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
56
8389386c
RB
572019-07-10 Richard Biener <rguenther@suse.de>
58
59 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
60 _Literal (int *) &x for address literals.
61
99b1c316
MS
622019-07-09 Martin Sebor <msebor@redhat.com>
63
64 PR c++/61339
65 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
66 to class.
67 (field_decl_cmp): Same.
68 * c-parser.c (c_parser_struct_or_union_specifier): Same.
69 * c-tree.h: Same.
70 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
71
6c1dae73
MS
722019-07-09 Martin Sebor <msebor@redhat.com>
73
74 PR c++/61339
75 * c-decl.c: Change class-key from class to struct and vice versa
76 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
77 * gimple-parser.c: Same.
78
69b5279e
RB
792019-07-01 Richard Biener <rguenther@suse.de>
80
81 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
82 _Literal (char *) &"foo" for address literals pointing to
83 STRING_CSTs.
84
1e3d475e
MS
852019-06-24 Martin Sebor <msebor@redhat.com>
86
87 * c-typeck.c (build_binary_op): Hyphenate floating-point.
88
bf38f7e9
JJ
892019-06-10 Jakub Jelinek <jakub@redhat.com>
90
91 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
92 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
93 (c_parser_omp_scan_loop_body): New function.
94 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
95 inscan reduction clauses.
96 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
97 non-inscan reductions on the same construct, or inscan reductions with
98 ordered or schedule clauses, or inscan array reductions.
99
65985d78
MS
1002019-06-05 Martin Sebor <msebor@redhat.com>
101
102 PR c/90737
103 * c-typeck.c (c_finish_return): Only consider functions returning
104 pointers as candidates for -Wreturn-local-addr.
105
0ecf545c
MS
1062019-06-05 Martin Sebor <msebor@redhat.com>
107
108 * c-decl.c (start_decl): Adjust quoting and hyphenation
109 in diagnostics.
110 (finish_decl): Same.
111 (finish_enum): Same.
112 (start_function): Same.
113 (declspecs_add_type): Same.
114 * c-parser.c (warn_for_abs): Same.
115 * c-typeck.c (build_binary_op): Same.
116
e03436e7
TS
1172019-05-17 Thomas Schwinge <thomas@codesourcery.com>
118
b48f44bf
TS
119 PR c/89433
120 * c-parser.c (c_finish_oacc_routine): Rework checking if already
121 marked with an OpenACC 'routine' directive.
122
5bf04509
TS
123 PR c/89433
124 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
125 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
126
e03436e7
TS
127 PR c/89433
128 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
129 clauses from "omp declare target" attribute.
130
a9c697b8
MS
1312019-05-16 Martin Sebor <msebor@redhat.com>
132
133 * c-decl.c (start_decl): Quote keywords, operators, and
134 types in diagnostics.
135 (finish_decl): Same.
136 * c-parser.c (c_parser_asm_statement): Same.
137 (c_parser_conditional_expression): Same.
138 (c_parser_transaction_cancel): Same.
139 * c-typeck.c (c_common_type): Same.
140 (build_conditional_expr): Same.
141 (digest_init): Same.
142 (process_init_element): Same.
143 (build_binary_op): Same.
144
c4499192
RB
1452019-05-17 Richard Biener <rguenther@suse.de>
146
147 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
148 (c_parser_gimple_unary_expression): Likewise.
149 (c_parser_gimple_parentized_ternary_expression): New function.
150
adfe6e4b
RB
1512019-05-16 Richard Biener <rguenther@suse.de>
152
153 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
154 (c_parser_gimple_unary_expression): Likewise.
155
186dabf2
RB
1562019-05-15 Richard Biener <rguenther@suse.de>
157
158 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
159 __BIT_FIELD_REF.
160
1158c5b4
RB
1612019-05-14 Richard Biener <rguenther@suse.de>
162
163 * gimple-parser.c (c_parser_gimple_statement): Remove
164 questionable auto-promotion to VIEW_CONVERT_EXPR.
165 (c_parser_gimple_typespec): Split out from __MEM parsing.
166 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
167 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
168 as __VIEW_CONVERT with -gimple.
169
fd4485aa
ML
1702019-05-09 Martin Liska <mliska@suse.cz>
171
172 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
173 __MAX.
174 (c_parser_gimple_unary_expression): Parse also binary expression
175 __MIN and __MAX.
176 (c_parser_gimple_parentized_binary_expression): New function.
177
d276406a
ML
1782019-05-09 Martin Liska <mliska@suse.cz>
179
180 * gimple-parser.c (struct gimple_parser): Add probability.
181 for gimple_parser_edge.
182 (gimple_parser::push_edge): Add new argument probability.
183 (c_parser_gimple_parse_bb_spec): Parse also probability
184 if present.
185 (c_parser_parse_gimple_body): Set edge probability.
186 (c_parser_gimple_compound_statement): Consume token
187 before calling c_parser_gimple_goto_stmt.
188 Parse BB counts.
189 (c_parser_gimple_statement): Pass new argument.
190 (c_parser_gimple_goto_stmt): Likewise.
191 (c_parser_gimple_if_stmt): Likewise.
192 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
193 * c-parser.c (c_parser_declaration_or_fndef): Pass
194 hot_bb_threshold argument.
195 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
196 field.
197 (c_parser_gimple_parse_bb_spec_edge_probability): New.
198
f179b64e
JJ
1992019-04-26 Jakub Jelinek <jakub@redhat.com>
200
201 PR debug/90197
202 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
203 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
204 (c_parser_do_statement): Likewise.
205 (c_parser_for_statement): Likewise. Formatting fixes.
206 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
207 emit DEBUG_BEGIN_STMTs if needed.
208
e7178413
JJ
2092019-04-19 Jakub Jelinek <jakub@redhat.com>
210
c280b7ee
JJ
211 PR c/89888
212 * c-typeck.c (struct c_switch): Remove outside_range_p member.
213 (c_start_case): Don't clear it.
214 (do_case): Adjust c_add_case_label caller.
215 (c_finish_case): Adjust c_do_switch_warnings caller.
216
e7178413
JJ
217 PR c++/90108
218 * c-decl.c (merge_decls): If remove is main variant and
219 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
220 variant that has newdecl as TYPE_NAME if any.
221
60a2c645
JJ
2222019-04-12 Jakub Jelinek <jakub@redhat.com>
223
224 PR c/89933
225 * c-decl.c (merge_decls): When newdecl's type is its main variant,
226 don't try to remove it from the variant list, but instead assert
227 it has no variants.
228
2a82beaa
RB
2292019-04-01 Richard Biener <rguenther@suse.de>
230
231 PR c/71598
232 * c-tree.h (c_get_alias_set): Declare.
233 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
234 * c-objc-common.c (c_get_alias_set): Treat enumeral types
235 as the underlying integer type.
236
bec1da64
MS
2372019-03-19 Martin Sebor <msebor@redhat.com>
238
239 PR tree-optimization/89688
240 * c-decl.c (finish_decl): Call braced_lists_to_string for more
241 kinds of initializers.
242
855cd9b1
JJ
2432019-03-19 Jakub Jelinek <jakub@redhat.com>
244
245 PR c/89734
246 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
247 return type even if quals_used is 0. Formatting fixes.
248
baa09dc5
RB
2492019-03-14 Richard Biener <rguenther@suse.de>
250
251 * c-tree.h (enum c_declspec_il): New.
252 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
253 enum bitfield.
254 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
255 Pass start pass and declspec_il to c_parser_parse_gimple_body.
256 (c_parser_declspecs): Adjust.
257 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
258 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
259 and bitmap.h.
260 (struct gimple_parser): New.
261 (gimple_parser::push_edge): New method.
262 (c_parser_gimple_parse_bb_spec): New helper.
263 (c_parser_parse_gimple_body): Get start pass and IL specification.
264 Initialize SSA and CFG.
265 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
266 Build a gimple_parser parsing state and pass it along.
267 (c_parser_gimple_statement): Change intermittend __PHI internal
268 function argument for the edge.
269 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
270 (c_parser_gimple_goto_stmt): Record edges to build.
271 (c_parser_gimple_if_stmt): Likewise.
272 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
273 (c_parser_gimple_or_rtl_pass_list): Likewise.
274
a3f9f006
ML
2752019-03-11 Martin Liska <mliska@suse.cz>
276
277 * c-decl.c (check_for_loop_decls): Wrap an option name
278 in a string format message and fix GNU coding style.
279 * c-parser.c (c_parser_declspecs): Likewise.
280
1db01ff9
JJ
2812019-03-08 Jakub Jelinek <jakub@redhat.com>
282
283 PR tree-optimization/89550
284 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
285 returned true.
286 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
287 or warning returned true.
288
66dcb747
JJ
2892019-02-28 Jakub Jelinek <jakub@redhat.com>
290
291 PR c/89525
292 * c-typeck.c (convert_arguments): Call inform_declaration only if
293 the previous warning_at call returned true.
294
2263c9f2
TS
2952019-02-22 Thomas Schwinge <thomas@codesourcery.com>
296
297 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
298 parameter. Adjust all users.
299 (c_parser_oacc_simple_clause): Replace parser with loc formal
300 parameter. Adjust all users.
301
19695f4d
CLT
3022019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
303
304 PR c/87924
305 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
306 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
307
5f88ba10
JJ
3082019-02-15 Jakub Jelinek <jakub@redhat.com>
309
310 PR c/89340
311 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
312 before c_decl_attributes rather than after it.
313
cfc30fd1
JJ
3142019-02-06 Jakub Jelinek <jakub@redhat.com>
315
316 PR c/89211
317 * c-parser.c (c_parser_declaration_or_fndef): Don't update
318 DECL_ARGUMENTS of d if it has been defined already. Use a single if
319 instead of 3 nested ifs.
320
fbe83e6b
JM
3212019-02-06 Joseph Myers <joseph@codesourcery.com>
322
323 PR c/88584
324 * c-decl.c (finish_decl): Do not complete array types for arrays
325 with external linkage not at file scope.
326
f461f938
RB
3272019-02-05 Richard Biener <rguenther@suse.de>
328
329 PR c/88606
330 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
331 all type variants when not supported.
332
fe509359
JJ
3332019-01-30 Jakub Jelinek <jakub@redhat.com>
334
335 PR c/89061
336 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
337 * c-decl.c (decl_jump_unsafe): Return false for
338 C_DECL_COMPOUND_LITERAL_P decls.
339 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
340
6a335b96
JJ
3412019-01-29 Jakub Jelinek <jakub@redhat.com>
342
f4b7e754
JJ
343 PR c/89045
344 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
345 scope.
346
6a335b96
JJ
347 PR c/86125
348 * c-decl.c (last_fileptr_type): Remove.
349 (last_structptr_types): New variable.
350 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
351 {old,new}rettype instead of the types themselves. Assert
352 last_structptr_types array has the same number of elements
353 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
354 argument oldtype and newtype. Instead of handling
355 just fileptr_type_node specially, handle all builtin_structptr_types
356 pointer nodes. Formatting fix.
357
d8b5a1a0
MS
3582019-01-24 Martin Sebor <msebor@redhat.com>
359
360 PR c/86125
361 PR c/88886
362 PR middle-end/86308
363 * c-decl.c (match_builtin_function_types): Add arguments.
364 (diagnose_mismatched_decls): Diagnose mismatched declarations
365 of built-ins more strictly.
366
e21c4491
JJ
3672019-01-24 Jakub Jelinek <jakub@redhat.com>
368
369 PR c++/88976
370 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
371 on #pragma omp cancel with different modifiers.
372
420183d9
L
3732019-01-18 H.J. Lu <hongjiu.lu@intel.com>
374
375 PR c/51628
376 PR c/88664
377 * c-typeck.c (convert_for_assignment): Upate the
378 warn_for_address_or_pointer_of_packed_member call.
379
17ad43dd
TH
3802019-01-16 Tom Honermann <tom@honermann.net>
381 Jason Merrill <jason@redhat.com>
382
383 * c-typeck.c (digest_init): Revised the error message produced for
384 ill-formed cases of array initialization with a string literal.
385 (error_init): Make variadic.
386
5f07d78a
JJ
3872019-01-12 Jakub Jelinek <jakub@redhat.com>
388
389 * c-typeck.c (convert_for_assignment): Fix a comment typo.
390
c4581bbf
JJ
3912019-01-07 Jakub Jelinek <jakub@redhat.com>
392
393 PR c/88701
394 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
395 if current_function_decl is non-NULL.
396
65c5b1eb
JM
3972019-01-07 Joseph Myers <joseph@codesourcery.com>
398
399 PR c/88720
400 PR c/88726
401 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
402 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
403 functions declared but never defined only for external scope, not
404 for other scopes.
405
d8fcab68
JJ
4062019-01-07 Jakub Jelinek <jakub@redhat.com>
407
408 PR c++/85052
409 * c-parser.c (c_parser_postfix_expression): Parse
410 __builtin_convertvector.
411
a5544970
JJ
4122019-01-01 Jakub Jelinek <jakub@redhat.com>
413
414 Update copyright years.
415
da77eace
L
4162018-12-20 H.J. Lu <hongjiu.lu@intel.com>
417
418 PR c/51628
419 * c-typeck.c (convert_for_assignment): Call
420 warn_for_address_or_pointer_of_packed_member.
421
1edf8866
SB
4222018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
423
424 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
425 a more specific error message (instead of just falling through).
426
db4fd626
SB
4272018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
428
429 * c-parser.c (c_parser_asm_statement): Keep track of the location each
430 asm qualifier is first seen; use that to give nicer "duplicate asm
431 qualifier" messages. Delete 'quals" variable, instead pass the
432 "is_volatile_ flag to build_asm_stmt directly.
433 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
434 * c-typeck.c (build_asm_stmt): Ditto; adjust.
435
9c9cfcbb
SB
4362018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
437
438 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
439 "done" boolean variable.
440
a14feb3c
DM
4412018-12-19 David Malcolm <dmalcolm@redhat.com>
442
443 PR c++/87504
444 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
445 Move from here to gcc-rich-location.h and gcc-rich-location.c.
446 (build_binary_op): Use struct op_location_t and
447 class binary_op_rich_location.
448
6d939173
JJ
4492018-12-11 Jakub Jelinek <jakub@redhat.com>
450
451 PR sanitizer/88426
452 * c-convert.c (convert): Call c_fully_fold before calling
453 ubsan_instrument_float_cast.
454
b7055028
SB
4552018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
456
457 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
458 setting "quals".
459
5b76e75f
SB
4602018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
461
462 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
463 after asm. Pass a flag for it to build_asm_expr.
464 * c-tree.h (build_asm_expr): Update declaration.
465 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
466 set ASM_INLINE_P.
467
30bd42b9
SB
4682018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
469
470 PR inline-asm/55681
471 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
472 combination of volatile and goto, in any order, without repetitions.
473
9df6c0e4
JB
4742018-12-04 James Norris <jnorris@codesourcery.com>
475 Cesar Philippidis <cesar@codesourcery.com>
476 Julian Brown <julian@codesourcery.com>
477
478 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
479 code.
480
f44697b7
RB
4812018-11-30 Richard Biener <rguenther@suse.de>
482
483 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
484 _Literal (type) { ... } as empty aggregate or vector constructor.
485
550dfbdc
MS
4862018-11-29 Martin Sebor <msebor@redhat.com>
487
488 PR c/88091
489 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
490 (convert_arguments): Add comments. Pass additional argument to
491 the function above.
492
673670da
MS
4932018-11-29 Martin Sebor <msebor@redhat.com>
494
495 PR c/88172
496 PR testsuite/88208
497 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
498
db1d09b0
MS
4992018-11-23 Martin Sebor <msebor@redhat.com>
500
501 PR testsuite/88098
502 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
503 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
504
98f08eb8
MS
5052018-11-20 Martin Sebor <msebor@redhat.com>
506
507 * c-parser.c (c_parser_has_attribute_expression): New function.
508 (c_parser_attribute): New function.
509 (c_parser_attributes): Move code into c_parser_attribute.
510 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
511
cd5da983
MS
5122018-11-15 Martin Sebor <msebor@redhat.com>
513
514 PR c/83656
515 * c-decl.c (header_for_builtin_fn): Declare.
516 (diagnose_mismatched_decls): Diagnose declarations of built-in
517 functions without a prototype.
518 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
519 (convert_argument): Same.
520 (convert_arguments): Factor code out into convert_argument.
521 Detect mismatches between built-in formal arguments in calls
522 to built-in without prototype.
523 (build_conditional_expr): Same.
524 (type_or_builtin_type): New function.
525 (convert_for_assignment): Add argument. Conditionally issue
526 warnings instead of errors for mismatches.
527
620e594b
DM
5282018-11-13 David Malcolm <dmalcolm@redhat.com>
529
530 * c-decl.c: Replace "source_location" with "location_t".
531 * c-tree.h: Likewise.
532 * c-typeck.c: Likewise.
533 * gimple-parser.c: Likewise.
534
3179ebae
JJ
5352018-11-09 Jakub Jelinek <jakub@redhat.com>
536
81a227c6
JJ
537 * c-parser.c (c_parser_omp_clause_final): Use
538 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
539 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
540 parsing instead of c_parser_paren_condition.
541 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
542 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
543 c_fully_fold instead of c_parser_condition.
544 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
545 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
546 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
547 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
548 c_parser_expr_no_commas instead of c_parser_expression.
549
98c91c56
JJ
550 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
551 reduction clause with inscan modifier.
552
3179ebae
JJ
553 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
554 clauses other than atomic_default_mem_order.
555
28567c40
JJ
5562018-11-08 Jakub Jelinek <jakub@redhat.com>
557
558 * c-parser.c: Include memmode.h.
559 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
560 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
561 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
562 task_reduction clauses.
563 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
564 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
565 section, or lvalue assignment expression.
566 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
567 (c_parser_omp_clause_lastprivate): Parse optional
568 conditional: modifier.
569 (c_parser_omp_clause_hint): Require constant integer expression rather
570 than just integer expression.
571 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
572 clause.
573 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
574 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
575 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
576 functions.
577 (c_parser_omp_clause_depend): Parse iterator modifier and handle
578 iterators. Parse mutexinoutset and depobj kinds.
579 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
580 callers.
581 (c_parser_omp_all_clauses): Likewise. Handle
582 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
583 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
584 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
585 default memory order from requires directive if any. Adjust
586 c_finish_omp_atomic caller.
587 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
588 (c_parser_omp_flush): Parse flush with memory-order-clause.
589 (c_parser_omp_for_loop): Allow NE_EXPR even in
590 OpenMP loops, adjust c_finish_omp_for caller.
591 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
592 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
593 Allow to be called while parsing combined parallel master.
594 Parse combined master taskloop{, simd}.
595 (c_parser_omp_parallel): Parse combined
596 parallel master{, taskloop{, simd}} constructs.
597 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
598 (OMP_TASKGROUP_CLAUSE_MASK): Define.
599 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
600 (OMP_TASKWAIT_CLAUSE_MASK): Define.
601 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
602 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
603 around teams body. Use SET_EXPR_LOCATION.
604 (c_parser_omp_target_data): Allow target data
605 with only use_device_ptr clauses.
606 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
607 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
608 (c_parser_omp_requires): New function.
609 (c_finish_taskloop_clauses): New function.
610 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
611 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
612 declaration. Disallow in_reduction clause when combined with parallel
613 master.
614 (c_parser_omp_construct): Adjust c_parser_omp_master and
615 c_parser_omp_taskgroup callers.
616 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
617 other than cancel.
618 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
619 like OMP_CLAUSE_REDUCTION.
620 (handle_omp_array_sections): Likewise. Call save_expr on array
621 reductions before calling build_index_type. Handle depend clauses
622 with iterators.
623 (struct c_find_omp_var_s): New type.
624 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
625 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
626 with static, runtime or auto schedule kinds. Call save_expr for whole
627 array reduction sizes. Diagnose reductions with zero sized elements
628 or variable length structures. Diagnose nogroup clause used with
629 reduction clause(s). Handle depend clause with
630 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
631 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
632 some different type for other kinds. Use build_unary_op with
633 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
634 Handle depend clauses with iterators. Remove no longer needed special
635 case that predetermined const qualified vars may be specified in
636 firstprivate clause. Complain if const qualified vars are mentioned
637 in data-sharing clauses other than firstprivate or shared. Use
638 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
639 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
640 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
641 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
642
7e2de6df
DM
6432018-10-29 David Malcolm <dmalcolm@redhat.com>
644
645 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
646 logic for change to name_hint::operator bool.
647 (undeclared_variable): Likewise.
648 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
649 (c_parser_parameter_declaration): Likewise.
650
9f936c86
JM
6512018-10-17 Joseph Myers <joseph@codesourcery.com>
652
653 * c-errors.c (pedwarn_c11): New function.
654 * c-parser.c (disable_extension_diagnostics): Save
655 warn_c11_c2x_compat and set it to 0.
656 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
657 (c_parser_static_assert_declaration_no_semi): Handle
658 _Static_assert without string constant.
659 * c-tree.h (pedwarn_c11): New prototype.
660
033eb567
DM
6612018-10-17 David Malcolm <dmalcolm@redhat.com>
662
663 * Make-lang.in (selftest-c): New.
664 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
665 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
666 from gcc/Makefile.in.
667
0edf3afe
RB
6682018-10-02 Richard Biener <rguenther@suse.de>
669
670 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
671
8313a764
JM
6722018-09-26 Joseph Myers <joseph@codesourcery.com>
673
674 PR c/87390
675 * c-typeck.c (build_binary_op): Use excess precision for
676 comparisons of integers and floating-point for C11 and later.
677
ce6f0888
MJ
6782018-09-26 Martin Jambor <mjambor@suse.cz>
679
680 PR c/87347
681 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
682 comment.
683
9c4a4b3c
DM
6842018-09-17 David Malcolm <dmalcolm@redhat.com>
685
686 * c-objc-common.c (range_label_for_type_mismatch::get_text):
687 Update for new param.
688 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
689 Likewise.
690
80c6d1f4
MJ
6912018-09-17 Martin Jambor <mjambor@suse.cz>
692
693 PR c/63886
694 * c-parser.c: (warn_for_abs): New function.
695 (c_parser_postfix_expression_after_primary): Call it.
696
4a426e36
BE
6972018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
698
699 * c-typeck.c (digest_init): Shorten overlength strings.
700
6d900107
BE
7012018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
702
703 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
704
b5764229
BE
7052018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
706
707 * c-decl.c (finish_decl): Call braced_list_to_string here ...
708 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
709
22eea6b2
AM
7102018-08-30 Alexander Monakov <amonakov@ispras.ru>
711
712 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
713 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
714
85204e23
DM
7152018-08-27 David Malcolm <dmalcolm@redhat.com>
716
717 PR 87091
718 * c-decl.c (implicitly_declare): Update call to
719 maybe_add_include_fixit to suggest overriding the location, as it
720 is for a note.
721 * c-objc-common.c (c_tree_printer): Update for conversion of
722 show_caret_p to a tri-state.
723
3d78e008
ML
7242018-08-27 Martin Liska <mliska@suse.cz>
725
726 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
727 fndecl_built_in_p and remove check for FUNCTION_DECL if
728 possible.
3d78e008
ML
729 (diagnose_mismatched_decls): Likewise.
730 (merge_decls): Likewise.
731 (warn_if_shadowing): Likewise.
732 (pushdecl): Likewise.
733 (implicitly_declare): Likewise.
734 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
735 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
736 * c-typeck.c (build_function_call_vec): Likewise.
737 (convert_arguments): Likewise.
738
097f82ec
DM
7392018-08-20 David Malcolm <dmalcolm@redhat.com>
740
741 PR other/84889
742 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
743 (diagnose_mismatched_decls): Likewise, in various places.
744 (warn_if_shadowing): Likewise.
745 (implicit_decl_warning): Likewise.
746 (implicitly_declare): Likewise.
747 (undeclared_variable): Likewise.
748 (declare_label): Likewise.
749 (grokdeclarator): Likewise.
750 (start_function): Likewise.
751 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
752 (c_parser_parameter_declaration): Likewise.
753 (c_parser_binary_expression): Likewise.
754 * c-typeck.c (c_expr_sizeof_expr): Likewise.
755 (parser_build_binary_op): Likewise.
756 (build_unary_op): Likewise.
757 (error_init): Likewise.
758 (pedwarn_init): Likewise.
759 (warning_init): Likewise.
760 (convert_for_assignment): Likewise.
761
96e6ae57
DM
7622018-08-15 David Malcolm <dmalcolm@redhat.com>
763
764 * c-objc-common.c: Include "gcc-rich-location.h".
765 (c_tree_printer): Move implemenation of '%T' to...
766 (print_type): ...this new function.
767 (range_label_for_type_mismatch::get_text): New function.
768 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
769 range for the various ic_argpass cases.
770 (class maybe_range_label_for_tree_type_mismatch): New class.
771 (build_binary_op): Use it when calling binary_op_error.
772
0cd020ae
PK
7732018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
774
775 * c-decl.c (start_decl): Do not warn if variables is named as main
776 and is a local variable.
777
72733314
IS
7782018-08-15 Iain Sandoe <iain@sandoe.co.uk>
779
780 PR c/19315
781 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
782 objects of unknown size.
783
23aa9f7c
MS
7842018-08-13 Martin Sebor <msebor@redhat.com>
785
786 PR tree-optimization/71625
787 * c-parser.c (c_parser_declaration_or_fndef): Call
788 braced_list_to_string.
789
e5e7e50d
BH
7902018-08-03 Bogdan Harjoc <harjoc@gmail.com>
791
792 PR c/86690
793 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
794 errors.
795
8a45b051
MS
7962018-08-01 Martin Sebor <msebor@redhat.com>
797
798 PR tree-optimization/86650
799 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
800 and TREE_BLOCK (t) from within percent_K_format to this callsite.
801
5922dcb5
JJ
8022018-08-01 Jakub Jelinek <jakub@redhat.com>
803
804 PR c/85704
805 * c-typeck.c (init_field_decl_cmp): New function.
806 (output_pending_init_elements): Use it for field comparisons
807 instead of pure bit_position comparisons.
808
9b452033
JJ
8092018-07-12 Jakub Jelinek <jakub@redhat.com>
810
811 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
812 type here, instead add "omp declare target implicit" attribute.
813 (finish_decl): Diagnose vars without mappable type here.
814
829c6349
CLT
8152018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
816 Thomas Schwinge <thomas@codesourcery.com>
817 Cesar Philippidis <cesar@codesourcery.com>
818
819 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
820 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
821 to their non-present_or_* counterparts. Make 'self' an alias to
822 PRAGMA_OACC_CLAUSE_HOST.
823 (c_parser_oacc_data_clause): Update GOMP mappings for
824 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
825 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
826 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
827 Remove support for present_or_* clauses.
828 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
829 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
830 (OACC_DECLARE_CLAUSE_MASK): Likewise.
831 (OACC_DATA_CLAUSE_MASK): Likewise.
832 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
833 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
834 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
835 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
836 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
837
e197e64e
KV
8382018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
839
840 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
841 * gimple-parser.c (c_parser_gimple_statement): Likewise.
842 (c_parser_gimple_unary_expression): Likewise.
843
487f2f61
JJ
8442018-06-15 Jakub Jelinek <jakub@redhat.com>
845
846 PR c/86093
847 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
848 before doing POINTER_DIFF_EXPR.
849
e4d44a37
MP
8502018-06-07 Marek Polacek <polacek@redhat.com>
851
852 PR c/85318
853 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
854 for loop initial declarations.
855
b67b9225
DP
8562018-05-30 David Pagan <dave.pagan@oracle.com>
857
858 PR c/55976
859 * c-decl.c (grokdeclarator): Update check for return type warnings.
860 (start_function): Likewise.
861 (finish_function): Likewise.
862 * c-typeck.c (c_finish_return): Update check for return type warnings.
863 Pass OPT_Wreturn_type to pedwarn when appropriate.
864
c566cc9f
RS
8652018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
866
867 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
868 __FMA_EXPR handlng.
869
e4f81565
RS
8702018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
871
872 * gimple-parser.c: Include internal-fn.h.
873 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
874 (c_parser_gimple_call_internal): New function.
875 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
876 Fix typos in comment.
877
79e7b1fe
JJ
8782018-05-10 Jakub Jelinek <jakub@redhat.com>
879
880 PR c++/85662
881 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
882 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
883 fold_convert_loc.
884 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
885 fold_offsetof_1, pass argtype as TYPE to it and drop the
886 fold_convert_loc.
887
f7584c81
DP
8882018-05-02 David Pagan <dave.pagan@oracle.com>
889
890 PR c/30552
891 * c-decl.c (old_style_parameter_scope): New function.
892 * c-parser.c (c_parser_postfix_expression): Check for statement
893 expressions in old-style function parameter list declarations.
894 * c-parser.h (old_style_parameter_scope): New extern declaration.
895
b33a0cb3
JJ
8962018-04-25 Jakub Jelinek <jakub@redhat.com>
897
898 PR sanitizer/84307
899 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
900 it is not TREE_STATIC.
901 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
902 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
903 its COMPOUND_LITERAL_EXPR_DECL.
904
c5c5822a
JM
9052018-03-21 Joseph Myers <joseph@codesourcery.com>
906
907 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
908 where all functions return the same _FloatN or _FloatNx type,
909 treat integer types as _Float64 instead of double.
910
aa1c9429
JJ
9112018-03-21 Jakub Jelinek <jakub@redhat.com>
912
913 PR c/84999
914 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
915 building vector comparison, diagnose it and return error_mark_node.
916
9bb45a95
JJ
9172018-03-15 Jakub Jelinek <jakub@redhat.com>
918
919 PR c/84853
920 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
921 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
922 INTEGER_TYPE element type.
923
ada6bad9
DP
9242018-03-13 David Pagan <dave.pagan@oracle.com>
925
926 PR c/46921
927 * c-typeck.c (output_init_element): Ensure field initializer
928 expression is always evaluated if there are side effects.
929
849bbdb9
JJ
9302018-03-06 Jakub Jelinek <jakub@redhat.com>
931
932 PR c/84721
933 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
934 !building_stmt_list_p ().
935
d74641bd
RS
9362018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
937
938 PR c/84305
939 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
940 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
941 and include the BIND_EXPR in the list of things that need to be
942 pre-evaluated.
943
0444aa9c
NS
9442018-02-09 Nathan Sidwell <nathan@acm.org>
945
946 PR c/84293
947 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
948 to strict_aliasing_warning.
949
7c30b12a
PC
9502018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
951
952 * c-typeck.c (really_start_incremental_init, push_init_level,
953 set_nonincremental_init, output_init_element, process_init_element):
954 Use DECL_UNNAMED_BIT_FIELD.
955
2be4dfcb
MP
9562018-01-31 Marek Polacek <polacek@redhat.com>
957
958 PR c/81779
959 * c-parser.c (c_parser_compound_statement_nostart): Call
960 expansion_point_location_if_in_system_header.
961
bb9869d5
DM
9622018-01-17 David Malcolm <dmalcolm@redhat.com>
963
964 PR c++/83814
965 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
966 the C part.
967
b4923738
JJ
9682018-01-13 Jakub Jelinek <jakub@redhat.com>
969
970 PR c/83801
971 * c-tree.h (decl_constant_value_1): Add a bool argument.
972 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
973 returning a CONSTRUCTOR if it is true. Use error_operand_p.
974 (decl_constant_value): Adjust caller.
975 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
976 decl_constant_value_1 as IN_INIT. Otherwise, punt if
977 decl_constant_value returns initializer that has BLKmode or
978 array type.
979 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
980
928686b1
RS
9812018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
982 Alan Hayward <alan.hayward@arm.com>
983 David Sherwood <david.sherwood@arm.com>
984
985 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
986 TYPE_VECTOR_SUBPARTS.
987
85ec4feb
JJ
9882018-01-03 Jakub Jelinek <jakub@redhat.com>
989
990 Update copyright years.
991
913884f7
JJ
9922018-01-01 Jakub Jelinek <jakub@redhat.com>
993
994 PR c/83595
995 * c-parser.c (c_parser_braced_init, c_parser_initelt,
996 c_parser_conditional_expression, c_parser_cast_expression,
997 c_parser_sizeof_expression, c_parser_alignof_expression,
998 c_parser_postfix_expression, c_parser_omp_declare_reduction,
999 c_parser_transaction_expression): Use set_error () method instead
1000 of setting value member to error_mark_node.
1001
c6cfa2bf
MM
10022017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
1003
1004 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
1005 and _Float<N>X built-in functions.
1006
11d29d63
JJ
10072017-12-22 Jakub Jelinek <jakub@redhat.com>
1008
14ec014e
JJ
1009 PR debug/83550
1010 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
1011 TYPE_STUB_DECL and call rest_of_type_compilation before processing
1012 incomplete vars rather than after it.
1013
11d29d63
JJ
1014 PR debug/83547
1015 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
1016 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
1017 and consider empty ones if there are no other stmts. For
1018 -Wunused-value walk all statements before the one only followed by
1019 DEBUG_BEGIN_STMTs.
1020
170a8bd6 10212017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 1022 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
1023
1024 * c-parser.c (c_parser_while_statement): Add unroll parameter and
1025 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
1026 (c_parser_do_statement): Likewise.
1027 (c_parser_for_statement): Likewise.
1028 (c_parser_statement_after_labels): Adjust calls to above.
1029 (c_parse_pragma_ivdep): New static function.
1030 (c_parser_pragma_unroll): Likewise.
1031 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
1032 <PRAGMA_UNROLL>: New case.
1033
01512446
JJ
10342017-12-19 Jakub Jelinek <jakub@redhat.com>
1035
1036 * c-typeck.c (comptypes_internal, function_types_compatible_p,
1037 perform_integral_promotions, digest_init): Replace Yoda conditions
1038 with typical order conditions.
1039 * c-decl.c (check_bitfield_type_and_width): Likewise.
1040
c65e18d3
BE
10412017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1042
1043 * c-typeck.c (c_safe_arg_type_equiv_p,
1044 c_safe_function_type_cast_p): New function.
1045 (build_c_cast): Implement -Wcast-function-type.
1046
b7280579
RB
10472017-12-14 Richard Biener <rguenther@suse.de>
1048
1049 PR c/83415
1050 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
1051 like REALPART_EXPR for the behavior of whether its operand
1052 is an lvalue.
1053
49e6a6c0
MP
10542017-12-12 Marek Polacek <polacek@redhat.com>
1055
1056 PR c/82679
1057 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
1058
96a95ac1
AO
10592017-12-12 Alexandre Oliva <aoliva@redhat.com>
1060
1061 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
1062 * c-parser.c (add_debug_begin_stmt): New.
1063 (c_parser_declaration_or_fndef): Call it.
1064 (c_parser_compound_statement_nostart): Likewise.
1065 (c_parser_statement_after_labels): Likewise.
1066 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
1067
4b2b493f
JM
10682017-12-07 Joseph Myers <joseph@codesourcery.com>
1069
1070 * c-decl.c (build_compound_literal): Add parameter alignas_align
1071 and set alignment of decl if nonzero.
1072 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
1073 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
1074 qualifier.
1075 (c_parser_struct_declaration): Update syntax comment.
1076 (c_parser_type_name): Add alignas_ok argument and pass it to
1077 c_parser_declspecs.
1078 (c_parser_cast_expression): Pass true to c_parser_type_name and
1079 give error if a cast used an _Alignas specifier.
1080 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
1081 give error if sizeof (type-name) used an _Alignas specifier.
1082 (c_parser_alignof_expression): Pass true to c_parser_type_name and
1083 give error if _Alignof (type-name) used an _Alignas specifier.
1084 (c_parser_postfix_expression_after_paren_type): Check specified
1085 alignment for a compound literal and pass it to
1086 build_compound_literal.
1087 * c-parser.h (c_parser_type_name): Update prototype.
1088 * c-tree.h (build_compound_literal): Update prototype.
1089
5d9ae53d
MS
10902017-12-07 Martin Sebor <msebor@redhat.com>
1091
1092 PR c/81544
1093 * c-decl.c (c_decl_attributes): Look up existing declaration and
1094 pass it to decl_attributes.
1095
c79144f8
DM
10962017-12-06 David Malcolm <dmalcolm@redhat.com>
1097
1098 PR c/83236
1099 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
1100 reserved for use by the implementation.
1101
613bc14f
DM
11022017-12-06 David Malcolm <dmalcolm@redhat.com>
1103
1104 * c-decl.c: Include "c-family/c-spellcheck.h".
1105
05abad4c
ML
11062017-12-05 Martin Liska <mliska@suse.cz>
1107 Jakub Jelinek <jakub@redhat.com>
1108
1109 * c-typeck.c (pointer_diff): Add new argument and instrument
1110 pointer subtraction.
1111 (build_binary_op): Similar for pointer comparison.
1112
cc6534d4
JJ
11132017-12-01 Jakub Jelinek <jakub@redhat.com>
1114
65791f42
JJ
1115 PR c/79153
1116 * c-parser.c: Include tree-iterator.h.
1117 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
1118 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
1119 on it.
1120
cc6534d4
JJ
1121 PR c/83222
1122 * c-tree.h (decl_constant_value_1): Declare.
1123 * c-typeck.c (decl_constant_value_1): New function.
1124 (decl_constant_value): Use it.
1125 * c-fold.c (c_fully_fold_internal): If in_init, use
1126 decl_constant_value_1 instead of decl_constant_value.
1127
5de73c05
JJ
11282017-11-30 Jakub Jelinek <jakub@redhat.com>
1129
1130 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
1131
058f0b9e
JJ
11322017-11-28 Jakub Jelinek <jakub@redhat.com>
1133
1134 PR sanitizer/81275
1135 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
1136 c_switch_covers_all_cases_p returns true.
1137
5e9d6aa4 11382017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 1139 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
1140
1141 * Make-lang.in (c/c-array-notation.o): Remove.
1142 * c-array-notation.c: Delete.
1143 * c-decl.c: Remove cilkplus condition.
1144 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
1145 c_parser_cilk_verify_simd, c_parser_array_notation,
1146 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
1147 c_parser_cilk_simd_fn_vector_attrs,
1148 c_finish_cilk_simd_fn_tokens): Delete.
1149 (c_parser_declaration_or_fndef): Remove cilkplus condition.
1150 (c_parser_direct_declarator_inner): Ditto.
1151 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
1152 (c_parser_attributes, c_parser_compound_statement,
1153 c_parser_statement_after_labels, c_parser_if_statement,
1154 c_parser_switch_statement, c_parser_while_statement,
1155 c_parser_do_statement, c_parser_for_statement,
1156 c_parser_unary_expression, c_parser_postfix_expression,
1157 c_parser_postfix_expression_after_primary,
1158 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
1159 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
1160 support.
1161 * c-typeck.c (build_array_ref, build_function_call_vec,
1162 convert_arguments,
1163 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
1164 c_finish_loop, build_binary_op): Remove cilkplus support.
1165
9e851845
JJ
11662017-11-28 Jakub Jelinek <jakub@redhat.com>
1167
1168 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
1169 of build3.
1170
8c7dbea9
BK
11712017-11-14 Boris Kolpackov <boris@codesynthesis.com>
1172
1173 * Make-lang.in (c.install-plugin): Install backend import library.
1174
41521dee
JJ
11752017-11-23 Jakub Jelinek <jakub@redhat.com>
1176
1177 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
1178 pragma_stmt context.
1179
ac9effed
EB
11802017-11-23 Mike Stump <mikestump@comcast.net>
1181 Eric Botcazou <ebotcazou@adacore.com>
1182
1183 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
1184 ANNOTATE_EXPR.
1185 (c_parser_do_statement): Likewise.
1186 (c_parser_for_statement): Likewise.
1187
ce95abc4
DM
11882017-11-22 David Malcolm <dmalcolm@redhat.com>
1189
1190 PR c++/62170
1191 * c-objc-common.c (c_tree_printer): Convert penultimate param from
1192 bool to bool *. Within '%T' handling, if showing an "aka", use
1193 "quoted" param to add appropriate quoting.
1194
974aedcc
MP
11952017-11-22 Marek Polacek <polacek@redhat.com>
1196
1197 PR c++/60336
1198 PR middle-end/67239
1199 PR target/68355
1200 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
1201
d4300cc6
DM
12022017-11-21 David Malcolm <dmalcolm@redhat.com>
1203
1204 PR c/83056
1205 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
1206 earlier failed lookups.
1207
1af4ebf5
MG
12082017-11-21 Marc Glisse <marc.glisse@inria.fr>
1209
1210 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
1211 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
1212
26edace6
DM
12132017-11-20 David Malcolm <dmalcolm@redhat.com>
1214
1215 PR c/81404
1216 * c-decl.c: Include "c-family/known-headers.h".
1217 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
1218 to known-headers.cc.
1219 (class suggest_missing_header): Move to known-header.h.
1220 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
1221 than get_c_name_hint.
1222
b1212255
DM
12232017-11-20 David Malcolm <dmalcolm@redhat.com>
1224
1225 * c-decl.c (get_c_name_hint): New function.
1226 (class suggest_missing_header): New class.
1227 (lookup_name_fuzzy): Call get_c_name_hint and use it to
1228 suggest missing headers to the user.
1229
6c7a259b
DM
12302017-11-20 David Malcolm <dmalcolm@redhat.com>
1231
1232 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1233 Include "c-family/name-hint.h"
1234 (implicit_decl_warning): Convert "hint" from
1235 const char * to name_hint. Pass location to
1236 lookup_name_fuzzy. Suppress any deferred diagnostic if the
1237 warning was not printed.
1238 (undeclared_variable): Likewise for "guessed_id".
1239 (lookup_name_fuzzy): Convert return type from const char *
1240 to name_hint. Add location_t param.
1241 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1242 Include "c-family/name-hint.h"
1243 (c_parser_declaration_or_fndef): Convert "hint" from
1244 const char * to name_hint. Pass location to lookup_name_fuzzy.
1245 (c_parser_parameter_declaration): Likewise.
1246
f9c59f7e
JJ
12472017-11-19 Jakub Jelinek <jakub@redhat.com>
1248
1249 PR c/66618
1250 PR c/69960
1251 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
1252 where needed.
1253 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
1254 handle_omp_array_sections): Likewise.
1255 (digest_init): Don't call decl_constant_value_for_optimization.
1256 * c-tree.h (decl_constant_value_for_optimization): Removed.
1257 * c-fold.c (c_fold_array_ref): New function.
1258 (c_fully_fold_internal): Add LVAL argument, propagate it through
1259 recursive calls. For VAR_P call decl_constant_value and
1260 unshare if not LVAL and either optimizing or IN_INIT. Remove
1261 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
1262 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
1263 (c_fully_fold): Add LVAL argument, pass it through to
1264 c_fully_fold_internal.
1265 (decl_constant_value_for_optimization): Removed.
1266
3ca0dc60
JM
12672017-11-15 Joseph Myers <joseph@codesourcery.com>
1268
1269 PR c/81156
1270 * c-parser.c (check_tgmath_function): New function.
1271 (enum tgmath_parm_kind): New enum.
1272 (c_parser_postfix_expression): Handle __builtin_tgmath.
1273
64a5912c
DM
12742017-10-31 David Malcolm <dmalcolm@redhat.com>
1275
1276 * c-decl.c (implicit_decl_warning): Update for renaming of
1277 pedwarn_at_rich_loc and warning_at_rich_loc.
1278 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
1279 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
1280 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1281 (c_parser_struct_or_union_specifier): Likewise for renaming of
1282 pedwarn_at_rich_loc.
1283 (c_parser_parameter_declaration): Likewise for renaming of
1284 error_at_rich_loc.
1285 * c-typeck.c (build_component_ref): Likewise.
1286 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
1287 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
1288 (set_init_label): Likewise for renaming of error_at_rich_loc.
1289
c1136864
RB
12902017-10-30 Richard Biener <rguenther@suse.de>
1291
1292 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
1293 stmts.
1294
ee5fd23a
MM
12952017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
1296
1297 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
1298 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
1299
1a59ccf2
DM
13002017-10-25 David Malcolm <dmalcolm@redhat.com>
1301
1302 PR c/7356
1303 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
1304 semicolons.
1305
bc1a75dd
JJ
13062017-10-25 Jakub Jelinek <jakub@redhat.com>
1307
1308 PR libstdc++/81706
1309 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
1310 newdecl to corresponding __builtin_ if any.
1311
ff1ff960
PC
13122017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
1313
1314 PR c++/82466
1315 * c-decl.c (diagnose_mismatched_decls): Use
1316 OPT_Wbuiltin_declaration_mismatch.
1317
62e1c678
DM
13182017-10-12 David Malcolm <dmalcolm@redhat.com>
1319
1320 * c-parser.c (c_parser_require): Add "type_is_unique" param and
1321 use it to guard calls to maybe_suggest_missing_token_insertion.
1322 (c_parser_parms_list_declarator): Override default value of new
1323 "type_is_unique" param to c_parser_require.
1324 (c_parser_asm_statement): Likewise.
1325 * c-parser.h (c_parser_require): Add "type_is_unique" param,
1326 defaulting to true.
1327
a92f6726
NS
13282017-10-11 Nathan Sidwell <nathan@acm.org>
1329
1330 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
1331
8e6cdc90
RS
13322017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1333
1334 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
1335 operating on trees as wide_ints.
1336 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
1337 (c_tree_equal): Likewise.
1338
8139a48e
DM
13392017-10-04 David Malcolm <dmalcolm@redhat.com>
1340
1341 * c-decl.c (push_parm_decl): Store c_parm's location into the
1342 PARAM_DECL.
1343 (build_c_parm): Add "loc" param and store it within the c_parm.
1344 * c-parser.c (struct c_parser): Add "last_token_location" field.
1345 (c_parser_consume_token): Store location of the token into the
1346 new field.
1347 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
1348 when handling a FUNCTION_DECL, if it doesn't already have them.
1349 (c_parser_parameter_declaration): Generate a location for the
1350 parameter, and pass it to the call to build_c_parm.
1351 * c-tree.h (struct c_parm): Add field "loc".
1352 (build_c_parm): Add location_t param.
1353 * c-typeck.c (get_fndecl_argument_location): New function.
1354 (inform_for_arg): New function.
1355 (convert_for_assignment): Use inform_for_arg when dealing with
1356 ic_argpass.
1357
2a389958
JJ
13582017-09-29 Jakub Jelinek <jakub@redhat.com>
1359
7d386d45
JJ
1360 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
1361 width is non-NULL.
1362 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
1363 don't SET_DECL_C_BIT_FIELD here.
1364
2a389958
JJ
1365 PR c/82340
1366 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
1367 instead of trying to set just TREE_READONLY manually.
1368
ebc6a85e
TV
13692017-09-16 Tom de Vries <tom@codesourcery.com>
1370
1371 PR c/81875
1372 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
1373 cond itself.
1374
bb75facd
JM
13752017-09-15 Joseph Myers <joseph@codesourcery.com>
1376
1377 PR c/82071
1378 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
1379 for C11.
1380 (build_conditional_expr): For C11, generate result with excess
1381 precision when one argument is an integer and the other is of a
1382 type using excess precision.
1383
1d933576
BE
13842017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
1385
1386 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
1387
267bbb6f
MP
13882017-09-13 Marek Polacek <polacek@redhat.com>
1389
1390 PR c/82167
1391 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
1392 than expr.original_type.
1393
6836632e
NS
13942017-09-12 Nathan Sidwell <nathan@acm.org>
1395
1396 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1397 resort_sorted_fields): Moved from c-family/c-common.c.
1398 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
1399
e035be33
JM
14002017-09-01 Joseph Myers <joseph@codesourcery.com>
1401
1402 PR c/82071
1403 * c-typeck.c (build_atomic_assign): Handle argument with excess
1404 precision. Ensure any EXCESS_PRECISION_EXPR is present in
1405 argument passed to build_binary_op and convert_for_assignment but
1406 not for call to c_fully_fold.
1407 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
1408 Ensure build_binary_op is called with argument with original
1409 semantic type. Avoid calling c_fully_fold with an
1410 EXCESS_PRECISION_EXPR from build_binary_op.
1411
d2e05fcb
JJ
14122017-09-01 Jakub Jelinek <jakub@redhat.com>
1413
1414 PR c/81887
1415 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
1416
b397965c
RS
14172017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1418 Alan Hayward <alan.hayward@arm.com>
1419 David Sherwood <david.sherwood@arm.com>
1420
1421 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
1422 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
1423 m1 and m2 to the signed equivalent of a fixed-point
1424 SCALAR_TYPE_MODE.
1425
14e18d71
DM
14262017-08-24 David Malcolm <dmalcolm@redhat.com>
1427
1428 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
1429 than CAN_HAVE_LOCATION_P when determining whether to use the
1430 location_t value within "value".
1431
7f204c0f
DM
14322017-08-21 David Malcolm <dmalcolm@redhat.com>
1433
1434 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
1435 rather than peeking the location of the first token.
1436 * c-tree.h (c_expr::get_location): New method.
1437
2f687306
DM
14382017-08-21 David Malcolm <dmalcolm@redhat.com>
1439
1440 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
1441 to check_function_arguments.
1442
3e7b80d7
MP
14432017-08-18 Marek Polacek <polacek@redhat.com>
1444
1445 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
1446 commentary.
1447
00aa1fa2
L
14482017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1449
1450 PR c/53037
1451 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
1452 (check_bitfield_type_and_width): Don't allow bit-field with
1453 warn_if_not_aligned type.
1454
da67acb9
MS
14552017-08-14 Martin Sebor <msebor@redhat.com>
1456
1457 PR c/81117
1458 * c-objc-common.c (c_objc_common_init): Handle 'G'.
1459
bb85aa74
MP
14602017-08-11 Marek Polacek <polacek@redhat.com>
1461
1462 PR c/81795
1463 * c-decl.c (pushtag): Only print inform if the warning was printed.
1464 (grokdeclarator): Likewise.
1465
32129a17
DM
14662017-08-10 David Malcolm <dmalcolm@redhat.com>
1467
1468 * c-parser.c (c_parser_error): Rename to...
1469 (c_parser_error_richloc): ...this, making static, and adding
1470 "richloc" parameter, passing it to the c_parse_error call,
1471 rather than calling c_parser_set_source_position_from_token.
1472 (c_parser_error): Reintroduce, reimplementing in terms of the
1473 above, converting return type from void to bool.
1474 (class token_pair): New class.
1475 (struct matching_paren_traits): New struct.
1476 (matching_parens): New typedef.
1477 (struct matching_brace_traits): New struct.
1478 (matching_braces): New typedef.
1479 (get_matching_symbol): New function.
1480 (c_parser_require): Add param MATCHING_LOCATION, using it to
1481 highlight matching "opening" tokens for missing "closing" tokens.
1482 (c_parser_skip_until_found): Likewise.
1483 (c_parser_static_assert_declaration_no_semi): Convert explicit
1484 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
1485 class matching_parens, so that the pertinent open parenthesis is
1486 highlighted when there are problems locating the close
1487 parenthesis.
1488 (c_parser_struct_or_union_specifier): Likewise.
1489 (c_parser_typeof_specifier): Likewise.
1490 (c_parser_alignas_specifier): Likewise.
1491 (c_parser_simple_asm_expr): Likewise.
1492 (c_parser_braced_init): Likewise, for matching_braces.
1493 (c_parser_paren_condition): Likewise, for matching_parens.
1494 (c_parser_switch_statement): Likewise.
1495 (c_parser_for_statement): Likewise.
1496 (c_parser_asm_statement): Likewise.
1497 (c_parser_asm_operands): Likewise.
1498 (c_parser_cast_expression): Likewise.
1499 (c_parser_sizeof_expression): Likewise.
1500 (c_parser_alignof_expression): Likewise.
1501 (c_parser_generic_selection): Likewise.
1502 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
1503 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
1504 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
1505 In case CPP_OPEN_PAREN, pass loc_open_paren to the
1506 c_parser_skip_until_found call.
1507 (c_parser_objc_class_definition): Use class matching_parens as
1508 above.
1509 (c_parser_objc_method_decl): Likewise.
1510 (c_parser_objc_try_catch_finally_statement): Likewise.
1511 (c_parser_objc_synchronized_statement): Likewise.
1512 (c_parser_objc_at_property_declaration): Likewise.
1513 (c_parser_oacc_wait_list): Likewise.
1514 (c_parser_omp_var_list_parens): Likewise.
1515 (c_parser_omp_clause_collapse): Likewise.
1516 (c_parser_omp_clause_default): Likewise.
1517 (c_parser_omp_clause_if): Likewise.
1518 (c_parser_omp_clause_num_threads): Likewise.
1519 (c_parser_omp_clause_num_tasks): Likewise.
1520 (c_parser_omp_clause_grainsize): Likewise.
1521 (c_parser_omp_clause_priority): Likewise.
1522 (c_parser_omp_clause_hint): Likewise.
1523 (c_parser_omp_clause_defaultmap): Likewise.
1524 (c_parser_oacc_single_int_clause): Likewise.
1525 (c_parser_omp_clause_ordered): Likewise.
1526 (c_parser_omp_clause_reduction): Likewise.
1527 (c_parser_omp_clause_schedule): Likewise.
1528 (c_parser_omp_clause_num_teams): Likewise.
1529 (c_parser_omp_clause_thread_limit): Likewise.
1530 (c_parser_omp_clause_aligned): Likewise.
1531 (c_parser_omp_clause_linear): Likewise.
1532 (c_parser_omp_clause_safelen): Likewise.
1533 (c_parser_omp_clause_simdlen): Likewise.
1534 (c_parser_omp_clause_depend): Likewise.
1535 (c_parser_omp_clause_map): Likewise.
1536 (c_parser_omp_clause_device): Likewise.
1537 (c_parser_omp_clause_dist_schedule): Likewise.
1538 (c_parser_omp_clause_proc_bind): Likewise.
1539 (c_parser_omp_clause_uniform): Likewise.
1540 (c_parser_omp_for_loop): Likewise.
1541 (c_parser_cilk_clause_vectorlength): Likewise.
1542 (c_parser_cilk_clause_linear): Likewise.
1543 (c_parser_transaction_expression): Likewise.
1544 * c-parser.h (c_parser_require): Add param matching_location with
1545 default UNKNOWN_LOCATION.
1546 (c_parser_error): Convert return type from void to bool.
1547 (c_parser_skip_until_found): Add param matching_location with
1548 default UNKNOWN_LOCATION.
1549
30af3a2b
MP
15502017-08-09 Marek Polacek <polacek@redhat.com>
1551
1552 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
1553 * c-tree.h (build_external_ref): Update declaration.
1554 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
1555 (build_external_ref): Change the type of a parameter to bool.
1556 (parser_build_binary_op): Use true/false instead of 1/0.
1557 (pointer_diff): Likewise.
1558 (build_modify_expr): Likewise.
1559 (set_designator): Change the type of a parameter to bool.
1560 (set_init_index): Use true/false instead of 1/0.
1561 (set_init_label): Likewise.
1562 (output_init_element): Change the type of a parameter to bool.
1563 (output_pending_init_elements): Use true/false instead of 1/0.
1564 (process_init_element): Likewise.
1565 (build_binary_op): Change the type of a parameter to bool.
1566
296c53ac
MP
15672017-08-09 Marek Polacek <polacek@redhat.com>
1568
1569 PR c/81233
1570 * c-typeck.c (pedwarn_init): Make the function take a variable list.
1571 Call emit_diagnostic_valist instead of pedwarn.
1572 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
1573 Print the relevant types in diagnostics.
1574
a32c8316
MP
15752017-08-09 Marek Polacek <polacek@redhat.com>
1576
1577 PR c/81417
1578 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
1579 build_conditional_expr.
1580 * c-parser.c (c_parser_conditional_expression): Create locations for
1581 EXP1 and EXP2 from their source ranges. Pass the locations down to
1582 build_conditional_expr.
1583 * c-tree.h (build_conditional_expr): Update declaration.
1584 * c-typeck.c (build_conditional_expr): Add location_t parameters.
1585 For -Wsign-compare, also print the types.
1586
314e6352
ML
15872017-08-08 Martin Liska <mliska@suse.cz>
1588
1589 * c-convert.c: Include header files.
1590 * c-typeck.c: Likewise.
1591
577eec56
ML
15922017-08-07 Martin Liska <mliska@suse.cz>
1593
1594 * c-parser.c (c_parser_attributes): Canonicalize name of an
1595 attribute.
1596
f7b6353a
MP
15972017-08-02 Marek Polacek <polacek@redhat.com>
1598
1599 PR c/81289
1600 * c-parser.c (c_parser_unary_expression): Use set_error.
1601
8a6eab34
MP
1602 PR c/81448
1603 PR c/81306
1604 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
1605 warnings. Avoid walking MACRO_MAP_LOCATIONS.
1606
7fef86d3
JH
16072017-07-31 Jan Hubicka <hubicka@ucw.cz>
1608 Martin Liska <mliska@suse.cz>
1609
1610 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 1611 statement.
7fef86d3 1612
f34ebeb2
ML
16132017-07-31 Martin Liska <mliska@suse.cz>
1614
1615 PR sanitize/81530
1616 * c-convert.c (convert): Guard condition with flag_sanitize_p
1617 also with current_function_decl non-null equality.
1618 * c-decl.c (grokdeclarator): Likewise.
1619 * c-typeck.c (build_binary_op): Likewise.
1620
8595f67b
MP
16212017-07-25 Marek Polacek <polacek@redhat.com>
1622
1623 * c-decl.c (grokfield): Remove local variable.
1624
d49718d6
MP
16252017-07-25 Marek Polacek <polacek@redhat.com>
1626
1627 PR c/81364
1628 * c-parser.c (c_parser_else_body): Don't warn about multistatement
1629 macro expansion if the body is in { }.
1630 (c_parser_while_statement): Likewise.
1631 (c_parser_for_statement): Likewise.
1632
ff22eb12
NS
16332017-07-18 Nathan Sidwell <nathan@acm.org>
1634
1635 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
1636
eea77d1f
DM
16372017-07-14 David Malcolm <dmalcolm@redhat.com>
1638
1639 * c-decl.c (implicitly_declare): When suggesting a missing
1640 #include, provide a fix-it hint.
1641
b6f43128
DM
16422017-07-06 David Malcolm <dmalcolm@redhat.com>
1643
1644 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
1645 and call that instead.
1646 * c-tree.h (selftest::run_c_tests): New decl.
1647
3e2becc4
MP
16482017-06-26 Marek Polacek <polacek@redhat.com>
1649
1650 PR c/80116
1651 * c-parser.c (c_parser_if_body): Set the location of the
1652 body of the conditional after parsing all the labels. Call
1653 warn_for_multistatement_macros.
1654 (c_parser_else_body): Likewise.
1655 (c_parser_switch_statement): Likewise.
1656 (c_parser_while_statement): Likewise.
1657 (c_parser_for_statement): Likewise.
1658 (c_parser_statement): Add a default argument. Save the location
1659 after labels have been parsed.
1660 (c_parser_c99_block_statement): Likewise.
1661
343ae898
RB
16622017-06-19 Richard Biener <rguenther@suse.de>
1663
1664 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1665 negated _Literals to parse _Literal (int) -1.
1666
45b2222a
ML
16672017-06-13 Martin Liska <mliska@suse.cz>
1668
1669 PR sanitize/78204
1670 * c-convert.c (convert): Use sanitize_flags_p.
1671 * c-decl.c (grokdeclarator): Likewise.
1672 * c-typeck.c (convert_for_assignment): Likewise.
1673 (c_finish_return): Likewise.
1674 (build_binary_op): Likewise.
1675
8ab7005b
JJ
16762017-06-08 Jakub Jelinek <jakub@redhat.com>
1677
1678 PR c/81006
1679 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
1680 to sizetype before size_binop.
1681
363dc72c
JJ
16822017-06-07 Jakub Jelinek <jakub@redhat.com>
1683
1684 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
1685 of TDI_generic.
1686
dc949728
MP
16872017-06-06 Marek Polacek <polacek@redhat.com>
1688
1689 PR c/79983
1690 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
1691 ref.
1692 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
1693
40ffd95f
BE
16942017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1695
1696 * c-parser.c (c_parser_binary_expression): Implement the
1697 -Wsizeof_pointer_div warning.
1698 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
1699 from a parenthesized expression.
1700 (c_parser_expr_list): Use c_last_sizeof_loc.
1701 * c-tree.h (c_last_sizeof_loc): New external.
1702 * c-typeck.c (c_last_sizeof_loc): New variable.
1703 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
1704
9fc5e7a4
MM
17052017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
1706
1707 PR testsuite/80580
1708 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
1709
f012c8ef
DM
17102017-05-30 David Malcolm <dmalcolm@redhat.com>
1711
1712 * c-objc-common.c (c_tree_printer): Gain bool and const char **
1713 parameters.
1714
3cd211af
MS
17152017-05-24 Martin Sebor <msebor@redhat.com>
1716
1717 PR c/80731
1718 * c-fold.c (c_fully_fold_internal): Adjust.
1719 * c-typeck.c (parser_build_unary_op): Adjust.
1720
fd71a9a2
TS
17212017-05-23 Thomas Schwinge <thomas@codesourcery.com>
1722
1723 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
1724 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
1725 "VECTOR_LENGTH".
1726
92fa0f9e
MP
17272017-05-23 Marek Polacek <polacek@redhat.com>
1728
1729 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
1730 quotes.
1731
d11c168a
JJ
17322017-05-22 Jakub Jelinek <jakub@redhat.com>
1733
1734 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
1735 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
1736 it returned invariant. Call tree_invariant_p unconditionally
1737 afterwards to decide whether to return expr or op0.
1738
58aca9d9
NS
17392017-05-22 Nathan Sidwell <nathan@acm.org>
1740
1741 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
1742
7fd549d2
TS
17432017-05-19 Thomas Schwinge <thomas@codesourcery.com>
1744
1745 * c-parser.c (c_parser_omp_clause_default): Handle
1746 "OMP_CLAUSE_DEFAULT_PRESENT".
1747
6ecd2339
BE
17482017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1749
1750 * config-lang.in (gtfiles): Add c-family/c-format.c.
1751
8a57ecff
NS
17522017-05-18 Nathan Sidwell <nathan@acm.org>
1753
1754 * c-decl.c (pushdecl_top_level): Delete unused function.
1755
6574d78e
MP
17562017-05-18 Marek Polacek <polacek@redhat.com>
1757
1758 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
1759 (check_earlier_gotos): Likewise.
1760 (define_label): Likewise.
1761 (pending_xref_error): Likewise.
1762 (smallest_type_quals_location): Likewise.
1763 (grokdeclarator): Likewise.
1764 (grokparms): Likewise.
1765 (identifier_global_value): Likewise.
1766 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
1767 (find_init_member): Likewise.
1768
e3455240
MP
17692017-05-18 Marek Polacek <polacek@redhat.com>
1770
1771 * c-decl.c (start_decl): Use false/true instead of 0/1.
1772 (grokdeclarator): Likewise.
1773 (finish_struct): Likewise.
1774 (start_function): Change the return type to bool. Use false/true
1775 instead of 0/1.
1776 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
1777 * c-tree.h (start_function): Update.
1778 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
1779 (set_designator): Change the return type to bool. Use false/true
1780 instead of 0/1.
1781
3fa8871b
MP
17822017-05-17 Marek Polacek <polacek@redhat.com>
1783
1784 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
1785 * c-typeck.c: Likewise.
1786
142473df
MP
17872017-05-17 Marek Polacek <polacek@redhat.com>
1788
1789 PR sanitizer/80659
1790 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
1791 DECL_IGNORED_P even for non-static compound literals.
1792
1a817418
ML
17932017-05-17 Martin Liska <mliska@suse.cz>
1794
1795 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1796 use it instead of int type.
1797
b2fa0a8b
MP
17982017-05-17 Marek Polacek <polacek@redhat.com>
1799
1800 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
1801 call c_fully_fold.
1802 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
1803 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
1804 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1805 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1806 save_expr.
1807 (c_parser_conditional_expression): Likewise.
1808 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1809 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1810 (process_init_element): Likewise.
1811 (build_binary_op): Likewise.
1812 (handle_omp_array_sections_1): Likewise.
1813
1e47f02b
TS
18142017-05-12 Thomas Schwinge <thomas@codesourcery.com>
1815
1816 * c-parser.c (c_parser_omp_clause_num_gangs)
1817 (c_parser_omp_clause_num_workers)
1818 (c_parser_omp_clause_vector_length): Merge functions into...
1819 (c_parser_oacc_single_int_clause): ... this new function. Adjust
1820 all users.
1821
c24e924f
NS
18222017-05-11 Nathan Sidwell <nathan@acm.org>
1823
1824 * gimple-parser.c: Don't #include tree-dump.h.
1825
c587104e
MM
18262017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1827
1828 PR testsuite/80580
1829 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
1830
67ac9a9d
MM
18312017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1832
1833 PR testsuite/80580
1834 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1835 incorrect __MEM syntax.
1836
ac4eb40f
MM
18372017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1838
1839 PR testsuite/80580
1840 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1841 type of unary '*'.
1842
641da50a
NS
18432017-05-09 Nathan Sidwell <nathan@acm.org>
1844
1845 * c-tree.h (pushdecl): Declare.
1846
56d35585
DM
18472017-05-05 David Malcolm <dmalcolm@redhat.com>
1848
1849 * c-decl.c (warn_defaults_to): Replace report_diagnostic
1850 with diagnostic_report_diagnostic.
1851 * c-errors.c (pedwarn_c99): Likewise.
1852 (pedwarn_c90): Likewise.
1853
815d9cc6
XR
18542017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1855
92a285c1 1856 PR c++/80038
815d9cc6
XR
1857 * c-gimplify.c (c_gimplify_expr): Remove calls to
1858 cilk_gimplifY_call_params_in_spawned_fn.
1859
1c4ea66f
DM
18602017-04-25 David Malcolm <dmalcolm@redhat.com>
1861
1862 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1863 hint for removing extra semicolon.
1864
666f7903
JJ
18652017-04-21 Jakub Jelinek <jakub@redhat.com>
1866
1867 PR c/80468
1868 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
1869 enabled, set specs->type to integer_type_node.
1870
5764ee3c
JW
18712017-04-03 Jonathan Wakely <jwakely@redhat.com>
1872
1873 * c-array-notation.c: Fix typo in comment.
1874
10fa8dfb
MP
18752017-03-29 Marek Polacek <polacek@redhat.com>
1876
1877 PR c/79730
1878 * c-decl.c (finish_decl): Check VAR_P.
1879
a9e4a1a5
JJ
18802017-03-27 Jakub Jelinek <jakub@redhat.com>
1881
1882 PR middle-end/80162
1883 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1884 * c-typeck.c (c_mark_addressable): Likewise. Look through
1885 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1886 to ARRAY_TYPE.
1887 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
1888
ee3ff394
MP
18892017-03-23 Marek Polacek <polacek@redhat.com>
1890
1891 * c-tree.h: Remove a C_RID_YYCODE reference.
1892
4d1b8e70
JJ
18932017-03-21 Jakub Jelinek <jakub@redhat.com>
1894
1895 PR c/80097
1896 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
1897 optional COMPOUND_EXPR with ubsan instrumentation.
1898
31dc71a8
MP
18992017-03-17 Marek Polacek <polacek@redhat.com>
1900
1901 * c-parser.c: Add C11 references.
1902
d579c385
MP
19032017-03-15 Marek Polacek <polacek@redhat.com>
1904
1905 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
1906
85059a38
MP
19072017-03-11 Marek Polacek <polacek@redhat.com>
1908
1909 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
1910
2f6f187a
DM
19112017-03-10 David Malcolm <dmalcolm@redhat.com>
1912
1913 PR translation/79848
1914 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1915 "%qs".
1916 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1917
36618428
MP
19182017-03-09 Marek Polacek <polacek@redhat.com>
1919
1920 PR sanitizer/79757
1921 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1922 parameter declarations with initializers.
1923
01e5af5a
JJ
19242017-03-09 Jakub Jelinek <jakub@redhat.com>
1925
1926 PR c/79969
1927 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
1928 TYPE_STUB_DECL.
1929
a71dbc63
JJ
19302017-03-07 Jakub Jelinek <jakub@redhat.com>
1931
1932 PR c/79834
1933 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1934 for "may only be used in compound statements" diagnostics, change it
1935 such that the same translatable string is used for all pragmas. For
1936 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1937 diagnostics.
1938 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1939 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1940 "may only be used in compound statements" diagnostics, such that the
1941 same translatable string is used for all pragmas.
1942
1ff4bae6
MP
19432017-03-04 Marek Polacek <polacek@redhat.com>
1944
1945 PR c/79847
1946 * c-decl.c (implicit_decl_warning): Add missing space.
1947
7f5a7d78
MP
19482017-03-03 Marek Polacek <polacek@redhat.com>
1949
1950 PR c/79758
1951 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1952 current_function_prototype_arg_types is error_mark_node. Fix
1953 formatting. Use TREE_VALUE instead of TREE_TYPE.
1954
883c8f06
JJ
19552017-03-03 Jakub Jelinek <jakub@redhat.com>
1956
79c9b7a8
JJ
1957 PR c/79837
1958 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1959 %<min%> or %<max%> in the diagnostics, instead mention identifier.
1960 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1961 diagnostics.
1962
883c8f06
JJ
1963 PR c/79836
1964 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1965 instead of %<_Generic>.
1966 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1967 (c_parser_omp_target_exit_data): Use %<release%> instead of
1968 %<release>.
1969
324ff1a0
JJ
19702017-02-28 Jakub Jelinek <jakub@redhat.com>
1971
1972 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1973 instead of just cond ? "..." : "...".
1974 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1975 for "enter"/"exit" keyword.
1976 (c_finish_oacc_routine): Don't use %s to supply portions of the
1977 message.
1978
4227c9ad
JJ
19792017-02-24 Jakub Jelinek <jakub@redhat.com>
1980
1981 PR c++/79588
1982 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1983 handle -Wrestrict here.
1984 * c-typeck.c (build_function_call_vec): Adjust
1985 check_function_arguments caller.
1986
5d972e66
RB
19872017-02-23 Richard Biener <rguenther@suse.de>
1988
1989 PR c/79684
1990 * gimple-parser.c (c_parser_gimple_statement): Use set_error
1991 to initialize c_exprs to return.
1992 (c_parser_gimple_binary_expression): Likewise.
1993 (c_parser_gimple_unary_expression): Likewise.
1994 (c_parser_gimple_postfix_expression): Likewise.
1995
61ac5ebe
MP
19962017-02-22 Marek Polacek <polacek@redhat.com>
1997
1998 PR c/79662
1999 * c-typeck.c (convert_arguments): Handle error_mark_node.
2000
41d1b0b1
PK
20012017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2002
2003 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
2004 value of c_parser_parse_ssa_name against error_mark_node and emit
2005 error if ssa name is anonymous and written as default definition.
2006
eab1f169
PK
20072017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2008
2009 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2010 FMA_EXPR.
2011
bcac0b4d
JJ
20122017-02-16 Jakub Jelinek <jakub@redhat.com>
2013
2014 PR c++/79512
2015 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
2016 ignore #pragma omp target even when not followed by identifier.
2017
1be33173
PK
20182017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2019
2020 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
2021 (c_parser_gimple_unary_expression): Likewise.
2022
aa326bfb
JJ
20232017-02-13 Jakub Jelinek <jakub@redhat.com>
2024
2025 * c-parser.c (c_parser_oacc_declare): Add missing space in
2026 diagnostics.
2027
8a398bc5
PK
20282017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2029
2030 PR c/79478
2031 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
2032 set_c_expr_source_range when parsing ssa-name.
2033
3dcde5ef
PG
20342017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
2035 Richard Biener <rguenther@suse.de>
2036
2037 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
2038 building IL when arguments are error_mark_node.
2039 (c_parser_gimple_unary_expression): Likewise.
2040 (c_parser_gimple_if_stmt): Likewise.
2041 (c_parser_gimple_switch_stmt): Likewise.
2042 (c_parser_gimple_return_stmt): Likewise.
2043 (c_parser_parse_ssa_name): When name lookup fails do not build
2044 an SSA name. Use undeclared rather than not declared in error
2045 reporting.
2046
192b048b
MP
20472017-02-09 Marek Polacek <polacek@redhat.com>
2048
2049 PR c/79428
2050 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
2051 instead of c_parser_skip_until_found.
2052
56f71478
JJ
20532017-02-09 Jakub Jelinek <jakub@redhat.com>
2054
2055 PR c/79431
2056 * c-parser.c (c_parser_omp_declare_target): Don't invoke
2057 symtab_node::get on automatic variables.
2058
02889d23
CLT
20592016-02-09 Nathan Sidwell <nathan@codesourcery.com>
2060 Chung-Lin Tang <cltang@codesourcery.com>
2061
2062 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
2063 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
2064 semantic checking.
2065 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
2066
7af4b20d
RB
20672017-02-07 Richard Biener <rguenther@suse.de>
2068
2069 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
2070 (c_parser_gimple_postfix_expression_after_primary):
2071 Do not use c_build_function_call_vec to avoid folding and promotion.
2072 Simplify.
2073
e5e391d6
MO
20742017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
2075
2076 PR lto/79061
2077 * c-decl.c (pop_scope): Pass main_input_filename to
2078 build_translation_unit_decl.
2079
c2e84327
DM
20802017-01-24 David Malcolm <dmalcolm@redhat.com>
2081
2082 * c-parser.c: Include "read-rtl-function.h" and
2083 "run-rtl-passes.h".
2084 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
2085 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
2086 production. Update for renaming of field "gimple_pass" to
2087 "gimple_or_rtl_pass". If __RTL was seen, call
2088 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
2089 to an auto_timevar, to cope with early exit.
2090 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
2091 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
2092 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
2093 Handle RID_RTL.
2094 (c_parser_parse_rtl_body): New function.
2095 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
2096 (struct c_declspecs): Rename field "gimple_pass" to
2097 "gimple_or_rtl_pass". Add field "rtl_p".
2098 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
2099 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
2100 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
2101 (c_parser_gimple_or_rtl_pass_list): ...this.
2102
2ebd93e1
MP
21032017-01-20 Marek Polacek <polacek@redhat.com>
2104
2105 PR c/64279
2106 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
2107
b1c95bb5
RB
21082017-01-13 Richard Biener <rguenther@suse.de>
2109
2110 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
2111 nops.
2112
25329913
RB
21132017-01-13 Richard Biener <rguenther@suse.de>
2114
2115 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2116 _Literal ( type-name ) number.
2117
6bb4ea5c
RB
21182017-01-12 Richard Biener <rguenther@suse.de>
2119
2120 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2121 __MEM.
2122
6b5b4e9c
JJ
21232017-01-11 Jakub Jelinek <jakub@redhat.com>
2124
2125 PR c++/72813
2126 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
2127 PCH file.
2128
e3252775
RB
21292017-01-11 Richard Biener <rguenther@suse.de>
2130
2131 PR bootstrap/79052
2132 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
2133 returns on parse errors.
2134
a9342885
MP
21352017-01-04 Marek Polacek <polacek@redhat.com>
2136
2137 PR c++/64767
2138 * c-parser.c (c_parser_postfix_expression): Mark zero character
2139 constants by setting original_type in c_expr.
2140 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
2141 with a zero character constant.
2142 (char_type_p): New function.
2143
5dd9a9d0
DM
21442017-01-04 David Malcolm <dmalcolm@redhat.com>
2145
2146 * c-parser.c (c_parser_declaration_or_fndef): Create a
2147 rich_location at init_loc and parse it to start_init.
2148 (last_init_list_comma): New global.
2149 (c_parser_braced_init): Update last_init_list_comma when parsing
2150 commas. Pass it to pop_init_level. Pass location of closing
2151 brace to pop_init_level.
2152 (c_parser_postfix_expression_after_paren_type): Create a
2153 rich_location at type_loc and parse it to start_init.
2154 (c_parser_omp_declare_reduction): Likewise for loc.
2155 * c-tree.h (start_init): Add rich_location * param.
2156 (pop_init_level): Add location_t param.
2157 * c-typeck.c (struct initializer_stack): Add field
2158 "missing_brace_richloc".
2159 (start_init): Add richloc param, use it to initialize
2160 the stack node's missing_brace_richloc.
2161 (last_init_list_comma): New decl.
2162 (finish_implicit_inits): Pass last_init_list_comma to
2163 pop_init_level.
2164 (push_init_level): When finding missing open braces, add fix-it
2165 hints to the richloc.
2166 (pop_init_level): Add "insert_before" param and pass it
2167 when calling pop_init_level. Add fixits about missing
2168 close braces to any richloc. Use the richloc for the
2169 -Wmissing-braces warning.
2170 (set_designator): Pass last_init_list_comma to pop_init_level.
2171 (process_init_element): Likewise.
2172
cbe34bb5
JJ
21732017-01-01 Jakub Jelinek <jakub@redhat.com>
2174
2175 Update copyright years.
2176
d17680f3
JJ
21772016-12-21 Jakub Jelinek <jakub@redhat.com>
2178
0dba7960
JJ
2179 PR bootstrap/78817
2180 * c-typeck.c (build_function_call_vec): If check_function_arguments
2181 returns true, set TREE_NO_WARNING on CALL_EXPR.
2182
d17680f3
JJ
2183 PR c/77767
2184 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
2185 to *expr instead of overwriting it.
2186
aa90531e
RB
21872016-12-20 Richard Biener <rguenther@suse.de>
2188
2189 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
2190 error recovery.
2191 (c_parser_gimple_statement): Only build assigns for non-error
2192 stmts.
2193 (c_parser_gimple_postfix_expression_after): Improve error recovery.
2194
629b3d75
MJ
21952016-12-14 Martin Jambor <mjambor@suse.cz>
2196
2197 * c-parser.c: Include omp-general.h and omp-offload.h instead of
2198 omp-low.h.
2199 (c_finish_oacc_routine): Adjusted call to
2200 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
2201 to use their new names.
2202 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
2203 use its new name.
2204 (c_parser_oacc_update): Likewise.
2205 (c_parser_omp_simd): Likewise.
2206 (c_parser_omp_target_update): Likewise.
2207 * c-typeck.c: Include omp-general.h instead of omp-low.h.
2208 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
2209 name.
2210 (c_finish_omp_cancellation_point): Likewise.
2211 * gimple-parser.c: Do not include omp-low.h
2212
c5af52eb
CP
22132016-12-02 Cesar Philippidis <cesar@codesourcery.com>
2214 James Norris <jnorris@codesourcery.com>
2215
2216 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
2217 EXIT_DATA,WAIT} are not used in compound statements.
2218 (c_parser_oacc_enter_exit_data): Update diagnostics.
2219
48330c93
BE
22202016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2221
2222 PR c++/71973
2223 * c-decl.c (diagnose_mismatched_decls): Use
2224 OPT_Wbuiltin_declaration_mismatch here too.
2225
899ca90e 22262016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
2227 Alan Hayward <alan.hayward@arm.com>
2228 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
2229
2230 * c-decl.c (merge_decls): Use SET_DECL_MODE.
2231 (make_label, finish_struct): Likewise.
2232
1ee62b92 22332016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 2234 Richard Biener <rguenther@suse.de>
22b15758 2235
8e745a17
JJ
2236 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
2237 * config-lang.in (gtfiles): Add c/c-parser.h.
2238 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
2239 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
2240 * c-parser.c (enum c_id_kind, struct c_token,
2241 c_parser_next_token_is, c_parser_next_token_is_not,
2242 c_parser_next_token_is_keyword,
2243 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
2244 Split out to ...
2245 * c-parser.h: ... new header.
2246 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 2247 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
2248 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2249 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2250 c_parser_error, c_parser_require, c_parser_skip_until_found,
2251 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2252 c_parser_type_name): Export.
2253 (c_parser_tokens_buf): New function.
2254 (c_parser_error): Likewise.
2255 (c_parser_set_error): Likewise.
2256 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
2257 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
2258 via c_parser_parse_gimple_body.
8e745a17
JJ
2259 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
2260 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2261 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2262 c_parser_error, c_parser_require, c_parser_skip_until_found,
2263 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2264 c_parser_type_name): Declare.
1ee62b92
PG
2265 (struct c_parser): Declare forward.
2266 (c_parser_tokens_buf): Declare.
8e745a17
JJ
2267 (c_parser_error): Likewise.
2268 (c_parser_set_error): Likewise.
2269 * gimple-parser.c: New file.
2270 * gimple-parser.h: Likewise.
1ee62b92 2271
22b15758
UB
22722016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2273
2274 PR c/35503
2275 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2276 warn_for_restrict.
2277
84ff4775
LCW
22782016-09-11 Le-Chun Wu <lcwu@google.com>
2279 Mark Wielaard <mjw@redhat.com>
2280
2281 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
2282 to the given -Wshadow= variant.
2283
4d0cdd0c
TP
22842016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2285
2286 * c-typeck.c: Include memmodel.h.
2287
1202f33e
JJ
22882016-10-13 Jakub Jelinek <jakub@redhat.com>
2289
2290 PR target/77957
2291 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
2292 instead of lhd_return_null_tree_v.
2293
8a14afd0
BS
22942016-10-07 Bernd Schmidt <bschmidt@redhat.com>
2295
2296 PR c++/69733
2297 * c-decl.c (smallest_type_quals_location): New static function.
2298 (grokdeclarator): Try to find the correct location for an ignored
2299 qualifier.
2300
81fea426
MP
23012016-09-26 Marek Polacek <polacek@redhat.com>
2302
2303 PR c/7652
2304 * c-decl.c (pop_scope): Add gcc_fallthrough.
2305
23062016-09-26 Marek Polacek <polacek@redhat.com>
2307
2308 PR c/7652
2309 * c-parser.c (struct c_token): Add flags field.
2310 (c_lex_one_token): Pass it to c_lex_with_flags.
2311 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
2312 into IFN_FALLTHROUGH.
2313 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
2314 attribute fallthrough after a case label or default label.
2315 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
2316
9a2300e9
MP
23172016-09-24 Marek Polacek <polacek@redhat.com>
2318
2319 PR c/77490
2320 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
2321 have boolean value. Warn about ++/-- on booleans.
2322
7de76362
JJ
23232016-09-23 Jakub Jelinek <jakub@redhat.com>
2324
2325 * c-parser.c (incomplete_record_decls): Remove unnecessary
2326 = vNULL initialization of file scope vec.
2327
5b73d2ab
MP
23282016-09-16 Marek Polacek <polacek@redhat.com>
2329
2330 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
2331
e51fbec3
MP
23322016-09-14 Marek Polacek <polacek@redhat.com>
2333
2334 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
2335 (fix_array_notation_expr): Likewise.
2336 * c-decl.c (finish_decl): Likewise.
2337 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2338 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
2339 (function_to_pointer_conversion): Use false instead of 0.
2340 (convert_lvalue_to_rvalue): Likewise.
2341 (parser_build_unary_op): Likewise.
2342 (build_atomic_assign): Likewise.
2343 (build_unary_op): Change nonconvert parameter type to bool, use
2344 true/false instead of 1/0.
2345 (build_binary_op): Use true instead of 1.
2346
254830ba
DM
23472016-09-13 David Malcolm <dmalcolm@redhat.com>
2348
2349 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
2350 of add_fixit_insert to add_fixit_insert_before.
2351
4c13ba17
MP
23522016-09-13 Marek Polacek <polacek@redhat.com>
2353
2354 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
2355 it.
2356
54dcdb88
BE
23572016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
2358
2359 PR c++/77496
2360 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
2361 COMPOUND_EXPR to warn_for_omitted_condop.
2362
e5106e27
DM
23632016-09-07 David Malcolm <dmalcolm@redhat.com>
2364
2365 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
2366 c_get_substring_location for this new langhook.
2367
9dc5773f
JJ
23682016-09-02 Jakub Jelinek <jakub@redhat.com>
2369
2370 PR c/65467
2371 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
2372 flag_openmp.
2373 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
2374 instead of mark_exp_read on low_bound/length expression.
2375 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
2376 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2377 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2378 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
2379 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
2380 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
2381 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
2382 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
2383 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
2384 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
2385 instead of mark_expr_read.
2386 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
2387 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
2388 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
2389 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
2390 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
2391 array section bases outside of depend clause, for depend clause
2392 use convert_lvalue_to_rvalue on the base.
2393 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
2394 linear, aligned, map, to and from clauses.
2395 (c_omp_clause_copy_ctor): New function.
2396
295844f6
MP
23972016-09-01 Marek Polacek <polacek@redhat.com>
2398
2399 PR c/7652
2400 * c-typeck.c (composite_type): Add FALLTHRU comment.
2401
089af25c
DM
24022016-08-31 David Malcolm <dmalcolm@redhat.com>
2403
2404 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
2405 to the insertion fixits for "struct", "union", and "enum".
2406
f9087798
DM
24072016-08-30 David Malcolm <dmalcolm@redhat.com>
2408
2409 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
2410 rather than add_fixit_misspelled_id.
2411 (undeclared_variable): Likewise.
2412 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
2413 now-redundant "here" params from add_fixit_insert method calls.
2414 (c_parser_parameter_declaration): Likewise.
2415 * c-typeck.c (build_component_ref): Remove now-redundant range
2416 param from add_fixit_replace method calls.
2417
ebef225f
MP
24182016-08-25 Marek Polacek <polacek@redhat.com>
2419
2420 * c-typeck.c (parser_build_binary_op): Pass LHS to
2421 warn_logical_not_parentheses.
2422
fe377a48
MP
24232016-08-25 Marek Polacek <polacek@redhat.com>
2424
2425 PR c/77323
2426 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
2427 or _FloatN or _FloatNx is not supported.
2428 (finish_declspecs): Set type to integer_type_node when _FloatN or
2429 _FloatNx is not supported.
2430
c65699ef
JM
24312016-08-19 Joseph Myers <joseph@codesourcery.com>
2432
2433 PR c/32187
2434 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
2435 (struct c_declspecs): Add field floatn_nx_idx.
2436 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
2437 and _FloatNx type specifiers.
2438 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
2439 (c_parser_declspecs, c_parser_attribute_any_word)
2440 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
2441 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
2442 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
2443 narrower than double.
2444
2f1364c2
JJ
24452016-08-12 Jakub Jelinek <jakub@redhat.com>
2446 Martin Liska <mliska@suse.cz>
2447
2448 PR c/67410
2449 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
2450 % to determine val element to change. Assert that
2451 wchar_bytes * charwidth fits into val array.
2452
191816a3
MP
24532016-08-12 Marek Polacek <polacek@redhat.com>
2454
2455 PR c/7652
2456 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
2457 (c_parser_postfix_expression): Likewise.
2458 * c-typeck.c (build_unary_op): Adjust fall through comment.
2459 (c_mark_addressable): Likewise.
2460
b95a64bb
JJ
24612016-08-11 Jakub Jelinek <jakub@redhat.com>
2462
2463 PR c/72816
2464 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
2465 array member through typedef, for orig_qual_indirect == 0 clear
2466 orig_qual_type.
2467
895aa8e1
DM
24682016-08-08 David Malcolm <dmalcolm@redhat.com>
2469
2470 PR c/64955
2471 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
2472 this up to selftest::run_c_tests.
2473 (selftest::run_c_tests): New function.
2474
0b212d8c
TS
24752016-08-04 Thomas Schwinge <thomas@codesourcery.com>
2476
ae9281fc
TS
2477 * c-parser.c (struct oacc_routine_data): Add error_seen and
2478 fndecl_seen members.
2479 (c_finish_oacc_routine): Use these.
2480 (c_parser_declaration_or_fndef): Adjust.
2481 (c_parser_oacc_routine): Likewise. Support more C language
2482 constructs, and improve diagnostics. Move pragma context
2483 checking...
2484 (c_parser_pragma): ... here.
2485
0b212d8c
TS
2486 * c-parser.c (struct oacc_routine_data): New.
2487 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
2488 Simplify code.
2489 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
2490 declare target" attribute.
2491
76e2c821
JB
24922016-08-01 Jan Beulich <jbeulich@suse.com>
2493
2494 * c-fold.c (c_fully_fold_internal): Also emit shift count
2495 warnings for vector types.
2496 * c-typeck.c (build_binary_op): Likewise.
2497
f618a472
MP
24982016-07-29 Marek Polacek <polacek@redhat.com>
2499
2500 PR c/71742
2501 * c-decl.c (finish_struct): Rephrase an error message.
2502
efd0786f
MP
2503 PR c/71853
2504 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
2505 to error node for invalid code.
2506
e00dceaf
MP
2507 PR c/71573
2508 * c-decl.c (implicitly_declare): Return decl early not only for
2509 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
2510
673a107a
JJ
25112016-07-29 Jakub Jelinek <jakub@redhat.com>
2512
2513 PR c/71969
2514 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
2515 on GNU extern inline functions.
2516
a5b5c8b6
MP
25172016-07-29 Marek Polacek <polacek@redhat.com>
2518
2519 PR c/71583
2520 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
2521 check expr.value.
2522
e3fe09c1
UB
25232016-07-22 Uros Bizjak <ubizjak@gmail.com>
2524
2525 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
2526
7c8f7eaa
DM
25272016-07-20 David Malcolm <dmalcolm@redhat.com>
2528
2529 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
2530 spellcheck-tree.h
2531 (best_macro_match): Likewise, converting from a typedef to a
2532 subclass.
2533 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
2534 (lookup_name_fuzzy): Update for change of best_macro_match to a
2535 subclass with a ctor that calls cpp_forall_identifiers.
2536
de6a69ee
DM
25372016-07-20 David Malcolm <dmalcolm@redhat.com>
2538
2539 * c-decl.c (implicit_decl_warning): Update for conversion of
2540 return type of lookup_name_fuzzy to const char *.
2541 (undeclared_variable): Likewise.
2542 (lookup_name_fuzzy): Convert return type from tree to
2543 const char *.
2544 * c-parser.c (c_parser_declaration_or_fndef): Update for
2545 conversion of return type of lookup_name_fuzzy to const char *.
2546 (c_parser_parameter_declaration): Likewise.
2547
b1c9c068
CP
25482016-07-15 Cesar Philippidis <cesar@codesourcery.com>
2549
2550 * c-parser.c (c_parser_oacc_declare): Don't scan for
2551 GOMP_MAP_POINTER.
2552 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
2553 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
2554 zero-length subarrays.
2555
ddbbcb19
JJ
25562016-07-15 Jakub Jelinek <jakub@redhat.com>
2557
2558 PR c/71858
2559 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
2560 instead of FUZZY_LOOKUP_NAME.
2561 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
2562 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
2563
dd36b877
JJ
25642016-07-14 Jakub Jelinek <jakub@redhat.com>
2565
2566 PR c/71858
2567 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
2568
8c681247
TS
25692016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2570
2571 * c-parser.c (c_parser_generic_selection): Make type of variable
2572 auto_vec.
2573 (c_parser_omp_declare_simd): Likewise.
2574
bf4fa671
TS
25752016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2576
2577 * c-decl.c (struct c_struct_parse_info): Change member types
2578 from vec to auto_vec.
2579 (start_struct): Adjust.
2580 (finish_struct): Likewise.
2581
557e8c49
JJ
25822016-07-02 Jakub Jelinek <jakub@redhat.com>
2583
2584 PR c/71719
2585 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
2586
54d19c3b
TS
25872016-06-29 Thomas Schwinge <thomas@codesourcery.com>
2588
2589 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
2590 Move pragma context checking into...
2591 (c_parser_omp_cancellation_point): ... here, and improve
2592 diagnostic messages.
2593 * c-typeck.c (c_finish_omp_cancel)
2594 (c_finish_omp_cancellation_point): Improve diagnostic messages.
2595
152ef731
JJ
25962016-06-29 Jakub Jelinek <jakub@redhat.com>
2597
2598 PR c/71685
2599 * c-typeck.c (c_build_qualified_type): Don't clear
2600 C_TYPE_INCOMPLETE_VARS for the main variant.
2601
26022016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
2603
2604 PR c/71552
2605 * c-typeck.c (output_init_element): Diagnose incompatible types
2606 before non-constant initializers.
2607
e9ac1f86
JJ
26082016-06-28 Jakub Jelinek <jakub@redhat.com>
2609
2610 * Make-lang.in: Don't cat ../stage_current if it does not exist.
2611
277d7ee0
AK
26122016-06-23 Andi Kleen <ak@linux.intel.com>
2613
2614 * Make-lang.in: Add support for autofdo.
2615
1a4f11c8
DM
26162016-06-22 David Malcolm <dmalcolm@redhat.com>
2617
2618 PR c/70339
2619 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
2620 (implicit_decl_warning): When issuing warnings for implicit
2621 declarations, attempt to provide a suggestion via
2622 lookup_name_fuzzy.
2623 (undeclared_variable): Likewise when issuing errors.
2624 (lookup_name_in_scope): Likewise.
2625 (struct edit_distance_traits<cpp_hashnode *>): New struct.
2626 (best_macro_match): New typedef.
2627 (find_closest_macro_cpp_cb): New function.
2628 (lookup_name_fuzzy): New function.
2629 * c-parser.c: Include gcc-rich-location.h.
2630 (c_token_starts_typename): Split out case CPP_KEYWORD into...
2631 (c_keyword_starts_typename): ...this new function.
2632 (c_parser_declaration_or_fndef): When issuing errors about
2633 missing "struct" etc, add a fixit. For other kinds of errors,
2634 attempt to provide a suggestion via lookup_name_fuzzy.
2635 (c_parser_parms_declarator): When looking ahead to detect typos in
2636 type names, also reject CPP_KEYWORD.
2637 (c_parser_parameter_declaration): When issuing errors about
2638 unknown type names, attempt to provide a suggestion via
2639 lookup_name_fuzzy.
2640 * c-tree.h (c_keyword_starts_typename): New prototype.
2641
5a578671
JM
26422016-06-20 Joseph Myers <joseph@codesourcery.com>
2643
2644 PR c/71601
2645 * c-typeck.c (build_conditional_expr): Return error_mark_node if
2646 c_common_type returns error_mark_node.
2647
3f8257db 26482016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
2649
2650 PR c/69507
2651 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
2652 __alignof__ (expression).
2653
6a3f203c
DM
26542016-06-14 David Malcolm <dmalcolm@redhat.com>
2655
2656 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
2657
264757fb
DM
26582016-06-14 David Malcolm <dmalcolm@redhat.com>
2659
2660 * c-typeck.c (build_component_ref): Simplify fixit code by
2661 using gcc_rich_location::add_fixit_misspelled_id.
2662 (set_init_label): Likewise.
2663
f7e4f2e3
DM
26642016-06-13 David Malcolm <dmalcolm@redhat.com>
2665
2666 * c-parser.c (c_parser_initelt): Provide location of name for new
2667 location_t param of set_init_label.
2668 * c-tree.h (set_init_label): Add location_t param.
2669 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
2670 param and use it when issuing error messages about unrecognized
2671 field names. Attempt to provide a fixit hint if appropriate,
2672 otherwise update the error message to provide the type name.
2673
4b1ffdb1
TS
26742016-06-10 Thomas Schwinge <thomas@codesourcery.com>
2675
2676 PR c/71381
2677 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
2678 Loosen checking.
2679
44a845ca
MS
26802016-06-08 Martin Sebor <msebor@redhat.com>
2681 Jakub Jelinek <jakub@redhat.com>
2682
2683 PR c++/70507
2684 PR c/68120
2685 * c-typeck.c (convert_arguments): Don't promote last argument
2686 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2687
92a5f2ba
MP
26882016-06-08 Marek Polacek <polacek@redhat.com>
2689
2690 PR c/71418
2691 * c-decl.c (grokdeclarator): Check TYPE_P.
2692
08203f73
MP
2693 PR c/71426
2694 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
2695 code.
2696
6ffd47b7
DM
26972016-06-07 David Malcolm <dmalcolm@redhat.com>
2698
2699 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
2700 and structure element reference, capture the location of the
2701 element name token and pass it to build_component_ref.
2702 (c_parser_postfix_expression_after_primary): Likewise for
2703 structure element dereference.
2704 (c_parser_omp_variable_list): Likewise for
2705 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
2706 * c-tree.h (build_component_ref): Add location_t param.
2707 * c-typeck.c (build_component_ref): Add location_t param
2708 COMPONENT_LOC. Use it, if available, when issuing hints about
2709 mispelled member names to provide a fixit replacement hint.
2710
1f40cff3
MP
27112016-06-06 Marek Polacek <polacek@redhat.com>
2712
2713 PR c/71362
2714 * c-parser.c (c_parser_direct_declarator): Set location.
2715
5545a907
MP
27162016-06-06 Marek Polacek <polacek@redhat.com>
2717
2718 * c-typeck.c (comptypes_internal): Handle comparisons of
2719 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
2720 TYPE_REF_CAN_ALIAS_ALL.
2721
b605f663
CLT
27222016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
2723
2724 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
2725 arguments as addressable when async clause exists.
2726
00631022
JJ
27272016-05-30 Jakub Jelinek <jakub@redhat.com>
2728
2729 PR c++/71349
2730 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
2731 when combined with target construct.
2732
7211a097
JJ
27332016-05-26 Jakub Jelinek <jakub@redhat.com>
2734
2735 * c-parser.c (c_parser_omp_clause_schedule): Warn if
2736 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
2737
95efe6b6
MP
27382016-05-25 Marek Polacek <polacek@redhat.com>
2739
2740 PR c/71265
2741 * c-decl.c (c_make_fname_decl): Don't check seen_error.
2742
a23faf7a
MP
2743 PR c/71266
2744 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
2745
e46c7770
CP
27462016-05-24 Cesar Philippidis <cesar@codesourcery.com>
2747
2748 * c-parser.c (c_parser_oacc_declare): Add support for
2749 GOMP_MAP_FIRSTPRIVATE_POINTER.
2750 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
2751 argument with enum c_omp_region_type ort.
2752 (handle_omp_array_sections): Likewise. Update call to
2753 handle_omp_array_sections_1.
2754 (c_finish_omp_clauses): Add specific errors and warning messages for
2755 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
2756 call to handle_omp_array_sections.
2757
a04e69c0
TS
27582016-05-24 Thomas Schwinge <thomas@codesourcery.com>
2759
2760 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
2761
f17a223d
RB
27622016-05-24 Richard Biener <rguenther@suse.de>
2763
2764 PR middle-end/70434
2765 PR c/69504
2766 * c-typeck.c (build_array_ref): Do not complain about indexing
2767 non-lvalue vectors. Adjust for function name change.
2768
79063edd
MS
27692016-05-20 Martin Sebor <msebor@redhat.com>
2770
2771 PR c/71115
2772 * c-typeck.c (error_init): Use
2773 expansion_point_location_if_in_system_header.
2774 (warning_init): Same.
2775
8a40fef3
DM
27762016-05-19 David Malcolm <dmalcolm@redhat.com>
2777
2778 PR c/71171
2779 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
2780 in error-handling.
2781 (c_parser_postfix_expression): Likewise.
2782 * c-tree.h (c_expr::set_error): New method.
2783 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
2784 that result's range is initialized.
2785
e9892350
JG
27862016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
2787
2788 * c-typeck.c (parser_build_unary_op): Fix formatting.
2789
8fad45f5
MW
27902016-05-16 Matthew Wahab <matthew.wahab@arm.com>
2791
2792 * c-decl.c (grokdeclarator): Remove errmsg and use of
2793 targetm.invalid_return_type.
2794 (grokparms): Remove errmsg and use of
2795 targetm.invalid_parameter_type.
2796
aa4b467b
JM
27972016-05-13 Joseph Myers <joseph@codesourcery.com>
2798
2799 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2800 function return type.
2801
4f2e1536
MP
28022016-05-12 Marek Polacek <polacek@redhat.com>
2803
2804 PR c/70756
2805 * c-decl.c (build_compound_literal): Pass LOC down to
2806 c_incomplete_type_error.
2807 * c-tree.h (require_complete_type): Adjust declaration.
2808 (c_incomplete_type_error): Likewise.
2809 * c-typeck.c (require_complete_type): Add location parameter, pass it
2810 down to c_incomplete_type_error.
2811 (c_incomplete_type_error): Add location parameter, pass it down to
2812 error_at.
2813 (build_component_ref): Pass location down to c_incomplete_type_error.
2814 (default_conversion): Pass location down to require_complete_type.
2815 (build_array_ref): Likewise.
2816 (build_function_call_vec): Likewise.
2817 (convert_arguments): Likewise.
2818 (build_unary_op): Likewise.
2819 (build_c_cast): Likewise.
2820 (build_modify_expr): Likewise.
2821 (convert_for_assignment): Likewise.
2822 (c_finish_omp_clauses): Likewise.
2823
d6e83a8d
MM
28242016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2825
2826 PR c/43651
2827 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
2828 is enabled.
2829 * c-errors.c (pedwarn_c90): Return true if warned.
2830 * c-tree.h (pedwarn_c90): Change return type to bool.
2831 (enum c_declspec_word): Add new enumerator cdw_atomic.
2832
5c3a10fb
MP
28332016-05-11 Marek Polacek <polacek@redhat.com>
2834
2835 PR c++/71024
2836 * c-decl.c (diagnose_mismatched_decls): Factor out code to
2837 diagnose_mismatched_attributes and call it.
2838
cf68d92c
MP
28392016-05-10 Marek Polacek <polacek@redhat.com>
2840
2841 PR c/70255
2842 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2843 on a declaration following the definition.
2844
351f85c5
JJ
28452016-05-05 Jakub Jelinek <jakub@redhat.com>
2846
2847 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2848 parse it through to c_parser_c99_block_statement.
2849 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2850 caller.
2851
deef7113
MP
28522016-05-04 Marek Polacek <polacek@redhat.com>
2853
2854 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2855 OPT_Wdangling_else.
2856
de55efd5
MP
28572016-05-04 Marek Polacek <polacek@redhat.com>
2858
2859 PR c/48778
2860 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2861 for macro expansions.
2862
79ce98bc
MP
28632016-05-03 Marek Polacek <polacek@redhat.com>
2864
2865 PR c/70859
2866 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
2867 check_builtin_function_arguments.
2868
fb2647aa
RB
28692016-05-03 Richard Biener <rguenther@suse.de>
2870
2871 * Make-lang.in (cc1-checksum.c): For stage-final re-use
2872 the checksum from the previous stage.
2873
77886428
CP
28742016-05-02 Cesar Philippidis <cesar@codesourcery.com>
2875
2876 * c-parser.c (c_parser_oacc_all_clauses): Update call to
2877 c_finish_omp_clauses.
2878 (c_parser_omp_all_clauses): Likewise.
2879 (c_parser_oacc_cache): Likewise.
2880 (c_parser_oacc_loop): Likewise.
2881 (omp_split_clauses): Likewise.
2882 (c_parser_omp_declare_target): Likewise.
2883 (c_parser_cilk_all_clauses): Likewise.
2884 (c_parser_cilk_for): Likewise.
2885 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
2886 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2887
7176a4a0
MP
28882016-05-02 Marek Polacek <polacek@redhat.com>
2889
2890 PR c/70851
2891 * c-decl.c (grokdeclarator): Diagnose when array's size has an
2892 incomplete type.
2893
e7ff0319
CP
28942016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2895
2896 PR middle-end/70626
2897 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
2898 OACC_LOOP_CLAUSE_MASK.
2899 (c_parser_oacc_kernels_parallel): Update call to
2900 c_oacc_split_loop_clauses.
2901
9f405ce1
AM
29022016-04-28 Andrew MacLeod <amacleod@redhat.com>
2903
2904 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
2905 argument to build_modify_expr in two cases.
2906
c1e1f433
BS
29072016-04-27 Bernd Schmidt <bschmidt@redhat.com>
2908
2909 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2910 warn_for_memset instead of warning directly here.
2911
2448a956
MP
29122016-04-26 Marek Polacek <polacek@redhat.com>
2913
2914 PR c/67784
2915 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2916 out of ...
2917 (c_parser_for_statement): ... here.
2918 (c_parser_if_statement): Use it.
2919 (c_parser_switch_statement): Use it.
2920 (c_parser_while_statement): Use it.
2921
b02a5e26
MP
2922 PR c/70791
2923 * c-decl.c (pushdecl): Pass LOCUS down to warning.
2924
477d4906
IV
29252016-04-20 Ilya Verbin <ilya.verbin@intel.com>
2926
2927 PR c++/69363
2928 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2929 instead of c_finish_cilk_clauses.
2930 * c-tree.h (c_finish_omp_clauses): Add new default argument.
2931 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
2932 floating-point variables in the linear clause for Cilk Plus.
2933
fe37c7af
MM
29342016-04-18 Michael Matz <matz@suse.de>
2935
2936 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2937 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2938
949505a9
MP
29392016-04-15 Marek Polacek <polacek@redhat.com>
2940
2941 PR c/70671
2942 * c-typeck.c (build_unary_op): Pass location down to error and
2943 warning call.
2944
dda1bf61
JJ
29452016-04-15 Jakub Jelinek <jakub@redhat.com>
2946
2947 PR c/70436
2948 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2949 where needed.
2950 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2951 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2952 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2953 Adjust c_parser_pragma callers.
2954 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
2955 caller.
2956 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2957 c_parser_statement.
2958 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2959 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2960 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2961 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2962 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2963 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2964 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2965 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2966 down where needed.
2967 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
2968 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2969 calls.
2970
99cd9857
MP
29712016-04-13 Marek Polacek <polacek@redhat.com>
2972
2973 PR c/70436
2974 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2975 adjust callers.
2976 (c_parser_statement): Likewise.
2977 (c_parser_c99_block_statement): Likewise.
2978 (c_parser_while_statement): Likewise.
2979 (c_parser_for_statement): Likewise.
2980 (c_parser_if_body): Don't set IF_P here.
2981 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
2982 about dangling else here.
2983 * c-tree.h (c_finish_if_stmt): Adjust declaration.
2984 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
2985 warn about dangling else here.
2986
f13355da
MP
29872016-04-04 Marek Polacek <polacek@redhat.com>
2988
2989 PR c/70307
2990 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2991
5fde6a45
MP
29922016-03-31 Marek Polacek <polacek@redhat.com>
2993
2994 PR c/70297
2995 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2996
4bbf545b
DM
29972016-03-18 David Malcolm <dmalcolm@redhat.com>
2998
2999 PR c/70281
3000 * c-parser.c (c_parser_postfix_expression): Set the source range
3001 for uses of "__builtin_types_compatible_p".
3002
fcc2b74f
JJ
30032016-03-17 Jakub Jelinek <jakub@redhat.com>
3004
3005 PR c/70280
3006 * c-typeck.c (composite_type): Don't count void_list_node
3007 into len, if the list is terminated by void_list_node, start
3008 with void_list_node instead of NULL for newargs. Stop
3009 at void_list_node.
3010
ab4c578f
MP
30112016-03-16 Marek Polacek <polacek@redhat.com>
3012
3013 PR c/70093
3014 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
3015 nested functions returning VM types.
3016
96b3c82d
CP
30172016-03-09 Cesar Philippidis <cesar@codesourcery.com>
3018
3019 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
3020 when calling c_finish_omp_clauses.
3021
29b9828f
BS
30222016-03-04 Bernd Schmidt <bschmidt@redhat.com>
3023
3024 PR c/69824
3025 * c-decl.c (get_parm_info): Don't queue implicit function declarations
3026 for later.
3027
7ff6ca38
MP
30282016-03-04 Marek Polacek <polacek@redhat.com>
3029
3030 PR c/69798
3031 * c-parser.c (c_parser_postfix_expression): Call
3032 c_parser_cast_expression rather than c_parser_postfix_expression.
3033
686e2237
JJ
30342016-03-01 Jakub Jelinek <jakub@redhat.com>
3035
3036 PR c/69796
3037 PR c/69974
3038 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
3039 of incomplete decls to error_mark_node.
3040
0b05329b
MP
30412016-02-24 Marek Polacek <polacek@redhat.com>
3042
3043 PR c/69819
3044 * c-decl.c (finish_decl): Don't update the copy of the type of a
3045 different decl type.
3046
067fbd8b
JJ
30472016-02-23 Jakub Jelinek <jakub@redhat.com>
3048
3049 PR objc/69844
3050 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
3051 in id_kind reclassification.
3052
bf14eba2
JJ
30532016-02-16 Jakub Jelinek <jakub@redhat.com>
3054
3055 PR c/69835
3056 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
3057
ba539195
JN
30582016-02-16 James Norris <jnorris@codesourcery.com>
3059
3060 PR c/64748
3061 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
3062
16595a1f
BS
30632016-02-12 Bernd Schmidt <bschmidt@redhat.com>
3064
f48dfe98
BS
3065 * c-decl.c (build_null_declspecs): Zero the entire struct.
3066
16595a1f
BS
3067 PR c/69522
3068 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
3069 callers changed. If nested_p is true, use it to call
3070 finish_implicit_inits.
3071 * c-tree.h (finish_implicit_inits): Declare.
3072 * c-typeck.c (finish_implicit_inits): New function. Move code
3073 from ...
3074 (push_init_level): ... here.
3075 (set_designator, process_init_element): Call finish_implicit_inits.
3076
66756373
JJ
30772016-02-11 Jakub Jelinek <jakub@redhat.com>
3078
3079 PR c/69768
3080 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
3081 arguments for -Waddress warning.
3082
1066e9b5
JJ
30832016-02-04 Jakub Jelinek <jakub@redhat.com>
3084
3085 PR c/69669
3086 * c-decl.c (finish_enum): When honoring mode attribute,
3087 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
3088
3a5d2ba4
JJ
30892016-01-29 Jakub Jelinek <jakub@redhat.com>
3090
3091 PR debug/69518
3092 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
3093 all type variants, not just TYPE_MAIN_VARIANT.
3094
cbdd8ae0
JJ
30952016-01-27 Jakub Jelinek <jakub@redhat.com>
3096
3097 PR debug/66869
3098 * c-decl.c (c_write_global_declarations_1): Warn with
3099 warn_unused_function if static prototype without definition
3100 is not C_DECL_USED.
3101
fa74a4bc
MP
31022016-01-27 Marek Polacek <polacek@redhat.com>
3103
3104 PR c/68062
3105 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
3106 to unsigned, if needed. Add -Wsign-compare warning.
3107
13f92e8d
JJ
31082016-01-26 Jakub Jelinek <jakub@redhat.com>
3109
3110 PR tree-optimization/69483
3111 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
3112
cd8e73dc 31132016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
3114
3115 PR c/24293
3116 * c-tree.h (incomplete_record_decls): Declare.
3117 * c-parser.c (incomplete_record_decls): Define.
3118 (c_parser_translation_unit): Iterate through incomplete_record_decls and
3119 report error if any decl has zero size.
3120 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
3121 or enum type to incomplete_record_decls.
3122
e6d6ec9e
TV
31232016-01-14 Tom de Vries <tom@codesourcery.com>
3124
3125 PR tree-optimization/68773
3126 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
3127 set force_output.
3128
00083992
MP
31292016-01-14 Marek Polacek <polacek@redhat.com>
3130
3131 PR c/69262
3132 * c-decl.c (grokdeclarator): Provide more information for invalid
3133 array declarations.
3134
7443cf13
DM
31352016-01-06 David Malcolm <dmalcolm@redhat.com>
3136
3137 * c-parser.c (c_parser_unary_expression): For dereferences, build
3138 a combined location before calling build_indirect_ref, so that
3139 error reports cover the full range, manually updating the c_expr
3140 src_range.
3141
6b131d5b
MP
31422016-01-06 Marek Polacek <polacek@redhat.com>
3143
3144 PR sanitizer/69099
3145 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
3146 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
3147 NULL.
3148
818ab71a
JJ
31492016-01-04 Jakub Jelinek <jakub@redhat.com>
3150
3151 Update copyright years.
3152
2fe0a208
MP
31532016-01-04 Marek Polacek <polacek@redhat.com>
3154
3155 PR c/68908
3156 * c-typeck.c (build_atomic_assign): Improve commentary. Add
3157 optimization to use __atomic_fetch_* built-in if possible.
3158
c7b48c8a
TS
31592015-12-23 Thomas Schwinge <thomas@codesourcery.com>
3160
3161 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
3162 into...
3163 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
3164 all users.
3165
fda5652f
MP
31662015-12-22 Marek Polacek <polacek@redhat.com>
3167
3168 PR c/69002
3169 * c-typeck.c (build_component_ref): Warn when acessing elements of
3170 atomic structures or unions.
3171
745e411d
DM
31722015-12-21 David Malcolm <dmalcolm@redhat.com>
3173
3174 * c-typeck.c: Include "gcc-rich-location.h".
3175 (build_binary_op): In the two places that call binary_op_error,
3176 create a gcc_rich_location and populate it with the location of
3177 the binary op and its two operands.
3178
94c40e19
DM
31792015-12-16 David Malcolm <dmalcolm@redhat.com>
3180
3181 * c-parser.c (c_parser_statement_after_labels): When calling
3182 c_finish_return, Use the return expression's location if it has
3183 one, falling back to the location of the first token within it.
3184 * c-typeck.c (c_finish_return): When issuing warnings about
3185 the incorrect presence/absence of a return value, issue a note
3186 showing the declaration of the function.
3187
de67c4c3
DM
31882015-12-16 David Malcolm <dmalcolm@redhat.com>
3189
3190 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
3191 to 4.
3192 (c_parser_peek_nth_token): New function.
3193 (c_parser_peek_conflict_marker): New function.
3194 (c_parser_error): Detect conflict markers and report them as such.
3195
a10704e1
DM
31962015-12-16 David Malcolm <dmalcolm@redhat.com>
3197
3198 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
3199 to preserve range information for the primary expression
3200 in the call to c_parser_postfix_expression_after_primary.
3201
8062bca6
DM
32022015-12-16 David Malcolm <dmalcolm@redhat.com>
3203
3204 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
3205 expression location, falling back on the first token location,
3206 rather than always using the latter.
3207
d06f8b75
MP
32082015-12-16 Marek Polacek <polacek@redhat.com>
3209
3210 PR c/64637
3211 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
3212 available.
3213
2994fb91
MP
32142015-12-15 Marek Polacek <polacek@redhat.com>
3215
3216 PR c/68907
3217 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
3218 artificial decl.
3219
a1b93f8d
DM
32202015-12-08 David Malcolm <dmalcolm@redhat.com>
3221
3222 * c-parser.c (c_parser_alignof_expression): Capture location of
3223 closing parenthesis (if any), or of end of unary expression, and
3224 use it to build a src_range for the expression.
3225
46c6e1e2
DM
32262015-12-08 David Malcolm <dmalcolm@redhat.com>
3227
3228 PR c/68757
3229 * c-parser.c (c_parser_get_builtin_args): Add
3230 "out_close_paren_loc" param, and write back to it.
3231 (c_parser_postfix_expression): Capture the closing
3232 parenthesis location for RID_CHOOSE_EXPR,
3233 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
3234 RID_BUILTIN_SHUFFLE and use it to set the source range
3235 for such expressions; within RID_BUILTIN_COMPLEX set
3236 the underlying location.
3237
66189108
MP
32382015-12-07 Marek Polacek <polacek@redhat.com>
3239
3240 PR c/68668
3241 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
3242 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
3243
f187980b
EB
32442015-12-04 Eric Botcazou <ebotcazou@adacore.com>
3245
3246 * c-tree.h (c_build_va_arg): Adjust prototype.
3247 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
3248 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
3249 parameter, adjust throughout and issue an error if EXPR is a component
3250 with reverse storage order.
3251
4250754e
JM
32522015-12-02 Jason Merrill <jason@redhat.com>
3253
3254 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
3255 (c_fully_fold_internal, decl_constant_value_for_optimization):
3256 Move from c-common.c.
3257 * c-tree.h: Declare decl_constant_value_for_optimization.
3258 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
3259
e9e32ee6
JM
32602015-12-02 Joseph Myers <joseph@codesourcery.com>
3261
3262 PR c/68162
3263 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
3264 following link from declarator to next declarator. Track original
3265 qualified type and pass it to c_build_qualified_type.
3266 * c-typeck.c (c_build_qualified_type): Add arguments
3267 orig_qual_type and orig_qual_indirect.
3268
ff7a55bf
TS
32692015-12-02 Thomas Schwinge <thomas@codesourcery.com>
3270
3271 * c-parser.c (c_parser_omp_clause_name)
3272 (c_parser_oacc_all_clauses): Alphabetical sorting.
3273
657e4e47
JJ
32742015-12-02 Jakub Jelinek <jakub@redhat.com>
3275
3276 PR c/68533
3277 * c-decl.c (get_parm_info): Use b->locus instead of input_location
3278 for diagnostics.
3279
37d5ad46
JB
32802015-12-01 Julian Brown <julian@codesourcery.com>
3281 Cesar Philippidis <cesar@codesourcery.com>
3282 James Norris <James_Norris@mentor.com>
3283
3284 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
3285 (c_parser_oacc_clause_use_device): New function.
3286 (c_parser_oacc_all_clauses): Add use_device support.
3287 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
3288 (c_parser_oacc_host_data): New function.
3289 (c_parser_omp_construct): Add host_data support.
3290 * c-tree.h (c_finish_oacc_host_data): Add prototype.
3291 * c-typeck.c (c_finish_oacc_host_data): New function.
3292 (c_finish_omp_clauses): Add use_device support.
3293
a4850ce9
JH
32942015-11-29 Jan Hubicka <hubicka@ucw.cz>
3295
3296 PR c/67106
3297 * c-decl.c: Set TYPE_PACKED in variants.
3298
b58d3df2
ML
32992015-11-27 Martin Liska <mliska@suse.cz>
3300
3301 PR c++/68312
3302 * c-array-notation.c (fix_builtin_array_notation_fn):
3303 Use release_vec_vec instead of vec::release.
3304 (build_array_notation_expr): Likewise.
3305 (fix_conditional_array_notations_1): Likewise.
3306 (fix_array_notation_expr): Likewise.
3307 (fix_array_notation_call_expr): Likewise.
3308
aec17bfe
JJ
33092015-11-27 Jakub Jelinek <jakub@redhat.com>
3310
3311 PR c/63326
3312 * c-parser.c (c_parser_compound_statement_nostart): If
3313 last_label is true, use pragma_stmt instead of pragma_compound
3314 as second c_parser_pragma argument.
3315 (c_parser_omp_ordered, c_parser_omp_target_update,
3316 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
3317 false as second argument to c_parser_skip_to_pragma_eol after
3318 diagnosing standalone directives used in pragma_stmt context.
3319
688c4de0
IV
33202015-11-24 Ilya Verbin <ilya.verbin@intel.com>
3321
3322 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
3323 with "if (ENABLE_OFFLOADING)".
3324
cbd03aee
DM
33252015-11-23 David Malcolm <dmalcolm@redhat.com>
3326
3327 PR objc/68438
3328 * c-parser.c (c_parser_postfix_expression): Set up source ranges
3329 for various Objective-C constructs: Class.name syntax,
3330 @selector(), @protocol(), @encode(), and [] message syntax.
3331
a87a86e1
DM
33322015-11-20 David Malcolm <dmalcolm@redhat.com>
3333
3334 PR 62314
3335 * c-typeck.c (should_suggest_deref_p): New function.
3336 (build_component_ref): Special-case POINTER_TYPE when
3337 generating a "not a structure of union" error message, and
3338 suggest a "->" rather than a ".", providing a fix-it hint.
3339
8ece8dfb
DM
33402015-11-19 David Malcolm <dmalcolm@redhat.com>
3341
3342 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
3343 candidate into a new function, find_closest_identifier.
3344
433068cc
MP
33452015-11-19 Marek Polacek <polacek@redhat.com>
3346
3347 PR c/68412
3348 * c-typeck.c (parser_build_binary_op): Properly handle
3349 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
3350
bef08b71
DM
33512015-11-17 David Malcolm <dmalcolm@redhat.com>
3352
3353 * c-parser.c (set_c_expr_source_range): Bulletproof both
3354 overloaded implementations against NULL expr->value.
3355 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
3356 values.
3357 (c_parser_unary_expression): Likewise when handling addresses of
3358 labels.
3359 (c_parser_postfix_expression): Likewise for statement expressions,
3360 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
3361 __builtin_va_arg, and for __builtin_offset_of.
3362 (c_parser_postfix_expression_after_paren_type): Initialize expr's
3363 src_range using the range of the braced initializer.
3364 (c_parser_transaction_expression): Set src_range for "ret" to a
3365 sane pair of values.
3366
fff77217
KY
33672015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
3368
3369 * c-parser.c (c_finish_omp_declare_simd): Look for
3370 "simd" attribute as well. Update error message.
3371
1d899da2
TS
33722015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3373
3374 * c-parser.c (c_parser_omp_declare_target): Adjust.
3375
e4606348
JJ
33762015-11-14 Jakub Jelinek <jakub@redhat.com>
3377
3378 * c-typeck.c (c_finish_omp_clauses): Don't mark
3379 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
3380
3e636daf
MP
33812015-11-14 Marek Polacek <polacek@redhat.com>
3382
3383 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
3384 * c-typeck.c: Likewise.
3385
ebedc9a3
DM
33862015-11-13 David Malcolm <dmalcolm@redhat.com>
3387
3388 * c-decl.c (warn_defaults_to): Pass line_table to
3389 rich_location ctor.
3390 * c-errors.c (pedwarn_c99): Likewise.
3391 (pedwarn_c90): Likewise.
3392 * c-parser.c (set_c_expr_source_range): New functions.
3393 (c_token::get_range): New method.
3394 (c_token::get_finish): New method.
3395 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
3396 based on the range from the start of the LHS to the end of the
3397 RHS.
3398 (c_parser_conditional_expression): Likewise, based on the range
3399 from the start of the cond.value to the end of exp2.value.
3400 (c_parser_binary_expression): Call set_c_expr_source_range on
3401 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
3402 (c_parser_cast_expression): Call set_c_expr_source_range on ret
3403 based on the cast_loc through to the end of the expr.
3404 (c_parser_unary_expression): Likewise, based on the
3405 op_loc through to the end of op.
3406 (c_parser_sizeof_expression) Likewise, based on the start of the
3407 sizeof token through to either the closing paren or the end of
3408 expr.
3409 (c_parser_postfix_expression): Likewise, using the token range,
3410 or from the open paren through to the close paren for
3411 parenthesized expressions.
3412 (c_parser_postfix_expression_after_primary): Likewise, for
3413 various kinds of expression.
3414 * c-tree.h (struct c_expr): Add field "src_range".
3415 (c_expr::get_start): New method.
3416 (c_expr::get_finish): New method.
3417 (set_c_expr_source_range): New decls.
3418 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
3419 on ret for prefix unary ops.
3420 (parser_build_binary_op): Likewise, running from the start of
3421 arg1.value through to the end of arg2.value.
3422
ec8b536f
MP
34232015-11-13 Marek Polacek <polacek@redhat.com>
3424
3425 PR c/68320
3426 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
3427
277fe616
DM
34282015-11-13 David Malcolm <dmalcolm@redhat.com>
3429
3430 * c-typeck.c: Include spellcheck.h.
3431 (lookup_field_fuzzy_find_candidates): New function.
3432 (lookup_field_fuzzy): New function.
3433 (build_component_ref): If the field was not found, try using
3434 lookup_field_fuzzy and potentially offer a suggestion.
3435
6e232ba4
JN
34362015-11-12 James Norris <jnorris@codesourcery.com>
3437 Joseph Myers <joseph@codesourcery.com>
3438
3439 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
3440 (c_parser_omp_clause_name): Handle 'device_resident' clause.
3441 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3442 and PRAGMA_OMP_CLAUSE_LINK.
3443 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3444 and PRAGMA_OACC_CLAUSE_LINK.
3445 (OACC_DECLARE_CLAUSE_MASK): New definition.
3446 (c_parser_oacc_declare): New function.
3447
9be4f715
MP
34482015-11-12 Marek Polacek <polacek@redhat.com>
3449
3450 PR c/67784
3451 * c-parser.c (c_parser_for_statement): Reclassify the token in
3452 a correct scope.
3453
e78bede6
MP
34542015-11-11 Marek Polacek <polacek@redhat.com>
3455
3456 PR c/68107
3457 PR c++/68266
3458 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
3459 checking the size of an array.
3460
69f293c9
AM
34612015-11-11 Andrew MacLeod <amacleod@redhat.com>
3462
3463 * c-array-notation.c: Remove unused header files.
3464 * c-aux-info.c: Likewise.
3465 * c-convert.c: Likewise.
3466 * c-decl.c: Likewise.
3467 * c-errors.c: Likewise.
3468 * c-lang.c: Likewise.
3469 * c-objc-common.c: Likewise.
3470 * c-parser.c: Likewise.
3471 * c-typeck.c: Likewise.
3472 * gccspec.c: Likewise.
3473
3a40d81d
NS
34742015-11-09 Thomas Schwinge <thomas@codesourcery.com>
3475 Cesar Philippidis <cesar@codesourcery.com>
3476 James Norris <jnorris@codesourcery.com>
3477 Julian Brown <julian@codesourcery.com>
3478 Nathan Sidwell <nathan@codesourcery.com>
3479
3480 c/
3481 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
3482 routine arg.
3483 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
3484 (c_parser_pragma): Parse 'acc routine'.
3485 (OACC_ROUTINE_CLAUSE_MARK): Define.
3486 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
3487
fc402eec
AA
34882015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3489
3490 PR debug/67192
3491 * c-typeck.c (c_finish_loop): For unconditional loops, set the
3492 location of the backward-goto to the start of the loop body.
3493
f6b0b3db
AA
34942015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3495
3496 PR debug/67192
3497 * c-parser.c (c_parser_while_statement): Finish the loop before
3498 parsing ahead for misleading indentation.
3499 (c_parser_for_statement): Likewise.
3500
ee45a32d
EB
35012015-11-08 Eric Botcazou <ebotcazou@adacore.com>
3502
3503 * c-decl.c (finish_struct): If the structure has reverse storage
3504 order, rewrite the type of array fields with scalar component. Call
3505 maybe_apply_pragma_scalar_storage_order on entry.
3506 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
3507 errors on bit-fields and reverse SSO here and not...
3508 (c_mark_addressable): ...here.
3509 (output_init_element): Adjust call to initializer_constant_valid_p.
3510 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
3511
8a645150
DM
35122015-11-06 David Malcolm <dmalcolm@redhat.com>
3513
3514 * c-decl.c (warn_defaults_to): Update for change in signature
3515 of diagnostic_set_info.
3516 * c-errors.c (pedwarn_c99): Likewise.
3517 (pedwarn_c90): Likewise.
3518 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
3519 for textinfo::set_location.
3520
7a5e4956
CP
35212015-11-05 Cesar Philippidis <cesar@codesourcery.com>
3522 Thomas Schwinge <thomas@codesourcery.com>
3523 James Norris <jnorris@codesourcery.com>
3524
3525 * c-parser.c (c_parser_omp_clause_name): Add support for
3526 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
3527 (c_parser_omp_clause_default): Add is_oacc argument. Handle
3528 default(none) in OpenACC.
3529 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
3530 arguments.
3531 (c_parser_oacc_clause_tile): New function.
3532 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
3533 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
3534 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
3535 TILE}.
3536 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
3537 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
3538 FIRSTPRIVATE}.
3539 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
3540 (c_parser_oacc_update): Update the error message for missing clauses.
3541 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
3542 and OMP_CLAUSE_INDEPENDENT.
3543
bfcfbfa0
MP
35442015-11-05 Marek Polacek <polacek@redhat.com>
3545
3546 PR c/68090
3547 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
3548 deal with pre-evaluation on invalid types.
3549
e01d41e5
JJ
35502015-11-05 Jakub Jelinek <jakub@redhat.com>
3551 Ilya Verbin <ilya.verbin@intel.com>
3552
3553 * c-parser.c: Include context.h and gimple-expr.h.
3554 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
3555 monotonic together with nonmonotonic.
3556 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
3557 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
3558 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
3559 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
3560 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
3561 expressions on combined target teams before the target.
3562 (c_parser_omp_declare_target): If decl has "omp declare target" or
3563 "omp declare target link" attribute, and cgraph or varpool node already
3564 exists, then set corresponding flags. Call c_finish_omp_clauses
3565 in the parenthesized extended-list syntax case.
3566 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
3567 declare target.
3568 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
3569 on OMP_CLAUSE_REDUCTION array sections.
3570 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
3571 into the constant offset, or for variable low-bound using
3572 POINTER_PLUS_EXPR. For structure element based array sections use
3573 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
3574 (c_finish_omp_clauses): Drop generic_field_head, structure
3575 elements are now always mapped even as array section bases,
3576 diagnose same var in data sharing and mapping clauses. Diagnose if
3577 linear step on declare simd is neither a constant nor a uniform
3578 parameter. Look through POINTER_PLUS_EXPR for array section
3579 reductions. Diagnose the same var or function appearing multiple
3580 times on the same directive. Fix up wording for the to clause if t
3581 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
3582 modifier on kinds other than dynamic or guided or nonmonotonic
3583 modifier together with ordered clause.
3584
4bf9e5a8
TS
35852015-11-03 Thomas Schwinge <thomas@codesourcery.com>
3586 Chung-Lin Tang <cltang@codesourcery.com>
3587
3588 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
3589
2adfab87
AM
35902015-10-29 Andrew MacLeod <amacleod@redhat.com>
3591
3592 * c-array-notation.c: Reorder #include's and remove duplicates.
3593 * c-aux-info.c: Likewise.
3594 * c-convert.c: Likewise.
3595 * c-decl.c: Likewise.
3596 * c-errors.c: Likewise.
3597 * c-lang.c: Likewise.
3598 * c-objc-common.c: Likewise.
3599 * c-parser.c: Likewise.
3600 * c-typeck.c: Likewise.
3601
e922069e
JW
36022015-10-26 Jim Wilson <jim.wilson@linaro.org>
3603
3604 PR debug/66068
3605 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
3606 after calling build_qualified_type.
3607
765dd391
CP
36082015-10-27 Cesar Philippidis <cesar@codesourcery.com>
3609 Thomas Schwinge <thomas@codesourcery.com>
3610 James Norris <jnorris@codesourcery.com>
3611 Joseph Myers <joseph@codesourcery.com>
3612 Julian Brown <julian@codesourcery.com>
3613 Bernd Schmidt <bschmidt@redhat.com>
3614
3615 * c-parser.c (c_parser_oacc_shape_clause): New.
3616 (c_parser_oacc_simple_clause): New.
3617 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
3618 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
3619
88bae6f4
TS
36202015-10-27 Thomas Schwinge <thomas@codesourcery.com>
3621 James Norris <jnorris@codesourcery.com>
3622 Cesar Philippidis <cesar@codesourcery.com>
3623
3624 PR c/64765
3625 PR c/64880
3626 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
3627 parameters, and handle these. Adjust all users.
3628 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
3629 into...
3630 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
3631 all users.
3632 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
3633 declare functions.
3634 (c_finish_omp_construct): Declare function.
3635 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
3636 Merge functions into...
3637 (c_finish_omp_construct): ... this new function.
3638
a8fc2579
RB
36392015-10-22 Richard Biener <rguenther@suse.de>
3640
3641 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
3642 before folding a MINUS_EXPR.
3643
e9122ef6
MP
36442015-10-21 Marek Polacek <polacek@redhat.com>
3645
3646 PR c/68024
3647 * c-decl.c (start_function): Warn about vararg functions without
3648 a prototype.
3649
9f47c7e5
IE
36502015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
3651
3652 * c-typeck.c (build_conditional_expr): Use boolean vector
3653 type for vector comparison.
3654 (build_vec_cmp): New.
3655 (build_binary_op): Use build_vec_cmp for comparison.
3656
fa60eeb9
MP
36572015-10-20 Marek Polacek <polacek@redhat.com>
3658
3659 * c-parser.c (is_cilkplus_vector_p): Don't define here.
3660
2c7020eb
MP
36612015-10-20 Marek Polacek <polacek@redhat.com>
3662
3663 PR c/67964
3664 * c-parser.c (c_parser_attributes): Break out of the loop if the
3665 token after an attribute isn't a comma.
3666
d9a6bd32
JJ
36672015-10-13 Jakub Jelinek <jakub@redhat.com>
3668 Aldy Hernandez <aldyh@redhat.com>
3669
3670 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
3671 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
3672 (c_parser_omp_variable_list): Handle structure elements for
3673 map, to and from clauses. Handle array sections in reduction
3674 clause. Formatting fixes.
3675 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
3676 if clause modifiers.
3677 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3678 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3679 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
3680 c_parser_omp_clause_is_device_ptr): New functions.
3681 (c_parser_omp_clause_ordered): Parse optional parameter.
3682 (c_parser_omp_clause_reduction): Handle array reductions.
3683 (c_parser_omp_clause_schedule): Parse optional simd modifier.
3684 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
3685 functions.
3686 (c_parser_omp_clause_linear): Parse linear clause modifiers.
3687 (c_parser_omp_clause_depend_sink): New function.
3688 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
3689 (c_parser_omp_clause_map): Parse release/delete map kinds and
3690 optional always modifier.
3691 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
3692 and c_finish_omp_clauses callers.
3693 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
3694 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
3695 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
3696 (OMP_CRITICAL_CLAUSE_MASK): Define.
3697 (c_parser_omp_critical): Parse critical clauses.
3698 (c_parser_omp_for_loop): Handle doacross loops, adjust
3699 c_finish_omp_for and c_finish_omp_clauses callers.
3700 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
3701 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
3702 (OMP_FOR_CLAUSE_MASK): Add linear clause.
3703 (c_parser_omp_for): Disallow ordered clause when combined with
3704 distribute. Disallow linear clause when combined with distribute
3705 and not combined with simd.
3706 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
3707 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
3708 parse clauses and if depend clause is found, don't parse a body.
3709 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
3710 Allow target parallel without for after it.
3711 (OMP_TASK_CLAUSE_MASK): Add priority clause.
3712 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
3713 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
3714 invalid kinds.
3715 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
3716 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
3717 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
3718 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
3719 functions.
3720 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
3721 defaultmap and is_device_ptr clauses.
3722 (c_parser_omp_target): Parse target parallel and target simd. Set
3723 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
3724 and target exit data. Diagnose invalid map kinds.
3725 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
3726 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
3727 construct.
3728 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
3729 &omp_priv.
3730 (OMP_TASKLOOP_CLAUSE_MASK): Define.
3731 (c_parser_omp_taskloop): New function.
3732 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
3733 handle PRAGMA_OMP_TASKLOOP.
3734 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
3735 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
3736 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
3737 Add IS_OMP argument, handle structure element bases, diagnose
3738 bitfields, pass IS_OMP recursively, diagnose known zero length
3739 array sections in depend clauses, handle array sections in reduction
3740 clause, diagnose negative length even for pointers.
3741 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
3742 types, pass IS_OMP down to handle_omp_array_sections_1, handle
3743 array sections in reduction clause, set
3744 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
3745 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
3746 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
3747 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
3748
21ba0cea
MP
37492015-10-06 Marek Polacek <polacek@redhat.com>
3750
3751 * c-parser.c (c_parser_statement_after_labels): Use
3752 protected_set_expr_location.
3753 (c_parser_omp_clause_num_gangs): Likewise.
3754 (c_parser_omp_clause_num_threads): Likewise.
3755 (c_parser_omp_clause_num_workers): Likewise.
3756 (c_parser_omp_clause_vector_length): Likewise.
3757 (c_parser_omp_clause_num_teams): Likewise.
3758 (c_parser_omp_clause_thread_limit): Likewise.
3759 * c-typeck.c (build_c_cast): Likewise.
3760 (c_cast_expr): Likewise.
3761
624d31fe
RS
37622015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3763
3764 * c-typeck.c (c_tree_equal): Use real_equal instead of
3765 REAL_VALUES_EQUAL.
3766
b8fd7909
JM
37672015-10-04 Jason Merrill <jason@redhat.com>
3768
3769 * c-parser.c (c_lex_one_token): Handle @synchronized.
3770 * c-decl.c (match_builtin_function_types): A declaration of a built-in
3771 can change whether the function is transaction_safe.
3772
1c7485af
MP
37732015-10-02 Marek Polacek <polacek@redhat.com>
3774
3775 PR c/67730
3776 * c-typeck.c (convert_for_assignment): Use the expansion point
3777 location throughout.
3778
3e3b8d63
MP
37792015-10-02 Marek Polacek <polacek@redhat.com>
3780
3781 PR c/64249
3782 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
3783 and pass it down to c_parser_if_statement.
3784 (c_parser_else_body): Add CHAIN parameter and pass it down to
3785 c_parser_statement_after_labels.
3786 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
3787 duplicated if-else-if conditions.
3788
aabef2de
MP
37892015-10-01 Marek Polacek <polacek@redhat.com>
3790
3791 * c-typeck.c (convert_for_assignment): Improve commentary.
3792
de8ddd5f
MP
37932015-09-30 Marek Polacek <polacek@redhat.com>
3794
3795 PR c/67730
3796 * c-typeck.c (c_finish_return): Use the expansion point location for
3797 certain "return with value" warnings.
3798
c4914de6
MLI
37992015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3800
3801 * c-parser.c (pragma_lex): Add loc argument.
3802
0e36f5c7
MP
38032015-09-15 Marek Polacek <polacek@redhat.com>
3804
3805 PR c/67580
3806 * c-decl.c (tag_exists_p): New function.
3807 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3808 struct/union/enum keywords are missing.
3809 * c-tree.h (tag_exists_p): Declare.
3810
2f3bb934
MP
38112015-09-15 Marek Polacek <polacek@redhat.com>
3812
3813 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3814 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3815 Return NULL_TREE instead of 0.
3816 (lookup_name): Return NULL_TREE instead of 0.
3817 (lookup_name_in_scope): Likewise.
3818 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3819 (parser_xref_tag): Use false instead of 0.
3820 (start_struct): Use true instead of 1.
3821 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3822
aa256c4a
MP
38232015-09-14 Marek Polacek <polacek@redhat.com>
3824
3825 * c-typeck.c (set_nonincremental_init_from_string): Use
3826 HOST_WIDE_INT_M1U when shifting a negative value.
3827
dbb68221
MW
38282015-09-09 Mark Wielaard <mjw@redhat.com>
3829
3830 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
3831 parm against NULL.
3832
a8a098ac
JJ
38332015-09-10 Jakub Jelinek <jakub@redhat.com>
3834
3835 PR c/67502
3836 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
3837 into OMP_FOR_PRE_BODY rather than before the loop.
3838
f4b189d5
JJ
38392015-09-09 Jakub Jelinek <jakub@redhat.com>
3840
0bb99c11
JJ
3841 PR c/67501
3842 * c-parser.c (c_parser_oacc_all_clauses,
3843 c_parser_omp_all_clauses): Remove invalid clause from
3844 list of clauses even if parser->error is set.
3845
fce5e5e3
JJ
3846 PR c/67500
3847 * c-parser.c (c_parser_omp_clause_aligned,
3848 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3849 test for errors.
3850 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3851 error_mark_node.
3852
f4b189d5
JJ
3853 PR c/67495
3854 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3855 instead of c_parser_unary_expression. If the result is !lvalue_p,
3856 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3857
b2aaf235
MP
38582015-09-04 Marek Polacek <polacek@redhat.com>
3859
3860 PR sanitizer/67279
3861 * c-typeck.c (build_binary_op): Don't instrument static initializers.
3862
1807ffc1
MS
38632015-09-03 Martin Sebor <msebor@redhat.com>
3864
3865 PR c/66516
8b652e65
JJ
3866 * c-typeck.c (convert_arguments, parser_build_unary_op,
3867 build_conditional_expr, c_cast_expr, convert_for_assignment,
3868 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
3869 reject_gcc_builtin.
3870 (c_decl_implicit): Define.
3871
d04ff417
MP
38722015-09-02 Marek Polacek <polacek@redhat.com>
3873
3874 PR c/67432
3875 * c-parser.c (c_parser_enum_specifier): Give a better error for
3876 an empty enum.
3877
a79683d5
TS
38782015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3879
3880 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3881
191a6b94
MP
38822015-08-12 Marek Polacek <polacek@redhat.com>
3883
3884 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
3885 LOC to it.
3886
420a9d9b
MP
38872015-08-03 Marek Polacek <polacek@redhat.com>
3888
3889 PR c/67088
3890 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
3891 Use it.
3892 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
3893
992118a1
PP
38942015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3895
3896 * c-parser.c (c_parser_if_body): Take token_indent_info
3897 argument. Call warn_for_misleading_indentation even when the
3898 body is a semicolon. Extract token_indent_infos corresponding
3899 to the guard, body and next tokens. Adjust call to
3900 warn_for_misleading_indentation accordingly.
3901 (c_parser_else_body): Likewise.
3902 (c_parser_if_statement): Likewise.
3903 (c_parser_while_statement): Likewise.
3904 (c_parser_for_statement): Likewise.
3905
46308474
LFSM
39062015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
3907 Manuel López-Ibáñez <manu@gcc.gnu.org>
3908
3909 * c-decl.c (get_parm_info): Remove static var. Update warning
3910 message.
3911
05b28fd6
MP
39122015-07-27 Marek Polacek <polacek@redhat.com>
3913
3914 PR c++/66555
3915 PR c/54979
3916 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3917
451b5e48
MP
39182015-07-20 Marek Polacek <polacek@redhat.com>
3919
3920 PR c++/55095
3921 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3922 (build_binary_op): Warn about left shift overflows.
3923
1916bcb5
AM
39242015-07-09 Andrew MacLeod <amacleod@redhat.com>
3925
3926 * c-array-notation.c: Adjust includes for flags.h changes.
3927 * c-objc-common.c: Likewise.
3928
c7131fb2
AM
39292015-07-07 Andrew MacLeod <amacleod@redhat.com>
3930
3931 * c-array-notation.c: Adjust includes.
3932 * c-aux-info.c: Likewise.
3933 * c-convert.c: Likewise.
3934 * c-decl.c: Likewise.
3935 * c-errors.c: Likewise.
3936 * c-lang.c: Likewise.
3937 * c-objc-common.c: Likewise.
3938 * c-parser.c: Likewise.
3939 * c-typeck.c: Likewise.
3940
da2e71c9
MLI
39412015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3942
3943 PR fortran/66605
3944 * c-decl.c (finish_function): Call do_warn_unused_parameter.
3945
b155cfd9
MP
39462015-06-29 Marek Polacek <polacek@redhat.com>
3947
3948 PR c/66322
3949 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3950 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
3951 about -Wswitch-bool here.
3952 (do_case): Update c_add_case_label call.
3953 (c_finish_case): Update c_do_switch_warnings call.
3954
31521951
MP
39552015-06-27 Marek Polacek <polacek@redhat.com>
3956
3957 * c-typeck.c: Use VECTOR_TYPE_P throughout.
3958
22d03525
MP
39592015-06-26 Marek Polacek <polacek@redhat.com>
3960
3961 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3962 INDIRECT_REF_P.
3963 * c-typeck.c (array_to_pointer_conversion): Likewise.
3964 (build_unary_op): Likewise.
3965 (c_finish_return): Likewise.
3966
f0889939
AM
39672015-06-25 Andrew MacLeod <amacleod@redhat.com>
3968
3969 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3970 * c-parser.c: Likewise.
3971
8d67ee55
RS
39722015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3973
3974 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3975 instead of pointer_hash.
3976 (detect_field_duplicates): Likewise.
3977
0ae9bd27
MP
39782015-06-25 Marek Polacek <polacek@redhat.com>
3979
3980 * c-array-notation.c: Use VAR_P throughout.
3981 * c-decl.c: Likewise.
3982 * c-objc-common.c: Likewise.
3983 * c-parser.c: Likewise.
3984 * c-typeck.c: Likewise.
3985
62f9079a
MP
39862015-06-25 Marek Polacek <polacek@redhat.com>
3987
3988 * c-decl.c: Use is_global_var throughout.
3989 * c-parser.c: Likewise.
3990 * c-typeck.c: Likewise.
3991
abb226c9
AM
39922015-06-17 Andrew MacLeod <amacleod@redhat.com>
3993
3994 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3995 * c-aux-info.c: Likewise.
3996 * c-convert.c: Likewise.
3997 * c-decl.c: Likewise.
3998 * c-errors.c: Likewise.
3999 * c-lang.c: Likewise.
4000 * c-objc-common.c: Likewise.
4001 * c-parser.c: Likewise.
4002 * c-typeck.c: Likewise.
4003
8cbababc
JH
40042015-06-11 Jan Hubicka <hubicka@ucw.cz>
4005
4006 PR middle-end/66325
4007 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
4008 variants.
4009
a0349665
PMR
40102015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
4011
4012 * c-decl.c (pop_scope): Register the main translation unit
4013 through the new debug hook.
4014
13fdf2e2
AM
40152015-06-08 Andrew MacLeod <amacleod@redhat.com>
4016
4017 * c-array-notation.c : Adjust include files.
4018 * c-aux-info.c : Likewise.
4019 * c-convert.c : Likewise.
4020 * c-decl.c : Likewise.
4021 * c-errors.c : Likewise.
4022 * c-lang.c : Likewise.
4023 * c-lang.h : Likewise.
4024 * c-objc-common.c : Likewise.
4025 * c-parser.c : Likewise.
4026 * c-typeck.c : Likewise.
4027
d7438551
AH
40282015-06-05 Aldy Hernandez <aldyh@redhat.com>
4029
4030 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
4031 immediately clobber it.
4032 (c_write_global_declarations_1): Remove call to
4033 check_global_declaration_1.
4034 (c_write_global_declarations_2): Remove.
4035 (c_write_final_cleanups): Rename from c_write_global_declarations.
4036 Remove call to finalize_compilation_unit.
4037 Remove calls to debugging hooks.
4038 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
4039 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
4040 * c-tree.h: Remove c_write_global_declarations.
4041
ecb9f223
AM
40422015-06-04 Andrew MacLeod <amacleod@redhat.com>
4043
4044 * c-array-notation.c: Adjust includes for restructured coretypes.h.
4045 * c-aux-info.c: Likewise.
4046 * c-convert.c: Likewise.
4047 * c-decl.c: Likewise.
4048 * c-errors.c: Likewise.
4049 * c-lang.c: Likewise.
4050 * c-objc-common.c: Likewise.
4051 * c-parser.c: Likewise.
4052 * c-typeck.c: Likewise.
4053
9482b620
MP
40542015-06-04 Marek Polacek <polacek@redhat.com>
4055
4056 PR c/66341
4057 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
4058 it is a lvalue.
4059
bc51ace3
PK
40602015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4061
4062 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
4063 Warn for empty struct.
4064 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
4065
ea5b45b6
AT
40662015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
4067
4068 * c-decl.c (start_function): Call plugin before parsing.
4069 (finish_function): Call plugin after parsing.
4070
c2d47482
PK
40712015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4072
4073 PR c/49551
4074 * c-decl.c (merge_decls): Merge DECL_COMMON.
4075
a95492ab
JW
40762015-05-22 Jim Wilson <jim.wilson@linaro.org>
4077
4078 * Make-lang.in (check_gcc_pallelize): Define.
4079
fd5c817a
MP
40802015-05-22 Marek Polacek <polacek@redhat.com>
4081
4082 PR c/47043
4083 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
4084 attributes.
4085
c7b70a3c
MP
40862015-05-21 Marek Polacek <polacek@redhat.com>
4087
4088 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
4089 DECL_BUILT_IN.
4090
21b634ae
MP
40912015-05-20 Marek Polacek <polacek@redhat.com>
4092
4093 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
4094 * c-typeck.c: Likewise.
4095
296a8c2f
MP
40962015-05-19 Marek Polacek <polacek@redhat.com>
4097
4098 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
4099
41b37d5e
JJ
41002015-05-19 Jakub Jelinek <jakub@redhat.com>
4101
4102 PR middle-end/66199
4103 * c-parser.c (c_parser_omp_for_loop): Don't add
4104 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
4105 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
4106 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
4107 constructs.
4108
fab27f52
MM
41092015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
4110
4111 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 4112 swaps.
fab27f52 4113
40de31cf
MLI
41142015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
4115
4116 PR fortran/44054
4117 * c-objc-common.c (c_tree_printer): Replace locus pointer with
4118 accessor function.
4119
3aa3c9fc
MP
41202015-05-14 Marek Polacek <polacek@redhat.com>
4121
4122 PR c/66066
4123 PR c/66127
4124 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
4125 rather than with 0.
4126
c3388e62
DM
41272015-05-12 David Malcolm <dmalcolm@redhat.com>
4128
4129 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
4130 to add a call to warn_for_misleading_indentation.
4131 (c_parser_else_body): Likewise, adding param "else_loc".
4132 (c_parser_if_statement): Check for misleading indentation.
4133 (c_parser_while_statement): Likewise.
4134 (c_parser_for_statement): Likewise.
4135
755e528f
MP
41362015-05-08 Marek Polacek <polacek@redhat.com>
4137
4138 PR c/64918
4139 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
4140 (output_init_element): Likewise.
4141
0173bd2a
MP
41422015-05-07 Marek Polacek <polacek@redhat.com>
4143
4144 PR c/65179
4145 * c-typeck.c (build_binary_op): Warn when left shifting a negative
4146 value.
4147
9babc352
MP
41482015-04-30 Marek Polacek <polacek@redhat.com>
4149
4150 * c-typeck.c (set_init_label): Call error_at instead of error and
4151 pass LOC to it.
4152
ac9f18db
MP
4153 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
4154 the type of a decl.
4155
ec3fba51
MP
4156 * c-typeck.c (c_build_va_arg): Clarify the error message.
4157
b811915d
TS
41582015-04-29 Thomas Schwinge <thomas@codesourcery.com>
4159
4160 * c-parser.c (c_parser_oacc_enter_exit_data): Use
4161 OMP_STANDALONE_CLAUSES.
4162
f3075008
MP
41632015-04-28 Marek Polacek <polacek@redhat.com>
4164
4165 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
4166
4e81b788
MP
41672015-04-28 Marek Polacek <polacek@redhat.com>
4168
4169 PR c/65901
4170 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
4171
6c1db78e
MP
41722015-04-25 Marek Polacek <polacek@redhat.com>
4173
4174 PR c/52085
4175 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
4176 attribute.
4177
5c4abbb8
MP
41782015-04-23 Marek Polacek <polacek@redhat.com>
4179
4180 PR c/65345
4181 * c-decl.c (set_labels_context_r): New function.
4182 (store_parm_decls): Call it via walk_tree_without_duplicates.
4183 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
4184 instead of create_tmp_var. Build TARGET_EXPR instead of
4185 COMPOUND_EXPR.
4186 (build_atomic_assign): Use create_tmp_var_raw instead of
4187 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
4188
06aca1d5
IV
41892015-04-20 Ilya Verbin <ilya.verbin@intel.com>
4190
4191 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
4192 (c_parser_omp_target_update): Add missed %> to error_at ().
4193
8fba1830
BRF
41942015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
4195
4196 PR target/55143
4197 * c-decl.c (c_default_pointer_mode): Remove definition.
4198 * c-tree.h (c_default_pointer_mode): Remove declaration.
4199
62021f64
TB
42002015-03-27 Tobias Burnus <burnus@net-b.de>
4201
4202 PR c/65586
4203 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
4204 error out.
4205 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
4206 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
4207 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
4208
9b65e171
JJ
42092015-03-19 Jakub Jelinek <jakub@redhat.com>
4210
4211 * c-decl.c (c_decl_attributes): Also add "omp declare target"
4212 attribute for DECL_EXTERNAL VAR_DECLs.
4213
17958621
JJ
42142015-03-11 Jakub Jelinek <jakub@redhat.com>
4215
4216 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
4217 argument.
4218
7ccb1a11
JJ
42192015-03-10 Jakub Jelinek <jakub@redhat.com>
4220
4221 PR c/65120
4222 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
4223 before preparing arguments to warn_logical_not_parentheses.
4224
01177669
JJ
42252015-03-09 Jakub Jelinek <jakub@redhat.com>
4226
4227 PR c/65120
4228 * c-typeck.c (parser_build_binary_op): Don't warn for
4229 !!x == y or !b == y where b is _Bool.
4230
802ac282
MP
42312015-03-09 Marek Polacek <polacek@redhat.com>
4232
4233 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
4234 * c-decl.c (grokdeclarator): Likewise.
4235 * c-typeck.c (build_binary_op): Likewise.
4236
e5165b60
MP
42372015-02-27 Marek Polacek <polacek@redhat.com>
4238
4239 PR c/65228
4240 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
4241
065d214c
MP
42422015-02-14 Marek Polacek <polacek@redhat.com>
4243
4244 PR c/64768
4245 * c-decl.c (grokdeclarator): Set the range of a flexible array member
4246 declared through a typedef name.
4247
e5d9235b
MP
42482015-02-13 Marek Polacek <polacek@redhat.com>
4249
4250 PR c/65050
4251 * c-decl.c (grokdeclarator): Print also the type when giving
4252 the error message about array's incomplete element type.
4253
fa01ffcc
JJ
42542015-02-11 Jakub Jelinek <jakub@redhat.com>
4255
4256 PR c/64824
4257 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
4258 check in the POP macro.
4259
c3e38a03
MP
42602015-02-09 Marek Polacek <polacek@redhat.com>
4261
4262 PR c/64856
4263 * c-typeck.c (process_init_element): Don't always wrap
4264 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
4265 initializing a range of elements.
4266
4886ec8e
JJ
42672015-02-04 Jakub Jelinek <jakub@redhat.com>
4268
4269 PR c/64824
4270 PR c/64868
4271 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
4272
c3e38a03 42732015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
4274
4275 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
4276 processing enum declaration.
4277
7b33f0c8
MP
42782015-01-29 Marek Polacek <polacek@redhat.com>
4279
4280 PR c/64709
4281 * c-typeck.c (pop_init_level): If constructor_elements has
4282 exactly one element with integer_zerop value, set constructor_zeroinit
4283 to 1. Remove braces around warning_init call.
4284
dea63e49
JJ
42852015-01-27 Jakub Jelinek <jakub@redhat.com>
4286
4287 PR c/64766
4288 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
4289 of FUNCTION_DECLs with error_mark_node.
4290
d38f7dce
JJ
42912015-01-26 Jakub Jelinek <jakub@redhat.com>
4292
4293 PR c/64778
4294 * c-typeck.c (convert_arguments): Return -1 if there are
4295 error_args, even if we've diagnosed too many arguments.
4296
cbf5d0e7
RB
42972015-01-21 Richard Biener <rguenther@suse.de>
4298
4299 PR middle-end/64313
4300 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
4301 for builtins the user declared correctly.
4302
41dbbb37
TS
43032015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4304 Bernd Schmidt <bernds@codesourcery.com>
4305 Cesar Philippidis <cesar@codesourcery.com>
4306 James Norris <jnorris@codesourcery.com>
4307 Jakub Jelinek <jakub@redhat.com>
4308 Ilmir Usmanov <i.usmanov@samsung.com>
4309
4310 * c-parser.c: Include "gomp-constants.h".
4311 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
4312 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
4313 Use OMP_CLAUSE_SET_MAP_KIND.
4314 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
4315 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
4316 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
4317 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
4318 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
4319 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
4320 "copyout", "create", "delete", "deviceptr", "gang", "host",
4321 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
4322 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
4323 "present_or_create", "pcreate", "seq", "self", "vector",
4324 "vector_length", "wait", "worker".
4325 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
4326 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
4327 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
4328 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
4329 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
4330 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
4331 (c_parser_oacc_data_clause_deviceptr)
4332 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
4333 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
4334 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
4335 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
4336 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
4337 (c_parser_oacc_parallel, c_parser_oacc_update)
4338 (c_parser_oacc_wait): New functions.
4339 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
4340 (c_finish_oacc_data): New prototypes.
4341 * c-typeck.c: Include "gomp-constants.h".
4342 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
4343 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
4344 OMP_CLAUSE_SET_MAP_KIND.
4345 (c_finish_oacc_parallel, c_finish_oacc_kernels)
4346 (c_finish_oacc_data): New functions.
4347 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
4348 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
4349 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
4350 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
4351 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
4352 GOMP_MAP_FORCE_DEVICEPTR.
4353
adfac8df
JJ
43542015-01-09 Michael Collison <michael.collison@linaro.org>
4355
4356 * c-array-notation.c: Include hash-set.h, machmode.h,
4357 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4358 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
4359 * c-aux-info.c: Ditto.
4360 * c-convert.c: Ditto.
4361 * c-decl.c: Ditto.
4362 * c-errors.c: Ditto.
4363 * c-lang.c: Dittoxs.
4364 * c-objc-common.c: Ditto.
4365 * c-parser.c: Ditto.
4366 * c-typeck.c: Include hash-set.h, machmode.h,
4367 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4368 fold-const.h, wide-int.h, inchash.h, real.h and
4369 fixed-value.h due to flattening of tree.h.
4370
2cc901dc
MP
43712015-01-07 Marek Polacek <polacek@redhat.com>
4372
4373 PR c/64417
4374 * c-typeck.c (process_init_element): Disallow initialization of
4375 a flexible array member with a string constant if the structure
4376 is in an array.
4377
5624e564
JJ
43782015-01-05 Jakub Jelinek <jakub@redhat.com>
4379
e5341100
JJ
4380 PR sanitizer/64344
4381 * c-typeck.c (convert_for_assignment, c_finish_return): For
4382 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
4383 types also set in_late_binary_op around convert call.
4384 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
4385 to integral type casts, if not in_late_binary_op, pass c_fully_fold
4386 result on expr as last argument to ubsan_instrument_float_cast,
4387 if in_late_binary_op, don't use c_save_expr but save_expr.
4388
5624e564
JJ
4389 Update copyright years.
4390
5bd012f8
MP
43912015-01-05 Marek Polacek <polacek@redhat.com>
4392
4393 PR c/64423
4394 * c-typeck.c (build_array_ref): Pass loc down to
4395 warn_array_subscript_with_type_char.
4396
3f8257db 43972014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
4398
4399 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 4400 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 4401 element type.
8e745a17 4402 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 4403 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 4404 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 4405 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 4406 to PEDWARN_FOR_QUALIFIERS.
768952be 4407
8f94a8c4
JJ
44082014-12-17 Jakub Jelinek <jakub@redhat.com>
4409
4410 PR sanitizer/64289
4411 * c-convert.c: Include ubsan.h.
4412 (convert): For real -> integral casts and
4413 -fsanitize=float-cast-overflow don't call convert_to_integer, but
4414 instead instrument the float cast directly.
4415
b731b390
JJ
44162014-11-29 Jakub Jelinek <jakub@redhat.com>
4417
4418 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
4419 c_finish_stmt_expr): Remove NULL last argument from
4420 create_tmp_var_raw and create_tmp_var calls.
4421 * c-array-notation.c (fix_builtin_array_notation_fn,
4422 build_array_notation_expr, fix_conditional_array_notations_1,
4423 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
4424
541e35a6
MP
44252014-11-28 Marek Polacek <polacek@redhat.com>
4426
4427 PR c/63862
4428 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
4429 convert the right operand to integer type.
4430
b286be94
MP
44312014-11-25 Marek Polacek <polacek@redhat.com>
4432
4433 PR c/63877
4434 * c-decl.c (start_function): Disable -Wmissing-declarations warning
4435 for inline functions.
4436
aa7da51a
JJ
44372014-11-21 Jakub Jelinek <jakub@redhat.com>
4438
4439 PR target/63764
4440 * c-typeck.c (build_array_ref): Adjust
4441 convert_vector_to_pointer_for_subscript caller. If it returns true,
4442 call non_lvalue_loc on the result.
4443
d876207f
RB
44442014-11-11 Richard Biener <rguenther@suse.de>
4445
4446 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
4447 to true.
4448
e5e44252
AK
44492014-11-10 Andi Kleen <ak@linux.intel.com>
4450
4451 PR c/60804
4452 * c-parser.c (c_parser_statement_after_labels): Call
4453 check_no_cilk.
4454 (c_parser_if_statement): Dito.
4455 (c_parser_switch_statement): Dito.
4456 (c_parser_while_statement): Dito.
4457 (c_parser_do_statement): Dito.
4458 (c_parser_for_statement): Dito.
4459 * c-typeck.c (c_finish_loop): Dito.
4460
13c21655
PC
44612014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
4462
4463 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
4464 OPT_Wshift_count_overflow in the warnings.
4465
2d51fcef
MP
44662014-10-30 Marek Polacek <polacek@redhat.com>
4467
4468 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
4469 print the stripped version as well, if they're not the same.
4470
ef4bddc2
RS
44712014-10-29 Richard Sandiford <richard.sandiford@arm.com>
4472
4473 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
4474 machine_mode.
4475
c582198b
AM
44762014-10-28 Andrew MacLeod <amacleod@redhat.com>
4477
4478 * c-decl.c: Adjust include files.
4479 * c-parser.c: Ditto.
4480
ddc8de03
PM
44812014-10-27 Phil Muldoon <pmuldoon@redhat.com>
4482 Tom Tromey <tromey@redhat.com>
4483
4484 * c-tree.h (enum c_oracle_request): New.
4485 (c_binding_oracle_function): New typedef.
4486 (c_binding_oracle, c_pushtag, c_bind): Declare.
4487 * c-decl.c (c_binding_oracle): New global.
4488 (I_SYMBOL_CHECKED): New macro.
4489 (i_symbol_binding): New function.
4490 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
4491 (I_TAG_CHECKED): New macro.
4492 (i_tag_binding): New function.
4493 (I_TAG_BINDING, I_TAG_DECL): Redefine.
4494 (I_LABEL_CHECKED): New macro.
4495 (i_label_binding): New function.
4496 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
4497 (c_print_identifier): Save and restore c_binding_oracle.
4498 (c_pushtag, c_bind): New functions.
4499
60393bbc
AM
45002014-10-27 Andrew MacLeod <amacleod@redhat.com>
4501
4502 * c-typeck.c: Adjust include files.
4503
d723bb7c
MLI
45042014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
4505
4506 PR c++/53061
4507 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
4508 initialization here...
4509 (c_initialize_diagnostics): ... but here. Set defaults after
4510 building pretty-printer.
4511
1bc5a451
MP
45122014-10-23 Marek Polacek <polacek@redhat.com>
4513
4514 PR c/63626
4515 * c-decl.c (pop_scope): Don't print warning in external_scope.
4516
4435bb92
MP
45172014-10-19 Marek Polacek <polacek@redhat.com>
4518
4519 PR c/63567
4520 * c-typeck.c (output_init_element): Allow initializing objects with
4521 static storage duration with compound literals even in C99 and add
4522 pedwarn for it.
4523
7278465e
MP
45242014-10-17 Marek Polacek <polacek@redhat.com>
4525
4526 PR c/63567
4527 * c-typeck.c (digest_init): Allow initializing objects with static
4528 storage duration with compound literals even in C99 and add pedwarn
4529 for it.
4530
d9b7be2e
MP
45312014-10-17 Marek Polacek <polacek@redhat.com>
4532
4533 PR c/63543
4534 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
4535 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
4536 error multiple times. Print the type.
4537
f406ae1f
MP
45382014-10-17 Marek Polacek <polacek@redhat.com>
4539
4540 PR c/63549
4541 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
4542 type.
4543
92574c7c
MP
45442014-10-17 Marek Polacek <polacek@redhat.com>
4545
4546 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
4547 (start_function): Use OPT_Wimplicit_int instead of 0.
4548 (store_parm_decls_oldstyle): Likewise.
4549
1bc4a978
MT
45502014-10-17 Alan Modra <amodra@gmail.com>
4551
4552 PR middle-end/61848
4553 * c-decl.c (merge_decls): Don't merge section name or tls model
4554 to newdecl symtab node, instead merge to olddecl. Override
4555 existing olddecl section name. Set tls_model for all thread-local
4556 vars, not just OMP thread-private ones. Remove incorrect comment.
4557
83685514
AM
45582014-10-16 Andrew MacLeod <amacleod@redhat.com>
4559
4560 * c-decl.c: Adjust include files.
4561
78a7c317
DD
45622014-10-14 DJ Delorie <dj@redhat.com>
4563
4564 * c-parser.c (c_parse_init): Add RID entries for each __intN.
4565 (c_token_starts_typename): Check all __intN, not just __int128.
4566 (c_token_starts_declspecs): Likewise.
4567 (c_parser_declspecs): Likewise.
4568 (c_parser_attribute_any_word): Likewise.
4569 (c_parser_objc_selector): Likewise.
4570 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
4571 (struct c_declspecs): Add int_n_idx field to record *which* __intN
4572 is specified.
4573 * c-decl.c (declspecs_add_type): Check for all __intN, not just
4574 __int128.
4575 (finish_declspecs): Likewise.
4576
74d98c1e
AB
45772014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
4578
8e745a17 4579 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 4580 the duplicate code.
8e745a17 4581 (c_parser_statement): Call the new function.
74d98c1e 4582
84937de2
MP
45832014-10-09 Marek Polacek <polacek@redhat.com>
4584
4585 PR c/63480
4586 * c-typeck.c (pop_init_level): Don't warn about initializing
4587 with { }.
4588
0382aaa0
MP
45892014-10-07 Marek Polacek <polacek@redhat.com>
4590
4591 PR c/59717
4592 * c-decl.c (header_for_builtin_fn): New function.
4593 (implicitly_declare): Suggest which header to include.
4594
7a0ca710
MP
45952014-10-07 Marek Polacek <polacek@redhat.com>
4596
4597 * c-convert.c (convert): Use error_operand_p.
4598 * c-typeck.c (require_complete_type): Likewise.
4599 (really_atomic_lvalue): Likewise.
4600 (digest_init): Likewise.
4601 (handle_omp_array_sections_1): Likewise.
4602
6bc8a126
MP
46032014-10-03 Marek Polacek <polacek@redhat.com>
4604
4605 PR c/63453
4606 * c-decl.c (pop_scope): Don't warn about "inline function declared
4607 but never defined" for functions marked with gnu_inline attribute.
4608
d90c0a59
JJ
46092014-09-25 Jakub Jelinek <jakub@redhat.com>
4610
4611 PR c++/63249
4612 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
4613 on low_bound and length.
4614
083e891e
MP
46152014-09-24 Marek Polacek <polacek@redhat.com>
4616
4617 PR c/61405
4618 PR c/53874
4619 * c-parser.c: Don't define CPP_KEYWORD.
4620 (c_parser_switch_statement): Pass original type to c_finish_case.
4621 * c-tree.h (c_finish_case): Update declaration.
4622 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
4623 conditionally to c_do_switch_warnings.
4624
8d95fe25
MP
46252014-09-03 Marek Polacek <polacek@redhat.com>
4626
4627 PR c/62024
4628 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
4629 conversions.
4630
9a771876
JJ
46312014-09-02 Jakub Jelinek <jakub@redhat.com>
4632 Balaji V. Iyer <balaji.v.iyer@intel.com>
4633 Igor Zamyatin <igor.zamyatin@intel.com>
4634
4635 * c-parser.c (c_parser_cilk_for): New function.
4636 (c_parser_cilk_grainsize): Likewise.
4637 (c_get_temp_regvar): Likewise.
4638 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
4639 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
4640 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
4641 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
4642 case.
4643
b7679d96
CG
46442014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
4645
4646 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
4647 with using HOST_WIDE_INT without truncation to 'int'
4648
59ea0364
MP
46492014-08-22 Marek Polacek <polacek@redhat.com>
4650
4651 PR c++/62199
4652 * c-typeck.c (parser_build_binary_op): Adjust call to
4653 warn_logical_not_parentheses.
4654
671a475e
IZ
46552014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
4656
4657 PR other/62008
4658 * c-parser.c (c_parser_array_notation): Check for correct
4659 type of an array added.
4660
04159acf
MP
46612014-08-19 Marek Polacek <polacek@redhat.com>
4662
4663 PR c++/62153
4664 * c-typeck.c (build_binary_op): If either operand of a comparison
4665 is a boolean expression, call maybe_warn_bool_compare.
4666
c77935ee
PP
46672014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
4668
4669 PR c/45584
4670 * c-typeck.c (build_c_cast): Do a conversion even when the
4671 TYPE_MAIN_VARIANTs are the same.
4672
35aff4fb
MP
46732014-08-19 Marek Polacek <polacek@redhat.com>
4674
4675 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
4676 pedwarn_c99 instead of pedwarn.
4677 (grokfield): Likewise.
4678 (warn_defaults_to): New function.
4679 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
4680 Unconditionally call pedwarn_c99 instead of pedwarn.
4681 (start_function): Call warn_defaults_to instead of pedwarn_c99.
4682 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
4683 check flag_isoc11 before.
4684 * c-errors.c (pedwarn_c99): Change the return type to bool.
4685 Handle -Wc99-c11-compat.
4686 * c-parser.c (disable_extension_diagnostics): Handle
4687 warn_c99_c11_compat.
4688 (restore_extension_diagnostics): Likewise.
4689 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
4690 instead of pedwarn, don't check flag_isoc11 before.
4691 (c_parser_declspecs): Likewise.
4692 (c_parser_alignas_specifier): Likewise.
4693 (c_parser_alignof_expression): Likewise.
4694 (c_parser_generic_selection): Likewise.
4695 * c-tree.h (pedwarn_c99): Update declaration.
4696 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
4697 of pedwarn_c99.
4698
177cce46
MP
46992014-08-19 Marek Polacek <polacek@redhat.com>
4700
4701 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
4702 to pedwarn_c90.
4703 * c-errors.c: Include "opts.h".
4704 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
4705 * c-parser.c (disable_extension_diagnostics): Handle negative value
4706 of warn_c90_c99_compat, too.
4707 (restore_extension_diagnostics): Likewise.
4708 (c_parser_compound_statement_nostart): Pass
4709 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
4710
6dc99c33
MP
47112014-08-12 Marek Polacek <polacek@redhat.com>
4712
4713 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
4714 Add pedwarn.
4715 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
4716 Likewise.
4717 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
4718
3f8257db 47192014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
4720
4721 PR c/51849
4722 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
4723 Call pedwarn_c90 instead of pedwarn.
4724 (check_bitfield_type_and_width): Likewise.
4725 (declspecs_add_qual): Likewise.
4726 (declspecs_add_type): Likewise.
4727 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
4728 Adjust to only call pedwarn_c90.
4729 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
4730 pedwarn_c90 instead of pedwarn.
4731 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
4732 * c-parser.c (disable_extension_diagnostics): Handle
4733 warn_c90_c99_compat.
4734 (restore_extension_diagnostics): Likewise.
4735 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
4736 pedwarn_c90 instead of pedwarn.
4737 (c_parser_initelt): Likewise.
4738 (c_parser_postfix_expression): Likewise.
4739 (c_parser_postfix_expression_after_paren_type): Likewise.
4740 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
4741 * c-tree.h: Fix formatting.
4742 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
4743 pedwarn_c90 instead of pedwarn.
4744
9f25a338
TS
47452014-08-07 Trevor Saunders <tsaunders@mozilla.com>
4746
4747 * c-typeck.c: Remove include of pointer-set.h.
4748
044331a8
MP
47492014-08-07 Marek Polacek <polacek@redhat.com>
4750
4751 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
4752
b787e7a2
TS
47532014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4754
4755 * c-typeck.c: Use hash_map instead of pointer_map.
4756
6e2830c3
TS
47572014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4758
4759 * c-decl.c: Use hash_set instead of pointer_set.
4760
a7ee52fb
IZ
47612014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
4762
4763 PR middle-end/61455
4764 * c-array-notation.c (expand_array_notations): Handling
4765 of DECL_EXPR added.
4766
b4dfdc11
MG
47672014-07-31 Marc Glisse <marc.glisse@inria.fr>
4768
4769 PR c++/60517
4770 * c-typeck.c (c_finish_return): Return 0 instead of the address of
4771 a local variable.
4772
976d5a22
TT
47732014-07-30 Tom Tromey <tromey@redhat.com>
4774
4775 * c-typeck.c (struct constructor_stack) <designator_depth>: New
4776 field.
4777 (really_start_incremental_init, push_init_level): Initialize
4778 designator_depth.
4779 (pop_init_level): Set global designator_depth.
4780 (process_init_element): Check for designated_init attribute.
4781
30281de2
MP
47822014-07-20 Marek Polacek <polacek@redhat.com>
4783
4784 PR c/61852
4785 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
4786 (implicitly_declare): Pass location to implicit_decl_warning.
4787
b108f48f
JJ
47882014-07-14 Jakub Jelinek <jakub@redhat.com>
4789
4790 PR middle-end/61294
4791 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
4792 If non-NULL, call c_parser_check_literal_zero.
4793 (c_parser_check_literal_zero): New function.
4794 (c_parser_postfix_expression_after_primary): Adjust
4795 c_parser_expr_list caller, handle -Wmemset-transposed-args.
4796
773ec47f
MP
47972014-07-06 Marek Polacek <polacek@redhat.com>
4798
4799 PR c/6940
4800 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4801 * c-tree.h (C_ARRAY_PARAMETER): Define.
4802 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4803 function parameter.
4804
22e1cf1c 48052014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 4806 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
4807
4808 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4809 releasing symbol.
4810
52ec0ea3
MP
48112014-07-01 Marek Polacek <polacek@redhat.com>
4812
4813 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4814 instead of 0 to WARN_FOR_ASSIGNMENT.
4815
d5c3d343
MP
48162014-07-01 Marek Polacek <polacek@redhat.com>
4817
4818 PR c/58286
4819 * c-typeck.c (convert_for_assignment): Pass
4820 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4821
6a7253a4
MP
48222014-06-30 Marek Polacek <polacek@redhat.com>
4823
4824 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4825 has no_sanitize_undefined attribute.
4826
5e88a8f4
IZ
48272014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
4828
4829 PR middle-end/57541
4830 * c-array-notation.c (fix_builtin_array_notation_fn):
4831 Check for 0 arguments in builtin call. Check that bultin argument is
4832 correct.
4833 * c-parser.c (c_parser_array_notation): Check for incorrect initial
4834 index.
4835
9698b078
SH
48362014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
4837
4838 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
4839 qualifiers in __auto_type for atomic types.
4840 (c_parser_typeof_specifier): Discard all type qualifiers in
4841 __typeof__ for atomic types.
4842
6e07c515
MP
48432014-06-25 Marek Polacek <polacek@redhat.com>
4844
4845 PR c/61162
4846 * c-parser.c (c_parser_statement_after_labels): Pass the location of
4847 the return expression to c_finish_return.
4848
da6f124d
JJ
48492014-06-25 Jakub Jelinek <jakub@redhat.com>
4850
4851 * c-typeck.c (c_finish_omp_clauses): Make sure
4852 OMP_CLAUSE_LINEAR_STEP has correct type.
4853
c203e8a7
TS
48542014-06-24 Trevor Saunders <tsaunders@mozilla.com>
4855
4856 * c-decl.c: Adjust.
4857
56ad0e38
JJ
48582014-06-24 Jakub Jelinek <jakub@redhat.com>
4859
4860 * c-parser.c (c_parser_omp_for_loop): For
4861 #pragma omp parallel for simd move lastprivate clause from parallel
4862 to for rather than simd.
4863
47c2554f
MP
48642014-06-23 Marek Polacek <polacek@redhat.com>
4865
4866 * c-typeck.c (parser_build_binary_op): Don't call
4867 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
4868
56363ffd
JH
48692014-06-15 Jan Hubicka <hubicka@ucw.cz>
4870
4871 * c-parser.c (c_parser_omp_threadprivate): Likewise.
4872 * c-decl.c (merge_decls): Likewise.
4873
d7ff7ae5
MP
48742014-06-09 Marek Polacek <polacek@redhat.com>
4875
4876 PR c/36446
4877 * c-typeck.c (error_init): Call inform instead of error_at.
4878 (pedwarn_init): Call inform instead of pedwarn.
4879 (warning_init): Call inform instead of warning_at.
4880
24d047a3
JH
48812014-06-07 Jan Hubicka <hubicka@ucw.cz>
4882
4883 * c-decl.c (merge_decls): Use set_decl_section_name.
4884 (duplicate_decls): Remove node if it exists.
4885
9bac5cbb
G
48862014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
4887
4888 PR c/53119
4889 * c-typeck.c (push_init_level, process_init_element,
4890 pop_init_level): Correct check for zero initialization, move
4891 missing brace warning to respect zero initialization.
4892
8ffcdea8
MP
48932014-06-05 Marek Polacek <polacek@redhat.com>
4894
4895 PR c/56724
4896 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
4897
742938c9
MP
48982014-06-05 Marek Polacek <polacek@redhat.com>
4899
4900 PR c/49706
4901 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
4902 on the left hand side operand of a comparison.
4903
6447c55d
MP
49042014-06-05 Marek Polacek <polacek@redhat.com>
4905
4906 PR c/48062
4907 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
4908 Print note only if the warning was printed.
4909
9dc7743c
IZ
49102014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
4911
4912 PR c/58942
4913 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4914 with a pointer.
4915
fedfecef
MP
49162014-06-03 Marek Polacek <polacek@redhat.com>
4917
4918 PR c/60439
4919 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4920 c_start_case.
4921 * c-tree.h (c_start_case): Update.
4922 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
4923 switch condition has boolean value.
4924
9b2b7279
AM
49252014-06-02 Andrew MacLeod <amacleod@redhat.com>
4926
4927 * c-decl.c: Include builtins.h.
4928 * c-parser.c: Likewise.
4929
5c1bc275
MP
49302014-05-27 Marek Polacek <polacek@redhat.com>
4931
4932 PR c/56724
4933 * c-typeck.c (convert_arguments): Get location of a parameter. Change
4934 error and warning calls to error_at and warning_at. Pass location of
4935 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
4936 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4937 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
4938
97563bc8
IZ
49392014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
4940
4941 PR c/61191
4942 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4943 function parameters.
4944
aede2c10
JH
49452014-05-23 Jan Hubicka <hubicka@ucw.cz>
4946
4947 * c-decl.c (merge_decls): Preserve symtab node pointers.
4948 (duplicate_decls): Free new decl.
4949
edbba2ce
TS
49502014-05-23 Thomas Schwinge <thomas@codesourcery.com>
4951
f3316c6d
TS
4952 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4953 initialization.
4954
edbba2ce
TS
4955 * c-parser.c (c_parser_omp_target): Return bool values.
4956
68c81f24
TS
49572014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4958
4959 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4960 num_teams_loc variable to num_thread_limit_loc.
4961
632f2871
RS
49622014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4963
4964 * c-array-notation.c (expand_array_notations): Use void_node
4965 instead of void_zero_node.
4966
766090c2
TS
49672014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4968
4969 * c-decl.c (finish_struct): Adjust.
4970 (finish_enum): Likewise.
4971 (bind): Adjust.
4972 (record_inline_static): Likewise.
4973 (push_scope): Likewise.
4974 (make_label): Likewise.
4975 (lookup_label_for_goto): Likewise.
4976 (finish_struct): Likewise.
4977 (finish_enum): Likewise.
4978 (store_parm_decls): Likewise.
4979 (c_push_function_context): Likewise.
4980 * c-lang.h: Remove usage of variable_size gty attribute.
4981 * c-parser.c (c_parse_init): Adjust.
4982 (c_parse_file): Likewise.
4983
2b107f6b
MP
49842014-05-13 Marek Polacek <polacek@redhat.com>
4985
4986 PR c/61162
4987 * c-typeck.c (convert_for_assignment): Pass location to
4988 WARN_FOR_ASSIGNMENT instead of input_location.
4989
d033409e
MP
49902014-05-10 Marek Polacek <polacek@redhat.com>
4991
4992 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4993 maybe_warn_string_init.
4994 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4995 maybe_warn_string_init.
4996 * c-tree.h (maybe_warn_string_init): Update declaration.
4997 * c-typeck.c (maybe_warn_string_init): Add location parameter.
4998 Call pedwarn_init with loc instead of with input_location.
4999 (digest_init): Pass init_loc to maybe_warn_string_init.
5000 (pop_init_level): Call pedwarn_init with loc instead of with
5001 input_location.
5002 (set_init_index): Likewise.
5003 (process_init_element): Likewise.
5004
ea58ef42
MP
50052014-05-09 Marek Polacek <polacek@redhat.com>
5006
5007 PR c/61096
5008 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
5009 (c_parser_initelt): Pass location to set_init_label. Pass array index
5010 location to set_init_index.
5011 * c-tree.h (push_init_level): Update declaration.
5012 (pop_init_level): Likewise.
5013 (set_init_index): Likewise.
5014 (set_init_label): Likewise.
5015 * c-typeck.c (error_init): Add location parameter. Call error_at
5016 instead of error.
5017 (digest_init): Pass init_loc to error_init.
5018 (really_start_incremental_init):
5019 (push_init_level): Add location parameter. Pass loc to pop_init_level
5020 and error_init.
5021 (pop_init_level): Likewise.
5022 (set_designator): Add location parameter. Pass loc to pop_init_level,
5023 push_init_level, and error_init.
5024 (set_init_index): Add location parameter. Pass loc to error_init and
5025 set_designator.
5026 (set_init_label): Likewise.
5027 (output_init_element): Pass loc to error_init.
5028 (process_init_element): Pass loc to error_init, pop_init_level,
5029 pedwarn_init, and push_init_level.
5030
661a0813
MP
50312014-05-09 Marek Polacek <polacek@redhat.com>
5032
5033 PR c/50459
5034 * c-parser.c (c_parser_attributes): Parse the arguments as an
5035 expression-list if the attribute takes identifier.
5036
2793eeab
MP
50372014-05-08 Marek Polacek <polacek@redhat.com>
5038
5039 PR c/61053
5040 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
5041 TYPE_ALIGN_UNIT.
5042
f827930a
MP
50432014-05-08 Marek Polacek <polacek@redhat.com>
5044
5045 PR c/61077
5046 * c-decl.c (start_function): Warn for _Atomic-qualified return type
5047 of main.
5048
1d60af08
KZ
50492014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
5050 Mike Stump <mikestump@comcast.net>
5051 Richard Sandiford <rdsandiford@googlemail.com>
5052
5053 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
5054 (finish_enum): Use wide-int interfaces.
5055 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
5056 * c-typeck.c (build_c_cast): Likewise.
5057 (set_nonincremental_init_from_string): Likewise.
5058 (c_tree_equal): Likewise.
5059
a0e24419
MP
50602014-05-02 Marek Polacek <polacek@redhat.com>
5061
5062 PR c/25801
5063 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
5064 Return size_one_node when the type is not complete.
5065 (pointer_diff): Remove comment.
5066 (build_unary_op): Improve error messages.
5067
19fc9faa
MP
50682014-05-02 Marek Polacek <polacek@redhat.com>
5069
5070 * c-typeck.c (c_finish_return): Separate warning_at calls.
5071
63bc4e87
MP
50722014-05-02 Marek Polacek <polacek@redhat.com>
5073
5074 * c-tree.h (error_init): Remove declaration.
5075 (pedwarn_init): Likewise.
5076 * c-typeck.c (error_init): Make static and move above.
5077 (pedwarn_init): Likewise.
5078 (warning_init): Move above.
5079 (maybe_warn_string_init): Likewise.
5080
4bd2511b
JL
50812014-05-01 Jeff Law <law@redhat.com>
5082
5083 Revert:
5084
5085 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5086 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
5087 avoid goto.
5088
6a358dcb
MP
50892014-05-02 Marek Polacek <polacek@redhat.com>
5090
5091 PR c/60784
5092 * c-typeck.c (push_init_level): Set constructor_designated to
5093 p->designated for structures.
5094
ae5ebda4
MP
50952014-05-01 Marek Polacek <polacek@redhat.com>
5096
5097 PR c/60915
5098 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
5099 function-definition has an attribute after the declarator.
5100
96b40f8d
MP
51012014-05-01 Marek Polacek <polacek@redhat.com>
5102
5103 PR c/60257
5104 * c-typeck.c (warning_init): Add location_t parameter. Call
5105 warning_at instead of warning.
5106 (push_init_level): Pass input_location to warning_init.
5107 (add_pending_init): Add location_t parameter. Pass loc to
5108 warning_init.
5109 (set_nonincremental_init): Pass input_location to add_pending_init.
5110 (set_nonincremental_init_from_string): Likewise.
5111 (output_init_element): Pass loc to warning_init and to
5112 add_pending_init.
5113
32e00768
MP
51142014-05-01 Marek Polacek <polacek@redhat.com>
5115
5116 PR c/43395
5117 * c-typeck.c (c_finish_return): Distinguish between label and variable
5118 when warning about returning local address.
5119
c9379ce2
MP
51202014-05-01 Marek Polacek <polacek@redhat.com>
5121
5122 PR c/29467
5123 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
5124 in C89 mode.
5125
d00887e8
MP
51262014-05-01 Marek Polacek <polacek@redhat.com>
5127
5128 PR c/43245
5129 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
5130 instead of 0 to WARN_FOR_QUALIFIERS.
5131
5436fa2e
MP
51322014-05-01 Marek Polacek <polacek@redhat.com>
5133
5134 PR c/56989
5135 * c-typeck.c (default_conversion): Use better location for
5136 error call.
5137
f8ed5150
MP
51382014-04-30 Marek Polacek <polacek@redhat.com>
5139
5140 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
5141 also when SANITIZE_FLOAT_DIVIDE is on.
5142
8337d1db
MP
51432014-04-30 Marek Polacek <polacek@redhat.com>
5144
5145 PR c/60139
5146 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
5147 and pedwarn_init. Use loc insted of input_location.
5148
c4bdc42f
MP
51492014-04-30 Marek Polacek <polacek@redhat.com>
5150
5151 PR c/60351
5152 * c-typeck.c (build_binary_op): Use location when warning about
5153 shift count.
5154
45484dcf
MP
51552014-04-25 Marek Polacek <polacek@redhat.com>
5156
5157 PR c/18079
5158 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
5159 always_inline/noinline and hot/cold attributes.
5160
34cf811f
MP
51612014-04-25 Marek Polacek <polacek@redhat.com>
5162
5163 PR c/60114
5164 * c-parser.c (c_parser_initelt): Pass input_location to
5165 process_init_element.
5166 (c_parser_initval): Pass loc to process_init_element.
5167 * c-tree.h (process_init_element): Adjust declaration.
5168 * c-typeck.c (push_init_level): Pass input_location to
5169 process_init_element.
5170 (pop_init_level): Likewise.
5171 (set_designator): Likewise.
5172 (output_init_element): Add location_t parameter. Pass loc to
5173 digest_init.
5174 (output_pending_init_elements): Pass input_location to
5175 output_init_element.
5176 (process_init_element): Add location_t parameter. Pass loc to
5177 output_init_element.
5178
42056eac
JJ
51792014-04-24 Jakub Jelinek <jakub@redhat.com>
5180
5181 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
5182 atomic-clause, allow comma in between atomic-clause and
5183 seq_cst.
5184
e162a134
JJ
51852014-04-22 Jakub Jelinek <jakub@redhat.com>
5186
5187 PR c/59073
5188 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
5189 fails, don't set OM_PARALLEL_COMBINED and return NULL.
5190
2f6babac
IZ
51912014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
5192
5193 PR middle-end/60469
5194 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5195 create_tmp_var instead build_decl for creating temps.
5196 (build_array_notation_expr): Likewise.
5197 (fix_conditional_array_notations_1): Likewise.
5198 (fix_array_notation_expr): Likewise.
5199 (fix_array_notation_call_expr): Likewise.
5200
8edbfaa6
JJ
52012014-03-28 Jakub Jelinek <jakub@redhat.com>
5202
5203 PR c++/60689
5204 * c-tree.h (c_build_function_call_vec): New prototype.
5205 * c-typeck.c (build_function_call_vec): Don't call
5206 resolve_overloaded_builtin here.
5207 (c_build_function_call_vec): New wrapper function around
5208 build_function_call_vec. Call resolve_overloaded_builtin here.
5209 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
5210 Call c_build_function_call_vec instead of build_function_call_vec.
5211 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
5212 * c-decl.c (finish_decl): Likewise.
5213
7485aeea
MLI
52142014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5215
5216 PR c/55383
5217 * c-typeck.c: Use correct format string in cast-qual warning
5218
b17a8b07
TS
52192014-03-07 Thomas Schwinge <thomas@codesourcery.com>
5220
5221 * c-decl.c (c_decl_attributes): Use
5222 lang_hooks.types.omp_mappable_type.
5223 * c-typeck.c (c_finish_omp_clauses): Likewise.
5224
3af9c5e9
MP
52252014-03-06 Marek Polacek <polacek@redhat.com>
5226
5227 PR c/60197
5228 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
5229 of checking tree code.
5230
1c9f5f33
PK
52312014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5232
5233 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
5234 (c_parser_parameter_declaration): Likewise.
5235
cc28fc7f
MP
52362014-02-19 Marek Polacek <polacek@redhat.com>
5237
5238 PR c/60195
5239 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
5240 Call mark_exp_read on exp.value.
5241 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
5242 TREE_ADDRESSABLE on old instead of val.
5243 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
5244
b581c05c
PK
52452014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5246
5247 * c-parser.c (c_parser_get_builtin_args): Replace calls to
5248 C_EXPR_APPEND by vec_safe_push.
5249 * c-tree.h (C_EXPR_APPEND): Remove.
5250
81e5eca8
MP
52512014-01-31 Marek Polacek <polacek@redhat.com>
5252
5253 PR c/59963
5254 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
5255 build_function_call_vec.
5256 (build_function_call): Likewise.
5257 (build_atomic_assign): Likewise.
5258 (build_function_call_vec): Add arg_loc parameter. Use it.
5259 (convert_arguments): Likewise.
5260 (convert_for_assignment): Rename rhs_loc to expr_loc.
5261 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
5262 (c_parser_objc_keywordexpr): Likewise.
5263 (c_parser_postfix_expression_after_primary): Call
5264 build_function_call_vec with expr_loc rather than op_loc.
5265 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
5266 build_function_call_vec.
5267 (c_parser_expr_list): Add locations parameter. Fill it with locations
5268 of function arguments.
5269 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
5270
68fca595
MP
52712014-01-30 Marek Polacek <polacek@redhat.com>
5272
5273 PR c/59940
5274 * c-typeck.c (build_function_call_vec): Use loc parameter.
5275 (convert_arguments): Add location parameter. Use it.
5276 (ep_convert_and_check): Likewise.
5277 (build_atomic_assign): Adjust convert_for_assignment call.
5278 (build_modify_expr): Likewise.
5279 (digest_init): Likewise.
5280 (c_finish_return): Likewise.
5281 (build_conditional_expr): Adjust ep_convert_and_check calls.
5282 (convert_for_assignment): Add rhs_loc parameter. Use it.
5283 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
5284 calls.
5285
fa337f3a
RB
52862014-01-30 Richard Biener <rguenther@suse.de>
5287
5288 PR c/59905
5289 * c-typeck.c (build_function_call_vec): Do not replace calls
5290 to a function via an incompatible type with a runtime abort.
5291
b72271b9
BI
52922014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
5293
5294 * c-parser.c (c_parser_declaration_or_fndef): Replaced
5295 flag_enable_cilkplus with flag_cilkplus.
5296 (c_parser_direct_declarator_inner): Likewise.
5297 (c_parser_attribute_any_word): Likewise.
5298 (c_parser_attributes): Likewise.
5299 (c_parser_compound_statement): Likewise.
5300 (c_parser_statement_after_labels): Likewise.
5301 (c_parser_if_statement): Likewise.
5302 (c_parser_switch_statement): Likewise.
5303 (c_parser_do_statement): Likewise.
5304 (c_parser_for_statement): Likewise.
5305 (c_parser_unary_expression): Likewise.
5306 (c_parser_postfix_expression): Likewise.
5307 (c_parser_postfix_expression_after_primary): Likewise.
5308 (c_parser_postfix_expression_after_primary): Likewise.
5309 (c_parser_omp_clause_name): Likewise.
5310 (c_finish_omp_declare_simd): Likewise.
5311 (c_parser_cilk_verify_simd): Likewise.
5312 * c-typeck.c (build_array_ref): Likewise.
5313 (build_function_call_vec): Likewise.
5314 (convert_arguments): Likewise.
5315 (build_compound_expr): Likewise.
5316 (c_finish_return): Likewise.
5317 (c_finish_if_stmt): Likewise.
5318 (c_finish_loop): Likewise.
5319 (build_binary_op): Likewise.
5320
393e8e8b
MP
53212014-01-23 Marek Polacek <polacek@redhat.com>
5322
5323 PR c/59846
5324 * c-typeck.c (parser_build_binary_op): Use location instead of
5325 input_location.
5326 (build_binary_op): Pass location to shorten_compare.
5327
f04dda30
MP
53282014-01-23 Marek Polacek <polacek@redhat.com>
5329
5330 PR c/58346
5331 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
5332 an empty aggregate.
5333
789eadcd
MP
53342014-01-23 Marek Polacek <polacek@redhat.com>
5335
5336 PR c/59871
5337 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
5338 of a comma expression.
5339 (emit_side_effect_warnings): Likewise.
5340
40f14e9f
BI
53412014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5342
5343 PR c/59825
5344 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
5345 function to use walk_tree and moved a lot of its functionality to
5346 expand_array_notations.
5347 (expand_array_notations): New function.
5348
74558dd9
BI
53492014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5350
5351 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
5352 attribute an attribute without value.
5353
652fea39
JJ
53542014-01-23 Jakub Jelinek <jakub@redhat.com>
5355
5356 PR middle-end/58809
5357 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
5358 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
5359
f34f1c87
MP
53602014-01-22 Marek Polacek <polacek@redhat.com>
5361
5362 PR c/59891
5363 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
5364 of remove_c_maybe_const_expr on op1 and op2.
5365
241f845a
JJ
53662014-01-15 Jakub Jelinek <jakub@redhat.com>
5367
5368 PR c/58943
5369 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
5370 effects, preevaluate rhs using SAVE_EXPR first.
5371
9a74f20c
BI
53722014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
5373
5374 PR c++/59631
5375 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
5376 statements with if-elseif statements.
5377
96066ce1
MP
53782014-01-06 Marek Polacek <polacek@redhat.com>
5379
5380 PR c/57773
5381 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
5382 defined bit-field types only in ISO C.
5383
23a5b65a
RS
53842014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5385
5386 Update copyright years
5387
f9030485
RS
53882014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5389
5390 * c-array-notation.c: Use the standard form for the copyright notice.
5391
41958c28
BI
53922013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
5393
5394 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
5395 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
5396 field in parser is not empty. If not-empty, call the function
5397 c_parser_finish_omp_declare_simd.
5398 (c_parser_cilk_clause_vectorlength): Modified function to be shared
5399 between SIMD-enabled functions and #pragma simd. Added new parameter.
5400 (c_parser_cilk_all_clauses): Modified the usage of the function
5401 c_parser_cilk_clause_vectorlength as mentioned above.
5402 (c_parser_cilk_simd_fn_vector_attrs): New function.
5403 (c_finish_cilk_simd_fn_tokens): Likewise.
5404 (is_cilkplus_vector_p): Likewise.
5405 (c_parser_omp_clause_name): Added checking for "vectorlength,"
5406 "nomask," and "mask" strings in clause name.
5407 (c_parser_omp_all_clauses): Added 3 new case statements:
5408 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
5409 PRAGMA_CILK_CLAUSE_NOMASK.
5410 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
5411 check for vector attribute and if so call the function
5412 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
5413 called the function c_finish_cilk_simd_fn_tokens.
5414 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
5415 parser field is non-empty. If so, parse them as you would parse
5416 the omp declare simd pragma.
5417 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
5418 Added a check when step is a parameter and flag it as error.
5419 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
5420 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
5421 pragma_omp_clause.
5422
cef0fd0e
TS
54232013-12-17 Thomas Schwinge <thomas@codesourcery.com>
5424
5425 * c-parser.c (c_parser_omp_parallel): Fix description.
5426
12893402
BI
54272013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
5428
5429 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
5430 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5431 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
5432 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
5433
296674db
JM
54342013-12-04 Joseph Myers <joseph@codesourcery.com>
5435
5436 PR c/52023
5437 * c-parser.c (c_parser_alignas_specifier): Use
5438 c_sizeof_or_alignof_type instead of c_alignof.
5439 (c_parser_alignof_expression): Likewise, with min_alignof
5440 parameter depending on alignof spelling used.
5441
edd28054
MP
54422013-12-04 Marek Polacek <polacek@redhat.com>
5443
5444 PR c/54113
5445 * c-decl.c (start_function): Don't warn for missing prototype for
5446 inline functions.
5447
da0fc454
MP
54482013-12-03 Marek Polacek <polacek@redhat.com>
5449
5450 PR c/59351
5451 * c-decl.c (build_compound_literal): Allow compound literals with
5452 empty initial value.
5453
4c2ecab0
JM
54542013-12-02 Joseph Myers <joseph@codesourcery.com>
5455
5456 PR c/58235
5457 * c-typeck.c (build_modify_expr): Diagnose assignment to
5458 expression with array type.
5459
340baef7
JM
54602013-11-29 Joseph Myers <joseph@codesourcery.com>
5461
5462 PR c/42262
5463 * c-typeck.c (process_init_element): Do not treat a string as
5464 initializing a whole array when used with a designator for an
5465 individual element.
5466
6763b9f7
JM
54672013-11-29 Joseph Myers <joseph@codesourcery.com>
5468
5469 PR c/57574
5470 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
5471 an inline function following a static declaration.
5472
e7bd1de1
JJ
54732013-11-28 Jakub Jelinek <jakub@redhat.com>
5474
5475 PR c/59310
5476 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
5477 to p_name before calling c_parser_omp_teams instead of after.
5478 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
5479 argument. Remove unused p_name variable.
5480
0136f8f0
AH
54812013-11-27 Aldy Hernandez <aldyh@redhat.com>
5482 Jakub Jelinek <jakub@redhat.com>
5483
5484 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
5485 external_scope is NULL.
5486
241b71bb
TV
54872013-11-27 Tom de Vries <tom@codesourcery.com>
5488 Marc Glisse <marc.glisse@inria.fr>
5489
5490 PR c++/59032
5491 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
5492
2fb9a547
AM
54932013-11-22 Andrew MacLeod <amacleod@redhat.com>
5494
5495 * c-typeck.c: Add required include files from gimple.h.
5496
8400e75e
DM
54972013-11-22 David Malcolm <dmalcolm@redhat.com>
5498
5499 * c-decl.c (define_label, shadow_tag_warned)
5500 (check_bitfield_type_and_width, grokdeclarator, grokparms,
5501 store_parm_decls_newstyle, store_parm_decls_oldstyle)
5502 (declspecs_add_type): Remove use of in_system_header macro.
5503 * c-parser.c (c_parser_unary_expression): Likewise.
5504 * c-typeck.c (store_init_value, process_init_element)
5505 (c_start_case): Likewise.
5506
5507 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
5508 macro.
5509
5510 * c-parser.c (c_parser_set_source_position_from_token): Remove
5511 reference to in_system_header from comment.
5512
386b1f1f
RS
55132013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5514
5515 * c-decl.c (grokdeclarator): Update comment to refer to
5516 tree_to_[su]hwi rather than tree_low_cst.
5517
ae7e9ddd
RS
55182013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5519
5520 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
5521 tree_to_uhwi throughout.
5522
9439e9a1
RS
55232013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5524
5525 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
5526 throughout.
5527
9541ffee
RS
55282013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5529
5530 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
5531 throughout.
5532
c02065fc
AH
55332013-11-15 Aldy Hernandez <aldyh@redhat.com>
5534
5535 * c-parser.c (c_parser_cilk_simd): New.
5536 (c_parser_cilk_verify_simd): New.
5537 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
5538 (c_parser_omp_for_loop): Add case for NE_EXPR.
5539 Set c_break_label for CILK_SIMD.
5540 (c_parser_cilk_clause_vectorlength): New.
5541 (c_parser_cilk_clause_linear): New.
5542 (c_parser_cilk_clause_name): New.
5543 (c_parser_cilk_all_clauses): New.
5544 * c-typeck.c (build_unary_op): Pass location argument to
5545 readonly_error.
5546 (build_modify_expr): Same.
5547 (build_asm_expr): Same.
5548 (c_finish_bc_stmt): Error on break/continue in loops.
5549
18f429e2
AM
55502013-11-14 Andrew MacLeod <amacleod@redhat.com>
5551
5552 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
5553
d8a2d370
DN
55542013-11-14 Diego Novillo <dnovillo@google.com>
5555
5556 * c-decl.c: Include print-tree.h.
5557 Include stor-layout.h.
5558 Include varasm.h.
5559 Include attribs.h.
5560 Include stringpool.h.
5561 * c-lang.c: Include fold-const.h.
5562 * c-parser.c: Include stringpool.h.
5563 Include attribs.h.
5564 Include stor-layout.h.
5565 Include varasm.h.
5566 Include trans-mem.h.
5567 * c-typeck.c: Include stor-layout.h.
5568 Include trans-mem.h.
5569 Include varasm.h.
5570 Include stmt.h.
5571
38b7bc7f
JM
55722013-11-13 Joseph Myers <joseph@codesourcery.com>
5573
5574 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
5575 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
5576 __auto_type.
5577 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
5578 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
5579 RID_AUTO_TYPE.
5580 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
5581 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
5582 (c_parser_declarator, c_parser_direct_declarator_inner)
5583 (c_parser_parameter_declaration, c_parser_type_name): All callers
5584 changed.
5585 (c_parser_declaration_or_fndef): Handle declarations with type
5586 determined from the initializer.
5587
45b0be94
AM
55882013-11-12 Andrew MacLeod <amacleod@redhat.com>
5589
18f429e2 5590 * c-typeck.c: Include gimplify.h.
45b0be94 5591
582d9b50
JM
55922013-11-12 Joseph Myers <joseph@codesourcery.com>
5593
5594 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
5595 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
5596 comment.
5597 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
5598 or _Thread_local as appropriate in diagnostics.
5599 (build_null_declspecs): Initialize ret->thread_gnu_p.
5600 (declspecs_add_scspec): Handle either __thread or _Thread_local
5601 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
5602 pedantic. Do not disallow _Thread_local extern and _Thread_local
5603 static.
5604
267bac10
JM
56052013-11-07 Joseph Myers <joseph@codesourcery.com>
5606 Andrew MacLeod <amacleod@redhat.com>
5607
5608 * c-aux-info.c (gen_type): Handle atomic qualifier.
5609 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
5610 qualifiers when compating types.
5611 (shadow_tag_warned): Handle atomic_p in declspecs.
5612 (quals_from_declspecs): Likewise.
5613 (start_decl): Use c_type_promotes_to when promoting argument
5614 types.
5615 (grokdeclarator): Handle _Atomic.
5616 (get_parm_info): Diagnose any qualifier on "void" as only
5617 parameter.
5618 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
5619 comparing types. Use c_type_promotes_to when promoting argument
5620 types.
5621 (finish_function): Use c_type_promotes_to when promoting argument
5622 types.
5623 (build_null_declspecs): Handle atomic_p in declspecs.
5624 (declspecs_add_qual): Handle RID_ATOMIC.
5625 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
5626 (c_token_starts_declspecs): Handle RID_ATOMIC.
5627 (c_parser_declspecs): Handle atomic type specifiers and
5628 qualifiers.
5629 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
5630 from types of expressions with atomic type.
5631 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
5632 (c_parser_attribute_any_word): Handle RID_ATOMIC.
5633 (c_parser_initializer, c_parser_initelt, c_parser_initval)
5634 (c_parser_statement_after_labels, c_parser_switch_statement)
5635 (c_parser_for_statement, c_parser_expr_no_commas)
5636 (c_parser_conditional_expression, c_parser_binary_expression)
5637 (c_parser_cast_expression, c_parser_unary_expression)
5638 (c_parser_postfix_expression)
5639 (c_parser_postfix_expression_after_primary, c_parser_expression):
5640 Use convert_lvalue_to_rvalue.
5641 (c_parser_expression_conv, c_parser_expr_list): Document
5642 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
5643 (c_parser_objc_synchronized_statement): Use
5644 convert_lvalue_to_rvalue.
5645 (c_parser_objc_selector): Handle RID_ATOMIC.
5646 (c_parser_objc_receiver, c_parser_array_notation): Use
5647 convert_lvalue_to_rvalue.
5648 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
5649 _Atomic (type-name).
5650 (struct c_declspecs): Add atomic_p field.
5651 (convert_lvalue_to_rvalue): Declare.
5652 * c-typeck.c (c_type_promotes_to): Promote atomic types to
5653 corresponding atomic types.
5654 (qualify_type): Don't add _Atomic qualifiers from second argument.
5655 (comp_target_types): Do not allow _Atomic mismatches.
5656 (type_lists_compatible_p): Do not remove atomic qualifiers when
5657 comparing types.
5658 (really_atomic_lvalue, convert_lvalue_to_rvalue)
5659 (build_atomic_assign): New functions.
5660 (build_unary_op): Use build_atomic_assign for atomic increment and
5661 decrement.
5662 (build_conditional_expr): Do not treat _Atomic void as a qualified
5663 version of void.
5664 (build_modify_expr): Use build_atomic_assign for atomic LHS.
5665 (find_anonymous_field_with_type, convert_to_anonymous_field)
5666 (convert_for_assignment): Do not remove atomic qualifiers when
5667 comparing types.
5668 (digest_init): Do not accept initialization of arrays of atomic
5669 elements by string constants.
5670 (build_asm_expr): Use convert_lvalue_to_rvalue.
5671 (build_binary_op): Do not treat _Atomic void as a qualified
5672 version of void.
5673
0c249d4b
DD
56742013-11-06 DJ Delorie <dj@redhat.com>
5675
5676 * c-decl.c (locate_old_decl): If a previous conflicting decl is
5677 both explicit and builtin, print the location of the explicit one.
5678
6d7f7e0a
TB
56792013-11-05 Tobias Burnus <burnus@net-b.de>
5680
5681 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
5682 c_parser_omp_distribute, c_parser_omp_teams,
5683 c_parser_omp_target, c_parser_omp_declare): Handle
5684 -fopenmp-simd.
5685
b906f4ca
MP
56862013-11-03 Marek Polacek <polacek@redhat.com>
5687
5688 * c-decl.c (grokdeclarator): Add VLA instrumentation.
5689
ee1d5a02
JJ
56902013-11-01 Jakub Jelinek <jakub@redhat.com>
5691
5692 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
5693 check_dup_generic at the end, unless remove is true.
5694 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
5695 remove = true;.
5696 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
5697
5a9785fb
JJ
56982013-10-31 Jakub Jelinek <jakub@redhat.com>
5699
5700 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
5701 with decl that is not pointer nor array.
5702
939b37da
BI
57032013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
5704
5705 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
5706 a spawning function is found.
5707 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
5708 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
5709 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5710 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
5711 case.
5712 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
5713 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
5714 expr.
5715 (c_finish_return): Added a check to reject _Cilk_spawn in return
5716 expression.
5717 (build_cilk_spawn): New function.
5718 (build_cilk_sync): Likewise.
5719 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
5720
d4af74d4
TB
57212013-10-27 Tobias Burnus <burnus@net-b.de>
5722
5723 PR other/33426
5724 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
5725 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
5726 (c_parser_statement_after_labels): Update calls.
5727
d73749df 57282013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
5729
5730 PR other/33426
5731 * c-parser.c (c_parser_pragma, c_parser_for_statement):
5732 Handle PRAGMA_IVDEP.
5733 (c_parser_statement_after_labels): Update call.
5734
f28aa681
MP
57352013-10-24 Marek Polacek <polacek@redhat.com>
5736
5737 * c-parser.c (c_parser_struct_declaration): Add a comment.
5738 (c_parser_declarator): Don't allow _Alignas here.
5739
0645c1a2
AM
57402013-10-17 Andrew MacLeod <amacleod@redhat.com>
5741
5742 * c-parser.c: Include omp-low.h.
5743 * c-typeck.c: Likewise.
5744
568a31f2
MP
57452013-10-17 Marek Polacek <polacek@redhat.com>
5746
5747 PR c/58267
5748 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
5749 Document syntax of the array-declarator.
5750 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
5751 are not permitted.
5752 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
5753 (c_parser_struct_declaration): Likewise.
5754 (c_parser_declarator): Likewise.
5755 (c_parser_direct_declarator_inner): Likewise.
5756 (c_parser_parameter_declaration): Likewise.
5757 (c_parser_type_name): Likewise.
5758
acf0174b
JJ
57592013-10-11 Jakub Jelinek <jakub@redhat.com>
5760
5761 * c-lang.h (current_omp_declare_target_attribute): New extern
5762 decl.
5763 * c-parser.c: Include c-lang.h.
5764 (struct c_parser): Change tokens to c_token *.
5765 Add tokens_buf field. Change tokens_avail type to unsigned int.
5766 (c_parser_consume_token): If parser->tokens isn't
5767 &parser->tokens_buf[0], increment parser->tokens.
5768 (c_parser_consume_pragma): Likewise.
5769 (enum pragma_context): Add pragma_struct and pragma_param.
5770 (c_parser_external_declaration): Adjust
5771 c_parser_declaration_or_fndef caller.
5772 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
5773 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
5774 Adjust recursive call.
5775 (c_parser_struct_or_union_specifier): Use pragma_struct instead
5776 of pragma_external.
5777 (c_parser_parameter_declaration): Use pragma_param instead of
5778 pragma_external.
5779 (c_parser_compound_statement_nostart, c_parser_label,
5780 c_parser_for_statement): Adjust
5781 c_parser_declaration_or_fndef callers.
5782 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
5783 it through to c_parser_conditional_expression.
5784 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
5785 pass it through to c_parser_binary_expression. Adjust recursive
5786 call.
5787 (c_parser_binary_expression): Remove prec argument, add
5788 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
5789 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
5790 binop matches it, use build2 instead of parser_build_binary_op.
5791 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
5792 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
5793 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
5794 Handle pragma_struct and pragma_param the same as pragma_external.
5795 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5796 (c_parser_omp_variable_list): Parse array sections for
5797 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5798 (c_parser_omp_clause_collapse): Fully fold collapse expression.
5799 (c_parser_omp_clause_reduction): Handle user defined reductions.
5800 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5801 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5802 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5803 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5804 c_parser_omp_clause_depend, c_parser_omp_clause_map,
5805 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5806 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5807 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5808 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
5809 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
5810 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5811 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
5812 (c_parser_omp_for_loop): Add CODE argument, pass it through
5813 to c_finish_omp_for. Change last argument to cclauses,
5814 and adjust uses to grab parallel clauses from the array of all
5815 the split clauses. Adjust c_parser_binary_expression,
5816 c_parser_declaration_or_fndef and c_finish_omp_for callers.
5817 (omp_split_clauses): New function.
5818 (c_parser_omp_simd): New function.
5819 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5820 Allow the function to be called also when parsing combined constructs,
5821 and call c_parser_omp_simd when parsing for simd.
5822 (c_parser_omp_sections_scope): If section-sequence doesn't start with
5823 #pragma omp section, require exactly one structured-block instead of
5824 sequence of statements.
5825 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5826 Allow the function to be called also when parsing combined constructs.
5827 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
5828 Allow the function to be called also when parsing combined
5829 constructs.
5830 (c_parser_omp_taskgroup, c_parser_omp_cancel,
5831 c_parser_omp_cancellation_point, c_parser_omp_distribute,
5832 c_parser_omp_teams, c_parser_omp_target_data,
5833 c_parser_omp_target_update, c_parser_omp_target,
5834 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
5835 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
5836 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
5837 (c_parser_omp_construct): Add p_name and mask vars. Handle
5838 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
5839 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
5840 and c_parser_omp_sections callers.
5841 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
5842 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5843 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5844 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
5845 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
5846 OMP_CLAUSE_DEPEND.
5847 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5848 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5849 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5850 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5851 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5852 * c-typeck.c: Include tree-inline.h.
5853 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5854 handle_omp_array_sections_1, handle_omp_array_sections,
5855 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5856 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5857 user defined reductions.
5858 (c_tree_equal): New function.
5859 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5860 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5861 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5862 c_check_omp_declare_reduction_r): New prototypes.
5863 * c-decl.c (current_omp_declare_target_attribute): New variable.
5864 (c_decl_attributes): New function.
5865 (start_decl, start_function): Use it instead of decl_attributes.
5866 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5867 c_omp_reduction_decl, c_omp_reduction_lookup,
5868 c_check_omp_declare_reduction_r): New functions.
5869
0a6c2227
TT
58702013-09-25 Tom Tromey <tromey@redhat.com>
5871
5872 * Make-lang.in (c/gccspec.o): Remove.
5873 (CFLAGS-c/gccspec.o): New variable.
5874 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
5875 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
5876 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5877
f3bc55f0
TT
58782013-09-25 Tom Tromey <tromey@redhat.com>
5879
5880 * Make-lang.in (c/gccspec.o): Don't use subshell.
5881
a24d975c
MP
58822013-09-18 Marek Polacek <polacek@redhat.com>
5883
5884 PR sanitize/58443
5885 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5886 Remove unnecessary check.
5887
ce6923c5
MP
58882013-09-18 Marek Polacek <polacek@redhat.com>
5889
5890 PR sanitizer/58411
5891 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
5892 no_sanitize_undefined attribute.
5893
a1e51df9
KT
58942013-09-13 Kai Tietz <ktietz@redhat.com>
5895
5896 PR target/57848
5897 * c-decl.c (c_builtin_function_ext_scope): Remove
5898 wrong assumption that it is never called on prexisting
5899 symbol.
5900
0af94e6f
JR
59012013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
5902
5903 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
5904
20059c8b
GDR
59052013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5906
5907 * c-objc-common.c (c_tree_printer): Tidy.
5908
de5a5fa1
MP
59092013-08-30 Marek Polacek <polacek@redhat.com>
5910
5911 * c-typeck.c (build_binary_op): Add division by zero and shift
5912 instrumentation.
5913
2531a1d9 59142013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 5915 Joseph Myers <joseph@codesourcery.com>
2531a1d9 5916
6e2bcc98 5917 PR c/35649
2531a1d9
JR
5918 * c-typeck.c (c_common_type): Prefer double_type_node over
5919 other REAL_TYPE types with the same precision.
5920 (convert_arguments): Likewise.
5921
025311c4
GDR
59222013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5923
5924 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
5925 (c_initialize_diagnostics): Call a destructor for the early printer.
5926
da6ca2b5
GDR
59272013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5928
5929 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5930 printer initialization.
5931
318cda85 59322013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 5933
318cda85
BI
5934 PR c/57490
5935 * c-array-notation.c (fix_conditional_array_notations_1): Added a
5936 check for truth values.
5937 (expand_array_notation_exprs): Added truth values case. Removed an
5938 unwanted else. Added for-loop to walk through subtrees in default
5939 case.
5940
b066401f
GDR
59412013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5942
5943 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5944
fb48aadc
JM
59452013-07-23 Joseph Myers <joseph@codesourcery.com>
5946
5947 * c-parser.c (struct c_generic_association): Fix typo.
5948
433cc7b0
TT
59492013-07-23 Tom Tromey <tromey@redhat.com>
5950 Joseph Myers <joseph@codesourcery.com>
5951
5952 * c-parser.c (struct c_generic_association): New.
5953 (c_generic_association_d): New typedef.
5954 (c_parser_generic_selection): New function.
5955 (c_parser_postfix_expression): Handle RID_GENERIC.
5956
26d40c3d
JM
59572013-07-13 Jason Merrill <jason@redhat.com>
5958
5959 PR c++/57793
5960 * c-decl.c (finish_struct): Check for too-large class.
5961
ecdbd01a 59622013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
5963
5964 PR c/57821
5965 * c-typeck.c (set_init_index): When folding, check for index overflow.
5966
1141ed3f
BI
59672013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5968
5969 * c-parser.c (c_parser_array_notation): Removed rejection of array
5970 notations in an array of function pointers.
5971
713b46fa
BI
59722013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5973
5974 * c-array-notation.c (make_triplet_val_inv): New function.
5975 (create_cmp_incr): Likewise.
5976 (create_array_refs): Likewise.
5977 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5978 Also modularized common parts between functions and called the function.
5979 (build_array_notation_expr): Likewise.
5980 (fix_conditional_array_notations_1): Likewise.
5981 (fix_array_notation_expr): Likewise.
5982 (fix_array_notation_call_expr): Likewise.
5983
92f20202
MP
59842013-06-18 Marek Polacek <polacek@redhat.com>
5985
5986 PR c/57630
5987 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5988
73a23b06
BI
59892013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
5990
5991 * c-array-notation.c (build_array_notation_expr): Reject array notation
5992 mismatch between LHS and RHS even inside a call_expr. Also, removed
5993 a couple while statements that were dead code.
5994
00b8517d
BI
59952013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
5996
5997 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5998 excessive precision expressions in function parameters. Also removed
5999 couple unwanted while statements.
6000
1509bdda
BI
60012013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6002
6003 * c-array-notation.c (expand_array_notation_exprs): Added
6004 ARRAY_NOTATION_REF case.
6005
d60f1706
BI
60062013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6007
6008 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
6009 function to c-family/array-notation-common.c.
6010 (is_cilkplus_reduce_builtin): Likewise.
6011 (find_rank): Likewise.
6012 (extract_array_notation_exprs): Likewise.
6013 (replace_array_notations): Likewise.
6014 (find_inv_trees): Likewise.
6015 (replace_inv_trees): Likewise.
6016 (contains_array_notation_expr): Likewise.
6017 (find_correct_array_notation_type): Likewise.
6018 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
6019 (struct inv_list): Moved this to c-family/array-notation-common.c.
6020 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
6021
6d6efbb3
BI
60222013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
6023
6024 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
6025 reduction functions outside the for-loop. Added a check if the fundecl
6026 is non-NULL. Finally, removed an unwanted if-statement, and made the
6027 body unconditional.
6028
25c22937
BI
60292013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6030
6031 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
6032 condition of the if-statement matches the rank of else-block and then-
6033 block when array notations are used.
6034 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
6035 expression after the entire function body is parsed.
6036 (c_parser_expr_no_commas): Delayed creating array notation expressions
6037 to the end of function parsing.
6038 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
6039 whole if-statement instead of just the condition.
6040 (expand_array_notation_exprs): Added MODIFY_EXPR case.
6041
edd25645
BI
60422013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6043
6044 PR c/57474
6045 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
6046 array to NULL_TREE if they are unused. Also added a check for the
6047 field to be NULL before its fields are used in future.
6048
065ce7f1
RO
60492013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6050
6051 PR bootstrap/57450
6052 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
6053 (build_array_notation_expr): Likewise.
6054
36536d79
BI
60552013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6056
6057 * c-typeck.c (build_array_ref): Added a check to see if array's
6058 index is greater than one. If true, then emit an error.
6059 (build_function_call_vec): Exclude error reporting and checking
6060 for builtin array-notation functions.
6061 (convert_arguments): Likewise.
6062 (c_finish_return): Added a check for array notations as a return
6063 expression. If true, then emit an error.
6064 (c_finish_loop): Added a check for array notations in a loop
6065 condition. If true then emit an error.
6066 (lvalue_p): Added a ARRAY_NOTATION_REF case.
6067 (build_binary_op): Added a check for array notation expr inside
6068 op1 and op0. If present, we call another function to find correct
6069 type.
6070 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
6071 * c-parser.c (c_parser_compound_statement): Check if array
6072 notation code is used in tree, if so, then transform them into
6073 appropriate C code.
6074 (c_parser_expr_no_commas): Check if array notation is used in LHS
6075 or RHS, if so, then build array notation expression instead of
6076 regular modify.
6077 (c_parser_postfix_expression_after_primary): Added a check for
6078 colon(s) after square braces, if so then handle it like an array
6079 notation. Also, break up array notations in unary op if found.
6080 (c_parser_direct_declarator_inner): Added a check for array
6081 notation.
6082 (c_parser_compound_statement): Added a check for array notation in
6083 a stmt. If one is present, then expand array notation expr.
6084 (c_parser_if_statement): Likewise.
6085 (c_parser_switch_statement): Added a check for array notations in
6086 a switch statement's condition. If true, then output an error.
6087 (c_parser_while_statement): Similarly, but for a while.
6088 (c_parser_do_statement): Similarly, but for a do-while.
6089 (c_parser_for_statement): Similarly, but for a for-loop.
6090 (c_parser_unary_expression): Check if array notation is used in a
6091 pre-increment or pre-decrement expression. If true, then expand
6092 them.
6093 (c_parser_array_notation): New function.
6094 * c-array-notation.c: New file.
6095 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
6096
cd192ccc
MS
60972013-05-23 Mike Stump <mikestump@comcast.net>
6098
6099 * c-typeck.c (convert_for_assignment): Handle references to memory
6100 spaces better.
6101
427b248d
JM
61022013-05-16 Jason Merrill <jason@redhat.com>
6103
6104 * Make-lang.in (cc1$(exeext)): Use link mutex.
6105
44d90fe1
PC
61062013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6107
6108 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
6109 to simply use OPT_Wpointer_arith.
6110 (build_unary_op): Likewise.
6111
4e7d7b3d
JJ
61122013-04-03 Jakub Jelinek <jakub@redhat.com>
6113
6114 PR c/19449
6115 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
6116 argument. If set, or it temporarily for parsing of the first
6117 argument into force_folding_builtin_constant_p.
6118 (c_parser_postfix_expression): Adjust callers.
6119
839b422f
RB
61202013-03-21 Richard Biener <rguenther@suse.de>
6121
6122 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
6123 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
6124
2ee028f1
MP
61252013-02-12 Marek Polacek <polacek@redhat.com>
6126
6127 PR c/44938
6128 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
6129 origtypes to NULL.
6130
8824edff
JJ
61312013-01-24 Jakub Jelinek <jakub@redhat.com>
6132
6133 PR c/56078
6134 * c-typeck.c (set_nonincremental_init_from_string): If
6135 constructor_max_index is NULL, treat it as if tree_int_cst_lt
6136 returned false.
6137 (process_init_element): Likewise.
6138
eadd3d0d
JJ
61392012-12-20 Jakub Jelinek <jakub@redhat.com>
6140
6141 PR c++/55619
6142 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
6143 argument, don't call default_function_array_conversion
6144 nor c_fully_fold here.
6145 (c_parser_asm_statement): Adjust callers.
6146 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
6147 and outputs here, and call default_function_array_conversion
6148 on inputs that don't need to be addressable.
6149
f8a93a2e
JJ
61502012-12-18 Jakub Jelinek <jakub@redhat.com>
6151
6152 PR c/39464
6153 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
6154 warning require that both c_common_unsigned_type as well as
6155 c_common_signed_type is the same for both mvl and mvr types.
6156
9771b263
DN
61572012-11-16 Diego Novillo <dnovillo@google.com>
6158
6159 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
6160
6161 * c-common.c: Use new vec API in vec.h.
6162 * c-common.h: Likewise.
6163 * c-gimplify.c: Likewise.
6164 * c-pragma.c: Likewise.
6165 * c-pretty-print.c: Likewise.
6166 * c-pretty-print.h: Likewise.
6167 * c-semantics.c: Likewise.
6168 * c-decl.c: Likewise.
6169 * c-parser.c: Likewise.
6170 * c-tree.h: Likewise.
6171 * c-typeck.c: Likewise.
6172
880661a4
JW
61732012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
6174
6175 PR c++/54930
6176 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
6177
077d1abe
MLI
61782012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6179
6180 PR c/53066
6181 * c-decl.c (warn_if_shadowing): Do not warn if a variable
6182 shadows a function, unless the variable is a function or a
6183 pointer-to-function.
6184
3a785c97
JJ
61852012-10-12 Jakub Jelinek <jakub@redhat.com>
6186
6187 PR c/54381
6188 * c-parser.c (struct c_tree_loc_pair): Removed.
6189 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
6190 add location_t * and tree * arguments, fill in array of 3
6191 sizeof_arg trees and corresponding locs.
6192 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
6193 c_parser_expr_list callers.
6194 (c_parser_postfix_expression_after_primary): Likewise. Pass
6195 array of 3 sizeof_arg trees and locs (corresponding to first
6196 3 arguments) to sizeof_pointer_memaccess_warning.
6197
703c8606
LC
61982012-10-09 Lawrence Crowl <crowl@google.com>
6199
6200 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
6201 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
6202 hash table.
6203
5d9de0d0
PC
62042012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
6205
6206 PR c++/54194
6207 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
6208 call.
6209
a212e43f
MG
62102012-10-09 Marc Glisse <marc.glisse@inria.fr>
6211
6212 PR c++/54427
6213 * c-typeck.c: Include c-common.h.
6214 (enum stv_conv): Moved to c-common.h.
6215 (scalar_to_vector): Moved to c-common.c.
6216 (build_binary_op): Adapt to scalar_to_vector's new prototype.
6217 * Make-lang.in: c-typeck.c depends on c-common.h.
6218
3b78de56
AC
62192012-10-04 Arnaud Charlet <charlet@adacore.com>
6220
6221 * c-decl.c (c_write_global_declarations): Fix handling of
6222 -fdump-ada-spec*.
6223
78c60e3d
SS
62242012-09-30 Sharad Singhai <singhai@google.com>
6225
6226 * c-decl.c (c_write_global_declarations): Use a different method
6227 to determine if the dump has ben initialized.
6228
9f33203d
JM
62292012-09-14 Joseph Myers <joseph@codesourcery.com>
6230
6231 PR c/54552
6232 * c-typeck.c (c_cast_expr): When casting to a type requiring
6233 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
6234 c_fully_fold first.
6235
a27d595d
JM
62362012-09-14 Joseph Myers <joseph@codesourcery.com>
6237
6238 PR c/54103
6239 * c-typeck.c (build_unary_op): Pass original argument of
6240 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
6241 any C_MAYBE_CONST_EXPR, if it has integer operands.
6242 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
6243 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
6244 to c_objc_common_truthvalue_conversion, then remove any
6245 C_MAYBE_CONST_EXPR, if they have integer operands. Use
6246 c_objc_common_truthvalue_conversion not
6247 c_common_truthvalue_conversion.
6248 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
6249 call note_integer_operands for arguments with integer operands
6250 that are not integer constants.
6251
9feb29df
JJ
62522012-09-13 Jakub Jelinek <jakub@redhat.com>
6253
6254 PR c/54559
6255 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
6256 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
6257
d409320c
JJ
62582012-08-31 Jakub Jelinek <jakub@redhat.com>
6259
6260 PR c/54428
6261 * c-convert.c (convert): Don't call fold_convert_loc if
6262 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
6263 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
6264 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
6265
6265d07c
JJ
62662012-08-24 Jakub Jelinek <jakub@redhat.com>
6267
6268 PR c/54355
6269 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
6270 for nested and empty_ok arguments in the call to
6271 c_parser_declaration_or_fndef.
6272
1a4049e7
JJ
62732012-08-17 Jakub Jelinek <jakub@redhat.com>
6274
6275 * c-tree.h (c_last_sizeof_arg): Declare.
6276 * c-parser.c (struct c_tree_loc_pair): New type.
6277 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
6278 non-NULL.
6279 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
6280 (c_parser_postfix_expression_after_primary): Likewise. Call
6281 sizeof_pointer_memaccess_warning if needed.
6282 (sizeof_ptr_memacc_comptypes): New function.
6283 * c-typeck.c (c_last_sizeof_arg): New global variable.
6284 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
6285
0229aee9
UB
62862012-07-24 Uros Bizjak <ubizjak@gmail.com>
6287
6288 * c-lang.h (lang_decl): Add variable_size GTY option.
6289
7ee2468b
SB
62902012-07-16 Steven Bosscher <steven@gcc.gnu.org>
6291
6292 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
6293 * Make-lang.in: Fix dependencies.
6294
d4a10d0a
SB
62952012-06-29 Steven Bosscher <steven@gcc.gnu.org>
6296
6297 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
6298 and add language Makefile hooks.
6299 * config-lang.in: New file.
6300 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
6301 add the required "normal" config-lang.in rules.
6302 * c-lang.h: Moved from gcc/ to here.
6303 * c-tree.h: Likewise.
6304 * c-objc-common.c: Likewise.
6305 * c-objc-common.h: Likewise.
6306 * c-typeck.c: Likewise.
6307 * c-convert.c: Likewise.
6308 * c-lang.c: Likewise.
6309 * c-aux-info.c: Likewise.
6310 * c-errors.c: Likewise.
6311 * gccspec.c: Likewise.
6312 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
6313 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
6314\f
a5544970 6315Copyright (C) 2012-2019 Free Software Foundation, Inc.
d4a10d0a
SB
6316
6317Copying and distribution of this file, with or without modification,
6318are permitted in any medium without royalty provided the copyright
6319notice and this notice are preserved.
This page took 2.526922 seconds and 5 git commands to generate.