]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
darwin, powerpc - adjust the formatting of picbase labels
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
a9c697b8
MS
12019-05-16 Martin Sebor <msebor@redhat.com>
2
3 * c-decl.c (start_decl): Quote keywords, operators, and
4 types in diagnostics.
5 (finish_decl): Same.
6 * c-parser.c (c_parser_asm_statement): Same.
7 (c_parser_conditional_expression): Same.
8 (c_parser_transaction_cancel): Same.
9 * c-typeck.c (c_common_type): Same.
10 (build_conditional_expr): Same.
11 (digest_init): Same.
12 (process_init_element): Same.
13 (build_binary_op): Same.
14
c4499192
RB
152019-05-17 Richard Biener <rguenther@suse.de>
16
17 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
18 (c_parser_gimple_unary_expression): Likewise.
19 (c_parser_gimple_parentized_ternary_expression): New function.
20
adfe6e4b
RB
212019-05-16 Richard Biener <rguenther@suse.de>
22
23 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
24 (c_parser_gimple_unary_expression): Likewise.
25
186dabf2
RB
262019-05-15 Richard Biener <rguenther@suse.de>
27
28 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
29 __BIT_FIELD_REF.
30
1158c5b4
RB
312019-05-14 Richard Biener <rguenther@suse.de>
32
33 * gimple-parser.c (c_parser_gimple_statement): Remove
34 questionable auto-promotion to VIEW_CONVERT_EXPR.
35 (c_parser_gimple_typespec): Split out from __MEM parsing.
36 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
37 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
38 as __VIEW_CONVERT with -gimple.
39
fd4485aa
ML
402019-05-09 Martin Liska <mliska@suse.cz>
41
42 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
43 __MAX.
44 (c_parser_gimple_unary_expression): Parse also binary expression
45 __MIN and __MAX.
46 (c_parser_gimple_parentized_binary_expression): New function.
47
d276406a
ML
482019-05-09 Martin Liska <mliska@suse.cz>
49
50 * gimple-parser.c (struct gimple_parser): Add probability.
51 for gimple_parser_edge.
52 (gimple_parser::push_edge): Add new argument probability.
53 (c_parser_gimple_parse_bb_spec): Parse also probability
54 if present.
55 (c_parser_parse_gimple_body): Set edge probability.
56 (c_parser_gimple_compound_statement): Consume token
57 before calling c_parser_gimple_goto_stmt.
58 Parse BB counts.
59 (c_parser_gimple_statement): Pass new argument.
60 (c_parser_gimple_goto_stmt): Likewise.
61 (c_parser_gimple_if_stmt): Likewise.
62 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
63 * c-parser.c (c_parser_declaration_or_fndef): Pass
64 hot_bb_threshold argument.
65 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
66 field.
67 (c_parser_gimple_parse_bb_spec_edge_probability): New.
68
f179b64e
JJ
692019-04-26 Jakub Jelinek <jakub@redhat.com>
70
71 PR debug/90197
72 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
73 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
74 (c_parser_do_statement): Likewise.
75 (c_parser_for_statement): Likewise. Formatting fixes.
76 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
77 emit DEBUG_BEGIN_STMTs if needed.
78
e7178413
JJ
792019-04-19 Jakub Jelinek <jakub@redhat.com>
80
c280b7ee
JJ
81 PR c/89888
82 * c-typeck.c (struct c_switch): Remove outside_range_p member.
83 (c_start_case): Don't clear it.
84 (do_case): Adjust c_add_case_label caller.
85 (c_finish_case): Adjust c_do_switch_warnings caller.
86
e7178413
JJ
87 PR c++/90108
88 * c-decl.c (merge_decls): If remove is main variant and
89 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
90 variant that has newdecl as TYPE_NAME if any.
91
60a2c645
JJ
922019-04-12 Jakub Jelinek <jakub@redhat.com>
93
94 PR c/89933
95 * c-decl.c (merge_decls): When newdecl's type is its main variant,
96 don't try to remove it from the variant list, but instead assert
97 it has no variants.
98
2a82beaa
RB
992019-04-01 Richard Biener <rguenther@suse.de>
100
101 PR c/71598
102 * c-tree.h (c_get_alias_set): Declare.
103 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
104 * c-objc-common.c (c_get_alias_set): Treat enumeral types
105 as the underlying integer type.
106
bec1da64
MS
1072019-03-19 Martin Sebor <msebor@redhat.com>
108
109 PR tree-optimization/89688
110 * c-decl.c (finish_decl): Call braced_lists_to_string for more
111 kinds of initializers.
112
855cd9b1
JJ
1132019-03-19 Jakub Jelinek <jakub@redhat.com>
114
115 PR c/89734
116 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
117 return type even if quals_used is 0. Formatting fixes.
118
baa09dc5
RB
1192019-03-14 Richard Biener <rguenther@suse.de>
120
121 * c-tree.h (enum c_declspec_il): New.
122 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
123 enum bitfield.
124 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
125 Pass start pass and declspec_il to c_parser_parse_gimple_body.
126 (c_parser_declspecs): Adjust.
127 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
128 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
129 and bitmap.h.
130 (struct gimple_parser): New.
131 (gimple_parser::push_edge): New method.
132 (c_parser_gimple_parse_bb_spec): New helper.
133 (c_parser_parse_gimple_body): Get start pass and IL specification.
134 Initialize SSA and CFG.
135 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
136 Build a gimple_parser parsing state and pass it along.
137 (c_parser_gimple_statement): Change intermittend __PHI internal
138 function argument for the edge.
139 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
140 (c_parser_gimple_goto_stmt): Record edges to build.
141 (c_parser_gimple_if_stmt): Likewise.
142 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
143 (c_parser_gimple_or_rtl_pass_list): Likewise.
144
a3f9f006
ML
1452019-03-11 Martin Liska <mliska@suse.cz>
146
147 * c-decl.c (check_for_loop_decls): Wrap an option name
148 in a string format message and fix GNU coding style.
149 * c-parser.c (c_parser_declspecs): Likewise.
150
1db01ff9
JJ
1512019-03-08 Jakub Jelinek <jakub@redhat.com>
152
153 PR tree-optimization/89550
154 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
155 returned true.
156 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
157 or warning returned true.
158
66dcb747
JJ
1592019-02-28 Jakub Jelinek <jakub@redhat.com>
160
161 PR c/89525
162 * c-typeck.c (convert_arguments): Call inform_declaration only if
163 the previous warning_at call returned true.
164
2263c9f2
TS
1652019-02-22 Thomas Schwinge <thomas@codesourcery.com>
166
167 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
168 parameter. Adjust all users.
169 (c_parser_oacc_simple_clause): Replace parser with loc formal
170 parameter. Adjust all users.
171
19695f4d
CLT
1722019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
173
174 PR c/87924
175 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
176 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
177
5f88ba10
JJ
1782019-02-15 Jakub Jelinek <jakub@redhat.com>
179
180 PR c/89340
181 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
182 before c_decl_attributes rather than after it.
183
cfc30fd1
JJ
1842019-02-06 Jakub Jelinek <jakub@redhat.com>
185
186 PR c/89211
187 * c-parser.c (c_parser_declaration_or_fndef): Don't update
188 DECL_ARGUMENTS of d if it has been defined already. Use a single if
189 instead of 3 nested ifs.
190
fbe83e6b
JM
1912019-02-06 Joseph Myers <joseph@codesourcery.com>
192
193 PR c/88584
194 * c-decl.c (finish_decl): Do not complete array types for arrays
195 with external linkage not at file scope.
196
f461f938
RB
1972019-02-05 Richard Biener <rguenther@suse.de>
198
199 PR c/88606
200 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
201 all type variants when not supported.
202
fe509359
JJ
2032019-01-30 Jakub Jelinek <jakub@redhat.com>
204
205 PR c/89061
206 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
207 * c-decl.c (decl_jump_unsafe): Return false for
208 C_DECL_COMPOUND_LITERAL_P decls.
209 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
210
6a335b96
JJ
2112019-01-29 Jakub Jelinek <jakub@redhat.com>
212
f4b7e754
JJ
213 PR c/89045
214 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
215 scope.
216
6a335b96
JJ
217 PR c/86125
218 * c-decl.c (last_fileptr_type): Remove.
219 (last_structptr_types): New variable.
220 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
221 {old,new}rettype instead of the types themselves. Assert
222 last_structptr_types array has the same number of elements
223 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
224 argument oldtype and newtype. Instead of handling
225 just fileptr_type_node specially, handle all builtin_structptr_types
226 pointer nodes. Formatting fix.
227
d8b5a1a0
MS
2282019-01-24 Martin Sebor <msebor@redhat.com>
229
230 PR c/86125
231 PR c/88886
232 PR middle-end/86308
233 * c-decl.c (match_builtin_function_types): Add arguments.
234 (diagnose_mismatched_decls): Diagnose mismatched declarations
235 of built-ins more strictly.
236
e21c4491
JJ
2372019-01-24 Jakub Jelinek <jakub@redhat.com>
238
239 PR c++/88976
240 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
241 on #pragma omp cancel with different modifiers.
242
420183d9
L
2432019-01-18 H.J. Lu <hongjiu.lu@intel.com>
244
245 PR c/51628
246 PR c/88664
247 * c-typeck.c (convert_for_assignment): Upate the
248 warn_for_address_or_pointer_of_packed_member call.
249
17ad43dd
TH
2502019-01-16 Tom Honermann <tom@honermann.net>
251 Jason Merrill <jason@redhat.com>
252
253 * c-typeck.c (digest_init): Revised the error message produced for
254 ill-formed cases of array initialization with a string literal.
255 (error_init): Make variadic.
256
5f07d78a
JJ
2572019-01-12 Jakub Jelinek <jakub@redhat.com>
258
259 * c-typeck.c (convert_for_assignment): Fix a comment typo.
260
c4581bbf
JJ
2612019-01-07 Jakub Jelinek <jakub@redhat.com>
262
263 PR c/88701
264 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
265 if current_function_decl is non-NULL.
266
65c5b1eb
JM
2672019-01-07 Joseph Myers <joseph@codesourcery.com>
268
269 PR c/88720
270 PR c/88726
271 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
272 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
273 functions declared but never defined only for external scope, not
274 for other scopes.
275
d8fcab68
JJ
2762019-01-07 Jakub Jelinek <jakub@redhat.com>
277
278 PR c++/85052
279 * c-parser.c (c_parser_postfix_expression): Parse
280 __builtin_convertvector.
281
a5544970
JJ
2822019-01-01 Jakub Jelinek <jakub@redhat.com>
283
284 Update copyright years.
285
da77eace
L
2862018-12-20 H.J. Lu <hongjiu.lu@intel.com>
287
288 PR c/51628
289 * c-typeck.c (convert_for_assignment): Call
290 warn_for_address_or_pointer_of_packed_member.
291
1edf8866
SB
2922018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
293
294 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
295 a more specific error message (instead of just falling through).
296
db4fd626
SB
2972018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
298
299 * c-parser.c (c_parser_asm_statement): Keep track of the location each
300 asm qualifier is first seen; use that to give nicer "duplicate asm
301 qualifier" messages. Delete 'quals" variable, instead pass the
302 "is_volatile_ flag to build_asm_stmt directly.
303 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
304 * c-typeck.c (build_asm_stmt): Ditto; adjust.
305
9c9cfcbb
SB
3062018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
307
308 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
309 "done" boolean variable.
310
a14feb3c
DM
3112018-12-19 David Malcolm <dmalcolm@redhat.com>
312
313 PR c++/87504
314 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
315 Move from here to gcc-rich-location.h and gcc-rich-location.c.
316 (build_binary_op): Use struct op_location_t and
317 class binary_op_rich_location.
318
6d939173
JJ
3192018-12-11 Jakub Jelinek <jakub@redhat.com>
320
321 PR sanitizer/88426
322 * c-convert.c (convert): Call c_fully_fold before calling
323 ubsan_instrument_float_cast.
324
b7055028
SB
3252018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
326
327 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
328 setting "quals".
329
5b76e75f
SB
3302018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
331
332 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
333 after asm. Pass a flag for it to build_asm_expr.
334 * c-tree.h (build_asm_expr): Update declaration.
335 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
336 set ASM_INLINE_P.
337
30bd42b9
SB
3382018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
339
340 PR inline-asm/55681
341 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
342 combination of volatile and goto, in any order, without repetitions.
343
9df6c0e4
JB
3442018-12-04 James Norris <jnorris@codesourcery.com>
345 Cesar Philippidis <cesar@codesourcery.com>
346 Julian Brown <julian@codesourcery.com>
347
348 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
349 code.
350
f44697b7
RB
3512018-11-30 Richard Biener <rguenther@suse.de>
352
353 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
354 _Literal (type) { ... } as empty aggregate or vector constructor.
355
550dfbdc
MS
3562018-11-29 Martin Sebor <msebor@redhat.com>
357
358 PR c/88091
359 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
360 (convert_arguments): Add comments. Pass additional argument to
361 the function above.
362
673670da
MS
3632018-11-29 Martin Sebor <msebor@redhat.com>
364
365 PR c/88172
366 PR testsuite/88208
367 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
368
db1d09b0
MS
3692018-11-23 Martin Sebor <msebor@redhat.com>
370
371 PR testsuite/88098
372 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
373 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
374
98f08eb8
MS
3752018-11-20 Martin Sebor <msebor@redhat.com>
376
377 * c-parser.c (c_parser_has_attribute_expression): New function.
378 (c_parser_attribute): New function.
379 (c_parser_attributes): Move code into c_parser_attribute.
380 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
381
cd5da983
MS
3822018-11-15 Martin Sebor <msebor@redhat.com>
383
384 PR c/83656
385 * c-decl.c (header_for_builtin_fn): Declare.
386 (diagnose_mismatched_decls): Diagnose declarations of built-in
387 functions without a prototype.
388 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
389 (convert_argument): Same.
390 (convert_arguments): Factor code out into convert_argument.
391 Detect mismatches between built-in formal arguments in calls
392 to built-in without prototype.
393 (build_conditional_expr): Same.
394 (type_or_builtin_type): New function.
395 (convert_for_assignment): Add argument. Conditionally issue
396 warnings instead of errors for mismatches.
397
620e594b
DM
3982018-11-13 David Malcolm <dmalcolm@redhat.com>
399
400 * c-decl.c: Replace "source_location" with "location_t".
401 * c-tree.h: Likewise.
402 * c-typeck.c: Likewise.
403 * gimple-parser.c: Likewise.
404
3179ebae
JJ
4052018-11-09 Jakub Jelinek <jakub@redhat.com>
406
81a227c6
JJ
407 * c-parser.c (c_parser_omp_clause_final): Use
408 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
409 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
410 parsing instead of c_parser_paren_condition.
411 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
412 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
413 c_fully_fold instead of c_parser_condition.
414 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
415 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
416 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
417 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
418 c_parser_expr_no_commas instead of c_parser_expression.
419
98c91c56
JJ
420 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
421 reduction clause with inscan modifier.
422
3179ebae
JJ
423 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
424 clauses other than atomic_default_mem_order.
425
28567c40
JJ
4262018-11-08 Jakub Jelinek <jakub@redhat.com>
427
428 * c-parser.c: Include memmode.h.
429 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
430 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
431 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
432 task_reduction clauses.
433 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
434 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
435 section, or lvalue assignment expression.
436 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
437 (c_parser_omp_clause_lastprivate): Parse optional
438 conditional: modifier.
439 (c_parser_omp_clause_hint): Require constant integer expression rather
440 than just integer expression.
441 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
442 clause.
443 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
444 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
445 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
446 functions.
447 (c_parser_omp_clause_depend): Parse iterator modifier and handle
448 iterators. Parse mutexinoutset and depobj kinds.
449 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
450 callers.
451 (c_parser_omp_all_clauses): Likewise. Handle
452 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
453 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
454 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
455 default memory order from requires directive if any. Adjust
456 c_finish_omp_atomic caller.
457 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
458 (c_parser_omp_flush): Parse flush with memory-order-clause.
459 (c_parser_omp_for_loop): Allow NE_EXPR even in
460 OpenMP loops, adjust c_finish_omp_for caller.
461 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
462 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
463 Allow to be called while parsing combined parallel master.
464 Parse combined master taskloop{, simd}.
465 (c_parser_omp_parallel): Parse combined
466 parallel master{, taskloop{, simd}} constructs.
467 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
468 (OMP_TASKGROUP_CLAUSE_MASK): Define.
469 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
470 (OMP_TASKWAIT_CLAUSE_MASK): Define.
471 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
472 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
473 around teams body. Use SET_EXPR_LOCATION.
474 (c_parser_omp_target_data): Allow target data
475 with only use_device_ptr clauses.
476 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
477 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
478 (c_parser_omp_requires): New function.
479 (c_finish_taskloop_clauses): New function.
480 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
481 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
482 declaration. Disallow in_reduction clause when combined with parallel
483 master.
484 (c_parser_omp_construct): Adjust c_parser_omp_master and
485 c_parser_omp_taskgroup callers.
486 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
487 other than cancel.
488 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
489 like OMP_CLAUSE_REDUCTION.
490 (handle_omp_array_sections): Likewise. Call save_expr on array
491 reductions before calling build_index_type. Handle depend clauses
492 with iterators.
493 (struct c_find_omp_var_s): New type.
494 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
495 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
496 with static, runtime or auto schedule kinds. Call save_expr for whole
497 array reduction sizes. Diagnose reductions with zero sized elements
498 or variable length structures. Diagnose nogroup clause used with
499 reduction clause(s). Handle depend clause with
500 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
501 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
502 some different type for other kinds. Use build_unary_op with
503 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
504 Handle depend clauses with iterators. Remove no longer needed special
505 case that predetermined const qualified vars may be specified in
506 firstprivate clause. Complain if const qualified vars are mentioned
507 in data-sharing clauses other than firstprivate or shared. Use
508 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
509 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
510 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
511 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
512
7e2de6df
DM
5132018-10-29 David Malcolm <dmalcolm@redhat.com>
514
515 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
516 logic for change to name_hint::operator bool.
517 (undeclared_variable): Likewise.
518 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
519 (c_parser_parameter_declaration): Likewise.
520
9f936c86
JM
5212018-10-17 Joseph Myers <joseph@codesourcery.com>
522
523 * c-errors.c (pedwarn_c11): New function.
524 * c-parser.c (disable_extension_diagnostics): Save
525 warn_c11_c2x_compat and set it to 0.
526 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
527 (c_parser_static_assert_declaration_no_semi): Handle
528 _Static_assert without string constant.
529 * c-tree.h (pedwarn_c11): New prototype.
530
033eb567
DM
5312018-10-17 David Malcolm <dmalcolm@redhat.com>
532
533 * Make-lang.in (selftest-c): New.
534 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
535 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
536 from gcc/Makefile.in.
537
0edf3afe
RB
5382018-10-02 Richard Biener <rguenther@suse.de>
539
540 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
541
8313a764
JM
5422018-09-26 Joseph Myers <joseph@codesourcery.com>
543
544 PR c/87390
545 * c-typeck.c (build_binary_op): Use excess precision for
546 comparisons of integers and floating-point for C11 and later.
547
ce6f0888
MJ
5482018-09-26 Martin Jambor <mjambor@suse.cz>
549
550 PR c/87347
551 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
552 comment.
553
9c4a4b3c
DM
5542018-09-17 David Malcolm <dmalcolm@redhat.com>
555
556 * c-objc-common.c (range_label_for_type_mismatch::get_text):
557 Update for new param.
558 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
559 Likewise.
560
80c6d1f4
MJ
5612018-09-17 Martin Jambor <mjambor@suse.cz>
562
563 PR c/63886
564 * c-parser.c: (warn_for_abs): New function.
565 (c_parser_postfix_expression_after_primary): Call it.
566
4a426e36
BE
5672018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
568
569 * c-typeck.c (digest_init): Shorten overlength strings.
570
6d900107
BE
5712018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
572
573 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
574
b5764229
BE
5752018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
576
577 * c-decl.c (finish_decl): Call braced_list_to_string here ...
578 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
579
22eea6b2
AM
5802018-08-30 Alexander Monakov <amonakov@ispras.ru>
581
582 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
583 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
584
85204e23
DM
5852018-08-27 David Malcolm <dmalcolm@redhat.com>
586
587 PR 87091
588 * c-decl.c (implicitly_declare): Update call to
589 maybe_add_include_fixit to suggest overriding the location, as it
590 is for a note.
591 * c-objc-common.c (c_tree_printer): Update for conversion of
592 show_caret_p to a tri-state.
593
3d78e008
ML
5942018-08-27 Martin Liska <mliska@suse.cz>
595
596 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
597 fndecl_built_in_p and remove check for FUNCTION_DECL if
598 possible.
3d78e008
ML
599 (diagnose_mismatched_decls): Likewise.
600 (merge_decls): Likewise.
601 (warn_if_shadowing): Likewise.
602 (pushdecl): Likewise.
603 (implicitly_declare): Likewise.
604 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
605 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
606 * c-typeck.c (build_function_call_vec): Likewise.
607 (convert_arguments): Likewise.
608
097f82ec
DM
6092018-08-20 David Malcolm <dmalcolm@redhat.com>
610
611 PR other/84889
612 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
613 (diagnose_mismatched_decls): Likewise, in various places.
614 (warn_if_shadowing): Likewise.
615 (implicit_decl_warning): Likewise.
616 (implicitly_declare): Likewise.
617 (undeclared_variable): Likewise.
618 (declare_label): Likewise.
619 (grokdeclarator): Likewise.
620 (start_function): Likewise.
621 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
622 (c_parser_parameter_declaration): Likewise.
623 (c_parser_binary_expression): Likewise.
624 * c-typeck.c (c_expr_sizeof_expr): Likewise.
625 (parser_build_binary_op): Likewise.
626 (build_unary_op): Likewise.
627 (error_init): Likewise.
628 (pedwarn_init): Likewise.
629 (warning_init): Likewise.
630 (convert_for_assignment): Likewise.
631
96e6ae57
DM
6322018-08-15 David Malcolm <dmalcolm@redhat.com>
633
634 * c-objc-common.c: Include "gcc-rich-location.h".
635 (c_tree_printer): Move implemenation of '%T' to...
636 (print_type): ...this new function.
637 (range_label_for_type_mismatch::get_text): New function.
638 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
639 range for the various ic_argpass cases.
640 (class maybe_range_label_for_tree_type_mismatch): New class.
641 (build_binary_op): Use it when calling binary_op_error.
642
0cd020ae
PK
6432018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
644
645 * c-decl.c (start_decl): Do not warn if variables is named as main
646 and is a local variable.
647
72733314
IS
6482018-08-15 Iain Sandoe <iain@sandoe.co.uk>
649
650 PR c/19315
651 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
652 objects of unknown size.
653
23aa9f7c
MS
6542018-08-13 Martin Sebor <msebor@redhat.com>
655
656 PR tree-optimization/71625
657 * c-parser.c (c_parser_declaration_or_fndef): Call
658 braced_list_to_string.
659
e5e7e50d
BH
6602018-08-03 Bogdan Harjoc <harjoc@gmail.com>
661
662 PR c/86690
663 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
664 errors.
665
8a45b051
MS
6662018-08-01 Martin Sebor <msebor@redhat.com>
667
668 PR tree-optimization/86650
669 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
670 and TREE_BLOCK (t) from within percent_K_format to this callsite.
671
5922dcb5
JJ
6722018-08-01 Jakub Jelinek <jakub@redhat.com>
673
674 PR c/85704
675 * c-typeck.c (init_field_decl_cmp): New function.
676 (output_pending_init_elements): Use it for field comparisons
677 instead of pure bit_position comparisons.
678
9b452033
JJ
6792018-07-12 Jakub Jelinek <jakub@redhat.com>
680
681 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
682 type here, instead add "omp declare target implicit" attribute.
683 (finish_decl): Diagnose vars without mappable type here.
684
829c6349
CLT
6852018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
686 Thomas Schwinge <thomas@codesourcery.com>
687 Cesar Philippidis <cesar@codesourcery.com>
688
689 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
690 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
691 to their non-present_or_* counterparts. Make 'self' an alias to
692 PRAGMA_OACC_CLAUSE_HOST.
693 (c_parser_oacc_data_clause): Update GOMP mappings for
694 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
695 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
696 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
697 Remove support for present_or_* clauses.
698 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
699 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
700 (OACC_DECLARE_CLAUSE_MASK): Likewise.
701 (OACC_DATA_CLAUSE_MASK): Likewise.
702 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
703 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
704 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
705 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
706 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
707
e197e64e
KV
7082018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
709
710 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
711 * gimple-parser.c (c_parser_gimple_statement): Likewise.
712 (c_parser_gimple_unary_expression): Likewise.
713
487f2f61
JJ
7142018-06-15 Jakub Jelinek <jakub@redhat.com>
715
716 PR c/86093
717 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
718 before doing POINTER_DIFF_EXPR.
719
e4d44a37
MP
7202018-06-07 Marek Polacek <polacek@redhat.com>
721
722 PR c/85318
723 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
724 for loop initial declarations.
725
b67b9225
DP
7262018-05-30 David Pagan <dave.pagan@oracle.com>
727
728 PR c/55976
729 * c-decl.c (grokdeclarator): Update check for return type warnings.
730 (start_function): Likewise.
731 (finish_function): Likewise.
732 * c-typeck.c (c_finish_return): Update check for return type warnings.
733 Pass OPT_Wreturn_type to pedwarn when appropriate.
734
c566cc9f
RS
7352018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
736
737 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
738 __FMA_EXPR handlng.
739
e4f81565
RS
7402018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
741
742 * gimple-parser.c: Include internal-fn.h.
743 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
744 (c_parser_gimple_call_internal): New function.
745 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
746 Fix typos in comment.
747
79e7b1fe
JJ
7482018-05-10 Jakub Jelinek <jakub@redhat.com>
749
750 PR c++/85662
751 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
752 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
753 fold_convert_loc.
754 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
755 fold_offsetof_1, pass argtype as TYPE to it and drop the
756 fold_convert_loc.
757
f7584c81
DP
7582018-05-02 David Pagan <dave.pagan@oracle.com>
759
760 PR c/30552
761 * c-decl.c (old_style_parameter_scope): New function.
762 * c-parser.c (c_parser_postfix_expression): Check for statement
763 expressions in old-style function parameter list declarations.
764 * c-parser.h (old_style_parameter_scope): New extern declaration.
765
b33a0cb3
JJ
7662018-04-25 Jakub Jelinek <jakub@redhat.com>
767
768 PR sanitizer/84307
769 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
770 it is not TREE_STATIC.
771 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
772 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
773 its COMPOUND_LITERAL_EXPR_DECL.
774
c5c5822a
JM
7752018-03-21 Joseph Myers <joseph@codesourcery.com>
776
777 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
778 where all functions return the same _FloatN or _FloatNx type,
779 treat integer types as _Float64 instead of double.
780
aa1c9429
JJ
7812018-03-21 Jakub Jelinek <jakub@redhat.com>
782
783 PR c/84999
784 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
785 building vector comparison, diagnose it and return error_mark_node.
786
9bb45a95
JJ
7872018-03-15 Jakub Jelinek <jakub@redhat.com>
788
789 PR c/84853
790 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
791 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
792 INTEGER_TYPE element type.
793
ada6bad9
DP
7942018-03-13 David Pagan <dave.pagan@oracle.com>
795
796 PR c/46921
797 * c-typeck.c (output_init_element): Ensure field initializer
798 expression is always evaluated if there are side effects.
799
849bbdb9
JJ
8002018-03-06 Jakub Jelinek <jakub@redhat.com>
801
802 PR c/84721
803 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
804 !building_stmt_list_p ().
805
d74641bd
RS
8062018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
807
808 PR c/84305
809 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
810 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
811 and include the BIND_EXPR in the list of things that need to be
812 pre-evaluated.
813
0444aa9c
NS
8142018-02-09 Nathan Sidwell <nathan@acm.org>
815
816 PR c/84293
817 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
818 to strict_aliasing_warning.
819
7c30b12a
PC
8202018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
821
822 * c-typeck.c (really_start_incremental_init, push_init_level,
823 set_nonincremental_init, output_init_element, process_init_element):
824 Use DECL_UNNAMED_BIT_FIELD.
825
2be4dfcb
MP
8262018-01-31 Marek Polacek <polacek@redhat.com>
827
828 PR c/81779
829 * c-parser.c (c_parser_compound_statement_nostart): Call
830 expansion_point_location_if_in_system_header.
831
bb9869d5
DM
8322018-01-17 David Malcolm <dmalcolm@redhat.com>
833
834 PR c++/83814
835 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
836 the C part.
837
b4923738
JJ
8382018-01-13 Jakub Jelinek <jakub@redhat.com>
839
840 PR c/83801
841 * c-tree.h (decl_constant_value_1): Add a bool argument.
842 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
843 returning a CONSTRUCTOR if it is true. Use error_operand_p.
844 (decl_constant_value): Adjust caller.
845 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
846 decl_constant_value_1 as IN_INIT. Otherwise, punt if
847 decl_constant_value returns initializer that has BLKmode or
848 array type.
849 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
850
928686b1
RS
8512018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
852 Alan Hayward <alan.hayward@arm.com>
853 David Sherwood <david.sherwood@arm.com>
854
855 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
856 TYPE_VECTOR_SUBPARTS.
857
85ec4feb
JJ
8582018-01-03 Jakub Jelinek <jakub@redhat.com>
859
860 Update copyright years.
861
913884f7
JJ
8622018-01-01 Jakub Jelinek <jakub@redhat.com>
863
864 PR c/83595
865 * c-parser.c (c_parser_braced_init, c_parser_initelt,
866 c_parser_conditional_expression, c_parser_cast_expression,
867 c_parser_sizeof_expression, c_parser_alignof_expression,
868 c_parser_postfix_expression, c_parser_omp_declare_reduction,
869 c_parser_transaction_expression): Use set_error () method instead
870 of setting value member to error_mark_node.
871
c6cfa2bf
MM
8722017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
873
874 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
875 and _Float<N>X built-in functions.
876
11d29d63
JJ
8772017-12-22 Jakub Jelinek <jakub@redhat.com>
878
14ec014e
JJ
879 PR debug/83550
880 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
881 TYPE_STUB_DECL and call rest_of_type_compilation before processing
882 incomplete vars rather than after it.
883
11d29d63
JJ
884 PR debug/83547
885 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
886 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
887 and consider empty ones if there are no other stmts. For
888 -Wunused-value walk all statements before the one only followed by
889 DEBUG_BEGIN_STMTs.
890
170a8bd6 8912017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 892 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
893
894 * c-parser.c (c_parser_while_statement): Add unroll parameter and
895 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
896 (c_parser_do_statement): Likewise.
897 (c_parser_for_statement): Likewise.
898 (c_parser_statement_after_labels): Adjust calls to above.
899 (c_parse_pragma_ivdep): New static function.
900 (c_parser_pragma_unroll): Likewise.
901 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
902 <PRAGMA_UNROLL>: New case.
903
01512446
JJ
9042017-12-19 Jakub Jelinek <jakub@redhat.com>
905
906 * c-typeck.c (comptypes_internal, function_types_compatible_p,
907 perform_integral_promotions, digest_init): Replace Yoda conditions
908 with typical order conditions.
909 * c-decl.c (check_bitfield_type_and_width): Likewise.
910
c65e18d3
BE
9112017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
912
913 * c-typeck.c (c_safe_arg_type_equiv_p,
914 c_safe_function_type_cast_p): New function.
915 (build_c_cast): Implement -Wcast-function-type.
916
b7280579
RB
9172017-12-14 Richard Biener <rguenther@suse.de>
918
919 PR c/83415
920 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
921 like REALPART_EXPR for the behavior of whether its operand
922 is an lvalue.
923
49e6a6c0
MP
9242017-12-12 Marek Polacek <polacek@redhat.com>
925
926 PR c/82679
927 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
928
96a95ac1
AO
9292017-12-12 Alexandre Oliva <aoliva@redhat.com>
930
931 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
932 * c-parser.c (add_debug_begin_stmt): New.
933 (c_parser_declaration_or_fndef): Call it.
934 (c_parser_compound_statement_nostart): Likewise.
935 (c_parser_statement_after_labels): Likewise.
936 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
937
4b2b493f
JM
9382017-12-07 Joseph Myers <joseph@codesourcery.com>
939
940 * c-decl.c (build_compound_literal): Add parameter alignas_align
941 and set alignment of decl if nonzero.
942 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
943 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
944 qualifier.
945 (c_parser_struct_declaration): Update syntax comment.
946 (c_parser_type_name): Add alignas_ok argument and pass it to
947 c_parser_declspecs.
948 (c_parser_cast_expression): Pass true to c_parser_type_name and
949 give error if a cast used an _Alignas specifier.
950 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
951 give error if sizeof (type-name) used an _Alignas specifier.
952 (c_parser_alignof_expression): Pass true to c_parser_type_name and
953 give error if _Alignof (type-name) used an _Alignas specifier.
954 (c_parser_postfix_expression_after_paren_type): Check specified
955 alignment for a compound literal and pass it to
956 build_compound_literal.
957 * c-parser.h (c_parser_type_name): Update prototype.
958 * c-tree.h (build_compound_literal): Update prototype.
959
5d9ae53d
MS
9602017-12-07 Martin Sebor <msebor@redhat.com>
961
962 PR c/81544
963 * c-decl.c (c_decl_attributes): Look up existing declaration and
964 pass it to decl_attributes.
965
c79144f8
DM
9662017-12-06 David Malcolm <dmalcolm@redhat.com>
967
968 PR c/83236
969 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
970 reserved for use by the implementation.
971
613bc14f
DM
9722017-12-06 David Malcolm <dmalcolm@redhat.com>
973
974 * c-decl.c: Include "c-family/c-spellcheck.h".
975
05abad4c
ML
9762017-12-05 Martin Liska <mliska@suse.cz>
977 Jakub Jelinek <jakub@redhat.com>
978
979 * c-typeck.c (pointer_diff): Add new argument and instrument
980 pointer subtraction.
981 (build_binary_op): Similar for pointer comparison.
982
cc6534d4
JJ
9832017-12-01 Jakub Jelinek <jakub@redhat.com>
984
65791f42
JJ
985 PR c/79153
986 * c-parser.c: Include tree-iterator.h.
987 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
988 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
989 on it.
990
cc6534d4
JJ
991 PR c/83222
992 * c-tree.h (decl_constant_value_1): Declare.
993 * c-typeck.c (decl_constant_value_1): New function.
994 (decl_constant_value): Use it.
995 * c-fold.c (c_fully_fold_internal): If in_init, use
996 decl_constant_value_1 instead of decl_constant_value.
997
5de73c05
JJ
9982017-11-30 Jakub Jelinek <jakub@redhat.com>
999
1000 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
1001
058f0b9e
JJ
10022017-11-28 Jakub Jelinek <jakub@redhat.com>
1003
1004 PR sanitizer/81275
1005 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
1006 c_switch_covers_all_cases_p returns true.
1007
5e9d6aa4 10082017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 1009 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
1010
1011 * Make-lang.in (c/c-array-notation.o): Remove.
1012 * c-array-notation.c: Delete.
1013 * c-decl.c: Remove cilkplus condition.
1014 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
1015 c_parser_cilk_verify_simd, c_parser_array_notation,
1016 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
1017 c_parser_cilk_simd_fn_vector_attrs,
1018 c_finish_cilk_simd_fn_tokens): Delete.
1019 (c_parser_declaration_or_fndef): Remove cilkplus condition.
1020 (c_parser_direct_declarator_inner): Ditto.
1021 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
1022 (c_parser_attributes, c_parser_compound_statement,
1023 c_parser_statement_after_labels, c_parser_if_statement,
1024 c_parser_switch_statement, c_parser_while_statement,
1025 c_parser_do_statement, c_parser_for_statement,
1026 c_parser_unary_expression, c_parser_postfix_expression,
1027 c_parser_postfix_expression_after_primary,
1028 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
1029 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
1030 support.
1031 * c-typeck.c (build_array_ref, build_function_call_vec,
1032 convert_arguments,
1033 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
1034 c_finish_loop, build_binary_op): Remove cilkplus support.
1035
9e851845
JJ
10362017-11-28 Jakub Jelinek <jakub@redhat.com>
1037
1038 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
1039 of build3.
1040
8c7dbea9
BK
10412017-11-14 Boris Kolpackov <boris@codesynthesis.com>
1042
1043 * Make-lang.in (c.install-plugin): Install backend import library.
1044
41521dee
JJ
10452017-11-23 Jakub Jelinek <jakub@redhat.com>
1046
1047 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
1048 pragma_stmt context.
1049
ac9effed
EB
10502017-11-23 Mike Stump <mikestump@comcast.net>
1051 Eric Botcazou <ebotcazou@adacore.com>
1052
1053 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
1054 ANNOTATE_EXPR.
1055 (c_parser_do_statement): Likewise.
1056 (c_parser_for_statement): Likewise.
1057
ce95abc4
DM
10582017-11-22 David Malcolm <dmalcolm@redhat.com>
1059
1060 PR c++/62170
1061 * c-objc-common.c (c_tree_printer): Convert penultimate param from
1062 bool to bool *. Within '%T' handling, if showing an "aka", use
1063 "quoted" param to add appropriate quoting.
1064
974aedcc
MP
10652017-11-22 Marek Polacek <polacek@redhat.com>
1066
1067 PR c++/60336
1068 PR middle-end/67239
1069 PR target/68355
1070 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
1071
d4300cc6
DM
10722017-11-21 David Malcolm <dmalcolm@redhat.com>
1073
1074 PR c/83056
1075 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
1076 earlier failed lookups.
1077
1af4ebf5
MG
10782017-11-21 Marc Glisse <marc.glisse@inria.fr>
1079
1080 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
1081 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
1082
26edace6
DM
10832017-11-20 David Malcolm <dmalcolm@redhat.com>
1084
1085 PR c/81404
1086 * c-decl.c: Include "c-family/known-headers.h".
1087 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
1088 to known-headers.cc.
1089 (class suggest_missing_header): Move to known-header.h.
1090 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
1091 than get_c_name_hint.
1092
b1212255
DM
10932017-11-20 David Malcolm <dmalcolm@redhat.com>
1094
1095 * c-decl.c (get_c_name_hint): New function.
1096 (class suggest_missing_header): New class.
1097 (lookup_name_fuzzy): Call get_c_name_hint and use it to
1098 suggest missing headers to the user.
1099
6c7a259b
DM
11002017-11-20 David Malcolm <dmalcolm@redhat.com>
1101
1102 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1103 Include "c-family/name-hint.h"
1104 (implicit_decl_warning): Convert "hint" from
1105 const char * to name_hint. Pass location to
1106 lookup_name_fuzzy. Suppress any deferred diagnostic if the
1107 warning was not printed.
1108 (undeclared_variable): Likewise for "guessed_id".
1109 (lookup_name_fuzzy): Convert return type from const char *
1110 to name_hint. Add location_t param.
1111 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1112 Include "c-family/name-hint.h"
1113 (c_parser_declaration_or_fndef): Convert "hint" from
1114 const char * to name_hint. Pass location to lookup_name_fuzzy.
1115 (c_parser_parameter_declaration): Likewise.
1116
f9c59f7e
JJ
11172017-11-19 Jakub Jelinek <jakub@redhat.com>
1118
1119 PR c/66618
1120 PR c/69960
1121 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
1122 where needed.
1123 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
1124 handle_omp_array_sections): Likewise.
1125 (digest_init): Don't call decl_constant_value_for_optimization.
1126 * c-tree.h (decl_constant_value_for_optimization): Removed.
1127 * c-fold.c (c_fold_array_ref): New function.
1128 (c_fully_fold_internal): Add LVAL argument, propagate it through
1129 recursive calls. For VAR_P call decl_constant_value and
1130 unshare if not LVAL and either optimizing or IN_INIT. Remove
1131 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
1132 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
1133 (c_fully_fold): Add LVAL argument, pass it through to
1134 c_fully_fold_internal.
1135 (decl_constant_value_for_optimization): Removed.
1136
3ca0dc60
JM
11372017-11-15 Joseph Myers <joseph@codesourcery.com>
1138
1139 PR c/81156
1140 * c-parser.c (check_tgmath_function): New function.
1141 (enum tgmath_parm_kind): New enum.
1142 (c_parser_postfix_expression): Handle __builtin_tgmath.
1143
64a5912c
DM
11442017-10-31 David Malcolm <dmalcolm@redhat.com>
1145
1146 * c-decl.c (implicit_decl_warning): Update for renaming of
1147 pedwarn_at_rich_loc and warning_at_rich_loc.
1148 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
1149 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
1150 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1151 (c_parser_struct_or_union_specifier): Likewise for renaming of
1152 pedwarn_at_rich_loc.
1153 (c_parser_parameter_declaration): Likewise for renaming of
1154 error_at_rich_loc.
1155 * c-typeck.c (build_component_ref): Likewise.
1156 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
1157 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
1158 (set_init_label): Likewise for renaming of error_at_rich_loc.
1159
c1136864
RB
11602017-10-30 Richard Biener <rguenther@suse.de>
1161
1162 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
1163 stmts.
1164
ee5fd23a
MM
11652017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
1166
1167 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
1168 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
1169
1a59ccf2
DM
11702017-10-25 David Malcolm <dmalcolm@redhat.com>
1171
1172 PR c/7356
1173 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
1174 semicolons.
1175
bc1a75dd
JJ
11762017-10-25 Jakub Jelinek <jakub@redhat.com>
1177
1178 PR libstdc++/81706
1179 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
1180 newdecl to corresponding __builtin_ if any.
1181
ff1ff960
PC
11822017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
1183
1184 PR c++/82466
1185 * c-decl.c (diagnose_mismatched_decls): Use
1186 OPT_Wbuiltin_declaration_mismatch.
1187
62e1c678
DM
11882017-10-12 David Malcolm <dmalcolm@redhat.com>
1189
1190 * c-parser.c (c_parser_require): Add "type_is_unique" param and
1191 use it to guard calls to maybe_suggest_missing_token_insertion.
1192 (c_parser_parms_list_declarator): Override default value of new
1193 "type_is_unique" param to c_parser_require.
1194 (c_parser_asm_statement): Likewise.
1195 * c-parser.h (c_parser_require): Add "type_is_unique" param,
1196 defaulting to true.
1197
a92f6726
NS
11982017-10-11 Nathan Sidwell <nathan@acm.org>
1199
1200 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
1201
8e6cdc90
RS
12022017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1203
1204 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
1205 operating on trees as wide_ints.
1206 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
1207 (c_tree_equal): Likewise.
1208
8139a48e
DM
12092017-10-04 David Malcolm <dmalcolm@redhat.com>
1210
1211 * c-decl.c (push_parm_decl): Store c_parm's location into the
1212 PARAM_DECL.
1213 (build_c_parm): Add "loc" param and store it within the c_parm.
1214 * c-parser.c (struct c_parser): Add "last_token_location" field.
1215 (c_parser_consume_token): Store location of the token into the
1216 new field.
1217 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
1218 when handling a FUNCTION_DECL, if it doesn't already have them.
1219 (c_parser_parameter_declaration): Generate a location for the
1220 parameter, and pass it to the call to build_c_parm.
1221 * c-tree.h (struct c_parm): Add field "loc".
1222 (build_c_parm): Add location_t param.
1223 * c-typeck.c (get_fndecl_argument_location): New function.
1224 (inform_for_arg): New function.
1225 (convert_for_assignment): Use inform_for_arg when dealing with
1226 ic_argpass.
1227
2a389958
JJ
12282017-09-29 Jakub Jelinek <jakub@redhat.com>
1229
7d386d45
JJ
1230 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
1231 width is non-NULL.
1232 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
1233 don't SET_DECL_C_BIT_FIELD here.
1234
2a389958
JJ
1235 PR c/82340
1236 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
1237 instead of trying to set just TREE_READONLY manually.
1238
ebc6a85e
TV
12392017-09-16 Tom de Vries <tom@codesourcery.com>
1240
1241 PR c/81875
1242 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
1243 cond itself.
1244
bb75facd
JM
12452017-09-15 Joseph Myers <joseph@codesourcery.com>
1246
1247 PR c/82071
1248 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
1249 for C11.
1250 (build_conditional_expr): For C11, generate result with excess
1251 precision when one argument is an integer and the other is of a
1252 type using excess precision.
1253
1d933576
BE
12542017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
1255
1256 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
1257
267bbb6f
MP
12582017-09-13 Marek Polacek <polacek@redhat.com>
1259
1260 PR c/82167
1261 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
1262 than expr.original_type.
1263
6836632e
NS
12642017-09-12 Nathan Sidwell <nathan@acm.org>
1265
1266 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1267 resort_sorted_fields): Moved from c-family/c-common.c.
1268 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
1269
e035be33
JM
12702017-09-01 Joseph Myers <joseph@codesourcery.com>
1271
1272 PR c/82071
1273 * c-typeck.c (build_atomic_assign): Handle argument with excess
1274 precision. Ensure any EXCESS_PRECISION_EXPR is present in
1275 argument passed to build_binary_op and convert_for_assignment but
1276 not for call to c_fully_fold.
1277 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
1278 Ensure build_binary_op is called with argument with original
1279 semantic type. Avoid calling c_fully_fold with an
1280 EXCESS_PRECISION_EXPR from build_binary_op.
1281
d2e05fcb
JJ
12822017-09-01 Jakub Jelinek <jakub@redhat.com>
1283
1284 PR c/81887
1285 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
1286
b397965c
RS
12872017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1288 Alan Hayward <alan.hayward@arm.com>
1289 David Sherwood <david.sherwood@arm.com>
1290
1291 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
1292 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
1293 m1 and m2 to the signed equivalent of a fixed-point
1294 SCALAR_TYPE_MODE.
1295
14e18d71
DM
12962017-08-24 David Malcolm <dmalcolm@redhat.com>
1297
1298 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
1299 than CAN_HAVE_LOCATION_P when determining whether to use the
1300 location_t value within "value".
1301
7f204c0f
DM
13022017-08-21 David Malcolm <dmalcolm@redhat.com>
1303
1304 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
1305 rather than peeking the location of the first token.
1306 * c-tree.h (c_expr::get_location): New method.
1307
2f687306
DM
13082017-08-21 David Malcolm <dmalcolm@redhat.com>
1309
1310 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
1311 to check_function_arguments.
1312
3e7b80d7
MP
13132017-08-18 Marek Polacek <polacek@redhat.com>
1314
1315 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
1316 commentary.
1317
00aa1fa2
L
13182017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1319
1320 PR c/53037
1321 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
1322 (check_bitfield_type_and_width): Don't allow bit-field with
1323 warn_if_not_aligned type.
1324
da67acb9
MS
13252017-08-14 Martin Sebor <msebor@redhat.com>
1326
1327 PR c/81117
1328 * c-objc-common.c (c_objc_common_init): Handle 'G'.
1329
bb85aa74
MP
13302017-08-11 Marek Polacek <polacek@redhat.com>
1331
1332 PR c/81795
1333 * c-decl.c (pushtag): Only print inform if the warning was printed.
1334 (grokdeclarator): Likewise.
1335
32129a17
DM
13362017-08-10 David Malcolm <dmalcolm@redhat.com>
1337
1338 * c-parser.c (c_parser_error): Rename to...
1339 (c_parser_error_richloc): ...this, making static, and adding
1340 "richloc" parameter, passing it to the c_parse_error call,
1341 rather than calling c_parser_set_source_position_from_token.
1342 (c_parser_error): Reintroduce, reimplementing in terms of the
1343 above, converting return type from void to bool.
1344 (class token_pair): New class.
1345 (struct matching_paren_traits): New struct.
1346 (matching_parens): New typedef.
1347 (struct matching_brace_traits): New struct.
1348 (matching_braces): New typedef.
1349 (get_matching_symbol): New function.
1350 (c_parser_require): Add param MATCHING_LOCATION, using it to
1351 highlight matching "opening" tokens for missing "closing" tokens.
1352 (c_parser_skip_until_found): Likewise.
1353 (c_parser_static_assert_declaration_no_semi): Convert explicit
1354 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
1355 class matching_parens, so that the pertinent open parenthesis is
1356 highlighted when there are problems locating the close
1357 parenthesis.
1358 (c_parser_struct_or_union_specifier): Likewise.
1359 (c_parser_typeof_specifier): Likewise.
1360 (c_parser_alignas_specifier): Likewise.
1361 (c_parser_simple_asm_expr): Likewise.
1362 (c_parser_braced_init): Likewise, for matching_braces.
1363 (c_parser_paren_condition): Likewise, for matching_parens.
1364 (c_parser_switch_statement): Likewise.
1365 (c_parser_for_statement): Likewise.
1366 (c_parser_asm_statement): Likewise.
1367 (c_parser_asm_operands): Likewise.
1368 (c_parser_cast_expression): Likewise.
1369 (c_parser_sizeof_expression): Likewise.
1370 (c_parser_alignof_expression): Likewise.
1371 (c_parser_generic_selection): Likewise.
1372 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
1373 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
1374 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
1375 In case CPP_OPEN_PAREN, pass loc_open_paren to the
1376 c_parser_skip_until_found call.
1377 (c_parser_objc_class_definition): Use class matching_parens as
1378 above.
1379 (c_parser_objc_method_decl): Likewise.
1380 (c_parser_objc_try_catch_finally_statement): Likewise.
1381 (c_parser_objc_synchronized_statement): Likewise.
1382 (c_parser_objc_at_property_declaration): Likewise.
1383 (c_parser_oacc_wait_list): Likewise.
1384 (c_parser_omp_var_list_parens): Likewise.
1385 (c_parser_omp_clause_collapse): Likewise.
1386 (c_parser_omp_clause_default): Likewise.
1387 (c_parser_omp_clause_if): Likewise.
1388 (c_parser_omp_clause_num_threads): Likewise.
1389 (c_parser_omp_clause_num_tasks): Likewise.
1390 (c_parser_omp_clause_grainsize): Likewise.
1391 (c_parser_omp_clause_priority): Likewise.
1392 (c_parser_omp_clause_hint): Likewise.
1393 (c_parser_omp_clause_defaultmap): Likewise.
1394 (c_parser_oacc_single_int_clause): Likewise.
1395 (c_parser_omp_clause_ordered): Likewise.
1396 (c_parser_omp_clause_reduction): Likewise.
1397 (c_parser_omp_clause_schedule): Likewise.
1398 (c_parser_omp_clause_num_teams): Likewise.
1399 (c_parser_omp_clause_thread_limit): Likewise.
1400 (c_parser_omp_clause_aligned): Likewise.
1401 (c_parser_omp_clause_linear): Likewise.
1402 (c_parser_omp_clause_safelen): Likewise.
1403 (c_parser_omp_clause_simdlen): Likewise.
1404 (c_parser_omp_clause_depend): Likewise.
1405 (c_parser_omp_clause_map): Likewise.
1406 (c_parser_omp_clause_device): Likewise.
1407 (c_parser_omp_clause_dist_schedule): Likewise.
1408 (c_parser_omp_clause_proc_bind): Likewise.
1409 (c_parser_omp_clause_uniform): Likewise.
1410 (c_parser_omp_for_loop): Likewise.
1411 (c_parser_cilk_clause_vectorlength): Likewise.
1412 (c_parser_cilk_clause_linear): Likewise.
1413 (c_parser_transaction_expression): Likewise.
1414 * c-parser.h (c_parser_require): Add param matching_location with
1415 default UNKNOWN_LOCATION.
1416 (c_parser_error): Convert return type from void to bool.
1417 (c_parser_skip_until_found): Add param matching_location with
1418 default UNKNOWN_LOCATION.
1419
30af3a2b
MP
14202017-08-09 Marek Polacek <polacek@redhat.com>
1421
1422 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
1423 * c-tree.h (build_external_ref): Update declaration.
1424 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
1425 (build_external_ref): Change the type of a parameter to bool.
1426 (parser_build_binary_op): Use true/false instead of 1/0.
1427 (pointer_diff): Likewise.
1428 (build_modify_expr): Likewise.
1429 (set_designator): Change the type of a parameter to bool.
1430 (set_init_index): Use true/false instead of 1/0.
1431 (set_init_label): Likewise.
1432 (output_init_element): Change the type of a parameter to bool.
1433 (output_pending_init_elements): Use true/false instead of 1/0.
1434 (process_init_element): Likewise.
1435 (build_binary_op): Change the type of a parameter to bool.
1436
296c53ac
MP
14372017-08-09 Marek Polacek <polacek@redhat.com>
1438
1439 PR c/81233
1440 * c-typeck.c (pedwarn_init): Make the function take a variable list.
1441 Call emit_diagnostic_valist instead of pedwarn.
1442 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
1443 Print the relevant types in diagnostics.
1444
a32c8316
MP
14452017-08-09 Marek Polacek <polacek@redhat.com>
1446
1447 PR c/81417
1448 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
1449 build_conditional_expr.
1450 * c-parser.c (c_parser_conditional_expression): Create locations for
1451 EXP1 and EXP2 from their source ranges. Pass the locations down to
1452 build_conditional_expr.
1453 * c-tree.h (build_conditional_expr): Update declaration.
1454 * c-typeck.c (build_conditional_expr): Add location_t parameters.
1455 For -Wsign-compare, also print the types.
1456
314e6352
ML
14572017-08-08 Martin Liska <mliska@suse.cz>
1458
1459 * c-convert.c: Include header files.
1460 * c-typeck.c: Likewise.
1461
577eec56
ML
14622017-08-07 Martin Liska <mliska@suse.cz>
1463
1464 * c-parser.c (c_parser_attributes): Canonicalize name of an
1465 attribute.
1466
f7b6353a
MP
14672017-08-02 Marek Polacek <polacek@redhat.com>
1468
1469 PR c/81289
1470 * c-parser.c (c_parser_unary_expression): Use set_error.
1471
8a6eab34
MP
1472 PR c/81448
1473 PR c/81306
1474 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
1475 warnings. Avoid walking MACRO_MAP_LOCATIONS.
1476
7fef86d3
JH
14772017-07-31 Jan Hubicka <hubicka@ucw.cz>
1478 Martin Liska <mliska@suse.cz>
1479
1480 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 1481 statement.
7fef86d3 1482
f34ebeb2
ML
14832017-07-31 Martin Liska <mliska@suse.cz>
1484
1485 PR sanitize/81530
1486 * c-convert.c (convert): Guard condition with flag_sanitize_p
1487 also with current_function_decl non-null equality.
1488 * c-decl.c (grokdeclarator): Likewise.
1489 * c-typeck.c (build_binary_op): Likewise.
1490
8595f67b
MP
14912017-07-25 Marek Polacek <polacek@redhat.com>
1492
1493 * c-decl.c (grokfield): Remove local variable.
1494
d49718d6
MP
14952017-07-25 Marek Polacek <polacek@redhat.com>
1496
1497 PR c/81364
1498 * c-parser.c (c_parser_else_body): Don't warn about multistatement
1499 macro expansion if the body is in { }.
1500 (c_parser_while_statement): Likewise.
1501 (c_parser_for_statement): Likewise.
1502
ff22eb12
NS
15032017-07-18 Nathan Sidwell <nathan@acm.org>
1504
1505 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
1506
eea77d1f
DM
15072017-07-14 David Malcolm <dmalcolm@redhat.com>
1508
1509 * c-decl.c (implicitly_declare): When suggesting a missing
1510 #include, provide a fix-it hint.
1511
b6f43128
DM
15122017-07-06 David Malcolm <dmalcolm@redhat.com>
1513
1514 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
1515 and call that instead.
1516 * c-tree.h (selftest::run_c_tests): New decl.
1517
3e2becc4
MP
15182017-06-26 Marek Polacek <polacek@redhat.com>
1519
1520 PR c/80116
1521 * c-parser.c (c_parser_if_body): Set the location of the
1522 body of the conditional after parsing all the labels. Call
1523 warn_for_multistatement_macros.
1524 (c_parser_else_body): Likewise.
1525 (c_parser_switch_statement): Likewise.
1526 (c_parser_while_statement): Likewise.
1527 (c_parser_for_statement): Likewise.
1528 (c_parser_statement): Add a default argument. Save the location
1529 after labels have been parsed.
1530 (c_parser_c99_block_statement): Likewise.
1531
343ae898
RB
15322017-06-19 Richard Biener <rguenther@suse.de>
1533
1534 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1535 negated _Literals to parse _Literal (int) -1.
1536
45b2222a
ML
15372017-06-13 Martin Liska <mliska@suse.cz>
1538
1539 PR sanitize/78204
1540 * c-convert.c (convert): Use sanitize_flags_p.
1541 * c-decl.c (grokdeclarator): Likewise.
1542 * c-typeck.c (convert_for_assignment): Likewise.
1543 (c_finish_return): Likewise.
1544 (build_binary_op): Likewise.
1545
8ab7005b
JJ
15462017-06-08 Jakub Jelinek <jakub@redhat.com>
1547
1548 PR c/81006
1549 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
1550 to sizetype before size_binop.
1551
363dc72c
JJ
15522017-06-07 Jakub Jelinek <jakub@redhat.com>
1553
1554 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
1555 of TDI_generic.
1556
dc949728
MP
15572017-06-06 Marek Polacek <polacek@redhat.com>
1558
1559 PR c/79983
1560 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
1561 ref.
1562 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
1563
40ffd95f
BE
15642017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1565
1566 * c-parser.c (c_parser_binary_expression): Implement the
1567 -Wsizeof_pointer_div warning.
1568 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
1569 from a parenthesized expression.
1570 (c_parser_expr_list): Use c_last_sizeof_loc.
1571 * c-tree.h (c_last_sizeof_loc): New external.
1572 * c-typeck.c (c_last_sizeof_loc): New variable.
1573 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
1574
9fc5e7a4
MM
15752017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
1576
1577 PR testsuite/80580
1578 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
1579
f012c8ef
DM
15802017-05-30 David Malcolm <dmalcolm@redhat.com>
1581
1582 * c-objc-common.c (c_tree_printer): Gain bool and const char **
1583 parameters.
1584
3cd211af
MS
15852017-05-24 Martin Sebor <msebor@redhat.com>
1586
1587 PR c/80731
1588 * c-fold.c (c_fully_fold_internal): Adjust.
1589 * c-typeck.c (parser_build_unary_op): Adjust.
1590
fd71a9a2
TS
15912017-05-23 Thomas Schwinge <thomas@codesourcery.com>
1592
1593 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
1594 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
1595 "VECTOR_LENGTH".
1596
92fa0f9e
MP
15972017-05-23 Marek Polacek <polacek@redhat.com>
1598
1599 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
1600 quotes.
1601
d11c168a
JJ
16022017-05-22 Jakub Jelinek <jakub@redhat.com>
1603
1604 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
1605 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
1606 it returned invariant. Call tree_invariant_p unconditionally
1607 afterwards to decide whether to return expr or op0.
1608
58aca9d9
NS
16092017-05-22 Nathan Sidwell <nathan@acm.org>
1610
1611 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
1612
7fd549d2
TS
16132017-05-19 Thomas Schwinge <thomas@codesourcery.com>
1614
1615 * c-parser.c (c_parser_omp_clause_default): Handle
1616 "OMP_CLAUSE_DEFAULT_PRESENT".
1617
6ecd2339
BE
16182017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1619
1620 * config-lang.in (gtfiles): Add c-family/c-format.c.
1621
8a57ecff
NS
16222017-05-18 Nathan Sidwell <nathan@acm.org>
1623
1624 * c-decl.c (pushdecl_top_level): Delete unused function.
1625
6574d78e
MP
16262017-05-18 Marek Polacek <polacek@redhat.com>
1627
1628 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
1629 (check_earlier_gotos): Likewise.
1630 (define_label): Likewise.
1631 (pending_xref_error): Likewise.
1632 (smallest_type_quals_location): Likewise.
1633 (grokdeclarator): Likewise.
1634 (grokparms): Likewise.
1635 (identifier_global_value): Likewise.
1636 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
1637 (find_init_member): Likewise.
1638
e3455240
MP
16392017-05-18 Marek Polacek <polacek@redhat.com>
1640
1641 * c-decl.c (start_decl): Use false/true instead of 0/1.
1642 (grokdeclarator): Likewise.
1643 (finish_struct): Likewise.
1644 (start_function): Change the return type to bool. Use false/true
1645 instead of 0/1.
1646 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
1647 * c-tree.h (start_function): Update.
1648 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
1649 (set_designator): Change the return type to bool. Use false/true
1650 instead of 0/1.
1651
3fa8871b
MP
16522017-05-17 Marek Polacek <polacek@redhat.com>
1653
1654 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
1655 * c-typeck.c: Likewise.
1656
142473df
MP
16572017-05-17 Marek Polacek <polacek@redhat.com>
1658
1659 PR sanitizer/80659
1660 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
1661 DECL_IGNORED_P even for non-static compound literals.
1662
1a817418
ML
16632017-05-17 Martin Liska <mliska@suse.cz>
1664
1665 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1666 use it instead of int type.
1667
b2fa0a8b
MP
16682017-05-17 Marek Polacek <polacek@redhat.com>
1669
1670 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
1671 call c_fully_fold.
1672 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
1673 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
1674 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1675 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1676 save_expr.
1677 (c_parser_conditional_expression): Likewise.
1678 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1679 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1680 (process_init_element): Likewise.
1681 (build_binary_op): Likewise.
1682 (handle_omp_array_sections_1): Likewise.
1683
1e47f02b
TS
16842017-05-12 Thomas Schwinge <thomas@codesourcery.com>
1685
1686 * c-parser.c (c_parser_omp_clause_num_gangs)
1687 (c_parser_omp_clause_num_workers)
1688 (c_parser_omp_clause_vector_length): Merge functions into...
1689 (c_parser_oacc_single_int_clause): ... this new function. Adjust
1690 all users.
1691
c24e924f
NS
16922017-05-11 Nathan Sidwell <nathan@acm.org>
1693
1694 * gimple-parser.c: Don't #include tree-dump.h.
1695
c587104e
MM
16962017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1697
1698 PR testsuite/80580
1699 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
1700
67ac9a9d
MM
17012017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1702
1703 PR testsuite/80580
1704 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1705 incorrect __MEM syntax.
1706
ac4eb40f
MM
17072017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1708
1709 PR testsuite/80580
1710 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1711 type of unary '*'.
1712
641da50a
NS
17132017-05-09 Nathan Sidwell <nathan@acm.org>
1714
1715 * c-tree.h (pushdecl): Declare.
1716
56d35585
DM
17172017-05-05 David Malcolm <dmalcolm@redhat.com>
1718
1719 * c-decl.c (warn_defaults_to): Replace report_diagnostic
1720 with diagnostic_report_diagnostic.
1721 * c-errors.c (pedwarn_c99): Likewise.
1722 (pedwarn_c90): Likewise.
1723
815d9cc6
XR
17242017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1725
92a285c1 1726 PR c++/80038
815d9cc6
XR
1727 * c-gimplify.c (c_gimplify_expr): Remove calls to
1728 cilk_gimplifY_call_params_in_spawned_fn.
1729
1c4ea66f
DM
17302017-04-25 David Malcolm <dmalcolm@redhat.com>
1731
1732 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1733 hint for removing extra semicolon.
1734
666f7903
JJ
17352017-04-21 Jakub Jelinek <jakub@redhat.com>
1736
1737 PR c/80468
1738 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
1739 enabled, set specs->type to integer_type_node.
1740
5764ee3c
JW
17412017-04-03 Jonathan Wakely <jwakely@redhat.com>
1742
1743 * c-array-notation.c: Fix typo in comment.
1744
10fa8dfb
MP
17452017-03-29 Marek Polacek <polacek@redhat.com>
1746
1747 PR c/79730
1748 * c-decl.c (finish_decl): Check VAR_P.
1749
a9e4a1a5
JJ
17502017-03-27 Jakub Jelinek <jakub@redhat.com>
1751
1752 PR middle-end/80162
1753 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1754 * c-typeck.c (c_mark_addressable): Likewise. Look through
1755 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1756 to ARRAY_TYPE.
1757 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
1758
ee3ff394
MP
17592017-03-23 Marek Polacek <polacek@redhat.com>
1760
1761 * c-tree.h: Remove a C_RID_YYCODE reference.
1762
4d1b8e70
JJ
17632017-03-21 Jakub Jelinek <jakub@redhat.com>
1764
1765 PR c/80097
1766 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
1767 optional COMPOUND_EXPR with ubsan instrumentation.
1768
31dc71a8
MP
17692017-03-17 Marek Polacek <polacek@redhat.com>
1770
1771 * c-parser.c: Add C11 references.
1772
d579c385
MP
17732017-03-15 Marek Polacek <polacek@redhat.com>
1774
1775 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
1776
85059a38
MP
17772017-03-11 Marek Polacek <polacek@redhat.com>
1778
1779 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
1780
2f6f187a
DM
17812017-03-10 David Malcolm <dmalcolm@redhat.com>
1782
1783 PR translation/79848
1784 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1785 "%qs".
1786 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1787
36618428
MP
17882017-03-09 Marek Polacek <polacek@redhat.com>
1789
1790 PR sanitizer/79757
1791 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1792 parameter declarations with initializers.
1793
01e5af5a
JJ
17942017-03-09 Jakub Jelinek <jakub@redhat.com>
1795
1796 PR c/79969
1797 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
1798 TYPE_STUB_DECL.
1799
a71dbc63
JJ
18002017-03-07 Jakub Jelinek <jakub@redhat.com>
1801
1802 PR c/79834
1803 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1804 for "may only be used in compound statements" diagnostics, change it
1805 such that the same translatable string is used for all pragmas. For
1806 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1807 diagnostics.
1808 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1809 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1810 "may only be used in compound statements" diagnostics, such that the
1811 same translatable string is used for all pragmas.
1812
1ff4bae6
MP
18132017-03-04 Marek Polacek <polacek@redhat.com>
1814
1815 PR c/79847
1816 * c-decl.c (implicit_decl_warning): Add missing space.
1817
7f5a7d78
MP
18182017-03-03 Marek Polacek <polacek@redhat.com>
1819
1820 PR c/79758
1821 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1822 current_function_prototype_arg_types is error_mark_node. Fix
1823 formatting. Use TREE_VALUE instead of TREE_TYPE.
1824
883c8f06
JJ
18252017-03-03 Jakub Jelinek <jakub@redhat.com>
1826
79c9b7a8
JJ
1827 PR c/79837
1828 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1829 %<min%> or %<max%> in the diagnostics, instead mention identifier.
1830 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1831 diagnostics.
1832
883c8f06
JJ
1833 PR c/79836
1834 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1835 instead of %<_Generic>.
1836 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1837 (c_parser_omp_target_exit_data): Use %<release%> instead of
1838 %<release>.
1839
324ff1a0
JJ
18402017-02-28 Jakub Jelinek <jakub@redhat.com>
1841
1842 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1843 instead of just cond ? "..." : "...".
1844 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1845 for "enter"/"exit" keyword.
1846 (c_finish_oacc_routine): Don't use %s to supply portions of the
1847 message.
1848
4227c9ad
JJ
18492017-02-24 Jakub Jelinek <jakub@redhat.com>
1850
1851 PR c++/79588
1852 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1853 handle -Wrestrict here.
1854 * c-typeck.c (build_function_call_vec): Adjust
1855 check_function_arguments caller.
1856
5d972e66
RB
18572017-02-23 Richard Biener <rguenther@suse.de>
1858
1859 PR c/79684
1860 * gimple-parser.c (c_parser_gimple_statement): Use set_error
1861 to initialize c_exprs to return.
1862 (c_parser_gimple_binary_expression): Likewise.
1863 (c_parser_gimple_unary_expression): Likewise.
1864 (c_parser_gimple_postfix_expression): Likewise.
1865
61ac5ebe
MP
18662017-02-22 Marek Polacek <polacek@redhat.com>
1867
1868 PR c/79662
1869 * c-typeck.c (convert_arguments): Handle error_mark_node.
1870
41d1b0b1
PK
18712017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1872
1873 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1874 value of c_parser_parse_ssa_name against error_mark_node and emit
1875 error if ssa name is anonymous and written as default definition.
1876
eab1f169
PK
18772017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1878
1879 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1880 FMA_EXPR.
1881
bcac0b4d
JJ
18822017-02-16 Jakub Jelinek <jakub@redhat.com>
1883
1884 PR c++/79512
1885 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1886 ignore #pragma omp target even when not followed by identifier.
1887
1be33173
PK
18882017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1889
1890 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1891 (c_parser_gimple_unary_expression): Likewise.
1892
aa326bfb
JJ
18932017-02-13 Jakub Jelinek <jakub@redhat.com>
1894
1895 * c-parser.c (c_parser_oacc_declare): Add missing space in
1896 diagnostics.
1897
8a398bc5
PK
18982017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1899
1900 PR c/79478
1901 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1902 set_c_expr_source_range when parsing ssa-name.
1903
3dcde5ef
PG
19042017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
1905 Richard Biener <rguenther@suse.de>
1906
1907 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1908 building IL when arguments are error_mark_node.
1909 (c_parser_gimple_unary_expression): Likewise.
1910 (c_parser_gimple_if_stmt): Likewise.
1911 (c_parser_gimple_switch_stmt): Likewise.
1912 (c_parser_gimple_return_stmt): Likewise.
1913 (c_parser_parse_ssa_name): When name lookup fails do not build
1914 an SSA name. Use undeclared rather than not declared in error
1915 reporting.
1916
192b048b
MP
19172017-02-09 Marek Polacek <polacek@redhat.com>
1918
1919 PR c/79428
1920 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1921 instead of c_parser_skip_until_found.
1922
56f71478
JJ
19232017-02-09 Jakub Jelinek <jakub@redhat.com>
1924
1925 PR c/79431
1926 * c-parser.c (c_parser_omp_declare_target): Don't invoke
1927 symtab_node::get on automatic variables.
1928
02889d23
CLT
19292016-02-09 Nathan Sidwell <nathan@codesourcery.com>
1930 Chung-Lin Tang <cltang@codesourcery.com>
1931
1932 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1933 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1934 semantic checking.
1935 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1936
7af4b20d
RB
19372017-02-07 Richard Biener <rguenther@suse.de>
1938
1939 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1940 (c_parser_gimple_postfix_expression_after_primary):
1941 Do not use c_build_function_call_vec to avoid folding and promotion.
1942 Simplify.
1943
e5e391d6
MO
19442017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1945
1946 PR lto/79061
1947 * c-decl.c (pop_scope): Pass main_input_filename to
1948 build_translation_unit_decl.
1949
c2e84327
DM
19502017-01-24 David Malcolm <dmalcolm@redhat.com>
1951
1952 * c-parser.c: Include "read-rtl-function.h" and
1953 "run-rtl-passes.h".
1954 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
1955 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
1956 production. Update for renaming of field "gimple_pass" to
1957 "gimple_or_rtl_pass". If __RTL was seen, call
1958 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
1959 to an auto_timevar, to cope with early exit.
1960 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1961 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1962 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1963 Handle RID_RTL.
1964 (c_parser_parse_rtl_body): New function.
1965 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1966 (struct c_declspecs): Rename field "gimple_pass" to
1967 "gimple_or_rtl_pass". Add field "rtl_p".
1968 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1969 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1970 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1971 (c_parser_gimple_or_rtl_pass_list): ...this.
1972
2ebd93e1
MP
19732017-01-20 Marek Polacek <polacek@redhat.com>
1974
1975 PR c/64279
1976 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1977
b1c95bb5
RB
19782017-01-13 Richard Biener <rguenther@suse.de>
1979
1980 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1981 nops.
1982
25329913
RB
19832017-01-13 Richard Biener <rguenther@suse.de>
1984
1985 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1986 _Literal ( type-name ) number.
1987
6bb4ea5c
RB
19882017-01-12 Richard Biener <rguenther@suse.de>
1989
1990 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1991 __MEM.
1992
6b5b4e9c
JJ
19932017-01-11 Jakub Jelinek <jakub@redhat.com>
1994
1995 PR c++/72813
1996 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
1997 PCH file.
1998
e3252775
RB
19992017-01-11 Richard Biener <rguenther@suse.de>
2000
2001 PR bootstrap/79052
2002 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
2003 returns on parse errors.
2004
a9342885
MP
20052017-01-04 Marek Polacek <polacek@redhat.com>
2006
2007 PR c++/64767
2008 * c-parser.c (c_parser_postfix_expression): Mark zero character
2009 constants by setting original_type in c_expr.
2010 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
2011 with a zero character constant.
2012 (char_type_p): New function.
2013
5dd9a9d0
DM
20142017-01-04 David Malcolm <dmalcolm@redhat.com>
2015
2016 * c-parser.c (c_parser_declaration_or_fndef): Create a
2017 rich_location at init_loc and parse it to start_init.
2018 (last_init_list_comma): New global.
2019 (c_parser_braced_init): Update last_init_list_comma when parsing
2020 commas. Pass it to pop_init_level. Pass location of closing
2021 brace to pop_init_level.
2022 (c_parser_postfix_expression_after_paren_type): Create a
2023 rich_location at type_loc and parse it to start_init.
2024 (c_parser_omp_declare_reduction): Likewise for loc.
2025 * c-tree.h (start_init): Add rich_location * param.
2026 (pop_init_level): Add location_t param.
2027 * c-typeck.c (struct initializer_stack): Add field
2028 "missing_brace_richloc".
2029 (start_init): Add richloc param, use it to initialize
2030 the stack node's missing_brace_richloc.
2031 (last_init_list_comma): New decl.
2032 (finish_implicit_inits): Pass last_init_list_comma to
2033 pop_init_level.
2034 (push_init_level): When finding missing open braces, add fix-it
2035 hints to the richloc.
2036 (pop_init_level): Add "insert_before" param and pass it
2037 when calling pop_init_level. Add fixits about missing
2038 close braces to any richloc. Use the richloc for the
2039 -Wmissing-braces warning.
2040 (set_designator): Pass last_init_list_comma to pop_init_level.
2041 (process_init_element): Likewise.
2042
cbe34bb5
JJ
20432017-01-01 Jakub Jelinek <jakub@redhat.com>
2044
2045 Update copyright years.
2046
d17680f3
JJ
20472016-12-21 Jakub Jelinek <jakub@redhat.com>
2048
0dba7960
JJ
2049 PR bootstrap/78817
2050 * c-typeck.c (build_function_call_vec): If check_function_arguments
2051 returns true, set TREE_NO_WARNING on CALL_EXPR.
2052
d17680f3
JJ
2053 PR c/77767
2054 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
2055 to *expr instead of overwriting it.
2056
aa90531e
RB
20572016-12-20 Richard Biener <rguenther@suse.de>
2058
2059 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
2060 error recovery.
2061 (c_parser_gimple_statement): Only build assigns for non-error
2062 stmts.
2063 (c_parser_gimple_postfix_expression_after): Improve error recovery.
2064
629b3d75
MJ
20652016-12-14 Martin Jambor <mjambor@suse.cz>
2066
2067 * c-parser.c: Include omp-general.h and omp-offload.h instead of
2068 omp-low.h.
2069 (c_finish_oacc_routine): Adjusted call to
2070 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
2071 to use their new names.
2072 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
2073 use its new name.
2074 (c_parser_oacc_update): Likewise.
2075 (c_parser_omp_simd): Likewise.
2076 (c_parser_omp_target_update): Likewise.
2077 * c-typeck.c: Include omp-general.h instead of omp-low.h.
2078 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
2079 name.
2080 (c_finish_omp_cancellation_point): Likewise.
2081 * gimple-parser.c: Do not include omp-low.h
2082
c5af52eb
CP
20832016-12-02 Cesar Philippidis <cesar@codesourcery.com>
2084 James Norris <jnorris@codesourcery.com>
2085
2086 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
2087 EXIT_DATA,WAIT} are not used in compound statements.
2088 (c_parser_oacc_enter_exit_data): Update diagnostics.
2089
48330c93
BE
20902016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2091
2092 PR c++/71973
2093 * c-decl.c (diagnose_mismatched_decls): Use
2094 OPT_Wbuiltin_declaration_mismatch here too.
2095
899ca90e 20962016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
2097 Alan Hayward <alan.hayward@arm.com>
2098 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
2099
2100 * c-decl.c (merge_decls): Use SET_DECL_MODE.
2101 (make_label, finish_struct): Likewise.
2102
1ee62b92 21032016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 2104 Richard Biener <rguenther@suse.de>
22b15758 2105
8e745a17
JJ
2106 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
2107 * config-lang.in (gtfiles): Add c/c-parser.h.
2108 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
2109 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
2110 * c-parser.c (enum c_id_kind, struct c_token,
2111 c_parser_next_token_is, c_parser_next_token_is_not,
2112 c_parser_next_token_is_keyword,
2113 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
2114 Split out to ...
2115 * c-parser.h: ... new header.
2116 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 2117 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
2118 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2119 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2120 c_parser_error, c_parser_require, c_parser_skip_until_found,
2121 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2122 c_parser_type_name): Export.
2123 (c_parser_tokens_buf): New function.
2124 (c_parser_error): Likewise.
2125 (c_parser_set_error): Likewise.
2126 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
2127 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
2128 via c_parser_parse_gimple_body.
8e745a17
JJ
2129 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
2130 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2131 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2132 c_parser_error, c_parser_require, c_parser_skip_until_found,
2133 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2134 c_parser_type_name): Declare.
1ee62b92
PG
2135 (struct c_parser): Declare forward.
2136 (c_parser_tokens_buf): Declare.
8e745a17
JJ
2137 (c_parser_error): Likewise.
2138 (c_parser_set_error): Likewise.
2139 * gimple-parser.c: New file.
2140 * gimple-parser.h: Likewise.
1ee62b92 2141
22b15758
UB
21422016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2143
2144 PR c/35503
2145 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2146 warn_for_restrict.
2147
84ff4775
LCW
21482016-09-11 Le-Chun Wu <lcwu@google.com>
2149 Mark Wielaard <mjw@redhat.com>
2150
2151 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
2152 to the given -Wshadow= variant.
2153
4d0cdd0c
TP
21542016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2155
2156 * c-typeck.c: Include memmodel.h.
2157
1202f33e
JJ
21582016-10-13 Jakub Jelinek <jakub@redhat.com>
2159
2160 PR target/77957
2161 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
2162 instead of lhd_return_null_tree_v.
2163
8a14afd0
BS
21642016-10-07 Bernd Schmidt <bschmidt@redhat.com>
2165
2166 PR c++/69733
2167 * c-decl.c (smallest_type_quals_location): New static function.
2168 (grokdeclarator): Try to find the correct location for an ignored
2169 qualifier.
2170
81fea426
MP
21712016-09-26 Marek Polacek <polacek@redhat.com>
2172
2173 PR c/7652
2174 * c-decl.c (pop_scope): Add gcc_fallthrough.
2175
21762016-09-26 Marek Polacek <polacek@redhat.com>
2177
2178 PR c/7652
2179 * c-parser.c (struct c_token): Add flags field.
2180 (c_lex_one_token): Pass it to c_lex_with_flags.
2181 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
2182 into IFN_FALLTHROUGH.
2183 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
2184 attribute fallthrough after a case label or default label.
2185 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
2186
9a2300e9
MP
21872016-09-24 Marek Polacek <polacek@redhat.com>
2188
2189 PR c/77490
2190 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
2191 have boolean value. Warn about ++/-- on booleans.
2192
7de76362
JJ
21932016-09-23 Jakub Jelinek <jakub@redhat.com>
2194
2195 * c-parser.c (incomplete_record_decls): Remove unnecessary
2196 = vNULL initialization of file scope vec.
2197
5b73d2ab
MP
21982016-09-16 Marek Polacek <polacek@redhat.com>
2199
2200 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
2201
e51fbec3
MP
22022016-09-14 Marek Polacek <polacek@redhat.com>
2203
2204 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
2205 (fix_array_notation_expr): Likewise.
2206 * c-decl.c (finish_decl): Likewise.
2207 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2208 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
2209 (function_to_pointer_conversion): Use false instead of 0.
2210 (convert_lvalue_to_rvalue): Likewise.
2211 (parser_build_unary_op): Likewise.
2212 (build_atomic_assign): Likewise.
2213 (build_unary_op): Change nonconvert parameter type to bool, use
2214 true/false instead of 1/0.
2215 (build_binary_op): Use true instead of 1.
2216
254830ba
DM
22172016-09-13 David Malcolm <dmalcolm@redhat.com>
2218
2219 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
2220 of add_fixit_insert to add_fixit_insert_before.
2221
4c13ba17
MP
22222016-09-13 Marek Polacek <polacek@redhat.com>
2223
2224 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
2225 it.
2226
54dcdb88
BE
22272016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
2228
2229 PR c++/77496
2230 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
2231 COMPOUND_EXPR to warn_for_omitted_condop.
2232
e5106e27
DM
22332016-09-07 David Malcolm <dmalcolm@redhat.com>
2234
2235 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
2236 c_get_substring_location for this new langhook.
2237
9dc5773f
JJ
22382016-09-02 Jakub Jelinek <jakub@redhat.com>
2239
2240 PR c/65467
2241 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
2242 flag_openmp.
2243 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
2244 instead of mark_exp_read on low_bound/length expression.
2245 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
2246 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2247 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2248 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
2249 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
2250 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
2251 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
2252 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
2253 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
2254 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
2255 instead of mark_expr_read.
2256 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
2257 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
2258 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
2259 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
2260 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
2261 array section bases outside of depend clause, for depend clause
2262 use convert_lvalue_to_rvalue on the base.
2263 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
2264 linear, aligned, map, to and from clauses.
2265 (c_omp_clause_copy_ctor): New function.
2266
295844f6
MP
22672016-09-01 Marek Polacek <polacek@redhat.com>
2268
2269 PR c/7652
2270 * c-typeck.c (composite_type): Add FALLTHRU comment.
2271
089af25c
DM
22722016-08-31 David Malcolm <dmalcolm@redhat.com>
2273
2274 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
2275 to the insertion fixits for "struct", "union", and "enum".
2276
f9087798
DM
22772016-08-30 David Malcolm <dmalcolm@redhat.com>
2278
2279 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
2280 rather than add_fixit_misspelled_id.
2281 (undeclared_variable): Likewise.
2282 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
2283 now-redundant "here" params from add_fixit_insert method calls.
2284 (c_parser_parameter_declaration): Likewise.
2285 * c-typeck.c (build_component_ref): Remove now-redundant range
2286 param from add_fixit_replace method calls.
2287
ebef225f
MP
22882016-08-25 Marek Polacek <polacek@redhat.com>
2289
2290 * c-typeck.c (parser_build_binary_op): Pass LHS to
2291 warn_logical_not_parentheses.
2292
fe377a48
MP
22932016-08-25 Marek Polacek <polacek@redhat.com>
2294
2295 PR c/77323
2296 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
2297 or _FloatN or _FloatNx is not supported.
2298 (finish_declspecs): Set type to integer_type_node when _FloatN or
2299 _FloatNx is not supported.
2300
c65699ef
JM
23012016-08-19 Joseph Myers <joseph@codesourcery.com>
2302
2303 PR c/32187
2304 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
2305 (struct c_declspecs): Add field floatn_nx_idx.
2306 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
2307 and _FloatNx type specifiers.
2308 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
2309 (c_parser_declspecs, c_parser_attribute_any_word)
2310 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
2311 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
2312 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
2313 narrower than double.
2314
2f1364c2
JJ
23152016-08-12 Jakub Jelinek <jakub@redhat.com>
2316 Martin Liska <mliska@suse.cz>
2317
2318 PR c/67410
2319 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
2320 % to determine val element to change. Assert that
2321 wchar_bytes * charwidth fits into val array.
2322
191816a3
MP
23232016-08-12 Marek Polacek <polacek@redhat.com>
2324
2325 PR c/7652
2326 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
2327 (c_parser_postfix_expression): Likewise.
2328 * c-typeck.c (build_unary_op): Adjust fall through comment.
2329 (c_mark_addressable): Likewise.
2330
b95a64bb
JJ
23312016-08-11 Jakub Jelinek <jakub@redhat.com>
2332
2333 PR c/72816
2334 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
2335 array member through typedef, for orig_qual_indirect == 0 clear
2336 orig_qual_type.
2337
895aa8e1
DM
23382016-08-08 David Malcolm <dmalcolm@redhat.com>
2339
2340 PR c/64955
2341 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
2342 this up to selftest::run_c_tests.
2343 (selftest::run_c_tests): New function.
2344
0b212d8c
TS
23452016-08-04 Thomas Schwinge <thomas@codesourcery.com>
2346
ae9281fc
TS
2347 * c-parser.c (struct oacc_routine_data): Add error_seen and
2348 fndecl_seen members.
2349 (c_finish_oacc_routine): Use these.
2350 (c_parser_declaration_or_fndef): Adjust.
2351 (c_parser_oacc_routine): Likewise. Support more C language
2352 constructs, and improve diagnostics. Move pragma context
2353 checking...
2354 (c_parser_pragma): ... here.
2355
0b212d8c
TS
2356 * c-parser.c (struct oacc_routine_data): New.
2357 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
2358 Simplify code.
2359 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
2360 declare target" attribute.
2361
76e2c821
JB
23622016-08-01 Jan Beulich <jbeulich@suse.com>
2363
2364 * c-fold.c (c_fully_fold_internal): Also emit shift count
2365 warnings for vector types.
2366 * c-typeck.c (build_binary_op): Likewise.
2367
f618a472
MP
23682016-07-29 Marek Polacek <polacek@redhat.com>
2369
2370 PR c/71742
2371 * c-decl.c (finish_struct): Rephrase an error message.
2372
efd0786f
MP
2373 PR c/71853
2374 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
2375 to error node for invalid code.
2376
e00dceaf
MP
2377 PR c/71573
2378 * c-decl.c (implicitly_declare): Return decl early not only for
2379 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
2380
673a107a
JJ
23812016-07-29 Jakub Jelinek <jakub@redhat.com>
2382
2383 PR c/71969
2384 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
2385 on GNU extern inline functions.
2386
a5b5c8b6
MP
23872016-07-29 Marek Polacek <polacek@redhat.com>
2388
2389 PR c/71583
2390 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
2391 check expr.value.
2392
e3fe09c1
UB
23932016-07-22 Uros Bizjak <ubizjak@gmail.com>
2394
2395 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
2396
7c8f7eaa
DM
23972016-07-20 David Malcolm <dmalcolm@redhat.com>
2398
2399 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
2400 spellcheck-tree.h
2401 (best_macro_match): Likewise, converting from a typedef to a
2402 subclass.
2403 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
2404 (lookup_name_fuzzy): Update for change of best_macro_match to a
2405 subclass with a ctor that calls cpp_forall_identifiers.
2406
de6a69ee
DM
24072016-07-20 David Malcolm <dmalcolm@redhat.com>
2408
2409 * c-decl.c (implicit_decl_warning): Update for conversion of
2410 return type of lookup_name_fuzzy to const char *.
2411 (undeclared_variable): Likewise.
2412 (lookup_name_fuzzy): Convert return type from tree to
2413 const char *.
2414 * c-parser.c (c_parser_declaration_or_fndef): Update for
2415 conversion of return type of lookup_name_fuzzy to const char *.
2416 (c_parser_parameter_declaration): Likewise.
2417
b1c9c068
CP
24182016-07-15 Cesar Philippidis <cesar@codesourcery.com>
2419
2420 * c-parser.c (c_parser_oacc_declare): Don't scan for
2421 GOMP_MAP_POINTER.
2422 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
2423 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
2424 zero-length subarrays.
2425
ddbbcb19
JJ
24262016-07-15 Jakub Jelinek <jakub@redhat.com>
2427
2428 PR c/71858
2429 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
2430 instead of FUZZY_LOOKUP_NAME.
2431 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
2432 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
2433
dd36b877
JJ
24342016-07-14 Jakub Jelinek <jakub@redhat.com>
2435
2436 PR c/71858
2437 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
2438
8c681247
TS
24392016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2440
2441 * c-parser.c (c_parser_generic_selection): Make type of variable
2442 auto_vec.
2443 (c_parser_omp_declare_simd): Likewise.
2444
bf4fa671
TS
24452016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2446
2447 * c-decl.c (struct c_struct_parse_info): Change member types
2448 from vec to auto_vec.
2449 (start_struct): Adjust.
2450 (finish_struct): Likewise.
2451
557e8c49
JJ
24522016-07-02 Jakub Jelinek <jakub@redhat.com>
2453
2454 PR c/71719
2455 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
2456
54d19c3b
TS
24572016-06-29 Thomas Schwinge <thomas@codesourcery.com>
2458
2459 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
2460 Move pragma context checking into...
2461 (c_parser_omp_cancellation_point): ... here, and improve
2462 diagnostic messages.
2463 * c-typeck.c (c_finish_omp_cancel)
2464 (c_finish_omp_cancellation_point): Improve diagnostic messages.
2465
152ef731
JJ
24662016-06-29 Jakub Jelinek <jakub@redhat.com>
2467
2468 PR c/71685
2469 * c-typeck.c (c_build_qualified_type): Don't clear
2470 C_TYPE_INCOMPLETE_VARS for the main variant.
2471
24722016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
2473
2474 PR c/71552
2475 * c-typeck.c (output_init_element): Diagnose incompatible types
2476 before non-constant initializers.
2477
e9ac1f86
JJ
24782016-06-28 Jakub Jelinek <jakub@redhat.com>
2479
2480 * Make-lang.in: Don't cat ../stage_current if it does not exist.
2481
277d7ee0
AK
24822016-06-23 Andi Kleen <ak@linux.intel.com>
2483
2484 * Make-lang.in: Add support for autofdo.
2485
1a4f11c8
DM
24862016-06-22 David Malcolm <dmalcolm@redhat.com>
2487
2488 PR c/70339
2489 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
2490 (implicit_decl_warning): When issuing warnings for implicit
2491 declarations, attempt to provide a suggestion via
2492 lookup_name_fuzzy.
2493 (undeclared_variable): Likewise when issuing errors.
2494 (lookup_name_in_scope): Likewise.
2495 (struct edit_distance_traits<cpp_hashnode *>): New struct.
2496 (best_macro_match): New typedef.
2497 (find_closest_macro_cpp_cb): New function.
2498 (lookup_name_fuzzy): New function.
2499 * c-parser.c: Include gcc-rich-location.h.
2500 (c_token_starts_typename): Split out case CPP_KEYWORD into...
2501 (c_keyword_starts_typename): ...this new function.
2502 (c_parser_declaration_or_fndef): When issuing errors about
2503 missing "struct" etc, add a fixit. For other kinds of errors,
2504 attempt to provide a suggestion via lookup_name_fuzzy.
2505 (c_parser_parms_declarator): When looking ahead to detect typos in
2506 type names, also reject CPP_KEYWORD.
2507 (c_parser_parameter_declaration): When issuing errors about
2508 unknown type names, attempt to provide a suggestion via
2509 lookup_name_fuzzy.
2510 * c-tree.h (c_keyword_starts_typename): New prototype.
2511
5a578671
JM
25122016-06-20 Joseph Myers <joseph@codesourcery.com>
2513
2514 PR c/71601
2515 * c-typeck.c (build_conditional_expr): Return error_mark_node if
2516 c_common_type returns error_mark_node.
2517
3f8257db 25182016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
2519
2520 PR c/69507
2521 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
2522 __alignof__ (expression).
2523
6a3f203c
DM
25242016-06-14 David Malcolm <dmalcolm@redhat.com>
2525
2526 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
2527
264757fb
DM
25282016-06-14 David Malcolm <dmalcolm@redhat.com>
2529
2530 * c-typeck.c (build_component_ref): Simplify fixit code by
2531 using gcc_rich_location::add_fixit_misspelled_id.
2532 (set_init_label): Likewise.
2533
f7e4f2e3
DM
25342016-06-13 David Malcolm <dmalcolm@redhat.com>
2535
2536 * c-parser.c (c_parser_initelt): Provide location of name for new
2537 location_t param of set_init_label.
2538 * c-tree.h (set_init_label): Add location_t param.
2539 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
2540 param and use it when issuing error messages about unrecognized
2541 field names. Attempt to provide a fixit hint if appropriate,
2542 otherwise update the error message to provide the type name.
2543
4b1ffdb1
TS
25442016-06-10 Thomas Schwinge <thomas@codesourcery.com>
2545
2546 PR c/71381
2547 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
2548 Loosen checking.
2549
44a845ca
MS
25502016-06-08 Martin Sebor <msebor@redhat.com>
2551 Jakub Jelinek <jakub@redhat.com>
2552
2553 PR c++/70507
2554 PR c/68120
2555 * c-typeck.c (convert_arguments): Don't promote last argument
2556 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2557
92a5f2ba
MP
25582016-06-08 Marek Polacek <polacek@redhat.com>
2559
2560 PR c/71418
2561 * c-decl.c (grokdeclarator): Check TYPE_P.
2562
08203f73
MP
2563 PR c/71426
2564 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
2565 code.
2566
6ffd47b7
DM
25672016-06-07 David Malcolm <dmalcolm@redhat.com>
2568
2569 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
2570 and structure element reference, capture the location of the
2571 element name token and pass it to build_component_ref.
2572 (c_parser_postfix_expression_after_primary): Likewise for
2573 structure element dereference.
2574 (c_parser_omp_variable_list): Likewise for
2575 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
2576 * c-tree.h (build_component_ref): Add location_t param.
2577 * c-typeck.c (build_component_ref): Add location_t param
2578 COMPONENT_LOC. Use it, if available, when issuing hints about
2579 mispelled member names to provide a fixit replacement hint.
2580
1f40cff3
MP
25812016-06-06 Marek Polacek <polacek@redhat.com>
2582
2583 PR c/71362
2584 * c-parser.c (c_parser_direct_declarator): Set location.
2585
5545a907
MP
25862016-06-06 Marek Polacek <polacek@redhat.com>
2587
2588 * c-typeck.c (comptypes_internal): Handle comparisons of
2589 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
2590 TYPE_REF_CAN_ALIAS_ALL.
2591
b605f663
CLT
25922016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
2593
2594 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
2595 arguments as addressable when async clause exists.
2596
00631022
JJ
25972016-05-30 Jakub Jelinek <jakub@redhat.com>
2598
2599 PR c++/71349
2600 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
2601 when combined with target construct.
2602
7211a097
JJ
26032016-05-26 Jakub Jelinek <jakub@redhat.com>
2604
2605 * c-parser.c (c_parser_omp_clause_schedule): Warn if
2606 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
2607
95efe6b6
MP
26082016-05-25 Marek Polacek <polacek@redhat.com>
2609
2610 PR c/71265
2611 * c-decl.c (c_make_fname_decl): Don't check seen_error.
2612
a23faf7a
MP
2613 PR c/71266
2614 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
2615
e46c7770
CP
26162016-05-24 Cesar Philippidis <cesar@codesourcery.com>
2617
2618 * c-parser.c (c_parser_oacc_declare): Add support for
2619 GOMP_MAP_FIRSTPRIVATE_POINTER.
2620 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
2621 argument with enum c_omp_region_type ort.
2622 (handle_omp_array_sections): Likewise. Update call to
2623 handle_omp_array_sections_1.
2624 (c_finish_omp_clauses): Add specific errors and warning messages for
2625 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
2626 call to handle_omp_array_sections.
2627
a04e69c0
TS
26282016-05-24 Thomas Schwinge <thomas@codesourcery.com>
2629
2630 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
2631
f17a223d
RB
26322016-05-24 Richard Biener <rguenther@suse.de>
2633
2634 PR middle-end/70434
2635 PR c/69504
2636 * c-typeck.c (build_array_ref): Do not complain about indexing
2637 non-lvalue vectors. Adjust for function name change.
2638
79063edd
MS
26392016-05-20 Martin Sebor <msebor@redhat.com>
2640
2641 PR c/71115
2642 * c-typeck.c (error_init): Use
2643 expansion_point_location_if_in_system_header.
2644 (warning_init): Same.
2645
8a40fef3
DM
26462016-05-19 David Malcolm <dmalcolm@redhat.com>
2647
2648 PR c/71171
2649 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
2650 in error-handling.
2651 (c_parser_postfix_expression): Likewise.
2652 * c-tree.h (c_expr::set_error): New method.
2653 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
2654 that result's range is initialized.
2655
e9892350
JG
26562016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
2657
2658 * c-typeck.c (parser_build_unary_op): Fix formatting.
2659
8fad45f5
MW
26602016-05-16 Matthew Wahab <matthew.wahab@arm.com>
2661
2662 * c-decl.c (grokdeclarator): Remove errmsg and use of
2663 targetm.invalid_return_type.
2664 (grokparms): Remove errmsg and use of
2665 targetm.invalid_parameter_type.
2666
aa4b467b
JM
26672016-05-13 Joseph Myers <joseph@codesourcery.com>
2668
2669 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2670 function return type.
2671
4f2e1536
MP
26722016-05-12 Marek Polacek <polacek@redhat.com>
2673
2674 PR c/70756
2675 * c-decl.c (build_compound_literal): Pass LOC down to
2676 c_incomplete_type_error.
2677 * c-tree.h (require_complete_type): Adjust declaration.
2678 (c_incomplete_type_error): Likewise.
2679 * c-typeck.c (require_complete_type): Add location parameter, pass it
2680 down to c_incomplete_type_error.
2681 (c_incomplete_type_error): Add location parameter, pass it down to
2682 error_at.
2683 (build_component_ref): Pass location down to c_incomplete_type_error.
2684 (default_conversion): Pass location down to require_complete_type.
2685 (build_array_ref): Likewise.
2686 (build_function_call_vec): Likewise.
2687 (convert_arguments): Likewise.
2688 (build_unary_op): Likewise.
2689 (build_c_cast): Likewise.
2690 (build_modify_expr): Likewise.
2691 (convert_for_assignment): Likewise.
2692 (c_finish_omp_clauses): Likewise.
2693
d6e83a8d
MM
26942016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2695
2696 PR c/43651
2697 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
2698 is enabled.
2699 * c-errors.c (pedwarn_c90): Return true if warned.
2700 * c-tree.h (pedwarn_c90): Change return type to bool.
2701 (enum c_declspec_word): Add new enumerator cdw_atomic.
2702
5c3a10fb
MP
27032016-05-11 Marek Polacek <polacek@redhat.com>
2704
2705 PR c++/71024
2706 * c-decl.c (diagnose_mismatched_decls): Factor out code to
2707 diagnose_mismatched_attributes and call it.
2708
cf68d92c
MP
27092016-05-10 Marek Polacek <polacek@redhat.com>
2710
2711 PR c/70255
2712 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2713 on a declaration following the definition.
2714
351f85c5
JJ
27152016-05-05 Jakub Jelinek <jakub@redhat.com>
2716
2717 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2718 parse it through to c_parser_c99_block_statement.
2719 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2720 caller.
2721
deef7113
MP
27222016-05-04 Marek Polacek <polacek@redhat.com>
2723
2724 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2725 OPT_Wdangling_else.
2726
de55efd5
MP
27272016-05-04 Marek Polacek <polacek@redhat.com>
2728
2729 PR c/48778
2730 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2731 for macro expansions.
2732
79ce98bc
MP
27332016-05-03 Marek Polacek <polacek@redhat.com>
2734
2735 PR c/70859
2736 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
2737 check_builtin_function_arguments.
2738
fb2647aa
RB
27392016-05-03 Richard Biener <rguenther@suse.de>
2740
2741 * Make-lang.in (cc1-checksum.c): For stage-final re-use
2742 the checksum from the previous stage.
2743
77886428
CP
27442016-05-02 Cesar Philippidis <cesar@codesourcery.com>
2745
2746 * c-parser.c (c_parser_oacc_all_clauses): Update call to
2747 c_finish_omp_clauses.
2748 (c_parser_omp_all_clauses): Likewise.
2749 (c_parser_oacc_cache): Likewise.
2750 (c_parser_oacc_loop): Likewise.
2751 (omp_split_clauses): Likewise.
2752 (c_parser_omp_declare_target): Likewise.
2753 (c_parser_cilk_all_clauses): Likewise.
2754 (c_parser_cilk_for): Likewise.
2755 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
2756 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2757
7176a4a0
MP
27582016-05-02 Marek Polacek <polacek@redhat.com>
2759
2760 PR c/70851
2761 * c-decl.c (grokdeclarator): Diagnose when array's size has an
2762 incomplete type.
2763
e7ff0319
CP
27642016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2765
2766 PR middle-end/70626
2767 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
2768 OACC_LOOP_CLAUSE_MASK.
2769 (c_parser_oacc_kernels_parallel): Update call to
2770 c_oacc_split_loop_clauses.
2771
9f405ce1
AM
27722016-04-28 Andrew MacLeod <amacleod@redhat.com>
2773
2774 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
2775 argument to build_modify_expr in two cases.
2776
c1e1f433
BS
27772016-04-27 Bernd Schmidt <bschmidt@redhat.com>
2778
2779 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2780 warn_for_memset instead of warning directly here.
2781
2448a956
MP
27822016-04-26 Marek Polacek <polacek@redhat.com>
2783
2784 PR c/67784
2785 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2786 out of ...
2787 (c_parser_for_statement): ... here.
2788 (c_parser_if_statement): Use it.
2789 (c_parser_switch_statement): Use it.
2790 (c_parser_while_statement): Use it.
2791
b02a5e26
MP
2792 PR c/70791
2793 * c-decl.c (pushdecl): Pass LOCUS down to warning.
2794
477d4906
IV
27952016-04-20 Ilya Verbin <ilya.verbin@intel.com>
2796
2797 PR c++/69363
2798 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2799 instead of c_finish_cilk_clauses.
2800 * c-tree.h (c_finish_omp_clauses): Add new default argument.
2801 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
2802 floating-point variables in the linear clause for Cilk Plus.
2803
fe37c7af
MM
28042016-04-18 Michael Matz <matz@suse.de>
2805
2806 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2807 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2808
949505a9
MP
28092016-04-15 Marek Polacek <polacek@redhat.com>
2810
2811 PR c/70671
2812 * c-typeck.c (build_unary_op): Pass location down to error and
2813 warning call.
2814
dda1bf61
JJ
28152016-04-15 Jakub Jelinek <jakub@redhat.com>
2816
2817 PR c/70436
2818 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2819 where needed.
2820 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2821 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2822 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2823 Adjust c_parser_pragma callers.
2824 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
2825 caller.
2826 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2827 c_parser_statement.
2828 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2829 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2830 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2831 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2832 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2833 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2834 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2835 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2836 down where needed.
2837 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
2838 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2839 calls.
2840
99cd9857
MP
28412016-04-13 Marek Polacek <polacek@redhat.com>
2842
2843 PR c/70436
2844 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2845 adjust callers.
2846 (c_parser_statement): Likewise.
2847 (c_parser_c99_block_statement): Likewise.
2848 (c_parser_while_statement): Likewise.
2849 (c_parser_for_statement): Likewise.
2850 (c_parser_if_body): Don't set IF_P here.
2851 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
2852 about dangling else here.
2853 * c-tree.h (c_finish_if_stmt): Adjust declaration.
2854 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
2855 warn about dangling else here.
2856
f13355da
MP
28572016-04-04 Marek Polacek <polacek@redhat.com>
2858
2859 PR c/70307
2860 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2861
5fde6a45
MP
28622016-03-31 Marek Polacek <polacek@redhat.com>
2863
2864 PR c/70297
2865 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2866
4bbf545b
DM
28672016-03-18 David Malcolm <dmalcolm@redhat.com>
2868
2869 PR c/70281
2870 * c-parser.c (c_parser_postfix_expression): Set the source range
2871 for uses of "__builtin_types_compatible_p".
2872
fcc2b74f
JJ
28732016-03-17 Jakub Jelinek <jakub@redhat.com>
2874
2875 PR c/70280
2876 * c-typeck.c (composite_type): Don't count void_list_node
2877 into len, if the list is terminated by void_list_node, start
2878 with void_list_node instead of NULL for newargs. Stop
2879 at void_list_node.
2880
ab4c578f
MP
28812016-03-16 Marek Polacek <polacek@redhat.com>
2882
2883 PR c/70093
2884 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2885 nested functions returning VM types.
2886
96b3c82d
CP
28872016-03-09 Cesar Philippidis <cesar@codesourcery.com>
2888
2889 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2890 when calling c_finish_omp_clauses.
2891
29b9828f
BS
28922016-03-04 Bernd Schmidt <bschmidt@redhat.com>
2893
2894 PR c/69824
2895 * c-decl.c (get_parm_info): Don't queue implicit function declarations
2896 for later.
2897
7ff6ca38
MP
28982016-03-04 Marek Polacek <polacek@redhat.com>
2899
2900 PR c/69798
2901 * c-parser.c (c_parser_postfix_expression): Call
2902 c_parser_cast_expression rather than c_parser_postfix_expression.
2903
686e2237
JJ
29042016-03-01 Jakub Jelinek <jakub@redhat.com>
2905
2906 PR c/69796
2907 PR c/69974
2908 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2909 of incomplete decls to error_mark_node.
2910
0b05329b
MP
29112016-02-24 Marek Polacek <polacek@redhat.com>
2912
2913 PR c/69819
2914 * c-decl.c (finish_decl): Don't update the copy of the type of a
2915 different decl type.
2916
067fbd8b
JJ
29172016-02-23 Jakub Jelinek <jakub@redhat.com>
2918
2919 PR objc/69844
2920 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2921 in id_kind reclassification.
2922
bf14eba2
JJ
29232016-02-16 Jakub Jelinek <jakub@redhat.com>
2924
2925 PR c/69835
2926 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2927
ba539195
JN
29282016-02-16 James Norris <jnorris@codesourcery.com>
2929
2930 PR c/64748
2931 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2932
16595a1f
BS
29332016-02-12 Bernd Schmidt <bschmidt@redhat.com>
2934
f48dfe98
BS
2935 * c-decl.c (build_null_declspecs): Zero the entire struct.
2936
16595a1f
BS
2937 PR c/69522
2938 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
2939 callers changed. If nested_p is true, use it to call
2940 finish_implicit_inits.
2941 * c-tree.h (finish_implicit_inits): Declare.
2942 * c-typeck.c (finish_implicit_inits): New function. Move code
2943 from ...
2944 (push_init_level): ... here.
2945 (set_designator, process_init_element): Call finish_implicit_inits.
2946
66756373
JJ
29472016-02-11 Jakub Jelinek <jakub@redhat.com>
2948
2949 PR c/69768
2950 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
2951 arguments for -Waddress warning.
2952
1066e9b5
JJ
29532016-02-04 Jakub Jelinek <jakub@redhat.com>
2954
2955 PR c/69669
2956 * c-decl.c (finish_enum): When honoring mode attribute,
2957 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2958
3a5d2ba4
JJ
29592016-01-29 Jakub Jelinek <jakub@redhat.com>
2960
2961 PR debug/69518
2962 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2963 all type variants, not just TYPE_MAIN_VARIANT.
2964
cbdd8ae0
JJ
29652016-01-27 Jakub Jelinek <jakub@redhat.com>
2966
2967 PR debug/66869
2968 * c-decl.c (c_write_global_declarations_1): Warn with
2969 warn_unused_function if static prototype without definition
2970 is not C_DECL_USED.
2971
fa74a4bc
MP
29722016-01-27 Marek Polacek <polacek@redhat.com>
2973
2974 PR c/68062
2975 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2976 to unsigned, if needed. Add -Wsign-compare warning.
2977
13f92e8d
JJ
29782016-01-26 Jakub Jelinek <jakub@redhat.com>
2979
2980 PR tree-optimization/69483
2981 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2982
cd8e73dc 29832016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
2984
2985 PR c/24293
2986 * c-tree.h (incomplete_record_decls): Declare.
2987 * c-parser.c (incomplete_record_decls): Define.
2988 (c_parser_translation_unit): Iterate through incomplete_record_decls and
2989 report error if any decl has zero size.
2990 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
2991 or enum type to incomplete_record_decls.
2992
e6d6ec9e
TV
29932016-01-14 Tom de Vries <tom@codesourcery.com>
2994
2995 PR tree-optimization/68773
2996 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
2997 set force_output.
2998
00083992
MP
29992016-01-14 Marek Polacek <polacek@redhat.com>
3000
3001 PR c/69262
3002 * c-decl.c (grokdeclarator): Provide more information for invalid
3003 array declarations.
3004
7443cf13
DM
30052016-01-06 David Malcolm <dmalcolm@redhat.com>
3006
3007 * c-parser.c (c_parser_unary_expression): For dereferences, build
3008 a combined location before calling build_indirect_ref, so that
3009 error reports cover the full range, manually updating the c_expr
3010 src_range.
3011
6b131d5b
MP
30122016-01-06 Marek Polacek <polacek@redhat.com>
3013
3014 PR sanitizer/69099
3015 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
3016 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
3017 NULL.
3018
818ab71a
JJ
30192016-01-04 Jakub Jelinek <jakub@redhat.com>
3020
3021 Update copyright years.
3022
2fe0a208
MP
30232016-01-04 Marek Polacek <polacek@redhat.com>
3024
3025 PR c/68908
3026 * c-typeck.c (build_atomic_assign): Improve commentary. Add
3027 optimization to use __atomic_fetch_* built-in if possible.
3028
c7b48c8a
TS
30292015-12-23 Thomas Schwinge <thomas@codesourcery.com>
3030
3031 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
3032 into...
3033 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
3034 all users.
3035
fda5652f
MP
30362015-12-22 Marek Polacek <polacek@redhat.com>
3037
3038 PR c/69002
3039 * c-typeck.c (build_component_ref): Warn when acessing elements of
3040 atomic structures or unions.
3041
745e411d
DM
30422015-12-21 David Malcolm <dmalcolm@redhat.com>
3043
3044 * c-typeck.c: Include "gcc-rich-location.h".
3045 (build_binary_op): In the two places that call binary_op_error,
3046 create a gcc_rich_location and populate it with the location of
3047 the binary op and its two operands.
3048
94c40e19
DM
30492015-12-16 David Malcolm <dmalcolm@redhat.com>
3050
3051 * c-parser.c (c_parser_statement_after_labels): When calling
3052 c_finish_return, Use the return expression's location if it has
3053 one, falling back to the location of the first token within it.
3054 * c-typeck.c (c_finish_return): When issuing warnings about
3055 the incorrect presence/absence of a return value, issue a note
3056 showing the declaration of the function.
3057
de67c4c3
DM
30582015-12-16 David Malcolm <dmalcolm@redhat.com>
3059
3060 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
3061 to 4.
3062 (c_parser_peek_nth_token): New function.
3063 (c_parser_peek_conflict_marker): New function.
3064 (c_parser_error): Detect conflict markers and report them as such.
3065
a10704e1
DM
30662015-12-16 David Malcolm <dmalcolm@redhat.com>
3067
3068 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
3069 to preserve range information for the primary expression
3070 in the call to c_parser_postfix_expression_after_primary.
3071
8062bca6
DM
30722015-12-16 David Malcolm <dmalcolm@redhat.com>
3073
3074 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
3075 expression location, falling back on the first token location,
3076 rather than always using the latter.
3077
d06f8b75
MP
30782015-12-16 Marek Polacek <polacek@redhat.com>
3079
3080 PR c/64637
3081 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
3082 available.
3083
2994fb91
MP
30842015-12-15 Marek Polacek <polacek@redhat.com>
3085
3086 PR c/68907
3087 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
3088 artificial decl.
3089
a1b93f8d
DM
30902015-12-08 David Malcolm <dmalcolm@redhat.com>
3091
3092 * c-parser.c (c_parser_alignof_expression): Capture location of
3093 closing parenthesis (if any), or of end of unary expression, and
3094 use it to build a src_range for the expression.
3095
46c6e1e2
DM
30962015-12-08 David Malcolm <dmalcolm@redhat.com>
3097
3098 PR c/68757
3099 * c-parser.c (c_parser_get_builtin_args): Add
3100 "out_close_paren_loc" param, and write back to it.
3101 (c_parser_postfix_expression): Capture the closing
3102 parenthesis location for RID_CHOOSE_EXPR,
3103 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
3104 RID_BUILTIN_SHUFFLE and use it to set the source range
3105 for such expressions; within RID_BUILTIN_COMPLEX set
3106 the underlying location.
3107
66189108
MP
31082015-12-07 Marek Polacek <polacek@redhat.com>
3109
3110 PR c/68668
3111 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
3112 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
3113
f187980b
EB
31142015-12-04 Eric Botcazou <ebotcazou@adacore.com>
3115
3116 * c-tree.h (c_build_va_arg): Adjust prototype.
3117 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
3118 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
3119 parameter, adjust throughout and issue an error if EXPR is a component
3120 with reverse storage order.
3121
4250754e
JM
31222015-12-02 Jason Merrill <jason@redhat.com>
3123
3124 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
3125 (c_fully_fold_internal, decl_constant_value_for_optimization):
3126 Move from c-common.c.
3127 * c-tree.h: Declare decl_constant_value_for_optimization.
3128 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
3129
e9e32ee6
JM
31302015-12-02 Joseph Myers <joseph@codesourcery.com>
3131
3132 PR c/68162
3133 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
3134 following link from declarator to next declarator. Track original
3135 qualified type and pass it to c_build_qualified_type.
3136 * c-typeck.c (c_build_qualified_type): Add arguments
3137 orig_qual_type and orig_qual_indirect.
3138
ff7a55bf
TS
31392015-12-02 Thomas Schwinge <thomas@codesourcery.com>
3140
3141 * c-parser.c (c_parser_omp_clause_name)
3142 (c_parser_oacc_all_clauses): Alphabetical sorting.
3143
657e4e47
JJ
31442015-12-02 Jakub Jelinek <jakub@redhat.com>
3145
3146 PR c/68533
3147 * c-decl.c (get_parm_info): Use b->locus instead of input_location
3148 for diagnostics.
3149
37d5ad46
JB
31502015-12-01 Julian Brown <julian@codesourcery.com>
3151 Cesar Philippidis <cesar@codesourcery.com>
3152 James Norris <James_Norris@mentor.com>
3153
3154 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
3155 (c_parser_oacc_clause_use_device): New function.
3156 (c_parser_oacc_all_clauses): Add use_device support.
3157 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
3158 (c_parser_oacc_host_data): New function.
3159 (c_parser_omp_construct): Add host_data support.
3160 * c-tree.h (c_finish_oacc_host_data): Add prototype.
3161 * c-typeck.c (c_finish_oacc_host_data): New function.
3162 (c_finish_omp_clauses): Add use_device support.
3163
a4850ce9
JH
31642015-11-29 Jan Hubicka <hubicka@ucw.cz>
3165
3166 PR c/67106
3167 * c-decl.c: Set TYPE_PACKED in variants.
3168
b58d3df2
ML
31692015-11-27 Martin Liska <mliska@suse.cz>
3170
3171 PR c++/68312
3172 * c-array-notation.c (fix_builtin_array_notation_fn):
3173 Use release_vec_vec instead of vec::release.
3174 (build_array_notation_expr): Likewise.
3175 (fix_conditional_array_notations_1): Likewise.
3176 (fix_array_notation_expr): Likewise.
3177 (fix_array_notation_call_expr): Likewise.
3178
aec17bfe
JJ
31792015-11-27 Jakub Jelinek <jakub@redhat.com>
3180
3181 PR c/63326
3182 * c-parser.c (c_parser_compound_statement_nostart): If
3183 last_label is true, use pragma_stmt instead of pragma_compound
3184 as second c_parser_pragma argument.
3185 (c_parser_omp_ordered, c_parser_omp_target_update,
3186 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
3187 false as second argument to c_parser_skip_to_pragma_eol after
3188 diagnosing standalone directives used in pragma_stmt context.
3189
688c4de0
IV
31902015-11-24 Ilya Verbin <ilya.verbin@intel.com>
3191
3192 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
3193 with "if (ENABLE_OFFLOADING)".
3194
cbd03aee
DM
31952015-11-23 David Malcolm <dmalcolm@redhat.com>
3196
3197 PR objc/68438
3198 * c-parser.c (c_parser_postfix_expression): Set up source ranges
3199 for various Objective-C constructs: Class.name syntax,
3200 @selector(), @protocol(), @encode(), and [] message syntax.
3201
a87a86e1
DM
32022015-11-20 David Malcolm <dmalcolm@redhat.com>
3203
3204 PR 62314
3205 * c-typeck.c (should_suggest_deref_p): New function.
3206 (build_component_ref): Special-case POINTER_TYPE when
3207 generating a "not a structure of union" error message, and
3208 suggest a "->" rather than a ".", providing a fix-it hint.
3209
8ece8dfb
DM
32102015-11-19 David Malcolm <dmalcolm@redhat.com>
3211
3212 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
3213 candidate into a new function, find_closest_identifier.
3214
433068cc
MP
32152015-11-19 Marek Polacek <polacek@redhat.com>
3216
3217 PR c/68412
3218 * c-typeck.c (parser_build_binary_op): Properly handle
3219 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
3220
bef08b71
DM
32212015-11-17 David Malcolm <dmalcolm@redhat.com>
3222
3223 * c-parser.c (set_c_expr_source_range): Bulletproof both
3224 overloaded implementations against NULL expr->value.
3225 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
3226 values.
3227 (c_parser_unary_expression): Likewise when handling addresses of
3228 labels.
3229 (c_parser_postfix_expression): Likewise for statement expressions,
3230 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
3231 __builtin_va_arg, and for __builtin_offset_of.
3232 (c_parser_postfix_expression_after_paren_type): Initialize expr's
3233 src_range using the range of the braced initializer.
3234 (c_parser_transaction_expression): Set src_range for "ret" to a
3235 sane pair of values.
3236
fff77217
KY
32372015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
3238
3239 * c-parser.c (c_finish_omp_declare_simd): Look for
3240 "simd" attribute as well. Update error message.
3241
1d899da2
TS
32422015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3243
3244 * c-parser.c (c_parser_omp_declare_target): Adjust.
3245
e4606348
JJ
32462015-11-14 Jakub Jelinek <jakub@redhat.com>
3247
3248 * c-typeck.c (c_finish_omp_clauses): Don't mark
3249 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
3250
3e636daf
MP
32512015-11-14 Marek Polacek <polacek@redhat.com>
3252
3253 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
3254 * c-typeck.c: Likewise.
3255
ebedc9a3
DM
32562015-11-13 David Malcolm <dmalcolm@redhat.com>
3257
3258 * c-decl.c (warn_defaults_to): Pass line_table to
3259 rich_location ctor.
3260 * c-errors.c (pedwarn_c99): Likewise.
3261 (pedwarn_c90): Likewise.
3262 * c-parser.c (set_c_expr_source_range): New functions.
3263 (c_token::get_range): New method.
3264 (c_token::get_finish): New method.
3265 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
3266 based on the range from the start of the LHS to the end of the
3267 RHS.
3268 (c_parser_conditional_expression): Likewise, based on the range
3269 from the start of the cond.value to the end of exp2.value.
3270 (c_parser_binary_expression): Call set_c_expr_source_range on
3271 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
3272 (c_parser_cast_expression): Call set_c_expr_source_range on ret
3273 based on the cast_loc through to the end of the expr.
3274 (c_parser_unary_expression): Likewise, based on the
3275 op_loc through to the end of op.
3276 (c_parser_sizeof_expression) Likewise, based on the start of the
3277 sizeof token through to either the closing paren or the end of
3278 expr.
3279 (c_parser_postfix_expression): Likewise, using the token range,
3280 or from the open paren through to the close paren for
3281 parenthesized expressions.
3282 (c_parser_postfix_expression_after_primary): Likewise, for
3283 various kinds of expression.
3284 * c-tree.h (struct c_expr): Add field "src_range".
3285 (c_expr::get_start): New method.
3286 (c_expr::get_finish): New method.
3287 (set_c_expr_source_range): New decls.
3288 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
3289 on ret for prefix unary ops.
3290 (parser_build_binary_op): Likewise, running from the start of
3291 arg1.value through to the end of arg2.value.
3292
ec8b536f
MP
32932015-11-13 Marek Polacek <polacek@redhat.com>
3294
3295 PR c/68320
3296 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
3297
277fe616
DM
32982015-11-13 David Malcolm <dmalcolm@redhat.com>
3299
3300 * c-typeck.c: Include spellcheck.h.
3301 (lookup_field_fuzzy_find_candidates): New function.
3302 (lookup_field_fuzzy): New function.
3303 (build_component_ref): If the field was not found, try using
3304 lookup_field_fuzzy and potentially offer a suggestion.
3305
6e232ba4
JN
33062015-11-12 James Norris <jnorris@codesourcery.com>
3307 Joseph Myers <joseph@codesourcery.com>
3308
3309 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
3310 (c_parser_omp_clause_name): Handle 'device_resident' clause.
3311 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3312 and PRAGMA_OMP_CLAUSE_LINK.
3313 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3314 and PRAGMA_OACC_CLAUSE_LINK.
3315 (OACC_DECLARE_CLAUSE_MASK): New definition.
3316 (c_parser_oacc_declare): New function.
3317
9be4f715
MP
33182015-11-12 Marek Polacek <polacek@redhat.com>
3319
3320 PR c/67784
3321 * c-parser.c (c_parser_for_statement): Reclassify the token in
3322 a correct scope.
3323
e78bede6
MP
33242015-11-11 Marek Polacek <polacek@redhat.com>
3325
3326 PR c/68107
3327 PR c++/68266
3328 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
3329 checking the size of an array.
3330
69f293c9
AM
33312015-11-11 Andrew MacLeod <amacleod@redhat.com>
3332
3333 * c-array-notation.c: Remove unused header files.
3334 * c-aux-info.c: Likewise.
3335 * c-convert.c: Likewise.
3336 * c-decl.c: Likewise.
3337 * c-errors.c: Likewise.
3338 * c-lang.c: Likewise.
3339 * c-objc-common.c: Likewise.
3340 * c-parser.c: Likewise.
3341 * c-typeck.c: Likewise.
3342 * gccspec.c: Likewise.
3343
3a40d81d
NS
33442015-11-09 Thomas Schwinge <thomas@codesourcery.com>
3345 Cesar Philippidis <cesar@codesourcery.com>
3346 James Norris <jnorris@codesourcery.com>
3347 Julian Brown <julian@codesourcery.com>
3348 Nathan Sidwell <nathan@codesourcery.com>
3349
3350 c/
3351 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
3352 routine arg.
3353 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
3354 (c_parser_pragma): Parse 'acc routine'.
3355 (OACC_ROUTINE_CLAUSE_MARK): Define.
3356 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
3357
fc402eec
AA
33582015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3359
3360 PR debug/67192
3361 * c-typeck.c (c_finish_loop): For unconditional loops, set the
3362 location of the backward-goto to the start of the loop body.
3363
f6b0b3db
AA
33642015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3365
3366 PR debug/67192
3367 * c-parser.c (c_parser_while_statement): Finish the loop before
3368 parsing ahead for misleading indentation.
3369 (c_parser_for_statement): Likewise.
3370
ee45a32d
EB
33712015-11-08 Eric Botcazou <ebotcazou@adacore.com>
3372
3373 * c-decl.c (finish_struct): If the structure has reverse storage
3374 order, rewrite the type of array fields with scalar component. Call
3375 maybe_apply_pragma_scalar_storage_order on entry.
3376 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
3377 errors on bit-fields and reverse SSO here and not...
3378 (c_mark_addressable): ...here.
3379 (output_init_element): Adjust call to initializer_constant_valid_p.
3380 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
3381
8a645150
DM
33822015-11-06 David Malcolm <dmalcolm@redhat.com>
3383
3384 * c-decl.c (warn_defaults_to): Update for change in signature
3385 of diagnostic_set_info.
3386 * c-errors.c (pedwarn_c99): Likewise.
3387 (pedwarn_c90): Likewise.
3388 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
3389 for textinfo::set_location.
3390
7a5e4956
CP
33912015-11-05 Cesar Philippidis <cesar@codesourcery.com>
3392 Thomas Schwinge <thomas@codesourcery.com>
3393 James Norris <jnorris@codesourcery.com>
3394
3395 * c-parser.c (c_parser_omp_clause_name): Add support for
3396 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
3397 (c_parser_omp_clause_default): Add is_oacc argument. Handle
3398 default(none) in OpenACC.
3399 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
3400 arguments.
3401 (c_parser_oacc_clause_tile): New function.
3402 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
3403 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
3404 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
3405 TILE}.
3406 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
3407 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
3408 FIRSTPRIVATE}.
3409 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
3410 (c_parser_oacc_update): Update the error message for missing clauses.
3411 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
3412 and OMP_CLAUSE_INDEPENDENT.
3413
bfcfbfa0
MP
34142015-11-05 Marek Polacek <polacek@redhat.com>
3415
3416 PR c/68090
3417 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
3418 deal with pre-evaluation on invalid types.
3419
e01d41e5
JJ
34202015-11-05 Jakub Jelinek <jakub@redhat.com>
3421 Ilya Verbin <ilya.verbin@intel.com>
3422
3423 * c-parser.c: Include context.h and gimple-expr.h.
3424 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
3425 monotonic together with nonmonotonic.
3426 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
3427 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
3428 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
3429 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
3430 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
3431 expressions on combined target teams before the target.
3432 (c_parser_omp_declare_target): If decl has "omp declare target" or
3433 "omp declare target link" attribute, and cgraph or varpool node already
3434 exists, then set corresponding flags. Call c_finish_omp_clauses
3435 in the parenthesized extended-list syntax case.
3436 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
3437 declare target.
3438 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
3439 on OMP_CLAUSE_REDUCTION array sections.
3440 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
3441 into the constant offset, or for variable low-bound using
3442 POINTER_PLUS_EXPR. For structure element based array sections use
3443 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
3444 (c_finish_omp_clauses): Drop generic_field_head, structure
3445 elements are now always mapped even as array section bases,
3446 diagnose same var in data sharing and mapping clauses. Diagnose if
3447 linear step on declare simd is neither a constant nor a uniform
3448 parameter. Look through POINTER_PLUS_EXPR for array section
3449 reductions. Diagnose the same var or function appearing multiple
3450 times on the same directive. Fix up wording for the to clause if t
3451 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
3452 modifier on kinds other than dynamic or guided or nonmonotonic
3453 modifier together with ordered clause.
3454
4bf9e5a8
TS
34552015-11-03 Thomas Schwinge <thomas@codesourcery.com>
3456 Chung-Lin Tang <cltang@codesourcery.com>
3457
3458 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
3459
2adfab87
AM
34602015-10-29 Andrew MacLeod <amacleod@redhat.com>
3461
3462 * c-array-notation.c: Reorder #include's and remove duplicates.
3463 * c-aux-info.c: Likewise.
3464 * c-convert.c: Likewise.
3465 * c-decl.c: Likewise.
3466 * c-errors.c: Likewise.
3467 * c-lang.c: Likewise.
3468 * c-objc-common.c: Likewise.
3469 * c-parser.c: Likewise.
3470 * c-typeck.c: Likewise.
3471
e922069e
JW
34722015-10-26 Jim Wilson <jim.wilson@linaro.org>
3473
3474 PR debug/66068
3475 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
3476 after calling build_qualified_type.
3477
765dd391
CP
34782015-10-27 Cesar Philippidis <cesar@codesourcery.com>
3479 Thomas Schwinge <thomas@codesourcery.com>
3480 James Norris <jnorris@codesourcery.com>
3481 Joseph Myers <joseph@codesourcery.com>
3482 Julian Brown <julian@codesourcery.com>
3483 Bernd Schmidt <bschmidt@redhat.com>
3484
3485 * c-parser.c (c_parser_oacc_shape_clause): New.
3486 (c_parser_oacc_simple_clause): New.
3487 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
3488 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
3489
88bae6f4
TS
34902015-10-27 Thomas Schwinge <thomas@codesourcery.com>
3491 James Norris <jnorris@codesourcery.com>
3492 Cesar Philippidis <cesar@codesourcery.com>
3493
3494 PR c/64765
3495 PR c/64880
3496 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
3497 parameters, and handle these. Adjust all users.
3498 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
3499 into...
3500 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
3501 all users.
3502 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
3503 declare functions.
3504 (c_finish_omp_construct): Declare function.
3505 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
3506 Merge functions into...
3507 (c_finish_omp_construct): ... this new function.
3508
a8fc2579
RB
35092015-10-22 Richard Biener <rguenther@suse.de>
3510
3511 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
3512 before folding a MINUS_EXPR.
3513
e9122ef6
MP
35142015-10-21 Marek Polacek <polacek@redhat.com>
3515
3516 PR c/68024
3517 * c-decl.c (start_function): Warn about vararg functions without
3518 a prototype.
3519
9f47c7e5
IE
35202015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
3521
3522 * c-typeck.c (build_conditional_expr): Use boolean vector
3523 type for vector comparison.
3524 (build_vec_cmp): New.
3525 (build_binary_op): Use build_vec_cmp for comparison.
3526
fa60eeb9
MP
35272015-10-20 Marek Polacek <polacek@redhat.com>
3528
3529 * c-parser.c (is_cilkplus_vector_p): Don't define here.
3530
2c7020eb
MP
35312015-10-20 Marek Polacek <polacek@redhat.com>
3532
3533 PR c/67964
3534 * c-parser.c (c_parser_attributes): Break out of the loop if the
3535 token after an attribute isn't a comma.
3536
d9a6bd32
JJ
35372015-10-13 Jakub Jelinek <jakub@redhat.com>
3538 Aldy Hernandez <aldyh@redhat.com>
3539
3540 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
3541 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
3542 (c_parser_omp_variable_list): Handle structure elements for
3543 map, to and from clauses. Handle array sections in reduction
3544 clause. Formatting fixes.
3545 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
3546 if clause modifiers.
3547 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3548 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3549 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
3550 c_parser_omp_clause_is_device_ptr): New functions.
3551 (c_parser_omp_clause_ordered): Parse optional parameter.
3552 (c_parser_omp_clause_reduction): Handle array reductions.
3553 (c_parser_omp_clause_schedule): Parse optional simd modifier.
3554 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
3555 functions.
3556 (c_parser_omp_clause_linear): Parse linear clause modifiers.
3557 (c_parser_omp_clause_depend_sink): New function.
3558 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
3559 (c_parser_omp_clause_map): Parse release/delete map kinds and
3560 optional always modifier.
3561 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
3562 and c_finish_omp_clauses callers.
3563 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
3564 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
3565 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
3566 (OMP_CRITICAL_CLAUSE_MASK): Define.
3567 (c_parser_omp_critical): Parse critical clauses.
3568 (c_parser_omp_for_loop): Handle doacross loops, adjust
3569 c_finish_omp_for and c_finish_omp_clauses callers.
3570 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
3571 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
3572 (OMP_FOR_CLAUSE_MASK): Add linear clause.
3573 (c_parser_omp_for): Disallow ordered clause when combined with
3574 distribute. Disallow linear clause when combined with distribute
3575 and not combined with simd.
3576 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
3577 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
3578 parse clauses and if depend clause is found, don't parse a body.
3579 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
3580 Allow target parallel without for after it.
3581 (OMP_TASK_CLAUSE_MASK): Add priority clause.
3582 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
3583 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
3584 invalid kinds.
3585 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
3586 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
3587 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
3588 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
3589 functions.
3590 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
3591 defaultmap and is_device_ptr clauses.
3592 (c_parser_omp_target): Parse target parallel and target simd. Set
3593 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
3594 and target exit data. Diagnose invalid map kinds.
3595 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
3596 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
3597 construct.
3598 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
3599 &omp_priv.
3600 (OMP_TASKLOOP_CLAUSE_MASK): Define.
3601 (c_parser_omp_taskloop): New function.
3602 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
3603 handle PRAGMA_OMP_TASKLOOP.
3604 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
3605 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
3606 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
3607 Add IS_OMP argument, handle structure element bases, diagnose
3608 bitfields, pass IS_OMP recursively, diagnose known zero length
3609 array sections in depend clauses, handle array sections in reduction
3610 clause, diagnose negative length even for pointers.
3611 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
3612 types, pass IS_OMP down to handle_omp_array_sections_1, handle
3613 array sections in reduction clause, set
3614 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
3615 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
3616 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
3617 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
3618
21ba0cea
MP
36192015-10-06 Marek Polacek <polacek@redhat.com>
3620
3621 * c-parser.c (c_parser_statement_after_labels): Use
3622 protected_set_expr_location.
3623 (c_parser_omp_clause_num_gangs): Likewise.
3624 (c_parser_omp_clause_num_threads): Likewise.
3625 (c_parser_omp_clause_num_workers): Likewise.
3626 (c_parser_omp_clause_vector_length): Likewise.
3627 (c_parser_omp_clause_num_teams): Likewise.
3628 (c_parser_omp_clause_thread_limit): Likewise.
3629 * c-typeck.c (build_c_cast): Likewise.
3630 (c_cast_expr): Likewise.
3631
624d31fe
RS
36322015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3633
3634 * c-typeck.c (c_tree_equal): Use real_equal instead of
3635 REAL_VALUES_EQUAL.
3636
b8fd7909
JM
36372015-10-04 Jason Merrill <jason@redhat.com>
3638
3639 * c-parser.c (c_lex_one_token): Handle @synchronized.
3640 * c-decl.c (match_builtin_function_types): A declaration of a built-in
3641 can change whether the function is transaction_safe.
3642
1c7485af
MP
36432015-10-02 Marek Polacek <polacek@redhat.com>
3644
3645 PR c/67730
3646 * c-typeck.c (convert_for_assignment): Use the expansion point
3647 location throughout.
3648
3e3b8d63
MP
36492015-10-02 Marek Polacek <polacek@redhat.com>
3650
3651 PR c/64249
3652 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
3653 and pass it down to c_parser_if_statement.
3654 (c_parser_else_body): Add CHAIN parameter and pass it down to
3655 c_parser_statement_after_labels.
3656 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
3657 duplicated if-else-if conditions.
3658
aabef2de
MP
36592015-10-01 Marek Polacek <polacek@redhat.com>
3660
3661 * c-typeck.c (convert_for_assignment): Improve commentary.
3662
de8ddd5f
MP
36632015-09-30 Marek Polacek <polacek@redhat.com>
3664
3665 PR c/67730
3666 * c-typeck.c (c_finish_return): Use the expansion point location for
3667 certain "return with value" warnings.
3668
c4914de6
MLI
36692015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3670
3671 * c-parser.c (pragma_lex): Add loc argument.
3672
0e36f5c7
MP
36732015-09-15 Marek Polacek <polacek@redhat.com>
3674
3675 PR c/67580
3676 * c-decl.c (tag_exists_p): New function.
3677 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3678 struct/union/enum keywords are missing.
3679 * c-tree.h (tag_exists_p): Declare.
3680
2f3bb934
MP
36812015-09-15 Marek Polacek <polacek@redhat.com>
3682
3683 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3684 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3685 Return NULL_TREE instead of 0.
3686 (lookup_name): Return NULL_TREE instead of 0.
3687 (lookup_name_in_scope): Likewise.
3688 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3689 (parser_xref_tag): Use false instead of 0.
3690 (start_struct): Use true instead of 1.
3691 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3692
aa256c4a
MP
36932015-09-14 Marek Polacek <polacek@redhat.com>
3694
3695 * c-typeck.c (set_nonincremental_init_from_string): Use
3696 HOST_WIDE_INT_M1U when shifting a negative value.
3697
dbb68221
MW
36982015-09-09 Mark Wielaard <mjw@redhat.com>
3699
3700 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
3701 parm against NULL.
3702
a8a098ac
JJ
37032015-09-10 Jakub Jelinek <jakub@redhat.com>
3704
3705 PR c/67502
3706 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
3707 into OMP_FOR_PRE_BODY rather than before the loop.
3708
f4b189d5
JJ
37092015-09-09 Jakub Jelinek <jakub@redhat.com>
3710
0bb99c11
JJ
3711 PR c/67501
3712 * c-parser.c (c_parser_oacc_all_clauses,
3713 c_parser_omp_all_clauses): Remove invalid clause from
3714 list of clauses even if parser->error is set.
3715
fce5e5e3
JJ
3716 PR c/67500
3717 * c-parser.c (c_parser_omp_clause_aligned,
3718 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3719 test for errors.
3720 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3721 error_mark_node.
3722
f4b189d5
JJ
3723 PR c/67495
3724 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3725 instead of c_parser_unary_expression. If the result is !lvalue_p,
3726 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3727
b2aaf235
MP
37282015-09-04 Marek Polacek <polacek@redhat.com>
3729
3730 PR sanitizer/67279
3731 * c-typeck.c (build_binary_op): Don't instrument static initializers.
3732
1807ffc1
MS
37332015-09-03 Martin Sebor <msebor@redhat.com>
3734
3735 PR c/66516
8b652e65
JJ
3736 * c-typeck.c (convert_arguments, parser_build_unary_op,
3737 build_conditional_expr, c_cast_expr, convert_for_assignment,
3738 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
3739 reject_gcc_builtin.
3740 (c_decl_implicit): Define.
3741
d04ff417
MP
37422015-09-02 Marek Polacek <polacek@redhat.com>
3743
3744 PR c/67432
3745 * c-parser.c (c_parser_enum_specifier): Give a better error for
3746 an empty enum.
3747
a79683d5
TS
37482015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3749
3750 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3751
191a6b94
MP
37522015-08-12 Marek Polacek <polacek@redhat.com>
3753
3754 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
3755 LOC to it.
3756
420a9d9b
MP
37572015-08-03 Marek Polacek <polacek@redhat.com>
3758
3759 PR c/67088
3760 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
3761 Use it.
3762 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
3763
992118a1
PP
37642015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3765
3766 * c-parser.c (c_parser_if_body): Take token_indent_info
3767 argument. Call warn_for_misleading_indentation even when the
3768 body is a semicolon. Extract token_indent_infos corresponding
3769 to the guard, body and next tokens. Adjust call to
3770 warn_for_misleading_indentation accordingly.
3771 (c_parser_else_body): Likewise.
3772 (c_parser_if_statement): Likewise.
3773 (c_parser_while_statement): Likewise.
3774 (c_parser_for_statement): Likewise.
3775
46308474
LFSM
37762015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
3777 Manuel López-Ibáñez <manu@gcc.gnu.org>
3778
3779 * c-decl.c (get_parm_info): Remove static var. Update warning
3780 message.
3781
05b28fd6
MP
37822015-07-27 Marek Polacek <polacek@redhat.com>
3783
3784 PR c++/66555
3785 PR c/54979
3786 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3787
451b5e48
MP
37882015-07-20 Marek Polacek <polacek@redhat.com>
3789
3790 PR c++/55095
3791 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3792 (build_binary_op): Warn about left shift overflows.
3793
1916bcb5
AM
37942015-07-09 Andrew MacLeod <amacleod@redhat.com>
3795
3796 * c-array-notation.c: Adjust includes for flags.h changes.
3797 * c-objc-common.c: Likewise.
3798
c7131fb2
AM
37992015-07-07 Andrew MacLeod <amacleod@redhat.com>
3800
3801 * c-array-notation.c: Adjust includes.
3802 * c-aux-info.c: Likewise.
3803 * c-convert.c: Likewise.
3804 * c-decl.c: Likewise.
3805 * c-errors.c: Likewise.
3806 * c-lang.c: Likewise.
3807 * c-objc-common.c: Likewise.
3808 * c-parser.c: Likewise.
3809 * c-typeck.c: Likewise.
3810
da2e71c9
MLI
38112015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3812
3813 PR fortran/66605
3814 * c-decl.c (finish_function): Call do_warn_unused_parameter.
3815
b155cfd9
MP
38162015-06-29 Marek Polacek <polacek@redhat.com>
3817
3818 PR c/66322
3819 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3820 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
3821 about -Wswitch-bool here.
3822 (do_case): Update c_add_case_label call.
3823 (c_finish_case): Update c_do_switch_warnings call.
3824
31521951
MP
38252015-06-27 Marek Polacek <polacek@redhat.com>
3826
3827 * c-typeck.c: Use VECTOR_TYPE_P throughout.
3828
22d03525
MP
38292015-06-26 Marek Polacek <polacek@redhat.com>
3830
3831 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3832 INDIRECT_REF_P.
3833 * c-typeck.c (array_to_pointer_conversion): Likewise.
3834 (build_unary_op): Likewise.
3835 (c_finish_return): Likewise.
3836
f0889939
AM
38372015-06-25 Andrew MacLeod <amacleod@redhat.com>
3838
3839 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3840 * c-parser.c: Likewise.
3841
8d67ee55
RS
38422015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3843
3844 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3845 instead of pointer_hash.
3846 (detect_field_duplicates): Likewise.
3847
0ae9bd27
MP
38482015-06-25 Marek Polacek <polacek@redhat.com>
3849
3850 * c-array-notation.c: Use VAR_P throughout.
3851 * c-decl.c: Likewise.
3852 * c-objc-common.c: Likewise.
3853 * c-parser.c: Likewise.
3854 * c-typeck.c: Likewise.
3855
62f9079a
MP
38562015-06-25 Marek Polacek <polacek@redhat.com>
3857
3858 * c-decl.c: Use is_global_var throughout.
3859 * c-parser.c: Likewise.
3860 * c-typeck.c: Likewise.
3861
abb226c9
AM
38622015-06-17 Andrew MacLeod <amacleod@redhat.com>
3863
3864 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3865 * c-aux-info.c: Likewise.
3866 * c-convert.c: Likewise.
3867 * c-decl.c: Likewise.
3868 * c-errors.c: Likewise.
3869 * c-lang.c: Likewise.
3870 * c-objc-common.c: Likewise.
3871 * c-parser.c: Likewise.
3872 * c-typeck.c: Likewise.
3873
8cbababc
JH
38742015-06-11 Jan Hubicka <hubicka@ucw.cz>
3875
3876 PR middle-end/66325
3877 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3878 variants.
3879
a0349665
PMR
38802015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
3881
3882 * c-decl.c (pop_scope): Register the main translation unit
3883 through the new debug hook.
3884
13fdf2e2
AM
38852015-06-08 Andrew MacLeod <amacleod@redhat.com>
3886
3887 * c-array-notation.c : Adjust include files.
3888 * c-aux-info.c : Likewise.
3889 * c-convert.c : Likewise.
3890 * c-decl.c : Likewise.
3891 * c-errors.c : Likewise.
3892 * c-lang.c : Likewise.
3893 * c-lang.h : Likewise.
3894 * c-objc-common.c : Likewise.
3895 * c-parser.c : Likewise.
3896 * c-typeck.c : Likewise.
3897
d7438551
AH
38982015-06-05 Aldy Hernandez <aldyh@redhat.com>
3899
3900 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3901 immediately clobber it.
3902 (c_write_global_declarations_1): Remove call to
3903 check_global_declaration_1.
3904 (c_write_global_declarations_2): Remove.
3905 (c_write_final_cleanups): Rename from c_write_global_declarations.
3906 Remove call to finalize_compilation_unit.
3907 Remove calls to debugging hooks.
3908 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3909 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3910 * c-tree.h: Remove c_write_global_declarations.
3911
ecb9f223
AM
39122015-06-04 Andrew MacLeod <amacleod@redhat.com>
3913
3914 * c-array-notation.c: Adjust includes for restructured coretypes.h.
3915 * c-aux-info.c: Likewise.
3916 * c-convert.c: Likewise.
3917 * c-decl.c: Likewise.
3918 * c-errors.c: Likewise.
3919 * c-lang.c: Likewise.
3920 * c-objc-common.c: Likewise.
3921 * c-parser.c: Likewise.
3922 * c-typeck.c: Likewise.
3923
9482b620
MP
39242015-06-04 Marek Polacek <polacek@redhat.com>
3925
3926 PR c/66341
3927 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3928 it is a lvalue.
3929
bc51ace3
PK
39302015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3931
3932 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3933 Warn for empty struct.
3934 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3935
ea5b45b6
AT
39362015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
3937
3938 * c-decl.c (start_function): Call plugin before parsing.
3939 (finish_function): Call plugin after parsing.
3940
c2d47482
PK
39412015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3942
3943 PR c/49551
3944 * c-decl.c (merge_decls): Merge DECL_COMMON.
3945
a95492ab
JW
39462015-05-22 Jim Wilson <jim.wilson@linaro.org>
3947
3948 * Make-lang.in (check_gcc_pallelize): Define.
3949
fd5c817a
MP
39502015-05-22 Marek Polacek <polacek@redhat.com>
3951
3952 PR c/47043
3953 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
3954 attributes.
3955
c7b70a3c
MP
39562015-05-21 Marek Polacek <polacek@redhat.com>
3957
3958 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3959 DECL_BUILT_IN.
3960
21b634ae
MP
39612015-05-20 Marek Polacek <polacek@redhat.com>
3962
3963 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3964 * c-typeck.c: Likewise.
3965
296a8c2f
MP
39662015-05-19 Marek Polacek <polacek@redhat.com>
3967
3968 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3969
41b37d5e
JJ
39702015-05-19 Jakub Jelinek <jakub@redhat.com>
3971
3972 PR middle-end/66199
3973 * c-parser.c (c_parser_omp_for_loop): Don't add
3974 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3975 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3976 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3977 constructs.
3978
fab27f52
MM
39792015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
3980
3981 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 3982 swaps.
fab27f52 3983
40de31cf
MLI
39842015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3985
3986 PR fortran/44054
3987 * c-objc-common.c (c_tree_printer): Replace locus pointer with
3988 accessor function.
3989
3aa3c9fc
MP
39902015-05-14 Marek Polacek <polacek@redhat.com>
3991
3992 PR c/66066
3993 PR c/66127
3994 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
3995 rather than with 0.
3996
c3388e62
DM
39972015-05-12 David Malcolm <dmalcolm@redhat.com>
3998
3999 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
4000 to add a call to warn_for_misleading_indentation.
4001 (c_parser_else_body): Likewise, adding param "else_loc".
4002 (c_parser_if_statement): Check for misleading indentation.
4003 (c_parser_while_statement): Likewise.
4004 (c_parser_for_statement): Likewise.
4005
755e528f
MP
40062015-05-08 Marek Polacek <polacek@redhat.com>
4007
4008 PR c/64918
4009 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
4010 (output_init_element): Likewise.
4011
0173bd2a
MP
40122015-05-07 Marek Polacek <polacek@redhat.com>
4013
4014 PR c/65179
4015 * c-typeck.c (build_binary_op): Warn when left shifting a negative
4016 value.
4017
9babc352
MP
40182015-04-30 Marek Polacek <polacek@redhat.com>
4019
4020 * c-typeck.c (set_init_label): Call error_at instead of error and
4021 pass LOC to it.
4022
ac9f18db
MP
4023 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
4024 the type of a decl.
4025
ec3fba51
MP
4026 * c-typeck.c (c_build_va_arg): Clarify the error message.
4027
b811915d
TS
40282015-04-29 Thomas Schwinge <thomas@codesourcery.com>
4029
4030 * c-parser.c (c_parser_oacc_enter_exit_data): Use
4031 OMP_STANDALONE_CLAUSES.
4032
f3075008
MP
40332015-04-28 Marek Polacek <polacek@redhat.com>
4034
4035 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
4036
4e81b788
MP
40372015-04-28 Marek Polacek <polacek@redhat.com>
4038
4039 PR c/65901
4040 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
4041
6c1db78e
MP
40422015-04-25 Marek Polacek <polacek@redhat.com>
4043
4044 PR c/52085
4045 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
4046 attribute.
4047
5c4abbb8
MP
40482015-04-23 Marek Polacek <polacek@redhat.com>
4049
4050 PR c/65345
4051 * c-decl.c (set_labels_context_r): New function.
4052 (store_parm_decls): Call it via walk_tree_without_duplicates.
4053 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
4054 instead of create_tmp_var. Build TARGET_EXPR instead of
4055 COMPOUND_EXPR.
4056 (build_atomic_assign): Use create_tmp_var_raw instead of
4057 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
4058
06aca1d5
IV
40592015-04-20 Ilya Verbin <ilya.verbin@intel.com>
4060
4061 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
4062 (c_parser_omp_target_update): Add missed %> to error_at ().
4063
8fba1830
BRF
40642015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
4065
4066 PR target/55143
4067 * c-decl.c (c_default_pointer_mode): Remove definition.
4068 * c-tree.h (c_default_pointer_mode): Remove declaration.
4069
62021f64
TB
40702015-03-27 Tobias Burnus <burnus@net-b.de>
4071
4072 PR c/65586
4073 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
4074 error out.
4075 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
4076 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
4077 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
4078
9b65e171
JJ
40792015-03-19 Jakub Jelinek <jakub@redhat.com>
4080
4081 * c-decl.c (c_decl_attributes): Also add "omp declare target"
4082 attribute for DECL_EXTERNAL VAR_DECLs.
4083
17958621
JJ
40842015-03-11 Jakub Jelinek <jakub@redhat.com>
4085
4086 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
4087 argument.
4088
7ccb1a11
JJ
40892015-03-10 Jakub Jelinek <jakub@redhat.com>
4090
4091 PR c/65120
4092 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
4093 before preparing arguments to warn_logical_not_parentheses.
4094
01177669
JJ
40952015-03-09 Jakub Jelinek <jakub@redhat.com>
4096
4097 PR c/65120
4098 * c-typeck.c (parser_build_binary_op): Don't warn for
4099 !!x == y or !b == y where b is _Bool.
4100
802ac282
MP
41012015-03-09 Marek Polacek <polacek@redhat.com>
4102
4103 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
4104 * c-decl.c (grokdeclarator): Likewise.
4105 * c-typeck.c (build_binary_op): Likewise.
4106
e5165b60
MP
41072015-02-27 Marek Polacek <polacek@redhat.com>
4108
4109 PR c/65228
4110 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
4111
065d214c
MP
41122015-02-14 Marek Polacek <polacek@redhat.com>
4113
4114 PR c/64768
4115 * c-decl.c (grokdeclarator): Set the range of a flexible array member
4116 declared through a typedef name.
4117
e5d9235b
MP
41182015-02-13 Marek Polacek <polacek@redhat.com>
4119
4120 PR c/65050
4121 * c-decl.c (grokdeclarator): Print also the type when giving
4122 the error message about array's incomplete element type.
4123
fa01ffcc
JJ
41242015-02-11 Jakub Jelinek <jakub@redhat.com>
4125
4126 PR c/64824
4127 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
4128 check in the POP macro.
4129
c3e38a03
MP
41302015-02-09 Marek Polacek <polacek@redhat.com>
4131
4132 PR c/64856
4133 * c-typeck.c (process_init_element): Don't always wrap
4134 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
4135 initializing a range of elements.
4136
4886ec8e
JJ
41372015-02-04 Jakub Jelinek <jakub@redhat.com>
4138
4139 PR c/64824
4140 PR c/64868
4141 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
4142
c3e38a03 41432015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
4144
4145 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
4146 processing enum declaration.
4147
7b33f0c8
MP
41482015-01-29 Marek Polacek <polacek@redhat.com>
4149
4150 PR c/64709
4151 * c-typeck.c (pop_init_level): If constructor_elements has
4152 exactly one element with integer_zerop value, set constructor_zeroinit
4153 to 1. Remove braces around warning_init call.
4154
dea63e49
JJ
41552015-01-27 Jakub Jelinek <jakub@redhat.com>
4156
4157 PR c/64766
4158 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
4159 of FUNCTION_DECLs with error_mark_node.
4160
d38f7dce
JJ
41612015-01-26 Jakub Jelinek <jakub@redhat.com>
4162
4163 PR c/64778
4164 * c-typeck.c (convert_arguments): Return -1 if there are
4165 error_args, even if we've diagnosed too many arguments.
4166
cbf5d0e7
RB
41672015-01-21 Richard Biener <rguenther@suse.de>
4168
4169 PR middle-end/64313
4170 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
4171 for builtins the user declared correctly.
4172
41dbbb37
TS
41732015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4174 Bernd Schmidt <bernds@codesourcery.com>
4175 Cesar Philippidis <cesar@codesourcery.com>
4176 James Norris <jnorris@codesourcery.com>
4177 Jakub Jelinek <jakub@redhat.com>
4178 Ilmir Usmanov <i.usmanov@samsung.com>
4179
4180 * c-parser.c: Include "gomp-constants.h".
4181 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
4182 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
4183 Use OMP_CLAUSE_SET_MAP_KIND.
4184 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
4185 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
4186 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
4187 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
4188 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
4189 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
4190 "copyout", "create", "delete", "deviceptr", "gang", "host",
4191 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
4192 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
4193 "present_or_create", "pcreate", "seq", "self", "vector",
4194 "vector_length", "wait", "worker".
4195 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
4196 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
4197 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
4198 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
4199 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
4200 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
4201 (c_parser_oacc_data_clause_deviceptr)
4202 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
4203 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
4204 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
4205 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
4206 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
4207 (c_parser_oacc_parallel, c_parser_oacc_update)
4208 (c_parser_oacc_wait): New functions.
4209 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
4210 (c_finish_oacc_data): New prototypes.
4211 * c-typeck.c: Include "gomp-constants.h".
4212 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
4213 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
4214 OMP_CLAUSE_SET_MAP_KIND.
4215 (c_finish_oacc_parallel, c_finish_oacc_kernels)
4216 (c_finish_oacc_data): New functions.
4217 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
4218 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
4219 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
4220 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
4221 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
4222 GOMP_MAP_FORCE_DEVICEPTR.
4223
adfac8df
JJ
42242015-01-09 Michael Collison <michael.collison@linaro.org>
4225
4226 * c-array-notation.c: Include hash-set.h, machmode.h,
4227 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4228 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
4229 * c-aux-info.c: Ditto.
4230 * c-convert.c: Ditto.
4231 * c-decl.c: Ditto.
4232 * c-errors.c: Ditto.
4233 * c-lang.c: Dittoxs.
4234 * c-objc-common.c: Ditto.
4235 * c-parser.c: Ditto.
4236 * c-typeck.c: Include hash-set.h, machmode.h,
4237 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4238 fold-const.h, wide-int.h, inchash.h, real.h and
4239 fixed-value.h due to flattening of tree.h.
4240
2cc901dc
MP
42412015-01-07 Marek Polacek <polacek@redhat.com>
4242
4243 PR c/64417
4244 * c-typeck.c (process_init_element): Disallow initialization of
4245 a flexible array member with a string constant if the structure
4246 is in an array.
4247
5624e564
JJ
42482015-01-05 Jakub Jelinek <jakub@redhat.com>
4249
e5341100
JJ
4250 PR sanitizer/64344
4251 * c-typeck.c (convert_for_assignment, c_finish_return): For
4252 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
4253 types also set in_late_binary_op around convert call.
4254 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
4255 to integral type casts, if not in_late_binary_op, pass c_fully_fold
4256 result on expr as last argument to ubsan_instrument_float_cast,
4257 if in_late_binary_op, don't use c_save_expr but save_expr.
4258
5624e564
JJ
4259 Update copyright years.
4260
5bd012f8
MP
42612015-01-05 Marek Polacek <polacek@redhat.com>
4262
4263 PR c/64423
4264 * c-typeck.c (build_array_ref): Pass loc down to
4265 warn_array_subscript_with_type_char.
4266
3f8257db 42672014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
4268
4269 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 4270 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 4271 element type.
8e745a17 4272 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 4273 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 4274 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 4275 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 4276 to PEDWARN_FOR_QUALIFIERS.
768952be 4277
8f94a8c4
JJ
42782014-12-17 Jakub Jelinek <jakub@redhat.com>
4279
4280 PR sanitizer/64289
4281 * c-convert.c: Include ubsan.h.
4282 (convert): For real -> integral casts and
4283 -fsanitize=float-cast-overflow don't call convert_to_integer, but
4284 instead instrument the float cast directly.
4285
b731b390
JJ
42862014-11-29 Jakub Jelinek <jakub@redhat.com>
4287
4288 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
4289 c_finish_stmt_expr): Remove NULL last argument from
4290 create_tmp_var_raw and create_tmp_var calls.
4291 * c-array-notation.c (fix_builtin_array_notation_fn,
4292 build_array_notation_expr, fix_conditional_array_notations_1,
4293 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
4294
541e35a6
MP
42952014-11-28 Marek Polacek <polacek@redhat.com>
4296
4297 PR c/63862
4298 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
4299 convert the right operand to integer type.
4300
b286be94
MP
43012014-11-25 Marek Polacek <polacek@redhat.com>
4302
4303 PR c/63877
4304 * c-decl.c (start_function): Disable -Wmissing-declarations warning
4305 for inline functions.
4306
aa7da51a
JJ
43072014-11-21 Jakub Jelinek <jakub@redhat.com>
4308
4309 PR target/63764
4310 * c-typeck.c (build_array_ref): Adjust
4311 convert_vector_to_pointer_for_subscript caller. If it returns true,
4312 call non_lvalue_loc on the result.
4313
d876207f
RB
43142014-11-11 Richard Biener <rguenther@suse.de>
4315
4316 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
4317 to true.
4318
e5e44252
AK
43192014-11-10 Andi Kleen <ak@linux.intel.com>
4320
4321 PR c/60804
4322 * c-parser.c (c_parser_statement_after_labels): Call
4323 check_no_cilk.
4324 (c_parser_if_statement): Dito.
4325 (c_parser_switch_statement): Dito.
4326 (c_parser_while_statement): Dito.
4327 (c_parser_do_statement): Dito.
4328 (c_parser_for_statement): Dito.
4329 * c-typeck.c (c_finish_loop): Dito.
4330
13c21655
PC
43312014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
4332
4333 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
4334 OPT_Wshift_count_overflow in the warnings.
4335
2d51fcef
MP
43362014-10-30 Marek Polacek <polacek@redhat.com>
4337
4338 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
4339 print the stripped version as well, if they're not the same.
4340
ef4bddc2
RS
43412014-10-29 Richard Sandiford <richard.sandiford@arm.com>
4342
4343 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
4344 machine_mode.
4345
c582198b
AM
43462014-10-28 Andrew MacLeod <amacleod@redhat.com>
4347
4348 * c-decl.c: Adjust include files.
4349 * c-parser.c: Ditto.
4350
ddc8de03
PM
43512014-10-27 Phil Muldoon <pmuldoon@redhat.com>
4352 Tom Tromey <tromey@redhat.com>
4353
4354 * c-tree.h (enum c_oracle_request): New.
4355 (c_binding_oracle_function): New typedef.
4356 (c_binding_oracle, c_pushtag, c_bind): Declare.
4357 * c-decl.c (c_binding_oracle): New global.
4358 (I_SYMBOL_CHECKED): New macro.
4359 (i_symbol_binding): New function.
4360 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
4361 (I_TAG_CHECKED): New macro.
4362 (i_tag_binding): New function.
4363 (I_TAG_BINDING, I_TAG_DECL): Redefine.
4364 (I_LABEL_CHECKED): New macro.
4365 (i_label_binding): New function.
4366 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
4367 (c_print_identifier): Save and restore c_binding_oracle.
4368 (c_pushtag, c_bind): New functions.
4369
60393bbc
AM
43702014-10-27 Andrew MacLeod <amacleod@redhat.com>
4371
4372 * c-typeck.c: Adjust include files.
4373
d723bb7c
MLI
43742014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
4375
4376 PR c++/53061
4377 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
4378 initialization here...
4379 (c_initialize_diagnostics): ... but here. Set defaults after
4380 building pretty-printer.
4381
1bc5a451
MP
43822014-10-23 Marek Polacek <polacek@redhat.com>
4383
4384 PR c/63626
4385 * c-decl.c (pop_scope): Don't print warning in external_scope.
4386
4435bb92
MP
43872014-10-19 Marek Polacek <polacek@redhat.com>
4388
4389 PR c/63567
4390 * c-typeck.c (output_init_element): Allow initializing objects with
4391 static storage duration with compound literals even in C99 and add
4392 pedwarn for it.
4393
7278465e
MP
43942014-10-17 Marek Polacek <polacek@redhat.com>
4395
4396 PR c/63567
4397 * c-typeck.c (digest_init): Allow initializing objects with static
4398 storage duration with compound literals even in C99 and add pedwarn
4399 for it.
4400
d9b7be2e
MP
44012014-10-17 Marek Polacek <polacek@redhat.com>
4402
4403 PR c/63543
4404 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
4405 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
4406 error multiple times. Print the type.
4407
f406ae1f
MP
44082014-10-17 Marek Polacek <polacek@redhat.com>
4409
4410 PR c/63549
4411 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
4412 type.
4413
92574c7c
MP
44142014-10-17 Marek Polacek <polacek@redhat.com>
4415
4416 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
4417 (start_function): Use OPT_Wimplicit_int instead of 0.
4418 (store_parm_decls_oldstyle): Likewise.
4419
1bc4a978
MT
44202014-10-17 Alan Modra <amodra@gmail.com>
4421
4422 PR middle-end/61848
4423 * c-decl.c (merge_decls): Don't merge section name or tls model
4424 to newdecl symtab node, instead merge to olddecl. Override
4425 existing olddecl section name. Set tls_model for all thread-local
4426 vars, not just OMP thread-private ones. Remove incorrect comment.
4427
83685514
AM
44282014-10-16 Andrew MacLeod <amacleod@redhat.com>
4429
4430 * c-decl.c: Adjust include files.
4431
78a7c317
DD
44322014-10-14 DJ Delorie <dj@redhat.com>
4433
4434 * c-parser.c (c_parse_init): Add RID entries for each __intN.
4435 (c_token_starts_typename): Check all __intN, not just __int128.
4436 (c_token_starts_declspecs): Likewise.
4437 (c_parser_declspecs): Likewise.
4438 (c_parser_attribute_any_word): Likewise.
4439 (c_parser_objc_selector): Likewise.
4440 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
4441 (struct c_declspecs): Add int_n_idx field to record *which* __intN
4442 is specified.
4443 * c-decl.c (declspecs_add_type): Check for all __intN, not just
4444 __int128.
4445 (finish_declspecs): Likewise.
4446
74d98c1e
AB
44472014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
4448
8e745a17 4449 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 4450 the duplicate code.
8e745a17 4451 (c_parser_statement): Call the new function.
74d98c1e 4452
84937de2
MP
44532014-10-09 Marek Polacek <polacek@redhat.com>
4454
4455 PR c/63480
4456 * c-typeck.c (pop_init_level): Don't warn about initializing
4457 with { }.
4458
0382aaa0
MP
44592014-10-07 Marek Polacek <polacek@redhat.com>
4460
4461 PR c/59717
4462 * c-decl.c (header_for_builtin_fn): New function.
4463 (implicitly_declare): Suggest which header to include.
4464
7a0ca710
MP
44652014-10-07 Marek Polacek <polacek@redhat.com>
4466
4467 * c-convert.c (convert): Use error_operand_p.
4468 * c-typeck.c (require_complete_type): Likewise.
4469 (really_atomic_lvalue): Likewise.
4470 (digest_init): Likewise.
4471 (handle_omp_array_sections_1): Likewise.
4472
6bc8a126
MP
44732014-10-03 Marek Polacek <polacek@redhat.com>
4474
4475 PR c/63453
4476 * c-decl.c (pop_scope): Don't warn about "inline function declared
4477 but never defined" for functions marked with gnu_inline attribute.
4478
d90c0a59
JJ
44792014-09-25 Jakub Jelinek <jakub@redhat.com>
4480
4481 PR c++/63249
4482 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
4483 on low_bound and length.
4484
083e891e
MP
44852014-09-24 Marek Polacek <polacek@redhat.com>
4486
4487 PR c/61405
4488 PR c/53874
4489 * c-parser.c: Don't define CPP_KEYWORD.
4490 (c_parser_switch_statement): Pass original type to c_finish_case.
4491 * c-tree.h (c_finish_case): Update declaration.
4492 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
4493 conditionally to c_do_switch_warnings.
4494
8d95fe25
MP
44952014-09-03 Marek Polacek <polacek@redhat.com>
4496
4497 PR c/62024
4498 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
4499 conversions.
4500
9a771876
JJ
45012014-09-02 Jakub Jelinek <jakub@redhat.com>
4502 Balaji V. Iyer <balaji.v.iyer@intel.com>
4503 Igor Zamyatin <igor.zamyatin@intel.com>
4504
4505 * c-parser.c (c_parser_cilk_for): New function.
4506 (c_parser_cilk_grainsize): Likewise.
4507 (c_get_temp_regvar): Likewise.
4508 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
4509 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
4510 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
4511 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
4512 case.
4513
b7679d96
CG
45142014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
4515
4516 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
4517 with using HOST_WIDE_INT without truncation to 'int'
4518
59ea0364
MP
45192014-08-22 Marek Polacek <polacek@redhat.com>
4520
4521 PR c++/62199
4522 * c-typeck.c (parser_build_binary_op): Adjust call to
4523 warn_logical_not_parentheses.
4524
671a475e
IZ
45252014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
4526
4527 PR other/62008
4528 * c-parser.c (c_parser_array_notation): Check for correct
4529 type of an array added.
4530
04159acf
MP
45312014-08-19 Marek Polacek <polacek@redhat.com>
4532
4533 PR c++/62153
4534 * c-typeck.c (build_binary_op): If either operand of a comparison
4535 is a boolean expression, call maybe_warn_bool_compare.
4536
c77935ee
PP
45372014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
4538
4539 PR c/45584
4540 * c-typeck.c (build_c_cast): Do a conversion even when the
4541 TYPE_MAIN_VARIANTs are the same.
4542
35aff4fb
MP
45432014-08-19 Marek Polacek <polacek@redhat.com>
4544
4545 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
4546 pedwarn_c99 instead of pedwarn.
4547 (grokfield): Likewise.
4548 (warn_defaults_to): New function.
4549 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
4550 Unconditionally call pedwarn_c99 instead of pedwarn.
4551 (start_function): Call warn_defaults_to instead of pedwarn_c99.
4552 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
4553 check flag_isoc11 before.
4554 * c-errors.c (pedwarn_c99): Change the return type to bool.
4555 Handle -Wc99-c11-compat.
4556 * c-parser.c (disable_extension_diagnostics): Handle
4557 warn_c99_c11_compat.
4558 (restore_extension_diagnostics): Likewise.
4559 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
4560 instead of pedwarn, don't check flag_isoc11 before.
4561 (c_parser_declspecs): Likewise.
4562 (c_parser_alignas_specifier): Likewise.
4563 (c_parser_alignof_expression): Likewise.
4564 (c_parser_generic_selection): Likewise.
4565 * c-tree.h (pedwarn_c99): Update declaration.
4566 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
4567 of pedwarn_c99.
4568
177cce46
MP
45692014-08-19 Marek Polacek <polacek@redhat.com>
4570
4571 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
4572 to pedwarn_c90.
4573 * c-errors.c: Include "opts.h".
4574 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
4575 * c-parser.c (disable_extension_diagnostics): Handle negative value
4576 of warn_c90_c99_compat, too.
4577 (restore_extension_diagnostics): Likewise.
4578 (c_parser_compound_statement_nostart): Pass
4579 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
4580
6dc99c33
MP
45812014-08-12 Marek Polacek <polacek@redhat.com>
4582
4583 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
4584 Add pedwarn.
4585 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
4586 Likewise.
4587 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
4588
3f8257db 45892014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
4590
4591 PR c/51849
4592 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
4593 Call pedwarn_c90 instead of pedwarn.
4594 (check_bitfield_type_and_width): Likewise.
4595 (declspecs_add_qual): Likewise.
4596 (declspecs_add_type): Likewise.
4597 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
4598 Adjust to only call pedwarn_c90.
4599 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
4600 pedwarn_c90 instead of pedwarn.
4601 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
4602 * c-parser.c (disable_extension_diagnostics): Handle
4603 warn_c90_c99_compat.
4604 (restore_extension_diagnostics): Likewise.
4605 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
4606 pedwarn_c90 instead of pedwarn.
4607 (c_parser_initelt): Likewise.
4608 (c_parser_postfix_expression): Likewise.
4609 (c_parser_postfix_expression_after_paren_type): Likewise.
4610 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
4611 * c-tree.h: Fix formatting.
4612 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
4613 pedwarn_c90 instead of pedwarn.
4614
9f25a338
TS
46152014-08-07 Trevor Saunders <tsaunders@mozilla.com>
4616
4617 * c-typeck.c: Remove include of pointer-set.h.
4618
044331a8
MP
46192014-08-07 Marek Polacek <polacek@redhat.com>
4620
4621 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
4622
b787e7a2
TS
46232014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4624
4625 * c-typeck.c: Use hash_map instead of pointer_map.
4626
6e2830c3
TS
46272014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4628
4629 * c-decl.c: Use hash_set instead of pointer_set.
4630
a7ee52fb
IZ
46312014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
4632
4633 PR middle-end/61455
4634 * c-array-notation.c (expand_array_notations): Handling
4635 of DECL_EXPR added.
4636
b4dfdc11
MG
46372014-07-31 Marc Glisse <marc.glisse@inria.fr>
4638
4639 PR c++/60517
4640 * c-typeck.c (c_finish_return): Return 0 instead of the address of
4641 a local variable.
4642
976d5a22
TT
46432014-07-30 Tom Tromey <tromey@redhat.com>
4644
4645 * c-typeck.c (struct constructor_stack) <designator_depth>: New
4646 field.
4647 (really_start_incremental_init, push_init_level): Initialize
4648 designator_depth.
4649 (pop_init_level): Set global designator_depth.
4650 (process_init_element): Check for designated_init attribute.
4651
30281de2
MP
46522014-07-20 Marek Polacek <polacek@redhat.com>
4653
4654 PR c/61852
4655 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
4656 (implicitly_declare): Pass location to implicit_decl_warning.
4657
b108f48f
JJ
46582014-07-14 Jakub Jelinek <jakub@redhat.com>
4659
4660 PR middle-end/61294
4661 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
4662 If non-NULL, call c_parser_check_literal_zero.
4663 (c_parser_check_literal_zero): New function.
4664 (c_parser_postfix_expression_after_primary): Adjust
4665 c_parser_expr_list caller, handle -Wmemset-transposed-args.
4666
773ec47f
MP
46672014-07-06 Marek Polacek <polacek@redhat.com>
4668
4669 PR c/6940
4670 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4671 * c-tree.h (C_ARRAY_PARAMETER): Define.
4672 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4673 function parameter.
4674
22e1cf1c 46752014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 4676 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
4677
4678 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4679 releasing symbol.
4680
52ec0ea3
MP
46812014-07-01 Marek Polacek <polacek@redhat.com>
4682
4683 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4684 instead of 0 to WARN_FOR_ASSIGNMENT.
4685
d5c3d343
MP
46862014-07-01 Marek Polacek <polacek@redhat.com>
4687
4688 PR c/58286
4689 * c-typeck.c (convert_for_assignment): Pass
4690 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4691
6a7253a4
MP
46922014-06-30 Marek Polacek <polacek@redhat.com>
4693
4694 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4695 has no_sanitize_undefined attribute.
4696
5e88a8f4
IZ
46972014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
4698
4699 PR middle-end/57541
4700 * c-array-notation.c (fix_builtin_array_notation_fn):
4701 Check for 0 arguments in builtin call. Check that bultin argument is
4702 correct.
4703 * c-parser.c (c_parser_array_notation): Check for incorrect initial
4704 index.
4705
9698b078
SH
47062014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
4707
4708 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
4709 qualifiers in __auto_type for atomic types.
4710 (c_parser_typeof_specifier): Discard all type qualifiers in
4711 __typeof__ for atomic types.
4712
6e07c515
MP
47132014-06-25 Marek Polacek <polacek@redhat.com>
4714
4715 PR c/61162
4716 * c-parser.c (c_parser_statement_after_labels): Pass the location of
4717 the return expression to c_finish_return.
4718
da6f124d
JJ
47192014-06-25 Jakub Jelinek <jakub@redhat.com>
4720
4721 * c-typeck.c (c_finish_omp_clauses): Make sure
4722 OMP_CLAUSE_LINEAR_STEP has correct type.
4723
c203e8a7
TS
47242014-06-24 Trevor Saunders <tsaunders@mozilla.com>
4725
4726 * c-decl.c: Adjust.
4727
56ad0e38
JJ
47282014-06-24 Jakub Jelinek <jakub@redhat.com>
4729
4730 * c-parser.c (c_parser_omp_for_loop): For
4731 #pragma omp parallel for simd move lastprivate clause from parallel
4732 to for rather than simd.
4733
47c2554f
MP
47342014-06-23 Marek Polacek <polacek@redhat.com>
4735
4736 * c-typeck.c (parser_build_binary_op): Don't call
4737 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
4738
56363ffd
JH
47392014-06-15 Jan Hubicka <hubicka@ucw.cz>
4740
4741 * c-parser.c (c_parser_omp_threadprivate): Likewise.
4742 * c-decl.c (merge_decls): Likewise.
4743
d7ff7ae5
MP
47442014-06-09 Marek Polacek <polacek@redhat.com>
4745
4746 PR c/36446
4747 * c-typeck.c (error_init): Call inform instead of error_at.
4748 (pedwarn_init): Call inform instead of pedwarn.
4749 (warning_init): Call inform instead of warning_at.
4750
24d047a3
JH
47512014-06-07 Jan Hubicka <hubicka@ucw.cz>
4752
4753 * c-decl.c (merge_decls): Use set_decl_section_name.
4754 (duplicate_decls): Remove node if it exists.
4755
9bac5cbb
G
47562014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
4757
4758 PR c/53119
4759 * c-typeck.c (push_init_level, process_init_element,
4760 pop_init_level): Correct check for zero initialization, move
4761 missing brace warning to respect zero initialization.
4762
8ffcdea8
MP
47632014-06-05 Marek Polacek <polacek@redhat.com>
4764
4765 PR c/56724
4766 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
4767
742938c9
MP
47682014-06-05 Marek Polacek <polacek@redhat.com>
4769
4770 PR c/49706
4771 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
4772 on the left hand side operand of a comparison.
4773
6447c55d
MP
47742014-06-05 Marek Polacek <polacek@redhat.com>
4775
4776 PR c/48062
4777 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
4778 Print note only if the warning was printed.
4779
9dc7743c
IZ
47802014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
4781
4782 PR c/58942
4783 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4784 with a pointer.
4785
fedfecef
MP
47862014-06-03 Marek Polacek <polacek@redhat.com>
4787
4788 PR c/60439
4789 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4790 c_start_case.
4791 * c-tree.h (c_start_case): Update.
4792 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
4793 switch condition has boolean value.
4794
9b2b7279
AM
47952014-06-02 Andrew MacLeod <amacleod@redhat.com>
4796
4797 * c-decl.c: Include builtins.h.
4798 * c-parser.c: Likewise.
4799
5c1bc275
MP
48002014-05-27 Marek Polacek <polacek@redhat.com>
4801
4802 PR c/56724
4803 * c-typeck.c (convert_arguments): Get location of a parameter. Change
4804 error and warning calls to error_at and warning_at. Pass location of
4805 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
4806 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4807 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
4808
97563bc8
IZ
48092014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
4810
4811 PR c/61191
4812 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4813 function parameters.
4814
aede2c10
JH
48152014-05-23 Jan Hubicka <hubicka@ucw.cz>
4816
4817 * c-decl.c (merge_decls): Preserve symtab node pointers.
4818 (duplicate_decls): Free new decl.
4819
edbba2ce
TS
48202014-05-23 Thomas Schwinge <thomas@codesourcery.com>
4821
f3316c6d
TS
4822 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4823 initialization.
4824
edbba2ce
TS
4825 * c-parser.c (c_parser_omp_target): Return bool values.
4826
68c81f24
TS
48272014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4828
4829 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4830 num_teams_loc variable to num_thread_limit_loc.
4831
632f2871
RS
48322014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4833
4834 * c-array-notation.c (expand_array_notations): Use void_node
4835 instead of void_zero_node.
4836
766090c2
TS
48372014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4838
4839 * c-decl.c (finish_struct): Adjust.
4840 (finish_enum): Likewise.
4841 (bind): Adjust.
4842 (record_inline_static): Likewise.
4843 (push_scope): Likewise.
4844 (make_label): Likewise.
4845 (lookup_label_for_goto): Likewise.
4846 (finish_struct): Likewise.
4847 (finish_enum): Likewise.
4848 (store_parm_decls): Likewise.
4849 (c_push_function_context): Likewise.
4850 * c-lang.h: Remove usage of variable_size gty attribute.
4851 * c-parser.c (c_parse_init): Adjust.
4852 (c_parse_file): Likewise.
4853
2b107f6b
MP
48542014-05-13 Marek Polacek <polacek@redhat.com>
4855
4856 PR c/61162
4857 * c-typeck.c (convert_for_assignment): Pass location to
4858 WARN_FOR_ASSIGNMENT instead of input_location.
4859
d033409e
MP
48602014-05-10 Marek Polacek <polacek@redhat.com>
4861
4862 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4863 maybe_warn_string_init.
4864 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4865 maybe_warn_string_init.
4866 * c-tree.h (maybe_warn_string_init): Update declaration.
4867 * c-typeck.c (maybe_warn_string_init): Add location parameter.
4868 Call pedwarn_init with loc instead of with input_location.
4869 (digest_init): Pass init_loc to maybe_warn_string_init.
4870 (pop_init_level): Call pedwarn_init with loc instead of with
4871 input_location.
4872 (set_init_index): Likewise.
4873 (process_init_element): Likewise.
4874
ea58ef42
MP
48752014-05-09 Marek Polacek <polacek@redhat.com>
4876
4877 PR c/61096
4878 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4879 (c_parser_initelt): Pass location to set_init_label. Pass array index
4880 location to set_init_index.
4881 * c-tree.h (push_init_level): Update declaration.
4882 (pop_init_level): Likewise.
4883 (set_init_index): Likewise.
4884 (set_init_label): Likewise.
4885 * c-typeck.c (error_init): Add location parameter. Call error_at
4886 instead of error.
4887 (digest_init): Pass init_loc to error_init.
4888 (really_start_incremental_init):
4889 (push_init_level): Add location parameter. Pass loc to pop_init_level
4890 and error_init.
4891 (pop_init_level): Likewise.
4892 (set_designator): Add location parameter. Pass loc to pop_init_level,
4893 push_init_level, and error_init.
4894 (set_init_index): Add location parameter. Pass loc to error_init and
4895 set_designator.
4896 (set_init_label): Likewise.
4897 (output_init_element): Pass loc to error_init.
4898 (process_init_element): Pass loc to error_init, pop_init_level,
4899 pedwarn_init, and push_init_level.
4900
661a0813
MP
49012014-05-09 Marek Polacek <polacek@redhat.com>
4902
4903 PR c/50459
4904 * c-parser.c (c_parser_attributes): Parse the arguments as an
4905 expression-list if the attribute takes identifier.
4906
2793eeab
MP
49072014-05-08 Marek Polacek <polacek@redhat.com>
4908
4909 PR c/61053
4910 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4911 TYPE_ALIGN_UNIT.
4912
f827930a
MP
49132014-05-08 Marek Polacek <polacek@redhat.com>
4914
4915 PR c/61077
4916 * c-decl.c (start_function): Warn for _Atomic-qualified return type
4917 of main.
4918
1d60af08
KZ
49192014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4920 Mike Stump <mikestump@comcast.net>
4921 Richard Sandiford <rdsandiford@googlemail.com>
4922
4923 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4924 (finish_enum): Use wide-int interfaces.
4925 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4926 * c-typeck.c (build_c_cast): Likewise.
4927 (set_nonincremental_init_from_string): Likewise.
4928 (c_tree_equal): Likewise.
4929
a0e24419
MP
49302014-05-02 Marek Polacek <polacek@redhat.com>
4931
4932 PR c/25801
4933 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
4934 Return size_one_node when the type is not complete.
4935 (pointer_diff): Remove comment.
4936 (build_unary_op): Improve error messages.
4937
19fc9faa
MP
49382014-05-02 Marek Polacek <polacek@redhat.com>
4939
4940 * c-typeck.c (c_finish_return): Separate warning_at calls.
4941
63bc4e87
MP
49422014-05-02 Marek Polacek <polacek@redhat.com>
4943
4944 * c-tree.h (error_init): Remove declaration.
4945 (pedwarn_init): Likewise.
4946 * c-typeck.c (error_init): Make static and move above.
4947 (pedwarn_init): Likewise.
4948 (warning_init): Move above.
4949 (maybe_warn_string_init): Likewise.
4950
4bd2511b
JL
49512014-05-01 Jeff Law <law@redhat.com>
4952
4953 Revert:
4954
4955 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4956 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
4957 avoid goto.
4958
6a358dcb
MP
49592014-05-02 Marek Polacek <polacek@redhat.com>
4960
4961 PR c/60784
4962 * c-typeck.c (push_init_level): Set constructor_designated to
4963 p->designated for structures.
4964
ae5ebda4
MP
49652014-05-01 Marek Polacek <polacek@redhat.com>
4966
4967 PR c/60915
4968 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4969 function-definition has an attribute after the declarator.
4970
96b40f8d
MP
49712014-05-01 Marek Polacek <polacek@redhat.com>
4972
4973 PR c/60257
4974 * c-typeck.c (warning_init): Add location_t parameter. Call
4975 warning_at instead of warning.
4976 (push_init_level): Pass input_location to warning_init.
4977 (add_pending_init): Add location_t parameter. Pass loc to
4978 warning_init.
4979 (set_nonincremental_init): Pass input_location to add_pending_init.
4980 (set_nonincremental_init_from_string): Likewise.
4981 (output_init_element): Pass loc to warning_init and to
4982 add_pending_init.
4983
32e00768
MP
49842014-05-01 Marek Polacek <polacek@redhat.com>
4985
4986 PR c/43395
4987 * c-typeck.c (c_finish_return): Distinguish between label and variable
4988 when warning about returning local address.
4989
c9379ce2
MP
49902014-05-01 Marek Polacek <polacek@redhat.com>
4991
4992 PR c/29467
4993 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
4994 in C89 mode.
4995
d00887e8
MP
49962014-05-01 Marek Polacek <polacek@redhat.com>
4997
4998 PR c/43245
4999 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
5000 instead of 0 to WARN_FOR_QUALIFIERS.
5001
5436fa2e
MP
50022014-05-01 Marek Polacek <polacek@redhat.com>
5003
5004 PR c/56989
5005 * c-typeck.c (default_conversion): Use better location for
5006 error call.
5007
f8ed5150
MP
50082014-04-30 Marek Polacek <polacek@redhat.com>
5009
5010 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
5011 also when SANITIZE_FLOAT_DIVIDE is on.
5012
8337d1db
MP
50132014-04-30 Marek Polacek <polacek@redhat.com>
5014
5015 PR c/60139
5016 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
5017 and pedwarn_init. Use loc insted of input_location.
5018
c4bdc42f
MP
50192014-04-30 Marek Polacek <polacek@redhat.com>
5020
5021 PR c/60351
5022 * c-typeck.c (build_binary_op): Use location when warning about
5023 shift count.
5024
45484dcf
MP
50252014-04-25 Marek Polacek <polacek@redhat.com>
5026
5027 PR c/18079
5028 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
5029 always_inline/noinline and hot/cold attributes.
5030
34cf811f
MP
50312014-04-25 Marek Polacek <polacek@redhat.com>
5032
5033 PR c/60114
5034 * c-parser.c (c_parser_initelt): Pass input_location to
5035 process_init_element.
5036 (c_parser_initval): Pass loc to process_init_element.
5037 * c-tree.h (process_init_element): Adjust declaration.
5038 * c-typeck.c (push_init_level): Pass input_location to
5039 process_init_element.
5040 (pop_init_level): Likewise.
5041 (set_designator): Likewise.
5042 (output_init_element): Add location_t parameter. Pass loc to
5043 digest_init.
5044 (output_pending_init_elements): Pass input_location to
5045 output_init_element.
5046 (process_init_element): Add location_t parameter. Pass loc to
5047 output_init_element.
5048
42056eac
JJ
50492014-04-24 Jakub Jelinek <jakub@redhat.com>
5050
5051 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
5052 atomic-clause, allow comma in between atomic-clause and
5053 seq_cst.
5054
e162a134
JJ
50552014-04-22 Jakub Jelinek <jakub@redhat.com>
5056
5057 PR c/59073
5058 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
5059 fails, don't set OM_PARALLEL_COMBINED and return NULL.
5060
2f6babac
IZ
50612014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
5062
5063 PR middle-end/60469
5064 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5065 create_tmp_var instead build_decl for creating temps.
5066 (build_array_notation_expr): Likewise.
5067 (fix_conditional_array_notations_1): Likewise.
5068 (fix_array_notation_expr): Likewise.
5069 (fix_array_notation_call_expr): Likewise.
5070
8edbfaa6
JJ
50712014-03-28 Jakub Jelinek <jakub@redhat.com>
5072
5073 PR c++/60689
5074 * c-tree.h (c_build_function_call_vec): New prototype.
5075 * c-typeck.c (build_function_call_vec): Don't call
5076 resolve_overloaded_builtin here.
5077 (c_build_function_call_vec): New wrapper function around
5078 build_function_call_vec. Call resolve_overloaded_builtin here.
5079 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
5080 Call c_build_function_call_vec instead of build_function_call_vec.
5081 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
5082 * c-decl.c (finish_decl): Likewise.
5083
7485aeea
MLI
50842014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5085
5086 PR c/55383
5087 * c-typeck.c: Use correct format string in cast-qual warning
5088
b17a8b07
TS
50892014-03-07 Thomas Schwinge <thomas@codesourcery.com>
5090
5091 * c-decl.c (c_decl_attributes): Use
5092 lang_hooks.types.omp_mappable_type.
5093 * c-typeck.c (c_finish_omp_clauses): Likewise.
5094
3af9c5e9
MP
50952014-03-06 Marek Polacek <polacek@redhat.com>
5096
5097 PR c/60197
5098 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
5099 of checking tree code.
5100
1c9f5f33
PK
51012014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5102
5103 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
5104 (c_parser_parameter_declaration): Likewise.
5105
cc28fc7f
MP
51062014-02-19 Marek Polacek <polacek@redhat.com>
5107
5108 PR c/60195
5109 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
5110 Call mark_exp_read on exp.value.
5111 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
5112 TREE_ADDRESSABLE on old instead of val.
5113 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
5114
b581c05c
PK
51152014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5116
5117 * c-parser.c (c_parser_get_builtin_args): Replace calls to
5118 C_EXPR_APPEND by vec_safe_push.
5119 * c-tree.h (C_EXPR_APPEND): Remove.
5120
81e5eca8
MP
51212014-01-31 Marek Polacek <polacek@redhat.com>
5122
5123 PR c/59963
5124 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
5125 build_function_call_vec.
5126 (build_function_call): Likewise.
5127 (build_atomic_assign): Likewise.
5128 (build_function_call_vec): Add arg_loc parameter. Use it.
5129 (convert_arguments): Likewise.
5130 (convert_for_assignment): Rename rhs_loc to expr_loc.
5131 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
5132 (c_parser_objc_keywordexpr): Likewise.
5133 (c_parser_postfix_expression_after_primary): Call
5134 build_function_call_vec with expr_loc rather than op_loc.
5135 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
5136 build_function_call_vec.
5137 (c_parser_expr_list): Add locations parameter. Fill it with locations
5138 of function arguments.
5139 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
5140
68fca595
MP
51412014-01-30 Marek Polacek <polacek@redhat.com>
5142
5143 PR c/59940
5144 * c-typeck.c (build_function_call_vec): Use loc parameter.
5145 (convert_arguments): Add location parameter. Use it.
5146 (ep_convert_and_check): Likewise.
5147 (build_atomic_assign): Adjust convert_for_assignment call.
5148 (build_modify_expr): Likewise.
5149 (digest_init): Likewise.
5150 (c_finish_return): Likewise.
5151 (build_conditional_expr): Adjust ep_convert_and_check calls.
5152 (convert_for_assignment): Add rhs_loc parameter. Use it.
5153 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
5154 calls.
5155
fa337f3a
RB
51562014-01-30 Richard Biener <rguenther@suse.de>
5157
5158 PR c/59905
5159 * c-typeck.c (build_function_call_vec): Do not replace calls
5160 to a function via an incompatible type with a runtime abort.
5161
b72271b9
BI
51622014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
5163
5164 * c-parser.c (c_parser_declaration_or_fndef): Replaced
5165 flag_enable_cilkplus with flag_cilkplus.
5166 (c_parser_direct_declarator_inner): Likewise.
5167 (c_parser_attribute_any_word): Likewise.
5168 (c_parser_attributes): Likewise.
5169 (c_parser_compound_statement): Likewise.
5170 (c_parser_statement_after_labels): Likewise.
5171 (c_parser_if_statement): Likewise.
5172 (c_parser_switch_statement): Likewise.
5173 (c_parser_do_statement): Likewise.
5174 (c_parser_for_statement): Likewise.
5175 (c_parser_unary_expression): Likewise.
5176 (c_parser_postfix_expression): Likewise.
5177 (c_parser_postfix_expression_after_primary): Likewise.
5178 (c_parser_postfix_expression_after_primary): Likewise.
5179 (c_parser_omp_clause_name): Likewise.
5180 (c_finish_omp_declare_simd): Likewise.
5181 (c_parser_cilk_verify_simd): Likewise.
5182 * c-typeck.c (build_array_ref): Likewise.
5183 (build_function_call_vec): Likewise.
5184 (convert_arguments): Likewise.
5185 (build_compound_expr): Likewise.
5186 (c_finish_return): Likewise.
5187 (c_finish_if_stmt): Likewise.
5188 (c_finish_loop): Likewise.
5189 (build_binary_op): Likewise.
5190
393e8e8b
MP
51912014-01-23 Marek Polacek <polacek@redhat.com>
5192
5193 PR c/59846
5194 * c-typeck.c (parser_build_binary_op): Use location instead of
5195 input_location.
5196 (build_binary_op): Pass location to shorten_compare.
5197
f04dda30
MP
51982014-01-23 Marek Polacek <polacek@redhat.com>
5199
5200 PR c/58346
5201 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
5202 an empty aggregate.
5203
789eadcd
MP
52042014-01-23 Marek Polacek <polacek@redhat.com>
5205
5206 PR c/59871
5207 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
5208 of a comma expression.
5209 (emit_side_effect_warnings): Likewise.
5210
40f14e9f
BI
52112014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5212
5213 PR c/59825
5214 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
5215 function to use walk_tree and moved a lot of its functionality to
5216 expand_array_notations.
5217 (expand_array_notations): New function.
5218
74558dd9
BI
52192014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5220
5221 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
5222 attribute an attribute without value.
5223
652fea39
JJ
52242014-01-23 Jakub Jelinek <jakub@redhat.com>
5225
5226 PR middle-end/58809
5227 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
5228 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
5229
f34f1c87
MP
52302014-01-22 Marek Polacek <polacek@redhat.com>
5231
5232 PR c/59891
5233 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
5234 of remove_c_maybe_const_expr on op1 and op2.
5235
241f845a
JJ
52362014-01-15 Jakub Jelinek <jakub@redhat.com>
5237
5238 PR c/58943
5239 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
5240 effects, preevaluate rhs using SAVE_EXPR first.
5241
9a74f20c
BI
52422014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
5243
5244 PR c++/59631
5245 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
5246 statements with if-elseif statements.
5247
96066ce1
MP
52482014-01-06 Marek Polacek <polacek@redhat.com>
5249
5250 PR c/57773
5251 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
5252 defined bit-field types only in ISO C.
5253
23a5b65a
RS
52542014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5255
5256 Update copyright years
5257
f9030485
RS
52582014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5259
5260 * c-array-notation.c: Use the standard form for the copyright notice.
5261
41958c28
BI
52622013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
5263
5264 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
5265 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
5266 field in parser is not empty. If not-empty, call the function
5267 c_parser_finish_omp_declare_simd.
5268 (c_parser_cilk_clause_vectorlength): Modified function to be shared
5269 between SIMD-enabled functions and #pragma simd. Added new parameter.
5270 (c_parser_cilk_all_clauses): Modified the usage of the function
5271 c_parser_cilk_clause_vectorlength as mentioned above.
5272 (c_parser_cilk_simd_fn_vector_attrs): New function.
5273 (c_finish_cilk_simd_fn_tokens): Likewise.
5274 (is_cilkplus_vector_p): Likewise.
5275 (c_parser_omp_clause_name): Added checking for "vectorlength,"
5276 "nomask," and "mask" strings in clause name.
5277 (c_parser_omp_all_clauses): Added 3 new case statements:
5278 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
5279 PRAGMA_CILK_CLAUSE_NOMASK.
5280 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
5281 check for vector attribute and if so call the function
5282 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
5283 called the function c_finish_cilk_simd_fn_tokens.
5284 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
5285 parser field is non-empty. If so, parse them as you would parse
5286 the omp declare simd pragma.
5287 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
5288 Added a check when step is a parameter and flag it as error.
5289 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
5290 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
5291 pragma_omp_clause.
5292
cef0fd0e
TS
52932013-12-17 Thomas Schwinge <thomas@codesourcery.com>
5294
5295 * c-parser.c (c_parser_omp_parallel): Fix description.
5296
12893402
BI
52972013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
5298
5299 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
5300 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5301 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
5302 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
5303
296674db
JM
53042013-12-04 Joseph Myers <joseph@codesourcery.com>
5305
5306 PR c/52023
5307 * c-parser.c (c_parser_alignas_specifier): Use
5308 c_sizeof_or_alignof_type instead of c_alignof.
5309 (c_parser_alignof_expression): Likewise, with min_alignof
5310 parameter depending on alignof spelling used.
5311
edd28054
MP
53122013-12-04 Marek Polacek <polacek@redhat.com>
5313
5314 PR c/54113
5315 * c-decl.c (start_function): Don't warn for missing prototype for
5316 inline functions.
5317
da0fc454
MP
53182013-12-03 Marek Polacek <polacek@redhat.com>
5319
5320 PR c/59351
5321 * c-decl.c (build_compound_literal): Allow compound literals with
5322 empty initial value.
5323
4c2ecab0
JM
53242013-12-02 Joseph Myers <joseph@codesourcery.com>
5325
5326 PR c/58235
5327 * c-typeck.c (build_modify_expr): Diagnose assignment to
5328 expression with array type.
5329
340baef7
JM
53302013-11-29 Joseph Myers <joseph@codesourcery.com>
5331
5332 PR c/42262
5333 * c-typeck.c (process_init_element): Do not treat a string as
5334 initializing a whole array when used with a designator for an
5335 individual element.
5336
6763b9f7
JM
53372013-11-29 Joseph Myers <joseph@codesourcery.com>
5338
5339 PR c/57574
5340 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
5341 an inline function following a static declaration.
5342
e7bd1de1
JJ
53432013-11-28 Jakub Jelinek <jakub@redhat.com>
5344
5345 PR c/59310
5346 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
5347 to p_name before calling c_parser_omp_teams instead of after.
5348 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
5349 argument. Remove unused p_name variable.
5350
0136f8f0
AH
53512013-11-27 Aldy Hernandez <aldyh@redhat.com>
5352 Jakub Jelinek <jakub@redhat.com>
5353
5354 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
5355 external_scope is NULL.
5356
241b71bb
TV
53572013-11-27 Tom de Vries <tom@codesourcery.com>
5358 Marc Glisse <marc.glisse@inria.fr>
5359
5360 PR c++/59032
5361 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
5362
2fb9a547
AM
53632013-11-22 Andrew MacLeod <amacleod@redhat.com>
5364
5365 * c-typeck.c: Add required include files from gimple.h.
5366
8400e75e
DM
53672013-11-22 David Malcolm <dmalcolm@redhat.com>
5368
5369 * c-decl.c (define_label, shadow_tag_warned)
5370 (check_bitfield_type_and_width, grokdeclarator, grokparms,
5371 store_parm_decls_newstyle, store_parm_decls_oldstyle)
5372 (declspecs_add_type): Remove use of in_system_header macro.
5373 * c-parser.c (c_parser_unary_expression): Likewise.
5374 * c-typeck.c (store_init_value, process_init_element)
5375 (c_start_case): Likewise.
5376
5377 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
5378 macro.
5379
5380 * c-parser.c (c_parser_set_source_position_from_token): Remove
5381 reference to in_system_header from comment.
5382
386b1f1f
RS
53832013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5384
5385 * c-decl.c (grokdeclarator): Update comment to refer to
5386 tree_to_[su]hwi rather than tree_low_cst.
5387
ae7e9ddd
RS
53882013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5389
5390 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
5391 tree_to_uhwi throughout.
5392
9439e9a1
RS
53932013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5394
5395 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
5396 throughout.
5397
9541ffee
RS
53982013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5399
5400 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
5401 throughout.
5402
c02065fc
AH
54032013-11-15 Aldy Hernandez <aldyh@redhat.com>
5404
5405 * c-parser.c (c_parser_cilk_simd): New.
5406 (c_parser_cilk_verify_simd): New.
5407 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
5408 (c_parser_omp_for_loop): Add case for NE_EXPR.
5409 Set c_break_label for CILK_SIMD.
5410 (c_parser_cilk_clause_vectorlength): New.
5411 (c_parser_cilk_clause_linear): New.
5412 (c_parser_cilk_clause_name): New.
5413 (c_parser_cilk_all_clauses): New.
5414 * c-typeck.c (build_unary_op): Pass location argument to
5415 readonly_error.
5416 (build_modify_expr): Same.
5417 (build_asm_expr): Same.
5418 (c_finish_bc_stmt): Error on break/continue in loops.
5419
18f429e2
AM
54202013-11-14 Andrew MacLeod <amacleod@redhat.com>
5421
5422 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
5423
d8a2d370
DN
54242013-11-14 Diego Novillo <dnovillo@google.com>
5425
5426 * c-decl.c: Include print-tree.h.
5427 Include stor-layout.h.
5428 Include varasm.h.
5429 Include attribs.h.
5430 Include stringpool.h.
5431 * c-lang.c: Include fold-const.h.
5432 * c-parser.c: Include stringpool.h.
5433 Include attribs.h.
5434 Include stor-layout.h.
5435 Include varasm.h.
5436 Include trans-mem.h.
5437 * c-typeck.c: Include stor-layout.h.
5438 Include trans-mem.h.
5439 Include varasm.h.
5440 Include stmt.h.
5441
38b7bc7f
JM
54422013-11-13 Joseph Myers <joseph@codesourcery.com>
5443
5444 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
5445 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
5446 __auto_type.
5447 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
5448 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
5449 RID_AUTO_TYPE.
5450 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
5451 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
5452 (c_parser_declarator, c_parser_direct_declarator_inner)
5453 (c_parser_parameter_declaration, c_parser_type_name): All callers
5454 changed.
5455 (c_parser_declaration_or_fndef): Handle declarations with type
5456 determined from the initializer.
5457
45b0be94
AM
54582013-11-12 Andrew MacLeod <amacleod@redhat.com>
5459
18f429e2 5460 * c-typeck.c: Include gimplify.h.
45b0be94 5461
582d9b50
JM
54622013-11-12 Joseph Myers <joseph@codesourcery.com>
5463
5464 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
5465 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
5466 comment.
5467 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
5468 or _Thread_local as appropriate in diagnostics.
5469 (build_null_declspecs): Initialize ret->thread_gnu_p.
5470 (declspecs_add_scspec): Handle either __thread or _Thread_local
5471 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
5472 pedantic. Do not disallow _Thread_local extern and _Thread_local
5473 static.
5474
267bac10
JM
54752013-11-07 Joseph Myers <joseph@codesourcery.com>
5476 Andrew MacLeod <amacleod@redhat.com>
5477
5478 * c-aux-info.c (gen_type): Handle atomic qualifier.
5479 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
5480 qualifiers when compating types.
5481 (shadow_tag_warned): Handle atomic_p in declspecs.
5482 (quals_from_declspecs): Likewise.
5483 (start_decl): Use c_type_promotes_to when promoting argument
5484 types.
5485 (grokdeclarator): Handle _Atomic.
5486 (get_parm_info): Diagnose any qualifier on "void" as only
5487 parameter.
5488 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
5489 comparing types. Use c_type_promotes_to when promoting argument
5490 types.
5491 (finish_function): Use c_type_promotes_to when promoting argument
5492 types.
5493 (build_null_declspecs): Handle atomic_p in declspecs.
5494 (declspecs_add_qual): Handle RID_ATOMIC.
5495 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
5496 (c_token_starts_declspecs): Handle RID_ATOMIC.
5497 (c_parser_declspecs): Handle atomic type specifiers and
5498 qualifiers.
5499 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
5500 from types of expressions with atomic type.
5501 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
5502 (c_parser_attribute_any_word): Handle RID_ATOMIC.
5503 (c_parser_initializer, c_parser_initelt, c_parser_initval)
5504 (c_parser_statement_after_labels, c_parser_switch_statement)
5505 (c_parser_for_statement, c_parser_expr_no_commas)
5506 (c_parser_conditional_expression, c_parser_binary_expression)
5507 (c_parser_cast_expression, c_parser_unary_expression)
5508 (c_parser_postfix_expression)
5509 (c_parser_postfix_expression_after_primary, c_parser_expression):
5510 Use convert_lvalue_to_rvalue.
5511 (c_parser_expression_conv, c_parser_expr_list): Document
5512 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
5513 (c_parser_objc_synchronized_statement): Use
5514 convert_lvalue_to_rvalue.
5515 (c_parser_objc_selector): Handle RID_ATOMIC.
5516 (c_parser_objc_receiver, c_parser_array_notation): Use
5517 convert_lvalue_to_rvalue.
5518 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
5519 _Atomic (type-name).
5520 (struct c_declspecs): Add atomic_p field.
5521 (convert_lvalue_to_rvalue): Declare.
5522 * c-typeck.c (c_type_promotes_to): Promote atomic types to
5523 corresponding atomic types.
5524 (qualify_type): Don't add _Atomic qualifiers from second argument.
5525 (comp_target_types): Do not allow _Atomic mismatches.
5526 (type_lists_compatible_p): Do not remove atomic qualifiers when
5527 comparing types.
5528 (really_atomic_lvalue, convert_lvalue_to_rvalue)
5529 (build_atomic_assign): New functions.
5530 (build_unary_op): Use build_atomic_assign for atomic increment and
5531 decrement.
5532 (build_conditional_expr): Do not treat _Atomic void as a qualified
5533 version of void.
5534 (build_modify_expr): Use build_atomic_assign for atomic LHS.
5535 (find_anonymous_field_with_type, convert_to_anonymous_field)
5536 (convert_for_assignment): Do not remove atomic qualifiers when
5537 comparing types.
5538 (digest_init): Do not accept initialization of arrays of atomic
5539 elements by string constants.
5540 (build_asm_expr): Use convert_lvalue_to_rvalue.
5541 (build_binary_op): Do not treat _Atomic void as a qualified
5542 version of void.
5543
0c249d4b
DD
55442013-11-06 DJ Delorie <dj@redhat.com>
5545
5546 * c-decl.c (locate_old_decl): If a previous conflicting decl is
5547 both explicit and builtin, print the location of the explicit one.
5548
6d7f7e0a
TB
55492013-11-05 Tobias Burnus <burnus@net-b.de>
5550
5551 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
5552 c_parser_omp_distribute, c_parser_omp_teams,
5553 c_parser_omp_target, c_parser_omp_declare): Handle
5554 -fopenmp-simd.
5555
b906f4ca
MP
55562013-11-03 Marek Polacek <polacek@redhat.com>
5557
5558 * c-decl.c (grokdeclarator): Add VLA instrumentation.
5559
ee1d5a02
JJ
55602013-11-01 Jakub Jelinek <jakub@redhat.com>
5561
5562 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
5563 check_dup_generic at the end, unless remove is true.
5564 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
5565 remove = true;.
5566 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
5567
5a9785fb
JJ
55682013-10-31 Jakub Jelinek <jakub@redhat.com>
5569
5570 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
5571 with decl that is not pointer nor array.
5572
939b37da
BI
55732013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
5574
5575 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
5576 a spawning function is found.
5577 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
5578 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
5579 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5580 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
5581 case.
5582 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
5583 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
5584 expr.
5585 (c_finish_return): Added a check to reject _Cilk_spawn in return
5586 expression.
5587 (build_cilk_spawn): New function.
5588 (build_cilk_sync): Likewise.
5589 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
5590
d4af74d4
TB
55912013-10-27 Tobias Burnus <burnus@net-b.de>
5592
5593 PR other/33426
5594 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
5595 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
5596 (c_parser_statement_after_labels): Update calls.
5597
d73749df 55982013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
5599
5600 PR other/33426
5601 * c-parser.c (c_parser_pragma, c_parser_for_statement):
5602 Handle PRAGMA_IVDEP.
5603 (c_parser_statement_after_labels): Update call.
5604
f28aa681
MP
56052013-10-24 Marek Polacek <polacek@redhat.com>
5606
5607 * c-parser.c (c_parser_struct_declaration): Add a comment.
5608 (c_parser_declarator): Don't allow _Alignas here.
5609
0645c1a2
AM
56102013-10-17 Andrew MacLeod <amacleod@redhat.com>
5611
5612 * c-parser.c: Include omp-low.h.
5613 * c-typeck.c: Likewise.
5614
568a31f2
MP
56152013-10-17 Marek Polacek <polacek@redhat.com>
5616
5617 PR c/58267
5618 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
5619 Document syntax of the array-declarator.
5620 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
5621 are not permitted.
5622 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
5623 (c_parser_struct_declaration): Likewise.
5624 (c_parser_declarator): Likewise.
5625 (c_parser_direct_declarator_inner): Likewise.
5626 (c_parser_parameter_declaration): Likewise.
5627 (c_parser_type_name): Likewise.
5628
acf0174b
JJ
56292013-10-11 Jakub Jelinek <jakub@redhat.com>
5630
5631 * c-lang.h (current_omp_declare_target_attribute): New extern
5632 decl.
5633 * c-parser.c: Include c-lang.h.
5634 (struct c_parser): Change tokens to c_token *.
5635 Add tokens_buf field. Change tokens_avail type to unsigned int.
5636 (c_parser_consume_token): If parser->tokens isn't
5637 &parser->tokens_buf[0], increment parser->tokens.
5638 (c_parser_consume_pragma): Likewise.
5639 (enum pragma_context): Add pragma_struct and pragma_param.
5640 (c_parser_external_declaration): Adjust
5641 c_parser_declaration_or_fndef caller.
5642 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
5643 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
5644 Adjust recursive call.
5645 (c_parser_struct_or_union_specifier): Use pragma_struct instead
5646 of pragma_external.
5647 (c_parser_parameter_declaration): Use pragma_param instead of
5648 pragma_external.
5649 (c_parser_compound_statement_nostart, c_parser_label,
5650 c_parser_for_statement): Adjust
5651 c_parser_declaration_or_fndef callers.
5652 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
5653 it through to c_parser_conditional_expression.
5654 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
5655 pass it through to c_parser_binary_expression. Adjust recursive
5656 call.
5657 (c_parser_binary_expression): Remove prec argument, add
5658 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
5659 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
5660 binop matches it, use build2 instead of parser_build_binary_op.
5661 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
5662 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
5663 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
5664 Handle pragma_struct and pragma_param the same as pragma_external.
5665 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5666 (c_parser_omp_variable_list): Parse array sections for
5667 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5668 (c_parser_omp_clause_collapse): Fully fold collapse expression.
5669 (c_parser_omp_clause_reduction): Handle user defined reductions.
5670 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5671 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5672 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5673 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5674 c_parser_omp_clause_depend, c_parser_omp_clause_map,
5675 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5676 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5677 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5678 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
5679 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
5680 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5681 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
5682 (c_parser_omp_for_loop): Add CODE argument, pass it through
5683 to c_finish_omp_for. Change last argument to cclauses,
5684 and adjust uses to grab parallel clauses from the array of all
5685 the split clauses. Adjust c_parser_binary_expression,
5686 c_parser_declaration_or_fndef and c_finish_omp_for callers.
5687 (omp_split_clauses): New function.
5688 (c_parser_omp_simd): New function.
5689 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5690 Allow the function to be called also when parsing combined constructs,
5691 and call c_parser_omp_simd when parsing for simd.
5692 (c_parser_omp_sections_scope): If section-sequence doesn't start with
5693 #pragma omp section, require exactly one structured-block instead of
5694 sequence of statements.
5695 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5696 Allow the function to be called also when parsing combined constructs.
5697 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
5698 Allow the function to be called also when parsing combined
5699 constructs.
5700 (c_parser_omp_taskgroup, c_parser_omp_cancel,
5701 c_parser_omp_cancellation_point, c_parser_omp_distribute,
5702 c_parser_omp_teams, c_parser_omp_target_data,
5703 c_parser_omp_target_update, c_parser_omp_target,
5704 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
5705 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
5706 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
5707 (c_parser_omp_construct): Add p_name and mask vars. Handle
5708 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
5709 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
5710 and c_parser_omp_sections callers.
5711 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
5712 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5713 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5714 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
5715 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
5716 OMP_CLAUSE_DEPEND.
5717 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5718 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5719 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5720 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5721 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5722 * c-typeck.c: Include tree-inline.h.
5723 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5724 handle_omp_array_sections_1, handle_omp_array_sections,
5725 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5726 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5727 user defined reductions.
5728 (c_tree_equal): New function.
5729 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5730 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5731 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5732 c_check_omp_declare_reduction_r): New prototypes.
5733 * c-decl.c (current_omp_declare_target_attribute): New variable.
5734 (c_decl_attributes): New function.
5735 (start_decl, start_function): Use it instead of decl_attributes.
5736 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5737 c_omp_reduction_decl, c_omp_reduction_lookup,
5738 c_check_omp_declare_reduction_r): New functions.
5739
0a6c2227
TT
57402013-09-25 Tom Tromey <tromey@redhat.com>
5741
5742 * Make-lang.in (c/gccspec.o): Remove.
5743 (CFLAGS-c/gccspec.o): New variable.
5744 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
5745 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
5746 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5747
f3bc55f0
TT
57482013-09-25 Tom Tromey <tromey@redhat.com>
5749
5750 * Make-lang.in (c/gccspec.o): Don't use subshell.
5751
a24d975c
MP
57522013-09-18 Marek Polacek <polacek@redhat.com>
5753
5754 PR sanitize/58443
5755 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5756 Remove unnecessary check.
5757
ce6923c5
MP
57582013-09-18 Marek Polacek <polacek@redhat.com>
5759
5760 PR sanitizer/58411
5761 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
5762 no_sanitize_undefined attribute.
5763
a1e51df9
KT
57642013-09-13 Kai Tietz <ktietz@redhat.com>
5765
5766 PR target/57848
5767 * c-decl.c (c_builtin_function_ext_scope): Remove
5768 wrong assumption that it is never called on prexisting
5769 symbol.
5770
0af94e6f
JR
57712013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
5772
5773 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
5774
20059c8b
GDR
57752013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5776
5777 * c-objc-common.c (c_tree_printer): Tidy.
5778
de5a5fa1
MP
57792013-08-30 Marek Polacek <polacek@redhat.com>
5780
5781 * c-typeck.c (build_binary_op): Add division by zero and shift
5782 instrumentation.
5783
2531a1d9 57842013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 5785 Joseph Myers <joseph@codesourcery.com>
2531a1d9 5786
6e2bcc98 5787 PR c/35649
2531a1d9
JR
5788 * c-typeck.c (c_common_type): Prefer double_type_node over
5789 other REAL_TYPE types with the same precision.
5790 (convert_arguments): Likewise.
5791
025311c4
GDR
57922013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5793
5794 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
5795 (c_initialize_diagnostics): Call a destructor for the early printer.
5796
da6ca2b5
GDR
57972013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5798
5799 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5800 printer initialization.
5801
318cda85 58022013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 5803
318cda85
BI
5804 PR c/57490
5805 * c-array-notation.c (fix_conditional_array_notations_1): Added a
5806 check for truth values.
5807 (expand_array_notation_exprs): Added truth values case. Removed an
5808 unwanted else. Added for-loop to walk through subtrees in default
5809 case.
5810
b066401f
GDR
58112013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5812
5813 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5814
fb48aadc
JM
58152013-07-23 Joseph Myers <joseph@codesourcery.com>
5816
5817 * c-parser.c (struct c_generic_association): Fix typo.
5818
433cc7b0
TT
58192013-07-23 Tom Tromey <tromey@redhat.com>
5820 Joseph Myers <joseph@codesourcery.com>
5821
5822 * c-parser.c (struct c_generic_association): New.
5823 (c_generic_association_d): New typedef.
5824 (c_parser_generic_selection): New function.
5825 (c_parser_postfix_expression): Handle RID_GENERIC.
5826
26d40c3d
JM
58272013-07-13 Jason Merrill <jason@redhat.com>
5828
5829 PR c++/57793
5830 * c-decl.c (finish_struct): Check for too-large class.
5831
ecdbd01a 58322013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
5833
5834 PR c/57821
5835 * c-typeck.c (set_init_index): When folding, check for index overflow.
5836
1141ed3f
BI
58372013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5838
5839 * c-parser.c (c_parser_array_notation): Removed rejection of array
5840 notations in an array of function pointers.
5841
713b46fa
BI
58422013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5843
5844 * c-array-notation.c (make_triplet_val_inv): New function.
5845 (create_cmp_incr): Likewise.
5846 (create_array_refs): Likewise.
5847 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5848 Also modularized common parts between functions and called the function.
5849 (build_array_notation_expr): Likewise.
5850 (fix_conditional_array_notations_1): Likewise.
5851 (fix_array_notation_expr): Likewise.
5852 (fix_array_notation_call_expr): Likewise.
5853
92f20202
MP
58542013-06-18 Marek Polacek <polacek@redhat.com>
5855
5856 PR c/57630
5857 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5858
73a23b06
BI
58592013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
5860
5861 * c-array-notation.c (build_array_notation_expr): Reject array notation
5862 mismatch between LHS and RHS even inside a call_expr. Also, removed
5863 a couple while statements that were dead code.
5864
00b8517d
BI
58652013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
5866
5867 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5868 excessive precision expressions in function parameters. Also removed
5869 couple unwanted while statements.
5870
1509bdda
BI
58712013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5872
5873 * c-array-notation.c (expand_array_notation_exprs): Added
5874 ARRAY_NOTATION_REF case.
5875
d60f1706
BI
58762013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5877
5878 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5879 function to c-family/array-notation-common.c.
5880 (is_cilkplus_reduce_builtin): Likewise.
5881 (find_rank): Likewise.
5882 (extract_array_notation_exprs): Likewise.
5883 (replace_array_notations): Likewise.
5884 (find_inv_trees): Likewise.
5885 (replace_inv_trees): Likewise.
5886 (contains_array_notation_expr): Likewise.
5887 (find_correct_array_notation_type): Likewise.
5888 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5889 (struct inv_list): Moved this to c-family/array-notation-common.c.
5890 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5891
6d6efbb3
BI
58922013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
5893
5894 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5895 reduction functions outside the for-loop. Added a check if the fundecl
5896 is non-NULL. Finally, removed an unwanted if-statement, and made the
5897 body unconditional.
5898
25c22937
BI
58992013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5900
5901 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5902 condition of the if-statement matches the rank of else-block and then-
5903 block when array notations are used.
5904 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5905 expression after the entire function body is parsed.
5906 (c_parser_expr_no_commas): Delayed creating array notation expressions
5907 to the end of function parsing.
5908 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5909 whole if-statement instead of just the condition.
5910 (expand_array_notation_exprs): Added MODIFY_EXPR case.
5911
edd25645
BI
59122013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5913
5914 PR c/57474
5915 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5916 array to NULL_TREE if they are unused. Also added a check for the
5917 field to be NULL before its fields are used in future.
5918
065ce7f1
RO
59192013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5920
5921 PR bootstrap/57450
5922 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5923 (build_array_notation_expr): Likewise.
5924
36536d79
BI
59252013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5926
5927 * c-typeck.c (build_array_ref): Added a check to see if array's
5928 index is greater than one. If true, then emit an error.
5929 (build_function_call_vec): Exclude error reporting and checking
5930 for builtin array-notation functions.
5931 (convert_arguments): Likewise.
5932 (c_finish_return): Added a check for array notations as a return
5933 expression. If true, then emit an error.
5934 (c_finish_loop): Added a check for array notations in a loop
5935 condition. If true then emit an error.
5936 (lvalue_p): Added a ARRAY_NOTATION_REF case.
5937 (build_binary_op): Added a check for array notation expr inside
5938 op1 and op0. If present, we call another function to find correct
5939 type.
5940 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
5941 * c-parser.c (c_parser_compound_statement): Check if array
5942 notation code is used in tree, if so, then transform them into
5943 appropriate C code.
5944 (c_parser_expr_no_commas): Check if array notation is used in LHS
5945 or RHS, if so, then build array notation expression instead of
5946 regular modify.
5947 (c_parser_postfix_expression_after_primary): Added a check for
5948 colon(s) after square braces, if so then handle it like an array
5949 notation. Also, break up array notations in unary op if found.
5950 (c_parser_direct_declarator_inner): Added a check for array
5951 notation.
5952 (c_parser_compound_statement): Added a check for array notation in
5953 a stmt. If one is present, then expand array notation expr.
5954 (c_parser_if_statement): Likewise.
5955 (c_parser_switch_statement): Added a check for array notations in
5956 a switch statement's condition. If true, then output an error.
5957 (c_parser_while_statement): Similarly, but for a while.
5958 (c_parser_do_statement): Similarly, but for a do-while.
5959 (c_parser_for_statement): Similarly, but for a for-loop.
5960 (c_parser_unary_expression): Check if array notation is used in a
5961 pre-increment or pre-decrement expression. If true, then expand
5962 them.
5963 (c_parser_array_notation): New function.
5964 * c-array-notation.c: New file.
5965 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5966
cd192ccc
MS
59672013-05-23 Mike Stump <mikestump@comcast.net>
5968
5969 * c-typeck.c (convert_for_assignment): Handle references to memory
5970 spaces better.
5971
427b248d
JM
59722013-05-16 Jason Merrill <jason@redhat.com>
5973
5974 * Make-lang.in (cc1$(exeext)): Use link mutex.
5975
44d90fe1
PC
59762013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5977
5978 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5979 to simply use OPT_Wpointer_arith.
5980 (build_unary_op): Likewise.
5981
4e7d7b3d
JJ
59822013-04-03 Jakub Jelinek <jakub@redhat.com>
5983
5984 PR c/19449
5985 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
5986 argument. If set, or it temporarily for parsing of the first
5987 argument into force_folding_builtin_constant_p.
5988 (c_parser_postfix_expression): Adjust callers.
5989
839b422f
RB
59902013-03-21 Richard Biener <rguenther@suse.de>
5991
5992 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
5993 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
5994
2ee028f1
MP
59952013-02-12 Marek Polacek <polacek@redhat.com>
5996
5997 PR c/44938
5998 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
5999 origtypes to NULL.
6000
8824edff
JJ
60012013-01-24 Jakub Jelinek <jakub@redhat.com>
6002
6003 PR c/56078
6004 * c-typeck.c (set_nonincremental_init_from_string): If
6005 constructor_max_index is NULL, treat it as if tree_int_cst_lt
6006 returned false.
6007 (process_init_element): Likewise.
6008
eadd3d0d
JJ
60092012-12-20 Jakub Jelinek <jakub@redhat.com>
6010
6011 PR c++/55619
6012 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
6013 argument, don't call default_function_array_conversion
6014 nor c_fully_fold here.
6015 (c_parser_asm_statement): Adjust callers.
6016 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
6017 and outputs here, and call default_function_array_conversion
6018 on inputs that don't need to be addressable.
6019
f8a93a2e
JJ
60202012-12-18 Jakub Jelinek <jakub@redhat.com>
6021
6022 PR c/39464
6023 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
6024 warning require that both c_common_unsigned_type as well as
6025 c_common_signed_type is the same for both mvl and mvr types.
6026
9771b263
DN
60272012-11-16 Diego Novillo <dnovillo@google.com>
6028
6029 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
6030
6031 * c-common.c: Use new vec API in vec.h.
6032 * c-common.h: Likewise.
6033 * c-gimplify.c: Likewise.
6034 * c-pragma.c: Likewise.
6035 * c-pretty-print.c: Likewise.
6036 * c-pretty-print.h: Likewise.
6037 * c-semantics.c: Likewise.
6038 * c-decl.c: Likewise.
6039 * c-parser.c: Likewise.
6040 * c-tree.h: Likewise.
6041 * c-typeck.c: Likewise.
6042
880661a4
JW
60432012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
6044
6045 PR c++/54930
6046 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
6047
077d1abe
MLI
60482012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6049
6050 PR c/53066
6051 * c-decl.c (warn_if_shadowing): Do not warn if a variable
6052 shadows a function, unless the variable is a function or a
6053 pointer-to-function.
6054
3a785c97
JJ
60552012-10-12 Jakub Jelinek <jakub@redhat.com>
6056
6057 PR c/54381
6058 * c-parser.c (struct c_tree_loc_pair): Removed.
6059 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
6060 add location_t * and tree * arguments, fill in array of 3
6061 sizeof_arg trees and corresponding locs.
6062 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
6063 c_parser_expr_list callers.
6064 (c_parser_postfix_expression_after_primary): Likewise. Pass
6065 array of 3 sizeof_arg trees and locs (corresponding to first
6066 3 arguments) to sizeof_pointer_memaccess_warning.
6067
703c8606
LC
60682012-10-09 Lawrence Crowl <crowl@google.com>
6069
6070 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
6071 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
6072 hash table.
6073
5d9de0d0
PC
60742012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
6075
6076 PR c++/54194
6077 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
6078 call.
6079
a212e43f
MG
60802012-10-09 Marc Glisse <marc.glisse@inria.fr>
6081
6082 PR c++/54427
6083 * c-typeck.c: Include c-common.h.
6084 (enum stv_conv): Moved to c-common.h.
6085 (scalar_to_vector): Moved to c-common.c.
6086 (build_binary_op): Adapt to scalar_to_vector's new prototype.
6087 * Make-lang.in: c-typeck.c depends on c-common.h.
6088
3b78de56
AC
60892012-10-04 Arnaud Charlet <charlet@adacore.com>
6090
6091 * c-decl.c (c_write_global_declarations): Fix handling of
6092 -fdump-ada-spec*.
6093
78c60e3d
SS
60942012-09-30 Sharad Singhai <singhai@google.com>
6095
6096 * c-decl.c (c_write_global_declarations): Use a different method
6097 to determine if the dump has ben initialized.
6098
9f33203d
JM
60992012-09-14 Joseph Myers <joseph@codesourcery.com>
6100
6101 PR c/54552
6102 * c-typeck.c (c_cast_expr): When casting to a type requiring
6103 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
6104 c_fully_fold first.
6105
a27d595d
JM
61062012-09-14 Joseph Myers <joseph@codesourcery.com>
6107
6108 PR c/54103
6109 * c-typeck.c (build_unary_op): Pass original argument of
6110 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
6111 any C_MAYBE_CONST_EXPR, if it has integer operands.
6112 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
6113 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
6114 to c_objc_common_truthvalue_conversion, then remove any
6115 C_MAYBE_CONST_EXPR, if they have integer operands. Use
6116 c_objc_common_truthvalue_conversion not
6117 c_common_truthvalue_conversion.
6118 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
6119 call note_integer_operands for arguments with integer operands
6120 that are not integer constants.
6121
9feb29df
JJ
61222012-09-13 Jakub Jelinek <jakub@redhat.com>
6123
6124 PR c/54559
6125 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
6126 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
6127
d409320c
JJ
61282012-08-31 Jakub Jelinek <jakub@redhat.com>
6129
6130 PR c/54428
6131 * c-convert.c (convert): Don't call fold_convert_loc if
6132 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
6133 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
6134 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
6135
6265d07c
JJ
61362012-08-24 Jakub Jelinek <jakub@redhat.com>
6137
6138 PR c/54355
6139 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
6140 for nested and empty_ok arguments in the call to
6141 c_parser_declaration_or_fndef.
6142
1a4049e7
JJ
61432012-08-17 Jakub Jelinek <jakub@redhat.com>
6144
6145 * c-tree.h (c_last_sizeof_arg): Declare.
6146 * c-parser.c (struct c_tree_loc_pair): New type.
6147 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
6148 non-NULL.
6149 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
6150 (c_parser_postfix_expression_after_primary): Likewise. Call
6151 sizeof_pointer_memaccess_warning if needed.
6152 (sizeof_ptr_memacc_comptypes): New function.
6153 * c-typeck.c (c_last_sizeof_arg): New global variable.
6154 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
6155
0229aee9
UB
61562012-07-24 Uros Bizjak <ubizjak@gmail.com>
6157
6158 * c-lang.h (lang_decl): Add variable_size GTY option.
6159
7ee2468b
SB
61602012-07-16 Steven Bosscher <steven@gcc.gnu.org>
6161
6162 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
6163 * Make-lang.in: Fix dependencies.
6164
d4a10d0a
SB
61652012-06-29 Steven Bosscher <steven@gcc.gnu.org>
6166
6167 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
6168 and add language Makefile hooks.
6169 * config-lang.in: New file.
6170 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
6171 add the required "normal" config-lang.in rules.
6172 * c-lang.h: Moved from gcc/ to here.
6173 * c-tree.h: Likewise.
6174 * c-objc-common.c: Likewise.
6175 * c-objc-common.h: Likewise.
6176 * c-typeck.c: Likewise.
6177 * c-convert.c: Likewise.
6178 * c-lang.c: Likewise.
6179 * c-aux-info.c: Likewise.
6180 * c-errors.c: Likewise.
6181 * gccspec.c: Likewise.
6182 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
6183 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
6184\f
a5544970 6185Copyright (C) 2012-2019 Free Software Foundation, Inc.
d4a10d0a
SB
6186
6187Copying and distribution of this file, with or without modification,
6188are permitted in any medium without royalty provided the copyright
6189notice and this notice are preserved.