]> gcc.gnu.org Git - gcc.git/blame - gcc/c/ChangeLog
PR translation/90118 Missing space between words
[gcc.git] / gcc / c / ChangeLog
CommitLineData
e7178413
JJ
12019-04-19 Jakub Jelinek <jakub@redhat.com>
2
3 PR c++/90108
4 * c-decl.c (merge_decls): If remove is main variant and
5 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
6 variant that has newdecl as TYPE_NAME if any.
7
60a2c645
JJ
82019-04-12 Jakub Jelinek <jakub@redhat.com>
9
10 PR c/89933
11 * c-decl.c (merge_decls): When newdecl's type is its main variant,
12 don't try to remove it from the variant list, but instead assert
13 it has no variants.
14
2a82beaa
RB
152019-04-01 Richard Biener <rguenther@suse.de>
16
17 PR c/71598
18 * c-tree.h (c_get_alias_set): Declare.
19 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
20 * c-objc-common.c (c_get_alias_set): Treat enumeral types
21 as the underlying integer type.
22
bec1da64
MS
232019-03-19 Martin Sebor <msebor@redhat.com>
24
25 PR tree-optimization/89688
26 * c-decl.c (finish_decl): Call braced_lists_to_string for more
27 kinds of initializers.
28
855cd9b1
JJ
292019-03-19 Jakub Jelinek <jakub@redhat.com>
30
31 PR c/89734
32 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
33 return type even if quals_used is 0. Formatting fixes.
34
baa09dc5
RB
352019-03-14 Richard Biener <rguenther@suse.de>
36
37 * c-tree.h (enum c_declspec_il): New.
38 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
39 enum bitfield.
40 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
41 Pass start pass and declspec_il to c_parser_parse_gimple_body.
42 (c_parser_declspecs): Adjust.
43 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
44 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
45 and bitmap.h.
46 (struct gimple_parser): New.
47 (gimple_parser::push_edge): New method.
48 (c_parser_gimple_parse_bb_spec): New helper.
49 (c_parser_parse_gimple_body): Get start pass and IL specification.
50 Initialize SSA and CFG.
51 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
52 Build a gimple_parser parsing state and pass it along.
53 (c_parser_gimple_statement): Change intermittend __PHI internal
54 function argument for the edge.
55 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
56 (c_parser_gimple_goto_stmt): Record edges to build.
57 (c_parser_gimple_if_stmt): Likewise.
58 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
59 (c_parser_gimple_or_rtl_pass_list): Likewise.
60
a3f9f006
ML
612019-03-11 Martin Liska <mliska@suse.cz>
62
63 * c-decl.c (check_for_loop_decls): Wrap an option name
64 in a string format message and fix GNU coding style.
65 * c-parser.c (c_parser_declspecs): Likewise.
66
1db01ff9
JJ
672019-03-08 Jakub Jelinek <jakub@redhat.com>
68
69 PR tree-optimization/89550
70 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
71 returned true.
72 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
73 or warning returned true.
74
66dcb747
JJ
752019-02-28 Jakub Jelinek <jakub@redhat.com>
76
77 PR c/89525
78 * c-typeck.c (convert_arguments): Call inform_declaration only if
79 the previous warning_at call returned true.
80
2263c9f2
TS
812019-02-22 Thomas Schwinge <thomas@codesourcery.com>
82
83 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
84 parameter. Adjust all users.
85 (c_parser_oacc_simple_clause): Replace parser with loc formal
86 parameter. Adjust all users.
87
19695f4d
CLT
882019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
89
90 PR c/87924
91 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
92 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
93
5f88ba10
JJ
942019-02-15 Jakub Jelinek <jakub@redhat.com>
95
96 PR c/89340
97 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
98 before c_decl_attributes rather than after it.
99
cfc30fd1
JJ
1002019-02-06 Jakub Jelinek <jakub@redhat.com>
101
102 PR c/89211
103 * c-parser.c (c_parser_declaration_or_fndef): Don't update
104 DECL_ARGUMENTS of d if it has been defined already. Use a single if
105 instead of 3 nested ifs.
106
fbe83e6b
JM
1072019-02-06 Joseph Myers <joseph@codesourcery.com>
108
109 PR c/88584
110 * c-decl.c (finish_decl): Do not complete array types for arrays
111 with external linkage not at file scope.
112
f461f938
RB
1132019-02-05 Richard Biener <rguenther@suse.de>
114
115 PR c/88606
116 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
117 all type variants when not supported.
118
fe509359
JJ
1192019-01-30 Jakub Jelinek <jakub@redhat.com>
120
121 PR c/89061
122 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
123 * c-decl.c (decl_jump_unsafe): Return false for
124 C_DECL_COMPOUND_LITERAL_P decls.
125 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
126
6a335b96
JJ
1272019-01-29 Jakub Jelinek <jakub@redhat.com>
128
f4b7e754
JJ
129 PR c/89045
130 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
131 scope.
132
6a335b96
JJ
133 PR c/86125
134 * c-decl.c (last_fileptr_type): Remove.
135 (last_structptr_types): New variable.
136 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
137 {old,new}rettype instead of the types themselves. Assert
138 last_structptr_types array has the same number of elements
139 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
140 argument oldtype and newtype. Instead of handling
141 just fileptr_type_node specially, handle all builtin_structptr_types
142 pointer nodes. Formatting fix.
143
d8b5a1a0
MS
1442019-01-24 Martin Sebor <msebor@redhat.com>
145
146 PR c/86125
147 PR c/88886
148 PR middle-end/86308
149 * c-decl.c (match_builtin_function_types): Add arguments.
150 (diagnose_mismatched_decls): Diagnose mismatched declarations
151 of built-ins more strictly.
152
e21c4491
JJ
1532019-01-24 Jakub Jelinek <jakub@redhat.com>
154
155 PR c++/88976
156 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
157 on #pragma omp cancel with different modifiers.
158
420183d9
L
1592019-01-18 H.J. Lu <hongjiu.lu@intel.com>
160
161 PR c/51628
162 PR c/88664
163 * c-typeck.c (convert_for_assignment): Upate the
164 warn_for_address_or_pointer_of_packed_member call.
165
17ad43dd
TH
1662019-01-16 Tom Honermann <tom@honermann.net>
167 Jason Merrill <jason@redhat.com>
168
169 * c-typeck.c (digest_init): Revised the error message produced for
170 ill-formed cases of array initialization with a string literal.
171 (error_init): Make variadic.
172
5f07d78a
JJ
1732019-01-12 Jakub Jelinek <jakub@redhat.com>
174
175 * c-typeck.c (convert_for_assignment): Fix a comment typo.
176
c4581bbf
JJ
1772019-01-07 Jakub Jelinek <jakub@redhat.com>
178
179 PR c/88701
180 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
181 if current_function_decl is non-NULL.
182
65c5b1eb
JM
1832019-01-07 Joseph Myers <joseph@codesourcery.com>
184
185 PR c/88720
186 PR c/88726
187 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
188 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
189 functions declared but never defined only for external scope, not
190 for other scopes.
191
d8fcab68
JJ
1922019-01-07 Jakub Jelinek <jakub@redhat.com>
193
194 PR c++/85052
195 * c-parser.c (c_parser_postfix_expression): Parse
196 __builtin_convertvector.
197
a5544970
JJ
1982019-01-01 Jakub Jelinek <jakub@redhat.com>
199
200 Update copyright years.
201
da77eace
L
2022018-12-20 H.J. Lu <hongjiu.lu@intel.com>
203
204 PR c/51628
205 * c-typeck.c (convert_for_assignment): Call
206 warn_for_address_or_pointer_of_packed_member.
207
1edf8866
SB
2082018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
209
210 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
211 a more specific error message (instead of just falling through).
212
db4fd626
SB
2132018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
214
215 * c-parser.c (c_parser_asm_statement): Keep track of the location each
216 asm qualifier is first seen; use that to give nicer "duplicate asm
217 qualifier" messages. Delete 'quals" variable, instead pass the
218 "is_volatile_ flag to build_asm_stmt directly.
219 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
220 * c-typeck.c (build_asm_stmt): Ditto; adjust.
221
9c9cfcbb
SB
2222018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
223
224 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
225 "done" boolean variable.
226
a14feb3c
DM
2272018-12-19 David Malcolm <dmalcolm@redhat.com>
228
229 PR c++/87504
230 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
231 Move from here to gcc-rich-location.h and gcc-rich-location.c.
232 (build_binary_op): Use struct op_location_t and
233 class binary_op_rich_location.
234
6d939173
JJ
2352018-12-11 Jakub Jelinek <jakub@redhat.com>
236
237 PR sanitizer/88426
238 * c-convert.c (convert): Call c_fully_fold before calling
239 ubsan_instrument_float_cast.
240
b7055028
SB
2412018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
242
243 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
244 setting "quals".
245
5b76e75f
SB
2462018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
247
248 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
249 after asm. Pass a flag for it to build_asm_expr.
250 * c-tree.h (build_asm_expr): Update declaration.
251 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
252 set ASM_INLINE_P.
253
30bd42b9
SB
2542018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
255
256 PR inline-asm/55681
257 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
258 combination of volatile and goto, in any order, without repetitions.
259
9df6c0e4
JB
2602018-12-04 James Norris <jnorris@codesourcery.com>
261 Cesar Philippidis <cesar@codesourcery.com>
262 Julian Brown <julian@codesourcery.com>
263
264 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
265 code.
266
f44697b7
RB
2672018-11-30 Richard Biener <rguenther@suse.de>
268
269 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
270 _Literal (type) { ... } as empty aggregate or vector constructor.
271
550dfbdc
MS
2722018-11-29 Martin Sebor <msebor@redhat.com>
273
274 PR c/88091
275 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
276 (convert_arguments): Add comments. Pass additional argument to
277 the function above.
278
673670da
MS
2792018-11-29 Martin Sebor <msebor@redhat.com>
280
281 PR c/88172
282 PR testsuite/88208
283 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
284
db1d09b0
MS
2852018-11-23 Martin Sebor <msebor@redhat.com>
286
287 PR testsuite/88098
288 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
289 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
290
98f08eb8
MS
2912018-11-20 Martin Sebor <msebor@redhat.com>
292
293 * c-parser.c (c_parser_has_attribute_expression): New function.
294 (c_parser_attribute): New function.
295 (c_parser_attributes): Move code into c_parser_attribute.
296 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
297
cd5da983
MS
2982018-11-15 Martin Sebor <msebor@redhat.com>
299
300 PR c/83656
301 * c-decl.c (header_for_builtin_fn): Declare.
302 (diagnose_mismatched_decls): Diagnose declarations of built-in
303 functions without a prototype.
304 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
305 (convert_argument): Same.
306 (convert_arguments): Factor code out into convert_argument.
307 Detect mismatches between built-in formal arguments in calls
308 to built-in without prototype.
309 (build_conditional_expr): Same.
310 (type_or_builtin_type): New function.
311 (convert_for_assignment): Add argument. Conditionally issue
312 warnings instead of errors for mismatches.
313
620e594b
DM
3142018-11-13 David Malcolm <dmalcolm@redhat.com>
315
316 * c-decl.c: Replace "source_location" with "location_t".
317 * c-tree.h: Likewise.
318 * c-typeck.c: Likewise.
319 * gimple-parser.c: Likewise.
320
3179ebae
JJ
3212018-11-09 Jakub Jelinek <jakub@redhat.com>
322
81a227c6
JJ
323 * c-parser.c (c_parser_omp_clause_final): Use
324 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
325 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
326 parsing instead of c_parser_paren_condition.
327 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
328 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
329 c_fully_fold instead of c_parser_condition.
330 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
331 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
332 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
333 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
334 c_parser_expr_no_commas instead of c_parser_expression.
335
98c91c56
JJ
336 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
337 reduction clause with inscan modifier.
338
3179ebae
JJ
339 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
340 clauses other than atomic_default_mem_order.
341
28567c40
JJ
3422018-11-08 Jakub Jelinek <jakub@redhat.com>
343
344 * c-parser.c: Include memmode.h.
345 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
346 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
347 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
348 task_reduction clauses.
349 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
350 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
351 section, or lvalue assignment expression.
352 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
353 (c_parser_omp_clause_lastprivate): Parse optional
354 conditional: modifier.
355 (c_parser_omp_clause_hint): Require constant integer expression rather
356 than just integer expression.
357 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
358 clause.
359 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
360 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
361 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
362 functions.
363 (c_parser_omp_clause_depend): Parse iterator modifier and handle
364 iterators. Parse mutexinoutset and depobj kinds.
365 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
366 callers.
367 (c_parser_omp_all_clauses): Likewise. Handle
368 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
369 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
370 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
371 default memory order from requires directive if any. Adjust
372 c_finish_omp_atomic caller.
373 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
374 (c_parser_omp_flush): Parse flush with memory-order-clause.
375 (c_parser_omp_for_loop): Allow NE_EXPR even in
376 OpenMP loops, adjust c_finish_omp_for caller.
377 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
378 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
379 Allow to be called while parsing combined parallel master.
380 Parse combined master taskloop{, simd}.
381 (c_parser_omp_parallel): Parse combined
382 parallel master{, taskloop{, simd}} constructs.
383 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
384 (OMP_TASKGROUP_CLAUSE_MASK): Define.
385 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
386 (OMP_TASKWAIT_CLAUSE_MASK): Define.
387 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
388 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
389 around teams body. Use SET_EXPR_LOCATION.
390 (c_parser_omp_target_data): Allow target data
391 with only use_device_ptr clauses.
392 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
393 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
394 (c_parser_omp_requires): New function.
395 (c_finish_taskloop_clauses): New function.
396 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
397 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
398 declaration. Disallow in_reduction clause when combined with parallel
399 master.
400 (c_parser_omp_construct): Adjust c_parser_omp_master and
401 c_parser_omp_taskgroup callers.
402 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
403 other than cancel.
404 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
405 like OMP_CLAUSE_REDUCTION.
406 (handle_omp_array_sections): Likewise. Call save_expr on array
407 reductions before calling build_index_type. Handle depend clauses
408 with iterators.
409 (struct c_find_omp_var_s): New type.
410 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
411 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
412 with static, runtime or auto schedule kinds. Call save_expr for whole
413 array reduction sizes. Diagnose reductions with zero sized elements
414 or variable length structures. Diagnose nogroup clause used with
415 reduction clause(s). Handle depend clause with
416 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
417 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
418 some different type for other kinds. Use build_unary_op with
419 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
420 Handle depend clauses with iterators. Remove no longer needed special
421 case that predetermined const qualified vars may be specified in
422 firstprivate clause. Complain if const qualified vars are mentioned
423 in data-sharing clauses other than firstprivate or shared. Use
424 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
425 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
426 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
427 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
428
7e2de6df
DM
4292018-10-29 David Malcolm <dmalcolm@redhat.com>
430
431 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
432 logic for change to name_hint::operator bool.
433 (undeclared_variable): Likewise.
434 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
435 (c_parser_parameter_declaration): Likewise.
436
9f936c86
JM
4372018-10-17 Joseph Myers <joseph@codesourcery.com>
438
439 * c-errors.c (pedwarn_c11): New function.
440 * c-parser.c (disable_extension_diagnostics): Save
441 warn_c11_c2x_compat and set it to 0.
442 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
443 (c_parser_static_assert_declaration_no_semi): Handle
444 _Static_assert without string constant.
445 * c-tree.h (pedwarn_c11): New prototype.
446
033eb567
DM
4472018-10-17 David Malcolm <dmalcolm@redhat.com>
448
449 * Make-lang.in (selftest-c): New.
450 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
451 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
452 from gcc/Makefile.in.
453
0edf3afe
RB
4542018-10-02 Richard Biener <rguenther@suse.de>
455
456 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
457
8313a764
JM
4582018-09-26 Joseph Myers <joseph@codesourcery.com>
459
460 PR c/87390
461 * c-typeck.c (build_binary_op): Use excess precision for
462 comparisons of integers and floating-point for C11 and later.
463
ce6f0888
MJ
4642018-09-26 Martin Jambor <mjambor@suse.cz>
465
466 PR c/87347
467 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
468 comment.
469
9c4a4b3c
DM
4702018-09-17 David Malcolm <dmalcolm@redhat.com>
471
472 * c-objc-common.c (range_label_for_type_mismatch::get_text):
473 Update for new param.
474 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
475 Likewise.
476
80c6d1f4
MJ
4772018-09-17 Martin Jambor <mjambor@suse.cz>
478
479 PR c/63886
480 * c-parser.c: (warn_for_abs): New function.
481 (c_parser_postfix_expression_after_primary): Call it.
482
4a426e36
BE
4832018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
484
485 * c-typeck.c (digest_init): Shorten overlength strings.
486
6d900107
BE
4872018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
488
489 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
490
b5764229
BE
4912018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
492
493 * c-decl.c (finish_decl): Call braced_list_to_string here ...
494 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
495
22eea6b2
AM
4962018-08-30 Alexander Monakov <amonakov@ispras.ru>
497
498 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
499 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
500
85204e23
DM
5012018-08-27 David Malcolm <dmalcolm@redhat.com>
502
503 PR 87091
504 * c-decl.c (implicitly_declare): Update call to
505 maybe_add_include_fixit to suggest overriding the location, as it
506 is for a note.
507 * c-objc-common.c (c_tree_printer): Update for conversion of
508 show_caret_p to a tri-state.
509
3d78e008
ML
5102018-08-27 Martin Liska <mliska@suse.cz>
511
512 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
513 fndecl_built_in_p and remove check for FUNCTION_DECL if
514 possible.
3d78e008
ML
515 (diagnose_mismatched_decls): Likewise.
516 (merge_decls): Likewise.
517 (warn_if_shadowing): Likewise.
518 (pushdecl): Likewise.
519 (implicitly_declare): Likewise.
520 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
521 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
522 * c-typeck.c (build_function_call_vec): Likewise.
523 (convert_arguments): Likewise.
524
097f82ec
DM
5252018-08-20 David Malcolm <dmalcolm@redhat.com>
526
527 PR other/84889
528 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
529 (diagnose_mismatched_decls): Likewise, in various places.
530 (warn_if_shadowing): Likewise.
531 (implicit_decl_warning): Likewise.
532 (implicitly_declare): Likewise.
533 (undeclared_variable): Likewise.
534 (declare_label): Likewise.
535 (grokdeclarator): Likewise.
536 (start_function): Likewise.
537 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
538 (c_parser_parameter_declaration): Likewise.
539 (c_parser_binary_expression): Likewise.
540 * c-typeck.c (c_expr_sizeof_expr): Likewise.
541 (parser_build_binary_op): Likewise.
542 (build_unary_op): Likewise.
543 (error_init): Likewise.
544 (pedwarn_init): Likewise.
545 (warning_init): Likewise.
546 (convert_for_assignment): Likewise.
547
96e6ae57
DM
5482018-08-15 David Malcolm <dmalcolm@redhat.com>
549
550 * c-objc-common.c: Include "gcc-rich-location.h".
551 (c_tree_printer): Move implemenation of '%T' to...
552 (print_type): ...this new function.
553 (range_label_for_type_mismatch::get_text): New function.
554 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
555 range for the various ic_argpass cases.
556 (class maybe_range_label_for_tree_type_mismatch): New class.
557 (build_binary_op): Use it when calling binary_op_error.
558
0cd020ae
PK
5592018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
560
561 * c-decl.c (start_decl): Do not warn if variables is named as main
562 and is a local variable.
563
72733314
IS
5642018-08-15 Iain Sandoe <iain@sandoe.co.uk>
565
566 PR c/19315
567 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
568 objects of unknown size.
569
23aa9f7c
MS
5702018-08-13 Martin Sebor <msebor@redhat.com>
571
572 PR tree-optimization/71625
573 * c-parser.c (c_parser_declaration_or_fndef): Call
574 braced_list_to_string.
575
e5e7e50d
BH
5762018-08-03 Bogdan Harjoc <harjoc@gmail.com>
577
578 PR c/86690
579 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
580 errors.
581
8a45b051
MS
5822018-08-01 Martin Sebor <msebor@redhat.com>
583
584 PR tree-optimization/86650
585 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
586 and TREE_BLOCK (t) from within percent_K_format to this callsite.
587
5922dcb5
JJ
5882018-08-01 Jakub Jelinek <jakub@redhat.com>
589
590 PR c/85704
591 * c-typeck.c (init_field_decl_cmp): New function.
592 (output_pending_init_elements): Use it for field comparisons
593 instead of pure bit_position comparisons.
594
9b452033
JJ
5952018-07-12 Jakub Jelinek <jakub@redhat.com>
596
597 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
598 type here, instead add "omp declare target implicit" attribute.
599 (finish_decl): Diagnose vars without mappable type here.
600
829c6349
CLT
6012018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
602 Thomas Schwinge <thomas@codesourcery.com>
603 Cesar Philippidis <cesar@codesourcery.com>
604
605 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
606 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
607 to their non-present_or_* counterparts. Make 'self' an alias to
608 PRAGMA_OACC_CLAUSE_HOST.
609 (c_parser_oacc_data_clause): Update GOMP mappings for
610 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
611 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
612 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
613 Remove support for present_or_* clauses.
614 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
615 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
616 (OACC_DECLARE_CLAUSE_MASK): Likewise.
617 (OACC_DATA_CLAUSE_MASK): Likewise.
618 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
619 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
620 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
621 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
622 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
623
e197e64e
KV
6242018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
625
626 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
627 * gimple-parser.c (c_parser_gimple_statement): Likewise.
628 (c_parser_gimple_unary_expression): Likewise.
629
487f2f61
JJ
6302018-06-15 Jakub Jelinek <jakub@redhat.com>
631
632 PR c/86093
633 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
634 before doing POINTER_DIFF_EXPR.
635
e4d44a37
MP
6362018-06-07 Marek Polacek <polacek@redhat.com>
637
638 PR c/85318
639 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
640 for loop initial declarations.
641
b67b9225
DP
6422018-05-30 David Pagan <dave.pagan@oracle.com>
643
644 PR c/55976
645 * c-decl.c (grokdeclarator): Update check for return type warnings.
646 (start_function): Likewise.
647 (finish_function): Likewise.
648 * c-typeck.c (c_finish_return): Update check for return type warnings.
649 Pass OPT_Wreturn_type to pedwarn when appropriate.
650
c566cc9f
RS
6512018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
652
653 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
654 __FMA_EXPR handlng.
655
e4f81565
RS
6562018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
657
658 * gimple-parser.c: Include internal-fn.h.
659 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
660 (c_parser_gimple_call_internal): New function.
661 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
662 Fix typos in comment.
663
79e7b1fe
JJ
6642018-05-10 Jakub Jelinek <jakub@redhat.com>
665
666 PR c++/85662
667 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
668 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
669 fold_convert_loc.
670 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
671 fold_offsetof_1, pass argtype as TYPE to it and drop the
672 fold_convert_loc.
673
f7584c81
DP
6742018-05-02 David Pagan <dave.pagan@oracle.com>
675
676 PR c/30552
677 * c-decl.c (old_style_parameter_scope): New function.
678 * c-parser.c (c_parser_postfix_expression): Check for statement
679 expressions in old-style function parameter list declarations.
680 * c-parser.h (old_style_parameter_scope): New extern declaration.
681
b33a0cb3
JJ
6822018-04-25 Jakub Jelinek <jakub@redhat.com>
683
684 PR sanitizer/84307
685 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
686 it is not TREE_STATIC.
687 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
688 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
689 its COMPOUND_LITERAL_EXPR_DECL.
690
c5c5822a
JM
6912018-03-21 Joseph Myers <joseph@codesourcery.com>
692
693 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
694 where all functions return the same _FloatN or _FloatNx type,
695 treat integer types as _Float64 instead of double.
696
aa1c9429
JJ
6972018-03-21 Jakub Jelinek <jakub@redhat.com>
698
699 PR c/84999
700 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
701 building vector comparison, diagnose it and return error_mark_node.
702
9bb45a95
JJ
7032018-03-15 Jakub Jelinek <jakub@redhat.com>
704
705 PR c/84853
706 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
707 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
708 INTEGER_TYPE element type.
709
ada6bad9
DP
7102018-03-13 David Pagan <dave.pagan@oracle.com>
711
712 PR c/46921
713 * c-typeck.c (output_init_element): Ensure field initializer
714 expression is always evaluated if there are side effects.
715
849bbdb9
JJ
7162018-03-06 Jakub Jelinek <jakub@redhat.com>
717
718 PR c/84721
719 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
720 !building_stmt_list_p ().
721
d74641bd
RS
7222018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
723
724 PR c/84305
725 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
726 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
727 and include the BIND_EXPR in the list of things that need to be
728 pre-evaluated.
729
0444aa9c
NS
7302018-02-09 Nathan Sidwell <nathan@acm.org>
731
732 PR c/84293
733 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
734 to strict_aliasing_warning.
735
7c30b12a
PC
7362018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
737
738 * c-typeck.c (really_start_incremental_init, push_init_level,
739 set_nonincremental_init, output_init_element, process_init_element):
740 Use DECL_UNNAMED_BIT_FIELD.
741
2be4dfcb
MP
7422018-01-31 Marek Polacek <polacek@redhat.com>
743
744 PR c/81779
745 * c-parser.c (c_parser_compound_statement_nostart): Call
746 expansion_point_location_if_in_system_header.
747
bb9869d5
DM
7482018-01-17 David Malcolm <dmalcolm@redhat.com>
749
750 PR c++/83814
751 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
752 the C part.
753
b4923738
JJ
7542018-01-13 Jakub Jelinek <jakub@redhat.com>
755
756 PR c/83801
757 * c-tree.h (decl_constant_value_1): Add a bool argument.
758 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
759 returning a CONSTRUCTOR if it is true. Use error_operand_p.
760 (decl_constant_value): Adjust caller.
761 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
762 decl_constant_value_1 as IN_INIT. Otherwise, punt if
763 decl_constant_value returns initializer that has BLKmode or
764 array type.
765 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
766
928686b1
RS
7672018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
768 Alan Hayward <alan.hayward@arm.com>
769 David Sherwood <david.sherwood@arm.com>
770
771 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
772 TYPE_VECTOR_SUBPARTS.
773
85ec4feb
JJ
7742018-01-03 Jakub Jelinek <jakub@redhat.com>
775
776 Update copyright years.
777
913884f7
JJ
7782018-01-01 Jakub Jelinek <jakub@redhat.com>
779
780 PR c/83595
781 * c-parser.c (c_parser_braced_init, c_parser_initelt,
782 c_parser_conditional_expression, c_parser_cast_expression,
783 c_parser_sizeof_expression, c_parser_alignof_expression,
784 c_parser_postfix_expression, c_parser_omp_declare_reduction,
785 c_parser_transaction_expression): Use set_error () method instead
786 of setting value member to error_mark_node.
787
c6cfa2bf
MM
7882017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
789
790 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
791 and _Float<N>X built-in functions.
792
11d29d63
JJ
7932017-12-22 Jakub Jelinek <jakub@redhat.com>
794
14ec014e
JJ
795 PR debug/83550
796 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
797 TYPE_STUB_DECL and call rest_of_type_compilation before processing
798 incomplete vars rather than after it.
799
11d29d63
JJ
800 PR debug/83547
801 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
802 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
803 and consider empty ones if there are no other stmts. For
804 -Wunused-value walk all statements before the one only followed by
805 DEBUG_BEGIN_STMTs.
806
170a8bd6 8072017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 808 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
809
810 * c-parser.c (c_parser_while_statement): Add unroll parameter and
811 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
812 (c_parser_do_statement): Likewise.
813 (c_parser_for_statement): Likewise.
814 (c_parser_statement_after_labels): Adjust calls to above.
815 (c_parse_pragma_ivdep): New static function.
816 (c_parser_pragma_unroll): Likewise.
817 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
818 <PRAGMA_UNROLL>: New case.
819
01512446
JJ
8202017-12-19 Jakub Jelinek <jakub@redhat.com>
821
822 * c-typeck.c (comptypes_internal, function_types_compatible_p,
823 perform_integral_promotions, digest_init): Replace Yoda conditions
824 with typical order conditions.
825 * c-decl.c (check_bitfield_type_and_width): Likewise.
826
c65e18d3
BE
8272017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
828
829 * c-typeck.c (c_safe_arg_type_equiv_p,
830 c_safe_function_type_cast_p): New function.
831 (build_c_cast): Implement -Wcast-function-type.
832
b7280579
RB
8332017-12-14 Richard Biener <rguenther@suse.de>
834
835 PR c/83415
836 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
837 like REALPART_EXPR for the behavior of whether its operand
838 is an lvalue.
839
49e6a6c0
MP
8402017-12-12 Marek Polacek <polacek@redhat.com>
841
842 PR c/82679
843 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
844
96a95ac1
AO
8452017-12-12 Alexandre Oliva <aoliva@redhat.com>
846
847 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
848 * c-parser.c (add_debug_begin_stmt): New.
849 (c_parser_declaration_or_fndef): Call it.
850 (c_parser_compound_statement_nostart): Likewise.
851 (c_parser_statement_after_labels): Likewise.
852 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
853
4b2b493f
JM
8542017-12-07 Joseph Myers <joseph@codesourcery.com>
855
856 * c-decl.c (build_compound_literal): Add parameter alignas_align
857 and set alignment of decl if nonzero.
858 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
859 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
860 qualifier.
861 (c_parser_struct_declaration): Update syntax comment.
862 (c_parser_type_name): Add alignas_ok argument and pass it to
863 c_parser_declspecs.
864 (c_parser_cast_expression): Pass true to c_parser_type_name and
865 give error if a cast used an _Alignas specifier.
866 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
867 give error if sizeof (type-name) used an _Alignas specifier.
868 (c_parser_alignof_expression): Pass true to c_parser_type_name and
869 give error if _Alignof (type-name) used an _Alignas specifier.
870 (c_parser_postfix_expression_after_paren_type): Check specified
871 alignment for a compound literal and pass it to
872 build_compound_literal.
873 * c-parser.h (c_parser_type_name): Update prototype.
874 * c-tree.h (build_compound_literal): Update prototype.
875
5d9ae53d
MS
8762017-12-07 Martin Sebor <msebor@redhat.com>
877
878 PR c/81544
879 * c-decl.c (c_decl_attributes): Look up existing declaration and
880 pass it to decl_attributes.
881
c79144f8
DM
8822017-12-06 David Malcolm <dmalcolm@redhat.com>
883
884 PR c/83236
885 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
886 reserved for use by the implementation.
887
613bc14f
DM
8882017-12-06 David Malcolm <dmalcolm@redhat.com>
889
890 * c-decl.c: Include "c-family/c-spellcheck.h".
891
05abad4c
ML
8922017-12-05 Martin Liska <mliska@suse.cz>
893 Jakub Jelinek <jakub@redhat.com>
894
895 * c-typeck.c (pointer_diff): Add new argument and instrument
896 pointer subtraction.
897 (build_binary_op): Similar for pointer comparison.
898
cc6534d4
JJ
8992017-12-01 Jakub Jelinek <jakub@redhat.com>
900
65791f42
JJ
901 PR c/79153
902 * c-parser.c: Include tree-iterator.h.
903 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
904 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
905 on it.
906
cc6534d4
JJ
907 PR c/83222
908 * c-tree.h (decl_constant_value_1): Declare.
909 * c-typeck.c (decl_constant_value_1): New function.
910 (decl_constant_value): Use it.
911 * c-fold.c (c_fully_fold_internal): If in_init, use
912 decl_constant_value_1 instead of decl_constant_value.
913
5de73c05
JJ
9142017-11-30 Jakub Jelinek <jakub@redhat.com>
915
916 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
917
058f0b9e
JJ
9182017-11-28 Jakub Jelinek <jakub@redhat.com>
919
920 PR sanitizer/81275
921 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
922 c_switch_covers_all_cases_p returns true.
923
5e9d6aa4 9242017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 925 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
926
927 * Make-lang.in (c/c-array-notation.o): Remove.
928 * c-array-notation.c: Delete.
929 * c-decl.c: Remove cilkplus condition.
930 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
931 c_parser_cilk_verify_simd, c_parser_array_notation,
932 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
933 c_parser_cilk_simd_fn_vector_attrs,
934 c_finish_cilk_simd_fn_tokens): Delete.
935 (c_parser_declaration_or_fndef): Remove cilkplus condition.
936 (c_parser_direct_declarator_inner): Ditto.
937 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
938 (c_parser_attributes, c_parser_compound_statement,
939 c_parser_statement_after_labels, c_parser_if_statement,
940 c_parser_switch_statement, c_parser_while_statement,
941 c_parser_do_statement, c_parser_for_statement,
942 c_parser_unary_expression, c_parser_postfix_expression,
943 c_parser_postfix_expression_after_primary,
944 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
945 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
946 support.
947 * c-typeck.c (build_array_ref, build_function_call_vec,
948 convert_arguments,
949 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
950 c_finish_loop, build_binary_op): Remove cilkplus support.
951
9e851845
JJ
9522017-11-28 Jakub Jelinek <jakub@redhat.com>
953
954 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
955 of build3.
956
8c7dbea9
BK
9572017-11-14 Boris Kolpackov <boris@codesynthesis.com>
958
959 * Make-lang.in (c.install-plugin): Install backend import library.
960
41521dee
JJ
9612017-11-23 Jakub Jelinek <jakub@redhat.com>
962
963 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
964 pragma_stmt context.
965
ac9effed
EB
9662017-11-23 Mike Stump <mikestump@comcast.net>
967 Eric Botcazou <ebotcazou@adacore.com>
968
969 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
970 ANNOTATE_EXPR.
971 (c_parser_do_statement): Likewise.
972 (c_parser_for_statement): Likewise.
973
ce95abc4
DM
9742017-11-22 David Malcolm <dmalcolm@redhat.com>
975
976 PR c++/62170
977 * c-objc-common.c (c_tree_printer): Convert penultimate param from
978 bool to bool *. Within '%T' handling, if showing an "aka", use
979 "quoted" param to add appropriate quoting.
980
974aedcc
MP
9812017-11-22 Marek Polacek <polacek@redhat.com>
982
983 PR c++/60336
984 PR middle-end/67239
985 PR target/68355
986 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
987
d4300cc6
DM
9882017-11-21 David Malcolm <dmalcolm@redhat.com>
989
990 PR c/83056
991 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
992 earlier failed lookups.
993
1af4ebf5
MG
9942017-11-21 Marc Glisse <marc.glisse@inria.fr>
995
996 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
997 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
998
26edace6
DM
9992017-11-20 David Malcolm <dmalcolm@redhat.com>
1000
1001 PR c/81404
1002 * c-decl.c: Include "c-family/known-headers.h".
1003 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
1004 to known-headers.cc.
1005 (class suggest_missing_header): Move to known-header.h.
1006 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
1007 than get_c_name_hint.
1008
b1212255
DM
10092017-11-20 David Malcolm <dmalcolm@redhat.com>
1010
1011 * c-decl.c (get_c_name_hint): New function.
1012 (class suggest_missing_header): New class.
1013 (lookup_name_fuzzy): Call get_c_name_hint and use it to
1014 suggest missing headers to the user.
1015
6c7a259b
DM
10162017-11-20 David Malcolm <dmalcolm@redhat.com>
1017
1018 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1019 Include "c-family/name-hint.h"
1020 (implicit_decl_warning): Convert "hint" from
1021 const char * to name_hint. Pass location to
1022 lookup_name_fuzzy. Suppress any deferred diagnostic if the
1023 warning was not printed.
1024 (undeclared_variable): Likewise for "guessed_id".
1025 (lookup_name_fuzzy): Convert return type from const char *
1026 to name_hint. Add location_t param.
1027 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1028 Include "c-family/name-hint.h"
1029 (c_parser_declaration_or_fndef): Convert "hint" from
1030 const char * to name_hint. Pass location to lookup_name_fuzzy.
1031 (c_parser_parameter_declaration): Likewise.
1032
f9c59f7e
JJ
10332017-11-19 Jakub Jelinek <jakub@redhat.com>
1034
1035 PR c/66618
1036 PR c/69960
1037 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
1038 where needed.
1039 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
1040 handle_omp_array_sections): Likewise.
1041 (digest_init): Don't call decl_constant_value_for_optimization.
1042 * c-tree.h (decl_constant_value_for_optimization): Removed.
1043 * c-fold.c (c_fold_array_ref): New function.
1044 (c_fully_fold_internal): Add LVAL argument, propagate it through
1045 recursive calls. For VAR_P call decl_constant_value and
1046 unshare if not LVAL and either optimizing or IN_INIT. Remove
1047 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
1048 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
1049 (c_fully_fold): Add LVAL argument, pass it through to
1050 c_fully_fold_internal.
1051 (decl_constant_value_for_optimization): Removed.
1052
3ca0dc60
JM
10532017-11-15 Joseph Myers <joseph@codesourcery.com>
1054
1055 PR c/81156
1056 * c-parser.c (check_tgmath_function): New function.
1057 (enum tgmath_parm_kind): New enum.
1058 (c_parser_postfix_expression): Handle __builtin_tgmath.
1059
64a5912c
DM
10602017-10-31 David Malcolm <dmalcolm@redhat.com>
1061
1062 * c-decl.c (implicit_decl_warning): Update for renaming of
1063 pedwarn_at_rich_loc and warning_at_rich_loc.
1064 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
1065 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
1066 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1067 (c_parser_struct_or_union_specifier): Likewise for renaming of
1068 pedwarn_at_rich_loc.
1069 (c_parser_parameter_declaration): Likewise for renaming of
1070 error_at_rich_loc.
1071 * c-typeck.c (build_component_ref): Likewise.
1072 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
1073 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
1074 (set_init_label): Likewise for renaming of error_at_rich_loc.
1075
c1136864
RB
10762017-10-30 Richard Biener <rguenther@suse.de>
1077
1078 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
1079 stmts.
1080
ee5fd23a
MM
10812017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
1082
1083 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
1084 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
1085
1a59ccf2
DM
10862017-10-25 David Malcolm <dmalcolm@redhat.com>
1087
1088 PR c/7356
1089 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
1090 semicolons.
1091
bc1a75dd
JJ
10922017-10-25 Jakub Jelinek <jakub@redhat.com>
1093
1094 PR libstdc++/81706
1095 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
1096 newdecl to corresponding __builtin_ if any.
1097
ff1ff960
PC
10982017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
1099
1100 PR c++/82466
1101 * c-decl.c (diagnose_mismatched_decls): Use
1102 OPT_Wbuiltin_declaration_mismatch.
1103
62e1c678
DM
11042017-10-12 David Malcolm <dmalcolm@redhat.com>
1105
1106 * c-parser.c (c_parser_require): Add "type_is_unique" param and
1107 use it to guard calls to maybe_suggest_missing_token_insertion.
1108 (c_parser_parms_list_declarator): Override default value of new
1109 "type_is_unique" param to c_parser_require.
1110 (c_parser_asm_statement): Likewise.
1111 * c-parser.h (c_parser_require): Add "type_is_unique" param,
1112 defaulting to true.
1113
a92f6726
NS
11142017-10-11 Nathan Sidwell <nathan@acm.org>
1115
1116 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
1117
8e6cdc90
RS
11182017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1119
1120 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
1121 operating on trees as wide_ints.
1122 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
1123 (c_tree_equal): Likewise.
1124
8139a48e
DM
11252017-10-04 David Malcolm <dmalcolm@redhat.com>
1126
1127 * c-decl.c (push_parm_decl): Store c_parm's location into the
1128 PARAM_DECL.
1129 (build_c_parm): Add "loc" param and store it within the c_parm.
1130 * c-parser.c (struct c_parser): Add "last_token_location" field.
1131 (c_parser_consume_token): Store location of the token into the
1132 new field.
1133 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
1134 when handling a FUNCTION_DECL, if it doesn't already have them.
1135 (c_parser_parameter_declaration): Generate a location for the
1136 parameter, and pass it to the call to build_c_parm.
1137 * c-tree.h (struct c_parm): Add field "loc".
1138 (build_c_parm): Add location_t param.
1139 * c-typeck.c (get_fndecl_argument_location): New function.
1140 (inform_for_arg): New function.
1141 (convert_for_assignment): Use inform_for_arg when dealing with
1142 ic_argpass.
1143
2a389958
JJ
11442017-09-29 Jakub Jelinek <jakub@redhat.com>
1145
7d386d45
JJ
1146 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
1147 width is non-NULL.
1148 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
1149 don't SET_DECL_C_BIT_FIELD here.
1150
2a389958
JJ
1151 PR c/82340
1152 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
1153 instead of trying to set just TREE_READONLY manually.
1154
ebc6a85e
TV
11552017-09-16 Tom de Vries <tom@codesourcery.com>
1156
1157 PR c/81875
1158 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
1159 cond itself.
1160
bb75facd
JM
11612017-09-15 Joseph Myers <joseph@codesourcery.com>
1162
1163 PR c/82071
1164 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
1165 for C11.
1166 (build_conditional_expr): For C11, generate result with excess
1167 precision when one argument is an integer and the other is of a
1168 type using excess precision.
1169
1d933576
BE
11702017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
1171
1172 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
1173
267bbb6f
MP
11742017-09-13 Marek Polacek <polacek@redhat.com>
1175
1176 PR c/82167
1177 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
1178 than expr.original_type.
1179
6836632e
NS
11802017-09-12 Nathan Sidwell <nathan@acm.org>
1181
1182 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1183 resort_sorted_fields): Moved from c-family/c-common.c.
1184 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
1185
e035be33
JM
11862017-09-01 Joseph Myers <joseph@codesourcery.com>
1187
1188 PR c/82071
1189 * c-typeck.c (build_atomic_assign): Handle argument with excess
1190 precision. Ensure any EXCESS_PRECISION_EXPR is present in
1191 argument passed to build_binary_op and convert_for_assignment but
1192 not for call to c_fully_fold.
1193 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
1194 Ensure build_binary_op is called with argument with original
1195 semantic type. Avoid calling c_fully_fold with an
1196 EXCESS_PRECISION_EXPR from build_binary_op.
1197
d2e05fcb
JJ
11982017-09-01 Jakub Jelinek <jakub@redhat.com>
1199
1200 PR c/81887
1201 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
1202
b397965c
RS
12032017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1204 Alan Hayward <alan.hayward@arm.com>
1205 David Sherwood <david.sherwood@arm.com>
1206
1207 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
1208 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
1209 m1 and m2 to the signed equivalent of a fixed-point
1210 SCALAR_TYPE_MODE.
1211
14e18d71
DM
12122017-08-24 David Malcolm <dmalcolm@redhat.com>
1213
1214 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
1215 than CAN_HAVE_LOCATION_P when determining whether to use the
1216 location_t value within "value".
1217
7f204c0f
DM
12182017-08-21 David Malcolm <dmalcolm@redhat.com>
1219
1220 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
1221 rather than peeking the location of the first token.
1222 * c-tree.h (c_expr::get_location): New method.
1223
2f687306
DM
12242017-08-21 David Malcolm <dmalcolm@redhat.com>
1225
1226 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
1227 to check_function_arguments.
1228
3e7b80d7
MP
12292017-08-18 Marek Polacek <polacek@redhat.com>
1230
1231 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
1232 commentary.
1233
00aa1fa2
L
12342017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1235
1236 PR c/53037
1237 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
1238 (check_bitfield_type_and_width): Don't allow bit-field with
1239 warn_if_not_aligned type.
1240
da67acb9
MS
12412017-08-14 Martin Sebor <msebor@redhat.com>
1242
1243 PR c/81117
1244 * c-objc-common.c (c_objc_common_init): Handle 'G'.
1245
bb85aa74
MP
12462017-08-11 Marek Polacek <polacek@redhat.com>
1247
1248 PR c/81795
1249 * c-decl.c (pushtag): Only print inform if the warning was printed.
1250 (grokdeclarator): Likewise.
1251
32129a17
DM
12522017-08-10 David Malcolm <dmalcolm@redhat.com>
1253
1254 * c-parser.c (c_parser_error): Rename to...
1255 (c_parser_error_richloc): ...this, making static, and adding
1256 "richloc" parameter, passing it to the c_parse_error call,
1257 rather than calling c_parser_set_source_position_from_token.
1258 (c_parser_error): Reintroduce, reimplementing in terms of the
1259 above, converting return type from void to bool.
1260 (class token_pair): New class.
1261 (struct matching_paren_traits): New struct.
1262 (matching_parens): New typedef.
1263 (struct matching_brace_traits): New struct.
1264 (matching_braces): New typedef.
1265 (get_matching_symbol): New function.
1266 (c_parser_require): Add param MATCHING_LOCATION, using it to
1267 highlight matching "opening" tokens for missing "closing" tokens.
1268 (c_parser_skip_until_found): Likewise.
1269 (c_parser_static_assert_declaration_no_semi): Convert explicit
1270 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
1271 class matching_parens, so that the pertinent open parenthesis is
1272 highlighted when there are problems locating the close
1273 parenthesis.
1274 (c_parser_struct_or_union_specifier): Likewise.
1275 (c_parser_typeof_specifier): Likewise.
1276 (c_parser_alignas_specifier): Likewise.
1277 (c_parser_simple_asm_expr): Likewise.
1278 (c_parser_braced_init): Likewise, for matching_braces.
1279 (c_parser_paren_condition): Likewise, for matching_parens.
1280 (c_parser_switch_statement): Likewise.
1281 (c_parser_for_statement): Likewise.
1282 (c_parser_asm_statement): Likewise.
1283 (c_parser_asm_operands): Likewise.
1284 (c_parser_cast_expression): Likewise.
1285 (c_parser_sizeof_expression): Likewise.
1286 (c_parser_alignof_expression): Likewise.
1287 (c_parser_generic_selection): Likewise.
1288 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
1289 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
1290 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
1291 In case CPP_OPEN_PAREN, pass loc_open_paren to the
1292 c_parser_skip_until_found call.
1293 (c_parser_objc_class_definition): Use class matching_parens as
1294 above.
1295 (c_parser_objc_method_decl): Likewise.
1296 (c_parser_objc_try_catch_finally_statement): Likewise.
1297 (c_parser_objc_synchronized_statement): Likewise.
1298 (c_parser_objc_at_property_declaration): Likewise.
1299 (c_parser_oacc_wait_list): Likewise.
1300 (c_parser_omp_var_list_parens): Likewise.
1301 (c_parser_omp_clause_collapse): Likewise.
1302 (c_parser_omp_clause_default): Likewise.
1303 (c_parser_omp_clause_if): Likewise.
1304 (c_parser_omp_clause_num_threads): Likewise.
1305 (c_parser_omp_clause_num_tasks): Likewise.
1306 (c_parser_omp_clause_grainsize): Likewise.
1307 (c_parser_omp_clause_priority): Likewise.
1308 (c_parser_omp_clause_hint): Likewise.
1309 (c_parser_omp_clause_defaultmap): Likewise.
1310 (c_parser_oacc_single_int_clause): Likewise.
1311 (c_parser_omp_clause_ordered): Likewise.
1312 (c_parser_omp_clause_reduction): Likewise.
1313 (c_parser_omp_clause_schedule): Likewise.
1314 (c_parser_omp_clause_num_teams): Likewise.
1315 (c_parser_omp_clause_thread_limit): Likewise.
1316 (c_parser_omp_clause_aligned): Likewise.
1317 (c_parser_omp_clause_linear): Likewise.
1318 (c_parser_omp_clause_safelen): Likewise.
1319 (c_parser_omp_clause_simdlen): Likewise.
1320 (c_parser_omp_clause_depend): Likewise.
1321 (c_parser_omp_clause_map): Likewise.
1322 (c_parser_omp_clause_device): Likewise.
1323 (c_parser_omp_clause_dist_schedule): Likewise.
1324 (c_parser_omp_clause_proc_bind): Likewise.
1325 (c_parser_omp_clause_uniform): Likewise.
1326 (c_parser_omp_for_loop): Likewise.
1327 (c_parser_cilk_clause_vectorlength): Likewise.
1328 (c_parser_cilk_clause_linear): Likewise.
1329 (c_parser_transaction_expression): Likewise.
1330 * c-parser.h (c_parser_require): Add param matching_location with
1331 default UNKNOWN_LOCATION.
1332 (c_parser_error): Convert return type from void to bool.
1333 (c_parser_skip_until_found): Add param matching_location with
1334 default UNKNOWN_LOCATION.
1335
30af3a2b
MP
13362017-08-09 Marek Polacek <polacek@redhat.com>
1337
1338 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
1339 * c-tree.h (build_external_ref): Update declaration.
1340 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
1341 (build_external_ref): Change the type of a parameter to bool.
1342 (parser_build_binary_op): Use true/false instead of 1/0.
1343 (pointer_diff): Likewise.
1344 (build_modify_expr): Likewise.
1345 (set_designator): Change the type of a parameter to bool.
1346 (set_init_index): Use true/false instead of 1/0.
1347 (set_init_label): Likewise.
1348 (output_init_element): Change the type of a parameter to bool.
1349 (output_pending_init_elements): Use true/false instead of 1/0.
1350 (process_init_element): Likewise.
1351 (build_binary_op): Change the type of a parameter to bool.
1352
296c53ac
MP
13532017-08-09 Marek Polacek <polacek@redhat.com>
1354
1355 PR c/81233
1356 * c-typeck.c (pedwarn_init): Make the function take a variable list.
1357 Call emit_diagnostic_valist instead of pedwarn.
1358 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
1359 Print the relevant types in diagnostics.
1360
a32c8316
MP
13612017-08-09 Marek Polacek <polacek@redhat.com>
1362
1363 PR c/81417
1364 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
1365 build_conditional_expr.
1366 * c-parser.c (c_parser_conditional_expression): Create locations for
1367 EXP1 and EXP2 from their source ranges. Pass the locations down to
1368 build_conditional_expr.
1369 * c-tree.h (build_conditional_expr): Update declaration.
1370 * c-typeck.c (build_conditional_expr): Add location_t parameters.
1371 For -Wsign-compare, also print the types.
1372
314e6352
ML
13732017-08-08 Martin Liska <mliska@suse.cz>
1374
1375 * c-convert.c: Include header files.
1376 * c-typeck.c: Likewise.
1377
577eec56
ML
13782017-08-07 Martin Liska <mliska@suse.cz>
1379
1380 * c-parser.c (c_parser_attributes): Canonicalize name of an
1381 attribute.
1382
f7b6353a
MP
13832017-08-02 Marek Polacek <polacek@redhat.com>
1384
1385 PR c/81289
1386 * c-parser.c (c_parser_unary_expression): Use set_error.
1387
8a6eab34
MP
1388 PR c/81448
1389 PR c/81306
1390 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
1391 warnings. Avoid walking MACRO_MAP_LOCATIONS.
1392
7fef86d3
JH
13932017-07-31 Jan Hubicka <hubicka@ucw.cz>
1394 Martin Liska <mliska@suse.cz>
1395
1396 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 1397 statement.
7fef86d3 1398
f34ebeb2
ML
13992017-07-31 Martin Liska <mliska@suse.cz>
1400
1401 PR sanitize/81530
1402 * c-convert.c (convert): Guard condition with flag_sanitize_p
1403 also with current_function_decl non-null equality.
1404 * c-decl.c (grokdeclarator): Likewise.
1405 * c-typeck.c (build_binary_op): Likewise.
1406
8595f67b
MP
14072017-07-25 Marek Polacek <polacek@redhat.com>
1408
1409 * c-decl.c (grokfield): Remove local variable.
1410
d49718d6
MP
14112017-07-25 Marek Polacek <polacek@redhat.com>
1412
1413 PR c/81364
1414 * c-parser.c (c_parser_else_body): Don't warn about multistatement
1415 macro expansion if the body is in { }.
1416 (c_parser_while_statement): Likewise.
1417 (c_parser_for_statement): Likewise.
1418
ff22eb12
NS
14192017-07-18 Nathan Sidwell <nathan@acm.org>
1420
1421 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
1422
eea77d1f
DM
14232017-07-14 David Malcolm <dmalcolm@redhat.com>
1424
1425 * c-decl.c (implicitly_declare): When suggesting a missing
1426 #include, provide a fix-it hint.
1427
b6f43128
DM
14282017-07-06 David Malcolm <dmalcolm@redhat.com>
1429
1430 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
1431 and call that instead.
1432 * c-tree.h (selftest::run_c_tests): New decl.
1433
3e2becc4
MP
14342017-06-26 Marek Polacek <polacek@redhat.com>
1435
1436 PR c/80116
1437 * c-parser.c (c_parser_if_body): Set the location of the
1438 body of the conditional after parsing all the labels. Call
1439 warn_for_multistatement_macros.
1440 (c_parser_else_body): Likewise.
1441 (c_parser_switch_statement): Likewise.
1442 (c_parser_while_statement): Likewise.
1443 (c_parser_for_statement): Likewise.
1444 (c_parser_statement): Add a default argument. Save the location
1445 after labels have been parsed.
1446 (c_parser_c99_block_statement): Likewise.
1447
343ae898
RB
14482017-06-19 Richard Biener <rguenther@suse.de>
1449
1450 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1451 negated _Literals to parse _Literal (int) -1.
1452
45b2222a
ML
14532017-06-13 Martin Liska <mliska@suse.cz>
1454
1455 PR sanitize/78204
1456 * c-convert.c (convert): Use sanitize_flags_p.
1457 * c-decl.c (grokdeclarator): Likewise.
1458 * c-typeck.c (convert_for_assignment): Likewise.
1459 (c_finish_return): Likewise.
1460 (build_binary_op): Likewise.
1461
8ab7005b
JJ
14622017-06-08 Jakub Jelinek <jakub@redhat.com>
1463
1464 PR c/81006
1465 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
1466 to sizetype before size_binop.
1467
363dc72c
JJ
14682017-06-07 Jakub Jelinek <jakub@redhat.com>
1469
1470 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
1471 of TDI_generic.
1472
dc949728
MP
14732017-06-06 Marek Polacek <polacek@redhat.com>
1474
1475 PR c/79983
1476 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
1477 ref.
1478 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
1479
40ffd95f
BE
14802017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1481
1482 * c-parser.c (c_parser_binary_expression): Implement the
1483 -Wsizeof_pointer_div warning.
1484 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
1485 from a parenthesized expression.
1486 (c_parser_expr_list): Use c_last_sizeof_loc.
1487 * c-tree.h (c_last_sizeof_loc): New external.
1488 * c-typeck.c (c_last_sizeof_loc): New variable.
1489 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
1490
9fc5e7a4
MM
14912017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
1492
1493 PR testsuite/80580
1494 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
1495
f012c8ef
DM
14962017-05-30 David Malcolm <dmalcolm@redhat.com>
1497
1498 * c-objc-common.c (c_tree_printer): Gain bool and const char **
1499 parameters.
1500
3cd211af
MS
15012017-05-24 Martin Sebor <msebor@redhat.com>
1502
1503 PR c/80731
1504 * c-fold.c (c_fully_fold_internal): Adjust.
1505 * c-typeck.c (parser_build_unary_op): Adjust.
1506
fd71a9a2
TS
15072017-05-23 Thomas Schwinge <thomas@codesourcery.com>
1508
1509 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
1510 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
1511 "VECTOR_LENGTH".
1512
92fa0f9e
MP
15132017-05-23 Marek Polacek <polacek@redhat.com>
1514
1515 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
1516 quotes.
1517
d11c168a
JJ
15182017-05-22 Jakub Jelinek <jakub@redhat.com>
1519
1520 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
1521 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
1522 it returned invariant. Call tree_invariant_p unconditionally
1523 afterwards to decide whether to return expr or op0.
1524
58aca9d9
NS
15252017-05-22 Nathan Sidwell <nathan@acm.org>
1526
1527 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
1528
7fd549d2
TS
15292017-05-19 Thomas Schwinge <thomas@codesourcery.com>
1530
1531 * c-parser.c (c_parser_omp_clause_default): Handle
1532 "OMP_CLAUSE_DEFAULT_PRESENT".
1533
6ecd2339
BE
15342017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1535
1536 * config-lang.in (gtfiles): Add c-family/c-format.c.
1537
8a57ecff
NS
15382017-05-18 Nathan Sidwell <nathan@acm.org>
1539
1540 * c-decl.c (pushdecl_top_level): Delete unused function.
1541
6574d78e
MP
15422017-05-18 Marek Polacek <polacek@redhat.com>
1543
1544 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
1545 (check_earlier_gotos): Likewise.
1546 (define_label): Likewise.
1547 (pending_xref_error): Likewise.
1548 (smallest_type_quals_location): Likewise.
1549 (grokdeclarator): Likewise.
1550 (grokparms): Likewise.
1551 (identifier_global_value): Likewise.
1552 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
1553 (find_init_member): Likewise.
1554
e3455240
MP
15552017-05-18 Marek Polacek <polacek@redhat.com>
1556
1557 * c-decl.c (start_decl): Use false/true instead of 0/1.
1558 (grokdeclarator): Likewise.
1559 (finish_struct): Likewise.
1560 (start_function): Change the return type to bool. Use false/true
1561 instead of 0/1.
1562 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
1563 * c-tree.h (start_function): Update.
1564 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
1565 (set_designator): Change the return type to bool. Use false/true
1566 instead of 0/1.
1567
3fa8871b
MP
15682017-05-17 Marek Polacek <polacek@redhat.com>
1569
1570 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
1571 * c-typeck.c: Likewise.
1572
142473df
MP
15732017-05-17 Marek Polacek <polacek@redhat.com>
1574
1575 PR sanitizer/80659
1576 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
1577 DECL_IGNORED_P even for non-static compound literals.
1578
1a817418
ML
15792017-05-17 Martin Liska <mliska@suse.cz>
1580
1581 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1582 use it instead of int type.
1583
b2fa0a8b
MP
15842017-05-17 Marek Polacek <polacek@redhat.com>
1585
1586 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
1587 call c_fully_fold.
1588 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
1589 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
1590 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1591 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1592 save_expr.
1593 (c_parser_conditional_expression): Likewise.
1594 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1595 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1596 (process_init_element): Likewise.
1597 (build_binary_op): Likewise.
1598 (handle_omp_array_sections_1): Likewise.
1599
1e47f02b
TS
16002017-05-12 Thomas Schwinge <thomas@codesourcery.com>
1601
1602 * c-parser.c (c_parser_omp_clause_num_gangs)
1603 (c_parser_omp_clause_num_workers)
1604 (c_parser_omp_clause_vector_length): Merge functions into...
1605 (c_parser_oacc_single_int_clause): ... this new function. Adjust
1606 all users.
1607
c24e924f
NS
16082017-05-11 Nathan Sidwell <nathan@acm.org>
1609
1610 * gimple-parser.c: Don't #include tree-dump.h.
1611
c587104e
MM
16122017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1613
1614 PR testsuite/80580
1615 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
1616
67ac9a9d
MM
16172017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1618
1619 PR testsuite/80580
1620 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1621 incorrect __MEM syntax.
1622
ac4eb40f
MM
16232017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1624
1625 PR testsuite/80580
1626 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1627 type of unary '*'.
1628
641da50a
NS
16292017-05-09 Nathan Sidwell <nathan@acm.org>
1630
1631 * c-tree.h (pushdecl): Declare.
1632
56d35585
DM
16332017-05-05 David Malcolm <dmalcolm@redhat.com>
1634
1635 * c-decl.c (warn_defaults_to): Replace report_diagnostic
1636 with diagnostic_report_diagnostic.
1637 * c-errors.c (pedwarn_c99): Likewise.
1638 (pedwarn_c90): Likewise.
1639
815d9cc6
XR
16402017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1641
92a285c1 1642 PR c++/80038
815d9cc6
XR
1643 * c-gimplify.c (c_gimplify_expr): Remove calls to
1644 cilk_gimplifY_call_params_in_spawned_fn.
1645
1c4ea66f
DM
16462017-04-25 David Malcolm <dmalcolm@redhat.com>
1647
1648 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1649 hint for removing extra semicolon.
1650
666f7903
JJ
16512017-04-21 Jakub Jelinek <jakub@redhat.com>
1652
1653 PR c/80468
1654 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
1655 enabled, set specs->type to integer_type_node.
1656
5764ee3c
JW
16572017-04-03 Jonathan Wakely <jwakely@redhat.com>
1658
1659 * c-array-notation.c: Fix typo in comment.
1660
10fa8dfb
MP
16612017-03-29 Marek Polacek <polacek@redhat.com>
1662
1663 PR c/79730
1664 * c-decl.c (finish_decl): Check VAR_P.
1665
a9e4a1a5
JJ
16662017-03-27 Jakub Jelinek <jakub@redhat.com>
1667
1668 PR middle-end/80162
1669 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1670 * c-typeck.c (c_mark_addressable): Likewise. Look through
1671 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1672 to ARRAY_TYPE.
1673 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
1674
ee3ff394
MP
16752017-03-23 Marek Polacek <polacek@redhat.com>
1676
1677 * c-tree.h: Remove a C_RID_YYCODE reference.
1678
4d1b8e70
JJ
16792017-03-21 Jakub Jelinek <jakub@redhat.com>
1680
1681 PR c/80097
1682 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
1683 optional COMPOUND_EXPR with ubsan instrumentation.
1684
31dc71a8
MP
16852017-03-17 Marek Polacek <polacek@redhat.com>
1686
1687 * c-parser.c: Add C11 references.
1688
d579c385
MP
16892017-03-15 Marek Polacek <polacek@redhat.com>
1690
1691 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
1692
85059a38
MP
16932017-03-11 Marek Polacek <polacek@redhat.com>
1694
1695 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
1696
2f6f187a
DM
16972017-03-10 David Malcolm <dmalcolm@redhat.com>
1698
1699 PR translation/79848
1700 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1701 "%qs".
1702 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1703
36618428
MP
17042017-03-09 Marek Polacek <polacek@redhat.com>
1705
1706 PR sanitizer/79757
1707 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1708 parameter declarations with initializers.
1709
01e5af5a
JJ
17102017-03-09 Jakub Jelinek <jakub@redhat.com>
1711
1712 PR c/79969
1713 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
1714 TYPE_STUB_DECL.
1715
a71dbc63
JJ
17162017-03-07 Jakub Jelinek <jakub@redhat.com>
1717
1718 PR c/79834
1719 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1720 for "may only be used in compound statements" diagnostics, change it
1721 such that the same translatable string is used for all pragmas. For
1722 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1723 diagnostics.
1724 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1725 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1726 "may only be used in compound statements" diagnostics, such that the
1727 same translatable string is used for all pragmas.
1728
1ff4bae6
MP
17292017-03-04 Marek Polacek <polacek@redhat.com>
1730
1731 PR c/79847
1732 * c-decl.c (implicit_decl_warning): Add missing space.
1733
7f5a7d78
MP
17342017-03-03 Marek Polacek <polacek@redhat.com>
1735
1736 PR c/79758
1737 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1738 current_function_prototype_arg_types is error_mark_node. Fix
1739 formatting. Use TREE_VALUE instead of TREE_TYPE.
1740
883c8f06
JJ
17412017-03-03 Jakub Jelinek <jakub@redhat.com>
1742
79c9b7a8
JJ
1743 PR c/79837
1744 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1745 %<min%> or %<max%> in the diagnostics, instead mention identifier.
1746 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1747 diagnostics.
1748
883c8f06
JJ
1749 PR c/79836
1750 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1751 instead of %<_Generic>.
1752 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1753 (c_parser_omp_target_exit_data): Use %<release%> instead of
1754 %<release>.
1755
324ff1a0
JJ
17562017-02-28 Jakub Jelinek <jakub@redhat.com>
1757
1758 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1759 instead of just cond ? "..." : "...".
1760 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1761 for "enter"/"exit" keyword.
1762 (c_finish_oacc_routine): Don't use %s to supply portions of the
1763 message.
1764
4227c9ad
JJ
17652017-02-24 Jakub Jelinek <jakub@redhat.com>
1766
1767 PR c++/79588
1768 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1769 handle -Wrestrict here.
1770 * c-typeck.c (build_function_call_vec): Adjust
1771 check_function_arguments caller.
1772
5d972e66
RB
17732017-02-23 Richard Biener <rguenther@suse.de>
1774
1775 PR c/79684
1776 * gimple-parser.c (c_parser_gimple_statement): Use set_error
1777 to initialize c_exprs to return.
1778 (c_parser_gimple_binary_expression): Likewise.
1779 (c_parser_gimple_unary_expression): Likewise.
1780 (c_parser_gimple_postfix_expression): Likewise.
1781
61ac5ebe
MP
17822017-02-22 Marek Polacek <polacek@redhat.com>
1783
1784 PR c/79662
1785 * c-typeck.c (convert_arguments): Handle error_mark_node.
1786
41d1b0b1
PK
17872017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1788
1789 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1790 value of c_parser_parse_ssa_name against error_mark_node and emit
1791 error if ssa name is anonymous and written as default definition.
1792
eab1f169
PK
17932017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1794
1795 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1796 FMA_EXPR.
1797
bcac0b4d
JJ
17982017-02-16 Jakub Jelinek <jakub@redhat.com>
1799
1800 PR c++/79512
1801 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1802 ignore #pragma omp target even when not followed by identifier.
1803
1be33173
PK
18042017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1805
1806 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1807 (c_parser_gimple_unary_expression): Likewise.
1808
aa326bfb
JJ
18092017-02-13 Jakub Jelinek <jakub@redhat.com>
1810
1811 * c-parser.c (c_parser_oacc_declare): Add missing space in
1812 diagnostics.
1813
8a398bc5
PK
18142017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1815
1816 PR c/79478
1817 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1818 set_c_expr_source_range when parsing ssa-name.
1819
3dcde5ef
PG
18202017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
1821 Richard Biener <rguenther@suse.de>
1822
1823 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1824 building IL when arguments are error_mark_node.
1825 (c_parser_gimple_unary_expression): Likewise.
1826 (c_parser_gimple_if_stmt): Likewise.
1827 (c_parser_gimple_switch_stmt): Likewise.
1828 (c_parser_gimple_return_stmt): Likewise.
1829 (c_parser_parse_ssa_name): When name lookup fails do not build
1830 an SSA name. Use undeclared rather than not declared in error
1831 reporting.
1832
192b048b
MP
18332017-02-09 Marek Polacek <polacek@redhat.com>
1834
1835 PR c/79428
1836 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1837 instead of c_parser_skip_until_found.
1838
56f71478
JJ
18392017-02-09 Jakub Jelinek <jakub@redhat.com>
1840
1841 PR c/79431
1842 * c-parser.c (c_parser_omp_declare_target): Don't invoke
1843 symtab_node::get on automatic variables.
1844
02889d23
CLT
18452016-02-09 Nathan Sidwell <nathan@codesourcery.com>
1846 Chung-Lin Tang <cltang@codesourcery.com>
1847
1848 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1849 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1850 semantic checking.
1851 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1852
7af4b20d
RB
18532017-02-07 Richard Biener <rguenther@suse.de>
1854
1855 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1856 (c_parser_gimple_postfix_expression_after_primary):
1857 Do not use c_build_function_call_vec to avoid folding and promotion.
1858 Simplify.
1859
e5e391d6
MO
18602017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1861
1862 PR lto/79061
1863 * c-decl.c (pop_scope): Pass main_input_filename to
1864 build_translation_unit_decl.
1865
c2e84327
DM
18662017-01-24 David Malcolm <dmalcolm@redhat.com>
1867
1868 * c-parser.c: Include "read-rtl-function.h" and
1869 "run-rtl-passes.h".
1870 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
1871 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
1872 production. Update for renaming of field "gimple_pass" to
1873 "gimple_or_rtl_pass". If __RTL was seen, call
1874 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
1875 to an auto_timevar, to cope with early exit.
1876 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1877 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1878 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1879 Handle RID_RTL.
1880 (c_parser_parse_rtl_body): New function.
1881 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1882 (struct c_declspecs): Rename field "gimple_pass" to
1883 "gimple_or_rtl_pass". Add field "rtl_p".
1884 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1885 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1886 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1887 (c_parser_gimple_or_rtl_pass_list): ...this.
1888
2ebd93e1
MP
18892017-01-20 Marek Polacek <polacek@redhat.com>
1890
1891 PR c/64279
1892 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1893
b1c95bb5
RB
18942017-01-13 Richard Biener <rguenther@suse.de>
1895
1896 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1897 nops.
1898
25329913
RB
18992017-01-13 Richard Biener <rguenther@suse.de>
1900
1901 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1902 _Literal ( type-name ) number.
1903
6bb4ea5c
RB
19042017-01-12 Richard Biener <rguenther@suse.de>
1905
1906 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1907 __MEM.
1908
6b5b4e9c
JJ
19092017-01-11 Jakub Jelinek <jakub@redhat.com>
1910
1911 PR c++/72813
1912 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
1913 PCH file.
1914
e3252775
RB
19152017-01-11 Richard Biener <rguenther@suse.de>
1916
1917 PR bootstrap/79052
1918 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
1919 returns on parse errors.
1920
a9342885
MP
19212017-01-04 Marek Polacek <polacek@redhat.com>
1922
1923 PR c++/64767
1924 * c-parser.c (c_parser_postfix_expression): Mark zero character
1925 constants by setting original_type in c_expr.
1926 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
1927 with a zero character constant.
1928 (char_type_p): New function.
1929
5dd9a9d0
DM
19302017-01-04 David Malcolm <dmalcolm@redhat.com>
1931
1932 * c-parser.c (c_parser_declaration_or_fndef): Create a
1933 rich_location at init_loc and parse it to start_init.
1934 (last_init_list_comma): New global.
1935 (c_parser_braced_init): Update last_init_list_comma when parsing
1936 commas. Pass it to pop_init_level. Pass location of closing
1937 brace to pop_init_level.
1938 (c_parser_postfix_expression_after_paren_type): Create a
1939 rich_location at type_loc and parse it to start_init.
1940 (c_parser_omp_declare_reduction): Likewise for loc.
1941 * c-tree.h (start_init): Add rich_location * param.
1942 (pop_init_level): Add location_t param.
1943 * c-typeck.c (struct initializer_stack): Add field
1944 "missing_brace_richloc".
1945 (start_init): Add richloc param, use it to initialize
1946 the stack node's missing_brace_richloc.
1947 (last_init_list_comma): New decl.
1948 (finish_implicit_inits): Pass last_init_list_comma to
1949 pop_init_level.
1950 (push_init_level): When finding missing open braces, add fix-it
1951 hints to the richloc.
1952 (pop_init_level): Add "insert_before" param and pass it
1953 when calling pop_init_level. Add fixits about missing
1954 close braces to any richloc. Use the richloc for the
1955 -Wmissing-braces warning.
1956 (set_designator): Pass last_init_list_comma to pop_init_level.
1957 (process_init_element): Likewise.
1958
cbe34bb5
JJ
19592017-01-01 Jakub Jelinek <jakub@redhat.com>
1960
1961 Update copyright years.
1962
d17680f3
JJ
19632016-12-21 Jakub Jelinek <jakub@redhat.com>
1964
0dba7960
JJ
1965 PR bootstrap/78817
1966 * c-typeck.c (build_function_call_vec): If check_function_arguments
1967 returns true, set TREE_NO_WARNING on CALL_EXPR.
1968
d17680f3
JJ
1969 PR c/77767
1970 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
1971 to *expr instead of overwriting it.
1972
aa90531e
RB
19732016-12-20 Richard Biener <rguenther@suse.de>
1974
1975 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
1976 error recovery.
1977 (c_parser_gimple_statement): Only build assigns for non-error
1978 stmts.
1979 (c_parser_gimple_postfix_expression_after): Improve error recovery.
1980
629b3d75
MJ
19812016-12-14 Martin Jambor <mjambor@suse.cz>
1982
1983 * c-parser.c: Include omp-general.h and omp-offload.h instead of
1984 omp-low.h.
1985 (c_finish_oacc_routine): Adjusted call to
1986 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
1987 to use their new names.
1988 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
1989 use its new name.
1990 (c_parser_oacc_update): Likewise.
1991 (c_parser_omp_simd): Likewise.
1992 (c_parser_omp_target_update): Likewise.
1993 * c-typeck.c: Include omp-general.h instead of omp-low.h.
1994 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
1995 name.
1996 (c_finish_omp_cancellation_point): Likewise.
1997 * gimple-parser.c: Do not include omp-low.h
1998
c5af52eb
CP
19992016-12-02 Cesar Philippidis <cesar@codesourcery.com>
2000 James Norris <jnorris@codesourcery.com>
2001
2002 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
2003 EXIT_DATA,WAIT} are not used in compound statements.
2004 (c_parser_oacc_enter_exit_data): Update diagnostics.
2005
48330c93
BE
20062016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2007
2008 PR c++/71973
2009 * c-decl.c (diagnose_mismatched_decls): Use
2010 OPT_Wbuiltin_declaration_mismatch here too.
2011
899ca90e 20122016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
2013 Alan Hayward <alan.hayward@arm.com>
2014 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
2015
2016 * c-decl.c (merge_decls): Use SET_DECL_MODE.
2017 (make_label, finish_struct): Likewise.
2018
1ee62b92 20192016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 2020 Richard Biener <rguenther@suse.de>
22b15758 2021
8e745a17
JJ
2022 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
2023 * config-lang.in (gtfiles): Add c/c-parser.h.
2024 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
2025 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
2026 * c-parser.c (enum c_id_kind, struct c_token,
2027 c_parser_next_token_is, c_parser_next_token_is_not,
2028 c_parser_next_token_is_keyword,
2029 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
2030 Split out to ...
2031 * c-parser.h: ... new header.
2032 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 2033 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
2034 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2035 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2036 c_parser_error, c_parser_require, c_parser_skip_until_found,
2037 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2038 c_parser_type_name): Export.
2039 (c_parser_tokens_buf): New function.
2040 (c_parser_error): Likewise.
2041 (c_parser_set_error): Likewise.
2042 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
2043 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
2044 via c_parser_parse_gimple_body.
8e745a17
JJ
2045 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
2046 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2047 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2048 c_parser_error, c_parser_require, c_parser_skip_until_found,
2049 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2050 c_parser_type_name): Declare.
1ee62b92
PG
2051 (struct c_parser): Declare forward.
2052 (c_parser_tokens_buf): Declare.
8e745a17
JJ
2053 (c_parser_error): Likewise.
2054 (c_parser_set_error): Likewise.
2055 * gimple-parser.c: New file.
2056 * gimple-parser.h: Likewise.
1ee62b92 2057
22b15758
UB
20582016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2059
2060 PR c/35503
2061 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2062 warn_for_restrict.
2063
84ff4775
LCW
20642016-09-11 Le-Chun Wu <lcwu@google.com>
2065 Mark Wielaard <mjw@redhat.com>
2066
2067 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
2068 to the given -Wshadow= variant.
2069
4d0cdd0c
TP
20702016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2071
2072 * c-typeck.c: Include memmodel.h.
2073
1202f33e
JJ
20742016-10-13 Jakub Jelinek <jakub@redhat.com>
2075
2076 PR target/77957
2077 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
2078 instead of lhd_return_null_tree_v.
2079
8a14afd0
BS
20802016-10-07 Bernd Schmidt <bschmidt@redhat.com>
2081
2082 PR c++/69733
2083 * c-decl.c (smallest_type_quals_location): New static function.
2084 (grokdeclarator): Try to find the correct location for an ignored
2085 qualifier.
2086
81fea426
MP
20872016-09-26 Marek Polacek <polacek@redhat.com>
2088
2089 PR c/7652
2090 * c-decl.c (pop_scope): Add gcc_fallthrough.
2091
20922016-09-26 Marek Polacek <polacek@redhat.com>
2093
2094 PR c/7652
2095 * c-parser.c (struct c_token): Add flags field.
2096 (c_lex_one_token): Pass it to c_lex_with_flags.
2097 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
2098 into IFN_FALLTHROUGH.
2099 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
2100 attribute fallthrough after a case label or default label.
2101 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
2102
9a2300e9
MP
21032016-09-24 Marek Polacek <polacek@redhat.com>
2104
2105 PR c/77490
2106 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
2107 have boolean value. Warn about ++/-- on booleans.
2108
7de76362
JJ
21092016-09-23 Jakub Jelinek <jakub@redhat.com>
2110
2111 * c-parser.c (incomplete_record_decls): Remove unnecessary
2112 = vNULL initialization of file scope vec.
2113
5b73d2ab
MP
21142016-09-16 Marek Polacek <polacek@redhat.com>
2115
2116 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
2117
e51fbec3
MP
21182016-09-14 Marek Polacek <polacek@redhat.com>
2119
2120 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
2121 (fix_array_notation_expr): Likewise.
2122 * c-decl.c (finish_decl): Likewise.
2123 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2124 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
2125 (function_to_pointer_conversion): Use false instead of 0.
2126 (convert_lvalue_to_rvalue): Likewise.
2127 (parser_build_unary_op): Likewise.
2128 (build_atomic_assign): Likewise.
2129 (build_unary_op): Change nonconvert parameter type to bool, use
2130 true/false instead of 1/0.
2131 (build_binary_op): Use true instead of 1.
2132
254830ba
DM
21332016-09-13 David Malcolm <dmalcolm@redhat.com>
2134
2135 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
2136 of add_fixit_insert to add_fixit_insert_before.
2137
4c13ba17
MP
21382016-09-13 Marek Polacek <polacek@redhat.com>
2139
2140 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
2141 it.
2142
54dcdb88
BE
21432016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
2144
2145 PR c++/77496
2146 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
2147 COMPOUND_EXPR to warn_for_omitted_condop.
2148
e5106e27
DM
21492016-09-07 David Malcolm <dmalcolm@redhat.com>
2150
2151 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
2152 c_get_substring_location for this new langhook.
2153
9dc5773f
JJ
21542016-09-02 Jakub Jelinek <jakub@redhat.com>
2155
2156 PR c/65467
2157 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
2158 flag_openmp.
2159 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
2160 instead of mark_exp_read on low_bound/length expression.
2161 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
2162 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2163 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2164 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
2165 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
2166 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
2167 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
2168 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
2169 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
2170 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
2171 instead of mark_expr_read.
2172 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
2173 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
2174 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
2175 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
2176 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
2177 array section bases outside of depend clause, for depend clause
2178 use convert_lvalue_to_rvalue on the base.
2179 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
2180 linear, aligned, map, to and from clauses.
2181 (c_omp_clause_copy_ctor): New function.
2182
295844f6
MP
21832016-09-01 Marek Polacek <polacek@redhat.com>
2184
2185 PR c/7652
2186 * c-typeck.c (composite_type): Add FALLTHRU comment.
2187
089af25c
DM
21882016-08-31 David Malcolm <dmalcolm@redhat.com>
2189
2190 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
2191 to the insertion fixits for "struct", "union", and "enum".
2192
f9087798
DM
21932016-08-30 David Malcolm <dmalcolm@redhat.com>
2194
2195 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
2196 rather than add_fixit_misspelled_id.
2197 (undeclared_variable): Likewise.
2198 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
2199 now-redundant "here" params from add_fixit_insert method calls.
2200 (c_parser_parameter_declaration): Likewise.
2201 * c-typeck.c (build_component_ref): Remove now-redundant range
2202 param from add_fixit_replace method calls.
2203
ebef225f
MP
22042016-08-25 Marek Polacek <polacek@redhat.com>
2205
2206 * c-typeck.c (parser_build_binary_op): Pass LHS to
2207 warn_logical_not_parentheses.
2208
fe377a48
MP
22092016-08-25 Marek Polacek <polacek@redhat.com>
2210
2211 PR c/77323
2212 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
2213 or _FloatN or _FloatNx is not supported.
2214 (finish_declspecs): Set type to integer_type_node when _FloatN or
2215 _FloatNx is not supported.
2216
c65699ef
JM
22172016-08-19 Joseph Myers <joseph@codesourcery.com>
2218
2219 PR c/32187
2220 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
2221 (struct c_declspecs): Add field floatn_nx_idx.
2222 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
2223 and _FloatNx type specifiers.
2224 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
2225 (c_parser_declspecs, c_parser_attribute_any_word)
2226 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
2227 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
2228 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
2229 narrower than double.
2230
2f1364c2
JJ
22312016-08-12 Jakub Jelinek <jakub@redhat.com>
2232 Martin Liska <mliska@suse.cz>
2233
2234 PR c/67410
2235 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
2236 % to determine val element to change. Assert that
2237 wchar_bytes * charwidth fits into val array.
2238
191816a3
MP
22392016-08-12 Marek Polacek <polacek@redhat.com>
2240
2241 PR c/7652
2242 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
2243 (c_parser_postfix_expression): Likewise.
2244 * c-typeck.c (build_unary_op): Adjust fall through comment.
2245 (c_mark_addressable): Likewise.
2246
b95a64bb
JJ
22472016-08-11 Jakub Jelinek <jakub@redhat.com>
2248
2249 PR c/72816
2250 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
2251 array member through typedef, for orig_qual_indirect == 0 clear
2252 orig_qual_type.
2253
895aa8e1
DM
22542016-08-08 David Malcolm <dmalcolm@redhat.com>
2255
2256 PR c/64955
2257 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
2258 this up to selftest::run_c_tests.
2259 (selftest::run_c_tests): New function.
2260
0b212d8c
TS
22612016-08-04 Thomas Schwinge <thomas@codesourcery.com>
2262
ae9281fc
TS
2263 * c-parser.c (struct oacc_routine_data): Add error_seen and
2264 fndecl_seen members.
2265 (c_finish_oacc_routine): Use these.
2266 (c_parser_declaration_or_fndef): Adjust.
2267 (c_parser_oacc_routine): Likewise. Support more C language
2268 constructs, and improve diagnostics. Move pragma context
2269 checking...
2270 (c_parser_pragma): ... here.
2271
0b212d8c
TS
2272 * c-parser.c (struct oacc_routine_data): New.
2273 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
2274 Simplify code.
2275 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
2276 declare target" attribute.
2277
76e2c821
JB
22782016-08-01 Jan Beulich <jbeulich@suse.com>
2279
2280 * c-fold.c (c_fully_fold_internal): Also emit shift count
2281 warnings for vector types.
2282 * c-typeck.c (build_binary_op): Likewise.
2283
f618a472
MP
22842016-07-29 Marek Polacek <polacek@redhat.com>
2285
2286 PR c/71742
2287 * c-decl.c (finish_struct): Rephrase an error message.
2288
efd0786f
MP
2289 PR c/71853
2290 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
2291 to error node for invalid code.
2292
e00dceaf
MP
2293 PR c/71573
2294 * c-decl.c (implicitly_declare): Return decl early not only for
2295 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
2296
673a107a
JJ
22972016-07-29 Jakub Jelinek <jakub@redhat.com>
2298
2299 PR c/71969
2300 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
2301 on GNU extern inline functions.
2302
a5b5c8b6
MP
23032016-07-29 Marek Polacek <polacek@redhat.com>
2304
2305 PR c/71583
2306 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
2307 check expr.value.
2308
e3fe09c1
UB
23092016-07-22 Uros Bizjak <ubizjak@gmail.com>
2310
2311 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
2312
7c8f7eaa
DM
23132016-07-20 David Malcolm <dmalcolm@redhat.com>
2314
2315 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
2316 spellcheck-tree.h
2317 (best_macro_match): Likewise, converting from a typedef to a
2318 subclass.
2319 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
2320 (lookup_name_fuzzy): Update for change of best_macro_match to a
2321 subclass with a ctor that calls cpp_forall_identifiers.
2322
de6a69ee
DM
23232016-07-20 David Malcolm <dmalcolm@redhat.com>
2324
2325 * c-decl.c (implicit_decl_warning): Update for conversion of
2326 return type of lookup_name_fuzzy to const char *.
2327 (undeclared_variable): Likewise.
2328 (lookup_name_fuzzy): Convert return type from tree to
2329 const char *.
2330 * c-parser.c (c_parser_declaration_or_fndef): Update for
2331 conversion of return type of lookup_name_fuzzy to const char *.
2332 (c_parser_parameter_declaration): Likewise.
2333
b1c9c068
CP
23342016-07-15 Cesar Philippidis <cesar@codesourcery.com>
2335
2336 * c-parser.c (c_parser_oacc_declare): Don't scan for
2337 GOMP_MAP_POINTER.
2338 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
2339 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
2340 zero-length subarrays.
2341
ddbbcb19
JJ
23422016-07-15 Jakub Jelinek <jakub@redhat.com>
2343
2344 PR c/71858
2345 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
2346 instead of FUZZY_LOOKUP_NAME.
2347 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
2348 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
2349
dd36b877
JJ
23502016-07-14 Jakub Jelinek <jakub@redhat.com>
2351
2352 PR c/71858
2353 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
2354
8c681247
TS
23552016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2356
2357 * c-parser.c (c_parser_generic_selection): Make type of variable
2358 auto_vec.
2359 (c_parser_omp_declare_simd): Likewise.
2360
bf4fa671
TS
23612016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2362
2363 * c-decl.c (struct c_struct_parse_info): Change member types
2364 from vec to auto_vec.
2365 (start_struct): Adjust.
2366 (finish_struct): Likewise.
2367
557e8c49
JJ
23682016-07-02 Jakub Jelinek <jakub@redhat.com>
2369
2370 PR c/71719
2371 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
2372
54d19c3b
TS
23732016-06-29 Thomas Schwinge <thomas@codesourcery.com>
2374
2375 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
2376 Move pragma context checking into...
2377 (c_parser_omp_cancellation_point): ... here, and improve
2378 diagnostic messages.
2379 * c-typeck.c (c_finish_omp_cancel)
2380 (c_finish_omp_cancellation_point): Improve diagnostic messages.
2381
152ef731
JJ
23822016-06-29 Jakub Jelinek <jakub@redhat.com>
2383
2384 PR c/71685
2385 * c-typeck.c (c_build_qualified_type): Don't clear
2386 C_TYPE_INCOMPLETE_VARS for the main variant.
2387
23882016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
2389
2390 PR c/71552
2391 * c-typeck.c (output_init_element): Diagnose incompatible types
2392 before non-constant initializers.
2393
e9ac1f86
JJ
23942016-06-28 Jakub Jelinek <jakub@redhat.com>
2395
2396 * Make-lang.in: Don't cat ../stage_current if it does not exist.
2397
277d7ee0
AK
23982016-06-23 Andi Kleen <ak@linux.intel.com>
2399
2400 * Make-lang.in: Add support for autofdo.
2401
1a4f11c8
DM
24022016-06-22 David Malcolm <dmalcolm@redhat.com>
2403
2404 PR c/70339
2405 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
2406 (implicit_decl_warning): When issuing warnings for implicit
2407 declarations, attempt to provide a suggestion via
2408 lookup_name_fuzzy.
2409 (undeclared_variable): Likewise when issuing errors.
2410 (lookup_name_in_scope): Likewise.
2411 (struct edit_distance_traits<cpp_hashnode *>): New struct.
2412 (best_macro_match): New typedef.
2413 (find_closest_macro_cpp_cb): New function.
2414 (lookup_name_fuzzy): New function.
2415 * c-parser.c: Include gcc-rich-location.h.
2416 (c_token_starts_typename): Split out case CPP_KEYWORD into...
2417 (c_keyword_starts_typename): ...this new function.
2418 (c_parser_declaration_or_fndef): When issuing errors about
2419 missing "struct" etc, add a fixit. For other kinds of errors,
2420 attempt to provide a suggestion via lookup_name_fuzzy.
2421 (c_parser_parms_declarator): When looking ahead to detect typos in
2422 type names, also reject CPP_KEYWORD.
2423 (c_parser_parameter_declaration): When issuing errors about
2424 unknown type names, attempt to provide a suggestion via
2425 lookup_name_fuzzy.
2426 * c-tree.h (c_keyword_starts_typename): New prototype.
2427
5a578671
JM
24282016-06-20 Joseph Myers <joseph@codesourcery.com>
2429
2430 PR c/71601
2431 * c-typeck.c (build_conditional_expr): Return error_mark_node if
2432 c_common_type returns error_mark_node.
2433
3f8257db 24342016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
2435
2436 PR c/69507
2437 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
2438 __alignof__ (expression).
2439
6a3f203c
DM
24402016-06-14 David Malcolm <dmalcolm@redhat.com>
2441
2442 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
2443
264757fb
DM
24442016-06-14 David Malcolm <dmalcolm@redhat.com>
2445
2446 * c-typeck.c (build_component_ref): Simplify fixit code by
2447 using gcc_rich_location::add_fixit_misspelled_id.
2448 (set_init_label): Likewise.
2449
f7e4f2e3
DM
24502016-06-13 David Malcolm <dmalcolm@redhat.com>
2451
2452 * c-parser.c (c_parser_initelt): Provide location of name for new
2453 location_t param of set_init_label.
2454 * c-tree.h (set_init_label): Add location_t param.
2455 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
2456 param and use it when issuing error messages about unrecognized
2457 field names. Attempt to provide a fixit hint if appropriate,
2458 otherwise update the error message to provide the type name.
2459
4b1ffdb1
TS
24602016-06-10 Thomas Schwinge <thomas@codesourcery.com>
2461
2462 PR c/71381
2463 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
2464 Loosen checking.
2465
44a845ca
MS
24662016-06-08 Martin Sebor <msebor@redhat.com>
2467 Jakub Jelinek <jakub@redhat.com>
2468
2469 PR c++/70507
2470 PR c/68120
2471 * c-typeck.c (convert_arguments): Don't promote last argument
2472 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2473
92a5f2ba
MP
24742016-06-08 Marek Polacek <polacek@redhat.com>
2475
2476 PR c/71418
2477 * c-decl.c (grokdeclarator): Check TYPE_P.
2478
08203f73
MP
2479 PR c/71426
2480 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
2481 code.
2482
6ffd47b7
DM
24832016-06-07 David Malcolm <dmalcolm@redhat.com>
2484
2485 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
2486 and structure element reference, capture the location of the
2487 element name token and pass it to build_component_ref.
2488 (c_parser_postfix_expression_after_primary): Likewise for
2489 structure element dereference.
2490 (c_parser_omp_variable_list): Likewise for
2491 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
2492 * c-tree.h (build_component_ref): Add location_t param.
2493 * c-typeck.c (build_component_ref): Add location_t param
2494 COMPONENT_LOC. Use it, if available, when issuing hints about
2495 mispelled member names to provide a fixit replacement hint.
2496
1f40cff3
MP
24972016-06-06 Marek Polacek <polacek@redhat.com>
2498
2499 PR c/71362
2500 * c-parser.c (c_parser_direct_declarator): Set location.
2501
5545a907
MP
25022016-06-06 Marek Polacek <polacek@redhat.com>
2503
2504 * c-typeck.c (comptypes_internal): Handle comparisons of
2505 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
2506 TYPE_REF_CAN_ALIAS_ALL.
2507
b605f663
CLT
25082016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
2509
2510 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
2511 arguments as addressable when async clause exists.
2512
00631022
JJ
25132016-05-30 Jakub Jelinek <jakub@redhat.com>
2514
2515 PR c++/71349
2516 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
2517 when combined with target construct.
2518
7211a097
JJ
25192016-05-26 Jakub Jelinek <jakub@redhat.com>
2520
2521 * c-parser.c (c_parser_omp_clause_schedule): Warn if
2522 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
2523
95efe6b6
MP
25242016-05-25 Marek Polacek <polacek@redhat.com>
2525
2526 PR c/71265
2527 * c-decl.c (c_make_fname_decl): Don't check seen_error.
2528
a23faf7a
MP
2529 PR c/71266
2530 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
2531
e46c7770
CP
25322016-05-24 Cesar Philippidis <cesar@codesourcery.com>
2533
2534 * c-parser.c (c_parser_oacc_declare): Add support for
2535 GOMP_MAP_FIRSTPRIVATE_POINTER.
2536 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
2537 argument with enum c_omp_region_type ort.
2538 (handle_omp_array_sections): Likewise. Update call to
2539 handle_omp_array_sections_1.
2540 (c_finish_omp_clauses): Add specific errors and warning messages for
2541 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
2542 call to handle_omp_array_sections.
2543
a04e69c0
TS
25442016-05-24 Thomas Schwinge <thomas@codesourcery.com>
2545
2546 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
2547
f17a223d
RB
25482016-05-24 Richard Biener <rguenther@suse.de>
2549
2550 PR middle-end/70434
2551 PR c/69504
2552 * c-typeck.c (build_array_ref): Do not complain about indexing
2553 non-lvalue vectors. Adjust for function name change.
2554
79063edd
MS
25552016-05-20 Martin Sebor <msebor@redhat.com>
2556
2557 PR c/71115
2558 * c-typeck.c (error_init): Use
2559 expansion_point_location_if_in_system_header.
2560 (warning_init): Same.
2561
8a40fef3
DM
25622016-05-19 David Malcolm <dmalcolm@redhat.com>
2563
2564 PR c/71171
2565 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
2566 in error-handling.
2567 (c_parser_postfix_expression): Likewise.
2568 * c-tree.h (c_expr::set_error): New method.
2569 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
2570 that result's range is initialized.
2571
e9892350
JG
25722016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
2573
2574 * c-typeck.c (parser_build_unary_op): Fix formatting.
2575
8fad45f5
MW
25762016-05-16 Matthew Wahab <matthew.wahab@arm.com>
2577
2578 * c-decl.c (grokdeclarator): Remove errmsg and use of
2579 targetm.invalid_return_type.
2580 (grokparms): Remove errmsg and use of
2581 targetm.invalid_parameter_type.
2582
aa4b467b
JM
25832016-05-13 Joseph Myers <joseph@codesourcery.com>
2584
2585 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2586 function return type.
2587
4f2e1536
MP
25882016-05-12 Marek Polacek <polacek@redhat.com>
2589
2590 PR c/70756
2591 * c-decl.c (build_compound_literal): Pass LOC down to
2592 c_incomplete_type_error.
2593 * c-tree.h (require_complete_type): Adjust declaration.
2594 (c_incomplete_type_error): Likewise.
2595 * c-typeck.c (require_complete_type): Add location parameter, pass it
2596 down to c_incomplete_type_error.
2597 (c_incomplete_type_error): Add location parameter, pass it down to
2598 error_at.
2599 (build_component_ref): Pass location down to c_incomplete_type_error.
2600 (default_conversion): Pass location down to require_complete_type.
2601 (build_array_ref): Likewise.
2602 (build_function_call_vec): Likewise.
2603 (convert_arguments): Likewise.
2604 (build_unary_op): Likewise.
2605 (build_c_cast): Likewise.
2606 (build_modify_expr): Likewise.
2607 (convert_for_assignment): Likewise.
2608 (c_finish_omp_clauses): Likewise.
2609
d6e83a8d
MM
26102016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2611
2612 PR c/43651
2613 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
2614 is enabled.
2615 * c-errors.c (pedwarn_c90): Return true if warned.
2616 * c-tree.h (pedwarn_c90): Change return type to bool.
2617 (enum c_declspec_word): Add new enumerator cdw_atomic.
2618
5c3a10fb
MP
26192016-05-11 Marek Polacek <polacek@redhat.com>
2620
2621 PR c++/71024
2622 * c-decl.c (diagnose_mismatched_decls): Factor out code to
2623 diagnose_mismatched_attributes and call it.
2624
cf68d92c
MP
26252016-05-10 Marek Polacek <polacek@redhat.com>
2626
2627 PR c/70255
2628 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2629 on a declaration following the definition.
2630
351f85c5
JJ
26312016-05-05 Jakub Jelinek <jakub@redhat.com>
2632
2633 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2634 parse it through to c_parser_c99_block_statement.
2635 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2636 caller.
2637
deef7113
MP
26382016-05-04 Marek Polacek <polacek@redhat.com>
2639
2640 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2641 OPT_Wdangling_else.
2642
de55efd5
MP
26432016-05-04 Marek Polacek <polacek@redhat.com>
2644
2645 PR c/48778
2646 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2647 for macro expansions.
2648
79ce98bc
MP
26492016-05-03 Marek Polacek <polacek@redhat.com>
2650
2651 PR c/70859
2652 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
2653 check_builtin_function_arguments.
2654
fb2647aa
RB
26552016-05-03 Richard Biener <rguenther@suse.de>
2656
2657 * Make-lang.in (cc1-checksum.c): For stage-final re-use
2658 the checksum from the previous stage.
2659
77886428
CP
26602016-05-02 Cesar Philippidis <cesar@codesourcery.com>
2661
2662 * c-parser.c (c_parser_oacc_all_clauses): Update call to
2663 c_finish_omp_clauses.
2664 (c_parser_omp_all_clauses): Likewise.
2665 (c_parser_oacc_cache): Likewise.
2666 (c_parser_oacc_loop): Likewise.
2667 (omp_split_clauses): Likewise.
2668 (c_parser_omp_declare_target): Likewise.
2669 (c_parser_cilk_all_clauses): Likewise.
2670 (c_parser_cilk_for): Likewise.
2671 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
2672 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2673
7176a4a0
MP
26742016-05-02 Marek Polacek <polacek@redhat.com>
2675
2676 PR c/70851
2677 * c-decl.c (grokdeclarator): Diagnose when array's size has an
2678 incomplete type.
2679
e7ff0319
CP
26802016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2681
2682 PR middle-end/70626
2683 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
2684 OACC_LOOP_CLAUSE_MASK.
2685 (c_parser_oacc_kernels_parallel): Update call to
2686 c_oacc_split_loop_clauses.
2687
9f405ce1
AM
26882016-04-28 Andrew MacLeod <amacleod@redhat.com>
2689
2690 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
2691 argument to build_modify_expr in two cases.
2692
c1e1f433
BS
26932016-04-27 Bernd Schmidt <bschmidt@redhat.com>
2694
2695 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2696 warn_for_memset instead of warning directly here.
2697
2448a956
MP
26982016-04-26 Marek Polacek <polacek@redhat.com>
2699
2700 PR c/67784
2701 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2702 out of ...
2703 (c_parser_for_statement): ... here.
2704 (c_parser_if_statement): Use it.
2705 (c_parser_switch_statement): Use it.
2706 (c_parser_while_statement): Use it.
2707
b02a5e26
MP
2708 PR c/70791
2709 * c-decl.c (pushdecl): Pass LOCUS down to warning.
2710
477d4906
IV
27112016-04-20 Ilya Verbin <ilya.verbin@intel.com>
2712
2713 PR c++/69363
2714 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2715 instead of c_finish_cilk_clauses.
2716 * c-tree.h (c_finish_omp_clauses): Add new default argument.
2717 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
2718 floating-point variables in the linear clause for Cilk Plus.
2719
fe37c7af
MM
27202016-04-18 Michael Matz <matz@suse.de>
2721
2722 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2723 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2724
949505a9
MP
27252016-04-15 Marek Polacek <polacek@redhat.com>
2726
2727 PR c/70671
2728 * c-typeck.c (build_unary_op): Pass location down to error and
2729 warning call.
2730
dda1bf61
JJ
27312016-04-15 Jakub Jelinek <jakub@redhat.com>
2732
2733 PR c/70436
2734 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2735 where needed.
2736 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2737 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2738 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2739 Adjust c_parser_pragma callers.
2740 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
2741 caller.
2742 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2743 c_parser_statement.
2744 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2745 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2746 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2747 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2748 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2749 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2750 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2751 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2752 down where needed.
2753 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
2754 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2755 calls.
2756
99cd9857
MP
27572016-04-13 Marek Polacek <polacek@redhat.com>
2758
2759 PR c/70436
2760 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2761 adjust callers.
2762 (c_parser_statement): Likewise.
2763 (c_parser_c99_block_statement): Likewise.
2764 (c_parser_while_statement): Likewise.
2765 (c_parser_for_statement): Likewise.
2766 (c_parser_if_body): Don't set IF_P here.
2767 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
2768 about dangling else here.
2769 * c-tree.h (c_finish_if_stmt): Adjust declaration.
2770 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
2771 warn about dangling else here.
2772
f13355da
MP
27732016-04-04 Marek Polacek <polacek@redhat.com>
2774
2775 PR c/70307
2776 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2777
5fde6a45
MP
27782016-03-31 Marek Polacek <polacek@redhat.com>
2779
2780 PR c/70297
2781 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2782
4bbf545b
DM
27832016-03-18 David Malcolm <dmalcolm@redhat.com>
2784
2785 PR c/70281
2786 * c-parser.c (c_parser_postfix_expression): Set the source range
2787 for uses of "__builtin_types_compatible_p".
2788
fcc2b74f
JJ
27892016-03-17 Jakub Jelinek <jakub@redhat.com>
2790
2791 PR c/70280
2792 * c-typeck.c (composite_type): Don't count void_list_node
2793 into len, if the list is terminated by void_list_node, start
2794 with void_list_node instead of NULL for newargs. Stop
2795 at void_list_node.
2796
ab4c578f
MP
27972016-03-16 Marek Polacek <polacek@redhat.com>
2798
2799 PR c/70093
2800 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2801 nested functions returning VM types.
2802
96b3c82d
CP
28032016-03-09 Cesar Philippidis <cesar@codesourcery.com>
2804
2805 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2806 when calling c_finish_omp_clauses.
2807
29b9828f
BS
28082016-03-04 Bernd Schmidt <bschmidt@redhat.com>
2809
2810 PR c/69824
2811 * c-decl.c (get_parm_info): Don't queue implicit function declarations
2812 for later.
2813
7ff6ca38
MP
28142016-03-04 Marek Polacek <polacek@redhat.com>
2815
2816 PR c/69798
2817 * c-parser.c (c_parser_postfix_expression): Call
2818 c_parser_cast_expression rather than c_parser_postfix_expression.
2819
686e2237
JJ
28202016-03-01 Jakub Jelinek <jakub@redhat.com>
2821
2822 PR c/69796
2823 PR c/69974
2824 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2825 of incomplete decls to error_mark_node.
2826
0b05329b
MP
28272016-02-24 Marek Polacek <polacek@redhat.com>
2828
2829 PR c/69819
2830 * c-decl.c (finish_decl): Don't update the copy of the type of a
2831 different decl type.
2832
067fbd8b
JJ
28332016-02-23 Jakub Jelinek <jakub@redhat.com>
2834
2835 PR objc/69844
2836 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2837 in id_kind reclassification.
2838
bf14eba2
JJ
28392016-02-16 Jakub Jelinek <jakub@redhat.com>
2840
2841 PR c/69835
2842 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2843
ba539195
JN
28442016-02-16 James Norris <jnorris@codesourcery.com>
2845
2846 PR c/64748
2847 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2848
16595a1f
BS
28492016-02-12 Bernd Schmidt <bschmidt@redhat.com>
2850
f48dfe98
BS
2851 * c-decl.c (build_null_declspecs): Zero the entire struct.
2852
16595a1f
BS
2853 PR c/69522
2854 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
2855 callers changed. If nested_p is true, use it to call
2856 finish_implicit_inits.
2857 * c-tree.h (finish_implicit_inits): Declare.
2858 * c-typeck.c (finish_implicit_inits): New function. Move code
2859 from ...
2860 (push_init_level): ... here.
2861 (set_designator, process_init_element): Call finish_implicit_inits.
2862
66756373
JJ
28632016-02-11 Jakub Jelinek <jakub@redhat.com>
2864
2865 PR c/69768
2866 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
2867 arguments for -Waddress warning.
2868
1066e9b5
JJ
28692016-02-04 Jakub Jelinek <jakub@redhat.com>
2870
2871 PR c/69669
2872 * c-decl.c (finish_enum): When honoring mode attribute,
2873 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2874
3a5d2ba4
JJ
28752016-01-29 Jakub Jelinek <jakub@redhat.com>
2876
2877 PR debug/69518
2878 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2879 all type variants, not just TYPE_MAIN_VARIANT.
2880
cbdd8ae0
JJ
28812016-01-27 Jakub Jelinek <jakub@redhat.com>
2882
2883 PR debug/66869
2884 * c-decl.c (c_write_global_declarations_1): Warn with
2885 warn_unused_function if static prototype without definition
2886 is not C_DECL_USED.
2887
fa74a4bc
MP
28882016-01-27 Marek Polacek <polacek@redhat.com>
2889
2890 PR c/68062
2891 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2892 to unsigned, if needed. Add -Wsign-compare warning.
2893
13f92e8d
JJ
28942016-01-26 Jakub Jelinek <jakub@redhat.com>
2895
2896 PR tree-optimization/69483
2897 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2898
cd8e73dc 28992016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
2900
2901 PR c/24293
2902 * c-tree.h (incomplete_record_decls): Declare.
2903 * c-parser.c (incomplete_record_decls): Define.
2904 (c_parser_translation_unit): Iterate through incomplete_record_decls and
2905 report error if any decl has zero size.
2906 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
2907 or enum type to incomplete_record_decls.
2908
e6d6ec9e
TV
29092016-01-14 Tom de Vries <tom@codesourcery.com>
2910
2911 PR tree-optimization/68773
2912 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
2913 set force_output.
2914
00083992
MP
29152016-01-14 Marek Polacek <polacek@redhat.com>
2916
2917 PR c/69262
2918 * c-decl.c (grokdeclarator): Provide more information for invalid
2919 array declarations.
2920
7443cf13
DM
29212016-01-06 David Malcolm <dmalcolm@redhat.com>
2922
2923 * c-parser.c (c_parser_unary_expression): For dereferences, build
2924 a combined location before calling build_indirect_ref, so that
2925 error reports cover the full range, manually updating the c_expr
2926 src_range.
2927
6b131d5b
MP
29282016-01-06 Marek Polacek <polacek@redhat.com>
2929
2930 PR sanitizer/69099
2931 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
2932 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
2933 NULL.
2934
818ab71a
JJ
29352016-01-04 Jakub Jelinek <jakub@redhat.com>
2936
2937 Update copyright years.
2938
2fe0a208
MP
29392016-01-04 Marek Polacek <polacek@redhat.com>
2940
2941 PR c/68908
2942 * c-typeck.c (build_atomic_assign): Improve commentary. Add
2943 optimization to use __atomic_fetch_* built-in if possible.
2944
c7b48c8a
TS
29452015-12-23 Thomas Schwinge <thomas@codesourcery.com>
2946
2947 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
2948 into...
2949 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
2950 all users.
2951
fda5652f
MP
29522015-12-22 Marek Polacek <polacek@redhat.com>
2953
2954 PR c/69002
2955 * c-typeck.c (build_component_ref): Warn when acessing elements of
2956 atomic structures or unions.
2957
745e411d
DM
29582015-12-21 David Malcolm <dmalcolm@redhat.com>
2959
2960 * c-typeck.c: Include "gcc-rich-location.h".
2961 (build_binary_op): In the two places that call binary_op_error,
2962 create a gcc_rich_location and populate it with the location of
2963 the binary op and its two operands.
2964
94c40e19
DM
29652015-12-16 David Malcolm <dmalcolm@redhat.com>
2966
2967 * c-parser.c (c_parser_statement_after_labels): When calling
2968 c_finish_return, Use the return expression's location if it has
2969 one, falling back to the location of the first token within it.
2970 * c-typeck.c (c_finish_return): When issuing warnings about
2971 the incorrect presence/absence of a return value, issue a note
2972 showing the declaration of the function.
2973
de67c4c3
DM
29742015-12-16 David Malcolm <dmalcolm@redhat.com>
2975
2976 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
2977 to 4.
2978 (c_parser_peek_nth_token): New function.
2979 (c_parser_peek_conflict_marker): New function.
2980 (c_parser_error): Detect conflict markers and report them as such.
2981
a10704e1
DM
29822015-12-16 David Malcolm <dmalcolm@redhat.com>
2983
2984 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
2985 to preserve range information for the primary expression
2986 in the call to c_parser_postfix_expression_after_primary.
2987
8062bca6
DM
29882015-12-16 David Malcolm <dmalcolm@redhat.com>
2989
2990 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
2991 expression location, falling back on the first token location,
2992 rather than always using the latter.
2993
d06f8b75
MP
29942015-12-16 Marek Polacek <polacek@redhat.com>
2995
2996 PR c/64637
2997 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
2998 available.
2999
2994fb91
MP
30002015-12-15 Marek Polacek <polacek@redhat.com>
3001
3002 PR c/68907
3003 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
3004 artificial decl.
3005
a1b93f8d
DM
30062015-12-08 David Malcolm <dmalcolm@redhat.com>
3007
3008 * c-parser.c (c_parser_alignof_expression): Capture location of
3009 closing parenthesis (if any), or of end of unary expression, and
3010 use it to build a src_range for the expression.
3011
46c6e1e2
DM
30122015-12-08 David Malcolm <dmalcolm@redhat.com>
3013
3014 PR c/68757
3015 * c-parser.c (c_parser_get_builtin_args): Add
3016 "out_close_paren_loc" param, and write back to it.
3017 (c_parser_postfix_expression): Capture the closing
3018 parenthesis location for RID_CHOOSE_EXPR,
3019 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
3020 RID_BUILTIN_SHUFFLE and use it to set the source range
3021 for such expressions; within RID_BUILTIN_COMPLEX set
3022 the underlying location.
3023
66189108
MP
30242015-12-07 Marek Polacek <polacek@redhat.com>
3025
3026 PR c/68668
3027 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
3028 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
3029
f187980b
EB
30302015-12-04 Eric Botcazou <ebotcazou@adacore.com>
3031
3032 * c-tree.h (c_build_va_arg): Adjust prototype.
3033 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
3034 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
3035 parameter, adjust throughout and issue an error if EXPR is a component
3036 with reverse storage order.
3037
4250754e
JM
30382015-12-02 Jason Merrill <jason@redhat.com>
3039
3040 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
3041 (c_fully_fold_internal, decl_constant_value_for_optimization):
3042 Move from c-common.c.
3043 * c-tree.h: Declare decl_constant_value_for_optimization.
3044 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
3045
e9e32ee6
JM
30462015-12-02 Joseph Myers <joseph@codesourcery.com>
3047
3048 PR c/68162
3049 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
3050 following link from declarator to next declarator. Track original
3051 qualified type and pass it to c_build_qualified_type.
3052 * c-typeck.c (c_build_qualified_type): Add arguments
3053 orig_qual_type and orig_qual_indirect.
3054
ff7a55bf
TS
30552015-12-02 Thomas Schwinge <thomas@codesourcery.com>
3056
3057 * c-parser.c (c_parser_omp_clause_name)
3058 (c_parser_oacc_all_clauses): Alphabetical sorting.
3059
657e4e47
JJ
30602015-12-02 Jakub Jelinek <jakub@redhat.com>
3061
3062 PR c/68533
3063 * c-decl.c (get_parm_info): Use b->locus instead of input_location
3064 for diagnostics.
3065
37d5ad46
JB
30662015-12-01 Julian Brown <julian@codesourcery.com>
3067 Cesar Philippidis <cesar@codesourcery.com>
3068 James Norris <James_Norris@mentor.com>
3069
3070 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
3071 (c_parser_oacc_clause_use_device): New function.
3072 (c_parser_oacc_all_clauses): Add use_device support.
3073 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
3074 (c_parser_oacc_host_data): New function.
3075 (c_parser_omp_construct): Add host_data support.
3076 * c-tree.h (c_finish_oacc_host_data): Add prototype.
3077 * c-typeck.c (c_finish_oacc_host_data): New function.
3078 (c_finish_omp_clauses): Add use_device support.
3079
a4850ce9
JH
30802015-11-29 Jan Hubicka <hubicka@ucw.cz>
3081
3082 PR c/67106
3083 * c-decl.c: Set TYPE_PACKED in variants.
3084
b58d3df2
ML
30852015-11-27 Martin Liska <mliska@suse.cz>
3086
3087 PR c++/68312
3088 * c-array-notation.c (fix_builtin_array_notation_fn):
3089 Use release_vec_vec instead of vec::release.
3090 (build_array_notation_expr): Likewise.
3091 (fix_conditional_array_notations_1): Likewise.
3092 (fix_array_notation_expr): Likewise.
3093 (fix_array_notation_call_expr): Likewise.
3094
aec17bfe
JJ
30952015-11-27 Jakub Jelinek <jakub@redhat.com>
3096
3097 PR c/63326
3098 * c-parser.c (c_parser_compound_statement_nostart): If
3099 last_label is true, use pragma_stmt instead of pragma_compound
3100 as second c_parser_pragma argument.
3101 (c_parser_omp_ordered, c_parser_omp_target_update,
3102 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
3103 false as second argument to c_parser_skip_to_pragma_eol after
3104 diagnosing standalone directives used in pragma_stmt context.
3105
688c4de0
IV
31062015-11-24 Ilya Verbin <ilya.verbin@intel.com>
3107
3108 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
3109 with "if (ENABLE_OFFLOADING)".
3110
cbd03aee
DM
31112015-11-23 David Malcolm <dmalcolm@redhat.com>
3112
3113 PR objc/68438
3114 * c-parser.c (c_parser_postfix_expression): Set up source ranges
3115 for various Objective-C constructs: Class.name syntax,
3116 @selector(), @protocol(), @encode(), and [] message syntax.
3117
a87a86e1
DM
31182015-11-20 David Malcolm <dmalcolm@redhat.com>
3119
3120 PR 62314
3121 * c-typeck.c (should_suggest_deref_p): New function.
3122 (build_component_ref): Special-case POINTER_TYPE when
3123 generating a "not a structure of union" error message, and
3124 suggest a "->" rather than a ".", providing a fix-it hint.
3125
8ece8dfb
DM
31262015-11-19 David Malcolm <dmalcolm@redhat.com>
3127
3128 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
3129 candidate into a new function, find_closest_identifier.
3130
433068cc
MP
31312015-11-19 Marek Polacek <polacek@redhat.com>
3132
3133 PR c/68412
3134 * c-typeck.c (parser_build_binary_op): Properly handle
3135 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
3136
bef08b71
DM
31372015-11-17 David Malcolm <dmalcolm@redhat.com>
3138
3139 * c-parser.c (set_c_expr_source_range): Bulletproof both
3140 overloaded implementations against NULL expr->value.
3141 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
3142 values.
3143 (c_parser_unary_expression): Likewise when handling addresses of
3144 labels.
3145 (c_parser_postfix_expression): Likewise for statement expressions,
3146 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
3147 __builtin_va_arg, and for __builtin_offset_of.
3148 (c_parser_postfix_expression_after_paren_type): Initialize expr's
3149 src_range using the range of the braced initializer.
3150 (c_parser_transaction_expression): Set src_range for "ret" to a
3151 sane pair of values.
3152
fff77217
KY
31532015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
3154
3155 * c-parser.c (c_finish_omp_declare_simd): Look for
3156 "simd" attribute as well. Update error message.
3157
1d899da2
TS
31582015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3159
3160 * c-parser.c (c_parser_omp_declare_target): Adjust.
3161
e4606348
JJ
31622015-11-14 Jakub Jelinek <jakub@redhat.com>
3163
3164 * c-typeck.c (c_finish_omp_clauses): Don't mark
3165 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
3166
3e636daf
MP
31672015-11-14 Marek Polacek <polacek@redhat.com>
3168
3169 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
3170 * c-typeck.c: Likewise.
3171
ebedc9a3
DM
31722015-11-13 David Malcolm <dmalcolm@redhat.com>
3173
3174 * c-decl.c (warn_defaults_to): Pass line_table to
3175 rich_location ctor.
3176 * c-errors.c (pedwarn_c99): Likewise.
3177 (pedwarn_c90): Likewise.
3178 * c-parser.c (set_c_expr_source_range): New functions.
3179 (c_token::get_range): New method.
3180 (c_token::get_finish): New method.
3181 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
3182 based on the range from the start of the LHS to the end of the
3183 RHS.
3184 (c_parser_conditional_expression): Likewise, based on the range
3185 from the start of the cond.value to the end of exp2.value.
3186 (c_parser_binary_expression): Call set_c_expr_source_range on
3187 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
3188 (c_parser_cast_expression): Call set_c_expr_source_range on ret
3189 based on the cast_loc through to the end of the expr.
3190 (c_parser_unary_expression): Likewise, based on the
3191 op_loc through to the end of op.
3192 (c_parser_sizeof_expression) Likewise, based on the start of the
3193 sizeof token through to either the closing paren or the end of
3194 expr.
3195 (c_parser_postfix_expression): Likewise, using the token range,
3196 or from the open paren through to the close paren for
3197 parenthesized expressions.
3198 (c_parser_postfix_expression_after_primary): Likewise, for
3199 various kinds of expression.
3200 * c-tree.h (struct c_expr): Add field "src_range".
3201 (c_expr::get_start): New method.
3202 (c_expr::get_finish): New method.
3203 (set_c_expr_source_range): New decls.
3204 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
3205 on ret for prefix unary ops.
3206 (parser_build_binary_op): Likewise, running from the start of
3207 arg1.value through to the end of arg2.value.
3208
ec8b536f
MP
32092015-11-13 Marek Polacek <polacek@redhat.com>
3210
3211 PR c/68320
3212 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
3213
277fe616
DM
32142015-11-13 David Malcolm <dmalcolm@redhat.com>
3215
3216 * c-typeck.c: Include spellcheck.h.
3217 (lookup_field_fuzzy_find_candidates): New function.
3218 (lookup_field_fuzzy): New function.
3219 (build_component_ref): If the field was not found, try using
3220 lookup_field_fuzzy and potentially offer a suggestion.
3221
6e232ba4
JN
32222015-11-12 James Norris <jnorris@codesourcery.com>
3223 Joseph Myers <joseph@codesourcery.com>
3224
3225 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
3226 (c_parser_omp_clause_name): Handle 'device_resident' clause.
3227 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3228 and PRAGMA_OMP_CLAUSE_LINK.
3229 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3230 and PRAGMA_OACC_CLAUSE_LINK.
3231 (OACC_DECLARE_CLAUSE_MASK): New definition.
3232 (c_parser_oacc_declare): New function.
3233
9be4f715
MP
32342015-11-12 Marek Polacek <polacek@redhat.com>
3235
3236 PR c/67784
3237 * c-parser.c (c_parser_for_statement): Reclassify the token in
3238 a correct scope.
3239
e78bede6
MP
32402015-11-11 Marek Polacek <polacek@redhat.com>
3241
3242 PR c/68107
3243 PR c++/68266
3244 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
3245 checking the size of an array.
3246
69f293c9
AM
32472015-11-11 Andrew MacLeod <amacleod@redhat.com>
3248
3249 * c-array-notation.c: Remove unused header files.
3250 * c-aux-info.c: Likewise.
3251 * c-convert.c: Likewise.
3252 * c-decl.c: Likewise.
3253 * c-errors.c: Likewise.
3254 * c-lang.c: Likewise.
3255 * c-objc-common.c: Likewise.
3256 * c-parser.c: Likewise.
3257 * c-typeck.c: Likewise.
3258 * gccspec.c: Likewise.
3259
3a40d81d
NS
32602015-11-09 Thomas Schwinge <thomas@codesourcery.com>
3261 Cesar Philippidis <cesar@codesourcery.com>
3262 James Norris <jnorris@codesourcery.com>
3263 Julian Brown <julian@codesourcery.com>
3264 Nathan Sidwell <nathan@codesourcery.com>
3265
3266 c/
3267 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
3268 routine arg.
3269 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
3270 (c_parser_pragma): Parse 'acc routine'.
3271 (OACC_ROUTINE_CLAUSE_MARK): Define.
3272 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
3273
fc402eec
AA
32742015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3275
3276 PR debug/67192
3277 * c-typeck.c (c_finish_loop): For unconditional loops, set the
3278 location of the backward-goto to the start of the loop body.
3279
f6b0b3db
AA
32802015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3281
3282 PR debug/67192
3283 * c-parser.c (c_parser_while_statement): Finish the loop before
3284 parsing ahead for misleading indentation.
3285 (c_parser_for_statement): Likewise.
3286
ee45a32d
EB
32872015-11-08 Eric Botcazou <ebotcazou@adacore.com>
3288
3289 * c-decl.c (finish_struct): If the structure has reverse storage
3290 order, rewrite the type of array fields with scalar component. Call
3291 maybe_apply_pragma_scalar_storage_order on entry.
3292 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
3293 errors on bit-fields and reverse SSO here and not...
3294 (c_mark_addressable): ...here.
3295 (output_init_element): Adjust call to initializer_constant_valid_p.
3296 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
3297
8a645150
DM
32982015-11-06 David Malcolm <dmalcolm@redhat.com>
3299
3300 * c-decl.c (warn_defaults_to): Update for change in signature
3301 of diagnostic_set_info.
3302 * c-errors.c (pedwarn_c99): Likewise.
3303 (pedwarn_c90): Likewise.
3304 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
3305 for textinfo::set_location.
3306
7a5e4956
CP
33072015-11-05 Cesar Philippidis <cesar@codesourcery.com>
3308 Thomas Schwinge <thomas@codesourcery.com>
3309 James Norris <jnorris@codesourcery.com>
3310
3311 * c-parser.c (c_parser_omp_clause_name): Add support for
3312 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
3313 (c_parser_omp_clause_default): Add is_oacc argument. Handle
3314 default(none) in OpenACC.
3315 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
3316 arguments.
3317 (c_parser_oacc_clause_tile): New function.
3318 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
3319 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
3320 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
3321 TILE}.
3322 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
3323 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
3324 FIRSTPRIVATE}.
3325 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
3326 (c_parser_oacc_update): Update the error message for missing clauses.
3327 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
3328 and OMP_CLAUSE_INDEPENDENT.
3329
bfcfbfa0
MP
33302015-11-05 Marek Polacek <polacek@redhat.com>
3331
3332 PR c/68090
3333 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
3334 deal with pre-evaluation on invalid types.
3335
e01d41e5
JJ
33362015-11-05 Jakub Jelinek <jakub@redhat.com>
3337 Ilya Verbin <ilya.verbin@intel.com>
3338
3339 * c-parser.c: Include context.h and gimple-expr.h.
3340 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
3341 monotonic together with nonmonotonic.
3342 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
3343 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
3344 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
3345 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
3346 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
3347 expressions on combined target teams before the target.
3348 (c_parser_omp_declare_target): If decl has "omp declare target" or
3349 "omp declare target link" attribute, and cgraph or varpool node already
3350 exists, then set corresponding flags. Call c_finish_omp_clauses
3351 in the parenthesized extended-list syntax case.
3352 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
3353 declare target.
3354 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
3355 on OMP_CLAUSE_REDUCTION array sections.
3356 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
3357 into the constant offset, or for variable low-bound using
3358 POINTER_PLUS_EXPR. For structure element based array sections use
3359 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
3360 (c_finish_omp_clauses): Drop generic_field_head, structure
3361 elements are now always mapped even as array section bases,
3362 diagnose same var in data sharing and mapping clauses. Diagnose if
3363 linear step on declare simd is neither a constant nor a uniform
3364 parameter. Look through POINTER_PLUS_EXPR for array section
3365 reductions. Diagnose the same var or function appearing multiple
3366 times on the same directive. Fix up wording for the to clause if t
3367 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
3368 modifier on kinds other than dynamic or guided or nonmonotonic
3369 modifier together with ordered clause.
3370
4bf9e5a8
TS
33712015-11-03 Thomas Schwinge <thomas@codesourcery.com>
3372 Chung-Lin Tang <cltang@codesourcery.com>
3373
3374 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
3375
2adfab87
AM
33762015-10-29 Andrew MacLeod <amacleod@redhat.com>
3377
3378 * c-array-notation.c: Reorder #include's and remove duplicates.
3379 * c-aux-info.c: Likewise.
3380 * c-convert.c: Likewise.
3381 * c-decl.c: Likewise.
3382 * c-errors.c: Likewise.
3383 * c-lang.c: Likewise.
3384 * c-objc-common.c: Likewise.
3385 * c-parser.c: Likewise.
3386 * c-typeck.c: Likewise.
3387
e922069e
JW
33882015-10-26 Jim Wilson <jim.wilson@linaro.org>
3389
3390 PR debug/66068
3391 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
3392 after calling build_qualified_type.
3393
765dd391
CP
33942015-10-27 Cesar Philippidis <cesar@codesourcery.com>
3395 Thomas Schwinge <thomas@codesourcery.com>
3396 James Norris <jnorris@codesourcery.com>
3397 Joseph Myers <joseph@codesourcery.com>
3398 Julian Brown <julian@codesourcery.com>
3399 Bernd Schmidt <bschmidt@redhat.com>
3400
3401 * c-parser.c (c_parser_oacc_shape_clause): New.
3402 (c_parser_oacc_simple_clause): New.
3403 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
3404 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
3405
88bae6f4
TS
34062015-10-27 Thomas Schwinge <thomas@codesourcery.com>
3407 James Norris <jnorris@codesourcery.com>
3408 Cesar Philippidis <cesar@codesourcery.com>
3409
3410 PR c/64765
3411 PR c/64880
3412 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
3413 parameters, and handle these. Adjust all users.
3414 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
3415 into...
3416 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
3417 all users.
3418 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
3419 declare functions.
3420 (c_finish_omp_construct): Declare function.
3421 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
3422 Merge functions into...
3423 (c_finish_omp_construct): ... this new function.
3424
a8fc2579
RB
34252015-10-22 Richard Biener <rguenther@suse.de>
3426
3427 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
3428 before folding a MINUS_EXPR.
3429
e9122ef6
MP
34302015-10-21 Marek Polacek <polacek@redhat.com>
3431
3432 PR c/68024
3433 * c-decl.c (start_function): Warn about vararg functions without
3434 a prototype.
3435
9f47c7e5
IE
34362015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
3437
3438 * c-typeck.c (build_conditional_expr): Use boolean vector
3439 type for vector comparison.
3440 (build_vec_cmp): New.
3441 (build_binary_op): Use build_vec_cmp for comparison.
3442
fa60eeb9
MP
34432015-10-20 Marek Polacek <polacek@redhat.com>
3444
3445 * c-parser.c (is_cilkplus_vector_p): Don't define here.
3446
2c7020eb
MP
34472015-10-20 Marek Polacek <polacek@redhat.com>
3448
3449 PR c/67964
3450 * c-parser.c (c_parser_attributes): Break out of the loop if the
3451 token after an attribute isn't a comma.
3452
d9a6bd32
JJ
34532015-10-13 Jakub Jelinek <jakub@redhat.com>
3454 Aldy Hernandez <aldyh@redhat.com>
3455
3456 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
3457 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
3458 (c_parser_omp_variable_list): Handle structure elements for
3459 map, to and from clauses. Handle array sections in reduction
3460 clause. Formatting fixes.
3461 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
3462 if clause modifiers.
3463 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3464 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3465 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
3466 c_parser_omp_clause_is_device_ptr): New functions.
3467 (c_parser_omp_clause_ordered): Parse optional parameter.
3468 (c_parser_omp_clause_reduction): Handle array reductions.
3469 (c_parser_omp_clause_schedule): Parse optional simd modifier.
3470 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
3471 functions.
3472 (c_parser_omp_clause_linear): Parse linear clause modifiers.
3473 (c_parser_omp_clause_depend_sink): New function.
3474 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
3475 (c_parser_omp_clause_map): Parse release/delete map kinds and
3476 optional always modifier.
3477 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
3478 and c_finish_omp_clauses callers.
3479 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
3480 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
3481 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
3482 (OMP_CRITICAL_CLAUSE_MASK): Define.
3483 (c_parser_omp_critical): Parse critical clauses.
3484 (c_parser_omp_for_loop): Handle doacross loops, adjust
3485 c_finish_omp_for and c_finish_omp_clauses callers.
3486 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
3487 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
3488 (OMP_FOR_CLAUSE_MASK): Add linear clause.
3489 (c_parser_omp_for): Disallow ordered clause when combined with
3490 distribute. Disallow linear clause when combined with distribute
3491 and not combined with simd.
3492 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
3493 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
3494 parse clauses and if depend clause is found, don't parse a body.
3495 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
3496 Allow target parallel without for after it.
3497 (OMP_TASK_CLAUSE_MASK): Add priority clause.
3498 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
3499 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
3500 invalid kinds.
3501 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
3502 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
3503 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
3504 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
3505 functions.
3506 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
3507 defaultmap and is_device_ptr clauses.
3508 (c_parser_omp_target): Parse target parallel and target simd. Set
3509 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
3510 and target exit data. Diagnose invalid map kinds.
3511 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
3512 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
3513 construct.
3514 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
3515 &omp_priv.
3516 (OMP_TASKLOOP_CLAUSE_MASK): Define.
3517 (c_parser_omp_taskloop): New function.
3518 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
3519 handle PRAGMA_OMP_TASKLOOP.
3520 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
3521 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
3522 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
3523 Add IS_OMP argument, handle structure element bases, diagnose
3524 bitfields, pass IS_OMP recursively, diagnose known zero length
3525 array sections in depend clauses, handle array sections in reduction
3526 clause, diagnose negative length even for pointers.
3527 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
3528 types, pass IS_OMP down to handle_omp_array_sections_1, handle
3529 array sections in reduction clause, set
3530 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
3531 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
3532 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
3533 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
3534
21ba0cea
MP
35352015-10-06 Marek Polacek <polacek@redhat.com>
3536
3537 * c-parser.c (c_parser_statement_after_labels): Use
3538 protected_set_expr_location.
3539 (c_parser_omp_clause_num_gangs): Likewise.
3540 (c_parser_omp_clause_num_threads): Likewise.
3541 (c_parser_omp_clause_num_workers): Likewise.
3542 (c_parser_omp_clause_vector_length): Likewise.
3543 (c_parser_omp_clause_num_teams): Likewise.
3544 (c_parser_omp_clause_thread_limit): Likewise.
3545 * c-typeck.c (build_c_cast): Likewise.
3546 (c_cast_expr): Likewise.
3547
624d31fe
RS
35482015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3549
3550 * c-typeck.c (c_tree_equal): Use real_equal instead of
3551 REAL_VALUES_EQUAL.
3552
b8fd7909
JM
35532015-10-04 Jason Merrill <jason@redhat.com>
3554
3555 * c-parser.c (c_lex_one_token): Handle @synchronized.
3556 * c-decl.c (match_builtin_function_types): A declaration of a built-in
3557 can change whether the function is transaction_safe.
3558
1c7485af
MP
35592015-10-02 Marek Polacek <polacek@redhat.com>
3560
3561 PR c/67730
3562 * c-typeck.c (convert_for_assignment): Use the expansion point
3563 location throughout.
3564
3e3b8d63
MP
35652015-10-02 Marek Polacek <polacek@redhat.com>
3566
3567 PR c/64249
3568 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
3569 and pass it down to c_parser_if_statement.
3570 (c_parser_else_body): Add CHAIN parameter and pass it down to
3571 c_parser_statement_after_labels.
3572 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
3573 duplicated if-else-if conditions.
3574
aabef2de
MP
35752015-10-01 Marek Polacek <polacek@redhat.com>
3576
3577 * c-typeck.c (convert_for_assignment): Improve commentary.
3578
de8ddd5f
MP
35792015-09-30 Marek Polacek <polacek@redhat.com>
3580
3581 PR c/67730
3582 * c-typeck.c (c_finish_return): Use the expansion point location for
3583 certain "return with value" warnings.
3584
c4914de6
MLI
35852015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3586
3587 * c-parser.c (pragma_lex): Add loc argument.
3588
0e36f5c7
MP
35892015-09-15 Marek Polacek <polacek@redhat.com>
3590
3591 PR c/67580
3592 * c-decl.c (tag_exists_p): New function.
3593 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3594 struct/union/enum keywords are missing.
3595 * c-tree.h (tag_exists_p): Declare.
3596
2f3bb934
MP
35972015-09-15 Marek Polacek <polacek@redhat.com>
3598
3599 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3600 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3601 Return NULL_TREE instead of 0.
3602 (lookup_name): Return NULL_TREE instead of 0.
3603 (lookup_name_in_scope): Likewise.
3604 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3605 (parser_xref_tag): Use false instead of 0.
3606 (start_struct): Use true instead of 1.
3607 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3608
aa256c4a
MP
36092015-09-14 Marek Polacek <polacek@redhat.com>
3610
3611 * c-typeck.c (set_nonincremental_init_from_string): Use
3612 HOST_WIDE_INT_M1U when shifting a negative value.
3613
dbb68221
MW
36142015-09-09 Mark Wielaard <mjw@redhat.com>
3615
3616 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
3617 parm against NULL.
3618
a8a098ac
JJ
36192015-09-10 Jakub Jelinek <jakub@redhat.com>
3620
3621 PR c/67502
3622 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
3623 into OMP_FOR_PRE_BODY rather than before the loop.
3624
f4b189d5
JJ
36252015-09-09 Jakub Jelinek <jakub@redhat.com>
3626
0bb99c11
JJ
3627 PR c/67501
3628 * c-parser.c (c_parser_oacc_all_clauses,
3629 c_parser_omp_all_clauses): Remove invalid clause from
3630 list of clauses even if parser->error is set.
3631
fce5e5e3
JJ
3632 PR c/67500
3633 * c-parser.c (c_parser_omp_clause_aligned,
3634 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3635 test for errors.
3636 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3637 error_mark_node.
3638
f4b189d5
JJ
3639 PR c/67495
3640 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3641 instead of c_parser_unary_expression. If the result is !lvalue_p,
3642 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3643
b2aaf235
MP
36442015-09-04 Marek Polacek <polacek@redhat.com>
3645
3646 PR sanitizer/67279
3647 * c-typeck.c (build_binary_op): Don't instrument static initializers.
3648
1807ffc1
MS
36492015-09-03 Martin Sebor <msebor@redhat.com>
3650
3651 PR c/66516
8b652e65
JJ
3652 * c-typeck.c (convert_arguments, parser_build_unary_op,
3653 build_conditional_expr, c_cast_expr, convert_for_assignment,
3654 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
3655 reject_gcc_builtin.
3656 (c_decl_implicit): Define.
3657
d04ff417
MP
36582015-09-02 Marek Polacek <polacek@redhat.com>
3659
3660 PR c/67432
3661 * c-parser.c (c_parser_enum_specifier): Give a better error for
3662 an empty enum.
3663
a79683d5
TS
36642015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3665
3666 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3667
191a6b94
MP
36682015-08-12 Marek Polacek <polacek@redhat.com>
3669
3670 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
3671 LOC to it.
3672
420a9d9b
MP
36732015-08-03 Marek Polacek <polacek@redhat.com>
3674
3675 PR c/67088
3676 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
3677 Use it.
3678 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
3679
992118a1
PP
36802015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3681
3682 * c-parser.c (c_parser_if_body): Take token_indent_info
3683 argument. Call warn_for_misleading_indentation even when the
3684 body is a semicolon. Extract token_indent_infos corresponding
3685 to the guard, body and next tokens. Adjust call to
3686 warn_for_misleading_indentation accordingly.
3687 (c_parser_else_body): Likewise.
3688 (c_parser_if_statement): Likewise.
3689 (c_parser_while_statement): Likewise.
3690 (c_parser_for_statement): Likewise.
3691
46308474
LFSM
36922015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
3693 Manuel López-Ibáñez <manu@gcc.gnu.org>
3694
3695 * c-decl.c (get_parm_info): Remove static var. Update warning
3696 message.
3697
05b28fd6
MP
36982015-07-27 Marek Polacek <polacek@redhat.com>
3699
3700 PR c++/66555
3701 PR c/54979
3702 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3703
451b5e48
MP
37042015-07-20 Marek Polacek <polacek@redhat.com>
3705
3706 PR c++/55095
3707 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3708 (build_binary_op): Warn about left shift overflows.
3709
1916bcb5
AM
37102015-07-09 Andrew MacLeod <amacleod@redhat.com>
3711
3712 * c-array-notation.c: Adjust includes for flags.h changes.
3713 * c-objc-common.c: Likewise.
3714
c7131fb2
AM
37152015-07-07 Andrew MacLeod <amacleod@redhat.com>
3716
3717 * c-array-notation.c: Adjust includes.
3718 * c-aux-info.c: Likewise.
3719 * c-convert.c: Likewise.
3720 * c-decl.c: Likewise.
3721 * c-errors.c: Likewise.
3722 * c-lang.c: Likewise.
3723 * c-objc-common.c: Likewise.
3724 * c-parser.c: Likewise.
3725 * c-typeck.c: Likewise.
3726
da2e71c9
MLI
37272015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3728
3729 PR fortran/66605
3730 * c-decl.c (finish_function): Call do_warn_unused_parameter.
3731
b155cfd9
MP
37322015-06-29 Marek Polacek <polacek@redhat.com>
3733
3734 PR c/66322
3735 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3736 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
3737 about -Wswitch-bool here.
3738 (do_case): Update c_add_case_label call.
3739 (c_finish_case): Update c_do_switch_warnings call.
3740
31521951
MP
37412015-06-27 Marek Polacek <polacek@redhat.com>
3742
3743 * c-typeck.c: Use VECTOR_TYPE_P throughout.
3744
22d03525
MP
37452015-06-26 Marek Polacek <polacek@redhat.com>
3746
3747 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3748 INDIRECT_REF_P.
3749 * c-typeck.c (array_to_pointer_conversion): Likewise.
3750 (build_unary_op): Likewise.
3751 (c_finish_return): Likewise.
3752
f0889939
AM
37532015-06-25 Andrew MacLeod <amacleod@redhat.com>
3754
3755 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3756 * c-parser.c: Likewise.
3757
8d67ee55
RS
37582015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3759
3760 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3761 instead of pointer_hash.
3762 (detect_field_duplicates): Likewise.
3763
0ae9bd27
MP
37642015-06-25 Marek Polacek <polacek@redhat.com>
3765
3766 * c-array-notation.c: Use VAR_P throughout.
3767 * c-decl.c: Likewise.
3768 * c-objc-common.c: Likewise.
3769 * c-parser.c: Likewise.
3770 * c-typeck.c: Likewise.
3771
62f9079a
MP
37722015-06-25 Marek Polacek <polacek@redhat.com>
3773
3774 * c-decl.c: Use is_global_var throughout.
3775 * c-parser.c: Likewise.
3776 * c-typeck.c: Likewise.
3777
abb226c9
AM
37782015-06-17 Andrew MacLeod <amacleod@redhat.com>
3779
3780 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3781 * c-aux-info.c: Likewise.
3782 * c-convert.c: Likewise.
3783 * c-decl.c: Likewise.
3784 * c-errors.c: Likewise.
3785 * c-lang.c: Likewise.
3786 * c-objc-common.c: Likewise.
3787 * c-parser.c: Likewise.
3788 * c-typeck.c: Likewise.
3789
8cbababc
JH
37902015-06-11 Jan Hubicka <hubicka@ucw.cz>
3791
3792 PR middle-end/66325
3793 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3794 variants.
3795
a0349665
PMR
37962015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
3797
3798 * c-decl.c (pop_scope): Register the main translation unit
3799 through the new debug hook.
3800
13fdf2e2
AM
38012015-06-08 Andrew MacLeod <amacleod@redhat.com>
3802
3803 * c-array-notation.c : Adjust include files.
3804 * c-aux-info.c : Likewise.
3805 * c-convert.c : Likewise.
3806 * c-decl.c : Likewise.
3807 * c-errors.c : Likewise.
3808 * c-lang.c : Likewise.
3809 * c-lang.h : Likewise.
3810 * c-objc-common.c : Likewise.
3811 * c-parser.c : Likewise.
3812 * c-typeck.c : Likewise.
3813
d7438551
AH
38142015-06-05 Aldy Hernandez <aldyh@redhat.com>
3815
3816 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3817 immediately clobber it.
3818 (c_write_global_declarations_1): Remove call to
3819 check_global_declaration_1.
3820 (c_write_global_declarations_2): Remove.
3821 (c_write_final_cleanups): Rename from c_write_global_declarations.
3822 Remove call to finalize_compilation_unit.
3823 Remove calls to debugging hooks.
3824 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3825 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3826 * c-tree.h: Remove c_write_global_declarations.
3827
ecb9f223
AM
38282015-06-04 Andrew MacLeod <amacleod@redhat.com>
3829
3830 * c-array-notation.c: Adjust includes for restructured coretypes.h.
3831 * c-aux-info.c: Likewise.
3832 * c-convert.c: Likewise.
3833 * c-decl.c: Likewise.
3834 * c-errors.c: Likewise.
3835 * c-lang.c: Likewise.
3836 * c-objc-common.c: Likewise.
3837 * c-parser.c: Likewise.
3838 * c-typeck.c: Likewise.
3839
9482b620
MP
38402015-06-04 Marek Polacek <polacek@redhat.com>
3841
3842 PR c/66341
3843 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3844 it is a lvalue.
3845
bc51ace3
PK
38462015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3847
3848 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3849 Warn for empty struct.
3850 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3851
ea5b45b6
AT
38522015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
3853
3854 * c-decl.c (start_function): Call plugin before parsing.
3855 (finish_function): Call plugin after parsing.
3856
c2d47482
PK
38572015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3858
3859 PR c/49551
3860 * c-decl.c (merge_decls): Merge DECL_COMMON.
3861
a95492ab
JW
38622015-05-22 Jim Wilson <jim.wilson@linaro.org>
3863
3864 * Make-lang.in (check_gcc_pallelize): Define.
3865
fd5c817a
MP
38662015-05-22 Marek Polacek <polacek@redhat.com>
3867
3868 PR c/47043
3869 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
3870 attributes.
3871
c7b70a3c
MP
38722015-05-21 Marek Polacek <polacek@redhat.com>
3873
3874 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3875 DECL_BUILT_IN.
3876
21b634ae
MP
38772015-05-20 Marek Polacek <polacek@redhat.com>
3878
3879 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3880 * c-typeck.c: Likewise.
3881
296a8c2f
MP
38822015-05-19 Marek Polacek <polacek@redhat.com>
3883
3884 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3885
41b37d5e
JJ
38862015-05-19 Jakub Jelinek <jakub@redhat.com>
3887
3888 PR middle-end/66199
3889 * c-parser.c (c_parser_omp_for_loop): Don't add
3890 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3891 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3892 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3893 constructs.
3894
fab27f52
MM
38952015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
3896
3897 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 3898 swaps.
fab27f52 3899
40de31cf
MLI
39002015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3901
3902 PR fortran/44054
3903 * c-objc-common.c (c_tree_printer): Replace locus pointer with
3904 accessor function.
3905
3aa3c9fc
MP
39062015-05-14 Marek Polacek <polacek@redhat.com>
3907
3908 PR c/66066
3909 PR c/66127
3910 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
3911 rather than with 0.
3912
c3388e62
DM
39132015-05-12 David Malcolm <dmalcolm@redhat.com>
3914
3915 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
3916 to add a call to warn_for_misleading_indentation.
3917 (c_parser_else_body): Likewise, adding param "else_loc".
3918 (c_parser_if_statement): Check for misleading indentation.
3919 (c_parser_while_statement): Likewise.
3920 (c_parser_for_statement): Likewise.
3921
755e528f
MP
39222015-05-08 Marek Polacek <polacek@redhat.com>
3923
3924 PR c/64918
3925 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
3926 (output_init_element): Likewise.
3927
0173bd2a
MP
39282015-05-07 Marek Polacek <polacek@redhat.com>
3929
3930 PR c/65179
3931 * c-typeck.c (build_binary_op): Warn when left shifting a negative
3932 value.
3933
9babc352
MP
39342015-04-30 Marek Polacek <polacek@redhat.com>
3935
3936 * c-typeck.c (set_init_label): Call error_at instead of error and
3937 pass LOC to it.
3938
ac9f18db
MP
3939 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
3940 the type of a decl.
3941
ec3fba51
MP
3942 * c-typeck.c (c_build_va_arg): Clarify the error message.
3943
b811915d
TS
39442015-04-29 Thomas Schwinge <thomas@codesourcery.com>
3945
3946 * c-parser.c (c_parser_oacc_enter_exit_data): Use
3947 OMP_STANDALONE_CLAUSES.
3948
f3075008
MP
39492015-04-28 Marek Polacek <polacek@redhat.com>
3950
3951 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
3952
4e81b788
MP
39532015-04-28 Marek Polacek <polacek@redhat.com>
3954
3955 PR c/65901
3956 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
3957
6c1db78e
MP
39582015-04-25 Marek Polacek <polacek@redhat.com>
3959
3960 PR c/52085
3961 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
3962 attribute.
3963
5c4abbb8
MP
39642015-04-23 Marek Polacek <polacek@redhat.com>
3965
3966 PR c/65345
3967 * c-decl.c (set_labels_context_r): New function.
3968 (store_parm_decls): Call it via walk_tree_without_duplicates.
3969 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
3970 instead of create_tmp_var. Build TARGET_EXPR instead of
3971 COMPOUND_EXPR.
3972 (build_atomic_assign): Use create_tmp_var_raw instead of
3973 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
3974
06aca1d5
IV
39752015-04-20 Ilya Verbin <ilya.verbin@intel.com>
3976
3977 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
3978 (c_parser_omp_target_update): Add missed %> to error_at ().
3979
8fba1830
BRF
39802015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
3981
3982 PR target/55143
3983 * c-decl.c (c_default_pointer_mode): Remove definition.
3984 * c-tree.h (c_default_pointer_mode): Remove declaration.
3985
62021f64
TB
39862015-03-27 Tobias Burnus <burnus@net-b.de>
3987
3988 PR c/65586
3989 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
3990 error out.
3991 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
3992 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
3993 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
3994
9b65e171
JJ
39952015-03-19 Jakub Jelinek <jakub@redhat.com>
3996
3997 * c-decl.c (c_decl_attributes): Also add "omp declare target"
3998 attribute for DECL_EXTERNAL VAR_DECLs.
3999
17958621
JJ
40002015-03-11 Jakub Jelinek <jakub@redhat.com>
4001
4002 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
4003 argument.
4004
7ccb1a11
JJ
40052015-03-10 Jakub Jelinek <jakub@redhat.com>
4006
4007 PR c/65120
4008 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
4009 before preparing arguments to warn_logical_not_parentheses.
4010
01177669
JJ
40112015-03-09 Jakub Jelinek <jakub@redhat.com>
4012
4013 PR c/65120
4014 * c-typeck.c (parser_build_binary_op): Don't warn for
4015 !!x == y or !b == y where b is _Bool.
4016
802ac282
MP
40172015-03-09 Marek Polacek <polacek@redhat.com>
4018
4019 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
4020 * c-decl.c (grokdeclarator): Likewise.
4021 * c-typeck.c (build_binary_op): Likewise.
4022
e5165b60
MP
40232015-02-27 Marek Polacek <polacek@redhat.com>
4024
4025 PR c/65228
4026 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
4027
065d214c
MP
40282015-02-14 Marek Polacek <polacek@redhat.com>
4029
4030 PR c/64768
4031 * c-decl.c (grokdeclarator): Set the range of a flexible array member
4032 declared through a typedef name.
4033
e5d9235b
MP
40342015-02-13 Marek Polacek <polacek@redhat.com>
4035
4036 PR c/65050
4037 * c-decl.c (grokdeclarator): Print also the type when giving
4038 the error message about array's incomplete element type.
4039
fa01ffcc
JJ
40402015-02-11 Jakub Jelinek <jakub@redhat.com>
4041
4042 PR c/64824
4043 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
4044 check in the POP macro.
4045
c3e38a03
MP
40462015-02-09 Marek Polacek <polacek@redhat.com>
4047
4048 PR c/64856
4049 * c-typeck.c (process_init_element): Don't always wrap
4050 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
4051 initializing a range of elements.
4052
4886ec8e
JJ
40532015-02-04 Jakub Jelinek <jakub@redhat.com>
4054
4055 PR c/64824
4056 PR c/64868
4057 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
4058
c3e38a03 40592015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
4060
4061 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
4062 processing enum declaration.
4063
7b33f0c8
MP
40642015-01-29 Marek Polacek <polacek@redhat.com>
4065
4066 PR c/64709
4067 * c-typeck.c (pop_init_level): If constructor_elements has
4068 exactly one element with integer_zerop value, set constructor_zeroinit
4069 to 1. Remove braces around warning_init call.
4070
dea63e49
JJ
40712015-01-27 Jakub Jelinek <jakub@redhat.com>
4072
4073 PR c/64766
4074 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
4075 of FUNCTION_DECLs with error_mark_node.
4076
d38f7dce
JJ
40772015-01-26 Jakub Jelinek <jakub@redhat.com>
4078
4079 PR c/64778
4080 * c-typeck.c (convert_arguments): Return -1 if there are
4081 error_args, even if we've diagnosed too many arguments.
4082
cbf5d0e7
RB
40832015-01-21 Richard Biener <rguenther@suse.de>
4084
4085 PR middle-end/64313
4086 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
4087 for builtins the user declared correctly.
4088
41dbbb37
TS
40892015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4090 Bernd Schmidt <bernds@codesourcery.com>
4091 Cesar Philippidis <cesar@codesourcery.com>
4092 James Norris <jnorris@codesourcery.com>
4093 Jakub Jelinek <jakub@redhat.com>
4094 Ilmir Usmanov <i.usmanov@samsung.com>
4095
4096 * c-parser.c: Include "gomp-constants.h".
4097 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
4098 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
4099 Use OMP_CLAUSE_SET_MAP_KIND.
4100 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
4101 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
4102 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
4103 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
4104 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
4105 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
4106 "copyout", "create", "delete", "deviceptr", "gang", "host",
4107 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
4108 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
4109 "present_or_create", "pcreate", "seq", "self", "vector",
4110 "vector_length", "wait", "worker".
4111 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
4112 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
4113 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
4114 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
4115 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
4116 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
4117 (c_parser_oacc_data_clause_deviceptr)
4118 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
4119 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
4120 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
4121 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
4122 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
4123 (c_parser_oacc_parallel, c_parser_oacc_update)
4124 (c_parser_oacc_wait): New functions.
4125 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
4126 (c_finish_oacc_data): New prototypes.
4127 * c-typeck.c: Include "gomp-constants.h".
4128 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
4129 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
4130 OMP_CLAUSE_SET_MAP_KIND.
4131 (c_finish_oacc_parallel, c_finish_oacc_kernels)
4132 (c_finish_oacc_data): New functions.
4133 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
4134 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
4135 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
4136 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
4137 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
4138 GOMP_MAP_FORCE_DEVICEPTR.
4139
adfac8df
JJ
41402015-01-09 Michael Collison <michael.collison@linaro.org>
4141
4142 * c-array-notation.c: Include hash-set.h, machmode.h,
4143 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4144 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
4145 * c-aux-info.c: Ditto.
4146 * c-convert.c: Ditto.
4147 * c-decl.c: Ditto.
4148 * c-errors.c: Ditto.
4149 * c-lang.c: Dittoxs.
4150 * c-objc-common.c: Ditto.
4151 * c-parser.c: Ditto.
4152 * c-typeck.c: Include hash-set.h, machmode.h,
4153 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4154 fold-const.h, wide-int.h, inchash.h, real.h and
4155 fixed-value.h due to flattening of tree.h.
4156
2cc901dc
MP
41572015-01-07 Marek Polacek <polacek@redhat.com>
4158
4159 PR c/64417
4160 * c-typeck.c (process_init_element): Disallow initialization of
4161 a flexible array member with a string constant if the structure
4162 is in an array.
4163
5624e564
JJ
41642015-01-05 Jakub Jelinek <jakub@redhat.com>
4165
e5341100
JJ
4166 PR sanitizer/64344
4167 * c-typeck.c (convert_for_assignment, c_finish_return): For
4168 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
4169 types also set in_late_binary_op around convert call.
4170 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
4171 to integral type casts, if not in_late_binary_op, pass c_fully_fold
4172 result on expr as last argument to ubsan_instrument_float_cast,
4173 if in_late_binary_op, don't use c_save_expr but save_expr.
4174
5624e564
JJ
4175 Update copyright years.
4176
5bd012f8
MP
41772015-01-05 Marek Polacek <polacek@redhat.com>
4178
4179 PR c/64423
4180 * c-typeck.c (build_array_ref): Pass loc down to
4181 warn_array_subscript_with_type_char.
4182
3f8257db 41832014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
4184
4185 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 4186 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 4187 element type.
8e745a17 4188 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 4189 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 4190 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 4191 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 4192 to PEDWARN_FOR_QUALIFIERS.
768952be 4193
8f94a8c4
JJ
41942014-12-17 Jakub Jelinek <jakub@redhat.com>
4195
4196 PR sanitizer/64289
4197 * c-convert.c: Include ubsan.h.
4198 (convert): For real -> integral casts and
4199 -fsanitize=float-cast-overflow don't call convert_to_integer, but
4200 instead instrument the float cast directly.
4201
b731b390
JJ
42022014-11-29 Jakub Jelinek <jakub@redhat.com>
4203
4204 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
4205 c_finish_stmt_expr): Remove NULL last argument from
4206 create_tmp_var_raw and create_tmp_var calls.
4207 * c-array-notation.c (fix_builtin_array_notation_fn,
4208 build_array_notation_expr, fix_conditional_array_notations_1,
4209 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
4210
541e35a6
MP
42112014-11-28 Marek Polacek <polacek@redhat.com>
4212
4213 PR c/63862
4214 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
4215 convert the right operand to integer type.
4216
b286be94
MP
42172014-11-25 Marek Polacek <polacek@redhat.com>
4218
4219 PR c/63877
4220 * c-decl.c (start_function): Disable -Wmissing-declarations warning
4221 for inline functions.
4222
aa7da51a
JJ
42232014-11-21 Jakub Jelinek <jakub@redhat.com>
4224
4225 PR target/63764
4226 * c-typeck.c (build_array_ref): Adjust
4227 convert_vector_to_pointer_for_subscript caller. If it returns true,
4228 call non_lvalue_loc on the result.
4229
d876207f
RB
42302014-11-11 Richard Biener <rguenther@suse.de>
4231
4232 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
4233 to true.
4234
e5e44252
AK
42352014-11-10 Andi Kleen <ak@linux.intel.com>
4236
4237 PR c/60804
4238 * c-parser.c (c_parser_statement_after_labels): Call
4239 check_no_cilk.
4240 (c_parser_if_statement): Dito.
4241 (c_parser_switch_statement): Dito.
4242 (c_parser_while_statement): Dito.
4243 (c_parser_do_statement): Dito.
4244 (c_parser_for_statement): Dito.
4245 * c-typeck.c (c_finish_loop): Dito.
4246
13c21655
PC
42472014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
4248
4249 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
4250 OPT_Wshift_count_overflow in the warnings.
4251
2d51fcef
MP
42522014-10-30 Marek Polacek <polacek@redhat.com>
4253
4254 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
4255 print the stripped version as well, if they're not the same.
4256
ef4bddc2
RS
42572014-10-29 Richard Sandiford <richard.sandiford@arm.com>
4258
4259 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
4260 machine_mode.
4261
c582198b
AM
42622014-10-28 Andrew MacLeod <amacleod@redhat.com>
4263
4264 * c-decl.c: Adjust include files.
4265 * c-parser.c: Ditto.
4266
ddc8de03
PM
42672014-10-27 Phil Muldoon <pmuldoon@redhat.com>
4268 Tom Tromey <tromey@redhat.com>
4269
4270 * c-tree.h (enum c_oracle_request): New.
4271 (c_binding_oracle_function): New typedef.
4272 (c_binding_oracle, c_pushtag, c_bind): Declare.
4273 * c-decl.c (c_binding_oracle): New global.
4274 (I_SYMBOL_CHECKED): New macro.
4275 (i_symbol_binding): New function.
4276 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
4277 (I_TAG_CHECKED): New macro.
4278 (i_tag_binding): New function.
4279 (I_TAG_BINDING, I_TAG_DECL): Redefine.
4280 (I_LABEL_CHECKED): New macro.
4281 (i_label_binding): New function.
4282 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
4283 (c_print_identifier): Save and restore c_binding_oracle.
4284 (c_pushtag, c_bind): New functions.
4285
60393bbc
AM
42862014-10-27 Andrew MacLeod <amacleod@redhat.com>
4287
4288 * c-typeck.c: Adjust include files.
4289
d723bb7c
MLI
42902014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
4291
4292 PR c++/53061
4293 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
4294 initialization here...
4295 (c_initialize_diagnostics): ... but here. Set defaults after
4296 building pretty-printer.
4297
1bc5a451
MP
42982014-10-23 Marek Polacek <polacek@redhat.com>
4299
4300 PR c/63626
4301 * c-decl.c (pop_scope): Don't print warning in external_scope.
4302
4435bb92
MP
43032014-10-19 Marek Polacek <polacek@redhat.com>
4304
4305 PR c/63567
4306 * c-typeck.c (output_init_element): Allow initializing objects with
4307 static storage duration with compound literals even in C99 and add
4308 pedwarn for it.
4309
7278465e
MP
43102014-10-17 Marek Polacek <polacek@redhat.com>
4311
4312 PR c/63567
4313 * c-typeck.c (digest_init): Allow initializing objects with static
4314 storage duration with compound literals even in C99 and add pedwarn
4315 for it.
4316
d9b7be2e
MP
43172014-10-17 Marek Polacek <polacek@redhat.com>
4318
4319 PR c/63543
4320 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
4321 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
4322 error multiple times. Print the type.
4323
f406ae1f
MP
43242014-10-17 Marek Polacek <polacek@redhat.com>
4325
4326 PR c/63549
4327 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
4328 type.
4329
92574c7c
MP
43302014-10-17 Marek Polacek <polacek@redhat.com>
4331
4332 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
4333 (start_function): Use OPT_Wimplicit_int instead of 0.
4334 (store_parm_decls_oldstyle): Likewise.
4335
1bc4a978
MT
43362014-10-17 Alan Modra <amodra@gmail.com>
4337
4338 PR middle-end/61848
4339 * c-decl.c (merge_decls): Don't merge section name or tls model
4340 to newdecl symtab node, instead merge to olddecl. Override
4341 existing olddecl section name. Set tls_model for all thread-local
4342 vars, not just OMP thread-private ones. Remove incorrect comment.
4343
83685514
AM
43442014-10-16 Andrew MacLeod <amacleod@redhat.com>
4345
4346 * c-decl.c: Adjust include files.
4347
78a7c317
DD
43482014-10-14 DJ Delorie <dj@redhat.com>
4349
4350 * c-parser.c (c_parse_init): Add RID entries for each __intN.
4351 (c_token_starts_typename): Check all __intN, not just __int128.
4352 (c_token_starts_declspecs): Likewise.
4353 (c_parser_declspecs): Likewise.
4354 (c_parser_attribute_any_word): Likewise.
4355 (c_parser_objc_selector): Likewise.
4356 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
4357 (struct c_declspecs): Add int_n_idx field to record *which* __intN
4358 is specified.
4359 * c-decl.c (declspecs_add_type): Check for all __intN, not just
4360 __int128.
4361 (finish_declspecs): Likewise.
4362
74d98c1e
AB
43632014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
4364
8e745a17 4365 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 4366 the duplicate code.
8e745a17 4367 (c_parser_statement): Call the new function.
74d98c1e 4368
84937de2
MP
43692014-10-09 Marek Polacek <polacek@redhat.com>
4370
4371 PR c/63480
4372 * c-typeck.c (pop_init_level): Don't warn about initializing
4373 with { }.
4374
0382aaa0
MP
43752014-10-07 Marek Polacek <polacek@redhat.com>
4376
4377 PR c/59717
4378 * c-decl.c (header_for_builtin_fn): New function.
4379 (implicitly_declare): Suggest which header to include.
4380
7a0ca710
MP
43812014-10-07 Marek Polacek <polacek@redhat.com>
4382
4383 * c-convert.c (convert): Use error_operand_p.
4384 * c-typeck.c (require_complete_type): Likewise.
4385 (really_atomic_lvalue): Likewise.
4386 (digest_init): Likewise.
4387 (handle_omp_array_sections_1): Likewise.
4388
6bc8a126
MP
43892014-10-03 Marek Polacek <polacek@redhat.com>
4390
4391 PR c/63453
4392 * c-decl.c (pop_scope): Don't warn about "inline function declared
4393 but never defined" for functions marked with gnu_inline attribute.
4394
d90c0a59
JJ
43952014-09-25 Jakub Jelinek <jakub@redhat.com>
4396
4397 PR c++/63249
4398 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
4399 on low_bound and length.
4400
083e891e
MP
44012014-09-24 Marek Polacek <polacek@redhat.com>
4402
4403 PR c/61405
4404 PR c/53874
4405 * c-parser.c: Don't define CPP_KEYWORD.
4406 (c_parser_switch_statement): Pass original type to c_finish_case.
4407 * c-tree.h (c_finish_case): Update declaration.
4408 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
4409 conditionally to c_do_switch_warnings.
4410
8d95fe25
MP
44112014-09-03 Marek Polacek <polacek@redhat.com>
4412
4413 PR c/62024
4414 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
4415 conversions.
4416
9a771876
JJ
44172014-09-02 Jakub Jelinek <jakub@redhat.com>
4418 Balaji V. Iyer <balaji.v.iyer@intel.com>
4419 Igor Zamyatin <igor.zamyatin@intel.com>
4420
4421 * c-parser.c (c_parser_cilk_for): New function.
4422 (c_parser_cilk_grainsize): Likewise.
4423 (c_get_temp_regvar): Likewise.
4424 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
4425 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
4426 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
4427 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
4428 case.
4429
b7679d96
CG
44302014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
4431
4432 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
4433 with using HOST_WIDE_INT without truncation to 'int'
4434
59ea0364
MP
44352014-08-22 Marek Polacek <polacek@redhat.com>
4436
4437 PR c++/62199
4438 * c-typeck.c (parser_build_binary_op): Adjust call to
4439 warn_logical_not_parentheses.
4440
671a475e
IZ
44412014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
4442
4443 PR other/62008
4444 * c-parser.c (c_parser_array_notation): Check for correct
4445 type of an array added.
4446
04159acf
MP
44472014-08-19 Marek Polacek <polacek@redhat.com>
4448
4449 PR c++/62153
4450 * c-typeck.c (build_binary_op): If either operand of a comparison
4451 is a boolean expression, call maybe_warn_bool_compare.
4452
c77935ee
PP
44532014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
4454
4455 PR c/45584
4456 * c-typeck.c (build_c_cast): Do a conversion even when the
4457 TYPE_MAIN_VARIANTs are the same.
4458
35aff4fb
MP
44592014-08-19 Marek Polacek <polacek@redhat.com>
4460
4461 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
4462 pedwarn_c99 instead of pedwarn.
4463 (grokfield): Likewise.
4464 (warn_defaults_to): New function.
4465 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
4466 Unconditionally call pedwarn_c99 instead of pedwarn.
4467 (start_function): Call warn_defaults_to instead of pedwarn_c99.
4468 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
4469 check flag_isoc11 before.
4470 * c-errors.c (pedwarn_c99): Change the return type to bool.
4471 Handle -Wc99-c11-compat.
4472 * c-parser.c (disable_extension_diagnostics): Handle
4473 warn_c99_c11_compat.
4474 (restore_extension_diagnostics): Likewise.
4475 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
4476 instead of pedwarn, don't check flag_isoc11 before.
4477 (c_parser_declspecs): Likewise.
4478 (c_parser_alignas_specifier): Likewise.
4479 (c_parser_alignof_expression): Likewise.
4480 (c_parser_generic_selection): Likewise.
4481 * c-tree.h (pedwarn_c99): Update declaration.
4482 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
4483 of pedwarn_c99.
4484
177cce46
MP
44852014-08-19 Marek Polacek <polacek@redhat.com>
4486
4487 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
4488 to pedwarn_c90.
4489 * c-errors.c: Include "opts.h".
4490 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
4491 * c-parser.c (disable_extension_diagnostics): Handle negative value
4492 of warn_c90_c99_compat, too.
4493 (restore_extension_diagnostics): Likewise.
4494 (c_parser_compound_statement_nostart): Pass
4495 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
4496
6dc99c33
MP
44972014-08-12 Marek Polacek <polacek@redhat.com>
4498
4499 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
4500 Add pedwarn.
4501 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
4502 Likewise.
4503 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
4504
3f8257db 45052014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
4506
4507 PR c/51849
4508 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
4509 Call pedwarn_c90 instead of pedwarn.
4510 (check_bitfield_type_and_width): Likewise.
4511 (declspecs_add_qual): Likewise.
4512 (declspecs_add_type): Likewise.
4513 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
4514 Adjust to only call pedwarn_c90.
4515 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
4516 pedwarn_c90 instead of pedwarn.
4517 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
4518 * c-parser.c (disable_extension_diagnostics): Handle
4519 warn_c90_c99_compat.
4520 (restore_extension_diagnostics): Likewise.
4521 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
4522 pedwarn_c90 instead of pedwarn.
4523 (c_parser_initelt): Likewise.
4524 (c_parser_postfix_expression): Likewise.
4525 (c_parser_postfix_expression_after_paren_type): Likewise.
4526 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
4527 * c-tree.h: Fix formatting.
4528 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
4529 pedwarn_c90 instead of pedwarn.
4530
9f25a338
TS
45312014-08-07 Trevor Saunders <tsaunders@mozilla.com>
4532
4533 * c-typeck.c: Remove include of pointer-set.h.
4534
044331a8
MP
45352014-08-07 Marek Polacek <polacek@redhat.com>
4536
4537 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
4538
b787e7a2
TS
45392014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4540
4541 * c-typeck.c: Use hash_map instead of pointer_map.
4542
6e2830c3
TS
45432014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4544
4545 * c-decl.c: Use hash_set instead of pointer_set.
4546
a7ee52fb
IZ
45472014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
4548
4549 PR middle-end/61455
4550 * c-array-notation.c (expand_array_notations): Handling
4551 of DECL_EXPR added.
4552
b4dfdc11
MG
45532014-07-31 Marc Glisse <marc.glisse@inria.fr>
4554
4555 PR c++/60517
4556 * c-typeck.c (c_finish_return): Return 0 instead of the address of
4557 a local variable.
4558
976d5a22
TT
45592014-07-30 Tom Tromey <tromey@redhat.com>
4560
4561 * c-typeck.c (struct constructor_stack) <designator_depth>: New
4562 field.
4563 (really_start_incremental_init, push_init_level): Initialize
4564 designator_depth.
4565 (pop_init_level): Set global designator_depth.
4566 (process_init_element): Check for designated_init attribute.
4567
30281de2
MP
45682014-07-20 Marek Polacek <polacek@redhat.com>
4569
4570 PR c/61852
4571 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
4572 (implicitly_declare): Pass location to implicit_decl_warning.
4573
b108f48f
JJ
45742014-07-14 Jakub Jelinek <jakub@redhat.com>
4575
4576 PR middle-end/61294
4577 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
4578 If non-NULL, call c_parser_check_literal_zero.
4579 (c_parser_check_literal_zero): New function.
4580 (c_parser_postfix_expression_after_primary): Adjust
4581 c_parser_expr_list caller, handle -Wmemset-transposed-args.
4582
773ec47f
MP
45832014-07-06 Marek Polacek <polacek@redhat.com>
4584
4585 PR c/6940
4586 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4587 * c-tree.h (C_ARRAY_PARAMETER): Define.
4588 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4589 function parameter.
4590
22e1cf1c 45912014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 4592 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
4593
4594 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4595 releasing symbol.
4596
52ec0ea3
MP
45972014-07-01 Marek Polacek <polacek@redhat.com>
4598
4599 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4600 instead of 0 to WARN_FOR_ASSIGNMENT.
4601
d5c3d343
MP
46022014-07-01 Marek Polacek <polacek@redhat.com>
4603
4604 PR c/58286
4605 * c-typeck.c (convert_for_assignment): Pass
4606 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4607
6a7253a4
MP
46082014-06-30 Marek Polacek <polacek@redhat.com>
4609
4610 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4611 has no_sanitize_undefined attribute.
4612
5e88a8f4
IZ
46132014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
4614
4615 PR middle-end/57541
4616 * c-array-notation.c (fix_builtin_array_notation_fn):
4617 Check for 0 arguments in builtin call. Check that bultin argument is
4618 correct.
4619 * c-parser.c (c_parser_array_notation): Check for incorrect initial
4620 index.
4621
9698b078
SH
46222014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
4623
4624 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
4625 qualifiers in __auto_type for atomic types.
4626 (c_parser_typeof_specifier): Discard all type qualifiers in
4627 __typeof__ for atomic types.
4628
6e07c515
MP
46292014-06-25 Marek Polacek <polacek@redhat.com>
4630
4631 PR c/61162
4632 * c-parser.c (c_parser_statement_after_labels): Pass the location of
4633 the return expression to c_finish_return.
4634
da6f124d
JJ
46352014-06-25 Jakub Jelinek <jakub@redhat.com>
4636
4637 * c-typeck.c (c_finish_omp_clauses): Make sure
4638 OMP_CLAUSE_LINEAR_STEP has correct type.
4639
c203e8a7
TS
46402014-06-24 Trevor Saunders <tsaunders@mozilla.com>
4641
4642 * c-decl.c: Adjust.
4643
56ad0e38
JJ
46442014-06-24 Jakub Jelinek <jakub@redhat.com>
4645
4646 * c-parser.c (c_parser_omp_for_loop): For
4647 #pragma omp parallel for simd move lastprivate clause from parallel
4648 to for rather than simd.
4649
47c2554f
MP
46502014-06-23 Marek Polacek <polacek@redhat.com>
4651
4652 * c-typeck.c (parser_build_binary_op): Don't call
4653 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
4654
56363ffd
JH
46552014-06-15 Jan Hubicka <hubicka@ucw.cz>
4656
4657 * c-parser.c (c_parser_omp_threadprivate): Likewise.
4658 * c-decl.c (merge_decls): Likewise.
4659
d7ff7ae5
MP
46602014-06-09 Marek Polacek <polacek@redhat.com>
4661
4662 PR c/36446
4663 * c-typeck.c (error_init): Call inform instead of error_at.
4664 (pedwarn_init): Call inform instead of pedwarn.
4665 (warning_init): Call inform instead of warning_at.
4666
24d047a3
JH
46672014-06-07 Jan Hubicka <hubicka@ucw.cz>
4668
4669 * c-decl.c (merge_decls): Use set_decl_section_name.
4670 (duplicate_decls): Remove node if it exists.
4671
9bac5cbb
G
46722014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
4673
4674 PR c/53119
4675 * c-typeck.c (push_init_level, process_init_element,
4676 pop_init_level): Correct check for zero initialization, move
4677 missing brace warning to respect zero initialization.
4678
8ffcdea8
MP
46792014-06-05 Marek Polacek <polacek@redhat.com>
4680
4681 PR c/56724
4682 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
4683
742938c9
MP
46842014-06-05 Marek Polacek <polacek@redhat.com>
4685
4686 PR c/49706
4687 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
4688 on the left hand side operand of a comparison.
4689
6447c55d
MP
46902014-06-05 Marek Polacek <polacek@redhat.com>
4691
4692 PR c/48062
4693 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
4694 Print note only if the warning was printed.
4695
9dc7743c
IZ
46962014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
4697
4698 PR c/58942
4699 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4700 with a pointer.
4701
fedfecef
MP
47022014-06-03 Marek Polacek <polacek@redhat.com>
4703
4704 PR c/60439
4705 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4706 c_start_case.
4707 * c-tree.h (c_start_case): Update.
4708 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
4709 switch condition has boolean value.
4710
9b2b7279
AM
47112014-06-02 Andrew MacLeod <amacleod@redhat.com>
4712
4713 * c-decl.c: Include builtins.h.
4714 * c-parser.c: Likewise.
4715
5c1bc275
MP
47162014-05-27 Marek Polacek <polacek@redhat.com>
4717
4718 PR c/56724
4719 * c-typeck.c (convert_arguments): Get location of a parameter. Change
4720 error and warning calls to error_at and warning_at. Pass location of
4721 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
4722 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4723 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
4724
97563bc8
IZ
47252014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
4726
4727 PR c/61191
4728 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4729 function parameters.
4730
aede2c10
JH
47312014-05-23 Jan Hubicka <hubicka@ucw.cz>
4732
4733 * c-decl.c (merge_decls): Preserve symtab node pointers.
4734 (duplicate_decls): Free new decl.
4735
edbba2ce
TS
47362014-05-23 Thomas Schwinge <thomas@codesourcery.com>
4737
f3316c6d
TS
4738 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4739 initialization.
4740
edbba2ce
TS
4741 * c-parser.c (c_parser_omp_target): Return bool values.
4742
68c81f24
TS
47432014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4744
4745 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4746 num_teams_loc variable to num_thread_limit_loc.
4747
632f2871
RS
47482014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4749
4750 * c-array-notation.c (expand_array_notations): Use void_node
4751 instead of void_zero_node.
4752
766090c2
TS
47532014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4754
4755 * c-decl.c (finish_struct): Adjust.
4756 (finish_enum): Likewise.
4757 (bind): Adjust.
4758 (record_inline_static): Likewise.
4759 (push_scope): Likewise.
4760 (make_label): Likewise.
4761 (lookup_label_for_goto): Likewise.
4762 (finish_struct): Likewise.
4763 (finish_enum): Likewise.
4764 (store_parm_decls): Likewise.
4765 (c_push_function_context): Likewise.
4766 * c-lang.h: Remove usage of variable_size gty attribute.
4767 * c-parser.c (c_parse_init): Adjust.
4768 (c_parse_file): Likewise.
4769
2b107f6b
MP
47702014-05-13 Marek Polacek <polacek@redhat.com>
4771
4772 PR c/61162
4773 * c-typeck.c (convert_for_assignment): Pass location to
4774 WARN_FOR_ASSIGNMENT instead of input_location.
4775
d033409e
MP
47762014-05-10 Marek Polacek <polacek@redhat.com>
4777
4778 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4779 maybe_warn_string_init.
4780 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4781 maybe_warn_string_init.
4782 * c-tree.h (maybe_warn_string_init): Update declaration.
4783 * c-typeck.c (maybe_warn_string_init): Add location parameter.
4784 Call pedwarn_init with loc instead of with input_location.
4785 (digest_init): Pass init_loc to maybe_warn_string_init.
4786 (pop_init_level): Call pedwarn_init with loc instead of with
4787 input_location.
4788 (set_init_index): Likewise.
4789 (process_init_element): Likewise.
4790
ea58ef42
MP
47912014-05-09 Marek Polacek <polacek@redhat.com>
4792
4793 PR c/61096
4794 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4795 (c_parser_initelt): Pass location to set_init_label. Pass array index
4796 location to set_init_index.
4797 * c-tree.h (push_init_level): Update declaration.
4798 (pop_init_level): Likewise.
4799 (set_init_index): Likewise.
4800 (set_init_label): Likewise.
4801 * c-typeck.c (error_init): Add location parameter. Call error_at
4802 instead of error.
4803 (digest_init): Pass init_loc to error_init.
4804 (really_start_incremental_init):
4805 (push_init_level): Add location parameter. Pass loc to pop_init_level
4806 and error_init.
4807 (pop_init_level): Likewise.
4808 (set_designator): Add location parameter. Pass loc to pop_init_level,
4809 push_init_level, and error_init.
4810 (set_init_index): Add location parameter. Pass loc to error_init and
4811 set_designator.
4812 (set_init_label): Likewise.
4813 (output_init_element): Pass loc to error_init.
4814 (process_init_element): Pass loc to error_init, pop_init_level,
4815 pedwarn_init, and push_init_level.
4816
661a0813
MP
48172014-05-09 Marek Polacek <polacek@redhat.com>
4818
4819 PR c/50459
4820 * c-parser.c (c_parser_attributes): Parse the arguments as an
4821 expression-list if the attribute takes identifier.
4822
2793eeab
MP
48232014-05-08 Marek Polacek <polacek@redhat.com>
4824
4825 PR c/61053
4826 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4827 TYPE_ALIGN_UNIT.
4828
f827930a
MP
48292014-05-08 Marek Polacek <polacek@redhat.com>
4830
4831 PR c/61077
4832 * c-decl.c (start_function): Warn for _Atomic-qualified return type
4833 of main.
4834
1d60af08
KZ
48352014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4836 Mike Stump <mikestump@comcast.net>
4837 Richard Sandiford <rdsandiford@googlemail.com>
4838
4839 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4840 (finish_enum): Use wide-int interfaces.
4841 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4842 * c-typeck.c (build_c_cast): Likewise.
4843 (set_nonincremental_init_from_string): Likewise.
4844 (c_tree_equal): Likewise.
4845
a0e24419
MP
48462014-05-02 Marek Polacek <polacek@redhat.com>
4847
4848 PR c/25801
4849 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
4850 Return size_one_node when the type is not complete.
4851 (pointer_diff): Remove comment.
4852 (build_unary_op): Improve error messages.
4853
19fc9faa
MP
48542014-05-02 Marek Polacek <polacek@redhat.com>
4855
4856 * c-typeck.c (c_finish_return): Separate warning_at calls.
4857
63bc4e87
MP
48582014-05-02 Marek Polacek <polacek@redhat.com>
4859
4860 * c-tree.h (error_init): Remove declaration.
4861 (pedwarn_init): Likewise.
4862 * c-typeck.c (error_init): Make static and move above.
4863 (pedwarn_init): Likewise.
4864 (warning_init): Move above.
4865 (maybe_warn_string_init): Likewise.
4866
4bd2511b
JL
48672014-05-01 Jeff Law <law@redhat.com>
4868
4869 Revert:
4870
4871 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4872 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
4873 avoid goto.
4874
6a358dcb
MP
48752014-05-02 Marek Polacek <polacek@redhat.com>
4876
4877 PR c/60784
4878 * c-typeck.c (push_init_level): Set constructor_designated to
4879 p->designated for structures.
4880
ae5ebda4
MP
48812014-05-01 Marek Polacek <polacek@redhat.com>
4882
4883 PR c/60915
4884 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4885 function-definition has an attribute after the declarator.
4886
96b40f8d
MP
48872014-05-01 Marek Polacek <polacek@redhat.com>
4888
4889 PR c/60257
4890 * c-typeck.c (warning_init): Add location_t parameter. Call
4891 warning_at instead of warning.
4892 (push_init_level): Pass input_location to warning_init.
4893 (add_pending_init): Add location_t parameter. Pass loc to
4894 warning_init.
4895 (set_nonincremental_init): Pass input_location to add_pending_init.
4896 (set_nonincremental_init_from_string): Likewise.
4897 (output_init_element): Pass loc to warning_init and to
4898 add_pending_init.
4899
32e00768
MP
49002014-05-01 Marek Polacek <polacek@redhat.com>
4901
4902 PR c/43395
4903 * c-typeck.c (c_finish_return): Distinguish between label and variable
4904 when warning about returning local address.
4905
c9379ce2
MP
49062014-05-01 Marek Polacek <polacek@redhat.com>
4907
4908 PR c/29467
4909 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
4910 in C89 mode.
4911
d00887e8
MP
49122014-05-01 Marek Polacek <polacek@redhat.com>
4913
4914 PR c/43245
4915 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
4916 instead of 0 to WARN_FOR_QUALIFIERS.
4917
5436fa2e
MP
49182014-05-01 Marek Polacek <polacek@redhat.com>
4919
4920 PR c/56989
4921 * c-typeck.c (default_conversion): Use better location for
4922 error call.
4923
f8ed5150
MP
49242014-04-30 Marek Polacek <polacek@redhat.com>
4925
4926 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
4927 also when SANITIZE_FLOAT_DIVIDE is on.
4928
8337d1db
MP
49292014-04-30 Marek Polacek <polacek@redhat.com>
4930
4931 PR c/60139
4932 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
4933 and pedwarn_init. Use loc insted of input_location.
4934
c4bdc42f
MP
49352014-04-30 Marek Polacek <polacek@redhat.com>
4936
4937 PR c/60351
4938 * c-typeck.c (build_binary_op): Use location when warning about
4939 shift count.
4940
45484dcf
MP
49412014-04-25 Marek Polacek <polacek@redhat.com>
4942
4943 PR c/18079
4944 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
4945 always_inline/noinline and hot/cold attributes.
4946
34cf811f
MP
49472014-04-25 Marek Polacek <polacek@redhat.com>
4948
4949 PR c/60114
4950 * c-parser.c (c_parser_initelt): Pass input_location to
4951 process_init_element.
4952 (c_parser_initval): Pass loc to process_init_element.
4953 * c-tree.h (process_init_element): Adjust declaration.
4954 * c-typeck.c (push_init_level): Pass input_location to
4955 process_init_element.
4956 (pop_init_level): Likewise.
4957 (set_designator): Likewise.
4958 (output_init_element): Add location_t parameter. Pass loc to
4959 digest_init.
4960 (output_pending_init_elements): Pass input_location to
4961 output_init_element.
4962 (process_init_element): Add location_t parameter. Pass loc to
4963 output_init_element.
4964
42056eac
JJ
49652014-04-24 Jakub Jelinek <jakub@redhat.com>
4966
4967 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
4968 atomic-clause, allow comma in between atomic-clause and
4969 seq_cst.
4970
e162a134
JJ
49712014-04-22 Jakub Jelinek <jakub@redhat.com>
4972
4973 PR c/59073
4974 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
4975 fails, don't set OM_PARALLEL_COMBINED and return NULL.
4976
2f6babac
IZ
49772014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
4978
4979 PR middle-end/60469
4980 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4981 create_tmp_var instead build_decl for creating temps.
4982 (build_array_notation_expr): Likewise.
4983 (fix_conditional_array_notations_1): Likewise.
4984 (fix_array_notation_expr): Likewise.
4985 (fix_array_notation_call_expr): Likewise.
4986
8edbfaa6
JJ
49872014-03-28 Jakub Jelinek <jakub@redhat.com>
4988
4989 PR c++/60689
4990 * c-tree.h (c_build_function_call_vec): New prototype.
4991 * c-typeck.c (build_function_call_vec): Don't call
4992 resolve_overloaded_builtin here.
4993 (c_build_function_call_vec): New wrapper function around
4994 build_function_call_vec. Call resolve_overloaded_builtin here.
4995 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
4996 Call c_build_function_call_vec instead of build_function_call_vec.
4997 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4998 * c-decl.c (finish_decl): Likewise.
4999
7485aeea
MLI
50002014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5001
5002 PR c/55383
5003 * c-typeck.c: Use correct format string in cast-qual warning
5004
b17a8b07
TS
50052014-03-07 Thomas Schwinge <thomas@codesourcery.com>
5006
5007 * c-decl.c (c_decl_attributes): Use
5008 lang_hooks.types.omp_mappable_type.
5009 * c-typeck.c (c_finish_omp_clauses): Likewise.
5010
3af9c5e9
MP
50112014-03-06 Marek Polacek <polacek@redhat.com>
5012
5013 PR c/60197
5014 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
5015 of checking tree code.
5016
1c9f5f33
PK
50172014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5018
5019 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
5020 (c_parser_parameter_declaration): Likewise.
5021
cc28fc7f
MP
50222014-02-19 Marek Polacek <polacek@redhat.com>
5023
5024 PR c/60195
5025 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
5026 Call mark_exp_read on exp.value.
5027 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
5028 TREE_ADDRESSABLE on old instead of val.
5029 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
5030
b581c05c
PK
50312014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5032
5033 * c-parser.c (c_parser_get_builtin_args): Replace calls to
5034 C_EXPR_APPEND by vec_safe_push.
5035 * c-tree.h (C_EXPR_APPEND): Remove.
5036
81e5eca8
MP
50372014-01-31 Marek Polacek <polacek@redhat.com>
5038
5039 PR c/59963
5040 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
5041 build_function_call_vec.
5042 (build_function_call): Likewise.
5043 (build_atomic_assign): Likewise.
5044 (build_function_call_vec): Add arg_loc parameter. Use it.
5045 (convert_arguments): Likewise.
5046 (convert_for_assignment): Rename rhs_loc to expr_loc.
5047 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
5048 (c_parser_objc_keywordexpr): Likewise.
5049 (c_parser_postfix_expression_after_primary): Call
5050 build_function_call_vec with expr_loc rather than op_loc.
5051 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
5052 build_function_call_vec.
5053 (c_parser_expr_list): Add locations parameter. Fill it with locations
5054 of function arguments.
5055 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
5056
68fca595
MP
50572014-01-30 Marek Polacek <polacek@redhat.com>
5058
5059 PR c/59940
5060 * c-typeck.c (build_function_call_vec): Use loc parameter.
5061 (convert_arguments): Add location parameter. Use it.
5062 (ep_convert_and_check): Likewise.
5063 (build_atomic_assign): Adjust convert_for_assignment call.
5064 (build_modify_expr): Likewise.
5065 (digest_init): Likewise.
5066 (c_finish_return): Likewise.
5067 (build_conditional_expr): Adjust ep_convert_and_check calls.
5068 (convert_for_assignment): Add rhs_loc parameter. Use it.
5069 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
5070 calls.
5071
fa337f3a
RB
50722014-01-30 Richard Biener <rguenther@suse.de>
5073
5074 PR c/59905
5075 * c-typeck.c (build_function_call_vec): Do not replace calls
5076 to a function via an incompatible type with a runtime abort.
5077
b72271b9
BI
50782014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
5079
5080 * c-parser.c (c_parser_declaration_or_fndef): Replaced
5081 flag_enable_cilkplus with flag_cilkplus.
5082 (c_parser_direct_declarator_inner): Likewise.
5083 (c_parser_attribute_any_word): Likewise.
5084 (c_parser_attributes): Likewise.
5085 (c_parser_compound_statement): Likewise.
5086 (c_parser_statement_after_labels): Likewise.
5087 (c_parser_if_statement): Likewise.
5088 (c_parser_switch_statement): Likewise.
5089 (c_parser_do_statement): Likewise.
5090 (c_parser_for_statement): Likewise.
5091 (c_parser_unary_expression): Likewise.
5092 (c_parser_postfix_expression): Likewise.
5093 (c_parser_postfix_expression_after_primary): Likewise.
5094 (c_parser_postfix_expression_after_primary): Likewise.
5095 (c_parser_omp_clause_name): Likewise.
5096 (c_finish_omp_declare_simd): Likewise.
5097 (c_parser_cilk_verify_simd): Likewise.
5098 * c-typeck.c (build_array_ref): Likewise.
5099 (build_function_call_vec): Likewise.
5100 (convert_arguments): Likewise.
5101 (build_compound_expr): Likewise.
5102 (c_finish_return): Likewise.
5103 (c_finish_if_stmt): Likewise.
5104 (c_finish_loop): Likewise.
5105 (build_binary_op): Likewise.
5106
393e8e8b
MP
51072014-01-23 Marek Polacek <polacek@redhat.com>
5108
5109 PR c/59846
5110 * c-typeck.c (parser_build_binary_op): Use location instead of
5111 input_location.
5112 (build_binary_op): Pass location to shorten_compare.
5113
f04dda30
MP
51142014-01-23 Marek Polacek <polacek@redhat.com>
5115
5116 PR c/58346
5117 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
5118 an empty aggregate.
5119
789eadcd
MP
51202014-01-23 Marek Polacek <polacek@redhat.com>
5121
5122 PR c/59871
5123 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
5124 of a comma expression.
5125 (emit_side_effect_warnings): Likewise.
5126
40f14e9f
BI
51272014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5128
5129 PR c/59825
5130 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
5131 function to use walk_tree and moved a lot of its functionality to
5132 expand_array_notations.
5133 (expand_array_notations): New function.
5134
74558dd9
BI
51352014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5136
5137 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
5138 attribute an attribute without value.
5139
652fea39
JJ
51402014-01-23 Jakub Jelinek <jakub@redhat.com>
5141
5142 PR middle-end/58809
5143 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
5144 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
5145
f34f1c87
MP
51462014-01-22 Marek Polacek <polacek@redhat.com>
5147
5148 PR c/59891
5149 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
5150 of remove_c_maybe_const_expr on op1 and op2.
5151
241f845a
JJ
51522014-01-15 Jakub Jelinek <jakub@redhat.com>
5153
5154 PR c/58943
5155 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
5156 effects, preevaluate rhs using SAVE_EXPR first.
5157
9a74f20c
BI
51582014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
5159
5160 PR c++/59631
5161 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
5162 statements with if-elseif statements.
5163
96066ce1
MP
51642014-01-06 Marek Polacek <polacek@redhat.com>
5165
5166 PR c/57773
5167 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
5168 defined bit-field types only in ISO C.
5169
23a5b65a
RS
51702014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5171
5172 Update copyright years
5173
f9030485
RS
51742014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5175
5176 * c-array-notation.c: Use the standard form for the copyright notice.
5177
41958c28
BI
51782013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
5179
5180 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
5181 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
5182 field in parser is not empty. If not-empty, call the function
5183 c_parser_finish_omp_declare_simd.
5184 (c_parser_cilk_clause_vectorlength): Modified function to be shared
5185 between SIMD-enabled functions and #pragma simd. Added new parameter.
5186 (c_parser_cilk_all_clauses): Modified the usage of the function
5187 c_parser_cilk_clause_vectorlength as mentioned above.
5188 (c_parser_cilk_simd_fn_vector_attrs): New function.
5189 (c_finish_cilk_simd_fn_tokens): Likewise.
5190 (is_cilkplus_vector_p): Likewise.
5191 (c_parser_omp_clause_name): Added checking for "vectorlength,"
5192 "nomask," and "mask" strings in clause name.
5193 (c_parser_omp_all_clauses): Added 3 new case statements:
5194 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
5195 PRAGMA_CILK_CLAUSE_NOMASK.
5196 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
5197 check for vector attribute and if so call the function
5198 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
5199 called the function c_finish_cilk_simd_fn_tokens.
5200 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
5201 parser field is non-empty. If so, parse them as you would parse
5202 the omp declare simd pragma.
5203 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
5204 Added a check when step is a parameter and flag it as error.
5205 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
5206 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
5207 pragma_omp_clause.
5208
cef0fd0e
TS
52092013-12-17 Thomas Schwinge <thomas@codesourcery.com>
5210
5211 * c-parser.c (c_parser_omp_parallel): Fix description.
5212
12893402
BI
52132013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
5214
5215 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
5216 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5217 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
5218 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
5219
296674db
JM
52202013-12-04 Joseph Myers <joseph@codesourcery.com>
5221
5222 PR c/52023
5223 * c-parser.c (c_parser_alignas_specifier): Use
5224 c_sizeof_or_alignof_type instead of c_alignof.
5225 (c_parser_alignof_expression): Likewise, with min_alignof
5226 parameter depending on alignof spelling used.
5227
edd28054
MP
52282013-12-04 Marek Polacek <polacek@redhat.com>
5229
5230 PR c/54113
5231 * c-decl.c (start_function): Don't warn for missing prototype for
5232 inline functions.
5233
da0fc454
MP
52342013-12-03 Marek Polacek <polacek@redhat.com>
5235
5236 PR c/59351
5237 * c-decl.c (build_compound_literal): Allow compound literals with
5238 empty initial value.
5239
4c2ecab0
JM
52402013-12-02 Joseph Myers <joseph@codesourcery.com>
5241
5242 PR c/58235
5243 * c-typeck.c (build_modify_expr): Diagnose assignment to
5244 expression with array type.
5245
340baef7
JM
52462013-11-29 Joseph Myers <joseph@codesourcery.com>
5247
5248 PR c/42262
5249 * c-typeck.c (process_init_element): Do not treat a string as
5250 initializing a whole array when used with a designator for an
5251 individual element.
5252
6763b9f7
JM
52532013-11-29 Joseph Myers <joseph@codesourcery.com>
5254
5255 PR c/57574
5256 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
5257 an inline function following a static declaration.
5258
e7bd1de1
JJ
52592013-11-28 Jakub Jelinek <jakub@redhat.com>
5260
5261 PR c/59310
5262 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
5263 to p_name before calling c_parser_omp_teams instead of after.
5264 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
5265 argument. Remove unused p_name variable.
5266
0136f8f0
AH
52672013-11-27 Aldy Hernandez <aldyh@redhat.com>
5268 Jakub Jelinek <jakub@redhat.com>
5269
5270 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
5271 external_scope is NULL.
5272
241b71bb
TV
52732013-11-27 Tom de Vries <tom@codesourcery.com>
5274 Marc Glisse <marc.glisse@inria.fr>
5275
5276 PR c++/59032
5277 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
5278
2fb9a547
AM
52792013-11-22 Andrew MacLeod <amacleod@redhat.com>
5280
5281 * c-typeck.c: Add required include files from gimple.h.
5282
8400e75e
DM
52832013-11-22 David Malcolm <dmalcolm@redhat.com>
5284
5285 * c-decl.c (define_label, shadow_tag_warned)
5286 (check_bitfield_type_and_width, grokdeclarator, grokparms,
5287 store_parm_decls_newstyle, store_parm_decls_oldstyle)
5288 (declspecs_add_type): Remove use of in_system_header macro.
5289 * c-parser.c (c_parser_unary_expression): Likewise.
5290 * c-typeck.c (store_init_value, process_init_element)
5291 (c_start_case): Likewise.
5292
5293 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
5294 macro.
5295
5296 * c-parser.c (c_parser_set_source_position_from_token): Remove
5297 reference to in_system_header from comment.
5298
386b1f1f
RS
52992013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5300
5301 * c-decl.c (grokdeclarator): Update comment to refer to
5302 tree_to_[su]hwi rather than tree_low_cst.
5303
ae7e9ddd
RS
53042013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5305
5306 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
5307 tree_to_uhwi throughout.
5308
9439e9a1
RS
53092013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5310
5311 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
5312 throughout.
5313
9541ffee
RS
53142013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5315
5316 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
5317 throughout.
5318
c02065fc
AH
53192013-11-15 Aldy Hernandez <aldyh@redhat.com>
5320
5321 * c-parser.c (c_parser_cilk_simd): New.
5322 (c_parser_cilk_verify_simd): New.
5323 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
5324 (c_parser_omp_for_loop): Add case for NE_EXPR.
5325 Set c_break_label for CILK_SIMD.
5326 (c_parser_cilk_clause_vectorlength): New.
5327 (c_parser_cilk_clause_linear): New.
5328 (c_parser_cilk_clause_name): New.
5329 (c_parser_cilk_all_clauses): New.
5330 * c-typeck.c (build_unary_op): Pass location argument to
5331 readonly_error.
5332 (build_modify_expr): Same.
5333 (build_asm_expr): Same.
5334 (c_finish_bc_stmt): Error on break/continue in loops.
5335
18f429e2
AM
53362013-11-14 Andrew MacLeod <amacleod@redhat.com>
5337
5338 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
5339
d8a2d370
DN
53402013-11-14 Diego Novillo <dnovillo@google.com>
5341
5342 * c-decl.c: Include print-tree.h.
5343 Include stor-layout.h.
5344 Include varasm.h.
5345 Include attribs.h.
5346 Include stringpool.h.
5347 * c-lang.c: Include fold-const.h.
5348 * c-parser.c: Include stringpool.h.
5349 Include attribs.h.
5350 Include stor-layout.h.
5351 Include varasm.h.
5352 Include trans-mem.h.
5353 * c-typeck.c: Include stor-layout.h.
5354 Include trans-mem.h.
5355 Include varasm.h.
5356 Include stmt.h.
5357
38b7bc7f
JM
53582013-11-13 Joseph Myers <joseph@codesourcery.com>
5359
5360 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
5361 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
5362 __auto_type.
5363 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
5364 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
5365 RID_AUTO_TYPE.
5366 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
5367 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
5368 (c_parser_declarator, c_parser_direct_declarator_inner)
5369 (c_parser_parameter_declaration, c_parser_type_name): All callers
5370 changed.
5371 (c_parser_declaration_or_fndef): Handle declarations with type
5372 determined from the initializer.
5373
45b0be94
AM
53742013-11-12 Andrew MacLeod <amacleod@redhat.com>
5375
18f429e2 5376 * c-typeck.c: Include gimplify.h.
45b0be94 5377
582d9b50
JM
53782013-11-12 Joseph Myers <joseph@codesourcery.com>
5379
5380 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
5381 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
5382 comment.
5383 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
5384 or _Thread_local as appropriate in diagnostics.
5385 (build_null_declspecs): Initialize ret->thread_gnu_p.
5386 (declspecs_add_scspec): Handle either __thread or _Thread_local
5387 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
5388 pedantic. Do not disallow _Thread_local extern and _Thread_local
5389 static.
5390
267bac10
JM
53912013-11-07 Joseph Myers <joseph@codesourcery.com>
5392 Andrew MacLeod <amacleod@redhat.com>
5393
5394 * c-aux-info.c (gen_type): Handle atomic qualifier.
5395 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
5396 qualifiers when compating types.
5397 (shadow_tag_warned): Handle atomic_p in declspecs.
5398 (quals_from_declspecs): Likewise.
5399 (start_decl): Use c_type_promotes_to when promoting argument
5400 types.
5401 (grokdeclarator): Handle _Atomic.
5402 (get_parm_info): Diagnose any qualifier on "void" as only
5403 parameter.
5404 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
5405 comparing types. Use c_type_promotes_to when promoting argument
5406 types.
5407 (finish_function): Use c_type_promotes_to when promoting argument
5408 types.
5409 (build_null_declspecs): Handle atomic_p in declspecs.
5410 (declspecs_add_qual): Handle RID_ATOMIC.
5411 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
5412 (c_token_starts_declspecs): Handle RID_ATOMIC.
5413 (c_parser_declspecs): Handle atomic type specifiers and
5414 qualifiers.
5415 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
5416 from types of expressions with atomic type.
5417 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
5418 (c_parser_attribute_any_word): Handle RID_ATOMIC.
5419 (c_parser_initializer, c_parser_initelt, c_parser_initval)
5420 (c_parser_statement_after_labels, c_parser_switch_statement)
5421 (c_parser_for_statement, c_parser_expr_no_commas)
5422 (c_parser_conditional_expression, c_parser_binary_expression)
5423 (c_parser_cast_expression, c_parser_unary_expression)
5424 (c_parser_postfix_expression)
5425 (c_parser_postfix_expression_after_primary, c_parser_expression):
5426 Use convert_lvalue_to_rvalue.
5427 (c_parser_expression_conv, c_parser_expr_list): Document
5428 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
5429 (c_parser_objc_synchronized_statement): Use
5430 convert_lvalue_to_rvalue.
5431 (c_parser_objc_selector): Handle RID_ATOMIC.
5432 (c_parser_objc_receiver, c_parser_array_notation): Use
5433 convert_lvalue_to_rvalue.
5434 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
5435 _Atomic (type-name).
5436 (struct c_declspecs): Add atomic_p field.
5437 (convert_lvalue_to_rvalue): Declare.
5438 * c-typeck.c (c_type_promotes_to): Promote atomic types to
5439 corresponding atomic types.
5440 (qualify_type): Don't add _Atomic qualifiers from second argument.
5441 (comp_target_types): Do not allow _Atomic mismatches.
5442 (type_lists_compatible_p): Do not remove atomic qualifiers when
5443 comparing types.
5444 (really_atomic_lvalue, convert_lvalue_to_rvalue)
5445 (build_atomic_assign): New functions.
5446 (build_unary_op): Use build_atomic_assign for atomic increment and
5447 decrement.
5448 (build_conditional_expr): Do not treat _Atomic void as a qualified
5449 version of void.
5450 (build_modify_expr): Use build_atomic_assign for atomic LHS.
5451 (find_anonymous_field_with_type, convert_to_anonymous_field)
5452 (convert_for_assignment): Do not remove atomic qualifiers when
5453 comparing types.
5454 (digest_init): Do not accept initialization of arrays of atomic
5455 elements by string constants.
5456 (build_asm_expr): Use convert_lvalue_to_rvalue.
5457 (build_binary_op): Do not treat _Atomic void as a qualified
5458 version of void.
5459
0c249d4b
DD
54602013-11-06 DJ Delorie <dj@redhat.com>
5461
5462 * c-decl.c (locate_old_decl): If a previous conflicting decl is
5463 both explicit and builtin, print the location of the explicit one.
5464
6d7f7e0a
TB
54652013-11-05 Tobias Burnus <burnus@net-b.de>
5466
5467 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
5468 c_parser_omp_distribute, c_parser_omp_teams,
5469 c_parser_omp_target, c_parser_omp_declare): Handle
5470 -fopenmp-simd.
5471
b906f4ca
MP
54722013-11-03 Marek Polacek <polacek@redhat.com>
5473
5474 * c-decl.c (grokdeclarator): Add VLA instrumentation.
5475
ee1d5a02
JJ
54762013-11-01 Jakub Jelinek <jakub@redhat.com>
5477
5478 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
5479 check_dup_generic at the end, unless remove is true.
5480 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
5481 remove = true;.
5482 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
5483
5a9785fb
JJ
54842013-10-31 Jakub Jelinek <jakub@redhat.com>
5485
5486 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
5487 with decl that is not pointer nor array.
5488
939b37da
BI
54892013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
5490
5491 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
5492 a spawning function is found.
5493 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
5494 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
5495 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5496 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
5497 case.
5498 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
5499 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
5500 expr.
5501 (c_finish_return): Added a check to reject _Cilk_spawn in return
5502 expression.
5503 (build_cilk_spawn): New function.
5504 (build_cilk_sync): Likewise.
5505 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
5506
d4af74d4
TB
55072013-10-27 Tobias Burnus <burnus@net-b.de>
5508
5509 PR other/33426
5510 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
5511 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
5512 (c_parser_statement_after_labels): Update calls.
5513
d73749df 55142013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
5515
5516 PR other/33426
5517 * c-parser.c (c_parser_pragma, c_parser_for_statement):
5518 Handle PRAGMA_IVDEP.
5519 (c_parser_statement_after_labels): Update call.
5520
f28aa681
MP
55212013-10-24 Marek Polacek <polacek@redhat.com>
5522
5523 * c-parser.c (c_parser_struct_declaration): Add a comment.
5524 (c_parser_declarator): Don't allow _Alignas here.
5525
0645c1a2
AM
55262013-10-17 Andrew MacLeod <amacleod@redhat.com>
5527
5528 * c-parser.c: Include omp-low.h.
5529 * c-typeck.c: Likewise.
5530
568a31f2
MP
55312013-10-17 Marek Polacek <polacek@redhat.com>
5532
5533 PR c/58267
5534 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
5535 Document syntax of the array-declarator.
5536 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
5537 are not permitted.
5538 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
5539 (c_parser_struct_declaration): Likewise.
5540 (c_parser_declarator): Likewise.
5541 (c_parser_direct_declarator_inner): Likewise.
5542 (c_parser_parameter_declaration): Likewise.
5543 (c_parser_type_name): Likewise.
5544
acf0174b
JJ
55452013-10-11 Jakub Jelinek <jakub@redhat.com>
5546
5547 * c-lang.h (current_omp_declare_target_attribute): New extern
5548 decl.
5549 * c-parser.c: Include c-lang.h.
5550 (struct c_parser): Change tokens to c_token *.
5551 Add tokens_buf field. Change tokens_avail type to unsigned int.
5552 (c_parser_consume_token): If parser->tokens isn't
5553 &parser->tokens_buf[0], increment parser->tokens.
5554 (c_parser_consume_pragma): Likewise.
5555 (enum pragma_context): Add pragma_struct and pragma_param.
5556 (c_parser_external_declaration): Adjust
5557 c_parser_declaration_or_fndef caller.
5558 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
5559 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
5560 Adjust recursive call.
5561 (c_parser_struct_or_union_specifier): Use pragma_struct instead
5562 of pragma_external.
5563 (c_parser_parameter_declaration): Use pragma_param instead of
5564 pragma_external.
5565 (c_parser_compound_statement_nostart, c_parser_label,
5566 c_parser_for_statement): Adjust
5567 c_parser_declaration_or_fndef callers.
5568 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
5569 it through to c_parser_conditional_expression.
5570 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
5571 pass it through to c_parser_binary_expression. Adjust recursive
5572 call.
5573 (c_parser_binary_expression): Remove prec argument, add
5574 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
5575 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
5576 binop matches it, use build2 instead of parser_build_binary_op.
5577 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
5578 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
5579 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
5580 Handle pragma_struct and pragma_param the same as pragma_external.
5581 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5582 (c_parser_omp_variable_list): Parse array sections for
5583 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5584 (c_parser_omp_clause_collapse): Fully fold collapse expression.
5585 (c_parser_omp_clause_reduction): Handle user defined reductions.
5586 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5587 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5588 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5589 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5590 c_parser_omp_clause_depend, c_parser_omp_clause_map,
5591 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5592 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5593 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5594 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
5595 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
5596 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5597 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
5598 (c_parser_omp_for_loop): Add CODE argument, pass it through
5599 to c_finish_omp_for. Change last argument to cclauses,
5600 and adjust uses to grab parallel clauses from the array of all
5601 the split clauses. Adjust c_parser_binary_expression,
5602 c_parser_declaration_or_fndef and c_finish_omp_for callers.
5603 (omp_split_clauses): New function.
5604 (c_parser_omp_simd): New function.
5605 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5606 Allow the function to be called also when parsing combined constructs,
5607 and call c_parser_omp_simd when parsing for simd.
5608 (c_parser_omp_sections_scope): If section-sequence doesn't start with
5609 #pragma omp section, require exactly one structured-block instead of
5610 sequence of statements.
5611 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5612 Allow the function to be called also when parsing combined constructs.
5613 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
5614 Allow the function to be called also when parsing combined
5615 constructs.
5616 (c_parser_omp_taskgroup, c_parser_omp_cancel,
5617 c_parser_omp_cancellation_point, c_parser_omp_distribute,
5618 c_parser_omp_teams, c_parser_omp_target_data,
5619 c_parser_omp_target_update, c_parser_omp_target,
5620 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
5621 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
5622 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
5623 (c_parser_omp_construct): Add p_name and mask vars. Handle
5624 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
5625 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
5626 and c_parser_omp_sections callers.
5627 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
5628 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5629 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5630 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
5631 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
5632 OMP_CLAUSE_DEPEND.
5633 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5634 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5635 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5636 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5637 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5638 * c-typeck.c: Include tree-inline.h.
5639 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5640 handle_omp_array_sections_1, handle_omp_array_sections,
5641 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5642 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5643 user defined reductions.
5644 (c_tree_equal): New function.
5645 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5646 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5647 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5648 c_check_omp_declare_reduction_r): New prototypes.
5649 * c-decl.c (current_omp_declare_target_attribute): New variable.
5650 (c_decl_attributes): New function.
5651 (start_decl, start_function): Use it instead of decl_attributes.
5652 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5653 c_omp_reduction_decl, c_omp_reduction_lookup,
5654 c_check_omp_declare_reduction_r): New functions.
5655
0a6c2227
TT
56562013-09-25 Tom Tromey <tromey@redhat.com>
5657
5658 * Make-lang.in (c/gccspec.o): Remove.
5659 (CFLAGS-c/gccspec.o): New variable.
5660 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
5661 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
5662 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5663
f3bc55f0
TT
56642013-09-25 Tom Tromey <tromey@redhat.com>
5665
5666 * Make-lang.in (c/gccspec.o): Don't use subshell.
5667
a24d975c
MP
56682013-09-18 Marek Polacek <polacek@redhat.com>
5669
5670 PR sanitize/58443
5671 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5672 Remove unnecessary check.
5673
ce6923c5
MP
56742013-09-18 Marek Polacek <polacek@redhat.com>
5675
5676 PR sanitizer/58411
5677 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
5678 no_sanitize_undefined attribute.
5679
a1e51df9
KT
56802013-09-13 Kai Tietz <ktietz@redhat.com>
5681
5682 PR target/57848
5683 * c-decl.c (c_builtin_function_ext_scope): Remove
5684 wrong assumption that it is never called on prexisting
5685 symbol.
5686
0af94e6f
JR
56872013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
5688
5689 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
5690
20059c8b
GDR
56912013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5692
5693 * c-objc-common.c (c_tree_printer): Tidy.
5694
de5a5fa1
MP
56952013-08-30 Marek Polacek <polacek@redhat.com>
5696
5697 * c-typeck.c (build_binary_op): Add division by zero and shift
5698 instrumentation.
5699
2531a1d9 57002013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 5701 Joseph Myers <joseph@codesourcery.com>
2531a1d9 5702
6e2bcc98 5703 PR c/35649
2531a1d9
JR
5704 * c-typeck.c (c_common_type): Prefer double_type_node over
5705 other REAL_TYPE types with the same precision.
5706 (convert_arguments): Likewise.
5707
025311c4
GDR
57082013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5709
5710 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
5711 (c_initialize_diagnostics): Call a destructor for the early printer.
5712
da6ca2b5
GDR
57132013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5714
5715 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5716 printer initialization.
5717
318cda85 57182013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 5719
318cda85
BI
5720 PR c/57490
5721 * c-array-notation.c (fix_conditional_array_notations_1): Added a
5722 check for truth values.
5723 (expand_array_notation_exprs): Added truth values case. Removed an
5724 unwanted else. Added for-loop to walk through subtrees in default
5725 case.
5726
b066401f
GDR
57272013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5728
5729 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5730
fb48aadc
JM
57312013-07-23 Joseph Myers <joseph@codesourcery.com>
5732
5733 * c-parser.c (struct c_generic_association): Fix typo.
5734
433cc7b0
TT
57352013-07-23 Tom Tromey <tromey@redhat.com>
5736 Joseph Myers <joseph@codesourcery.com>
5737
5738 * c-parser.c (struct c_generic_association): New.
5739 (c_generic_association_d): New typedef.
5740 (c_parser_generic_selection): New function.
5741 (c_parser_postfix_expression): Handle RID_GENERIC.
5742
26d40c3d
JM
57432013-07-13 Jason Merrill <jason@redhat.com>
5744
5745 PR c++/57793
5746 * c-decl.c (finish_struct): Check for too-large class.
5747
ecdbd01a 57482013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
5749
5750 PR c/57821
5751 * c-typeck.c (set_init_index): When folding, check for index overflow.
5752
1141ed3f
BI
57532013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5754
5755 * c-parser.c (c_parser_array_notation): Removed rejection of array
5756 notations in an array of function pointers.
5757
713b46fa
BI
57582013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5759
5760 * c-array-notation.c (make_triplet_val_inv): New function.
5761 (create_cmp_incr): Likewise.
5762 (create_array_refs): Likewise.
5763 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5764 Also modularized common parts between functions and called the function.
5765 (build_array_notation_expr): Likewise.
5766 (fix_conditional_array_notations_1): Likewise.
5767 (fix_array_notation_expr): Likewise.
5768 (fix_array_notation_call_expr): Likewise.
5769
92f20202
MP
57702013-06-18 Marek Polacek <polacek@redhat.com>
5771
5772 PR c/57630
5773 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5774
73a23b06
BI
57752013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
5776
5777 * c-array-notation.c (build_array_notation_expr): Reject array notation
5778 mismatch between LHS and RHS even inside a call_expr. Also, removed
5779 a couple while statements that were dead code.
5780
00b8517d
BI
57812013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
5782
5783 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5784 excessive precision expressions in function parameters. Also removed
5785 couple unwanted while statements.
5786
1509bdda
BI
57872013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5788
5789 * c-array-notation.c (expand_array_notation_exprs): Added
5790 ARRAY_NOTATION_REF case.
5791
d60f1706
BI
57922013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5793
5794 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5795 function to c-family/array-notation-common.c.
5796 (is_cilkplus_reduce_builtin): Likewise.
5797 (find_rank): Likewise.
5798 (extract_array_notation_exprs): Likewise.
5799 (replace_array_notations): Likewise.
5800 (find_inv_trees): Likewise.
5801 (replace_inv_trees): Likewise.
5802 (contains_array_notation_expr): Likewise.
5803 (find_correct_array_notation_type): Likewise.
5804 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5805 (struct inv_list): Moved this to c-family/array-notation-common.c.
5806 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5807
6d6efbb3
BI
58082013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
5809
5810 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5811 reduction functions outside the for-loop. Added a check if the fundecl
5812 is non-NULL. Finally, removed an unwanted if-statement, and made the
5813 body unconditional.
5814
25c22937
BI
58152013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5816
5817 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5818 condition of the if-statement matches the rank of else-block and then-
5819 block when array notations are used.
5820 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5821 expression after the entire function body is parsed.
5822 (c_parser_expr_no_commas): Delayed creating array notation expressions
5823 to the end of function parsing.
5824 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5825 whole if-statement instead of just the condition.
5826 (expand_array_notation_exprs): Added MODIFY_EXPR case.
5827
edd25645
BI
58282013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5829
5830 PR c/57474
5831 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5832 array to NULL_TREE if they are unused. Also added a check for the
5833 field to be NULL before its fields are used in future.
5834
065ce7f1
RO
58352013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5836
5837 PR bootstrap/57450
5838 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5839 (build_array_notation_expr): Likewise.
5840
36536d79
BI
58412013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5842
5843 * c-typeck.c (build_array_ref): Added a check to see if array's
5844 index is greater than one. If true, then emit an error.
5845 (build_function_call_vec): Exclude error reporting and checking
5846 for builtin array-notation functions.
5847 (convert_arguments): Likewise.
5848 (c_finish_return): Added a check for array notations as a return
5849 expression. If true, then emit an error.
5850 (c_finish_loop): Added a check for array notations in a loop
5851 condition. If true then emit an error.
5852 (lvalue_p): Added a ARRAY_NOTATION_REF case.
5853 (build_binary_op): Added a check for array notation expr inside
5854 op1 and op0. If present, we call another function to find correct
5855 type.
5856 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
5857 * c-parser.c (c_parser_compound_statement): Check if array
5858 notation code is used in tree, if so, then transform them into
5859 appropriate C code.
5860 (c_parser_expr_no_commas): Check if array notation is used in LHS
5861 or RHS, if so, then build array notation expression instead of
5862 regular modify.
5863 (c_parser_postfix_expression_after_primary): Added a check for
5864 colon(s) after square braces, if so then handle it like an array
5865 notation. Also, break up array notations in unary op if found.
5866 (c_parser_direct_declarator_inner): Added a check for array
5867 notation.
5868 (c_parser_compound_statement): Added a check for array notation in
5869 a stmt. If one is present, then expand array notation expr.
5870 (c_parser_if_statement): Likewise.
5871 (c_parser_switch_statement): Added a check for array notations in
5872 a switch statement's condition. If true, then output an error.
5873 (c_parser_while_statement): Similarly, but for a while.
5874 (c_parser_do_statement): Similarly, but for a do-while.
5875 (c_parser_for_statement): Similarly, but for a for-loop.
5876 (c_parser_unary_expression): Check if array notation is used in a
5877 pre-increment or pre-decrement expression. If true, then expand
5878 them.
5879 (c_parser_array_notation): New function.
5880 * c-array-notation.c: New file.
5881 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5882
cd192ccc
MS
58832013-05-23 Mike Stump <mikestump@comcast.net>
5884
5885 * c-typeck.c (convert_for_assignment): Handle references to memory
5886 spaces better.
5887
427b248d
JM
58882013-05-16 Jason Merrill <jason@redhat.com>
5889
5890 * Make-lang.in (cc1$(exeext)): Use link mutex.
5891
44d90fe1
PC
58922013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5893
5894 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5895 to simply use OPT_Wpointer_arith.
5896 (build_unary_op): Likewise.
5897
4e7d7b3d
JJ
58982013-04-03 Jakub Jelinek <jakub@redhat.com>
5899
5900 PR c/19449
5901 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
5902 argument. If set, or it temporarily for parsing of the first
5903 argument into force_folding_builtin_constant_p.
5904 (c_parser_postfix_expression): Adjust callers.
5905
839b422f
RB
59062013-03-21 Richard Biener <rguenther@suse.de>
5907
5908 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
5909 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
5910
2ee028f1
MP
59112013-02-12 Marek Polacek <polacek@redhat.com>
5912
5913 PR c/44938
5914 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
5915 origtypes to NULL.
5916
8824edff
JJ
59172013-01-24 Jakub Jelinek <jakub@redhat.com>
5918
5919 PR c/56078
5920 * c-typeck.c (set_nonincremental_init_from_string): If
5921 constructor_max_index is NULL, treat it as if tree_int_cst_lt
5922 returned false.
5923 (process_init_element): Likewise.
5924
eadd3d0d
JJ
59252012-12-20 Jakub Jelinek <jakub@redhat.com>
5926
5927 PR c++/55619
5928 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
5929 argument, don't call default_function_array_conversion
5930 nor c_fully_fold here.
5931 (c_parser_asm_statement): Adjust callers.
5932 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
5933 and outputs here, and call default_function_array_conversion
5934 on inputs that don't need to be addressable.
5935
f8a93a2e
JJ
59362012-12-18 Jakub Jelinek <jakub@redhat.com>
5937
5938 PR c/39464
5939 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
5940 warning require that both c_common_unsigned_type as well as
5941 c_common_signed_type is the same for both mvl and mvr types.
5942
9771b263
DN
59432012-11-16 Diego Novillo <dnovillo@google.com>
5944
5945 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
5946
5947 * c-common.c: Use new vec API in vec.h.
5948 * c-common.h: Likewise.
5949 * c-gimplify.c: Likewise.
5950 * c-pragma.c: Likewise.
5951 * c-pretty-print.c: Likewise.
5952 * c-pretty-print.h: Likewise.
5953 * c-semantics.c: Likewise.
5954 * c-decl.c: Likewise.
5955 * c-parser.c: Likewise.
5956 * c-tree.h: Likewise.
5957 * c-typeck.c: Likewise.
5958
880661a4
JW
59592012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
5960
5961 PR c++/54930
5962 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
5963
077d1abe
MLI
59642012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5965
5966 PR c/53066
5967 * c-decl.c (warn_if_shadowing): Do not warn if a variable
5968 shadows a function, unless the variable is a function or a
5969 pointer-to-function.
5970
3a785c97
JJ
59712012-10-12 Jakub Jelinek <jakub@redhat.com>
5972
5973 PR c/54381
5974 * c-parser.c (struct c_tree_loc_pair): Removed.
5975 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
5976 add location_t * and tree * arguments, fill in array of 3
5977 sizeof_arg trees and corresponding locs.
5978 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
5979 c_parser_expr_list callers.
5980 (c_parser_postfix_expression_after_primary): Likewise. Pass
5981 array of 3 sizeof_arg trees and locs (corresponding to first
5982 3 arguments) to sizeof_pointer_memaccess_warning.
5983
703c8606
LC
59842012-10-09 Lawrence Crowl <crowl@google.com>
5985
5986 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
5987 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
5988 hash table.
5989
5d9de0d0
PC
59902012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
5991
5992 PR c++/54194
5993 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
5994 call.
5995
a212e43f
MG
59962012-10-09 Marc Glisse <marc.glisse@inria.fr>
5997
5998 PR c++/54427
5999 * c-typeck.c: Include c-common.h.
6000 (enum stv_conv): Moved to c-common.h.
6001 (scalar_to_vector): Moved to c-common.c.
6002 (build_binary_op): Adapt to scalar_to_vector's new prototype.
6003 * Make-lang.in: c-typeck.c depends on c-common.h.
6004
3b78de56
AC
60052012-10-04 Arnaud Charlet <charlet@adacore.com>
6006
6007 * c-decl.c (c_write_global_declarations): Fix handling of
6008 -fdump-ada-spec*.
6009
78c60e3d
SS
60102012-09-30 Sharad Singhai <singhai@google.com>
6011
6012 * c-decl.c (c_write_global_declarations): Use a different method
6013 to determine if the dump has ben initialized.
6014
9f33203d
JM
60152012-09-14 Joseph Myers <joseph@codesourcery.com>
6016
6017 PR c/54552
6018 * c-typeck.c (c_cast_expr): When casting to a type requiring
6019 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
6020 c_fully_fold first.
6021
a27d595d
JM
60222012-09-14 Joseph Myers <joseph@codesourcery.com>
6023
6024 PR c/54103
6025 * c-typeck.c (build_unary_op): Pass original argument of
6026 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
6027 any C_MAYBE_CONST_EXPR, if it has integer operands.
6028 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
6029 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
6030 to c_objc_common_truthvalue_conversion, then remove any
6031 C_MAYBE_CONST_EXPR, if they have integer operands. Use
6032 c_objc_common_truthvalue_conversion not
6033 c_common_truthvalue_conversion.
6034 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
6035 call note_integer_operands for arguments with integer operands
6036 that are not integer constants.
6037
9feb29df
JJ
60382012-09-13 Jakub Jelinek <jakub@redhat.com>
6039
6040 PR c/54559
6041 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
6042 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
6043
d409320c
JJ
60442012-08-31 Jakub Jelinek <jakub@redhat.com>
6045
6046 PR c/54428
6047 * c-convert.c (convert): Don't call fold_convert_loc if
6048 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
6049 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
6050 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
6051
6265d07c
JJ
60522012-08-24 Jakub Jelinek <jakub@redhat.com>
6053
6054 PR c/54355
6055 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
6056 for nested and empty_ok arguments in the call to
6057 c_parser_declaration_or_fndef.
6058
1a4049e7
JJ
60592012-08-17 Jakub Jelinek <jakub@redhat.com>
6060
6061 * c-tree.h (c_last_sizeof_arg): Declare.
6062 * c-parser.c (struct c_tree_loc_pair): New type.
6063 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
6064 non-NULL.
6065 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
6066 (c_parser_postfix_expression_after_primary): Likewise. Call
6067 sizeof_pointer_memaccess_warning if needed.
6068 (sizeof_ptr_memacc_comptypes): New function.
6069 * c-typeck.c (c_last_sizeof_arg): New global variable.
6070 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
6071
0229aee9
UB
60722012-07-24 Uros Bizjak <ubizjak@gmail.com>
6073
6074 * c-lang.h (lang_decl): Add variable_size GTY option.
6075
7ee2468b
SB
60762012-07-16 Steven Bosscher <steven@gcc.gnu.org>
6077
6078 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
6079 * Make-lang.in: Fix dependencies.
6080
d4a10d0a
SB
60812012-06-29 Steven Bosscher <steven@gcc.gnu.org>
6082
6083 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
6084 and add language Makefile hooks.
6085 * config-lang.in: New file.
6086 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
6087 add the required "normal" config-lang.in rules.
6088 * c-lang.h: Moved from gcc/ to here.
6089 * c-tree.h: Likewise.
6090 * c-objc-common.c: Likewise.
6091 * c-objc-common.h: Likewise.
6092 * c-typeck.c: Likewise.
6093 * c-convert.c: Likewise.
6094 * c-lang.c: Likewise.
6095 * c-aux-info.c: Likewise.
6096 * c-errors.c: Likewise.
6097 * gccspec.c: Likewise.
6098 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
6099 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
6100\f
a5544970 6101Copyright (C) 2012-2019 Free Software Foundation, Inc.
d4a10d0a
SB
6102
6103Copying and distribution of this file, with or without modification,
6104are permitted in any medium without royalty provided the copyright
6105notice and this notice are preserved.
This page took 2.411583 seconds and 5 git commands to generate.