]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
rs6000-internal.h (create_TOC_reference): Delete.
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
6c1dae73
MS
12019-07-09 Martin Sebor <msebor@redhat.com>
2
3 PR c++/61339
4 * c-decl.c: Change class-key from class to struct and vice versa
5 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
6 * gimple-parser.c: Same.
7
69b5279e
RB
82019-07-01 Richard Biener <rguenther@suse.de>
9
10 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
11 _Literal (char *) &"foo" for address literals pointing to
12 STRING_CSTs.
13
1e3d475e
MS
142019-06-24 Martin Sebor <msebor@redhat.com>
15
16 * c-typeck.c (build_binary_op): Hyphenate floating-point.
17
bf38f7e9
JJ
182019-06-10 Jakub Jelinek <jakub@redhat.com>
19
20 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
21 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
22 (c_parser_omp_scan_loop_body): New function.
23 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
24 inscan reduction clauses.
25 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
26 non-inscan reductions on the same construct, or inscan reductions with
27 ordered or schedule clauses, or inscan array reductions.
28
65985d78
MS
292019-06-05 Martin Sebor <msebor@redhat.com>
30
31 PR c/90737
32 * c-typeck.c (c_finish_return): Only consider functions returning
33 pointers as candidates for -Wreturn-local-addr.
34
0ecf545c
MS
352019-06-05 Martin Sebor <msebor@redhat.com>
36
37 * c-decl.c (start_decl): Adjust quoting and hyphenation
38 in diagnostics.
39 (finish_decl): Same.
40 (finish_enum): Same.
41 (start_function): Same.
42 (declspecs_add_type): Same.
43 * c-parser.c (warn_for_abs): Same.
44 * c-typeck.c (build_binary_op): Same.
45
e03436e7
TS
462019-05-17 Thomas Schwinge <thomas@codesourcery.com>
47
b48f44bf
TS
48 PR c/89433
49 * c-parser.c (c_finish_oacc_routine): Rework checking if already
50 marked with an OpenACC 'routine' directive.
51
5bf04509
TS
52 PR c/89433
53 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
54 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
55
e03436e7
TS
56 PR c/89433
57 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
58 clauses from "omp declare target" attribute.
59
a9c697b8
MS
602019-05-16 Martin Sebor <msebor@redhat.com>
61
62 * c-decl.c (start_decl): Quote keywords, operators, and
63 types in diagnostics.
64 (finish_decl): Same.
65 * c-parser.c (c_parser_asm_statement): Same.
66 (c_parser_conditional_expression): Same.
67 (c_parser_transaction_cancel): Same.
68 * c-typeck.c (c_common_type): Same.
69 (build_conditional_expr): Same.
70 (digest_init): Same.
71 (process_init_element): Same.
72 (build_binary_op): Same.
73
c4499192
RB
742019-05-17 Richard Biener <rguenther@suse.de>
75
76 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
77 (c_parser_gimple_unary_expression): Likewise.
78 (c_parser_gimple_parentized_ternary_expression): New function.
79
adfe6e4b
RB
802019-05-16 Richard Biener <rguenther@suse.de>
81
82 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
83 (c_parser_gimple_unary_expression): Likewise.
84
186dabf2
RB
852019-05-15 Richard Biener <rguenther@suse.de>
86
87 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
88 __BIT_FIELD_REF.
89
1158c5b4
RB
902019-05-14 Richard Biener <rguenther@suse.de>
91
92 * gimple-parser.c (c_parser_gimple_statement): Remove
93 questionable auto-promotion to VIEW_CONVERT_EXPR.
94 (c_parser_gimple_typespec): Split out from __MEM parsing.
95 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
96 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
97 as __VIEW_CONVERT with -gimple.
98
fd4485aa
ML
992019-05-09 Martin Liska <mliska@suse.cz>
100
101 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
102 __MAX.
103 (c_parser_gimple_unary_expression): Parse also binary expression
104 __MIN and __MAX.
105 (c_parser_gimple_parentized_binary_expression): New function.
106
d276406a
ML
1072019-05-09 Martin Liska <mliska@suse.cz>
108
109 * gimple-parser.c (struct gimple_parser): Add probability.
110 for gimple_parser_edge.
111 (gimple_parser::push_edge): Add new argument probability.
112 (c_parser_gimple_parse_bb_spec): Parse also probability
113 if present.
114 (c_parser_parse_gimple_body): Set edge probability.
115 (c_parser_gimple_compound_statement): Consume token
116 before calling c_parser_gimple_goto_stmt.
117 Parse BB counts.
118 (c_parser_gimple_statement): Pass new argument.
119 (c_parser_gimple_goto_stmt): Likewise.
120 (c_parser_gimple_if_stmt): Likewise.
121 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
122 * c-parser.c (c_parser_declaration_or_fndef): Pass
123 hot_bb_threshold argument.
124 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
125 field.
126 (c_parser_gimple_parse_bb_spec_edge_probability): New.
127
f179b64e
JJ
1282019-04-26 Jakub Jelinek <jakub@redhat.com>
129
130 PR debug/90197
131 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
132 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
133 (c_parser_do_statement): Likewise.
134 (c_parser_for_statement): Likewise. Formatting fixes.
135 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
136 emit DEBUG_BEGIN_STMTs if needed.
137
e7178413
JJ
1382019-04-19 Jakub Jelinek <jakub@redhat.com>
139
c280b7ee
JJ
140 PR c/89888
141 * c-typeck.c (struct c_switch): Remove outside_range_p member.
142 (c_start_case): Don't clear it.
143 (do_case): Adjust c_add_case_label caller.
144 (c_finish_case): Adjust c_do_switch_warnings caller.
145
e7178413
JJ
146 PR c++/90108
147 * c-decl.c (merge_decls): If remove is main variant and
148 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
149 variant that has newdecl as TYPE_NAME if any.
150
60a2c645
JJ
1512019-04-12 Jakub Jelinek <jakub@redhat.com>
152
153 PR c/89933
154 * c-decl.c (merge_decls): When newdecl's type is its main variant,
155 don't try to remove it from the variant list, but instead assert
156 it has no variants.
157
2a82beaa
RB
1582019-04-01 Richard Biener <rguenther@suse.de>
159
160 PR c/71598
161 * c-tree.h (c_get_alias_set): Declare.
162 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
163 * c-objc-common.c (c_get_alias_set): Treat enumeral types
164 as the underlying integer type.
165
bec1da64
MS
1662019-03-19 Martin Sebor <msebor@redhat.com>
167
168 PR tree-optimization/89688
169 * c-decl.c (finish_decl): Call braced_lists_to_string for more
170 kinds of initializers.
171
855cd9b1
JJ
1722019-03-19 Jakub Jelinek <jakub@redhat.com>
173
174 PR c/89734
175 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
176 return type even if quals_used is 0. Formatting fixes.
177
baa09dc5
RB
1782019-03-14 Richard Biener <rguenther@suse.de>
179
180 * c-tree.h (enum c_declspec_il): New.
181 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
182 enum bitfield.
183 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
184 Pass start pass and declspec_il to c_parser_parse_gimple_body.
185 (c_parser_declspecs): Adjust.
186 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
187 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
188 and bitmap.h.
189 (struct gimple_parser): New.
190 (gimple_parser::push_edge): New method.
191 (c_parser_gimple_parse_bb_spec): New helper.
192 (c_parser_parse_gimple_body): Get start pass and IL specification.
193 Initialize SSA and CFG.
194 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
195 Build a gimple_parser parsing state and pass it along.
196 (c_parser_gimple_statement): Change intermittend __PHI internal
197 function argument for the edge.
198 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
199 (c_parser_gimple_goto_stmt): Record edges to build.
200 (c_parser_gimple_if_stmt): Likewise.
201 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
202 (c_parser_gimple_or_rtl_pass_list): Likewise.
203
a3f9f006
ML
2042019-03-11 Martin Liska <mliska@suse.cz>
205
206 * c-decl.c (check_for_loop_decls): Wrap an option name
207 in a string format message and fix GNU coding style.
208 * c-parser.c (c_parser_declspecs): Likewise.
209
1db01ff9
JJ
2102019-03-08 Jakub Jelinek <jakub@redhat.com>
211
212 PR tree-optimization/89550
213 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
214 returned true.
215 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
216 or warning returned true.
217
66dcb747
JJ
2182019-02-28 Jakub Jelinek <jakub@redhat.com>
219
220 PR c/89525
221 * c-typeck.c (convert_arguments): Call inform_declaration only if
222 the previous warning_at call returned true.
223
2263c9f2
TS
2242019-02-22 Thomas Schwinge <thomas@codesourcery.com>
225
226 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
227 parameter. Adjust all users.
228 (c_parser_oacc_simple_clause): Replace parser with loc formal
229 parameter. Adjust all users.
230
19695f4d
CLT
2312019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
232
233 PR c/87924
234 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
235 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
236
5f88ba10
JJ
2372019-02-15 Jakub Jelinek <jakub@redhat.com>
238
239 PR c/89340
240 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
241 before c_decl_attributes rather than after it.
242
cfc30fd1
JJ
2432019-02-06 Jakub Jelinek <jakub@redhat.com>
244
245 PR c/89211
246 * c-parser.c (c_parser_declaration_or_fndef): Don't update
247 DECL_ARGUMENTS of d if it has been defined already. Use a single if
248 instead of 3 nested ifs.
249
fbe83e6b
JM
2502019-02-06 Joseph Myers <joseph@codesourcery.com>
251
252 PR c/88584
253 * c-decl.c (finish_decl): Do not complete array types for arrays
254 with external linkage not at file scope.
255
f461f938
RB
2562019-02-05 Richard Biener <rguenther@suse.de>
257
258 PR c/88606
259 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
260 all type variants when not supported.
261
fe509359
JJ
2622019-01-30 Jakub Jelinek <jakub@redhat.com>
263
264 PR c/89061
265 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
266 * c-decl.c (decl_jump_unsafe): Return false for
267 C_DECL_COMPOUND_LITERAL_P decls.
268 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
269
6a335b96
JJ
2702019-01-29 Jakub Jelinek <jakub@redhat.com>
271
f4b7e754
JJ
272 PR c/89045
273 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
274 scope.
275
6a335b96
JJ
276 PR c/86125
277 * c-decl.c (last_fileptr_type): Remove.
278 (last_structptr_types): New variable.
279 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
280 {old,new}rettype instead of the types themselves. Assert
281 last_structptr_types array has the same number of elements
282 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
283 argument oldtype and newtype. Instead of handling
284 just fileptr_type_node specially, handle all builtin_structptr_types
285 pointer nodes. Formatting fix.
286
d8b5a1a0
MS
2872019-01-24 Martin Sebor <msebor@redhat.com>
288
289 PR c/86125
290 PR c/88886
291 PR middle-end/86308
292 * c-decl.c (match_builtin_function_types): Add arguments.
293 (diagnose_mismatched_decls): Diagnose mismatched declarations
294 of built-ins more strictly.
295
e21c4491
JJ
2962019-01-24 Jakub Jelinek <jakub@redhat.com>
297
298 PR c++/88976
299 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
300 on #pragma omp cancel with different modifiers.
301
420183d9
L
3022019-01-18 H.J. Lu <hongjiu.lu@intel.com>
303
304 PR c/51628
305 PR c/88664
306 * c-typeck.c (convert_for_assignment): Upate the
307 warn_for_address_or_pointer_of_packed_member call.
308
17ad43dd
TH
3092019-01-16 Tom Honermann <tom@honermann.net>
310 Jason Merrill <jason@redhat.com>
311
312 * c-typeck.c (digest_init): Revised the error message produced for
313 ill-formed cases of array initialization with a string literal.
314 (error_init): Make variadic.
315
5f07d78a
JJ
3162019-01-12 Jakub Jelinek <jakub@redhat.com>
317
318 * c-typeck.c (convert_for_assignment): Fix a comment typo.
319
c4581bbf
JJ
3202019-01-07 Jakub Jelinek <jakub@redhat.com>
321
322 PR c/88701
323 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
324 if current_function_decl is non-NULL.
325
65c5b1eb
JM
3262019-01-07 Joseph Myers <joseph@codesourcery.com>
327
328 PR c/88720
329 PR c/88726
330 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
331 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
332 functions declared but never defined only for external scope, not
333 for other scopes.
334
d8fcab68
JJ
3352019-01-07 Jakub Jelinek <jakub@redhat.com>
336
337 PR c++/85052
338 * c-parser.c (c_parser_postfix_expression): Parse
339 __builtin_convertvector.
340
a5544970
JJ
3412019-01-01 Jakub Jelinek <jakub@redhat.com>
342
343 Update copyright years.
344
da77eace
L
3452018-12-20 H.J. Lu <hongjiu.lu@intel.com>
346
347 PR c/51628
348 * c-typeck.c (convert_for_assignment): Call
349 warn_for_address_or_pointer_of_packed_member.
350
1edf8866
SB
3512018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
352
353 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
354 a more specific error message (instead of just falling through).
355
db4fd626
SB
3562018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
357
358 * c-parser.c (c_parser_asm_statement): Keep track of the location each
359 asm qualifier is first seen; use that to give nicer "duplicate asm
360 qualifier" messages. Delete 'quals" variable, instead pass the
361 "is_volatile_ flag to build_asm_stmt directly.
362 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
363 * c-typeck.c (build_asm_stmt): Ditto; adjust.
364
9c9cfcbb
SB
3652018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
366
367 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
368 "done" boolean variable.
369
a14feb3c
DM
3702018-12-19 David Malcolm <dmalcolm@redhat.com>
371
372 PR c++/87504
373 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
374 Move from here to gcc-rich-location.h and gcc-rich-location.c.
375 (build_binary_op): Use struct op_location_t and
376 class binary_op_rich_location.
377
6d939173
JJ
3782018-12-11 Jakub Jelinek <jakub@redhat.com>
379
380 PR sanitizer/88426
381 * c-convert.c (convert): Call c_fully_fold before calling
382 ubsan_instrument_float_cast.
383
b7055028
SB
3842018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
385
386 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
387 setting "quals".
388
5b76e75f
SB
3892018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
390
391 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
392 after asm. Pass a flag for it to build_asm_expr.
393 * c-tree.h (build_asm_expr): Update declaration.
394 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
395 set ASM_INLINE_P.
396
30bd42b9
SB
3972018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
398
399 PR inline-asm/55681
400 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
401 combination of volatile and goto, in any order, without repetitions.
402
9df6c0e4
JB
4032018-12-04 James Norris <jnorris@codesourcery.com>
404 Cesar Philippidis <cesar@codesourcery.com>
405 Julian Brown <julian@codesourcery.com>
406
407 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
408 code.
409
f44697b7
RB
4102018-11-30 Richard Biener <rguenther@suse.de>
411
412 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
413 _Literal (type) { ... } as empty aggregate or vector constructor.
414
550dfbdc
MS
4152018-11-29 Martin Sebor <msebor@redhat.com>
416
417 PR c/88091
418 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
419 (convert_arguments): Add comments. Pass additional argument to
420 the function above.
421
673670da
MS
4222018-11-29 Martin Sebor <msebor@redhat.com>
423
424 PR c/88172
425 PR testsuite/88208
426 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
427
db1d09b0
MS
4282018-11-23 Martin Sebor <msebor@redhat.com>
429
430 PR testsuite/88098
431 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
432 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
433
98f08eb8
MS
4342018-11-20 Martin Sebor <msebor@redhat.com>
435
436 * c-parser.c (c_parser_has_attribute_expression): New function.
437 (c_parser_attribute): New function.
438 (c_parser_attributes): Move code into c_parser_attribute.
439 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
440
cd5da983
MS
4412018-11-15 Martin Sebor <msebor@redhat.com>
442
443 PR c/83656
444 * c-decl.c (header_for_builtin_fn): Declare.
445 (diagnose_mismatched_decls): Diagnose declarations of built-in
446 functions without a prototype.
447 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
448 (convert_argument): Same.
449 (convert_arguments): Factor code out into convert_argument.
450 Detect mismatches between built-in formal arguments in calls
451 to built-in without prototype.
452 (build_conditional_expr): Same.
453 (type_or_builtin_type): New function.
454 (convert_for_assignment): Add argument. Conditionally issue
455 warnings instead of errors for mismatches.
456
620e594b
DM
4572018-11-13 David Malcolm <dmalcolm@redhat.com>
458
459 * c-decl.c: Replace "source_location" with "location_t".
460 * c-tree.h: Likewise.
461 * c-typeck.c: Likewise.
462 * gimple-parser.c: Likewise.
463
3179ebae
JJ
4642018-11-09 Jakub Jelinek <jakub@redhat.com>
465
81a227c6
JJ
466 * c-parser.c (c_parser_omp_clause_final): Use
467 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
468 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
469 parsing instead of c_parser_paren_condition.
470 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
471 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
472 c_fully_fold instead of c_parser_condition.
473 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
474 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
475 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
476 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
477 c_parser_expr_no_commas instead of c_parser_expression.
478
98c91c56
JJ
479 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
480 reduction clause with inscan modifier.
481
3179ebae
JJ
482 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
483 clauses other than atomic_default_mem_order.
484
28567c40
JJ
4852018-11-08 Jakub Jelinek <jakub@redhat.com>
486
487 * c-parser.c: Include memmode.h.
488 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
489 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
490 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
491 task_reduction clauses.
492 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
493 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
494 section, or lvalue assignment expression.
495 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
496 (c_parser_omp_clause_lastprivate): Parse optional
497 conditional: modifier.
498 (c_parser_omp_clause_hint): Require constant integer expression rather
499 than just integer expression.
500 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
501 clause.
502 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
503 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
504 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
505 functions.
506 (c_parser_omp_clause_depend): Parse iterator modifier and handle
507 iterators. Parse mutexinoutset and depobj kinds.
508 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
509 callers.
510 (c_parser_omp_all_clauses): Likewise. Handle
511 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
512 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
513 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
514 default memory order from requires directive if any. Adjust
515 c_finish_omp_atomic caller.
516 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
517 (c_parser_omp_flush): Parse flush with memory-order-clause.
518 (c_parser_omp_for_loop): Allow NE_EXPR even in
519 OpenMP loops, adjust c_finish_omp_for caller.
520 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
521 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
522 Allow to be called while parsing combined parallel master.
523 Parse combined master taskloop{, simd}.
524 (c_parser_omp_parallel): Parse combined
525 parallel master{, taskloop{, simd}} constructs.
526 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
527 (OMP_TASKGROUP_CLAUSE_MASK): Define.
528 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
529 (OMP_TASKWAIT_CLAUSE_MASK): Define.
530 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
531 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
532 around teams body. Use SET_EXPR_LOCATION.
533 (c_parser_omp_target_data): Allow target data
534 with only use_device_ptr clauses.
535 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
536 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
537 (c_parser_omp_requires): New function.
538 (c_finish_taskloop_clauses): New function.
539 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
540 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
541 declaration. Disallow in_reduction clause when combined with parallel
542 master.
543 (c_parser_omp_construct): Adjust c_parser_omp_master and
544 c_parser_omp_taskgroup callers.
545 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
546 other than cancel.
547 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
548 like OMP_CLAUSE_REDUCTION.
549 (handle_omp_array_sections): Likewise. Call save_expr on array
550 reductions before calling build_index_type. Handle depend clauses
551 with iterators.
552 (struct c_find_omp_var_s): New type.
553 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
554 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
555 with static, runtime or auto schedule kinds. Call save_expr for whole
556 array reduction sizes. Diagnose reductions with zero sized elements
557 or variable length structures. Diagnose nogroup clause used with
558 reduction clause(s). Handle depend clause with
559 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
560 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
561 some different type for other kinds. Use build_unary_op with
562 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
563 Handle depend clauses with iterators. Remove no longer needed special
564 case that predetermined const qualified vars may be specified in
565 firstprivate clause. Complain if const qualified vars are mentioned
566 in data-sharing clauses other than firstprivate or shared. Use
567 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
568 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
569 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
570 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
571
7e2de6df
DM
5722018-10-29 David Malcolm <dmalcolm@redhat.com>
573
574 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
575 logic for change to name_hint::operator bool.
576 (undeclared_variable): Likewise.
577 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
578 (c_parser_parameter_declaration): Likewise.
579
9f936c86
JM
5802018-10-17 Joseph Myers <joseph@codesourcery.com>
581
582 * c-errors.c (pedwarn_c11): New function.
583 * c-parser.c (disable_extension_diagnostics): Save
584 warn_c11_c2x_compat and set it to 0.
585 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
586 (c_parser_static_assert_declaration_no_semi): Handle
587 _Static_assert without string constant.
588 * c-tree.h (pedwarn_c11): New prototype.
589
033eb567
DM
5902018-10-17 David Malcolm <dmalcolm@redhat.com>
591
592 * Make-lang.in (selftest-c): New.
593 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
594 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
595 from gcc/Makefile.in.
596
0edf3afe
RB
5972018-10-02 Richard Biener <rguenther@suse.de>
598
599 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
600
8313a764
JM
6012018-09-26 Joseph Myers <joseph@codesourcery.com>
602
603 PR c/87390
604 * c-typeck.c (build_binary_op): Use excess precision for
605 comparisons of integers and floating-point for C11 and later.
606
ce6f0888
MJ
6072018-09-26 Martin Jambor <mjambor@suse.cz>
608
609 PR c/87347
610 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
611 comment.
612
9c4a4b3c
DM
6132018-09-17 David Malcolm <dmalcolm@redhat.com>
614
615 * c-objc-common.c (range_label_for_type_mismatch::get_text):
616 Update for new param.
617 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
618 Likewise.
619
80c6d1f4
MJ
6202018-09-17 Martin Jambor <mjambor@suse.cz>
621
622 PR c/63886
623 * c-parser.c: (warn_for_abs): New function.
624 (c_parser_postfix_expression_after_primary): Call it.
625
4a426e36
BE
6262018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
627
628 * c-typeck.c (digest_init): Shorten overlength strings.
629
6d900107
BE
6302018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
631
632 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
633
b5764229
BE
6342018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
635
636 * c-decl.c (finish_decl): Call braced_list_to_string here ...
637 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
638
22eea6b2
AM
6392018-08-30 Alexander Monakov <amonakov@ispras.ru>
640
641 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
642 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
643
85204e23
DM
6442018-08-27 David Malcolm <dmalcolm@redhat.com>
645
646 PR 87091
647 * c-decl.c (implicitly_declare): Update call to
648 maybe_add_include_fixit to suggest overriding the location, as it
649 is for a note.
650 * c-objc-common.c (c_tree_printer): Update for conversion of
651 show_caret_p to a tri-state.
652
3d78e008
ML
6532018-08-27 Martin Liska <mliska@suse.cz>
654
655 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
656 fndecl_built_in_p and remove check for FUNCTION_DECL if
657 possible.
3d78e008
ML
658 (diagnose_mismatched_decls): Likewise.
659 (merge_decls): Likewise.
660 (warn_if_shadowing): Likewise.
661 (pushdecl): Likewise.
662 (implicitly_declare): Likewise.
663 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
664 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
665 * c-typeck.c (build_function_call_vec): Likewise.
666 (convert_arguments): Likewise.
667
097f82ec
DM
6682018-08-20 David Malcolm <dmalcolm@redhat.com>
669
670 PR other/84889
671 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
672 (diagnose_mismatched_decls): Likewise, in various places.
673 (warn_if_shadowing): Likewise.
674 (implicit_decl_warning): Likewise.
675 (implicitly_declare): Likewise.
676 (undeclared_variable): Likewise.
677 (declare_label): Likewise.
678 (grokdeclarator): Likewise.
679 (start_function): Likewise.
680 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
681 (c_parser_parameter_declaration): Likewise.
682 (c_parser_binary_expression): Likewise.
683 * c-typeck.c (c_expr_sizeof_expr): Likewise.
684 (parser_build_binary_op): Likewise.
685 (build_unary_op): Likewise.
686 (error_init): Likewise.
687 (pedwarn_init): Likewise.
688 (warning_init): Likewise.
689 (convert_for_assignment): Likewise.
690
96e6ae57
DM
6912018-08-15 David Malcolm <dmalcolm@redhat.com>
692
693 * c-objc-common.c: Include "gcc-rich-location.h".
694 (c_tree_printer): Move implemenation of '%T' to...
695 (print_type): ...this new function.
696 (range_label_for_type_mismatch::get_text): New function.
697 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
698 range for the various ic_argpass cases.
699 (class maybe_range_label_for_tree_type_mismatch): New class.
700 (build_binary_op): Use it when calling binary_op_error.
701
0cd020ae
PK
7022018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
703
704 * c-decl.c (start_decl): Do not warn if variables is named as main
705 and is a local variable.
706
72733314
IS
7072018-08-15 Iain Sandoe <iain@sandoe.co.uk>
708
709 PR c/19315
710 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
711 objects of unknown size.
712
23aa9f7c
MS
7132018-08-13 Martin Sebor <msebor@redhat.com>
714
715 PR tree-optimization/71625
716 * c-parser.c (c_parser_declaration_or_fndef): Call
717 braced_list_to_string.
718
e5e7e50d
BH
7192018-08-03 Bogdan Harjoc <harjoc@gmail.com>
720
721 PR c/86690
722 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
723 errors.
724
8a45b051
MS
7252018-08-01 Martin Sebor <msebor@redhat.com>
726
727 PR tree-optimization/86650
728 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
729 and TREE_BLOCK (t) from within percent_K_format to this callsite.
730
5922dcb5
JJ
7312018-08-01 Jakub Jelinek <jakub@redhat.com>
732
733 PR c/85704
734 * c-typeck.c (init_field_decl_cmp): New function.
735 (output_pending_init_elements): Use it for field comparisons
736 instead of pure bit_position comparisons.
737
9b452033
JJ
7382018-07-12 Jakub Jelinek <jakub@redhat.com>
739
740 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
741 type here, instead add "omp declare target implicit" attribute.
742 (finish_decl): Diagnose vars without mappable type here.
743
829c6349
CLT
7442018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
745 Thomas Schwinge <thomas@codesourcery.com>
746 Cesar Philippidis <cesar@codesourcery.com>
747
748 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
749 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
750 to their non-present_or_* counterparts. Make 'self' an alias to
751 PRAGMA_OACC_CLAUSE_HOST.
752 (c_parser_oacc_data_clause): Update GOMP mappings for
753 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
754 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
755 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
756 Remove support for present_or_* clauses.
757 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
758 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
759 (OACC_DECLARE_CLAUSE_MASK): Likewise.
760 (OACC_DATA_CLAUSE_MASK): Likewise.
761 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
762 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
763 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
764 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
765 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
766
e197e64e
KV
7672018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
768
769 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
770 * gimple-parser.c (c_parser_gimple_statement): Likewise.
771 (c_parser_gimple_unary_expression): Likewise.
772
487f2f61
JJ
7732018-06-15 Jakub Jelinek <jakub@redhat.com>
774
775 PR c/86093
776 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
777 before doing POINTER_DIFF_EXPR.
778
e4d44a37
MP
7792018-06-07 Marek Polacek <polacek@redhat.com>
780
781 PR c/85318
782 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
783 for loop initial declarations.
784
b67b9225
DP
7852018-05-30 David Pagan <dave.pagan@oracle.com>
786
787 PR c/55976
788 * c-decl.c (grokdeclarator): Update check for return type warnings.
789 (start_function): Likewise.
790 (finish_function): Likewise.
791 * c-typeck.c (c_finish_return): Update check for return type warnings.
792 Pass OPT_Wreturn_type to pedwarn when appropriate.
793
c566cc9f
RS
7942018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
795
796 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
797 __FMA_EXPR handlng.
798
e4f81565
RS
7992018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
800
801 * gimple-parser.c: Include internal-fn.h.
802 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
803 (c_parser_gimple_call_internal): New function.
804 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
805 Fix typos in comment.
806
79e7b1fe
JJ
8072018-05-10 Jakub Jelinek <jakub@redhat.com>
808
809 PR c++/85662
810 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
811 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
812 fold_convert_loc.
813 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
814 fold_offsetof_1, pass argtype as TYPE to it and drop the
815 fold_convert_loc.
816
f7584c81
DP
8172018-05-02 David Pagan <dave.pagan@oracle.com>
818
819 PR c/30552
820 * c-decl.c (old_style_parameter_scope): New function.
821 * c-parser.c (c_parser_postfix_expression): Check for statement
822 expressions in old-style function parameter list declarations.
823 * c-parser.h (old_style_parameter_scope): New extern declaration.
824
b33a0cb3
JJ
8252018-04-25 Jakub Jelinek <jakub@redhat.com>
826
827 PR sanitizer/84307
828 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
829 it is not TREE_STATIC.
830 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
831 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
832 its COMPOUND_LITERAL_EXPR_DECL.
833
c5c5822a
JM
8342018-03-21 Joseph Myers <joseph@codesourcery.com>
835
836 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
837 where all functions return the same _FloatN or _FloatNx type,
838 treat integer types as _Float64 instead of double.
839
aa1c9429
JJ
8402018-03-21 Jakub Jelinek <jakub@redhat.com>
841
842 PR c/84999
843 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
844 building vector comparison, diagnose it and return error_mark_node.
845
9bb45a95
JJ
8462018-03-15 Jakub Jelinek <jakub@redhat.com>
847
848 PR c/84853
849 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
850 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
851 INTEGER_TYPE element type.
852
ada6bad9
DP
8532018-03-13 David Pagan <dave.pagan@oracle.com>
854
855 PR c/46921
856 * c-typeck.c (output_init_element): Ensure field initializer
857 expression is always evaluated if there are side effects.
858
849bbdb9
JJ
8592018-03-06 Jakub Jelinek <jakub@redhat.com>
860
861 PR c/84721
862 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
863 !building_stmt_list_p ().
864
d74641bd
RS
8652018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
866
867 PR c/84305
868 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
869 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
870 and include the BIND_EXPR in the list of things that need to be
871 pre-evaluated.
872
0444aa9c
NS
8732018-02-09 Nathan Sidwell <nathan@acm.org>
874
875 PR c/84293
876 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
877 to strict_aliasing_warning.
878
7c30b12a
PC
8792018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
880
881 * c-typeck.c (really_start_incremental_init, push_init_level,
882 set_nonincremental_init, output_init_element, process_init_element):
883 Use DECL_UNNAMED_BIT_FIELD.
884
2be4dfcb
MP
8852018-01-31 Marek Polacek <polacek@redhat.com>
886
887 PR c/81779
888 * c-parser.c (c_parser_compound_statement_nostart): Call
889 expansion_point_location_if_in_system_header.
890
bb9869d5
DM
8912018-01-17 David Malcolm <dmalcolm@redhat.com>
892
893 PR c++/83814
894 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
895 the C part.
896
b4923738
JJ
8972018-01-13 Jakub Jelinek <jakub@redhat.com>
898
899 PR c/83801
900 * c-tree.h (decl_constant_value_1): Add a bool argument.
901 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
902 returning a CONSTRUCTOR if it is true. Use error_operand_p.
903 (decl_constant_value): Adjust caller.
904 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
905 decl_constant_value_1 as IN_INIT. Otherwise, punt if
906 decl_constant_value returns initializer that has BLKmode or
907 array type.
908 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
909
928686b1
RS
9102018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
911 Alan Hayward <alan.hayward@arm.com>
912 David Sherwood <david.sherwood@arm.com>
913
914 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
915 TYPE_VECTOR_SUBPARTS.
916
85ec4feb
JJ
9172018-01-03 Jakub Jelinek <jakub@redhat.com>
918
919 Update copyright years.
920
913884f7
JJ
9212018-01-01 Jakub Jelinek <jakub@redhat.com>
922
923 PR c/83595
924 * c-parser.c (c_parser_braced_init, c_parser_initelt,
925 c_parser_conditional_expression, c_parser_cast_expression,
926 c_parser_sizeof_expression, c_parser_alignof_expression,
927 c_parser_postfix_expression, c_parser_omp_declare_reduction,
928 c_parser_transaction_expression): Use set_error () method instead
929 of setting value member to error_mark_node.
930
c6cfa2bf
MM
9312017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
932
933 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
934 and _Float<N>X built-in functions.
935
11d29d63
JJ
9362017-12-22 Jakub Jelinek <jakub@redhat.com>
937
14ec014e
JJ
938 PR debug/83550
939 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
940 TYPE_STUB_DECL and call rest_of_type_compilation before processing
941 incomplete vars rather than after it.
942
11d29d63
JJ
943 PR debug/83547
944 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
945 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
946 and consider empty ones if there are no other stmts. For
947 -Wunused-value walk all statements before the one only followed by
948 DEBUG_BEGIN_STMTs.
949
170a8bd6 9502017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 951 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
952
953 * c-parser.c (c_parser_while_statement): Add unroll parameter and
954 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
955 (c_parser_do_statement): Likewise.
956 (c_parser_for_statement): Likewise.
957 (c_parser_statement_after_labels): Adjust calls to above.
958 (c_parse_pragma_ivdep): New static function.
959 (c_parser_pragma_unroll): Likewise.
960 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
961 <PRAGMA_UNROLL>: New case.
962
01512446
JJ
9632017-12-19 Jakub Jelinek <jakub@redhat.com>
964
965 * c-typeck.c (comptypes_internal, function_types_compatible_p,
966 perform_integral_promotions, digest_init): Replace Yoda conditions
967 with typical order conditions.
968 * c-decl.c (check_bitfield_type_and_width): Likewise.
969
c65e18d3
BE
9702017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
971
972 * c-typeck.c (c_safe_arg_type_equiv_p,
973 c_safe_function_type_cast_p): New function.
974 (build_c_cast): Implement -Wcast-function-type.
975
b7280579
RB
9762017-12-14 Richard Biener <rguenther@suse.de>
977
978 PR c/83415
979 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
980 like REALPART_EXPR for the behavior of whether its operand
981 is an lvalue.
982
49e6a6c0
MP
9832017-12-12 Marek Polacek <polacek@redhat.com>
984
985 PR c/82679
986 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
987
96a95ac1
AO
9882017-12-12 Alexandre Oliva <aoliva@redhat.com>
989
990 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
991 * c-parser.c (add_debug_begin_stmt): New.
992 (c_parser_declaration_or_fndef): Call it.
993 (c_parser_compound_statement_nostart): Likewise.
994 (c_parser_statement_after_labels): Likewise.
995 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
996
4b2b493f
JM
9972017-12-07 Joseph Myers <joseph@codesourcery.com>
998
999 * c-decl.c (build_compound_literal): Add parameter alignas_align
1000 and set alignment of decl if nonzero.
1001 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
1002 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
1003 qualifier.
1004 (c_parser_struct_declaration): Update syntax comment.
1005 (c_parser_type_name): Add alignas_ok argument and pass it to
1006 c_parser_declspecs.
1007 (c_parser_cast_expression): Pass true to c_parser_type_name and
1008 give error if a cast used an _Alignas specifier.
1009 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
1010 give error if sizeof (type-name) used an _Alignas specifier.
1011 (c_parser_alignof_expression): Pass true to c_parser_type_name and
1012 give error if _Alignof (type-name) used an _Alignas specifier.
1013 (c_parser_postfix_expression_after_paren_type): Check specified
1014 alignment for a compound literal and pass it to
1015 build_compound_literal.
1016 * c-parser.h (c_parser_type_name): Update prototype.
1017 * c-tree.h (build_compound_literal): Update prototype.
1018
5d9ae53d
MS
10192017-12-07 Martin Sebor <msebor@redhat.com>
1020
1021 PR c/81544
1022 * c-decl.c (c_decl_attributes): Look up existing declaration and
1023 pass it to decl_attributes.
1024
c79144f8
DM
10252017-12-06 David Malcolm <dmalcolm@redhat.com>
1026
1027 PR c/83236
1028 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
1029 reserved for use by the implementation.
1030
613bc14f
DM
10312017-12-06 David Malcolm <dmalcolm@redhat.com>
1032
1033 * c-decl.c: Include "c-family/c-spellcheck.h".
1034
05abad4c
ML
10352017-12-05 Martin Liska <mliska@suse.cz>
1036 Jakub Jelinek <jakub@redhat.com>
1037
1038 * c-typeck.c (pointer_diff): Add new argument and instrument
1039 pointer subtraction.
1040 (build_binary_op): Similar for pointer comparison.
1041
cc6534d4
JJ
10422017-12-01 Jakub Jelinek <jakub@redhat.com>
1043
65791f42
JJ
1044 PR c/79153
1045 * c-parser.c: Include tree-iterator.h.
1046 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
1047 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
1048 on it.
1049
cc6534d4
JJ
1050 PR c/83222
1051 * c-tree.h (decl_constant_value_1): Declare.
1052 * c-typeck.c (decl_constant_value_1): New function.
1053 (decl_constant_value): Use it.
1054 * c-fold.c (c_fully_fold_internal): If in_init, use
1055 decl_constant_value_1 instead of decl_constant_value.
1056
5de73c05
JJ
10572017-11-30 Jakub Jelinek <jakub@redhat.com>
1058
1059 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
1060
058f0b9e
JJ
10612017-11-28 Jakub Jelinek <jakub@redhat.com>
1062
1063 PR sanitizer/81275
1064 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
1065 c_switch_covers_all_cases_p returns true.
1066
5e9d6aa4 10672017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 1068 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
1069
1070 * Make-lang.in (c/c-array-notation.o): Remove.
1071 * c-array-notation.c: Delete.
1072 * c-decl.c: Remove cilkplus condition.
1073 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
1074 c_parser_cilk_verify_simd, c_parser_array_notation,
1075 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
1076 c_parser_cilk_simd_fn_vector_attrs,
1077 c_finish_cilk_simd_fn_tokens): Delete.
1078 (c_parser_declaration_or_fndef): Remove cilkplus condition.
1079 (c_parser_direct_declarator_inner): Ditto.
1080 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
1081 (c_parser_attributes, c_parser_compound_statement,
1082 c_parser_statement_after_labels, c_parser_if_statement,
1083 c_parser_switch_statement, c_parser_while_statement,
1084 c_parser_do_statement, c_parser_for_statement,
1085 c_parser_unary_expression, c_parser_postfix_expression,
1086 c_parser_postfix_expression_after_primary,
1087 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
1088 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
1089 support.
1090 * c-typeck.c (build_array_ref, build_function_call_vec,
1091 convert_arguments,
1092 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
1093 c_finish_loop, build_binary_op): Remove cilkplus support.
1094
9e851845
JJ
10952017-11-28 Jakub Jelinek <jakub@redhat.com>
1096
1097 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
1098 of build3.
1099
8c7dbea9
BK
11002017-11-14 Boris Kolpackov <boris@codesynthesis.com>
1101
1102 * Make-lang.in (c.install-plugin): Install backend import library.
1103
41521dee
JJ
11042017-11-23 Jakub Jelinek <jakub@redhat.com>
1105
1106 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
1107 pragma_stmt context.
1108
ac9effed
EB
11092017-11-23 Mike Stump <mikestump@comcast.net>
1110 Eric Botcazou <ebotcazou@adacore.com>
1111
1112 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
1113 ANNOTATE_EXPR.
1114 (c_parser_do_statement): Likewise.
1115 (c_parser_for_statement): Likewise.
1116
ce95abc4
DM
11172017-11-22 David Malcolm <dmalcolm@redhat.com>
1118
1119 PR c++/62170
1120 * c-objc-common.c (c_tree_printer): Convert penultimate param from
1121 bool to bool *. Within '%T' handling, if showing an "aka", use
1122 "quoted" param to add appropriate quoting.
1123
974aedcc
MP
11242017-11-22 Marek Polacek <polacek@redhat.com>
1125
1126 PR c++/60336
1127 PR middle-end/67239
1128 PR target/68355
1129 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
1130
d4300cc6
DM
11312017-11-21 David Malcolm <dmalcolm@redhat.com>
1132
1133 PR c/83056
1134 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
1135 earlier failed lookups.
1136
1af4ebf5
MG
11372017-11-21 Marc Glisse <marc.glisse@inria.fr>
1138
1139 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
1140 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
1141
26edace6
DM
11422017-11-20 David Malcolm <dmalcolm@redhat.com>
1143
1144 PR c/81404
1145 * c-decl.c: Include "c-family/known-headers.h".
1146 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
1147 to known-headers.cc.
1148 (class suggest_missing_header): Move to known-header.h.
1149 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
1150 than get_c_name_hint.
1151
b1212255
DM
11522017-11-20 David Malcolm <dmalcolm@redhat.com>
1153
1154 * c-decl.c (get_c_name_hint): New function.
1155 (class suggest_missing_header): New class.
1156 (lookup_name_fuzzy): Call get_c_name_hint and use it to
1157 suggest missing headers to the user.
1158
6c7a259b
DM
11592017-11-20 David Malcolm <dmalcolm@redhat.com>
1160
1161 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1162 Include "c-family/name-hint.h"
1163 (implicit_decl_warning): Convert "hint" from
1164 const char * to name_hint. Pass location to
1165 lookup_name_fuzzy. Suppress any deferred diagnostic if the
1166 warning was not printed.
1167 (undeclared_variable): Likewise for "guessed_id".
1168 (lookup_name_fuzzy): Convert return type from const char *
1169 to name_hint. Add location_t param.
1170 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1171 Include "c-family/name-hint.h"
1172 (c_parser_declaration_or_fndef): Convert "hint" from
1173 const char * to name_hint. Pass location to lookup_name_fuzzy.
1174 (c_parser_parameter_declaration): Likewise.
1175
f9c59f7e
JJ
11762017-11-19 Jakub Jelinek <jakub@redhat.com>
1177
1178 PR c/66618
1179 PR c/69960
1180 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
1181 where needed.
1182 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
1183 handle_omp_array_sections): Likewise.
1184 (digest_init): Don't call decl_constant_value_for_optimization.
1185 * c-tree.h (decl_constant_value_for_optimization): Removed.
1186 * c-fold.c (c_fold_array_ref): New function.
1187 (c_fully_fold_internal): Add LVAL argument, propagate it through
1188 recursive calls. For VAR_P call decl_constant_value and
1189 unshare if not LVAL and either optimizing or IN_INIT. Remove
1190 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
1191 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
1192 (c_fully_fold): Add LVAL argument, pass it through to
1193 c_fully_fold_internal.
1194 (decl_constant_value_for_optimization): Removed.
1195
3ca0dc60
JM
11962017-11-15 Joseph Myers <joseph@codesourcery.com>
1197
1198 PR c/81156
1199 * c-parser.c (check_tgmath_function): New function.
1200 (enum tgmath_parm_kind): New enum.
1201 (c_parser_postfix_expression): Handle __builtin_tgmath.
1202
64a5912c
DM
12032017-10-31 David Malcolm <dmalcolm@redhat.com>
1204
1205 * c-decl.c (implicit_decl_warning): Update for renaming of
1206 pedwarn_at_rich_loc and warning_at_rich_loc.
1207 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
1208 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
1209 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1210 (c_parser_struct_or_union_specifier): Likewise for renaming of
1211 pedwarn_at_rich_loc.
1212 (c_parser_parameter_declaration): Likewise for renaming of
1213 error_at_rich_loc.
1214 * c-typeck.c (build_component_ref): Likewise.
1215 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
1216 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
1217 (set_init_label): Likewise for renaming of error_at_rich_loc.
1218
c1136864
RB
12192017-10-30 Richard Biener <rguenther@suse.de>
1220
1221 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
1222 stmts.
1223
ee5fd23a
MM
12242017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
1225
1226 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
1227 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
1228
1a59ccf2
DM
12292017-10-25 David Malcolm <dmalcolm@redhat.com>
1230
1231 PR c/7356
1232 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
1233 semicolons.
1234
bc1a75dd
JJ
12352017-10-25 Jakub Jelinek <jakub@redhat.com>
1236
1237 PR libstdc++/81706
1238 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
1239 newdecl to corresponding __builtin_ if any.
1240
ff1ff960
PC
12412017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
1242
1243 PR c++/82466
1244 * c-decl.c (diagnose_mismatched_decls): Use
1245 OPT_Wbuiltin_declaration_mismatch.
1246
62e1c678
DM
12472017-10-12 David Malcolm <dmalcolm@redhat.com>
1248
1249 * c-parser.c (c_parser_require): Add "type_is_unique" param and
1250 use it to guard calls to maybe_suggest_missing_token_insertion.
1251 (c_parser_parms_list_declarator): Override default value of new
1252 "type_is_unique" param to c_parser_require.
1253 (c_parser_asm_statement): Likewise.
1254 * c-parser.h (c_parser_require): Add "type_is_unique" param,
1255 defaulting to true.
1256
a92f6726
NS
12572017-10-11 Nathan Sidwell <nathan@acm.org>
1258
1259 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
1260
8e6cdc90
RS
12612017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1262
1263 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
1264 operating on trees as wide_ints.
1265 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
1266 (c_tree_equal): Likewise.
1267
8139a48e
DM
12682017-10-04 David Malcolm <dmalcolm@redhat.com>
1269
1270 * c-decl.c (push_parm_decl): Store c_parm's location into the
1271 PARAM_DECL.
1272 (build_c_parm): Add "loc" param and store it within the c_parm.
1273 * c-parser.c (struct c_parser): Add "last_token_location" field.
1274 (c_parser_consume_token): Store location of the token into the
1275 new field.
1276 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
1277 when handling a FUNCTION_DECL, if it doesn't already have them.
1278 (c_parser_parameter_declaration): Generate a location for the
1279 parameter, and pass it to the call to build_c_parm.
1280 * c-tree.h (struct c_parm): Add field "loc".
1281 (build_c_parm): Add location_t param.
1282 * c-typeck.c (get_fndecl_argument_location): New function.
1283 (inform_for_arg): New function.
1284 (convert_for_assignment): Use inform_for_arg when dealing with
1285 ic_argpass.
1286
2a389958
JJ
12872017-09-29 Jakub Jelinek <jakub@redhat.com>
1288
7d386d45
JJ
1289 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
1290 width is non-NULL.
1291 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
1292 don't SET_DECL_C_BIT_FIELD here.
1293
2a389958
JJ
1294 PR c/82340
1295 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
1296 instead of trying to set just TREE_READONLY manually.
1297
ebc6a85e
TV
12982017-09-16 Tom de Vries <tom@codesourcery.com>
1299
1300 PR c/81875
1301 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
1302 cond itself.
1303
bb75facd
JM
13042017-09-15 Joseph Myers <joseph@codesourcery.com>
1305
1306 PR c/82071
1307 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
1308 for C11.
1309 (build_conditional_expr): For C11, generate result with excess
1310 precision when one argument is an integer and the other is of a
1311 type using excess precision.
1312
1d933576
BE
13132017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
1314
1315 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
1316
267bbb6f
MP
13172017-09-13 Marek Polacek <polacek@redhat.com>
1318
1319 PR c/82167
1320 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
1321 than expr.original_type.
1322
6836632e
NS
13232017-09-12 Nathan Sidwell <nathan@acm.org>
1324
1325 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1326 resort_sorted_fields): Moved from c-family/c-common.c.
1327 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
1328
e035be33
JM
13292017-09-01 Joseph Myers <joseph@codesourcery.com>
1330
1331 PR c/82071
1332 * c-typeck.c (build_atomic_assign): Handle argument with excess
1333 precision. Ensure any EXCESS_PRECISION_EXPR is present in
1334 argument passed to build_binary_op and convert_for_assignment but
1335 not for call to c_fully_fold.
1336 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
1337 Ensure build_binary_op is called with argument with original
1338 semantic type. Avoid calling c_fully_fold with an
1339 EXCESS_PRECISION_EXPR from build_binary_op.
1340
d2e05fcb
JJ
13412017-09-01 Jakub Jelinek <jakub@redhat.com>
1342
1343 PR c/81887
1344 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
1345
b397965c
RS
13462017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1347 Alan Hayward <alan.hayward@arm.com>
1348 David Sherwood <david.sherwood@arm.com>
1349
1350 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
1351 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
1352 m1 and m2 to the signed equivalent of a fixed-point
1353 SCALAR_TYPE_MODE.
1354
14e18d71
DM
13552017-08-24 David Malcolm <dmalcolm@redhat.com>
1356
1357 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
1358 than CAN_HAVE_LOCATION_P when determining whether to use the
1359 location_t value within "value".
1360
7f204c0f
DM
13612017-08-21 David Malcolm <dmalcolm@redhat.com>
1362
1363 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
1364 rather than peeking the location of the first token.
1365 * c-tree.h (c_expr::get_location): New method.
1366
2f687306
DM
13672017-08-21 David Malcolm <dmalcolm@redhat.com>
1368
1369 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
1370 to check_function_arguments.
1371
3e7b80d7
MP
13722017-08-18 Marek Polacek <polacek@redhat.com>
1373
1374 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
1375 commentary.
1376
00aa1fa2
L
13772017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1378
1379 PR c/53037
1380 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
1381 (check_bitfield_type_and_width): Don't allow bit-field with
1382 warn_if_not_aligned type.
1383
da67acb9
MS
13842017-08-14 Martin Sebor <msebor@redhat.com>
1385
1386 PR c/81117
1387 * c-objc-common.c (c_objc_common_init): Handle 'G'.
1388
bb85aa74
MP
13892017-08-11 Marek Polacek <polacek@redhat.com>
1390
1391 PR c/81795
1392 * c-decl.c (pushtag): Only print inform if the warning was printed.
1393 (grokdeclarator): Likewise.
1394
32129a17
DM
13952017-08-10 David Malcolm <dmalcolm@redhat.com>
1396
1397 * c-parser.c (c_parser_error): Rename to...
1398 (c_parser_error_richloc): ...this, making static, and adding
1399 "richloc" parameter, passing it to the c_parse_error call,
1400 rather than calling c_parser_set_source_position_from_token.
1401 (c_parser_error): Reintroduce, reimplementing in terms of the
1402 above, converting return type from void to bool.
1403 (class token_pair): New class.
1404 (struct matching_paren_traits): New struct.
1405 (matching_parens): New typedef.
1406 (struct matching_brace_traits): New struct.
1407 (matching_braces): New typedef.
1408 (get_matching_symbol): New function.
1409 (c_parser_require): Add param MATCHING_LOCATION, using it to
1410 highlight matching "opening" tokens for missing "closing" tokens.
1411 (c_parser_skip_until_found): Likewise.
1412 (c_parser_static_assert_declaration_no_semi): Convert explicit
1413 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
1414 class matching_parens, so that the pertinent open parenthesis is
1415 highlighted when there are problems locating the close
1416 parenthesis.
1417 (c_parser_struct_or_union_specifier): Likewise.
1418 (c_parser_typeof_specifier): Likewise.
1419 (c_parser_alignas_specifier): Likewise.
1420 (c_parser_simple_asm_expr): Likewise.
1421 (c_parser_braced_init): Likewise, for matching_braces.
1422 (c_parser_paren_condition): Likewise, for matching_parens.
1423 (c_parser_switch_statement): Likewise.
1424 (c_parser_for_statement): Likewise.
1425 (c_parser_asm_statement): Likewise.
1426 (c_parser_asm_operands): Likewise.
1427 (c_parser_cast_expression): Likewise.
1428 (c_parser_sizeof_expression): Likewise.
1429 (c_parser_alignof_expression): Likewise.
1430 (c_parser_generic_selection): Likewise.
1431 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
1432 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
1433 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
1434 In case CPP_OPEN_PAREN, pass loc_open_paren to the
1435 c_parser_skip_until_found call.
1436 (c_parser_objc_class_definition): Use class matching_parens as
1437 above.
1438 (c_parser_objc_method_decl): Likewise.
1439 (c_parser_objc_try_catch_finally_statement): Likewise.
1440 (c_parser_objc_synchronized_statement): Likewise.
1441 (c_parser_objc_at_property_declaration): Likewise.
1442 (c_parser_oacc_wait_list): Likewise.
1443 (c_parser_omp_var_list_parens): Likewise.
1444 (c_parser_omp_clause_collapse): Likewise.
1445 (c_parser_omp_clause_default): Likewise.
1446 (c_parser_omp_clause_if): Likewise.
1447 (c_parser_omp_clause_num_threads): Likewise.
1448 (c_parser_omp_clause_num_tasks): Likewise.
1449 (c_parser_omp_clause_grainsize): Likewise.
1450 (c_parser_omp_clause_priority): Likewise.
1451 (c_parser_omp_clause_hint): Likewise.
1452 (c_parser_omp_clause_defaultmap): Likewise.
1453 (c_parser_oacc_single_int_clause): Likewise.
1454 (c_parser_omp_clause_ordered): Likewise.
1455 (c_parser_omp_clause_reduction): Likewise.
1456 (c_parser_omp_clause_schedule): Likewise.
1457 (c_parser_omp_clause_num_teams): Likewise.
1458 (c_parser_omp_clause_thread_limit): Likewise.
1459 (c_parser_omp_clause_aligned): Likewise.
1460 (c_parser_omp_clause_linear): Likewise.
1461 (c_parser_omp_clause_safelen): Likewise.
1462 (c_parser_omp_clause_simdlen): Likewise.
1463 (c_parser_omp_clause_depend): Likewise.
1464 (c_parser_omp_clause_map): Likewise.
1465 (c_parser_omp_clause_device): Likewise.
1466 (c_parser_omp_clause_dist_schedule): Likewise.
1467 (c_parser_omp_clause_proc_bind): Likewise.
1468 (c_parser_omp_clause_uniform): Likewise.
1469 (c_parser_omp_for_loop): Likewise.
1470 (c_parser_cilk_clause_vectorlength): Likewise.
1471 (c_parser_cilk_clause_linear): Likewise.
1472 (c_parser_transaction_expression): Likewise.
1473 * c-parser.h (c_parser_require): Add param matching_location with
1474 default UNKNOWN_LOCATION.
1475 (c_parser_error): Convert return type from void to bool.
1476 (c_parser_skip_until_found): Add param matching_location with
1477 default UNKNOWN_LOCATION.
1478
30af3a2b
MP
14792017-08-09 Marek Polacek <polacek@redhat.com>
1480
1481 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
1482 * c-tree.h (build_external_ref): Update declaration.
1483 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
1484 (build_external_ref): Change the type of a parameter to bool.
1485 (parser_build_binary_op): Use true/false instead of 1/0.
1486 (pointer_diff): Likewise.
1487 (build_modify_expr): Likewise.
1488 (set_designator): Change the type of a parameter to bool.
1489 (set_init_index): Use true/false instead of 1/0.
1490 (set_init_label): Likewise.
1491 (output_init_element): Change the type of a parameter to bool.
1492 (output_pending_init_elements): Use true/false instead of 1/0.
1493 (process_init_element): Likewise.
1494 (build_binary_op): Change the type of a parameter to bool.
1495
296c53ac
MP
14962017-08-09 Marek Polacek <polacek@redhat.com>
1497
1498 PR c/81233
1499 * c-typeck.c (pedwarn_init): Make the function take a variable list.
1500 Call emit_diagnostic_valist instead of pedwarn.
1501 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
1502 Print the relevant types in diagnostics.
1503
a32c8316
MP
15042017-08-09 Marek Polacek <polacek@redhat.com>
1505
1506 PR c/81417
1507 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
1508 build_conditional_expr.
1509 * c-parser.c (c_parser_conditional_expression): Create locations for
1510 EXP1 and EXP2 from their source ranges. Pass the locations down to
1511 build_conditional_expr.
1512 * c-tree.h (build_conditional_expr): Update declaration.
1513 * c-typeck.c (build_conditional_expr): Add location_t parameters.
1514 For -Wsign-compare, also print the types.
1515
314e6352
ML
15162017-08-08 Martin Liska <mliska@suse.cz>
1517
1518 * c-convert.c: Include header files.
1519 * c-typeck.c: Likewise.
1520
577eec56
ML
15212017-08-07 Martin Liska <mliska@suse.cz>
1522
1523 * c-parser.c (c_parser_attributes): Canonicalize name of an
1524 attribute.
1525
f7b6353a
MP
15262017-08-02 Marek Polacek <polacek@redhat.com>
1527
1528 PR c/81289
1529 * c-parser.c (c_parser_unary_expression): Use set_error.
1530
8a6eab34
MP
1531 PR c/81448
1532 PR c/81306
1533 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
1534 warnings. Avoid walking MACRO_MAP_LOCATIONS.
1535
7fef86d3
JH
15362017-07-31 Jan Hubicka <hubicka@ucw.cz>
1537 Martin Liska <mliska@suse.cz>
1538
1539 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 1540 statement.
7fef86d3 1541
f34ebeb2
ML
15422017-07-31 Martin Liska <mliska@suse.cz>
1543
1544 PR sanitize/81530
1545 * c-convert.c (convert): Guard condition with flag_sanitize_p
1546 also with current_function_decl non-null equality.
1547 * c-decl.c (grokdeclarator): Likewise.
1548 * c-typeck.c (build_binary_op): Likewise.
1549
8595f67b
MP
15502017-07-25 Marek Polacek <polacek@redhat.com>
1551
1552 * c-decl.c (grokfield): Remove local variable.
1553
d49718d6
MP
15542017-07-25 Marek Polacek <polacek@redhat.com>
1555
1556 PR c/81364
1557 * c-parser.c (c_parser_else_body): Don't warn about multistatement
1558 macro expansion if the body is in { }.
1559 (c_parser_while_statement): Likewise.
1560 (c_parser_for_statement): Likewise.
1561
ff22eb12
NS
15622017-07-18 Nathan Sidwell <nathan@acm.org>
1563
1564 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
1565
eea77d1f
DM
15662017-07-14 David Malcolm <dmalcolm@redhat.com>
1567
1568 * c-decl.c (implicitly_declare): When suggesting a missing
1569 #include, provide a fix-it hint.
1570
b6f43128
DM
15712017-07-06 David Malcolm <dmalcolm@redhat.com>
1572
1573 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
1574 and call that instead.
1575 * c-tree.h (selftest::run_c_tests): New decl.
1576
3e2becc4
MP
15772017-06-26 Marek Polacek <polacek@redhat.com>
1578
1579 PR c/80116
1580 * c-parser.c (c_parser_if_body): Set the location of the
1581 body of the conditional after parsing all the labels. Call
1582 warn_for_multistatement_macros.
1583 (c_parser_else_body): Likewise.
1584 (c_parser_switch_statement): Likewise.
1585 (c_parser_while_statement): Likewise.
1586 (c_parser_for_statement): Likewise.
1587 (c_parser_statement): Add a default argument. Save the location
1588 after labels have been parsed.
1589 (c_parser_c99_block_statement): Likewise.
1590
343ae898
RB
15912017-06-19 Richard Biener <rguenther@suse.de>
1592
1593 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1594 negated _Literals to parse _Literal (int) -1.
1595
45b2222a
ML
15962017-06-13 Martin Liska <mliska@suse.cz>
1597
1598 PR sanitize/78204
1599 * c-convert.c (convert): Use sanitize_flags_p.
1600 * c-decl.c (grokdeclarator): Likewise.
1601 * c-typeck.c (convert_for_assignment): Likewise.
1602 (c_finish_return): Likewise.
1603 (build_binary_op): Likewise.
1604
8ab7005b
JJ
16052017-06-08 Jakub Jelinek <jakub@redhat.com>
1606
1607 PR c/81006
1608 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
1609 to sizetype before size_binop.
1610
363dc72c
JJ
16112017-06-07 Jakub Jelinek <jakub@redhat.com>
1612
1613 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
1614 of TDI_generic.
1615
dc949728
MP
16162017-06-06 Marek Polacek <polacek@redhat.com>
1617
1618 PR c/79983
1619 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
1620 ref.
1621 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
1622
40ffd95f
BE
16232017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1624
1625 * c-parser.c (c_parser_binary_expression): Implement the
1626 -Wsizeof_pointer_div warning.
1627 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
1628 from a parenthesized expression.
1629 (c_parser_expr_list): Use c_last_sizeof_loc.
1630 * c-tree.h (c_last_sizeof_loc): New external.
1631 * c-typeck.c (c_last_sizeof_loc): New variable.
1632 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
1633
9fc5e7a4
MM
16342017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
1635
1636 PR testsuite/80580
1637 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
1638
f012c8ef
DM
16392017-05-30 David Malcolm <dmalcolm@redhat.com>
1640
1641 * c-objc-common.c (c_tree_printer): Gain bool and const char **
1642 parameters.
1643
3cd211af
MS
16442017-05-24 Martin Sebor <msebor@redhat.com>
1645
1646 PR c/80731
1647 * c-fold.c (c_fully_fold_internal): Adjust.
1648 * c-typeck.c (parser_build_unary_op): Adjust.
1649
fd71a9a2
TS
16502017-05-23 Thomas Schwinge <thomas@codesourcery.com>
1651
1652 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
1653 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
1654 "VECTOR_LENGTH".
1655
92fa0f9e
MP
16562017-05-23 Marek Polacek <polacek@redhat.com>
1657
1658 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
1659 quotes.
1660
d11c168a
JJ
16612017-05-22 Jakub Jelinek <jakub@redhat.com>
1662
1663 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
1664 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
1665 it returned invariant. Call tree_invariant_p unconditionally
1666 afterwards to decide whether to return expr or op0.
1667
58aca9d9
NS
16682017-05-22 Nathan Sidwell <nathan@acm.org>
1669
1670 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
1671
7fd549d2
TS
16722017-05-19 Thomas Schwinge <thomas@codesourcery.com>
1673
1674 * c-parser.c (c_parser_omp_clause_default): Handle
1675 "OMP_CLAUSE_DEFAULT_PRESENT".
1676
6ecd2339
BE
16772017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1678
1679 * config-lang.in (gtfiles): Add c-family/c-format.c.
1680
8a57ecff
NS
16812017-05-18 Nathan Sidwell <nathan@acm.org>
1682
1683 * c-decl.c (pushdecl_top_level): Delete unused function.
1684
6574d78e
MP
16852017-05-18 Marek Polacek <polacek@redhat.com>
1686
1687 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
1688 (check_earlier_gotos): Likewise.
1689 (define_label): Likewise.
1690 (pending_xref_error): Likewise.
1691 (smallest_type_quals_location): Likewise.
1692 (grokdeclarator): Likewise.
1693 (grokparms): Likewise.
1694 (identifier_global_value): Likewise.
1695 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
1696 (find_init_member): Likewise.
1697
e3455240
MP
16982017-05-18 Marek Polacek <polacek@redhat.com>
1699
1700 * c-decl.c (start_decl): Use false/true instead of 0/1.
1701 (grokdeclarator): Likewise.
1702 (finish_struct): Likewise.
1703 (start_function): Change the return type to bool. Use false/true
1704 instead of 0/1.
1705 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
1706 * c-tree.h (start_function): Update.
1707 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
1708 (set_designator): Change the return type to bool. Use false/true
1709 instead of 0/1.
1710
3fa8871b
MP
17112017-05-17 Marek Polacek <polacek@redhat.com>
1712
1713 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
1714 * c-typeck.c: Likewise.
1715
142473df
MP
17162017-05-17 Marek Polacek <polacek@redhat.com>
1717
1718 PR sanitizer/80659
1719 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
1720 DECL_IGNORED_P even for non-static compound literals.
1721
1a817418
ML
17222017-05-17 Martin Liska <mliska@suse.cz>
1723
1724 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1725 use it instead of int type.
1726
b2fa0a8b
MP
17272017-05-17 Marek Polacek <polacek@redhat.com>
1728
1729 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
1730 call c_fully_fold.
1731 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
1732 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
1733 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1734 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1735 save_expr.
1736 (c_parser_conditional_expression): Likewise.
1737 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1738 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1739 (process_init_element): Likewise.
1740 (build_binary_op): Likewise.
1741 (handle_omp_array_sections_1): Likewise.
1742
1e47f02b
TS
17432017-05-12 Thomas Schwinge <thomas@codesourcery.com>
1744
1745 * c-parser.c (c_parser_omp_clause_num_gangs)
1746 (c_parser_omp_clause_num_workers)
1747 (c_parser_omp_clause_vector_length): Merge functions into...
1748 (c_parser_oacc_single_int_clause): ... this new function. Adjust
1749 all users.
1750
c24e924f
NS
17512017-05-11 Nathan Sidwell <nathan@acm.org>
1752
1753 * gimple-parser.c: Don't #include tree-dump.h.
1754
c587104e
MM
17552017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1756
1757 PR testsuite/80580
1758 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
1759
67ac9a9d
MM
17602017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1761
1762 PR testsuite/80580
1763 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1764 incorrect __MEM syntax.
1765
ac4eb40f
MM
17662017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1767
1768 PR testsuite/80580
1769 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1770 type of unary '*'.
1771
641da50a
NS
17722017-05-09 Nathan Sidwell <nathan@acm.org>
1773
1774 * c-tree.h (pushdecl): Declare.
1775
56d35585
DM
17762017-05-05 David Malcolm <dmalcolm@redhat.com>
1777
1778 * c-decl.c (warn_defaults_to): Replace report_diagnostic
1779 with diagnostic_report_diagnostic.
1780 * c-errors.c (pedwarn_c99): Likewise.
1781 (pedwarn_c90): Likewise.
1782
815d9cc6
XR
17832017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1784
92a285c1 1785 PR c++/80038
815d9cc6
XR
1786 * c-gimplify.c (c_gimplify_expr): Remove calls to
1787 cilk_gimplifY_call_params_in_spawned_fn.
1788
1c4ea66f
DM
17892017-04-25 David Malcolm <dmalcolm@redhat.com>
1790
1791 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1792 hint for removing extra semicolon.
1793
666f7903
JJ
17942017-04-21 Jakub Jelinek <jakub@redhat.com>
1795
1796 PR c/80468
1797 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
1798 enabled, set specs->type to integer_type_node.
1799
5764ee3c
JW
18002017-04-03 Jonathan Wakely <jwakely@redhat.com>
1801
1802 * c-array-notation.c: Fix typo in comment.
1803
10fa8dfb
MP
18042017-03-29 Marek Polacek <polacek@redhat.com>
1805
1806 PR c/79730
1807 * c-decl.c (finish_decl): Check VAR_P.
1808
a9e4a1a5
JJ
18092017-03-27 Jakub Jelinek <jakub@redhat.com>
1810
1811 PR middle-end/80162
1812 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1813 * c-typeck.c (c_mark_addressable): Likewise. Look through
1814 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1815 to ARRAY_TYPE.
1816 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
1817
ee3ff394
MP
18182017-03-23 Marek Polacek <polacek@redhat.com>
1819
1820 * c-tree.h: Remove a C_RID_YYCODE reference.
1821
4d1b8e70
JJ
18222017-03-21 Jakub Jelinek <jakub@redhat.com>
1823
1824 PR c/80097
1825 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
1826 optional COMPOUND_EXPR with ubsan instrumentation.
1827
31dc71a8
MP
18282017-03-17 Marek Polacek <polacek@redhat.com>
1829
1830 * c-parser.c: Add C11 references.
1831
d579c385
MP
18322017-03-15 Marek Polacek <polacek@redhat.com>
1833
1834 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
1835
85059a38
MP
18362017-03-11 Marek Polacek <polacek@redhat.com>
1837
1838 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
1839
2f6f187a
DM
18402017-03-10 David Malcolm <dmalcolm@redhat.com>
1841
1842 PR translation/79848
1843 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1844 "%qs".
1845 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1846
36618428
MP
18472017-03-09 Marek Polacek <polacek@redhat.com>
1848
1849 PR sanitizer/79757
1850 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1851 parameter declarations with initializers.
1852
01e5af5a
JJ
18532017-03-09 Jakub Jelinek <jakub@redhat.com>
1854
1855 PR c/79969
1856 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
1857 TYPE_STUB_DECL.
1858
a71dbc63
JJ
18592017-03-07 Jakub Jelinek <jakub@redhat.com>
1860
1861 PR c/79834
1862 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1863 for "may only be used in compound statements" diagnostics, change it
1864 such that the same translatable string is used for all pragmas. For
1865 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1866 diagnostics.
1867 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1868 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1869 "may only be used in compound statements" diagnostics, such that the
1870 same translatable string is used for all pragmas.
1871
1ff4bae6
MP
18722017-03-04 Marek Polacek <polacek@redhat.com>
1873
1874 PR c/79847
1875 * c-decl.c (implicit_decl_warning): Add missing space.
1876
7f5a7d78
MP
18772017-03-03 Marek Polacek <polacek@redhat.com>
1878
1879 PR c/79758
1880 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1881 current_function_prototype_arg_types is error_mark_node. Fix
1882 formatting. Use TREE_VALUE instead of TREE_TYPE.
1883
883c8f06
JJ
18842017-03-03 Jakub Jelinek <jakub@redhat.com>
1885
79c9b7a8
JJ
1886 PR c/79837
1887 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1888 %<min%> or %<max%> in the diagnostics, instead mention identifier.
1889 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1890 diagnostics.
1891
883c8f06
JJ
1892 PR c/79836
1893 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1894 instead of %<_Generic>.
1895 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1896 (c_parser_omp_target_exit_data): Use %<release%> instead of
1897 %<release>.
1898
324ff1a0
JJ
18992017-02-28 Jakub Jelinek <jakub@redhat.com>
1900
1901 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1902 instead of just cond ? "..." : "...".
1903 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1904 for "enter"/"exit" keyword.
1905 (c_finish_oacc_routine): Don't use %s to supply portions of the
1906 message.
1907
4227c9ad
JJ
19082017-02-24 Jakub Jelinek <jakub@redhat.com>
1909
1910 PR c++/79588
1911 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1912 handle -Wrestrict here.
1913 * c-typeck.c (build_function_call_vec): Adjust
1914 check_function_arguments caller.
1915
5d972e66
RB
19162017-02-23 Richard Biener <rguenther@suse.de>
1917
1918 PR c/79684
1919 * gimple-parser.c (c_parser_gimple_statement): Use set_error
1920 to initialize c_exprs to return.
1921 (c_parser_gimple_binary_expression): Likewise.
1922 (c_parser_gimple_unary_expression): Likewise.
1923 (c_parser_gimple_postfix_expression): Likewise.
1924
61ac5ebe
MP
19252017-02-22 Marek Polacek <polacek@redhat.com>
1926
1927 PR c/79662
1928 * c-typeck.c (convert_arguments): Handle error_mark_node.
1929
41d1b0b1
PK
19302017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1931
1932 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1933 value of c_parser_parse_ssa_name against error_mark_node and emit
1934 error if ssa name is anonymous and written as default definition.
1935
eab1f169
PK
19362017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1937
1938 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1939 FMA_EXPR.
1940
bcac0b4d
JJ
19412017-02-16 Jakub Jelinek <jakub@redhat.com>
1942
1943 PR c++/79512
1944 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1945 ignore #pragma omp target even when not followed by identifier.
1946
1be33173
PK
19472017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1948
1949 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1950 (c_parser_gimple_unary_expression): Likewise.
1951
aa326bfb
JJ
19522017-02-13 Jakub Jelinek <jakub@redhat.com>
1953
1954 * c-parser.c (c_parser_oacc_declare): Add missing space in
1955 diagnostics.
1956
8a398bc5
PK
19572017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1958
1959 PR c/79478
1960 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1961 set_c_expr_source_range when parsing ssa-name.
1962
3dcde5ef
PG
19632017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
1964 Richard Biener <rguenther@suse.de>
1965
1966 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1967 building IL when arguments are error_mark_node.
1968 (c_parser_gimple_unary_expression): Likewise.
1969 (c_parser_gimple_if_stmt): Likewise.
1970 (c_parser_gimple_switch_stmt): Likewise.
1971 (c_parser_gimple_return_stmt): Likewise.
1972 (c_parser_parse_ssa_name): When name lookup fails do not build
1973 an SSA name. Use undeclared rather than not declared in error
1974 reporting.
1975
192b048b
MP
19762017-02-09 Marek Polacek <polacek@redhat.com>
1977
1978 PR c/79428
1979 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1980 instead of c_parser_skip_until_found.
1981
56f71478
JJ
19822017-02-09 Jakub Jelinek <jakub@redhat.com>
1983
1984 PR c/79431
1985 * c-parser.c (c_parser_omp_declare_target): Don't invoke
1986 symtab_node::get on automatic variables.
1987
02889d23
CLT
19882016-02-09 Nathan Sidwell <nathan@codesourcery.com>
1989 Chung-Lin Tang <cltang@codesourcery.com>
1990
1991 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1992 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1993 semantic checking.
1994 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1995
7af4b20d
RB
19962017-02-07 Richard Biener <rguenther@suse.de>
1997
1998 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1999 (c_parser_gimple_postfix_expression_after_primary):
2000 Do not use c_build_function_call_vec to avoid folding and promotion.
2001 Simplify.
2002
e5e391d6
MO
20032017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
2004
2005 PR lto/79061
2006 * c-decl.c (pop_scope): Pass main_input_filename to
2007 build_translation_unit_decl.
2008
c2e84327
DM
20092017-01-24 David Malcolm <dmalcolm@redhat.com>
2010
2011 * c-parser.c: Include "read-rtl-function.h" and
2012 "run-rtl-passes.h".
2013 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
2014 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
2015 production. Update for renaming of field "gimple_pass" to
2016 "gimple_or_rtl_pass". If __RTL was seen, call
2017 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
2018 to an auto_timevar, to cope with early exit.
2019 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
2020 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
2021 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
2022 Handle RID_RTL.
2023 (c_parser_parse_rtl_body): New function.
2024 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
2025 (struct c_declspecs): Rename field "gimple_pass" to
2026 "gimple_or_rtl_pass". Add field "rtl_p".
2027 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
2028 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
2029 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
2030 (c_parser_gimple_or_rtl_pass_list): ...this.
2031
2ebd93e1
MP
20322017-01-20 Marek Polacek <polacek@redhat.com>
2033
2034 PR c/64279
2035 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
2036
b1c95bb5
RB
20372017-01-13 Richard Biener <rguenther@suse.de>
2038
2039 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
2040 nops.
2041
25329913
RB
20422017-01-13 Richard Biener <rguenther@suse.de>
2043
2044 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2045 _Literal ( type-name ) number.
2046
6bb4ea5c
RB
20472017-01-12 Richard Biener <rguenther@suse.de>
2048
2049 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2050 __MEM.
2051
6b5b4e9c
JJ
20522017-01-11 Jakub Jelinek <jakub@redhat.com>
2053
2054 PR c++/72813
2055 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
2056 PCH file.
2057
e3252775
RB
20582017-01-11 Richard Biener <rguenther@suse.de>
2059
2060 PR bootstrap/79052
2061 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
2062 returns on parse errors.
2063
a9342885
MP
20642017-01-04 Marek Polacek <polacek@redhat.com>
2065
2066 PR c++/64767
2067 * c-parser.c (c_parser_postfix_expression): Mark zero character
2068 constants by setting original_type in c_expr.
2069 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
2070 with a zero character constant.
2071 (char_type_p): New function.
2072
5dd9a9d0
DM
20732017-01-04 David Malcolm <dmalcolm@redhat.com>
2074
2075 * c-parser.c (c_parser_declaration_or_fndef): Create a
2076 rich_location at init_loc and parse it to start_init.
2077 (last_init_list_comma): New global.
2078 (c_parser_braced_init): Update last_init_list_comma when parsing
2079 commas. Pass it to pop_init_level. Pass location of closing
2080 brace to pop_init_level.
2081 (c_parser_postfix_expression_after_paren_type): Create a
2082 rich_location at type_loc and parse it to start_init.
2083 (c_parser_omp_declare_reduction): Likewise for loc.
2084 * c-tree.h (start_init): Add rich_location * param.
2085 (pop_init_level): Add location_t param.
2086 * c-typeck.c (struct initializer_stack): Add field
2087 "missing_brace_richloc".
2088 (start_init): Add richloc param, use it to initialize
2089 the stack node's missing_brace_richloc.
2090 (last_init_list_comma): New decl.
2091 (finish_implicit_inits): Pass last_init_list_comma to
2092 pop_init_level.
2093 (push_init_level): When finding missing open braces, add fix-it
2094 hints to the richloc.
2095 (pop_init_level): Add "insert_before" param and pass it
2096 when calling pop_init_level. Add fixits about missing
2097 close braces to any richloc. Use the richloc for the
2098 -Wmissing-braces warning.
2099 (set_designator): Pass last_init_list_comma to pop_init_level.
2100 (process_init_element): Likewise.
2101
cbe34bb5
JJ
21022017-01-01 Jakub Jelinek <jakub@redhat.com>
2103
2104 Update copyright years.
2105
d17680f3
JJ
21062016-12-21 Jakub Jelinek <jakub@redhat.com>
2107
0dba7960
JJ
2108 PR bootstrap/78817
2109 * c-typeck.c (build_function_call_vec): If check_function_arguments
2110 returns true, set TREE_NO_WARNING on CALL_EXPR.
2111
d17680f3
JJ
2112 PR c/77767
2113 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
2114 to *expr instead of overwriting it.
2115
aa90531e
RB
21162016-12-20 Richard Biener <rguenther@suse.de>
2117
2118 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
2119 error recovery.
2120 (c_parser_gimple_statement): Only build assigns for non-error
2121 stmts.
2122 (c_parser_gimple_postfix_expression_after): Improve error recovery.
2123
629b3d75
MJ
21242016-12-14 Martin Jambor <mjambor@suse.cz>
2125
2126 * c-parser.c: Include omp-general.h and omp-offload.h instead of
2127 omp-low.h.
2128 (c_finish_oacc_routine): Adjusted call to
2129 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
2130 to use their new names.
2131 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
2132 use its new name.
2133 (c_parser_oacc_update): Likewise.
2134 (c_parser_omp_simd): Likewise.
2135 (c_parser_omp_target_update): Likewise.
2136 * c-typeck.c: Include omp-general.h instead of omp-low.h.
2137 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
2138 name.
2139 (c_finish_omp_cancellation_point): Likewise.
2140 * gimple-parser.c: Do not include omp-low.h
2141
c5af52eb
CP
21422016-12-02 Cesar Philippidis <cesar@codesourcery.com>
2143 James Norris <jnorris@codesourcery.com>
2144
2145 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
2146 EXIT_DATA,WAIT} are not used in compound statements.
2147 (c_parser_oacc_enter_exit_data): Update diagnostics.
2148
48330c93
BE
21492016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2150
2151 PR c++/71973
2152 * c-decl.c (diagnose_mismatched_decls): Use
2153 OPT_Wbuiltin_declaration_mismatch here too.
2154
899ca90e 21552016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
2156 Alan Hayward <alan.hayward@arm.com>
2157 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
2158
2159 * c-decl.c (merge_decls): Use SET_DECL_MODE.
2160 (make_label, finish_struct): Likewise.
2161
1ee62b92 21622016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 2163 Richard Biener <rguenther@suse.de>
22b15758 2164
8e745a17
JJ
2165 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
2166 * config-lang.in (gtfiles): Add c/c-parser.h.
2167 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
2168 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
2169 * c-parser.c (enum c_id_kind, struct c_token,
2170 c_parser_next_token_is, c_parser_next_token_is_not,
2171 c_parser_next_token_is_keyword,
2172 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
2173 Split out to ...
2174 * c-parser.h: ... new header.
2175 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 2176 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
2177 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2178 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2179 c_parser_error, c_parser_require, c_parser_skip_until_found,
2180 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2181 c_parser_type_name): Export.
2182 (c_parser_tokens_buf): New function.
2183 (c_parser_error): Likewise.
2184 (c_parser_set_error): Likewise.
2185 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
2186 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
2187 via c_parser_parse_gimple_body.
8e745a17
JJ
2188 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
2189 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2190 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2191 c_parser_error, c_parser_require, c_parser_skip_until_found,
2192 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2193 c_parser_type_name): Declare.
1ee62b92
PG
2194 (struct c_parser): Declare forward.
2195 (c_parser_tokens_buf): Declare.
8e745a17
JJ
2196 (c_parser_error): Likewise.
2197 (c_parser_set_error): Likewise.
2198 * gimple-parser.c: New file.
2199 * gimple-parser.h: Likewise.
1ee62b92 2200
22b15758
UB
22012016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2202
2203 PR c/35503
2204 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2205 warn_for_restrict.
2206
84ff4775
LCW
22072016-09-11 Le-Chun Wu <lcwu@google.com>
2208 Mark Wielaard <mjw@redhat.com>
2209
2210 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
2211 to the given -Wshadow= variant.
2212
4d0cdd0c
TP
22132016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2214
2215 * c-typeck.c: Include memmodel.h.
2216
1202f33e
JJ
22172016-10-13 Jakub Jelinek <jakub@redhat.com>
2218
2219 PR target/77957
2220 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
2221 instead of lhd_return_null_tree_v.
2222
8a14afd0
BS
22232016-10-07 Bernd Schmidt <bschmidt@redhat.com>
2224
2225 PR c++/69733
2226 * c-decl.c (smallest_type_quals_location): New static function.
2227 (grokdeclarator): Try to find the correct location for an ignored
2228 qualifier.
2229
81fea426
MP
22302016-09-26 Marek Polacek <polacek@redhat.com>
2231
2232 PR c/7652
2233 * c-decl.c (pop_scope): Add gcc_fallthrough.
2234
22352016-09-26 Marek Polacek <polacek@redhat.com>
2236
2237 PR c/7652
2238 * c-parser.c (struct c_token): Add flags field.
2239 (c_lex_one_token): Pass it to c_lex_with_flags.
2240 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
2241 into IFN_FALLTHROUGH.
2242 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
2243 attribute fallthrough after a case label or default label.
2244 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
2245
9a2300e9
MP
22462016-09-24 Marek Polacek <polacek@redhat.com>
2247
2248 PR c/77490
2249 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
2250 have boolean value. Warn about ++/-- on booleans.
2251
7de76362
JJ
22522016-09-23 Jakub Jelinek <jakub@redhat.com>
2253
2254 * c-parser.c (incomplete_record_decls): Remove unnecessary
2255 = vNULL initialization of file scope vec.
2256
5b73d2ab
MP
22572016-09-16 Marek Polacek <polacek@redhat.com>
2258
2259 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
2260
e51fbec3
MP
22612016-09-14 Marek Polacek <polacek@redhat.com>
2262
2263 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
2264 (fix_array_notation_expr): Likewise.
2265 * c-decl.c (finish_decl): Likewise.
2266 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2267 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
2268 (function_to_pointer_conversion): Use false instead of 0.
2269 (convert_lvalue_to_rvalue): Likewise.
2270 (parser_build_unary_op): Likewise.
2271 (build_atomic_assign): Likewise.
2272 (build_unary_op): Change nonconvert parameter type to bool, use
2273 true/false instead of 1/0.
2274 (build_binary_op): Use true instead of 1.
2275
254830ba
DM
22762016-09-13 David Malcolm <dmalcolm@redhat.com>
2277
2278 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
2279 of add_fixit_insert to add_fixit_insert_before.
2280
4c13ba17
MP
22812016-09-13 Marek Polacek <polacek@redhat.com>
2282
2283 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
2284 it.
2285
54dcdb88
BE
22862016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
2287
2288 PR c++/77496
2289 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
2290 COMPOUND_EXPR to warn_for_omitted_condop.
2291
e5106e27
DM
22922016-09-07 David Malcolm <dmalcolm@redhat.com>
2293
2294 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
2295 c_get_substring_location for this new langhook.
2296
9dc5773f
JJ
22972016-09-02 Jakub Jelinek <jakub@redhat.com>
2298
2299 PR c/65467
2300 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
2301 flag_openmp.
2302 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
2303 instead of mark_exp_read on low_bound/length expression.
2304 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
2305 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2306 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2307 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
2308 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
2309 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
2310 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
2311 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
2312 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
2313 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
2314 instead of mark_expr_read.
2315 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
2316 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
2317 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
2318 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
2319 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
2320 array section bases outside of depend clause, for depend clause
2321 use convert_lvalue_to_rvalue on the base.
2322 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
2323 linear, aligned, map, to and from clauses.
2324 (c_omp_clause_copy_ctor): New function.
2325
295844f6
MP
23262016-09-01 Marek Polacek <polacek@redhat.com>
2327
2328 PR c/7652
2329 * c-typeck.c (composite_type): Add FALLTHRU comment.
2330
089af25c
DM
23312016-08-31 David Malcolm <dmalcolm@redhat.com>
2332
2333 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
2334 to the insertion fixits for "struct", "union", and "enum".
2335
f9087798
DM
23362016-08-30 David Malcolm <dmalcolm@redhat.com>
2337
2338 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
2339 rather than add_fixit_misspelled_id.
2340 (undeclared_variable): Likewise.
2341 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
2342 now-redundant "here" params from add_fixit_insert method calls.
2343 (c_parser_parameter_declaration): Likewise.
2344 * c-typeck.c (build_component_ref): Remove now-redundant range
2345 param from add_fixit_replace method calls.
2346
ebef225f
MP
23472016-08-25 Marek Polacek <polacek@redhat.com>
2348
2349 * c-typeck.c (parser_build_binary_op): Pass LHS to
2350 warn_logical_not_parentheses.
2351
fe377a48
MP
23522016-08-25 Marek Polacek <polacek@redhat.com>
2353
2354 PR c/77323
2355 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
2356 or _FloatN or _FloatNx is not supported.
2357 (finish_declspecs): Set type to integer_type_node when _FloatN or
2358 _FloatNx is not supported.
2359
c65699ef
JM
23602016-08-19 Joseph Myers <joseph@codesourcery.com>
2361
2362 PR c/32187
2363 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
2364 (struct c_declspecs): Add field floatn_nx_idx.
2365 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
2366 and _FloatNx type specifiers.
2367 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
2368 (c_parser_declspecs, c_parser_attribute_any_word)
2369 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
2370 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
2371 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
2372 narrower than double.
2373
2f1364c2
JJ
23742016-08-12 Jakub Jelinek <jakub@redhat.com>
2375 Martin Liska <mliska@suse.cz>
2376
2377 PR c/67410
2378 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
2379 % to determine val element to change. Assert that
2380 wchar_bytes * charwidth fits into val array.
2381
191816a3
MP
23822016-08-12 Marek Polacek <polacek@redhat.com>
2383
2384 PR c/7652
2385 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
2386 (c_parser_postfix_expression): Likewise.
2387 * c-typeck.c (build_unary_op): Adjust fall through comment.
2388 (c_mark_addressable): Likewise.
2389
b95a64bb
JJ
23902016-08-11 Jakub Jelinek <jakub@redhat.com>
2391
2392 PR c/72816
2393 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
2394 array member through typedef, for orig_qual_indirect == 0 clear
2395 orig_qual_type.
2396
895aa8e1
DM
23972016-08-08 David Malcolm <dmalcolm@redhat.com>
2398
2399 PR c/64955
2400 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
2401 this up to selftest::run_c_tests.
2402 (selftest::run_c_tests): New function.
2403
0b212d8c
TS
24042016-08-04 Thomas Schwinge <thomas@codesourcery.com>
2405
ae9281fc
TS
2406 * c-parser.c (struct oacc_routine_data): Add error_seen and
2407 fndecl_seen members.
2408 (c_finish_oacc_routine): Use these.
2409 (c_parser_declaration_or_fndef): Adjust.
2410 (c_parser_oacc_routine): Likewise. Support more C language
2411 constructs, and improve diagnostics. Move pragma context
2412 checking...
2413 (c_parser_pragma): ... here.
2414
0b212d8c
TS
2415 * c-parser.c (struct oacc_routine_data): New.
2416 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
2417 Simplify code.
2418 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
2419 declare target" attribute.
2420
76e2c821
JB
24212016-08-01 Jan Beulich <jbeulich@suse.com>
2422
2423 * c-fold.c (c_fully_fold_internal): Also emit shift count
2424 warnings for vector types.
2425 * c-typeck.c (build_binary_op): Likewise.
2426
f618a472
MP
24272016-07-29 Marek Polacek <polacek@redhat.com>
2428
2429 PR c/71742
2430 * c-decl.c (finish_struct): Rephrase an error message.
2431
efd0786f
MP
2432 PR c/71853
2433 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
2434 to error node for invalid code.
2435
e00dceaf
MP
2436 PR c/71573
2437 * c-decl.c (implicitly_declare): Return decl early not only for
2438 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
2439
673a107a
JJ
24402016-07-29 Jakub Jelinek <jakub@redhat.com>
2441
2442 PR c/71969
2443 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
2444 on GNU extern inline functions.
2445
a5b5c8b6
MP
24462016-07-29 Marek Polacek <polacek@redhat.com>
2447
2448 PR c/71583
2449 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
2450 check expr.value.
2451
e3fe09c1
UB
24522016-07-22 Uros Bizjak <ubizjak@gmail.com>
2453
2454 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
2455
7c8f7eaa
DM
24562016-07-20 David Malcolm <dmalcolm@redhat.com>
2457
2458 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
2459 spellcheck-tree.h
2460 (best_macro_match): Likewise, converting from a typedef to a
2461 subclass.
2462 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
2463 (lookup_name_fuzzy): Update for change of best_macro_match to a
2464 subclass with a ctor that calls cpp_forall_identifiers.
2465
de6a69ee
DM
24662016-07-20 David Malcolm <dmalcolm@redhat.com>
2467
2468 * c-decl.c (implicit_decl_warning): Update for conversion of
2469 return type of lookup_name_fuzzy to const char *.
2470 (undeclared_variable): Likewise.
2471 (lookup_name_fuzzy): Convert return type from tree to
2472 const char *.
2473 * c-parser.c (c_parser_declaration_or_fndef): Update for
2474 conversion of return type of lookup_name_fuzzy to const char *.
2475 (c_parser_parameter_declaration): Likewise.
2476
b1c9c068
CP
24772016-07-15 Cesar Philippidis <cesar@codesourcery.com>
2478
2479 * c-parser.c (c_parser_oacc_declare): Don't scan for
2480 GOMP_MAP_POINTER.
2481 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
2482 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
2483 zero-length subarrays.
2484
ddbbcb19
JJ
24852016-07-15 Jakub Jelinek <jakub@redhat.com>
2486
2487 PR c/71858
2488 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
2489 instead of FUZZY_LOOKUP_NAME.
2490 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
2491 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
2492
dd36b877
JJ
24932016-07-14 Jakub Jelinek <jakub@redhat.com>
2494
2495 PR c/71858
2496 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
2497
8c681247
TS
24982016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2499
2500 * c-parser.c (c_parser_generic_selection): Make type of variable
2501 auto_vec.
2502 (c_parser_omp_declare_simd): Likewise.
2503
bf4fa671
TS
25042016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2505
2506 * c-decl.c (struct c_struct_parse_info): Change member types
2507 from vec to auto_vec.
2508 (start_struct): Adjust.
2509 (finish_struct): Likewise.
2510
557e8c49
JJ
25112016-07-02 Jakub Jelinek <jakub@redhat.com>
2512
2513 PR c/71719
2514 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
2515
54d19c3b
TS
25162016-06-29 Thomas Schwinge <thomas@codesourcery.com>
2517
2518 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
2519 Move pragma context checking into...
2520 (c_parser_omp_cancellation_point): ... here, and improve
2521 diagnostic messages.
2522 * c-typeck.c (c_finish_omp_cancel)
2523 (c_finish_omp_cancellation_point): Improve diagnostic messages.
2524
152ef731
JJ
25252016-06-29 Jakub Jelinek <jakub@redhat.com>
2526
2527 PR c/71685
2528 * c-typeck.c (c_build_qualified_type): Don't clear
2529 C_TYPE_INCOMPLETE_VARS for the main variant.
2530
25312016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
2532
2533 PR c/71552
2534 * c-typeck.c (output_init_element): Diagnose incompatible types
2535 before non-constant initializers.
2536
e9ac1f86
JJ
25372016-06-28 Jakub Jelinek <jakub@redhat.com>
2538
2539 * Make-lang.in: Don't cat ../stage_current if it does not exist.
2540
277d7ee0
AK
25412016-06-23 Andi Kleen <ak@linux.intel.com>
2542
2543 * Make-lang.in: Add support for autofdo.
2544
1a4f11c8
DM
25452016-06-22 David Malcolm <dmalcolm@redhat.com>
2546
2547 PR c/70339
2548 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
2549 (implicit_decl_warning): When issuing warnings for implicit
2550 declarations, attempt to provide a suggestion via
2551 lookup_name_fuzzy.
2552 (undeclared_variable): Likewise when issuing errors.
2553 (lookup_name_in_scope): Likewise.
2554 (struct edit_distance_traits<cpp_hashnode *>): New struct.
2555 (best_macro_match): New typedef.
2556 (find_closest_macro_cpp_cb): New function.
2557 (lookup_name_fuzzy): New function.
2558 * c-parser.c: Include gcc-rich-location.h.
2559 (c_token_starts_typename): Split out case CPP_KEYWORD into...
2560 (c_keyword_starts_typename): ...this new function.
2561 (c_parser_declaration_or_fndef): When issuing errors about
2562 missing "struct" etc, add a fixit. For other kinds of errors,
2563 attempt to provide a suggestion via lookup_name_fuzzy.
2564 (c_parser_parms_declarator): When looking ahead to detect typos in
2565 type names, also reject CPP_KEYWORD.
2566 (c_parser_parameter_declaration): When issuing errors about
2567 unknown type names, attempt to provide a suggestion via
2568 lookup_name_fuzzy.
2569 * c-tree.h (c_keyword_starts_typename): New prototype.
2570
5a578671
JM
25712016-06-20 Joseph Myers <joseph@codesourcery.com>
2572
2573 PR c/71601
2574 * c-typeck.c (build_conditional_expr): Return error_mark_node if
2575 c_common_type returns error_mark_node.
2576
3f8257db 25772016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
2578
2579 PR c/69507
2580 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
2581 __alignof__ (expression).
2582
6a3f203c
DM
25832016-06-14 David Malcolm <dmalcolm@redhat.com>
2584
2585 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
2586
264757fb
DM
25872016-06-14 David Malcolm <dmalcolm@redhat.com>
2588
2589 * c-typeck.c (build_component_ref): Simplify fixit code by
2590 using gcc_rich_location::add_fixit_misspelled_id.
2591 (set_init_label): Likewise.
2592
f7e4f2e3
DM
25932016-06-13 David Malcolm <dmalcolm@redhat.com>
2594
2595 * c-parser.c (c_parser_initelt): Provide location of name for new
2596 location_t param of set_init_label.
2597 * c-tree.h (set_init_label): Add location_t param.
2598 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
2599 param and use it when issuing error messages about unrecognized
2600 field names. Attempt to provide a fixit hint if appropriate,
2601 otherwise update the error message to provide the type name.
2602
4b1ffdb1
TS
26032016-06-10 Thomas Schwinge <thomas@codesourcery.com>
2604
2605 PR c/71381
2606 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
2607 Loosen checking.
2608
44a845ca
MS
26092016-06-08 Martin Sebor <msebor@redhat.com>
2610 Jakub Jelinek <jakub@redhat.com>
2611
2612 PR c++/70507
2613 PR c/68120
2614 * c-typeck.c (convert_arguments): Don't promote last argument
2615 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2616
92a5f2ba
MP
26172016-06-08 Marek Polacek <polacek@redhat.com>
2618
2619 PR c/71418
2620 * c-decl.c (grokdeclarator): Check TYPE_P.
2621
08203f73
MP
2622 PR c/71426
2623 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
2624 code.
2625
6ffd47b7
DM
26262016-06-07 David Malcolm <dmalcolm@redhat.com>
2627
2628 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
2629 and structure element reference, capture the location of the
2630 element name token and pass it to build_component_ref.
2631 (c_parser_postfix_expression_after_primary): Likewise for
2632 structure element dereference.
2633 (c_parser_omp_variable_list): Likewise for
2634 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
2635 * c-tree.h (build_component_ref): Add location_t param.
2636 * c-typeck.c (build_component_ref): Add location_t param
2637 COMPONENT_LOC. Use it, if available, when issuing hints about
2638 mispelled member names to provide a fixit replacement hint.
2639
1f40cff3
MP
26402016-06-06 Marek Polacek <polacek@redhat.com>
2641
2642 PR c/71362
2643 * c-parser.c (c_parser_direct_declarator): Set location.
2644
5545a907
MP
26452016-06-06 Marek Polacek <polacek@redhat.com>
2646
2647 * c-typeck.c (comptypes_internal): Handle comparisons of
2648 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
2649 TYPE_REF_CAN_ALIAS_ALL.
2650
b605f663
CLT
26512016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
2652
2653 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
2654 arguments as addressable when async clause exists.
2655
00631022
JJ
26562016-05-30 Jakub Jelinek <jakub@redhat.com>
2657
2658 PR c++/71349
2659 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
2660 when combined with target construct.
2661
7211a097
JJ
26622016-05-26 Jakub Jelinek <jakub@redhat.com>
2663
2664 * c-parser.c (c_parser_omp_clause_schedule): Warn if
2665 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
2666
95efe6b6
MP
26672016-05-25 Marek Polacek <polacek@redhat.com>
2668
2669 PR c/71265
2670 * c-decl.c (c_make_fname_decl): Don't check seen_error.
2671
a23faf7a
MP
2672 PR c/71266
2673 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
2674
e46c7770
CP
26752016-05-24 Cesar Philippidis <cesar@codesourcery.com>
2676
2677 * c-parser.c (c_parser_oacc_declare): Add support for
2678 GOMP_MAP_FIRSTPRIVATE_POINTER.
2679 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
2680 argument with enum c_omp_region_type ort.
2681 (handle_omp_array_sections): Likewise. Update call to
2682 handle_omp_array_sections_1.
2683 (c_finish_omp_clauses): Add specific errors and warning messages for
2684 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
2685 call to handle_omp_array_sections.
2686
a04e69c0
TS
26872016-05-24 Thomas Schwinge <thomas@codesourcery.com>
2688
2689 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
2690
f17a223d
RB
26912016-05-24 Richard Biener <rguenther@suse.de>
2692
2693 PR middle-end/70434
2694 PR c/69504
2695 * c-typeck.c (build_array_ref): Do not complain about indexing
2696 non-lvalue vectors. Adjust for function name change.
2697
79063edd
MS
26982016-05-20 Martin Sebor <msebor@redhat.com>
2699
2700 PR c/71115
2701 * c-typeck.c (error_init): Use
2702 expansion_point_location_if_in_system_header.
2703 (warning_init): Same.
2704
8a40fef3
DM
27052016-05-19 David Malcolm <dmalcolm@redhat.com>
2706
2707 PR c/71171
2708 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
2709 in error-handling.
2710 (c_parser_postfix_expression): Likewise.
2711 * c-tree.h (c_expr::set_error): New method.
2712 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
2713 that result's range is initialized.
2714
e9892350
JG
27152016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
2716
2717 * c-typeck.c (parser_build_unary_op): Fix formatting.
2718
8fad45f5
MW
27192016-05-16 Matthew Wahab <matthew.wahab@arm.com>
2720
2721 * c-decl.c (grokdeclarator): Remove errmsg and use of
2722 targetm.invalid_return_type.
2723 (grokparms): Remove errmsg and use of
2724 targetm.invalid_parameter_type.
2725
aa4b467b
JM
27262016-05-13 Joseph Myers <joseph@codesourcery.com>
2727
2728 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2729 function return type.
2730
4f2e1536
MP
27312016-05-12 Marek Polacek <polacek@redhat.com>
2732
2733 PR c/70756
2734 * c-decl.c (build_compound_literal): Pass LOC down to
2735 c_incomplete_type_error.
2736 * c-tree.h (require_complete_type): Adjust declaration.
2737 (c_incomplete_type_error): Likewise.
2738 * c-typeck.c (require_complete_type): Add location parameter, pass it
2739 down to c_incomplete_type_error.
2740 (c_incomplete_type_error): Add location parameter, pass it down to
2741 error_at.
2742 (build_component_ref): Pass location down to c_incomplete_type_error.
2743 (default_conversion): Pass location down to require_complete_type.
2744 (build_array_ref): Likewise.
2745 (build_function_call_vec): Likewise.
2746 (convert_arguments): Likewise.
2747 (build_unary_op): Likewise.
2748 (build_c_cast): Likewise.
2749 (build_modify_expr): Likewise.
2750 (convert_for_assignment): Likewise.
2751 (c_finish_omp_clauses): Likewise.
2752
d6e83a8d
MM
27532016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2754
2755 PR c/43651
2756 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
2757 is enabled.
2758 * c-errors.c (pedwarn_c90): Return true if warned.
2759 * c-tree.h (pedwarn_c90): Change return type to bool.
2760 (enum c_declspec_word): Add new enumerator cdw_atomic.
2761
5c3a10fb
MP
27622016-05-11 Marek Polacek <polacek@redhat.com>
2763
2764 PR c++/71024
2765 * c-decl.c (diagnose_mismatched_decls): Factor out code to
2766 diagnose_mismatched_attributes and call it.
2767
cf68d92c
MP
27682016-05-10 Marek Polacek <polacek@redhat.com>
2769
2770 PR c/70255
2771 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2772 on a declaration following the definition.
2773
351f85c5
JJ
27742016-05-05 Jakub Jelinek <jakub@redhat.com>
2775
2776 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2777 parse it through to c_parser_c99_block_statement.
2778 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2779 caller.
2780
deef7113
MP
27812016-05-04 Marek Polacek <polacek@redhat.com>
2782
2783 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2784 OPT_Wdangling_else.
2785
de55efd5
MP
27862016-05-04 Marek Polacek <polacek@redhat.com>
2787
2788 PR c/48778
2789 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2790 for macro expansions.
2791
79ce98bc
MP
27922016-05-03 Marek Polacek <polacek@redhat.com>
2793
2794 PR c/70859
2795 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
2796 check_builtin_function_arguments.
2797
fb2647aa
RB
27982016-05-03 Richard Biener <rguenther@suse.de>
2799
2800 * Make-lang.in (cc1-checksum.c): For stage-final re-use
2801 the checksum from the previous stage.
2802
77886428
CP
28032016-05-02 Cesar Philippidis <cesar@codesourcery.com>
2804
2805 * c-parser.c (c_parser_oacc_all_clauses): Update call to
2806 c_finish_omp_clauses.
2807 (c_parser_omp_all_clauses): Likewise.
2808 (c_parser_oacc_cache): Likewise.
2809 (c_parser_oacc_loop): Likewise.
2810 (omp_split_clauses): Likewise.
2811 (c_parser_omp_declare_target): Likewise.
2812 (c_parser_cilk_all_clauses): Likewise.
2813 (c_parser_cilk_for): Likewise.
2814 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
2815 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2816
7176a4a0
MP
28172016-05-02 Marek Polacek <polacek@redhat.com>
2818
2819 PR c/70851
2820 * c-decl.c (grokdeclarator): Diagnose when array's size has an
2821 incomplete type.
2822
e7ff0319
CP
28232016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2824
2825 PR middle-end/70626
2826 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
2827 OACC_LOOP_CLAUSE_MASK.
2828 (c_parser_oacc_kernels_parallel): Update call to
2829 c_oacc_split_loop_clauses.
2830
9f405ce1
AM
28312016-04-28 Andrew MacLeod <amacleod@redhat.com>
2832
2833 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
2834 argument to build_modify_expr in two cases.
2835
c1e1f433
BS
28362016-04-27 Bernd Schmidt <bschmidt@redhat.com>
2837
2838 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2839 warn_for_memset instead of warning directly here.
2840
2448a956
MP
28412016-04-26 Marek Polacek <polacek@redhat.com>
2842
2843 PR c/67784
2844 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2845 out of ...
2846 (c_parser_for_statement): ... here.
2847 (c_parser_if_statement): Use it.
2848 (c_parser_switch_statement): Use it.
2849 (c_parser_while_statement): Use it.
2850
b02a5e26
MP
2851 PR c/70791
2852 * c-decl.c (pushdecl): Pass LOCUS down to warning.
2853
477d4906
IV
28542016-04-20 Ilya Verbin <ilya.verbin@intel.com>
2855
2856 PR c++/69363
2857 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2858 instead of c_finish_cilk_clauses.
2859 * c-tree.h (c_finish_omp_clauses): Add new default argument.
2860 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
2861 floating-point variables in the linear clause for Cilk Plus.
2862
fe37c7af
MM
28632016-04-18 Michael Matz <matz@suse.de>
2864
2865 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2866 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2867
949505a9
MP
28682016-04-15 Marek Polacek <polacek@redhat.com>
2869
2870 PR c/70671
2871 * c-typeck.c (build_unary_op): Pass location down to error and
2872 warning call.
2873
dda1bf61
JJ
28742016-04-15 Jakub Jelinek <jakub@redhat.com>
2875
2876 PR c/70436
2877 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2878 where needed.
2879 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2880 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2881 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2882 Adjust c_parser_pragma callers.
2883 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
2884 caller.
2885 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2886 c_parser_statement.
2887 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2888 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2889 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2890 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2891 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2892 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2893 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2894 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2895 down where needed.
2896 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
2897 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2898 calls.
2899
99cd9857
MP
29002016-04-13 Marek Polacek <polacek@redhat.com>
2901
2902 PR c/70436
2903 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2904 adjust callers.
2905 (c_parser_statement): Likewise.
2906 (c_parser_c99_block_statement): Likewise.
2907 (c_parser_while_statement): Likewise.
2908 (c_parser_for_statement): Likewise.
2909 (c_parser_if_body): Don't set IF_P here.
2910 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
2911 about dangling else here.
2912 * c-tree.h (c_finish_if_stmt): Adjust declaration.
2913 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
2914 warn about dangling else here.
2915
f13355da
MP
29162016-04-04 Marek Polacek <polacek@redhat.com>
2917
2918 PR c/70307
2919 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2920
5fde6a45
MP
29212016-03-31 Marek Polacek <polacek@redhat.com>
2922
2923 PR c/70297
2924 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2925
4bbf545b
DM
29262016-03-18 David Malcolm <dmalcolm@redhat.com>
2927
2928 PR c/70281
2929 * c-parser.c (c_parser_postfix_expression): Set the source range
2930 for uses of "__builtin_types_compatible_p".
2931
fcc2b74f
JJ
29322016-03-17 Jakub Jelinek <jakub@redhat.com>
2933
2934 PR c/70280
2935 * c-typeck.c (composite_type): Don't count void_list_node
2936 into len, if the list is terminated by void_list_node, start
2937 with void_list_node instead of NULL for newargs. Stop
2938 at void_list_node.
2939
ab4c578f
MP
29402016-03-16 Marek Polacek <polacek@redhat.com>
2941
2942 PR c/70093
2943 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2944 nested functions returning VM types.
2945
96b3c82d
CP
29462016-03-09 Cesar Philippidis <cesar@codesourcery.com>
2947
2948 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2949 when calling c_finish_omp_clauses.
2950
29b9828f
BS
29512016-03-04 Bernd Schmidt <bschmidt@redhat.com>
2952
2953 PR c/69824
2954 * c-decl.c (get_parm_info): Don't queue implicit function declarations
2955 for later.
2956
7ff6ca38
MP
29572016-03-04 Marek Polacek <polacek@redhat.com>
2958
2959 PR c/69798
2960 * c-parser.c (c_parser_postfix_expression): Call
2961 c_parser_cast_expression rather than c_parser_postfix_expression.
2962
686e2237
JJ
29632016-03-01 Jakub Jelinek <jakub@redhat.com>
2964
2965 PR c/69796
2966 PR c/69974
2967 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2968 of incomplete decls to error_mark_node.
2969
0b05329b
MP
29702016-02-24 Marek Polacek <polacek@redhat.com>
2971
2972 PR c/69819
2973 * c-decl.c (finish_decl): Don't update the copy of the type of a
2974 different decl type.
2975
067fbd8b
JJ
29762016-02-23 Jakub Jelinek <jakub@redhat.com>
2977
2978 PR objc/69844
2979 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2980 in id_kind reclassification.
2981
bf14eba2
JJ
29822016-02-16 Jakub Jelinek <jakub@redhat.com>
2983
2984 PR c/69835
2985 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2986
ba539195
JN
29872016-02-16 James Norris <jnorris@codesourcery.com>
2988
2989 PR c/64748
2990 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2991
16595a1f
BS
29922016-02-12 Bernd Schmidt <bschmidt@redhat.com>
2993
f48dfe98
BS
2994 * c-decl.c (build_null_declspecs): Zero the entire struct.
2995
16595a1f
BS
2996 PR c/69522
2997 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
2998 callers changed. If nested_p is true, use it to call
2999 finish_implicit_inits.
3000 * c-tree.h (finish_implicit_inits): Declare.
3001 * c-typeck.c (finish_implicit_inits): New function. Move code
3002 from ...
3003 (push_init_level): ... here.
3004 (set_designator, process_init_element): Call finish_implicit_inits.
3005
66756373
JJ
30062016-02-11 Jakub Jelinek <jakub@redhat.com>
3007
3008 PR c/69768
3009 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
3010 arguments for -Waddress warning.
3011
1066e9b5
JJ
30122016-02-04 Jakub Jelinek <jakub@redhat.com>
3013
3014 PR c/69669
3015 * c-decl.c (finish_enum): When honoring mode attribute,
3016 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
3017
3a5d2ba4
JJ
30182016-01-29 Jakub Jelinek <jakub@redhat.com>
3019
3020 PR debug/69518
3021 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
3022 all type variants, not just TYPE_MAIN_VARIANT.
3023
cbdd8ae0
JJ
30242016-01-27 Jakub Jelinek <jakub@redhat.com>
3025
3026 PR debug/66869
3027 * c-decl.c (c_write_global_declarations_1): Warn with
3028 warn_unused_function if static prototype without definition
3029 is not C_DECL_USED.
3030
fa74a4bc
MP
30312016-01-27 Marek Polacek <polacek@redhat.com>
3032
3033 PR c/68062
3034 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
3035 to unsigned, if needed. Add -Wsign-compare warning.
3036
13f92e8d
JJ
30372016-01-26 Jakub Jelinek <jakub@redhat.com>
3038
3039 PR tree-optimization/69483
3040 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
3041
cd8e73dc 30422016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
3043
3044 PR c/24293
3045 * c-tree.h (incomplete_record_decls): Declare.
3046 * c-parser.c (incomplete_record_decls): Define.
3047 (c_parser_translation_unit): Iterate through incomplete_record_decls and
3048 report error if any decl has zero size.
3049 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
3050 or enum type to incomplete_record_decls.
3051
e6d6ec9e
TV
30522016-01-14 Tom de Vries <tom@codesourcery.com>
3053
3054 PR tree-optimization/68773
3055 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
3056 set force_output.
3057
00083992
MP
30582016-01-14 Marek Polacek <polacek@redhat.com>
3059
3060 PR c/69262
3061 * c-decl.c (grokdeclarator): Provide more information for invalid
3062 array declarations.
3063
7443cf13
DM
30642016-01-06 David Malcolm <dmalcolm@redhat.com>
3065
3066 * c-parser.c (c_parser_unary_expression): For dereferences, build
3067 a combined location before calling build_indirect_ref, so that
3068 error reports cover the full range, manually updating the c_expr
3069 src_range.
3070
6b131d5b
MP
30712016-01-06 Marek Polacek <polacek@redhat.com>
3072
3073 PR sanitizer/69099
3074 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
3075 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
3076 NULL.
3077
818ab71a
JJ
30782016-01-04 Jakub Jelinek <jakub@redhat.com>
3079
3080 Update copyright years.
3081
2fe0a208
MP
30822016-01-04 Marek Polacek <polacek@redhat.com>
3083
3084 PR c/68908
3085 * c-typeck.c (build_atomic_assign): Improve commentary. Add
3086 optimization to use __atomic_fetch_* built-in if possible.
3087
c7b48c8a
TS
30882015-12-23 Thomas Schwinge <thomas@codesourcery.com>
3089
3090 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
3091 into...
3092 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
3093 all users.
3094
fda5652f
MP
30952015-12-22 Marek Polacek <polacek@redhat.com>
3096
3097 PR c/69002
3098 * c-typeck.c (build_component_ref): Warn when acessing elements of
3099 atomic structures or unions.
3100
745e411d
DM
31012015-12-21 David Malcolm <dmalcolm@redhat.com>
3102
3103 * c-typeck.c: Include "gcc-rich-location.h".
3104 (build_binary_op): In the two places that call binary_op_error,
3105 create a gcc_rich_location and populate it with the location of
3106 the binary op and its two operands.
3107
94c40e19
DM
31082015-12-16 David Malcolm <dmalcolm@redhat.com>
3109
3110 * c-parser.c (c_parser_statement_after_labels): When calling
3111 c_finish_return, Use the return expression's location if it has
3112 one, falling back to the location of the first token within it.
3113 * c-typeck.c (c_finish_return): When issuing warnings about
3114 the incorrect presence/absence of a return value, issue a note
3115 showing the declaration of the function.
3116
de67c4c3
DM
31172015-12-16 David Malcolm <dmalcolm@redhat.com>
3118
3119 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
3120 to 4.
3121 (c_parser_peek_nth_token): New function.
3122 (c_parser_peek_conflict_marker): New function.
3123 (c_parser_error): Detect conflict markers and report them as such.
3124
a10704e1
DM
31252015-12-16 David Malcolm <dmalcolm@redhat.com>
3126
3127 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
3128 to preserve range information for the primary expression
3129 in the call to c_parser_postfix_expression_after_primary.
3130
8062bca6
DM
31312015-12-16 David Malcolm <dmalcolm@redhat.com>
3132
3133 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
3134 expression location, falling back on the first token location,
3135 rather than always using the latter.
3136
d06f8b75
MP
31372015-12-16 Marek Polacek <polacek@redhat.com>
3138
3139 PR c/64637
3140 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
3141 available.
3142
2994fb91
MP
31432015-12-15 Marek Polacek <polacek@redhat.com>
3144
3145 PR c/68907
3146 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
3147 artificial decl.
3148
a1b93f8d
DM
31492015-12-08 David Malcolm <dmalcolm@redhat.com>
3150
3151 * c-parser.c (c_parser_alignof_expression): Capture location of
3152 closing parenthesis (if any), or of end of unary expression, and
3153 use it to build a src_range for the expression.
3154
46c6e1e2
DM
31552015-12-08 David Malcolm <dmalcolm@redhat.com>
3156
3157 PR c/68757
3158 * c-parser.c (c_parser_get_builtin_args): Add
3159 "out_close_paren_loc" param, and write back to it.
3160 (c_parser_postfix_expression): Capture the closing
3161 parenthesis location for RID_CHOOSE_EXPR,
3162 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
3163 RID_BUILTIN_SHUFFLE and use it to set the source range
3164 for such expressions; within RID_BUILTIN_COMPLEX set
3165 the underlying location.
3166
66189108
MP
31672015-12-07 Marek Polacek <polacek@redhat.com>
3168
3169 PR c/68668
3170 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
3171 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
3172
f187980b
EB
31732015-12-04 Eric Botcazou <ebotcazou@adacore.com>
3174
3175 * c-tree.h (c_build_va_arg): Adjust prototype.
3176 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
3177 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
3178 parameter, adjust throughout and issue an error if EXPR is a component
3179 with reverse storage order.
3180
4250754e
JM
31812015-12-02 Jason Merrill <jason@redhat.com>
3182
3183 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
3184 (c_fully_fold_internal, decl_constant_value_for_optimization):
3185 Move from c-common.c.
3186 * c-tree.h: Declare decl_constant_value_for_optimization.
3187 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
3188
e9e32ee6
JM
31892015-12-02 Joseph Myers <joseph@codesourcery.com>
3190
3191 PR c/68162
3192 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
3193 following link from declarator to next declarator. Track original
3194 qualified type and pass it to c_build_qualified_type.
3195 * c-typeck.c (c_build_qualified_type): Add arguments
3196 orig_qual_type and orig_qual_indirect.
3197
ff7a55bf
TS
31982015-12-02 Thomas Schwinge <thomas@codesourcery.com>
3199
3200 * c-parser.c (c_parser_omp_clause_name)
3201 (c_parser_oacc_all_clauses): Alphabetical sorting.
3202
657e4e47
JJ
32032015-12-02 Jakub Jelinek <jakub@redhat.com>
3204
3205 PR c/68533
3206 * c-decl.c (get_parm_info): Use b->locus instead of input_location
3207 for diagnostics.
3208
37d5ad46
JB
32092015-12-01 Julian Brown <julian@codesourcery.com>
3210 Cesar Philippidis <cesar@codesourcery.com>
3211 James Norris <James_Norris@mentor.com>
3212
3213 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
3214 (c_parser_oacc_clause_use_device): New function.
3215 (c_parser_oacc_all_clauses): Add use_device support.
3216 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
3217 (c_parser_oacc_host_data): New function.
3218 (c_parser_omp_construct): Add host_data support.
3219 * c-tree.h (c_finish_oacc_host_data): Add prototype.
3220 * c-typeck.c (c_finish_oacc_host_data): New function.
3221 (c_finish_omp_clauses): Add use_device support.
3222
a4850ce9
JH
32232015-11-29 Jan Hubicka <hubicka@ucw.cz>
3224
3225 PR c/67106
3226 * c-decl.c: Set TYPE_PACKED in variants.
3227
b58d3df2
ML
32282015-11-27 Martin Liska <mliska@suse.cz>
3229
3230 PR c++/68312
3231 * c-array-notation.c (fix_builtin_array_notation_fn):
3232 Use release_vec_vec instead of vec::release.
3233 (build_array_notation_expr): Likewise.
3234 (fix_conditional_array_notations_1): Likewise.
3235 (fix_array_notation_expr): Likewise.
3236 (fix_array_notation_call_expr): Likewise.
3237
aec17bfe
JJ
32382015-11-27 Jakub Jelinek <jakub@redhat.com>
3239
3240 PR c/63326
3241 * c-parser.c (c_parser_compound_statement_nostart): If
3242 last_label is true, use pragma_stmt instead of pragma_compound
3243 as second c_parser_pragma argument.
3244 (c_parser_omp_ordered, c_parser_omp_target_update,
3245 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
3246 false as second argument to c_parser_skip_to_pragma_eol after
3247 diagnosing standalone directives used in pragma_stmt context.
3248
688c4de0
IV
32492015-11-24 Ilya Verbin <ilya.verbin@intel.com>
3250
3251 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
3252 with "if (ENABLE_OFFLOADING)".
3253
cbd03aee
DM
32542015-11-23 David Malcolm <dmalcolm@redhat.com>
3255
3256 PR objc/68438
3257 * c-parser.c (c_parser_postfix_expression): Set up source ranges
3258 for various Objective-C constructs: Class.name syntax,
3259 @selector(), @protocol(), @encode(), and [] message syntax.
3260
a87a86e1
DM
32612015-11-20 David Malcolm <dmalcolm@redhat.com>
3262
3263 PR 62314
3264 * c-typeck.c (should_suggest_deref_p): New function.
3265 (build_component_ref): Special-case POINTER_TYPE when
3266 generating a "not a structure of union" error message, and
3267 suggest a "->" rather than a ".", providing a fix-it hint.
3268
8ece8dfb
DM
32692015-11-19 David Malcolm <dmalcolm@redhat.com>
3270
3271 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
3272 candidate into a new function, find_closest_identifier.
3273
433068cc
MP
32742015-11-19 Marek Polacek <polacek@redhat.com>
3275
3276 PR c/68412
3277 * c-typeck.c (parser_build_binary_op): Properly handle
3278 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
3279
bef08b71
DM
32802015-11-17 David Malcolm <dmalcolm@redhat.com>
3281
3282 * c-parser.c (set_c_expr_source_range): Bulletproof both
3283 overloaded implementations against NULL expr->value.
3284 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
3285 values.
3286 (c_parser_unary_expression): Likewise when handling addresses of
3287 labels.
3288 (c_parser_postfix_expression): Likewise for statement expressions,
3289 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
3290 __builtin_va_arg, and for __builtin_offset_of.
3291 (c_parser_postfix_expression_after_paren_type): Initialize expr's
3292 src_range using the range of the braced initializer.
3293 (c_parser_transaction_expression): Set src_range for "ret" to a
3294 sane pair of values.
3295
fff77217
KY
32962015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
3297
3298 * c-parser.c (c_finish_omp_declare_simd): Look for
3299 "simd" attribute as well. Update error message.
3300
1d899da2
TS
33012015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3302
3303 * c-parser.c (c_parser_omp_declare_target): Adjust.
3304
e4606348
JJ
33052015-11-14 Jakub Jelinek <jakub@redhat.com>
3306
3307 * c-typeck.c (c_finish_omp_clauses): Don't mark
3308 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
3309
3e636daf
MP
33102015-11-14 Marek Polacek <polacek@redhat.com>
3311
3312 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
3313 * c-typeck.c: Likewise.
3314
ebedc9a3
DM
33152015-11-13 David Malcolm <dmalcolm@redhat.com>
3316
3317 * c-decl.c (warn_defaults_to): Pass line_table to
3318 rich_location ctor.
3319 * c-errors.c (pedwarn_c99): Likewise.
3320 (pedwarn_c90): Likewise.
3321 * c-parser.c (set_c_expr_source_range): New functions.
3322 (c_token::get_range): New method.
3323 (c_token::get_finish): New method.
3324 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
3325 based on the range from the start of the LHS to the end of the
3326 RHS.
3327 (c_parser_conditional_expression): Likewise, based on the range
3328 from the start of the cond.value to the end of exp2.value.
3329 (c_parser_binary_expression): Call set_c_expr_source_range on
3330 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
3331 (c_parser_cast_expression): Call set_c_expr_source_range on ret
3332 based on the cast_loc through to the end of the expr.
3333 (c_parser_unary_expression): Likewise, based on the
3334 op_loc through to the end of op.
3335 (c_parser_sizeof_expression) Likewise, based on the start of the
3336 sizeof token through to either the closing paren or the end of
3337 expr.
3338 (c_parser_postfix_expression): Likewise, using the token range,
3339 or from the open paren through to the close paren for
3340 parenthesized expressions.
3341 (c_parser_postfix_expression_after_primary): Likewise, for
3342 various kinds of expression.
3343 * c-tree.h (struct c_expr): Add field "src_range".
3344 (c_expr::get_start): New method.
3345 (c_expr::get_finish): New method.
3346 (set_c_expr_source_range): New decls.
3347 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
3348 on ret for prefix unary ops.
3349 (parser_build_binary_op): Likewise, running from the start of
3350 arg1.value through to the end of arg2.value.
3351
ec8b536f
MP
33522015-11-13 Marek Polacek <polacek@redhat.com>
3353
3354 PR c/68320
3355 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
3356
277fe616
DM
33572015-11-13 David Malcolm <dmalcolm@redhat.com>
3358
3359 * c-typeck.c: Include spellcheck.h.
3360 (lookup_field_fuzzy_find_candidates): New function.
3361 (lookup_field_fuzzy): New function.
3362 (build_component_ref): If the field was not found, try using
3363 lookup_field_fuzzy and potentially offer a suggestion.
3364
6e232ba4
JN
33652015-11-12 James Norris <jnorris@codesourcery.com>
3366 Joseph Myers <joseph@codesourcery.com>
3367
3368 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
3369 (c_parser_omp_clause_name): Handle 'device_resident' clause.
3370 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3371 and PRAGMA_OMP_CLAUSE_LINK.
3372 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3373 and PRAGMA_OACC_CLAUSE_LINK.
3374 (OACC_DECLARE_CLAUSE_MASK): New definition.
3375 (c_parser_oacc_declare): New function.
3376
9be4f715
MP
33772015-11-12 Marek Polacek <polacek@redhat.com>
3378
3379 PR c/67784
3380 * c-parser.c (c_parser_for_statement): Reclassify the token in
3381 a correct scope.
3382
e78bede6
MP
33832015-11-11 Marek Polacek <polacek@redhat.com>
3384
3385 PR c/68107
3386 PR c++/68266
3387 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
3388 checking the size of an array.
3389
69f293c9
AM
33902015-11-11 Andrew MacLeod <amacleod@redhat.com>
3391
3392 * c-array-notation.c: Remove unused header files.
3393 * c-aux-info.c: Likewise.
3394 * c-convert.c: Likewise.
3395 * c-decl.c: Likewise.
3396 * c-errors.c: Likewise.
3397 * c-lang.c: Likewise.
3398 * c-objc-common.c: Likewise.
3399 * c-parser.c: Likewise.
3400 * c-typeck.c: Likewise.
3401 * gccspec.c: Likewise.
3402
3a40d81d
NS
34032015-11-09 Thomas Schwinge <thomas@codesourcery.com>
3404 Cesar Philippidis <cesar@codesourcery.com>
3405 James Norris <jnorris@codesourcery.com>
3406 Julian Brown <julian@codesourcery.com>
3407 Nathan Sidwell <nathan@codesourcery.com>
3408
3409 c/
3410 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
3411 routine arg.
3412 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
3413 (c_parser_pragma): Parse 'acc routine'.
3414 (OACC_ROUTINE_CLAUSE_MARK): Define.
3415 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
3416
fc402eec
AA
34172015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3418
3419 PR debug/67192
3420 * c-typeck.c (c_finish_loop): For unconditional loops, set the
3421 location of the backward-goto to the start of the loop body.
3422
f6b0b3db
AA
34232015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3424
3425 PR debug/67192
3426 * c-parser.c (c_parser_while_statement): Finish the loop before
3427 parsing ahead for misleading indentation.
3428 (c_parser_for_statement): Likewise.
3429
ee45a32d
EB
34302015-11-08 Eric Botcazou <ebotcazou@adacore.com>
3431
3432 * c-decl.c (finish_struct): If the structure has reverse storage
3433 order, rewrite the type of array fields with scalar component. Call
3434 maybe_apply_pragma_scalar_storage_order on entry.
3435 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
3436 errors on bit-fields and reverse SSO here and not...
3437 (c_mark_addressable): ...here.
3438 (output_init_element): Adjust call to initializer_constant_valid_p.
3439 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
3440
8a645150
DM
34412015-11-06 David Malcolm <dmalcolm@redhat.com>
3442
3443 * c-decl.c (warn_defaults_to): Update for change in signature
3444 of diagnostic_set_info.
3445 * c-errors.c (pedwarn_c99): Likewise.
3446 (pedwarn_c90): Likewise.
3447 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
3448 for textinfo::set_location.
3449
7a5e4956
CP
34502015-11-05 Cesar Philippidis <cesar@codesourcery.com>
3451 Thomas Schwinge <thomas@codesourcery.com>
3452 James Norris <jnorris@codesourcery.com>
3453
3454 * c-parser.c (c_parser_omp_clause_name): Add support for
3455 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
3456 (c_parser_omp_clause_default): Add is_oacc argument. Handle
3457 default(none) in OpenACC.
3458 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
3459 arguments.
3460 (c_parser_oacc_clause_tile): New function.
3461 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
3462 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
3463 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
3464 TILE}.
3465 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
3466 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
3467 FIRSTPRIVATE}.
3468 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
3469 (c_parser_oacc_update): Update the error message for missing clauses.
3470 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
3471 and OMP_CLAUSE_INDEPENDENT.
3472
bfcfbfa0
MP
34732015-11-05 Marek Polacek <polacek@redhat.com>
3474
3475 PR c/68090
3476 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
3477 deal with pre-evaluation on invalid types.
3478
e01d41e5
JJ
34792015-11-05 Jakub Jelinek <jakub@redhat.com>
3480 Ilya Verbin <ilya.verbin@intel.com>
3481
3482 * c-parser.c: Include context.h and gimple-expr.h.
3483 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
3484 monotonic together with nonmonotonic.
3485 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
3486 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
3487 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
3488 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
3489 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
3490 expressions on combined target teams before the target.
3491 (c_parser_omp_declare_target): If decl has "omp declare target" or
3492 "omp declare target link" attribute, and cgraph or varpool node already
3493 exists, then set corresponding flags. Call c_finish_omp_clauses
3494 in the parenthesized extended-list syntax case.
3495 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
3496 declare target.
3497 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
3498 on OMP_CLAUSE_REDUCTION array sections.
3499 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
3500 into the constant offset, or for variable low-bound using
3501 POINTER_PLUS_EXPR. For structure element based array sections use
3502 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
3503 (c_finish_omp_clauses): Drop generic_field_head, structure
3504 elements are now always mapped even as array section bases,
3505 diagnose same var in data sharing and mapping clauses. Diagnose if
3506 linear step on declare simd is neither a constant nor a uniform
3507 parameter. Look through POINTER_PLUS_EXPR for array section
3508 reductions. Diagnose the same var or function appearing multiple
3509 times on the same directive. Fix up wording for the to clause if t
3510 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
3511 modifier on kinds other than dynamic or guided or nonmonotonic
3512 modifier together with ordered clause.
3513
4bf9e5a8
TS
35142015-11-03 Thomas Schwinge <thomas@codesourcery.com>
3515 Chung-Lin Tang <cltang@codesourcery.com>
3516
3517 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
3518
2adfab87
AM
35192015-10-29 Andrew MacLeod <amacleod@redhat.com>
3520
3521 * c-array-notation.c: Reorder #include's and remove duplicates.
3522 * c-aux-info.c: Likewise.
3523 * c-convert.c: Likewise.
3524 * c-decl.c: Likewise.
3525 * c-errors.c: Likewise.
3526 * c-lang.c: Likewise.
3527 * c-objc-common.c: Likewise.
3528 * c-parser.c: Likewise.
3529 * c-typeck.c: Likewise.
3530
e922069e
JW
35312015-10-26 Jim Wilson <jim.wilson@linaro.org>
3532
3533 PR debug/66068
3534 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
3535 after calling build_qualified_type.
3536
765dd391
CP
35372015-10-27 Cesar Philippidis <cesar@codesourcery.com>
3538 Thomas Schwinge <thomas@codesourcery.com>
3539 James Norris <jnorris@codesourcery.com>
3540 Joseph Myers <joseph@codesourcery.com>
3541 Julian Brown <julian@codesourcery.com>
3542 Bernd Schmidt <bschmidt@redhat.com>
3543
3544 * c-parser.c (c_parser_oacc_shape_clause): New.
3545 (c_parser_oacc_simple_clause): New.
3546 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
3547 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
3548
88bae6f4
TS
35492015-10-27 Thomas Schwinge <thomas@codesourcery.com>
3550 James Norris <jnorris@codesourcery.com>
3551 Cesar Philippidis <cesar@codesourcery.com>
3552
3553 PR c/64765
3554 PR c/64880
3555 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
3556 parameters, and handle these. Adjust all users.
3557 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
3558 into...
3559 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
3560 all users.
3561 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
3562 declare functions.
3563 (c_finish_omp_construct): Declare function.
3564 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
3565 Merge functions into...
3566 (c_finish_omp_construct): ... this new function.
3567
a8fc2579
RB
35682015-10-22 Richard Biener <rguenther@suse.de>
3569
3570 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
3571 before folding a MINUS_EXPR.
3572
e9122ef6
MP
35732015-10-21 Marek Polacek <polacek@redhat.com>
3574
3575 PR c/68024
3576 * c-decl.c (start_function): Warn about vararg functions without
3577 a prototype.
3578
9f47c7e5
IE
35792015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
3580
3581 * c-typeck.c (build_conditional_expr): Use boolean vector
3582 type for vector comparison.
3583 (build_vec_cmp): New.
3584 (build_binary_op): Use build_vec_cmp for comparison.
3585
fa60eeb9
MP
35862015-10-20 Marek Polacek <polacek@redhat.com>
3587
3588 * c-parser.c (is_cilkplus_vector_p): Don't define here.
3589
2c7020eb
MP
35902015-10-20 Marek Polacek <polacek@redhat.com>
3591
3592 PR c/67964
3593 * c-parser.c (c_parser_attributes): Break out of the loop if the
3594 token after an attribute isn't a comma.
3595
d9a6bd32
JJ
35962015-10-13 Jakub Jelinek <jakub@redhat.com>
3597 Aldy Hernandez <aldyh@redhat.com>
3598
3599 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
3600 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
3601 (c_parser_omp_variable_list): Handle structure elements for
3602 map, to and from clauses. Handle array sections in reduction
3603 clause. Formatting fixes.
3604 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
3605 if clause modifiers.
3606 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3607 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3608 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
3609 c_parser_omp_clause_is_device_ptr): New functions.
3610 (c_parser_omp_clause_ordered): Parse optional parameter.
3611 (c_parser_omp_clause_reduction): Handle array reductions.
3612 (c_parser_omp_clause_schedule): Parse optional simd modifier.
3613 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
3614 functions.
3615 (c_parser_omp_clause_linear): Parse linear clause modifiers.
3616 (c_parser_omp_clause_depend_sink): New function.
3617 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
3618 (c_parser_omp_clause_map): Parse release/delete map kinds and
3619 optional always modifier.
3620 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
3621 and c_finish_omp_clauses callers.
3622 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
3623 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
3624 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
3625 (OMP_CRITICAL_CLAUSE_MASK): Define.
3626 (c_parser_omp_critical): Parse critical clauses.
3627 (c_parser_omp_for_loop): Handle doacross loops, adjust
3628 c_finish_omp_for and c_finish_omp_clauses callers.
3629 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
3630 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
3631 (OMP_FOR_CLAUSE_MASK): Add linear clause.
3632 (c_parser_omp_for): Disallow ordered clause when combined with
3633 distribute. Disallow linear clause when combined with distribute
3634 and not combined with simd.
3635 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
3636 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
3637 parse clauses and if depend clause is found, don't parse a body.
3638 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
3639 Allow target parallel without for after it.
3640 (OMP_TASK_CLAUSE_MASK): Add priority clause.
3641 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
3642 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
3643 invalid kinds.
3644 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
3645 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
3646 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
3647 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
3648 functions.
3649 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
3650 defaultmap and is_device_ptr clauses.
3651 (c_parser_omp_target): Parse target parallel and target simd. Set
3652 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
3653 and target exit data. Diagnose invalid map kinds.
3654 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
3655 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
3656 construct.
3657 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
3658 &omp_priv.
3659 (OMP_TASKLOOP_CLAUSE_MASK): Define.
3660 (c_parser_omp_taskloop): New function.
3661 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
3662 handle PRAGMA_OMP_TASKLOOP.
3663 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
3664 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
3665 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
3666 Add IS_OMP argument, handle structure element bases, diagnose
3667 bitfields, pass IS_OMP recursively, diagnose known zero length
3668 array sections in depend clauses, handle array sections in reduction
3669 clause, diagnose negative length even for pointers.
3670 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
3671 types, pass IS_OMP down to handle_omp_array_sections_1, handle
3672 array sections in reduction clause, set
3673 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
3674 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
3675 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
3676 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
3677
21ba0cea
MP
36782015-10-06 Marek Polacek <polacek@redhat.com>
3679
3680 * c-parser.c (c_parser_statement_after_labels): Use
3681 protected_set_expr_location.
3682 (c_parser_omp_clause_num_gangs): Likewise.
3683 (c_parser_omp_clause_num_threads): Likewise.
3684 (c_parser_omp_clause_num_workers): Likewise.
3685 (c_parser_omp_clause_vector_length): Likewise.
3686 (c_parser_omp_clause_num_teams): Likewise.
3687 (c_parser_omp_clause_thread_limit): Likewise.
3688 * c-typeck.c (build_c_cast): Likewise.
3689 (c_cast_expr): Likewise.
3690
624d31fe
RS
36912015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3692
3693 * c-typeck.c (c_tree_equal): Use real_equal instead of
3694 REAL_VALUES_EQUAL.
3695
b8fd7909
JM
36962015-10-04 Jason Merrill <jason@redhat.com>
3697
3698 * c-parser.c (c_lex_one_token): Handle @synchronized.
3699 * c-decl.c (match_builtin_function_types): A declaration of a built-in
3700 can change whether the function is transaction_safe.
3701
1c7485af
MP
37022015-10-02 Marek Polacek <polacek@redhat.com>
3703
3704 PR c/67730
3705 * c-typeck.c (convert_for_assignment): Use the expansion point
3706 location throughout.
3707
3e3b8d63
MP
37082015-10-02 Marek Polacek <polacek@redhat.com>
3709
3710 PR c/64249
3711 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
3712 and pass it down to c_parser_if_statement.
3713 (c_parser_else_body): Add CHAIN parameter and pass it down to
3714 c_parser_statement_after_labels.
3715 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
3716 duplicated if-else-if conditions.
3717
aabef2de
MP
37182015-10-01 Marek Polacek <polacek@redhat.com>
3719
3720 * c-typeck.c (convert_for_assignment): Improve commentary.
3721
de8ddd5f
MP
37222015-09-30 Marek Polacek <polacek@redhat.com>
3723
3724 PR c/67730
3725 * c-typeck.c (c_finish_return): Use the expansion point location for
3726 certain "return with value" warnings.
3727
c4914de6
MLI
37282015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3729
3730 * c-parser.c (pragma_lex): Add loc argument.
3731
0e36f5c7
MP
37322015-09-15 Marek Polacek <polacek@redhat.com>
3733
3734 PR c/67580
3735 * c-decl.c (tag_exists_p): New function.
3736 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3737 struct/union/enum keywords are missing.
3738 * c-tree.h (tag_exists_p): Declare.
3739
2f3bb934
MP
37402015-09-15 Marek Polacek <polacek@redhat.com>
3741
3742 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3743 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3744 Return NULL_TREE instead of 0.
3745 (lookup_name): Return NULL_TREE instead of 0.
3746 (lookup_name_in_scope): Likewise.
3747 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3748 (parser_xref_tag): Use false instead of 0.
3749 (start_struct): Use true instead of 1.
3750 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3751
aa256c4a
MP
37522015-09-14 Marek Polacek <polacek@redhat.com>
3753
3754 * c-typeck.c (set_nonincremental_init_from_string): Use
3755 HOST_WIDE_INT_M1U when shifting a negative value.
3756
dbb68221
MW
37572015-09-09 Mark Wielaard <mjw@redhat.com>
3758
3759 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
3760 parm against NULL.
3761
a8a098ac
JJ
37622015-09-10 Jakub Jelinek <jakub@redhat.com>
3763
3764 PR c/67502
3765 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
3766 into OMP_FOR_PRE_BODY rather than before the loop.
3767
f4b189d5
JJ
37682015-09-09 Jakub Jelinek <jakub@redhat.com>
3769
0bb99c11
JJ
3770 PR c/67501
3771 * c-parser.c (c_parser_oacc_all_clauses,
3772 c_parser_omp_all_clauses): Remove invalid clause from
3773 list of clauses even if parser->error is set.
3774
fce5e5e3
JJ
3775 PR c/67500
3776 * c-parser.c (c_parser_omp_clause_aligned,
3777 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3778 test for errors.
3779 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3780 error_mark_node.
3781
f4b189d5
JJ
3782 PR c/67495
3783 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3784 instead of c_parser_unary_expression. If the result is !lvalue_p,
3785 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3786
b2aaf235
MP
37872015-09-04 Marek Polacek <polacek@redhat.com>
3788
3789 PR sanitizer/67279
3790 * c-typeck.c (build_binary_op): Don't instrument static initializers.
3791
1807ffc1
MS
37922015-09-03 Martin Sebor <msebor@redhat.com>
3793
3794 PR c/66516
8b652e65
JJ
3795 * c-typeck.c (convert_arguments, parser_build_unary_op,
3796 build_conditional_expr, c_cast_expr, convert_for_assignment,
3797 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
3798 reject_gcc_builtin.
3799 (c_decl_implicit): Define.
3800
d04ff417
MP
38012015-09-02 Marek Polacek <polacek@redhat.com>
3802
3803 PR c/67432
3804 * c-parser.c (c_parser_enum_specifier): Give a better error for
3805 an empty enum.
3806
a79683d5
TS
38072015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3808
3809 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3810
191a6b94
MP
38112015-08-12 Marek Polacek <polacek@redhat.com>
3812
3813 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
3814 LOC to it.
3815
420a9d9b
MP
38162015-08-03 Marek Polacek <polacek@redhat.com>
3817
3818 PR c/67088
3819 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
3820 Use it.
3821 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
3822
992118a1
PP
38232015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3824
3825 * c-parser.c (c_parser_if_body): Take token_indent_info
3826 argument. Call warn_for_misleading_indentation even when the
3827 body is a semicolon. Extract token_indent_infos corresponding
3828 to the guard, body and next tokens. Adjust call to
3829 warn_for_misleading_indentation accordingly.
3830 (c_parser_else_body): Likewise.
3831 (c_parser_if_statement): Likewise.
3832 (c_parser_while_statement): Likewise.
3833 (c_parser_for_statement): Likewise.
3834
46308474
LFSM
38352015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
3836 Manuel López-Ibáñez <manu@gcc.gnu.org>
3837
3838 * c-decl.c (get_parm_info): Remove static var. Update warning
3839 message.
3840
05b28fd6
MP
38412015-07-27 Marek Polacek <polacek@redhat.com>
3842
3843 PR c++/66555
3844 PR c/54979
3845 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3846
451b5e48
MP
38472015-07-20 Marek Polacek <polacek@redhat.com>
3848
3849 PR c++/55095
3850 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3851 (build_binary_op): Warn about left shift overflows.
3852
1916bcb5
AM
38532015-07-09 Andrew MacLeod <amacleod@redhat.com>
3854
3855 * c-array-notation.c: Adjust includes for flags.h changes.
3856 * c-objc-common.c: Likewise.
3857
c7131fb2
AM
38582015-07-07 Andrew MacLeod <amacleod@redhat.com>
3859
3860 * c-array-notation.c: Adjust includes.
3861 * c-aux-info.c: Likewise.
3862 * c-convert.c: Likewise.
3863 * c-decl.c: Likewise.
3864 * c-errors.c: Likewise.
3865 * c-lang.c: Likewise.
3866 * c-objc-common.c: Likewise.
3867 * c-parser.c: Likewise.
3868 * c-typeck.c: Likewise.
3869
da2e71c9
MLI
38702015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3871
3872 PR fortran/66605
3873 * c-decl.c (finish_function): Call do_warn_unused_parameter.
3874
b155cfd9
MP
38752015-06-29 Marek Polacek <polacek@redhat.com>
3876
3877 PR c/66322
3878 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3879 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
3880 about -Wswitch-bool here.
3881 (do_case): Update c_add_case_label call.
3882 (c_finish_case): Update c_do_switch_warnings call.
3883
31521951
MP
38842015-06-27 Marek Polacek <polacek@redhat.com>
3885
3886 * c-typeck.c: Use VECTOR_TYPE_P throughout.
3887
22d03525
MP
38882015-06-26 Marek Polacek <polacek@redhat.com>
3889
3890 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3891 INDIRECT_REF_P.
3892 * c-typeck.c (array_to_pointer_conversion): Likewise.
3893 (build_unary_op): Likewise.
3894 (c_finish_return): Likewise.
3895
f0889939
AM
38962015-06-25 Andrew MacLeod <amacleod@redhat.com>
3897
3898 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3899 * c-parser.c: Likewise.
3900
8d67ee55
RS
39012015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3902
3903 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3904 instead of pointer_hash.
3905 (detect_field_duplicates): Likewise.
3906
0ae9bd27
MP
39072015-06-25 Marek Polacek <polacek@redhat.com>
3908
3909 * c-array-notation.c: Use VAR_P throughout.
3910 * c-decl.c: Likewise.
3911 * c-objc-common.c: Likewise.
3912 * c-parser.c: Likewise.
3913 * c-typeck.c: Likewise.
3914
62f9079a
MP
39152015-06-25 Marek Polacek <polacek@redhat.com>
3916
3917 * c-decl.c: Use is_global_var throughout.
3918 * c-parser.c: Likewise.
3919 * c-typeck.c: Likewise.
3920
abb226c9
AM
39212015-06-17 Andrew MacLeod <amacleod@redhat.com>
3922
3923 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3924 * c-aux-info.c: Likewise.
3925 * c-convert.c: Likewise.
3926 * c-decl.c: Likewise.
3927 * c-errors.c: Likewise.
3928 * c-lang.c: Likewise.
3929 * c-objc-common.c: Likewise.
3930 * c-parser.c: Likewise.
3931 * c-typeck.c: Likewise.
3932
8cbababc
JH
39332015-06-11 Jan Hubicka <hubicka@ucw.cz>
3934
3935 PR middle-end/66325
3936 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3937 variants.
3938
a0349665
PMR
39392015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
3940
3941 * c-decl.c (pop_scope): Register the main translation unit
3942 through the new debug hook.
3943
13fdf2e2
AM
39442015-06-08 Andrew MacLeod <amacleod@redhat.com>
3945
3946 * c-array-notation.c : Adjust include files.
3947 * c-aux-info.c : Likewise.
3948 * c-convert.c : Likewise.
3949 * c-decl.c : Likewise.
3950 * c-errors.c : Likewise.
3951 * c-lang.c : Likewise.
3952 * c-lang.h : Likewise.
3953 * c-objc-common.c : Likewise.
3954 * c-parser.c : Likewise.
3955 * c-typeck.c : Likewise.
3956
d7438551
AH
39572015-06-05 Aldy Hernandez <aldyh@redhat.com>
3958
3959 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3960 immediately clobber it.
3961 (c_write_global_declarations_1): Remove call to
3962 check_global_declaration_1.
3963 (c_write_global_declarations_2): Remove.
3964 (c_write_final_cleanups): Rename from c_write_global_declarations.
3965 Remove call to finalize_compilation_unit.
3966 Remove calls to debugging hooks.
3967 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3968 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3969 * c-tree.h: Remove c_write_global_declarations.
3970
ecb9f223
AM
39712015-06-04 Andrew MacLeod <amacleod@redhat.com>
3972
3973 * c-array-notation.c: Adjust includes for restructured coretypes.h.
3974 * c-aux-info.c: Likewise.
3975 * c-convert.c: Likewise.
3976 * c-decl.c: Likewise.
3977 * c-errors.c: Likewise.
3978 * c-lang.c: Likewise.
3979 * c-objc-common.c: Likewise.
3980 * c-parser.c: Likewise.
3981 * c-typeck.c: Likewise.
3982
9482b620
MP
39832015-06-04 Marek Polacek <polacek@redhat.com>
3984
3985 PR c/66341
3986 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3987 it is a lvalue.
3988
bc51ace3
PK
39892015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3990
3991 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3992 Warn for empty struct.
3993 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3994
ea5b45b6
AT
39952015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
3996
3997 * c-decl.c (start_function): Call plugin before parsing.
3998 (finish_function): Call plugin after parsing.
3999
c2d47482
PK
40002015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4001
4002 PR c/49551
4003 * c-decl.c (merge_decls): Merge DECL_COMMON.
4004
a95492ab
JW
40052015-05-22 Jim Wilson <jim.wilson@linaro.org>
4006
4007 * Make-lang.in (check_gcc_pallelize): Define.
4008
fd5c817a
MP
40092015-05-22 Marek Polacek <polacek@redhat.com>
4010
4011 PR c/47043
4012 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
4013 attributes.
4014
c7b70a3c
MP
40152015-05-21 Marek Polacek <polacek@redhat.com>
4016
4017 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
4018 DECL_BUILT_IN.
4019
21b634ae
MP
40202015-05-20 Marek Polacek <polacek@redhat.com>
4021
4022 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
4023 * c-typeck.c: Likewise.
4024
296a8c2f
MP
40252015-05-19 Marek Polacek <polacek@redhat.com>
4026
4027 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
4028
41b37d5e
JJ
40292015-05-19 Jakub Jelinek <jakub@redhat.com>
4030
4031 PR middle-end/66199
4032 * c-parser.c (c_parser_omp_for_loop): Don't add
4033 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
4034 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
4035 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
4036 constructs.
4037
fab27f52
MM
40382015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
4039
4040 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 4041 swaps.
fab27f52 4042
40de31cf
MLI
40432015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
4044
4045 PR fortran/44054
4046 * c-objc-common.c (c_tree_printer): Replace locus pointer with
4047 accessor function.
4048
3aa3c9fc
MP
40492015-05-14 Marek Polacek <polacek@redhat.com>
4050
4051 PR c/66066
4052 PR c/66127
4053 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
4054 rather than with 0.
4055
c3388e62
DM
40562015-05-12 David Malcolm <dmalcolm@redhat.com>
4057
4058 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
4059 to add a call to warn_for_misleading_indentation.
4060 (c_parser_else_body): Likewise, adding param "else_loc".
4061 (c_parser_if_statement): Check for misleading indentation.
4062 (c_parser_while_statement): Likewise.
4063 (c_parser_for_statement): Likewise.
4064
755e528f
MP
40652015-05-08 Marek Polacek <polacek@redhat.com>
4066
4067 PR c/64918
4068 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
4069 (output_init_element): Likewise.
4070
0173bd2a
MP
40712015-05-07 Marek Polacek <polacek@redhat.com>
4072
4073 PR c/65179
4074 * c-typeck.c (build_binary_op): Warn when left shifting a negative
4075 value.
4076
9babc352
MP
40772015-04-30 Marek Polacek <polacek@redhat.com>
4078
4079 * c-typeck.c (set_init_label): Call error_at instead of error and
4080 pass LOC to it.
4081
ac9f18db
MP
4082 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
4083 the type of a decl.
4084
ec3fba51
MP
4085 * c-typeck.c (c_build_va_arg): Clarify the error message.
4086
b811915d
TS
40872015-04-29 Thomas Schwinge <thomas@codesourcery.com>
4088
4089 * c-parser.c (c_parser_oacc_enter_exit_data): Use
4090 OMP_STANDALONE_CLAUSES.
4091
f3075008
MP
40922015-04-28 Marek Polacek <polacek@redhat.com>
4093
4094 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
4095
4e81b788
MP
40962015-04-28 Marek Polacek <polacek@redhat.com>
4097
4098 PR c/65901
4099 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
4100
6c1db78e
MP
41012015-04-25 Marek Polacek <polacek@redhat.com>
4102
4103 PR c/52085
4104 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
4105 attribute.
4106
5c4abbb8
MP
41072015-04-23 Marek Polacek <polacek@redhat.com>
4108
4109 PR c/65345
4110 * c-decl.c (set_labels_context_r): New function.
4111 (store_parm_decls): Call it via walk_tree_without_duplicates.
4112 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
4113 instead of create_tmp_var. Build TARGET_EXPR instead of
4114 COMPOUND_EXPR.
4115 (build_atomic_assign): Use create_tmp_var_raw instead of
4116 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
4117
06aca1d5
IV
41182015-04-20 Ilya Verbin <ilya.verbin@intel.com>
4119
4120 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
4121 (c_parser_omp_target_update): Add missed %> to error_at ().
4122
8fba1830
BRF
41232015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
4124
4125 PR target/55143
4126 * c-decl.c (c_default_pointer_mode): Remove definition.
4127 * c-tree.h (c_default_pointer_mode): Remove declaration.
4128
62021f64
TB
41292015-03-27 Tobias Burnus <burnus@net-b.de>
4130
4131 PR c/65586
4132 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
4133 error out.
4134 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
4135 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
4136 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
4137
9b65e171
JJ
41382015-03-19 Jakub Jelinek <jakub@redhat.com>
4139
4140 * c-decl.c (c_decl_attributes): Also add "omp declare target"
4141 attribute for DECL_EXTERNAL VAR_DECLs.
4142
17958621
JJ
41432015-03-11 Jakub Jelinek <jakub@redhat.com>
4144
4145 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
4146 argument.
4147
7ccb1a11
JJ
41482015-03-10 Jakub Jelinek <jakub@redhat.com>
4149
4150 PR c/65120
4151 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
4152 before preparing arguments to warn_logical_not_parentheses.
4153
01177669
JJ
41542015-03-09 Jakub Jelinek <jakub@redhat.com>
4155
4156 PR c/65120
4157 * c-typeck.c (parser_build_binary_op): Don't warn for
4158 !!x == y or !b == y where b is _Bool.
4159
802ac282
MP
41602015-03-09 Marek Polacek <polacek@redhat.com>
4161
4162 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
4163 * c-decl.c (grokdeclarator): Likewise.
4164 * c-typeck.c (build_binary_op): Likewise.
4165
e5165b60
MP
41662015-02-27 Marek Polacek <polacek@redhat.com>
4167
4168 PR c/65228
4169 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
4170
065d214c
MP
41712015-02-14 Marek Polacek <polacek@redhat.com>
4172
4173 PR c/64768
4174 * c-decl.c (grokdeclarator): Set the range of a flexible array member
4175 declared through a typedef name.
4176
e5d9235b
MP
41772015-02-13 Marek Polacek <polacek@redhat.com>
4178
4179 PR c/65050
4180 * c-decl.c (grokdeclarator): Print also the type when giving
4181 the error message about array's incomplete element type.
4182
fa01ffcc
JJ
41832015-02-11 Jakub Jelinek <jakub@redhat.com>
4184
4185 PR c/64824
4186 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
4187 check in the POP macro.
4188
c3e38a03
MP
41892015-02-09 Marek Polacek <polacek@redhat.com>
4190
4191 PR c/64856
4192 * c-typeck.c (process_init_element): Don't always wrap
4193 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
4194 initializing a range of elements.
4195
4886ec8e
JJ
41962015-02-04 Jakub Jelinek <jakub@redhat.com>
4197
4198 PR c/64824
4199 PR c/64868
4200 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
4201
c3e38a03 42022015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
4203
4204 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
4205 processing enum declaration.
4206
7b33f0c8
MP
42072015-01-29 Marek Polacek <polacek@redhat.com>
4208
4209 PR c/64709
4210 * c-typeck.c (pop_init_level): If constructor_elements has
4211 exactly one element with integer_zerop value, set constructor_zeroinit
4212 to 1. Remove braces around warning_init call.
4213
dea63e49
JJ
42142015-01-27 Jakub Jelinek <jakub@redhat.com>
4215
4216 PR c/64766
4217 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
4218 of FUNCTION_DECLs with error_mark_node.
4219
d38f7dce
JJ
42202015-01-26 Jakub Jelinek <jakub@redhat.com>
4221
4222 PR c/64778
4223 * c-typeck.c (convert_arguments): Return -1 if there are
4224 error_args, even if we've diagnosed too many arguments.
4225
cbf5d0e7
RB
42262015-01-21 Richard Biener <rguenther@suse.de>
4227
4228 PR middle-end/64313
4229 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
4230 for builtins the user declared correctly.
4231
41dbbb37
TS
42322015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4233 Bernd Schmidt <bernds@codesourcery.com>
4234 Cesar Philippidis <cesar@codesourcery.com>
4235 James Norris <jnorris@codesourcery.com>
4236 Jakub Jelinek <jakub@redhat.com>
4237 Ilmir Usmanov <i.usmanov@samsung.com>
4238
4239 * c-parser.c: Include "gomp-constants.h".
4240 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
4241 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
4242 Use OMP_CLAUSE_SET_MAP_KIND.
4243 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
4244 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
4245 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
4246 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
4247 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
4248 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
4249 "copyout", "create", "delete", "deviceptr", "gang", "host",
4250 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
4251 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
4252 "present_or_create", "pcreate", "seq", "self", "vector",
4253 "vector_length", "wait", "worker".
4254 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
4255 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
4256 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
4257 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
4258 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
4259 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
4260 (c_parser_oacc_data_clause_deviceptr)
4261 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
4262 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
4263 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
4264 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
4265 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
4266 (c_parser_oacc_parallel, c_parser_oacc_update)
4267 (c_parser_oacc_wait): New functions.
4268 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
4269 (c_finish_oacc_data): New prototypes.
4270 * c-typeck.c: Include "gomp-constants.h".
4271 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
4272 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
4273 OMP_CLAUSE_SET_MAP_KIND.
4274 (c_finish_oacc_parallel, c_finish_oacc_kernels)
4275 (c_finish_oacc_data): New functions.
4276 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
4277 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
4278 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
4279 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
4280 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
4281 GOMP_MAP_FORCE_DEVICEPTR.
4282
adfac8df
JJ
42832015-01-09 Michael Collison <michael.collison@linaro.org>
4284
4285 * c-array-notation.c: Include hash-set.h, machmode.h,
4286 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4287 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
4288 * c-aux-info.c: Ditto.
4289 * c-convert.c: Ditto.
4290 * c-decl.c: Ditto.
4291 * c-errors.c: Ditto.
4292 * c-lang.c: Dittoxs.
4293 * c-objc-common.c: Ditto.
4294 * c-parser.c: Ditto.
4295 * c-typeck.c: Include hash-set.h, machmode.h,
4296 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4297 fold-const.h, wide-int.h, inchash.h, real.h and
4298 fixed-value.h due to flattening of tree.h.
4299
2cc901dc
MP
43002015-01-07 Marek Polacek <polacek@redhat.com>
4301
4302 PR c/64417
4303 * c-typeck.c (process_init_element): Disallow initialization of
4304 a flexible array member with a string constant if the structure
4305 is in an array.
4306
5624e564
JJ
43072015-01-05 Jakub Jelinek <jakub@redhat.com>
4308
e5341100
JJ
4309 PR sanitizer/64344
4310 * c-typeck.c (convert_for_assignment, c_finish_return): For
4311 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
4312 types also set in_late_binary_op around convert call.
4313 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
4314 to integral type casts, if not in_late_binary_op, pass c_fully_fold
4315 result on expr as last argument to ubsan_instrument_float_cast,
4316 if in_late_binary_op, don't use c_save_expr but save_expr.
4317
5624e564
JJ
4318 Update copyright years.
4319
5bd012f8
MP
43202015-01-05 Marek Polacek <polacek@redhat.com>
4321
4322 PR c/64423
4323 * c-typeck.c (build_array_ref): Pass loc down to
4324 warn_array_subscript_with_type_char.
4325
3f8257db 43262014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
4327
4328 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 4329 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 4330 element type.
8e745a17 4331 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 4332 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 4333 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 4334 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 4335 to PEDWARN_FOR_QUALIFIERS.
768952be 4336
8f94a8c4
JJ
43372014-12-17 Jakub Jelinek <jakub@redhat.com>
4338
4339 PR sanitizer/64289
4340 * c-convert.c: Include ubsan.h.
4341 (convert): For real -> integral casts and
4342 -fsanitize=float-cast-overflow don't call convert_to_integer, but
4343 instead instrument the float cast directly.
4344
b731b390
JJ
43452014-11-29 Jakub Jelinek <jakub@redhat.com>
4346
4347 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
4348 c_finish_stmt_expr): Remove NULL last argument from
4349 create_tmp_var_raw and create_tmp_var calls.
4350 * c-array-notation.c (fix_builtin_array_notation_fn,
4351 build_array_notation_expr, fix_conditional_array_notations_1,
4352 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
4353
541e35a6
MP
43542014-11-28 Marek Polacek <polacek@redhat.com>
4355
4356 PR c/63862
4357 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
4358 convert the right operand to integer type.
4359
b286be94
MP
43602014-11-25 Marek Polacek <polacek@redhat.com>
4361
4362 PR c/63877
4363 * c-decl.c (start_function): Disable -Wmissing-declarations warning
4364 for inline functions.
4365
aa7da51a
JJ
43662014-11-21 Jakub Jelinek <jakub@redhat.com>
4367
4368 PR target/63764
4369 * c-typeck.c (build_array_ref): Adjust
4370 convert_vector_to_pointer_for_subscript caller. If it returns true,
4371 call non_lvalue_loc on the result.
4372
d876207f
RB
43732014-11-11 Richard Biener <rguenther@suse.de>
4374
4375 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
4376 to true.
4377
e5e44252
AK
43782014-11-10 Andi Kleen <ak@linux.intel.com>
4379
4380 PR c/60804
4381 * c-parser.c (c_parser_statement_after_labels): Call
4382 check_no_cilk.
4383 (c_parser_if_statement): Dito.
4384 (c_parser_switch_statement): Dito.
4385 (c_parser_while_statement): Dito.
4386 (c_parser_do_statement): Dito.
4387 (c_parser_for_statement): Dito.
4388 * c-typeck.c (c_finish_loop): Dito.
4389
13c21655
PC
43902014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
4391
4392 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
4393 OPT_Wshift_count_overflow in the warnings.
4394
2d51fcef
MP
43952014-10-30 Marek Polacek <polacek@redhat.com>
4396
4397 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
4398 print the stripped version as well, if they're not the same.
4399
ef4bddc2
RS
44002014-10-29 Richard Sandiford <richard.sandiford@arm.com>
4401
4402 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
4403 machine_mode.
4404
c582198b
AM
44052014-10-28 Andrew MacLeod <amacleod@redhat.com>
4406
4407 * c-decl.c: Adjust include files.
4408 * c-parser.c: Ditto.
4409
ddc8de03
PM
44102014-10-27 Phil Muldoon <pmuldoon@redhat.com>
4411 Tom Tromey <tromey@redhat.com>
4412
4413 * c-tree.h (enum c_oracle_request): New.
4414 (c_binding_oracle_function): New typedef.
4415 (c_binding_oracle, c_pushtag, c_bind): Declare.
4416 * c-decl.c (c_binding_oracle): New global.
4417 (I_SYMBOL_CHECKED): New macro.
4418 (i_symbol_binding): New function.
4419 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
4420 (I_TAG_CHECKED): New macro.
4421 (i_tag_binding): New function.
4422 (I_TAG_BINDING, I_TAG_DECL): Redefine.
4423 (I_LABEL_CHECKED): New macro.
4424 (i_label_binding): New function.
4425 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
4426 (c_print_identifier): Save and restore c_binding_oracle.
4427 (c_pushtag, c_bind): New functions.
4428
60393bbc
AM
44292014-10-27 Andrew MacLeod <amacleod@redhat.com>
4430
4431 * c-typeck.c: Adjust include files.
4432
d723bb7c
MLI
44332014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
4434
4435 PR c++/53061
4436 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
4437 initialization here...
4438 (c_initialize_diagnostics): ... but here. Set defaults after
4439 building pretty-printer.
4440
1bc5a451
MP
44412014-10-23 Marek Polacek <polacek@redhat.com>
4442
4443 PR c/63626
4444 * c-decl.c (pop_scope): Don't print warning in external_scope.
4445
4435bb92
MP
44462014-10-19 Marek Polacek <polacek@redhat.com>
4447
4448 PR c/63567
4449 * c-typeck.c (output_init_element): Allow initializing objects with
4450 static storage duration with compound literals even in C99 and add
4451 pedwarn for it.
4452
7278465e
MP
44532014-10-17 Marek Polacek <polacek@redhat.com>
4454
4455 PR c/63567
4456 * c-typeck.c (digest_init): Allow initializing objects with static
4457 storage duration with compound literals even in C99 and add pedwarn
4458 for it.
4459
d9b7be2e
MP
44602014-10-17 Marek Polacek <polacek@redhat.com>
4461
4462 PR c/63543
4463 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
4464 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
4465 error multiple times. Print the type.
4466
f406ae1f
MP
44672014-10-17 Marek Polacek <polacek@redhat.com>
4468
4469 PR c/63549
4470 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
4471 type.
4472
92574c7c
MP
44732014-10-17 Marek Polacek <polacek@redhat.com>
4474
4475 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
4476 (start_function): Use OPT_Wimplicit_int instead of 0.
4477 (store_parm_decls_oldstyle): Likewise.
4478
1bc4a978
MT
44792014-10-17 Alan Modra <amodra@gmail.com>
4480
4481 PR middle-end/61848
4482 * c-decl.c (merge_decls): Don't merge section name or tls model
4483 to newdecl symtab node, instead merge to olddecl. Override
4484 existing olddecl section name. Set tls_model for all thread-local
4485 vars, not just OMP thread-private ones. Remove incorrect comment.
4486
83685514
AM
44872014-10-16 Andrew MacLeod <amacleod@redhat.com>
4488
4489 * c-decl.c: Adjust include files.
4490
78a7c317
DD
44912014-10-14 DJ Delorie <dj@redhat.com>
4492
4493 * c-parser.c (c_parse_init): Add RID entries for each __intN.
4494 (c_token_starts_typename): Check all __intN, not just __int128.
4495 (c_token_starts_declspecs): Likewise.
4496 (c_parser_declspecs): Likewise.
4497 (c_parser_attribute_any_word): Likewise.
4498 (c_parser_objc_selector): Likewise.
4499 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
4500 (struct c_declspecs): Add int_n_idx field to record *which* __intN
4501 is specified.
4502 * c-decl.c (declspecs_add_type): Check for all __intN, not just
4503 __int128.
4504 (finish_declspecs): Likewise.
4505
74d98c1e
AB
45062014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
4507
8e745a17 4508 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 4509 the duplicate code.
8e745a17 4510 (c_parser_statement): Call the new function.
74d98c1e 4511
84937de2
MP
45122014-10-09 Marek Polacek <polacek@redhat.com>
4513
4514 PR c/63480
4515 * c-typeck.c (pop_init_level): Don't warn about initializing
4516 with { }.
4517
0382aaa0
MP
45182014-10-07 Marek Polacek <polacek@redhat.com>
4519
4520 PR c/59717
4521 * c-decl.c (header_for_builtin_fn): New function.
4522 (implicitly_declare): Suggest which header to include.
4523
7a0ca710
MP
45242014-10-07 Marek Polacek <polacek@redhat.com>
4525
4526 * c-convert.c (convert): Use error_operand_p.
4527 * c-typeck.c (require_complete_type): Likewise.
4528 (really_atomic_lvalue): Likewise.
4529 (digest_init): Likewise.
4530 (handle_omp_array_sections_1): Likewise.
4531
6bc8a126
MP
45322014-10-03 Marek Polacek <polacek@redhat.com>
4533
4534 PR c/63453
4535 * c-decl.c (pop_scope): Don't warn about "inline function declared
4536 but never defined" for functions marked with gnu_inline attribute.
4537
d90c0a59
JJ
45382014-09-25 Jakub Jelinek <jakub@redhat.com>
4539
4540 PR c++/63249
4541 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
4542 on low_bound and length.
4543
083e891e
MP
45442014-09-24 Marek Polacek <polacek@redhat.com>
4545
4546 PR c/61405
4547 PR c/53874
4548 * c-parser.c: Don't define CPP_KEYWORD.
4549 (c_parser_switch_statement): Pass original type to c_finish_case.
4550 * c-tree.h (c_finish_case): Update declaration.
4551 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
4552 conditionally to c_do_switch_warnings.
4553
8d95fe25
MP
45542014-09-03 Marek Polacek <polacek@redhat.com>
4555
4556 PR c/62024
4557 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
4558 conversions.
4559
9a771876
JJ
45602014-09-02 Jakub Jelinek <jakub@redhat.com>
4561 Balaji V. Iyer <balaji.v.iyer@intel.com>
4562 Igor Zamyatin <igor.zamyatin@intel.com>
4563
4564 * c-parser.c (c_parser_cilk_for): New function.
4565 (c_parser_cilk_grainsize): Likewise.
4566 (c_get_temp_regvar): Likewise.
4567 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
4568 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
4569 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
4570 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
4571 case.
4572
b7679d96
CG
45732014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
4574
4575 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
4576 with using HOST_WIDE_INT without truncation to 'int'
4577
59ea0364
MP
45782014-08-22 Marek Polacek <polacek@redhat.com>
4579
4580 PR c++/62199
4581 * c-typeck.c (parser_build_binary_op): Adjust call to
4582 warn_logical_not_parentheses.
4583
671a475e
IZ
45842014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
4585
4586 PR other/62008
4587 * c-parser.c (c_parser_array_notation): Check for correct
4588 type of an array added.
4589
04159acf
MP
45902014-08-19 Marek Polacek <polacek@redhat.com>
4591
4592 PR c++/62153
4593 * c-typeck.c (build_binary_op): If either operand of a comparison
4594 is a boolean expression, call maybe_warn_bool_compare.
4595
c77935ee
PP
45962014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
4597
4598 PR c/45584
4599 * c-typeck.c (build_c_cast): Do a conversion even when the
4600 TYPE_MAIN_VARIANTs are the same.
4601
35aff4fb
MP
46022014-08-19 Marek Polacek <polacek@redhat.com>
4603
4604 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
4605 pedwarn_c99 instead of pedwarn.
4606 (grokfield): Likewise.
4607 (warn_defaults_to): New function.
4608 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
4609 Unconditionally call pedwarn_c99 instead of pedwarn.
4610 (start_function): Call warn_defaults_to instead of pedwarn_c99.
4611 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
4612 check flag_isoc11 before.
4613 * c-errors.c (pedwarn_c99): Change the return type to bool.
4614 Handle -Wc99-c11-compat.
4615 * c-parser.c (disable_extension_diagnostics): Handle
4616 warn_c99_c11_compat.
4617 (restore_extension_diagnostics): Likewise.
4618 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
4619 instead of pedwarn, don't check flag_isoc11 before.
4620 (c_parser_declspecs): Likewise.
4621 (c_parser_alignas_specifier): Likewise.
4622 (c_parser_alignof_expression): Likewise.
4623 (c_parser_generic_selection): Likewise.
4624 * c-tree.h (pedwarn_c99): Update declaration.
4625 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
4626 of pedwarn_c99.
4627
177cce46
MP
46282014-08-19 Marek Polacek <polacek@redhat.com>
4629
4630 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
4631 to pedwarn_c90.
4632 * c-errors.c: Include "opts.h".
4633 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
4634 * c-parser.c (disable_extension_diagnostics): Handle negative value
4635 of warn_c90_c99_compat, too.
4636 (restore_extension_diagnostics): Likewise.
4637 (c_parser_compound_statement_nostart): Pass
4638 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
4639
6dc99c33
MP
46402014-08-12 Marek Polacek <polacek@redhat.com>
4641
4642 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
4643 Add pedwarn.
4644 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
4645 Likewise.
4646 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
4647
3f8257db 46482014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
4649
4650 PR c/51849
4651 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
4652 Call pedwarn_c90 instead of pedwarn.
4653 (check_bitfield_type_and_width): Likewise.
4654 (declspecs_add_qual): Likewise.
4655 (declspecs_add_type): Likewise.
4656 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
4657 Adjust to only call pedwarn_c90.
4658 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
4659 pedwarn_c90 instead of pedwarn.
4660 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
4661 * c-parser.c (disable_extension_diagnostics): Handle
4662 warn_c90_c99_compat.
4663 (restore_extension_diagnostics): Likewise.
4664 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
4665 pedwarn_c90 instead of pedwarn.
4666 (c_parser_initelt): Likewise.
4667 (c_parser_postfix_expression): Likewise.
4668 (c_parser_postfix_expression_after_paren_type): Likewise.
4669 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
4670 * c-tree.h: Fix formatting.
4671 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
4672 pedwarn_c90 instead of pedwarn.
4673
9f25a338
TS
46742014-08-07 Trevor Saunders <tsaunders@mozilla.com>
4675
4676 * c-typeck.c: Remove include of pointer-set.h.
4677
044331a8
MP
46782014-08-07 Marek Polacek <polacek@redhat.com>
4679
4680 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
4681
b787e7a2
TS
46822014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4683
4684 * c-typeck.c: Use hash_map instead of pointer_map.
4685
6e2830c3
TS
46862014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4687
4688 * c-decl.c: Use hash_set instead of pointer_set.
4689
a7ee52fb
IZ
46902014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
4691
4692 PR middle-end/61455
4693 * c-array-notation.c (expand_array_notations): Handling
4694 of DECL_EXPR added.
4695
b4dfdc11
MG
46962014-07-31 Marc Glisse <marc.glisse@inria.fr>
4697
4698 PR c++/60517
4699 * c-typeck.c (c_finish_return): Return 0 instead of the address of
4700 a local variable.
4701
976d5a22
TT
47022014-07-30 Tom Tromey <tromey@redhat.com>
4703
4704 * c-typeck.c (struct constructor_stack) <designator_depth>: New
4705 field.
4706 (really_start_incremental_init, push_init_level): Initialize
4707 designator_depth.
4708 (pop_init_level): Set global designator_depth.
4709 (process_init_element): Check for designated_init attribute.
4710
30281de2
MP
47112014-07-20 Marek Polacek <polacek@redhat.com>
4712
4713 PR c/61852
4714 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
4715 (implicitly_declare): Pass location to implicit_decl_warning.
4716
b108f48f
JJ
47172014-07-14 Jakub Jelinek <jakub@redhat.com>
4718
4719 PR middle-end/61294
4720 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
4721 If non-NULL, call c_parser_check_literal_zero.
4722 (c_parser_check_literal_zero): New function.
4723 (c_parser_postfix_expression_after_primary): Adjust
4724 c_parser_expr_list caller, handle -Wmemset-transposed-args.
4725
773ec47f
MP
47262014-07-06 Marek Polacek <polacek@redhat.com>
4727
4728 PR c/6940
4729 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4730 * c-tree.h (C_ARRAY_PARAMETER): Define.
4731 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4732 function parameter.
4733
22e1cf1c 47342014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 4735 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
4736
4737 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4738 releasing symbol.
4739
52ec0ea3
MP
47402014-07-01 Marek Polacek <polacek@redhat.com>
4741
4742 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4743 instead of 0 to WARN_FOR_ASSIGNMENT.
4744
d5c3d343
MP
47452014-07-01 Marek Polacek <polacek@redhat.com>
4746
4747 PR c/58286
4748 * c-typeck.c (convert_for_assignment): Pass
4749 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4750
6a7253a4
MP
47512014-06-30 Marek Polacek <polacek@redhat.com>
4752
4753 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4754 has no_sanitize_undefined attribute.
4755
5e88a8f4
IZ
47562014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
4757
4758 PR middle-end/57541
4759 * c-array-notation.c (fix_builtin_array_notation_fn):
4760 Check for 0 arguments in builtin call. Check that bultin argument is
4761 correct.
4762 * c-parser.c (c_parser_array_notation): Check for incorrect initial
4763 index.
4764
9698b078
SH
47652014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
4766
4767 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
4768 qualifiers in __auto_type for atomic types.
4769 (c_parser_typeof_specifier): Discard all type qualifiers in
4770 __typeof__ for atomic types.
4771
6e07c515
MP
47722014-06-25 Marek Polacek <polacek@redhat.com>
4773
4774 PR c/61162
4775 * c-parser.c (c_parser_statement_after_labels): Pass the location of
4776 the return expression to c_finish_return.
4777
da6f124d
JJ
47782014-06-25 Jakub Jelinek <jakub@redhat.com>
4779
4780 * c-typeck.c (c_finish_omp_clauses): Make sure
4781 OMP_CLAUSE_LINEAR_STEP has correct type.
4782
c203e8a7
TS
47832014-06-24 Trevor Saunders <tsaunders@mozilla.com>
4784
4785 * c-decl.c: Adjust.
4786
56ad0e38
JJ
47872014-06-24 Jakub Jelinek <jakub@redhat.com>
4788
4789 * c-parser.c (c_parser_omp_for_loop): For
4790 #pragma omp parallel for simd move lastprivate clause from parallel
4791 to for rather than simd.
4792
47c2554f
MP
47932014-06-23 Marek Polacek <polacek@redhat.com>
4794
4795 * c-typeck.c (parser_build_binary_op): Don't call
4796 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
4797
56363ffd
JH
47982014-06-15 Jan Hubicka <hubicka@ucw.cz>
4799
4800 * c-parser.c (c_parser_omp_threadprivate): Likewise.
4801 * c-decl.c (merge_decls): Likewise.
4802
d7ff7ae5
MP
48032014-06-09 Marek Polacek <polacek@redhat.com>
4804
4805 PR c/36446
4806 * c-typeck.c (error_init): Call inform instead of error_at.
4807 (pedwarn_init): Call inform instead of pedwarn.
4808 (warning_init): Call inform instead of warning_at.
4809
24d047a3
JH
48102014-06-07 Jan Hubicka <hubicka@ucw.cz>
4811
4812 * c-decl.c (merge_decls): Use set_decl_section_name.
4813 (duplicate_decls): Remove node if it exists.
4814
9bac5cbb
G
48152014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
4816
4817 PR c/53119
4818 * c-typeck.c (push_init_level, process_init_element,
4819 pop_init_level): Correct check for zero initialization, move
4820 missing brace warning to respect zero initialization.
4821
8ffcdea8
MP
48222014-06-05 Marek Polacek <polacek@redhat.com>
4823
4824 PR c/56724
4825 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
4826
742938c9
MP
48272014-06-05 Marek Polacek <polacek@redhat.com>
4828
4829 PR c/49706
4830 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
4831 on the left hand side operand of a comparison.
4832
6447c55d
MP
48332014-06-05 Marek Polacek <polacek@redhat.com>
4834
4835 PR c/48062
4836 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
4837 Print note only if the warning was printed.
4838
9dc7743c
IZ
48392014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
4840
4841 PR c/58942
4842 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4843 with a pointer.
4844
fedfecef
MP
48452014-06-03 Marek Polacek <polacek@redhat.com>
4846
4847 PR c/60439
4848 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4849 c_start_case.
4850 * c-tree.h (c_start_case): Update.
4851 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
4852 switch condition has boolean value.
4853
9b2b7279
AM
48542014-06-02 Andrew MacLeod <amacleod@redhat.com>
4855
4856 * c-decl.c: Include builtins.h.
4857 * c-parser.c: Likewise.
4858
5c1bc275
MP
48592014-05-27 Marek Polacek <polacek@redhat.com>
4860
4861 PR c/56724
4862 * c-typeck.c (convert_arguments): Get location of a parameter. Change
4863 error and warning calls to error_at and warning_at. Pass location of
4864 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
4865 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4866 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
4867
97563bc8
IZ
48682014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
4869
4870 PR c/61191
4871 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4872 function parameters.
4873
aede2c10
JH
48742014-05-23 Jan Hubicka <hubicka@ucw.cz>
4875
4876 * c-decl.c (merge_decls): Preserve symtab node pointers.
4877 (duplicate_decls): Free new decl.
4878
edbba2ce
TS
48792014-05-23 Thomas Schwinge <thomas@codesourcery.com>
4880
f3316c6d
TS
4881 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4882 initialization.
4883
edbba2ce
TS
4884 * c-parser.c (c_parser_omp_target): Return bool values.
4885
68c81f24
TS
48862014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4887
4888 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4889 num_teams_loc variable to num_thread_limit_loc.
4890
632f2871
RS
48912014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4892
4893 * c-array-notation.c (expand_array_notations): Use void_node
4894 instead of void_zero_node.
4895
766090c2
TS
48962014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4897
4898 * c-decl.c (finish_struct): Adjust.
4899 (finish_enum): Likewise.
4900 (bind): Adjust.
4901 (record_inline_static): Likewise.
4902 (push_scope): Likewise.
4903 (make_label): Likewise.
4904 (lookup_label_for_goto): Likewise.
4905 (finish_struct): Likewise.
4906 (finish_enum): Likewise.
4907 (store_parm_decls): Likewise.
4908 (c_push_function_context): Likewise.
4909 * c-lang.h: Remove usage of variable_size gty attribute.
4910 * c-parser.c (c_parse_init): Adjust.
4911 (c_parse_file): Likewise.
4912
2b107f6b
MP
49132014-05-13 Marek Polacek <polacek@redhat.com>
4914
4915 PR c/61162
4916 * c-typeck.c (convert_for_assignment): Pass location to
4917 WARN_FOR_ASSIGNMENT instead of input_location.
4918
d033409e
MP
49192014-05-10 Marek Polacek <polacek@redhat.com>
4920
4921 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4922 maybe_warn_string_init.
4923 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4924 maybe_warn_string_init.
4925 * c-tree.h (maybe_warn_string_init): Update declaration.
4926 * c-typeck.c (maybe_warn_string_init): Add location parameter.
4927 Call pedwarn_init with loc instead of with input_location.
4928 (digest_init): Pass init_loc to maybe_warn_string_init.
4929 (pop_init_level): Call pedwarn_init with loc instead of with
4930 input_location.
4931 (set_init_index): Likewise.
4932 (process_init_element): Likewise.
4933
ea58ef42
MP
49342014-05-09 Marek Polacek <polacek@redhat.com>
4935
4936 PR c/61096
4937 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4938 (c_parser_initelt): Pass location to set_init_label. Pass array index
4939 location to set_init_index.
4940 * c-tree.h (push_init_level): Update declaration.
4941 (pop_init_level): Likewise.
4942 (set_init_index): Likewise.
4943 (set_init_label): Likewise.
4944 * c-typeck.c (error_init): Add location parameter. Call error_at
4945 instead of error.
4946 (digest_init): Pass init_loc to error_init.
4947 (really_start_incremental_init):
4948 (push_init_level): Add location parameter. Pass loc to pop_init_level
4949 and error_init.
4950 (pop_init_level): Likewise.
4951 (set_designator): Add location parameter. Pass loc to pop_init_level,
4952 push_init_level, and error_init.
4953 (set_init_index): Add location parameter. Pass loc to error_init and
4954 set_designator.
4955 (set_init_label): Likewise.
4956 (output_init_element): Pass loc to error_init.
4957 (process_init_element): Pass loc to error_init, pop_init_level,
4958 pedwarn_init, and push_init_level.
4959
661a0813
MP
49602014-05-09 Marek Polacek <polacek@redhat.com>
4961
4962 PR c/50459
4963 * c-parser.c (c_parser_attributes): Parse the arguments as an
4964 expression-list if the attribute takes identifier.
4965
2793eeab
MP
49662014-05-08 Marek Polacek <polacek@redhat.com>
4967
4968 PR c/61053
4969 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4970 TYPE_ALIGN_UNIT.
4971
f827930a
MP
49722014-05-08 Marek Polacek <polacek@redhat.com>
4973
4974 PR c/61077
4975 * c-decl.c (start_function): Warn for _Atomic-qualified return type
4976 of main.
4977
1d60af08
KZ
49782014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4979 Mike Stump <mikestump@comcast.net>
4980 Richard Sandiford <rdsandiford@googlemail.com>
4981
4982 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4983 (finish_enum): Use wide-int interfaces.
4984 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4985 * c-typeck.c (build_c_cast): Likewise.
4986 (set_nonincremental_init_from_string): Likewise.
4987 (c_tree_equal): Likewise.
4988
a0e24419
MP
49892014-05-02 Marek Polacek <polacek@redhat.com>
4990
4991 PR c/25801
4992 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
4993 Return size_one_node when the type is not complete.
4994 (pointer_diff): Remove comment.
4995 (build_unary_op): Improve error messages.
4996
19fc9faa
MP
49972014-05-02 Marek Polacek <polacek@redhat.com>
4998
4999 * c-typeck.c (c_finish_return): Separate warning_at calls.
5000
63bc4e87
MP
50012014-05-02 Marek Polacek <polacek@redhat.com>
5002
5003 * c-tree.h (error_init): Remove declaration.
5004 (pedwarn_init): Likewise.
5005 * c-typeck.c (error_init): Make static and move above.
5006 (pedwarn_init): Likewise.
5007 (warning_init): Move above.
5008 (maybe_warn_string_init): Likewise.
5009
4bd2511b
JL
50102014-05-01 Jeff Law <law@redhat.com>
5011
5012 Revert:
5013
5014 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5015 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
5016 avoid goto.
5017
6a358dcb
MP
50182014-05-02 Marek Polacek <polacek@redhat.com>
5019
5020 PR c/60784
5021 * c-typeck.c (push_init_level): Set constructor_designated to
5022 p->designated for structures.
5023
ae5ebda4
MP
50242014-05-01 Marek Polacek <polacek@redhat.com>
5025
5026 PR c/60915
5027 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
5028 function-definition has an attribute after the declarator.
5029
96b40f8d
MP
50302014-05-01 Marek Polacek <polacek@redhat.com>
5031
5032 PR c/60257
5033 * c-typeck.c (warning_init): Add location_t parameter. Call
5034 warning_at instead of warning.
5035 (push_init_level): Pass input_location to warning_init.
5036 (add_pending_init): Add location_t parameter. Pass loc to
5037 warning_init.
5038 (set_nonincremental_init): Pass input_location to add_pending_init.
5039 (set_nonincremental_init_from_string): Likewise.
5040 (output_init_element): Pass loc to warning_init and to
5041 add_pending_init.
5042
32e00768
MP
50432014-05-01 Marek Polacek <polacek@redhat.com>
5044
5045 PR c/43395
5046 * c-typeck.c (c_finish_return): Distinguish between label and variable
5047 when warning about returning local address.
5048
c9379ce2
MP
50492014-05-01 Marek Polacek <polacek@redhat.com>
5050
5051 PR c/29467
5052 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
5053 in C89 mode.
5054
d00887e8
MP
50552014-05-01 Marek Polacek <polacek@redhat.com>
5056
5057 PR c/43245
5058 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
5059 instead of 0 to WARN_FOR_QUALIFIERS.
5060
5436fa2e
MP
50612014-05-01 Marek Polacek <polacek@redhat.com>
5062
5063 PR c/56989
5064 * c-typeck.c (default_conversion): Use better location for
5065 error call.
5066
f8ed5150
MP
50672014-04-30 Marek Polacek <polacek@redhat.com>
5068
5069 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
5070 also when SANITIZE_FLOAT_DIVIDE is on.
5071
8337d1db
MP
50722014-04-30 Marek Polacek <polacek@redhat.com>
5073
5074 PR c/60139
5075 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
5076 and pedwarn_init. Use loc insted of input_location.
5077
c4bdc42f
MP
50782014-04-30 Marek Polacek <polacek@redhat.com>
5079
5080 PR c/60351
5081 * c-typeck.c (build_binary_op): Use location when warning about
5082 shift count.
5083
45484dcf
MP
50842014-04-25 Marek Polacek <polacek@redhat.com>
5085
5086 PR c/18079
5087 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
5088 always_inline/noinline and hot/cold attributes.
5089
34cf811f
MP
50902014-04-25 Marek Polacek <polacek@redhat.com>
5091
5092 PR c/60114
5093 * c-parser.c (c_parser_initelt): Pass input_location to
5094 process_init_element.
5095 (c_parser_initval): Pass loc to process_init_element.
5096 * c-tree.h (process_init_element): Adjust declaration.
5097 * c-typeck.c (push_init_level): Pass input_location to
5098 process_init_element.
5099 (pop_init_level): Likewise.
5100 (set_designator): Likewise.
5101 (output_init_element): Add location_t parameter. Pass loc to
5102 digest_init.
5103 (output_pending_init_elements): Pass input_location to
5104 output_init_element.
5105 (process_init_element): Add location_t parameter. Pass loc to
5106 output_init_element.
5107
42056eac
JJ
51082014-04-24 Jakub Jelinek <jakub@redhat.com>
5109
5110 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
5111 atomic-clause, allow comma in between atomic-clause and
5112 seq_cst.
5113
e162a134
JJ
51142014-04-22 Jakub Jelinek <jakub@redhat.com>
5115
5116 PR c/59073
5117 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
5118 fails, don't set OM_PARALLEL_COMBINED and return NULL.
5119
2f6babac
IZ
51202014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
5121
5122 PR middle-end/60469
5123 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5124 create_tmp_var instead build_decl for creating temps.
5125 (build_array_notation_expr): Likewise.
5126 (fix_conditional_array_notations_1): Likewise.
5127 (fix_array_notation_expr): Likewise.
5128 (fix_array_notation_call_expr): Likewise.
5129
8edbfaa6
JJ
51302014-03-28 Jakub Jelinek <jakub@redhat.com>
5131
5132 PR c++/60689
5133 * c-tree.h (c_build_function_call_vec): New prototype.
5134 * c-typeck.c (build_function_call_vec): Don't call
5135 resolve_overloaded_builtin here.
5136 (c_build_function_call_vec): New wrapper function around
5137 build_function_call_vec. Call resolve_overloaded_builtin here.
5138 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
5139 Call c_build_function_call_vec instead of build_function_call_vec.
5140 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
5141 * c-decl.c (finish_decl): Likewise.
5142
7485aeea
MLI
51432014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5144
5145 PR c/55383
5146 * c-typeck.c: Use correct format string in cast-qual warning
5147
b17a8b07
TS
51482014-03-07 Thomas Schwinge <thomas@codesourcery.com>
5149
5150 * c-decl.c (c_decl_attributes): Use
5151 lang_hooks.types.omp_mappable_type.
5152 * c-typeck.c (c_finish_omp_clauses): Likewise.
5153
3af9c5e9
MP
51542014-03-06 Marek Polacek <polacek@redhat.com>
5155
5156 PR c/60197
5157 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
5158 of checking tree code.
5159
1c9f5f33
PK
51602014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5161
5162 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
5163 (c_parser_parameter_declaration): Likewise.
5164
cc28fc7f
MP
51652014-02-19 Marek Polacek <polacek@redhat.com>
5166
5167 PR c/60195
5168 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
5169 Call mark_exp_read on exp.value.
5170 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
5171 TREE_ADDRESSABLE on old instead of val.
5172 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
5173
b581c05c
PK
51742014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5175
5176 * c-parser.c (c_parser_get_builtin_args): Replace calls to
5177 C_EXPR_APPEND by vec_safe_push.
5178 * c-tree.h (C_EXPR_APPEND): Remove.
5179
81e5eca8
MP
51802014-01-31 Marek Polacek <polacek@redhat.com>
5181
5182 PR c/59963
5183 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
5184 build_function_call_vec.
5185 (build_function_call): Likewise.
5186 (build_atomic_assign): Likewise.
5187 (build_function_call_vec): Add arg_loc parameter. Use it.
5188 (convert_arguments): Likewise.
5189 (convert_for_assignment): Rename rhs_loc to expr_loc.
5190 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
5191 (c_parser_objc_keywordexpr): Likewise.
5192 (c_parser_postfix_expression_after_primary): Call
5193 build_function_call_vec with expr_loc rather than op_loc.
5194 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
5195 build_function_call_vec.
5196 (c_parser_expr_list): Add locations parameter. Fill it with locations
5197 of function arguments.
5198 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
5199
68fca595
MP
52002014-01-30 Marek Polacek <polacek@redhat.com>
5201
5202 PR c/59940
5203 * c-typeck.c (build_function_call_vec): Use loc parameter.
5204 (convert_arguments): Add location parameter. Use it.
5205 (ep_convert_and_check): Likewise.
5206 (build_atomic_assign): Adjust convert_for_assignment call.
5207 (build_modify_expr): Likewise.
5208 (digest_init): Likewise.
5209 (c_finish_return): Likewise.
5210 (build_conditional_expr): Adjust ep_convert_and_check calls.
5211 (convert_for_assignment): Add rhs_loc parameter. Use it.
5212 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
5213 calls.
5214
fa337f3a
RB
52152014-01-30 Richard Biener <rguenther@suse.de>
5216
5217 PR c/59905
5218 * c-typeck.c (build_function_call_vec): Do not replace calls
5219 to a function via an incompatible type with a runtime abort.
5220
b72271b9
BI
52212014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
5222
5223 * c-parser.c (c_parser_declaration_or_fndef): Replaced
5224 flag_enable_cilkplus with flag_cilkplus.
5225 (c_parser_direct_declarator_inner): Likewise.
5226 (c_parser_attribute_any_word): Likewise.
5227 (c_parser_attributes): Likewise.
5228 (c_parser_compound_statement): Likewise.
5229 (c_parser_statement_after_labels): Likewise.
5230 (c_parser_if_statement): Likewise.
5231 (c_parser_switch_statement): Likewise.
5232 (c_parser_do_statement): Likewise.
5233 (c_parser_for_statement): Likewise.
5234 (c_parser_unary_expression): Likewise.
5235 (c_parser_postfix_expression): Likewise.
5236 (c_parser_postfix_expression_after_primary): Likewise.
5237 (c_parser_postfix_expression_after_primary): Likewise.
5238 (c_parser_omp_clause_name): Likewise.
5239 (c_finish_omp_declare_simd): Likewise.
5240 (c_parser_cilk_verify_simd): Likewise.
5241 * c-typeck.c (build_array_ref): Likewise.
5242 (build_function_call_vec): Likewise.
5243 (convert_arguments): Likewise.
5244 (build_compound_expr): Likewise.
5245 (c_finish_return): Likewise.
5246 (c_finish_if_stmt): Likewise.
5247 (c_finish_loop): Likewise.
5248 (build_binary_op): Likewise.
5249
393e8e8b
MP
52502014-01-23 Marek Polacek <polacek@redhat.com>
5251
5252 PR c/59846
5253 * c-typeck.c (parser_build_binary_op): Use location instead of
5254 input_location.
5255 (build_binary_op): Pass location to shorten_compare.
5256
f04dda30
MP
52572014-01-23 Marek Polacek <polacek@redhat.com>
5258
5259 PR c/58346
5260 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
5261 an empty aggregate.
5262
789eadcd
MP
52632014-01-23 Marek Polacek <polacek@redhat.com>
5264
5265 PR c/59871
5266 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
5267 of a comma expression.
5268 (emit_side_effect_warnings): Likewise.
5269
40f14e9f
BI
52702014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5271
5272 PR c/59825
5273 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
5274 function to use walk_tree and moved a lot of its functionality to
5275 expand_array_notations.
5276 (expand_array_notations): New function.
5277
74558dd9
BI
52782014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5279
5280 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
5281 attribute an attribute without value.
5282
652fea39
JJ
52832014-01-23 Jakub Jelinek <jakub@redhat.com>
5284
5285 PR middle-end/58809
5286 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
5287 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
5288
f34f1c87
MP
52892014-01-22 Marek Polacek <polacek@redhat.com>
5290
5291 PR c/59891
5292 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
5293 of remove_c_maybe_const_expr on op1 and op2.
5294
241f845a
JJ
52952014-01-15 Jakub Jelinek <jakub@redhat.com>
5296
5297 PR c/58943
5298 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
5299 effects, preevaluate rhs using SAVE_EXPR first.
5300
9a74f20c
BI
53012014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
5302
5303 PR c++/59631
5304 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
5305 statements with if-elseif statements.
5306
96066ce1
MP
53072014-01-06 Marek Polacek <polacek@redhat.com>
5308
5309 PR c/57773
5310 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
5311 defined bit-field types only in ISO C.
5312
23a5b65a
RS
53132014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5314
5315 Update copyright years
5316
f9030485
RS
53172014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5318
5319 * c-array-notation.c: Use the standard form for the copyright notice.
5320
41958c28
BI
53212013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
5322
5323 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
5324 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
5325 field in parser is not empty. If not-empty, call the function
5326 c_parser_finish_omp_declare_simd.
5327 (c_parser_cilk_clause_vectorlength): Modified function to be shared
5328 between SIMD-enabled functions and #pragma simd. Added new parameter.
5329 (c_parser_cilk_all_clauses): Modified the usage of the function
5330 c_parser_cilk_clause_vectorlength as mentioned above.
5331 (c_parser_cilk_simd_fn_vector_attrs): New function.
5332 (c_finish_cilk_simd_fn_tokens): Likewise.
5333 (is_cilkplus_vector_p): Likewise.
5334 (c_parser_omp_clause_name): Added checking for "vectorlength,"
5335 "nomask," and "mask" strings in clause name.
5336 (c_parser_omp_all_clauses): Added 3 new case statements:
5337 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
5338 PRAGMA_CILK_CLAUSE_NOMASK.
5339 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
5340 check for vector attribute and if so call the function
5341 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
5342 called the function c_finish_cilk_simd_fn_tokens.
5343 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
5344 parser field is non-empty. If so, parse them as you would parse
5345 the omp declare simd pragma.
5346 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
5347 Added a check when step is a parameter and flag it as error.
5348 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
5349 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
5350 pragma_omp_clause.
5351
cef0fd0e
TS
53522013-12-17 Thomas Schwinge <thomas@codesourcery.com>
5353
5354 * c-parser.c (c_parser_omp_parallel): Fix description.
5355
12893402
BI
53562013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
5357
5358 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
5359 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5360 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
5361 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
5362
296674db
JM
53632013-12-04 Joseph Myers <joseph@codesourcery.com>
5364
5365 PR c/52023
5366 * c-parser.c (c_parser_alignas_specifier): Use
5367 c_sizeof_or_alignof_type instead of c_alignof.
5368 (c_parser_alignof_expression): Likewise, with min_alignof
5369 parameter depending on alignof spelling used.
5370
edd28054
MP
53712013-12-04 Marek Polacek <polacek@redhat.com>
5372
5373 PR c/54113
5374 * c-decl.c (start_function): Don't warn for missing prototype for
5375 inline functions.
5376
da0fc454
MP
53772013-12-03 Marek Polacek <polacek@redhat.com>
5378
5379 PR c/59351
5380 * c-decl.c (build_compound_literal): Allow compound literals with
5381 empty initial value.
5382
4c2ecab0
JM
53832013-12-02 Joseph Myers <joseph@codesourcery.com>
5384
5385 PR c/58235
5386 * c-typeck.c (build_modify_expr): Diagnose assignment to
5387 expression with array type.
5388
340baef7
JM
53892013-11-29 Joseph Myers <joseph@codesourcery.com>
5390
5391 PR c/42262
5392 * c-typeck.c (process_init_element): Do not treat a string as
5393 initializing a whole array when used with a designator for an
5394 individual element.
5395
6763b9f7
JM
53962013-11-29 Joseph Myers <joseph@codesourcery.com>
5397
5398 PR c/57574
5399 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
5400 an inline function following a static declaration.
5401
e7bd1de1
JJ
54022013-11-28 Jakub Jelinek <jakub@redhat.com>
5403
5404 PR c/59310
5405 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
5406 to p_name before calling c_parser_omp_teams instead of after.
5407 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
5408 argument. Remove unused p_name variable.
5409
0136f8f0
AH
54102013-11-27 Aldy Hernandez <aldyh@redhat.com>
5411 Jakub Jelinek <jakub@redhat.com>
5412
5413 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
5414 external_scope is NULL.
5415
241b71bb
TV
54162013-11-27 Tom de Vries <tom@codesourcery.com>
5417 Marc Glisse <marc.glisse@inria.fr>
5418
5419 PR c++/59032
5420 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
5421
2fb9a547
AM
54222013-11-22 Andrew MacLeod <amacleod@redhat.com>
5423
5424 * c-typeck.c: Add required include files from gimple.h.
5425
8400e75e
DM
54262013-11-22 David Malcolm <dmalcolm@redhat.com>
5427
5428 * c-decl.c (define_label, shadow_tag_warned)
5429 (check_bitfield_type_and_width, grokdeclarator, grokparms,
5430 store_parm_decls_newstyle, store_parm_decls_oldstyle)
5431 (declspecs_add_type): Remove use of in_system_header macro.
5432 * c-parser.c (c_parser_unary_expression): Likewise.
5433 * c-typeck.c (store_init_value, process_init_element)
5434 (c_start_case): Likewise.
5435
5436 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
5437 macro.
5438
5439 * c-parser.c (c_parser_set_source_position_from_token): Remove
5440 reference to in_system_header from comment.
5441
386b1f1f
RS
54422013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5443
5444 * c-decl.c (grokdeclarator): Update comment to refer to
5445 tree_to_[su]hwi rather than tree_low_cst.
5446
ae7e9ddd
RS
54472013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5448
5449 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
5450 tree_to_uhwi throughout.
5451
9439e9a1
RS
54522013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5453
5454 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
5455 throughout.
5456
9541ffee
RS
54572013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5458
5459 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
5460 throughout.
5461
c02065fc
AH
54622013-11-15 Aldy Hernandez <aldyh@redhat.com>
5463
5464 * c-parser.c (c_parser_cilk_simd): New.
5465 (c_parser_cilk_verify_simd): New.
5466 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
5467 (c_parser_omp_for_loop): Add case for NE_EXPR.
5468 Set c_break_label for CILK_SIMD.
5469 (c_parser_cilk_clause_vectorlength): New.
5470 (c_parser_cilk_clause_linear): New.
5471 (c_parser_cilk_clause_name): New.
5472 (c_parser_cilk_all_clauses): New.
5473 * c-typeck.c (build_unary_op): Pass location argument to
5474 readonly_error.
5475 (build_modify_expr): Same.
5476 (build_asm_expr): Same.
5477 (c_finish_bc_stmt): Error on break/continue in loops.
5478
18f429e2
AM
54792013-11-14 Andrew MacLeod <amacleod@redhat.com>
5480
5481 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
5482
d8a2d370
DN
54832013-11-14 Diego Novillo <dnovillo@google.com>
5484
5485 * c-decl.c: Include print-tree.h.
5486 Include stor-layout.h.
5487 Include varasm.h.
5488 Include attribs.h.
5489 Include stringpool.h.
5490 * c-lang.c: Include fold-const.h.
5491 * c-parser.c: Include stringpool.h.
5492 Include attribs.h.
5493 Include stor-layout.h.
5494 Include varasm.h.
5495 Include trans-mem.h.
5496 * c-typeck.c: Include stor-layout.h.
5497 Include trans-mem.h.
5498 Include varasm.h.
5499 Include stmt.h.
5500
38b7bc7f
JM
55012013-11-13 Joseph Myers <joseph@codesourcery.com>
5502
5503 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
5504 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
5505 __auto_type.
5506 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
5507 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
5508 RID_AUTO_TYPE.
5509 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
5510 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
5511 (c_parser_declarator, c_parser_direct_declarator_inner)
5512 (c_parser_parameter_declaration, c_parser_type_name): All callers
5513 changed.
5514 (c_parser_declaration_or_fndef): Handle declarations with type
5515 determined from the initializer.
5516
45b0be94
AM
55172013-11-12 Andrew MacLeod <amacleod@redhat.com>
5518
18f429e2 5519 * c-typeck.c: Include gimplify.h.
45b0be94 5520
582d9b50
JM
55212013-11-12 Joseph Myers <joseph@codesourcery.com>
5522
5523 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
5524 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
5525 comment.
5526 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
5527 or _Thread_local as appropriate in diagnostics.
5528 (build_null_declspecs): Initialize ret->thread_gnu_p.
5529 (declspecs_add_scspec): Handle either __thread or _Thread_local
5530 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
5531 pedantic. Do not disallow _Thread_local extern and _Thread_local
5532 static.
5533
267bac10
JM
55342013-11-07 Joseph Myers <joseph@codesourcery.com>
5535 Andrew MacLeod <amacleod@redhat.com>
5536
5537 * c-aux-info.c (gen_type): Handle atomic qualifier.
5538 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
5539 qualifiers when compating types.
5540 (shadow_tag_warned): Handle atomic_p in declspecs.
5541 (quals_from_declspecs): Likewise.
5542 (start_decl): Use c_type_promotes_to when promoting argument
5543 types.
5544 (grokdeclarator): Handle _Atomic.
5545 (get_parm_info): Diagnose any qualifier on "void" as only
5546 parameter.
5547 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
5548 comparing types. Use c_type_promotes_to when promoting argument
5549 types.
5550 (finish_function): Use c_type_promotes_to when promoting argument
5551 types.
5552 (build_null_declspecs): Handle atomic_p in declspecs.
5553 (declspecs_add_qual): Handle RID_ATOMIC.
5554 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
5555 (c_token_starts_declspecs): Handle RID_ATOMIC.
5556 (c_parser_declspecs): Handle atomic type specifiers and
5557 qualifiers.
5558 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
5559 from types of expressions with atomic type.
5560 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
5561 (c_parser_attribute_any_word): Handle RID_ATOMIC.
5562 (c_parser_initializer, c_parser_initelt, c_parser_initval)
5563 (c_parser_statement_after_labels, c_parser_switch_statement)
5564 (c_parser_for_statement, c_parser_expr_no_commas)
5565 (c_parser_conditional_expression, c_parser_binary_expression)
5566 (c_parser_cast_expression, c_parser_unary_expression)
5567 (c_parser_postfix_expression)
5568 (c_parser_postfix_expression_after_primary, c_parser_expression):
5569 Use convert_lvalue_to_rvalue.
5570 (c_parser_expression_conv, c_parser_expr_list): Document
5571 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
5572 (c_parser_objc_synchronized_statement): Use
5573 convert_lvalue_to_rvalue.
5574 (c_parser_objc_selector): Handle RID_ATOMIC.
5575 (c_parser_objc_receiver, c_parser_array_notation): Use
5576 convert_lvalue_to_rvalue.
5577 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
5578 _Atomic (type-name).
5579 (struct c_declspecs): Add atomic_p field.
5580 (convert_lvalue_to_rvalue): Declare.
5581 * c-typeck.c (c_type_promotes_to): Promote atomic types to
5582 corresponding atomic types.
5583 (qualify_type): Don't add _Atomic qualifiers from second argument.
5584 (comp_target_types): Do not allow _Atomic mismatches.
5585 (type_lists_compatible_p): Do not remove atomic qualifiers when
5586 comparing types.
5587 (really_atomic_lvalue, convert_lvalue_to_rvalue)
5588 (build_atomic_assign): New functions.
5589 (build_unary_op): Use build_atomic_assign for atomic increment and
5590 decrement.
5591 (build_conditional_expr): Do not treat _Atomic void as a qualified
5592 version of void.
5593 (build_modify_expr): Use build_atomic_assign for atomic LHS.
5594 (find_anonymous_field_with_type, convert_to_anonymous_field)
5595 (convert_for_assignment): Do not remove atomic qualifiers when
5596 comparing types.
5597 (digest_init): Do not accept initialization of arrays of atomic
5598 elements by string constants.
5599 (build_asm_expr): Use convert_lvalue_to_rvalue.
5600 (build_binary_op): Do not treat _Atomic void as a qualified
5601 version of void.
5602
0c249d4b
DD
56032013-11-06 DJ Delorie <dj@redhat.com>
5604
5605 * c-decl.c (locate_old_decl): If a previous conflicting decl is
5606 both explicit and builtin, print the location of the explicit one.
5607
6d7f7e0a
TB
56082013-11-05 Tobias Burnus <burnus@net-b.de>
5609
5610 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
5611 c_parser_omp_distribute, c_parser_omp_teams,
5612 c_parser_omp_target, c_parser_omp_declare): Handle
5613 -fopenmp-simd.
5614
b906f4ca
MP
56152013-11-03 Marek Polacek <polacek@redhat.com>
5616
5617 * c-decl.c (grokdeclarator): Add VLA instrumentation.
5618
ee1d5a02
JJ
56192013-11-01 Jakub Jelinek <jakub@redhat.com>
5620
5621 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
5622 check_dup_generic at the end, unless remove is true.
5623 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
5624 remove = true;.
5625 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
5626
5a9785fb
JJ
56272013-10-31 Jakub Jelinek <jakub@redhat.com>
5628
5629 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
5630 with decl that is not pointer nor array.
5631
939b37da
BI
56322013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
5633
5634 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
5635 a spawning function is found.
5636 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
5637 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
5638 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5639 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
5640 case.
5641 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
5642 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
5643 expr.
5644 (c_finish_return): Added a check to reject _Cilk_spawn in return
5645 expression.
5646 (build_cilk_spawn): New function.
5647 (build_cilk_sync): Likewise.
5648 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
5649
d4af74d4
TB
56502013-10-27 Tobias Burnus <burnus@net-b.de>
5651
5652 PR other/33426
5653 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
5654 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
5655 (c_parser_statement_after_labels): Update calls.
5656
d73749df 56572013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
5658
5659 PR other/33426
5660 * c-parser.c (c_parser_pragma, c_parser_for_statement):
5661 Handle PRAGMA_IVDEP.
5662 (c_parser_statement_after_labels): Update call.
5663
f28aa681
MP
56642013-10-24 Marek Polacek <polacek@redhat.com>
5665
5666 * c-parser.c (c_parser_struct_declaration): Add a comment.
5667 (c_parser_declarator): Don't allow _Alignas here.
5668
0645c1a2
AM
56692013-10-17 Andrew MacLeod <amacleod@redhat.com>
5670
5671 * c-parser.c: Include omp-low.h.
5672 * c-typeck.c: Likewise.
5673
568a31f2
MP
56742013-10-17 Marek Polacek <polacek@redhat.com>
5675
5676 PR c/58267
5677 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
5678 Document syntax of the array-declarator.
5679 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
5680 are not permitted.
5681 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
5682 (c_parser_struct_declaration): Likewise.
5683 (c_parser_declarator): Likewise.
5684 (c_parser_direct_declarator_inner): Likewise.
5685 (c_parser_parameter_declaration): Likewise.
5686 (c_parser_type_name): Likewise.
5687
acf0174b
JJ
56882013-10-11 Jakub Jelinek <jakub@redhat.com>
5689
5690 * c-lang.h (current_omp_declare_target_attribute): New extern
5691 decl.
5692 * c-parser.c: Include c-lang.h.
5693 (struct c_parser): Change tokens to c_token *.
5694 Add tokens_buf field. Change tokens_avail type to unsigned int.
5695 (c_parser_consume_token): If parser->tokens isn't
5696 &parser->tokens_buf[0], increment parser->tokens.
5697 (c_parser_consume_pragma): Likewise.
5698 (enum pragma_context): Add pragma_struct and pragma_param.
5699 (c_parser_external_declaration): Adjust
5700 c_parser_declaration_or_fndef caller.
5701 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
5702 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
5703 Adjust recursive call.
5704 (c_parser_struct_or_union_specifier): Use pragma_struct instead
5705 of pragma_external.
5706 (c_parser_parameter_declaration): Use pragma_param instead of
5707 pragma_external.
5708 (c_parser_compound_statement_nostart, c_parser_label,
5709 c_parser_for_statement): Adjust
5710 c_parser_declaration_or_fndef callers.
5711 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
5712 it through to c_parser_conditional_expression.
5713 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
5714 pass it through to c_parser_binary_expression. Adjust recursive
5715 call.
5716 (c_parser_binary_expression): Remove prec argument, add
5717 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
5718 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
5719 binop matches it, use build2 instead of parser_build_binary_op.
5720 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
5721 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
5722 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
5723 Handle pragma_struct and pragma_param the same as pragma_external.
5724 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5725 (c_parser_omp_variable_list): Parse array sections for
5726 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5727 (c_parser_omp_clause_collapse): Fully fold collapse expression.
5728 (c_parser_omp_clause_reduction): Handle user defined reductions.
5729 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5730 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5731 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5732 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5733 c_parser_omp_clause_depend, c_parser_omp_clause_map,
5734 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5735 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5736 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5737 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
5738 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
5739 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5740 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
5741 (c_parser_omp_for_loop): Add CODE argument, pass it through
5742 to c_finish_omp_for. Change last argument to cclauses,
5743 and adjust uses to grab parallel clauses from the array of all
5744 the split clauses. Adjust c_parser_binary_expression,
5745 c_parser_declaration_or_fndef and c_finish_omp_for callers.
5746 (omp_split_clauses): New function.
5747 (c_parser_omp_simd): New function.
5748 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5749 Allow the function to be called also when parsing combined constructs,
5750 and call c_parser_omp_simd when parsing for simd.
5751 (c_parser_omp_sections_scope): If section-sequence doesn't start with
5752 #pragma omp section, require exactly one structured-block instead of
5753 sequence of statements.
5754 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5755 Allow the function to be called also when parsing combined constructs.
5756 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
5757 Allow the function to be called also when parsing combined
5758 constructs.
5759 (c_parser_omp_taskgroup, c_parser_omp_cancel,
5760 c_parser_omp_cancellation_point, c_parser_omp_distribute,
5761 c_parser_omp_teams, c_parser_omp_target_data,
5762 c_parser_omp_target_update, c_parser_omp_target,
5763 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
5764 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
5765 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
5766 (c_parser_omp_construct): Add p_name and mask vars. Handle
5767 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
5768 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
5769 and c_parser_omp_sections callers.
5770 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
5771 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5772 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5773 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
5774 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
5775 OMP_CLAUSE_DEPEND.
5776 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5777 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5778 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5779 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5780 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5781 * c-typeck.c: Include tree-inline.h.
5782 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5783 handle_omp_array_sections_1, handle_omp_array_sections,
5784 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5785 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5786 user defined reductions.
5787 (c_tree_equal): New function.
5788 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5789 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5790 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5791 c_check_omp_declare_reduction_r): New prototypes.
5792 * c-decl.c (current_omp_declare_target_attribute): New variable.
5793 (c_decl_attributes): New function.
5794 (start_decl, start_function): Use it instead of decl_attributes.
5795 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5796 c_omp_reduction_decl, c_omp_reduction_lookup,
5797 c_check_omp_declare_reduction_r): New functions.
5798
0a6c2227
TT
57992013-09-25 Tom Tromey <tromey@redhat.com>
5800
5801 * Make-lang.in (c/gccspec.o): Remove.
5802 (CFLAGS-c/gccspec.o): New variable.
5803 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
5804 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
5805 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5806
f3bc55f0
TT
58072013-09-25 Tom Tromey <tromey@redhat.com>
5808
5809 * Make-lang.in (c/gccspec.o): Don't use subshell.
5810
a24d975c
MP
58112013-09-18 Marek Polacek <polacek@redhat.com>
5812
5813 PR sanitize/58443
5814 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5815 Remove unnecessary check.
5816
ce6923c5
MP
58172013-09-18 Marek Polacek <polacek@redhat.com>
5818
5819 PR sanitizer/58411
5820 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
5821 no_sanitize_undefined attribute.
5822
a1e51df9
KT
58232013-09-13 Kai Tietz <ktietz@redhat.com>
5824
5825 PR target/57848
5826 * c-decl.c (c_builtin_function_ext_scope): Remove
5827 wrong assumption that it is never called on prexisting
5828 symbol.
5829
0af94e6f
JR
58302013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
5831
5832 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
5833
20059c8b
GDR
58342013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5835
5836 * c-objc-common.c (c_tree_printer): Tidy.
5837
de5a5fa1
MP
58382013-08-30 Marek Polacek <polacek@redhat.com>
5839
5840 * c-typeck.c (build_binary_op): Add division by zero and shift
5841 instrumentation.
5842
2531a1d9 58432013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 5844 Joseph Myers <joseph@codesourcery.com>
2531a1d9 5845
6e2bcc98 5846 PR c/35649
2531a1d9
JR
5847 * c-typeck.c (c_common_type): Prefer double_type_node over
5848 other REAL_TYPE types with the same precision.
5849 (convert_arguments): Likewise.
5850
025311c4
GDR
58512013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5852
5853 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
5854 (c_initialize_diagnostics): Call a destructor for the early printer.
5855
da6ca2b5
GDR
58562013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5857
5858 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5859 printer initialization.
5860
318cda85 58612013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 5862
318cda85
BI
5863 PR c/57490
5864 * c-array-notation.c (fix_conditional_array_notations_1): Added a
5865 check for truth values.
5866 (expand_array_notation_exprs): Added truth values case. Removed an
5867 unwanted else. Added for-loop to walk through subtrees in default
5868 case.
5869
b066401f
GDR
58702013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5871
5872 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5873
fb48aadc
JM
58742013-07-23 Joseph Myers <joseph@codesourcery.com>
5875
5876 * c-parser.c (struct c_generic_association): Fix typo.
5877
433cc7b0
TT
58782013-07-23 Tom Tromey <tromey@redhat.com>
5879 Joseph Myers <joseph@codesourcery.com>
5880
5881 * c-parser.c (struct c_generic_association): New.
5882 (c_generic_association_d): New typedef.
5883 (c_parser_generic_selection): New function.
5884 (c_parser_postfix_expression): Handle RID_GENERIC.
5885
26d40c3d
JM
58862013-07-13 Jason Merrill <jason@redhat.com>
5887
5888 PR c++/57793
5889 * c-decl.c (finish_struct): Check for too-large class.
5890
ecdbd01a 58912013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
5892
5893 PR c/57821
5894 * c-typeck.c (set_init_index): When folding, check for index overflow.
5895
1141ed3f
BI
58962013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5897
5898 * c-parser.c (c_parser_array_notation): Removed rejection of array
5899 notations in an array of function pointers.
5900
713b46fa
BI
59012013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5902
5903 * c-array-notation.c (make_triplet_val_inv): New function.
5904 (create_cmp_incr): Likewise.
5905 (create_array_refs): Likewise.
5906 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5907 Also modularized common parts between functions and called the function.
5908 (build_array_notation_expr): Likewise.
5909 (fix_conditional_array_notations_1): Likewise.
5910 (fix_array_notation_expr): Likewise.
5911 (fix_array_notation_call_expr): Likewise.
5912
92f20202
MP
59132013-06-18 Marek Polacek <polacek@redhat.com>
5914
5915 PR c/57630
5916 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5917
73a23b06
BI
59182013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
5919
5920 * c-array-notation.c (build_array_notation_expr): Reject array notation
5921 mismatch between LHS and RHS even inside a call_expr. Also, removed
5922 a couple while statements that were dead code.
5923
00b8517d
BI
59242013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
5925
5926 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5927 excessive precision expressions in function parameters. Also removed
5928 couple unwanted while statements.
5929
1509bdda
BI
59302013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5931
5932 * c-array-notation.c (expand_array_notation_exprs): Added
5933 ARRAY_NOTATION_REF case.
5934
d60f1706
BI
59352013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5936
5937 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5938 function to c-family/array-notation-common.c.
5939 (is_cilkplus_reduce_builtin): Likewise.
5940 (find_rank): Likewise.
5941 (extract_array_notation_exprs): Likewise.
5942 (replace_array_notations): Likewise.
5943 (find_inv_trees): Likewise.
5944 (replace_inv_trees): Likewise.
5945 (contains_array_notation_expr): Likewise.
5946 (find_correct_array_notation_type): Likewise.
5947 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5948 (struct inv_list): Moved this to c-family/array-notation-common.c.
5949 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5950
6d6efbb3
BI
59512013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
5952
5953 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5954 reduction functions outside the for-loop. Added a check if the fundecl
5955 is non-NULL. Finally, removed an unwanted if-statement, and made the
5956 body unconditional.
5957
25c22937
BI
59582013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5959
5960 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5961 condition of the if-statement matches the rank of else-block and then-
5962 block when array notations are used.
5963 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5964 expression after the entire function body is parsed.
5965 (c_parser_expr_no_commas): Delayed creating array notation expressions
5966 to the end of function parsing.
5967 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5968 whole if-statement instead of just the condition.
5969 (expand_array_notation_exprs): Added MODIFY_EXPR case.
5970
edd25645
BI
59712013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5972
5973 PR c/57474
5974 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5975 array to NULL_TREE if they are unused. Also added a check for the
5976 field to be NULL before its fields are used in future.
5977
065ce7f1
RO
59782013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5979
5980 PR bootstrap/57450
5981 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5982 (build_array_notation_expr): Likewise.
5983
36536d79
BI
59842013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5985
5986 * c-typeck.c (build_array_ref): Added a check to see if array's
5987 index is greater than one. If true, then emit an error.
5988 (build_function_call_vec): Exclude error reporting and checking
5989 for builtin array-notation functions.
5990 (convert_arguments): Likewise.
5991 (c_finish_return): Added a check for array notations as a return
5992 expression. If true, then emit an error.
5993 (c_finish_loop): Added a check for array notations in a loop
5994 condition. If true then emit an error.
5995 (lvalue_p): Added a ARRAY_NOTATION_REF case.
5996 (build_binary_op): Added a check for array notation expr inside
5997 op1 and op0. If present, we call another function to find correct
5998 type.
5999 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
6000 * c-parser.c (c_parser_compound_statement): Check if array
6001 notation code is used in tree, if so, then transform them into
6002 appropriate C code.
6003 (c_parser_expr_no_commas): Check if array notation is used in LHS
6004 or RHS, if so, then build array notation expression instead of
6005 regular modify.
6006 (c_parser_postfix_expression_after_primary): Added a check for
6007 colon(s) after square braces, if so then handle it like an array
6008 notation. Also, break up array notations in unary op if found.
6009 (c_parser_direct_declarator_inner): Added a check for array
6010 notation.
6011 (c_parser_compound_statement): Added a check for array notation in
6012 a stmt. If one is present, then expand array notation expr.
6013 (c_parser_if_statement): Likewise.
6014 (c_parser_switch_statement): Added a check for array notations in
6015 a switch statement's condition. If true, then output an error.
6016 (c_parser_while_statement): Similarly, but for a while.
6017 (c_parser_do_statement): Similarly, but for a do-while.
6018 (c_parser_for_statement): Similarly, but for a for-loop.
6019 (c_parser_unary_expression): Check if array notation is used in a
6020 pre-increment or pre-decrement expression. If true, then expand
6021 them.
6022 (c_parser_array_notation): New function.
6023 * c-array-notation.c: New file.
6024 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
6025
cd192ccc
MS
60262013-05-23 Mike Stump <mikestump@comcast.net>
6027
6028 * c-typeck.c (convert_for_assignment): Handle references to memory
6029 spaces better.
6030
427b248d
JM
60312013-05-16 Jason Merrill <jason@redhat.com>
6032
6033 * Make-lang.in (cc1$(exeext)): Use link mutex.
6034
44d90fe1
PC
60352013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6036
6037 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
6038 to simply use OPT_Wpointer_arith.
6039 (build_unary_op): Likewise.
6040
4e7d7b3d
JJ
60412013-04-03 Jakub Jelinek <jakub@redhat.com>
6042
6043 PR c/19449
6044 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
6045 argument. If set, or it temporarily for parsing of the first
6046 argument into force_folding_builtin_constant_p.
6047 (c_parser_postfix_expression): Adjust callers.
6048
839b422f
RB
60492013-03-21 Richard Biener <rguenther@suse.de>
6050
6051 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
6052 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
6053
2ee028f1
MP
60542013-02-12 Marek Polacek <polacek@redhat.com>
6055
6056 PR c/44938
6057 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
6058 origtypes to NULL.
6059
8824edff
JJ
60602013-01-24 Jakub Jelinek <jakub@redhat.com>
6061
6062 PR c/56078
6063 * c-typeck.c (set_nonincremental_init_from_string): If
6064 constructor_max_index is NULL, treat it as if tree_int_cst_lt
6065 returned false.
6066 (process_init_element): Likewise.
6067
eadd3d0d
JJ
60682012-12-20 Jakub Jelinek <jakub@redhat.com>
6069
6070 PR c++/55619
6071 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
6072 argument, don't call default_function_array_conversion
6073 nor c_fully_fold here.
6074 (c_parser_asm_statement): Adjust callers.
6075 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
6076 and outputs here, and call default_function_array_conversion
6077 on inputs that don't need to be addressable.
6078
f8a93a2e
JJ
60792012-12-18 Jakub Jelinek <jakub@redhat.com>
6080
6081 PR c/39464
6082 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
6083 warning require that both c_common_unsigned_type as well as
6084 c_common_signed_type is the same for both mvl and mvr types.
6085
9771b263
DN
60862012-11-16 Diego Novillo <dnovillo@google.com>
6087
6088 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
6089
6090 * c-common.c: Use new vec API in vec.h.
6091 * c-common.h: Likewise.
6092 * c-gimplify.c: Likewise.
6093 * c-pragma.c: Likewise.
6094 * c-pretty-print.c: Likewise.
6095 * c-pretty-print.h: Likewise.
6096 * c-semantics.c: Likewise.
6097 * c-decl.c: Likewise.
6098 * c-parser.c: Likewise.
6099 * c-tree.h: Likewise.
6100 * c-typeck.c: Likewise.
6101
880661a4
JW
61022012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
6103
6104 PR c++/54930
6105 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
6106
077d1abe
MLI
61072012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6108
6109 PR c/53066
6110 * c-decl.c (warn_if_shadowing): Do not warn if a variable
6111 shadows a function, unless the variable is a function or a
6112 pointer-to-function.
6113
3a785c97
JJ
61142012-10-12 Jakub Jelinek <jakub@redhat.com>
6115
6116 PR c/54381
6117 * c-parser.c (struct c_tree_loc_pair): Removed.
6118 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
6119 add location_t * and tree * arguments, fill in array of 3
6120 sizeof_arg trees and corresponding locs.
6121 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
6122 c_parser_expr_list callers.
6123 (c_parser_postfix_expression_after_primary): Likewise. Pass
6124 array of 3 sizeof_arg trees and locs (corresponding to first
6125 3 arguments) to sizeof_pointer_memaccess_warning.
6126
703c8606
LC
61272012-10-09 Lawrence Crowl <crowl@google.com>
6128
6129 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
6130 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
6131 hash table.
6132
5d9de0d0
PC
61332012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
6134
6135 PR c++/54194
6136 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
6137 call.
6138
a212e43f
MG
61392012-10-09 Marc Glisse <marc.glisse@inria.fr>
6140
6141 PR c++/54427
6142 * c-typeck.c: Include c-common.h.
6143 (enum stv_conv): Moved to c-common.h.
6144 (scalar_to_vector): Moved to c-common.c.
6145 (build_binary_op): Adapt to scalar_to_vector's new prototype.
6146 * Make-lang.in: c-typeck.c depends on c-common.h.
6147
3b78de56
AC
61482012-10-04 Arnaud Charlet <charlet@adacore.com>
6149
6150 * c-decl.c (c_write_global_declarations): Fix handling of
6151 -fdump-ada-spec*.
6152
78c60e3d
SS
61532012-09-30 Sharad Singhai <singhai@google.com>
6154
6155 * c-decl.c (c_write_global_declarations): Use a different method
6156 to determine if the dump has ben initialized.
6157
9f33203d
JM
61582012-09-14 Joseph Myers <joseph@codesourcery.com>
6159
6160 PR c/54552
6161 * c-typeck.c (c_cast_expr): When casting to a type requiring
6162 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
6163 c_fully_fold first.
6164
a27d595d
JM
61652012-09-14 Joseph Myers <joseph@codesourcery.com>
6166
6167 PR c/54103
6168 * c-typeck.c (build_unary_op): Pass original argument of
6169 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
6170 any C_MAYBE_CONST_EXPR, if it has integer operands.
6171 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
6172 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
6173 to c_objc_common_truthvalue_conversion, then remove any
6174 C_MAYBE_CONST_EXPR, if they have integer operands. Use
6175 c_objc_common_truthvalue_conversion not
6176 c_common_truthvalue_conversion.
6177 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
6178 call note_integer_operands for arguments with integer operands
6179 that are not integer constants.
6180
9feb29df
JJ
61812012-09-13 Jakub Jelinek <jakub@redhat.com>
6182
6183 PR c/54559
6184 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
6185 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
6186
d409320c
JJ
61872012-08-31 Jakub Jelinek <jakub@redhat.com>
6188
6189 PR c/54428
6190 * c-convert.c (convert): Don't call fold_convert_loc if
6191 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
6192 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
6193 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
6194
6265d07c
JJ
61952012-08-24 Jakub Jelinek <jakub@redhat.com>
6196
6197 PR c/54355
6198 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
6199 for nested and empty_ok arguments in the call to
6200 c_parser_declaration_or_fndef.
6201
1a4049e7
JJ
62022012-08-17 Jakub Jelinek <jakub@redhat.com>
6203
6204 * c-tree.h (c_last_sizeof_arg): Declare.
6205 * c-parser.c (struct c_tree_loc_pair): New type.
6206 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
6207 non-NULL.
6208 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
6209 (c_parser_postfix_expression_after_primary): Likewise. Call
6210 sizeof_pointer_memaccess_warning if needed.
6211 (sizeof_ptr_memacc_comptypes): New function.
6212 * c-typeck.c (c_last_sizeof_arg): New global variable.
6213 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
6214
0229aee9
UB
62152012-07-24 Uros Bizjak <ubizjak@gmail.com>
6216
6217 * c-lang.h (lang_decl): Add variable_size GTY option.
6218
7ee2468b
SB
62192012-07-16 Steven Bosscher <steven@gcc.gnu.org>
6220
6221 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
6222 * Make-lang.in: Fix dependencies.
6223
d4a10d0a
SB
62242012-06-29 Steven Bosscher <steven@gcc.gnu.org>
6225
6226 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
6227 and add language Makefile hooks.
6228 * config-lang.in: New file.
6229 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
6230 add the required "normal" config-lang.in rules.
6231 * c-lang.h: Moved from gcc/ to here.
6232 * c-tree.h: Likewise.
6233 * c-objc-common.c: Likewise.
6234 * c-objc-common.h: Likewise.
6235 * c-typeck.c: Likewise.
6236 * c-convert.c: Likewise.
6237 * c-lang.c: Likewise.
6238 * c-aux-info.c: Likewise.
6239 * c-errors.c: Likewise.
6240 * gccspec.c: Likewise.
6241 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
6242 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
6243\f
a5544970 6244Copyright (C) 2012-2019 Free Software Foundation, Inc.
d4a10d0a
SB
6245
6246Copying and distribution of this file, with or without modification,
6247are permitted in any medium without royalty provided the copyright
6248notice and this notice are preserved.