]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
Restore previous behaviour of test
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
fe509359
JJ
12019-01-30 Jakub Jelinek <jakub@redhat.com>
2
3 PR c/89061
4 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
5 * c-decl.c (decl_jump_unsafe): Return false for
6 C_DECL_COMPOUND_LITERAL_P decls.
7 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
8
6a335b96
JJ
92019-01-29 Jakub Jelinek <jakub@redhat.com>
10
f4b7e754
JJ
11 PR c/89045
12 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
13 scope.
14
6a335b96
JJ
15 PR c/86125
16 * c-decl.c (last_fileptr_type): Remove.
17 (last_structptr_types): New variable.
18 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
19 {old,new}rettype instead of the types themselves. Assert
20 last_structptr_types array has the same number of elements
21 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
22 argument oldtype and newtype. Instead of handling
23 just fileptr_type_node specially, handle all builtin_structptr_types
24 pointer nodes. Formatting fix.
25
d8b5a1a0
MS
262019-01-24 Martin Sebor <msebor@redhat.com>
27
28 PR c/86125
29 PR c/88886
30 PR middle-end/86308
31 * c-decl.c (match_builtin_function_types): Add arguments.
32 (diagnose_mismatched_decls): Diagnose mismatched declarations
33 of built-ins more strictly.
34
e21c4491
JJ
352019-01-24 Jakub Jelinek <jakub@redhat.com>
36
37 PR c++/88976
38 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
39 on #pragma omp cancel with different modifiers.
40
420183d9
L
412019-01-18 H.J. Lu <hongjiu.lu@intel.com>
42
43 PR c/51628
44 PR c/88664
45 * c-typeck.c (convert_for_assignment): Upate the
46 warn_for_address_or_pointer_of_packed_member call.
47
17ad43dd
TH
482019-01-16 Tom Honermann <tom@honermann.net>
49 Jason Merrill <jason@redhat.com>
50
51 * c-typeck.c (digest_init): Revised the error message produced for
52 ill-formed cases of array initialization with a string literal.
53 (error_init): Make variadic.
54
5f07d78a
JJ
552019-01-12 Jakub Jelinek <jakub@redhat.com>
56
57 * c-typeck.c (convert_for_assignment): Fix a comment typo.
58
c4581bbf
JJ
592019-01-07 Jakub Jelinek <jakub@redhat.com>
60
61 PR c/88701
62 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
63 if current_function_decl is non-NULL.
64
65c5b1eb
JM
652019-01-07 Joseph Myers <joseph@codesourcery.com>
66
67 PR c/88720
68 PR c/88726
69 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
70 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
71 functions declared but never defined only for external scope, not
72 for other scopes.
73
d8fcab68
JJ
742019-01-07 Jakub Jelinek <jakub@redhat.com>
75
76 PR c++/85052
77 * c-parser.c (c_parser_postfix_expression): Parse
78 __builtin_convertvector.
79
a5544970
JJ
802019-01-01 Jakub Jelinek <jakub@redhat.com>
81
82 Update copyright years.
83
da77eace
L
842018-12-20 H.J. Lu <hongjiu.lu@intel.com>
85
86 PR c/51628
87 * c-typeck.c (convert_for_assignment): Call
88 warn_for_address_or_pointer_of_packed_member.
89
1edf8866
SB
902018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
91
92 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
93 a more specific error message (instead of just falling through).
94
db4fd626
SB
952018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
96
97 * c-parser.c (c_parser_asm_statement): Keep track of the location each
98 asm qualifier is first seen; use that to give nicer "duplicate asm
99 qualifier" messages. Delete 'quals" variable, instead pass the
100 "is_volatile_ flag to build_asm_stmt directly.
101 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
102 * c-typeck.c (build_asm_stmt): Ditto; adjust.
103
9c9cfcbb
SB
1042018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
105
106 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
107 "done" boolean variable.
108
a14feb3c
DM
1092018-12-19 David Malcolm <dmalcolm@redhat.com>
110
111 PR c++/87504
112 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
113 Move from here to gcc-rich-location.h and gcc-rich-location.c.
114 (build_binary_op): Use struct op_location_t and
115 class binary_op_rich_location.
116
6d939173
JJ
1172018-12-11 Jakub Jelinek <jakub@redhat.com>
118
119 PR sanitizer/88426
120 * c-convert.c (convert): Call c_fully_fold before calling
121 ubsan_instrument_float_cast.
122
b7055028
SB
1232018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
124
125 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
126 setting "quals".
127
5b76e75f
SB
1282018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
129
130 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
131 after asm. Pass a flag for it to build_asm_expr.
132 * c-tree.h (build_asm_expr): Update declaration.
133 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
134 set ASM_INLINE_P.
135
30bd42b9
SB
1362018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
137
138 PR inline-asm/55681
139 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
140 combination of volatile and goto, in any order, without repetitions.
141
9df6c0e4
JB
1422018-12-04 James Norris <jnorris@codesourcery.com>
143 Cesar Philippidis <cesar@codesourcery.com>
144 Julian Brown <julian@codesourcery.com>
145
146 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
147 code.
148
f44697b7
RB
1492018-11-30 Richard Biener <rguenther@suse.de>
150
151 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
152 _Literal (type) { ... } as empty aggregate or vector constructor.
153
550dfbdc
MS
1542018-11-29 Martin Sebor <msebor@redhat.com>
155
156 PR c/88091
157 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
158 (convert_arguments): Add comments. Pass additional argument to
159 the function above.
160
673670da
MS
1612018-11-29 Martin Sebor <msebor@redhat.com>
162
163 PR c/88172
164 PR testsuite/88208
165 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
166
db1d09b0
MS
1672018-11-23 Martin Sebor <msebor@redhat.com>
168
169 PR testsuite/88098
170 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
171 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
172
98f08eb8
MS
1732018-11-20 Martin Sebor <msebor@redhat.com>
174
175 * c-parser.c (c_parser_has_attribute_expression): New function.
176 (c_parser_attribute): New function.
177 (c_parser_attributes): Move code into c_parser_attribute.
178 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
179
cd5da983
MS
1802018-11-15 Martin Sebor <msebor@redhat.com>
181
182 PR c/83656
183 * c-decl.c (header_for_builtin_fn): Declare.
184 (diagnose_mismatched_decls): Diagnose declarations of built-in
185 functions without a prototype.
186 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
187 (convert_argument): Same.
188 (convert_arguments): Factor code out into convert_argument.
189 Detect mismatches between built-in formal arguments in calls
190 to built-in without prototype.
191 (build_conditional_expr): Same.
192 (type_or_builtin_type): New function.
193 (convert_for_assignment): Add argument. Conditionally issue
194 warnings instead of errors for mismatches.
195
620e594b
DM
1962018-11-13 David Malcolm <dmalcolm@redhat.com>
197
198 * c-decl.c: Replace "source_location" with "location_t".
199 * c-tree.h: Likewise.
200 * c-typeck.c: Likewise.
201 * gimple-parser.c: Likewise.
202
3179ebae
JJ
2032018-11-09 Jakub Jelinek <jakub@redhat.com>
204
81a227c6
JJ
205 * c-parser.c (c_parser_omp_clause_final): Use
206 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
207 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
208 parsing instead of c_parser_paren_condition.
209 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
210 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
211 c_fully_fold instead of c_parser_condition.
212 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
213 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
214 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
215 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
216 c_parser_expr_no_commas instead of c_parser_expression.
217
98c91c56
JJ
218 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
219 reduction clause with inscan modifier.
220
3179ebae
JJ
221 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
222 clauses other than atomic_default_mem_order.
223
28567c40
JJ
2242018-11-08 Jakub Jelinek <jakub@redhat.com>
225
226 * c-parser.c: Include memmode.h.
227 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
228 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
229 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
230 task_reduction clauses.
231 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
232 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
233 section, or lvalue assignment expression.
234 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
235 (c_parser_omp_clause_lastprivate): Parse optional
236 conditional: modifier.
237 (c_parser_omp_clause_hint): Require constant integer expression rather
238 than just integer expression.
239 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
240 clause.
241 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
242 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
243 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
244 functions.
245 (c_parser_omp_clause_depend): Parse iterator modifier and handle
246 iterators. Parse mutexinoutset and depobj kinds.
247 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
248 callers.
249 (c_parser_omp_all_clauses): Likewise. Handle
250 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
251 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
252 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
253 default memory order from requires directive if any. Adjust
254 c_finish_omp_atomic caller.
255 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
256 (c_parser_omp_flush): Parse flush with memory-order-clause.
257 (c_parser_omp_for_loop): Allow NE_EXPR even in
258 OpenMP loops, adjust c_finish_omp_for caller.
259 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
260 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
261 Allow to be called while parsing combined parallel master.
262 Parse combined master taskloop{, simd}.
263 (c_parser_omp_parallel): Parse combined
264 parallel master{, taskloop{, simd}} constructs.
265 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
266 (OMP_TASKGROUP_CLAUSE_MASK): Define.
267 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
268 (OMP_TASKWAIT_CLAUSE_MASK): Define.
269 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
270 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
271 around teams body. Use SET_EXPR_LOCATION.
272 (c_parser_omp_target_data): Allow target data
273 with only use_device_ptr clauses.
274 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
275 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
276 (c_parser_omp_requires): New function.
277 (c_finish_taskloop_clauses): New function.
278 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
279 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
280 declaration. Disallow in_reduction clause when combined with parallel
281 master.
282 (c_parser_omp_construct): Adjust c_parser_omp_master and
283 c_parser_omp_taskgroup callers.
284 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
285 other than cancel.
286 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
287 like OMP_CLAUSE_REDUCTION.
288 (handle_omp_array_sections): Likewise. Call save_expr on array
289 reductions before calling build_index_type. Handle depend clauses
290 with iterators.
291 (struct c_find_omp_var_s): New type.
292 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
293 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
294 with static, runtime or auto schedule kinds. Call save_expr for whole
295 array reduction sizes. Diagnose reductions with zero sized elements
296 or variable length structures. Diagnose nogroup clause used with
297 reduction clause(s). Handle depend clause with
298 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
299 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
300 some different type for other kinds. Use build_unary_op with
301 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
302 Handle depend clauses with iterators. Remove no longer needed special
303 case that predetermined const qualified vars may be specified in
304 firstprivate clause. Complain if const qualified vars are mentioned
305 in data-sharing clauses other than firstprivate or shared. Use
306 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
307 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
308 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
309 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
310
7e2de6df
DM
3112018-10-29 David Malcolm <dmalcolm@redhat.com>
312
313 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
314 logic for change to name_hint::operator bool.
315 (undeclared_variable): Likewise.
316 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
317 (c_parser_parameter_declaration): Likewise.
318
9f936c86
JM
3192018-10-17 Joseph Myers <joseph@codesourcery.com>
320
321 * c-errors.c (pedwarn_c11): New function.
322 * c-parser.c (disable_extension_diagnostics): Save
323 warn_c11_c2x_compat and set it to 0.
324 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
325 (c_parser_static_assert_declaration_no_semi): Handle
326 _Static_assert without string constant.
327 * c-tree.h (pedwarn_c11): New prototype.
328
033eb567
DM
3292018-10-17 David Malcolm <dmalcolm@redhat.com>
330
331 * Make-lang.in (selftest-c): New.
332 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
333 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
334 from gcc/Makefile.in.
335
0edf3afe
RB
3362018-10-02 Richard Biener <rguenther@suse.de>
337
338 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
339
8313a764
JM
3402018-09-26 Joseph Myers <joseph@codesourcery.com>
341
342 PR c/87390
343 * c-typeck.c (build_binary_op): Use excess precision for
344 comparisons of integers and floating-point for C11 and later.
345
ce6f0888
MJ
3462018-09-26 Martin Jambor <mjambor@suse.cz>
347
348 PR c/87347
349 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
350 comment.
351
9c4a4b3c
DM
3522018-09-17 David Malcolm <dmalcolm@redhat.com>
353
354 * c-objc-common.c (range_label_for_type_mismatch::get_text):
355 Update for new param.
356 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
357 Likewise.
358
80c6d1f4
MJ
3592018-09-17 Martin Jambor <mjambor@suse.cz>
360
361 PR c/63886
362 * c-parser.c: (warn_for_abs): New function.
363 (c_parser_postfix_expression_after_primary): Call it.
364
4a426e36
BE
3652018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
366
367 * c-typeck.c (digest_init): Shorten overlength strings.
368
6d900107
BE
3692018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
370
371 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
372
b5764229
BE
3732018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
374
375 * c-decl.c (finish_decl): Call braced_list_to_string here ...
376 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
377
22eea6b2
AM
3782018-08-30 Alexander Monakov <amonakov@ispras.ru>
379
380 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
381 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
382
85204e23
DM
3832018-08-27 David Malcolm <dmalcolm@redhat.com>
384
385 PR 87091
386 * c-decl.c (implicitly_declare): Update call to
387 maybe_add_include_fixit to suggest overriding the location, as it
388 is for a note.
389 * c-objc-common.c (c_tree_printer): Update for conversion of
390 show_caret_p to a tri-state.
391
3d78e008
ML
3922018-08-27 Martin Liska <mliska@suse.cz>
393
394 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
395 fndecl_built_in_p and remove check for FUNCTION_DECL if
396 possible.
3d78e008
ML
397 (diagnose_mismatched_decls): Likewise.
398 (merge_decls): Likewise.
399 (warn_if_shadowing): Likewise.
400 (pushdecl): Likewise.
401 (implicitly_declare): Likewise.
402 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
403 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
404 * c-typeck.c (build_function_call_vec): Likewise.
405 (convert_arguments): Likewise.
406
097f82ec
DM
4072018-08-20 David Malcolm <dmalcolm@redhat.com>
408
409 PR other/84889
410 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
411 (diagnose_mismatched_decls): Likewise, in various places.
412 (warn_if_shadowing): Likewise.
413 (implicit_decl_warning): Likewise.
414 (implicitly_declare): Likewise.
415 (undeclared_variable): Likewise.
416 (declare_label): Likewise.
417 (grokdeclarator): Likewise.
418 (start_function): Likewise.
419 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
420 (c_parser_parameter_declaration): Likewise.
421 (c_parser_binary_expression): Likewise.
422 * c-typeck.c (c_expr_sizeof_expr): Likewise.
423 (parser_build_binary_op): Likewise.
424 (build_unary_op): Likewise.
425 (error_init): Likewise.
426 (pedwarn_init): Likewise.
427 (warning_init): Likewise.
428 (convert_for_assignment): Likewise.
429
96e6ae57
DM
4302018-08-15 David Malcolm <dmalcolm@redhat.com>
431
432 * c-objc-common.c: Include "gcc-rich-location.h".
433 (c_tree_printer): Move implemenation of '%T' to...
434 (print_type): ...this new function.
435 (range_label_for_type_mismatch::get_text): New function.
436 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
437 range for the various ic_argpass cases.
438 (class maybe_range_label_for_tree_type_mismatch): New class.
439 (build_binary_op): Use it when calling binary_op_error.
440
0cd020ae
PK
4412018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
442
443 * c-decl.c (start_decl): Do not warn if variables is named as main
444 and is a local variable.
445
72733314
IS
4462018-08-15 Iain Sandoe <iain@sandoe.co.uk>
447
448 PR c/19315
449 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
450 objects of unknown size.
451
23aa9f7c
MS
4522018-08-13 Martin Sebor <msebor@redhat.com>
453
454 PR tree-optimization/71625
455 * c-parser.c (c_parser_declaration_or_fndef): Call
456 braced_list_to_string.
457
e5e7e50d
BH
4582018-08-03 Bogdan Harjoc <harjoc@gmail.com>
459
460 PR c/86690
461 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
462 errors.
463
8a45b051
MS
4642018-08-01 Martin Sebor <msebor@redhat.com>
465
466 PR tree-optimization/86650
467 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
468 and TREE_BLOCK (t) from within percent_K_format to this callsite.
469
5922dcb5
JJ
4702018-08-01 Jakub Jelinek <jakub@redhat.com>
471
472 PR c/85704
473 * c-typeck.c (init_field_decl_cmp): New function.
474 (output_pending_init_elements): Use it for field comparisons
475 instead of pure bit_position comparisons.
476
9b452033
JJ
4772018-07-12 Jakub Jelinek <jakub@redhat.com>
478
479 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
480 type here, instead add "omp declare target implicit" attribute.
481 (finish_decl): Diagnose vars without mappable type here.
482
829c6349
CLT
4832018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
484 Thomas Schwinge <thomas@codesourcery.com>
485 Cesar Philippidis <cesar@codesourcery.com>
486
487 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
488 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
489 to their non-present_or_* counterparts. Make 'self' an alias to
490 PRAGMA_OACC_CLAUSE_HOST.
491 (c_parser_oacc_data_clause): Update GOMP mappings for
492 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
493 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
494 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
495 Remove support for present_or_* clauses.
496 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
497 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
498 (OACC_DECLARE_CLAUSE_MASK): Likewise.
499 (OACC_DATA_CLAUSE_MASK): Likewise.
500 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
501 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
502 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
503 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
504 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
505
e197e64e
KV
5062018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
507
508 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
509 * gimple-parser.c (c_parser_gimple_statement): Likewise.
510 (c_parser_gimple_unary_expression): Likewise.
511
487f2f61
JJ
5122018-06-15 Jakub Jelinek <jakub@redhat.com>
513
514 PR c/86093
515 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
516 before doing POINTER_DIFF_EXPR.
517
e4d44a37
MP
5182018-06-07 Marek Polacek <polacek@redhat.com>
519
520 PR c/85318
521 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
522 for loop initial declarations.
523
b67b9225
DP
5242018-05-30 David Pagan <dave.pagan@oracle.com>
525
526 PR c/55976
527 * c-decl.c (grokdeclarator): Update check for return type warnings.
528 (start_function): Likewise.
529 (finish_function): Likewise.
530 * c-typeck.c (c_finish_return): Update check for return type warnings.
531 Pass OPT_Wreturn_type to pedwarn when appropriate.
532
c566cc9f
RS
5332018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
534
535 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
536 __FMA_EXPR handlng.
537
e4f81565
RS
5382018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
539
540 * gimple-parser.c: Include internal-fn.h.
541 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
542 (c_parser_gimple_call_internal): New function.
543 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
544 Fix typos in comment.
545
79e7b1fe
JJ
5462018-05-10 Jakub Jelinek <jakub@redhat.com>
547
548 PR c++/85662
549 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
550 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
551 fold_convert_loc.
552 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
553 fold_offsetof_1, pass argtype as TYPE to it and drop the
554 fold_convert_loc.
555
f7584c81
DP
5562018-05-02 David Pagan <dave.pagan@oracle.com>
557
558 PR c/30552
559 * c-decl.c (old_style_parameter_scope): New function.
560 * c-parser.c (c_parser_postfix_expression): Check for statement
561 expressions in old-style function parameter list declarations.
562 * c-parser.h (old_style_parameter_scope): New extern declaration.
563
b33a0cb3
JJ
5642018-04-25 Jakub Jelinek <jakub@redhat.com>
565
566 PR sanitizer/84307
567 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
568 it is not TREE_STATIC.
569 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
570 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
571 its COMPOUND_LITERAL_EXPR_DECL.
572
c5c5822a
JM
5732018-03-21 Joseph Myers <joseph@codesourcery.com>
574
575 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
576 where all functions return the same _FloatN or _FloatNx type,
577 treat integer types as _Float64 instead of double.
578
aa1c9429
JJ
5792018-03-21 Jakub Jelinek <jakub@redhat.com>
580
581 PR c/84999
582 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
583 building vector comparison, diagnose it and return error_mark_node.
584
9bb45a95
JJ
5852018-03-15 Jakub Jelinek <jakub@redhat.com>
586
587 PR c/84853
588 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
589 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
590 INTEGER_TYPE element type.
591
ada6bad9
DP
5922018-03-13 David Pagan <dave.pagan@oracle.com>
593
594 PR c/46921
595 * c-typeck.c (output_init_element): Ensure field initializer
596 expression is always evaluated if there are side effects.
597
849bbdb9
JJ
5982018-03-06 Jakub Jelinek <jakub@redhat.com>
599
600 PR c/84721
601 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
602 !building_stmt_list_p ().
603
d74641bd
RS
6042018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
605
606 PR c/84305
607 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
608 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
609 and include the BIND_EXPR in the list of things that need to be
610 pre-evaluated.
611
0444aa9c
NS
6122018-02-09 Nathan Sidwell <nathan@acm.org>
613
614 PR c/84293
615 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
616 to strict_aliasing_warning.
617
7c30b12a
PC
6182018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
619
620 * c-typeck.c (really_start_incremental_init, push_init_level,
621 set_nonincremental_init, output_init_element, process_init_element):
622 Use DECL_UNNAMED_BIT_FIELD.
623
2be4dfcb
MP
6242018-01-31 Marek Polacek <polacek@redhat.com>
625
626 PR c/81779
627 * c-parser.c (c_parser_compound_statement_nostart): Call
628 expansion_point_location_if_in_system_header.
629
bb9869d5
DM
6302018-01-17 David Malcolm <dmalcolm@redhat.com>
631
632 PR c++/83814
633 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
634 the C part.
635
b4923738
JJ
6362018-01-13 Jakub Jelinek <jakub@redhat.com>
637
638 PR c/83801
639 * c-tree.h (decl_constant_value_1): Add a bool argument.
640 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
641 returning a CONSTRUCTOR if it is true. Use error_operand_p.
642 (decl_constant_value): Adjust caller.
643 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
644 decl_constant_value_1 as IN_INIT. Otherwise, punt if
645 decl_constant_value returns initializer that has BLKmode or
646 array type.
647 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
648
928686b1
RS
6492018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
650 Alan Hayward <alan.hayward@arm.com>
651 David Sherwood <david.sherwood@arm.com>
652
653 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
654 TYPE_VECTOR_SUBPARTS.
655
85ec4feb
JJ
6562018-01-03 Jakub Jelinek <jakub@redhat.com>
657
658 Update copyright years.
659
913884f7
JJ
6602018-01-01 Jakub Jelinek <jakub@redhat.com>
661
662 PR c/83595
663 * c-parser.c (c_parser_braced_init, c_parser_initelt,
664 c_parser_conditional_expression, c_parser_cast_expression,
665 c_parser_sizeof_expression, c_parser_alignof_expression,
666 c_parser_postfix_expression, c_parser_omp_declare_reduction,
667 c_parser_transaction_expression): Use set_error () method instead
668 of setting value member to error_mark_node.
669
c6cfa2bf
MM
6702017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
671
672 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
673 and _Float<N>X built-in functions.
674
11d29d63
JJ
6752017-12-22 Jakub Jelinek <jakub@redhat.com>
676
14ec014e
JJ
677 PR debug/83550
678 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
679 TYPE_STUB_DECL and call rest_of_type_compilation before processing
680 incomplete vars rather than after it.
681
11d29d63
JJ
682 PR debug/83547
683 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
684 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
685 and consider empty ones if there are no other stmts. For
686 -Wunused-value walk all statements before the one only followed by
687 DEBUG_BEGIN_STMTs.
688
170a8bd6 6892017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 690 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
691
692 * c-parser.c (c_parser_while_statement): Add unroll parameter and
693 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
694 (c_parser_do_statement): Likewise.
695 (c_parser_for_statement): Likewise.
696 (c_parser_statement_after_labels): Adjust calls to above.
697 (c_parse_pragma_ivdep): New static function.
698 (c_parser_pragma_unroll): Likewise.
699 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
700 <PRAGMA_UNROLL>: New case.
701
01512446
JJ
7022017-12-19 Jakub Jelinek <jakub@redhat.com>
703
704 * c-typeck.c (comptypes_internal, function_types_compatible_p,
705 perform_integral_promotions, digest_init): Replace Yoda conditions
706 with typical order conditions.
707 * c-decl.c (check_bitfield_type_and_width): Likewise.
708
c65e18d3
BE
7092017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
710
711 * c-typeck.c (c_safe_arg_type_equiv_p,
712 c_safe_function_type_cast_p): New function.
713 (build_c_cast): Implement -Wcast-function-type.
714
b7280579
RB
7152017-12-14 Richard Biener <rguenther@suse.de>
716
717 PR c/83415
718 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
719 like REALPART_EXPR for the behavior of whether its operand
720 is an lvalue.
721
49e6a6c0
MP
7222017-12-12 Marek Polacek <polacek@redhat.com>
723
724 PR c/82679
725 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
726
96a95ac1
AO
7272017-12-12 Alexandre Oliva <aoliva@redhat.com>
728
729 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
730 * c-parser.c (add_debug_begin_stmt): New.
731 (c_parser_declaration_or_fndef): Call it.
732 (c_parser_compound_statement_nostart): Likewise.
733 (c_parser_statement_after_labels): Likewise.
734 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
735
4b2b493f
JM
7362017-12-07 Joseph Myers <joseph@codesourcery.com>
737
738 * c-decl.c (build_compound_literal): Add parameter alignas_align
739 and set alignment of decl if nonzero.
740 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
741 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
742 qualifier.
743 (c_parser_struct_declaration): Update syntax comment.
744 (c_parser_type_name): Add alignas_ok argument and pass it to
745 c_parser_declspecs.
746 (c_parser_cast_expression): Pass true to c_parser_type_name and
747 give error if a cast used an _Alignas specifier.
748 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
749 give error if sizeof (type-name) used an _Alignas specifier.
750 (c_parser_alignof_expression): Pass true to c_parser_type_name and
751 give error if _Alignof (type-name) used an _Alignas specifier.
752 (c_parser_postfix_expression_after_paren_type): Check specified
753 alignment for a compound literal and pass it to
754 build_compound_literal.
755 * c-parser.h (c_parser_type_name): Update prototype.
756 * c-tree.h (build_compound_literal): Update prototype.
757
5d9ae53d
MS
7582017-12-07 Martin Sebor <msebor@redhat.com>
759
760 PR c/81544
761 * c-decl.c (c_decl_attributes): Look up existing declaration and
762 pass it to decl_attributes.
763
c79144f8
DM
7642017-12-06 David Malcolm <dmalcolm@redhat.com>
765
766 PR c/83236
767 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
768 reserved for use by the implementation.
769
613bc14f
DM
7702017-12-06 David Malcolm <dmalcolm@redhat.com>
771
772 * c-decl.c: Include "c-family/c-spellcheck.h".
773
05abad4c
ML
7742017-12-05 Martin Liska <mliska@suse.cz>
775 Jakub Jelinek <jakub@redhat.com>
776
777 * c-typeck.c (pointer_diff): Add new argument and instrument
778 pointer subtraction.
779 (build_binary_op): Similar for pointer comparison.
780
cc6534d4
JJ
7812017-12-01 Jakub Jelinek <jakub@redhat.com>
782
65791f42
JJ
783 PR c/79153
784 * c-parser.c: Include tree-iterator.h.
785 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
786 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
787 on it.
788
cc6534d4
JJ
789 PR c/83222
790 * c-tree.h (decl_constant_value_1): Declare.
791 * c-typeck.c (decl_constant_value_1): New function.
792 (decl_constant_value): Use it.
793 * c-fold.c (c_fully_fold_internal): If in_init, use
794 decl_constant_value_1 instead of decl_constant_value.
795
5de73c05
JJ
7962017-11-30 Jakub Jelinek <jakub@redhat.com>
797
798 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
799
058f0b9e
JJ
8002017-11-28 Jakub Jelinek <jakub@redhat.com>
801
802 PR sanitizer/81275
803 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
804 c_switch_covers_all_cases_p returns true.
805
5e9d6aa4 8062017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 807 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
808
809 * Make-lang.in (c/c-array-notation.o): Remove.
810 * c-array-notation.c: Delete.
811 * c-decl.c: Remove cilkplus condition.
812 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
813 c_parser_cilk_verify_simd, c_parser_array_notation,
814 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
815 c_parser_cilk_simd_fn_vector_attrs,
816 c_finish_cilk_simd_fn_tokens): Delete.
817 (c_parser_declaration_or_fndef): Remove cilkplus condition.
818 (c_parser_direct_declarator_inner): Ditto.
819 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
820 (c_parser_attributes, c_parser_compound_statement,
821 c_parser_statement_after_labels, c_parser_if_statement,
822 c_parser_switch_statement, c_parser_while_statement,
823 c_parser_do_statement, c_parser_for_statement,
824 c_parser_unary_expression, c_parser_postfix_expression,
825 c_parser_postfix_expression_after_primary,
826 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
827 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
828 support.
829 * c-typeck.c (build_array_ref, build_function_call_vec,
830 convert_arguments,
831 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
832 c_finish_loop, build_binary_op): Remove cilkplus support.
833
9e851845
JJ
8342017-11-28 Jakub Jelinek <jakub@redhat.com>
835
836 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
837 of build3.
838
8c7dbea9
BK
8392017-11-14 Boris Kolpackov <boris@codesynthesis.com>
840
841 * Make-lang.in (c.install-plugin): Install backend import library.
842
41521dee
JJ
8432017-11-23 Jakub Jelinek <jakub@redhat.com>
844
845 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
846 pragma_stmt context.
847
ac9effed
EB
8482017-11-23 Mike Stump <mikestump@comcast.net>
849 Eric Botcazou <ebotcazou@adacore.com>
850
851 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
852 ANNOTATE_EXPR.
853 (c_parser_do_statement): Likewise.
854 (c_parser_for_statement): Likewise.
855
ce95abc4
DM
8562017-11-22 David Malcolm <dmalcolm@redhat.com>
857
858 PR c++/62170
859 * c-objc-common.c (c_tree_printer): Convert penultimate param from
860 bool to bool *. Within '%T' handling, if showing an "aka", use
861 "quoted" param to add appropriate quoting.
862
974aedcc
MP
8632017-11-22 Marek Polacek <polacek@redhat.com>
864
865 PR c++/60336
866 PR middle-end/67239
867 PR target/68355
868 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
869
d4300cc6
DM
8702017-11-21 David Malcolm <dmalcolm@redhat.com>
871
872 PR c/83056
873 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
874 earlier failed lookups.
875
1af4ebf5
MG
8762017-11-21 Marc Glisse <marc.glisse@inria.fr>
877
878 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
879 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
880
26edace6
DM
8812017-11-20 David Malcolm <dmalcolm@redhat.com>
882
883 PR c/81404
884 * c-decl.c: Include "c-family/known-headers.h".
885 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
886 to known-headers.cc.
887 (class suggest_missing_header): Move to known-header.h.
888 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
889 than get_c_name_hint.
890
b1212255
DM
8912017-11-20 David Malcolm <dmalcolm@redhat.com>
892
893 * c-decl.c (get_c_name_hint): New function.
894 (class suggest_missing_header): New class.
895 (lookup_name_fuzzy): Call get_c_name_hint and use it to
896 suggest missing headers to the user.
897
6c7a259b
DM
8982017-11-20 David Malcolm <dmalcolm@redhat.com>
899
900 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
901 Include "c-family/name-hint.h"
902 (implicit_decl_warning): Convert "hint" from
903 const char * to name_hint. Pass location to
904 lookup_name_fuzzy. Suppress any deferred diagnostic if the
905 warning was not printed.
906 (undeclared_variable): Likewise for "guessed_id".
907 (lookup_name_fuzzy): Convert return type from const char *
908 to name_hint. Add location_t param.
909 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
910 Include "c-family/name-hint.h"
911 (c_parser_declaration_or_fndef): Convert "hint" from
912 const char * to name_hint. Pass location to lookup_name_fuzzy.
913 (c_parser_parameter_declaration): Likewise.
914
f9c59f7e
JJ
9152017-11-19 Jakub Jelinek <jakub@redhat.com>
916
917 PR c/66618
918 PR c/69960
919 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
920 where needed.
921 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
922 handle_omp_array_sections): Likewise.
923 (digest_init): Don't call decl_constant_value_for_optimization.
924 * c-tree.h (decl_constant_value_for_optimization): Removed.
925 * c-fold.c (c_fold_array_ref): New function.
926 (c_fully_fold_internal): Add LVAL argument, propagate it through
927 recursive calls. For VAR_P call decl_constant_value and
928 unshare if not LVAL and either optimizing or IN_INIT. Remove
929 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
930 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
931 (c_fully_fold): Add LVAL argument, pass it through to
932 c_fully_fold_internal.
933 (decl_constant_value_for_optimization): Removed.
934
3ca0dc60
JM
9352017-11-15 Joseph Myers <joseph@codesourcery.com>
936
937 PR c/81156
938 * c-parser.c (check_tgmath_function): New function.
939 (enum tgmath_parm_kind): New enum.
940 (c_parser_postfix_expression): Handle __builtin_tgmath.
941
64a5912c
DM
9422017-10-31 David Malcolm <dmalcolm@redhat.com>
943
944 * c-decl.c (implicit_decl_warning): Update for renaming of
945 pedwarn_at_rich_loc and warning_at_rich_loc.
946 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
947 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
948 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
949 (c_parser_struct_or_union_specifier): Likewise for renaming of
950 pedwarn_at_rich_loc.
951 (c_parser_parameter_declaration): Likewise for renaming of
952 error_at_rich_loc.
953 * c-typeck.c (build_component_ref): Likewise.
954 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
955 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
956 (set_init_label): Likewise for renaming of error_at_rich_loc.
957
c1136864
RB
9582017-10-30 Richard Biener <rguenther@suse.de>
959
960 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
961 stmts.
962
ee5fd23a
MM
9632017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
964
965 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
966 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
967
1a59ccf2
DM
9682017-10-25 David Malcolm <dmalcolm@redhat.com>
969
970 PR c/7356
971 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
972 semicolons.
973
bc1a75dd
JJ
9742017-10-25 Jakub Jelinek <jakub@redhat.com>
975
976 PR libstdc++/81706
977 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
978 newdecl to corresponding __builtin_ if any.
979
ff1ff960
PC
9802017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
981
982 PR c++/82466
983 * c-decl.c (diagnose_mismatched_decls): Use
984 OPT_Wbuiltin_declaration_mismatch.
985
62e1c678
DM
9862017-10-12 David Malcolm <dmalcolm@redhat.com>
987
988 * c-parser.c (c_parser_require): Add "type_is_unique" param and
989 use it to guard calls to maybe_suggest_missing_token_insertion.
990 (c_parser_parms_list_declarator): Override default value of new
991 "type_is_unique" param to c_parser_require.
992 (c_parser_asm_statement): Likewise.
993 * c-parser.h (c_parser_require): Add "type_is_unique" param,
994 defaulting to true.
995
a92f6726
NS
9962017-10-11 Nathan Sidwell <nathan@acm.org>
997
998 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
999
8e6cdc90
RS
10002017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1001
1002 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
1003 operating on trees as wide_ints.
1004 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
1005 (c_tree_equal): Likewise.
1006
8139a48e
DM
10072017-10-04 David Malcolm <dmalcolm@redhat.com>
1008
1009 * c-decl.c (push_parm_decl): Store c_parm's location into the
1010 PARAM_DECL.
1011 (build_c_parm): Add "loc" param and store it within the c_parm.
1012 * c-parser.c (struct c_parser): Add "last_token_location" field.
1013 (c_parser_consume_token): Store location of the token into the
1014 new field.
1015 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
1016 when handling a FUNCTION_DECL, if it doesn't already have them.
1017 (c_parser_parameter_declaration): Generate a location for the
1018 parameter, and pass it to the call to build_c_parm.
1019 * c-tree.h (struct c_parm): Add field "loc".
1020 (build_c_parm): Add location_t param.
1021 * c-typeck.c (get_fndecl_argument_location): New function.
1022 (inform_for_arg): New function.
1023 (convert_for_assignment): Use inform_for_arg when dealing with
1024 ic_argpass.
1025
2a389958
JJ
10262017-09-29 Jakub Jelinek <jakub@redhat.com>
1027
7d386d45
JJ
1028 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
1029 width is non-NULL.
1030 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
1031 don't SET_DECL_C_BIT_FIELD here.
1032
2a389958
JJ
1033 PR c/82340
1034 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
1035 instead of trying to set just TREE_READONLY manually.
1036
ebc6a85e
TV
10372017-09-16 Tom de Vries <tom@codesourcery.com>
1038
1039 PR c/81875
1040 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
1041 cond itself.
1042
bb75facd
JM
10432017-09-15 Joseph Myers <joseph@codesourcery.com>
1044
1045 PR c/82071
1046 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
1047 for C11.
1048 (build_conditional_expr): For C11, generate result with excess
1049 precision when one argument is an integer and the other is of a
1050 type using excess precision.
1051
1d933576
BE
10522017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
1053
1054 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
1055
267bbb6f
MP
10562017-09-13 Marek Polacek <polacek@redhat.com>
1057
1058 PR c/82167
1059 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
1060 than expr.original_type.
1061
6836632e
NS
10622017-09-12 Nathan Sidwell <nathan@acm.org>
1063
1064 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1065 resort_sorted_fields): Moved from c-family/c-common.c.
1066 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
1067
e035be33
JM
10682017-09-01 Joseph Myers <joseph@codesourcery.com>
1069
1070 PR c/82071
1071 * c-typeck.c (build_atomic_assign): Handle argument with excess
1072 precision. Ensure any EXCESS_PRECISION_EXPR is present in
1073 argument passed to build_binary_op and convert_for_assignment but
1074 not for call to c_fully_fold.
1075 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
1076 Ensure build_binary_op is called with argument with original
1077 semantic type. Avoid calling c_fully_fold with an
1078 EXCESS_PRECISION_EXPR from build_binary_op.
1079
d2e05fcb
JJ
10802017-09-01 Jakub Jelinek <jakub@redhat.com>
1081
1082 PR c/81887
1083 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
1084
b397965c
RS
10852017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1086 Alan Hayward <alan.hayward@arm.com>
1087 David Sherwood <david.sherwood@arm.com>
1088
1089 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
1090 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
1091 m1 and m2 to the signed equivalent of a fixed-point
1092 SCALAR_TYPE_MODE.
1093
14e18d71
DM
10942017-08-24 David Malcolm <dmalcolm@redhat.com>
1095
1096 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
1097 than CAN_HAVE_LOCATION_P when determining whether to use the
1098 location_t value within "value".
1099
7f204c0f
DM
11002017-08-21 David Malcolm <dmalcolm@redhat.com>
1101
1102 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
1103 rather than peeking the location of the first token.
1104 * c-tree.h (c_expr::get_location): New method.
1105
2f687306
DM
11062017-08-21 David Malcolm <dmalcolm@redhat.com>
1107
1108 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
1109 to check_function_arguments.
1110
3e7b80d7
MP
11112017-08-18 Marek Polacek <polacek@redhat.com>
1112
1113 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
1114 commentary.
1115
00aa1fa2
L
11162017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1117
1118 PR c/53037
1119 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
1120 (check_bitfield_type_and_width): Don't allow bit-field with
1121 warn_if_not_aligned type.
1122
da67acb9
MS
11232017-08-14 Martin Sebor <msebor@redhat.com>
1124
1125 PR c/81117
1126 * c-objc-common.c (c_objc_common_init): Handle 'G'.
1127
bb85aa74
MP
11282017-08-11 Marek Polacek <polacek@redhat.com>
1129
1130 PR c/81795
1131 * c-decl.c (pushtag): Only print inform if the warning was printed.
1132 (grokdeclarator): Likewise.
1133
32129a17
DM
11342017-08-10 David Malcolm <dmalcolm@redhat.com>
1135
1136 * c-parser.c (c_parser_error): Rename to...
1137 (c_parser_error_richloc): ...this, making static, and adding
1138 "richloc" parameter, passing it to the c_parse_error call,
1139 rather than calling c_parser_set_source_position_from_token.
1140 (c_parser_error): Reintroduce, reimplementing in terms of the
1141 above, converting return type from void to bool.
1142 (class token_pair): New class.
1143 (struct matching_paren_traits): New struct.
1144 (matching_parens): New typedef.
1145 (struct matching_brace_traits): New struct.
1146 (matching_braces): New typedef.
1147 (get_matching_symbol): New function.
1148 (c_parser_require): Add param MATCHING_LOCATION, using it to
1149 highlight matching "opening" tokens for missing "closing" tokens.
1150 (c_parser_skip_until_found): Likewise.
1151 (c_parser_static_assert_declaration_no_semi): Convert explicit
1152 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
1153 class matching_parens, so that the pertinent open parenthesis is
1154 highlighted when there are problems locating the close
1155 parenthesis.
1156 (c_parser_struct_or_union_specifier): Likewise.
1157 (c_parser_typeof_specifier): Likewise.
1158 (c_parser_alignas_specifier): Likewise.
1159 (c_parser_simple_asm_expr): Likewise.
1160 (c_parser_braced_init): Likewise, for matching_braces.
1161 (c_parser_paren_condition): Likewise, for matching_parens.
1162 (c_parser_switch_statement): Likewise.
1163 (c_parser_for_statement): Likewise.
1164 (c_parser_asm_statement): Likewise.
1165 (c_parser_asm_operands): Likewise.
1166 (c_parser_cast_expression): Likewise.
1167 (c_parser_sizeof_expression): Likewise.
1168 (c_parser_alignof_expression): Likewise.
1169 (c_parser_generic_selection): Likewise.
1170 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
1171 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
1172 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
1173 In case CPP_OPEN_PAREN, pass loc_open_paren to the
1174 c_parser_skip_until_found call.
1175 (c_parser_objc_class_definition): Use class matching_parens as
1176 above.
1177 (c_parser_objc_method_decl): Likewise.
1178 (c_parser_objc_try_catch_finally_statement): Likewise.
1179 (c_parser_objc_synchronized_statement): Likewise.
1180 (c_parser_objc_at_property_declaration): Likewise.
1181 (c_parser_oacc_wait_list): Likewise.
1182 (c_parser_omp_var_list_parens): Likewise.
1183 (c_parser_omp_clause_collapse): Likewise.
1184 (c_parser_omp_clause_default): Likewise.
1185 (c_parser_omp_clause_if): Likewise.
1186 (c_parser_omp_clause_num_threads): Likewise.
1187 (c_parser_omp_clause_num_tasks): Likewise.
1188 (c_parser_omp_clause_grainsize): Likewise.
1189 (c_parser_omp_clause_priority): Likewise.
1190 (c_parser_omp_clause_hint): Likewise.
1191 (c_parser_omp_clause_defaultmap): Likewise.
1192 (c_parser_oacc_single_int_clause): Likewise.
1193 (c_parser_omp_clause_ordered): Likewise.
1194 (c_parser_omp_clause_reduction): Likewise.
1195 (c_parser_omp_clause_schedule): Likewise.
1196 (c_parser_omp_clause_num_teams): Likewise.
1197 (c_parser_omp_clause_thread_limit): Likewise.
1198 (c_parser_omp_clause_aligned): Likewise.
1199 (c_parser_omp_clause_linear): Likewise.
1200 (c_parser_omp_clause_safelen): Likewise.
1201 (c_parser_omp_clause_simdlen): Likewise.
1202 (c_parser_omp_clause_depend): Likewise.
1203 (c_parser_omp_clause_map): Likewise.
1204 (c_parser_omp_clause_device): Likewise.
1205 (c_parser_omp_clause_dist_schedule): Likewise.
1206 (c_parser_omp_clause_proc_bind): Likewise.
1207 (c_parser_omp_clause_uniform): Likewise.
1208 (c_parser_omp_for_loop): Likewise.
1209 (c_parser_cilk_clause_vectorlength): Likewise.
1210 (c_parser_cilk_clause_linear): Likewise.
1211 (c_parser_transaction_expression): Likewise.
1212 * c-parser.h (c_parser_require): Add param matching_location with
1213 default UNKNOWN_LOCATION.
1214 (c_parser_error): Convert return type from void to bool.
1215 (c_parser_skip_until_found): Add param matching_location with
1216 default UNKNOWN_LOCATION.
1217
30af3a2b
MP
12182017-08-09 Marek Polacek <polacek@redhat.com>
1219
1220 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
1221 * c-tree.h (build_external_ref): Update declaration.
1222 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
1223 (build_external_ref): Change the type of a parameter to bool.
1224 (parser_build_binary_op): Use true/false instead of 1/0.
1225 (pointer_diff): Likewise.
1226 (build_modify_expr): Likewise.
1227 (set_designator): Change the type of a parameter to bool.
1228 (set_init_index): Use true/false instead of 1/0.
1229 (set_init_label): Likewise.
1230 (output_init_element): Change the type of a parameter to bool.
1231 (output_pending_init_elements): Use true/false instead of 1/0.
1232 (process_init_element): Likewise.
1233 (build_binary_op): Change the type of a parameter to bool.
1234
296c53ac
MP
12352017-08-09 Marek Polacek <polacek@redhat.com>
1236
1237 PR c/81233
1238 * c-typeck.c (pedwarn_init): Make the function take a variable list.
1239 Call emit_diagnostic_valist instead of pedwarn.
1240 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
1241 Print the relevant types in diagnostics.
1242
a32c8316
MP
12432017-08-09 Marek Polacek <polacek@redhat.com>
1244
1245 PR c/81417
1246 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
1247 build_conditional_expr.
1248 * c-parser.c (c_parser_conditional_expression): Create locations for
1249 EXP1 and EXP2 from their source ranges. Pass the locations down to
1250 build_conditional_expr.
1251 * c-tree.h (build_conditional_expr): Update declaration.
1252 * c-typeck.c (build_conditional_expr): Add location_t parameters.
1253 For -Wsign-compare, also print the types.
1254
314e6352
ML
12552017-08-08 Martin Liska <mliska@suse.cz>
1256
1257 * c-convert.c: Include header files.
1258 * c-typeck.c: Likewise.
1259
577eec56
ML
12602017-08-07 Martin Liska <mliska@suse.cz>
1261
1262 * c-parser.c (c_parser_attributes): Canonicalize name of an
1263 attribute.
1264
f7b6353a
MP
12652017-08-02 Marek Polacek <polacek@redhat.com>
1266
1267 PR c/81289
1268 * c-parser.c (c_parser_unary_expression): Use set_error.
1269
8a6eab34
MP
1270 PR c/81448
1271 PR c/81306
1272 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
1273 warnings. Avoid walking MACRO_MAP_LOCATIONS.
1274
7fef86d3
JH
12752017-07-31 Jan Hubicka <hubicka@ucw.cz>
1276 Martin Liska <mliska@suse.cz>
1277
1278 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 1279 statement.
7fef86d3 1280
f34ebeb2
ML
12812017-07-31 Martin Liska <mliska@suse.cz>
1282
1283 PR sanitize/81530
1284 * c-convert.c (convert): Guard condition with flag_sanitize_p
1285 also with current_function_decl non-null equality.
1286 * c-decl.c (grokdeclarator): Likewise.
1287 * c-typeck.c (build_binary_op): Likewise.
1288
8595f67b
MP
12892017-07-25 Marek Polacek <polacek@redhat.com>
1290
1291 * c-decl.c (grokfield): Remove local variable.
1292
d49718d6
MP
12932017-07-25 Marek Polacek <polacek@redhat.com>
1294
1295 PR c/81364
1296 * c-parser.c (c_parser_else_body): Don't warn about multistatement
1297 macro expansion if the body is in { }.
1298 (c_parser_while_statement): Likewise.
1299 (c_parser_for_statement): Likewise.
1300
ff22eb12
NS
13012017-07-18 Nathan Sidwell <nathan@acm.org>
1302
1303 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
1304
eea77d1f
DM
13052017-07-14 David Malcolm <dmalcolm@redhat.com>
1306
1307 * c-decl.c (implicitly_declare): When suggesting a missing
1308 #include, provide a fix-it hint.
1309
b6f43128
DM
13102017-07-06 David Malcolm <dmalcolm@redhat.com>
1311
1312 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
1313 and call that instead.
1314 * c-tree.h (selftest::run_c_tests): New decl.
1315
3e2becc4
MP
13162017-06-26 Marek Polacek <polacek@redhat.com>
1317
1318 PR c/80116
1319 * c-parser.c (c_parser_if_body): Set the location of the
1320 body of the conditional after parsing all the labels. Call
1321 warn_for_multistatement_macros.
1322 (c_parser_else_body): Likewise.
1323 (c_parser_switch_statement): Likewise.
1324 (c_parser_while_statement): Likewise.
1325 (c_parser_for_statement): Likewise.
1326 (c_parser_statement): Add a default argument. Save the location
1327 after labels have been parsed.
1328 (c_parser_c99_block_statement): Likewise.
1329
343ae898
RB
13302017-06-19 Richard Biener <rguenther@suse.de>
1331
1332 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1333 negated _Literals to parse _Literal (int) -1.
1334
45b2222a
ML
13352017-06-13 Martin Liska <mliska@suse.cz>
1336
1337 PR sanitize/78204
1338 * c-convert.c (convert): Use sanitize_flags_p.
1339 * c-decl.c (grokdeclarator): Likewise.
1340 * c-typeck.c (convert_for_assignment): Likewise.
1341 (c_finish_return): Likewise.
1342 (build_binary_op): Likewise.
1343
8ab7005b
JJ
13442017-06-08 Jakub Jelinek <jakub@redhat.com>
1345
1346 PR c/81006
1347 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
1348 to sizetype before size_binop.
1349
363dc72c
JJ
13502017-06-07 Jakub Jelinek <jakub@redhat.com>
1351
1352 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
1353 of TDI_generic.
1354
dc949728
MP
13552017-06-06 Marek Polacek <polacek@redhat.com>
1356
1357 PR c/79983
1358 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
1359 ref.
1360 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
1361
40ffd95f
BE
13622017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1363
1364 * c-parser.c (c_parser_binary_expression): Implement the
1365 -Wsizeof_pointer_div warning.
1366 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
1367 from a parenthesized expression.
1368 (c_parser_expr_list): Use c_last_sizeof_loc.
1369 * c-tree.h (c_last_sizeof_loc): New external.
1370 * c-typeck.c (c_last_sizeof_loc): New variable.
1371 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
1372
9fc5e7a4
MM
13732017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
1374
1375 PR testsuite/80580
1376 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
1377
f012c8ef
DM
13782017-05-30 David Malcolm <dmalcolm@redhat.com>
1379
1380 * c-objc-common.c (c_tree_printer): Gain bool and const char **
1381 parameters.
1382
3cd211af
MS
13832017-05-24 Martin Sebor <msebor@redhat.com>
1384
1385 PR c/80731
1386 * c-fold.c (c_fully_fold_internal): Adjust.
1387 * c-typeck.c (parser_build_unary_op): Adjust.
1388
fd71a9a2
TS
13892017-05-23 Thomas Schwinge <thomas@codesourcery.com>
1390
1391 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
1392 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
1393 "VECTOR_LENGTH".
1394
92fa0f9e
MP
13952017-05-23 Marek Polacek <polacek@redhat.com>
1396
1397 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
1398 quotes.
1399
d11c168a
JJ
14002017-05-22 Jakub Jelinek <jakub@redhat.com>
1401
1402 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
1403 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
1404 it returned invariant. Call tree_invariant_p unconditionally
1405 afterwards to decide whether to return expr or op0.
1406
58aca9d9
NS
14072017-05-22 Nathan Sidwell <nathan@acm.org>
1408
1409 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
1410
7fd549d2
TS
14112017-05-19 Thomas Schwinge <thomas@codesourcery.com>
1412
1413 * c-parser.c (c_parser_omp_clause_default): Handle
1414 "OMP_CLAUSE_DEFAULT_PRESENT".
1415
6ecd2339
BE
14162017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1417
1418 * config-lang.in (gtfiles): Add c-family/c-format.c.
1419
8a57ecff
NS
14202017-05-18 Nathan Sidwell <nathan@acm.org>
1421
1422 * c-decl.c (pushdecl_top_level): Delete unused function.
1423
6574d78e
MP
14242017-05-18 Marek Polacek <polacek@redhat.com>
1425
1426 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
1427 (check_earlier_gotos): Likewise.
1428 (define_label): Likewise.
1429 (pending_xref_error): Likewise.
1430 (smallest_type_quals_location): Likewise.
1431 (grokdeclarator): Likewise.
1432 (grokparms): Likewise.
1433 (identifier_global_value): Likewise.
1434 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
1435 (find_init_member): Likewise.
1436
e3455240
MP
14372017-05-18 Marek Polacek <polacek@redhat.com>
1438
1439 * c-decl.c (start_decl): Use false/true instead of 0/1.
1440 (grokdeclarator): Likewise.
1441 (finish_struct): Likewise.
1442 (start_function): Change the return type to bool. Use false/true
1443 instead of 0/1.
1444 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
1445 * c-tree.h (start_function): Update.
1446 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
1447 (set_designator): Change the return type to bool. Use false/true
1448 instead of 0/1.
1449
3fa8871b
MP
14502017-05-17 Marek Polacek <polacek@redhat.com>
1451
1452 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
1453 * c-typeck.c: Likewise.
1454
142473df
MP
14552017-05-17 Marek Polacek <polacek@redhat.com>
1456
1457 PR sanitizer/80659
1458 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
1459 DECL_IGNORED_P even for non-static compound literals.
1460
1a817418
ML
14612017-05-17 Martin Liska <mliska@suse.cz>
1462
1463 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1464 use it instead of int type.
1465
b2fa0a8b
MP
14662017-05-17 Marek Polacek <polacek@redhat.com>
1467
1468 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
1469 call c_fully_fold.
1470 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
1471 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
1472 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1473 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1474 save_expr.
1475 (c_parser_conditional_expression): Likewise.
1476 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1477 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1478 (process_init_element): Likewise.
1479 (build_binary_op): Likewise.
1480 (handle_omp_array_sections_1): Likewise.
1481
1e47f02b
TS
14822017-05-12 Thomas Schwinge <thomas@codesourcery.com>
1483
1484 * c-parser.c (c_parser_omp_clause_num_gangs)
1485 (c_parser_omp_clause_num_workers)
1486 (c_parser_omp_clause_vector_length): Merge functions into...
1487 (c_parser_oacc_single_int_clause): ... this new function. Adjust
1488 all users.
1489
c24e924f
NS
14902017-05-11 Nathan Sidwell <nathan@acm.org>
1491
1492 * gimple-parser.c: Don't #include tree-dump.h.
1493
c587104e
MM
14942017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1495
1496 PR testsuite/80580
1497 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
1498
67ac9a9d
MM
14992017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1500
1501 PR testsuite/80580
1502 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1503 incorrect __MEM syntax.
1504
ac4eb40f
MM
15052017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1506
1507 PR testsuite/80580
1508 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1509 type of unary '*'.
1510
641da50a
NS
15112017-05-09 Nathan Sidwell <nathan@acm.org>
1512
1513 * c-tree.h (pushdecl): Declare.
1514
56d35585
DM
15152017-05-05 David Malcolm <dmalcolm@redhat.com>
1516
1517 * c-decl.c (warn_defaults_to): Replace report_diagnostic
1518 with diagnostic_report_diagnostic.
1519 * c-errors.c (pedwarn_c99): Likewise.
1520 (pedwarn_c90): Likewise.
1521
815d9cc6
XR
15222017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1523
92a285c1 1524 PR c++/80038
815d9cc6
XR
1525 * c-gimplify.c (c_gimplify_expr): Remove calls to
1526 cilk_gimplifY_call_params_in_spawned_fn.
1527
1c4ea66f
DM
15282017-04-25 David Malcolm <dmalcolm@redhat.com>
1529
1530 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1531 hint for removing extra semicolon.
1532
666f7903
JJ
15332017-04-21 Jakub Jelinek <jakub@redhat.com>
1534
1535 PR c/80468
1536 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
1537 enabled, set specs->type to integer_type_node.
1538
5764ee3c
JW
15392017-04-03 Jonathan Wakely <jwakely@redhat.com>
1540
1541 * c-array-notation.c: Fix typo in comment.
1542
10fa8dfb
MP
15432017-03-29 Marek Polacek <polacek@redhat.com>
1544
1545 PR c/79730
1546 * c-decl.c (finish_decl): Check VAR_P.
1547
a9e4a1a5
JJ
15482017-03-27 Jakub Jelinek <jakub@redhat.com>
1549
1550 PR middle-end/80162
1551 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1552 * c-typeck.c (c_mark_addressable): Likewise. Look through
1553 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1554 to ARRAY_TYPE.
1555 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
1556
ee3ff394
MP
15572017-03-23 Marek Polacek <polacek@redhat.com>
1558
1559 * c-tree.h: Remove a C_RID_YYCODE reference.
1560
4d1b8e70
JJ
15612017-03-21 Jakub Jelinek <jakub@redhat.com>
1562
1563 PR c/80097
1564 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
1565 optional COMPOUND_EXPR with ubsan instrumentation.
1566
31dc71a8
MP
15672017-03-17 Marek Polacek <polacek@redhat.com>
1568
1569 * c-parser.c: Add C11 references.
1570
d579c385
MP
15712017-03-15 Marek Polacek <polacek@redhat.com>
1572
1573 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
1574
85059a38
MP
15752017-03-11 Marek Polacek <polacek@redhat.com>
1576
1577 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
1578
2f6f187a
DM
15792017-03-10 David Malcolm <dmalcolm@redhat.com>
1580
1581 PR translation/79848
1582 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1583 "%qs".
1584 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1585
36618428
MP
15862017-03-09 Marek Polacek <polacek@redhat.com>
1587
1588 PR sanitizer/79757
1589 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1590 parameter declarations with initializers.
1591
01e5af5a
JJ
15922017-03-09 Jakub Jelinek <jakub@redhat.com>
1593
1594 PR c/79969
1595 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
1596 TYPE_STUB_DECL.
1597
a71dbc63
JJ
15982017-03-07 Jakub Jelinek <jakub@redhat.com>
1599
1600 PR c/79834
1601 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1602 for "may only be used in compound statements" diagnostics, change it
1603 such that the same translatable string is used for all pragmas. For
1604 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1605 diagnostics.
1606 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1607 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1608 "may only be used in compound statements" diagnostics, such that the
1609 same translatable string is used for all pragmas.
1610
1ff4bae6
MP
16112017-03-04 Marek Polacek <polacek@redhat.com>
1612
1613 PR c/79847
1614 * c-decl.c (implicit_decl_warning): Add missing space.
1615
7f5a7d78
MP
16162017-03-03 Marek Polacek <polacek@redhat.com>
1617
1618 PR c/79758
1619 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1620 current_function_prototype_arg_types is error_mark_node. Fix
1621 formatting. Use TREE_VALUE instead of TREE_TYPE.
1622
883c8f06
JJ
16232017-03-03 Jakub Jelinek <jakub@redhat.com>
1624
79c9b7a8
JJ
1625 PR c/79837
1626 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1627 %<min%> or %<max%> in the diagnostics, instead mention identifier.
1628 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1629 diagnostics.
1630
883c8f06
JJ
1631 PR c/79836
1632 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1633 instead of %<_Generic>.
1634 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1635 (c_parser_omp_target_exit_data): Use %<release%> instead of
1636 %<release>.
1637
324ff1a0
JJ
16382017-02-28 Jakub Jelinek <jakub@redhat.com>
1639
1640 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1641 instead of just cond ? "..." : "...".
1642 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1643 for "enter"/"exit" keyword.
1644 (c_finish_oacc_routine): Don't use %s to supply portions of the
1645 message.
1646
4227c9ad
JJ
16472017-02-24 Jakub Jelinek <jakub@redhat.com>
1648
1649 PR c++/79588
1650 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1651 handle -Wrestrict here.
1652 * c-typeck.c (build_function_call_vec): Adjust
1653 check_function_arguments caller.
1654
5d972e66
RB
16552017-02-23 Richard Biener <rguenther@suse.de>
1656
1657 PR c/79684
1658 * gimple-parser.c (c_parser_gimple_statement): Use set_error
1659 to initialize c_exprs to return.
1660 (c_parser_gimple_binary_expression): Likewise.
1661 (c_parser_gimple_unary_expression): Likewise.
1662 (c_parser_gimple_postfix_expression): Likewise.
1663
61ac5ebe
MP
16642017-02-22 Marek Polacek <polacek@redhat.com>
1665
1666 PR c/79662
1667 * c-typeck.c (convert_arguments): Handle error_mark_node.
1668
41d1b0b1
PK
16692017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1670
1671 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1672 value of c_parser_parse_ssa_name against error_mark_node and emit
1673 error if ssa name is anonymous and written as default definition.
1674
eab1f169
PK
16752017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1676
1677 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1678 FMA_EXPR.
1679
bcac0b4d
JJ
16802017-02-16 Jakub Jelinek <jakub@redhat.com>
1681
1682 PR c++/79512
1683 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1684 ignore #pragma omp target even when not followed by identifier.
1685
1be33173
PK
16862017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1687
1688 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1689 (c_parser_gimple_unary_expression): Likewise.
1690
aa326bfb
JJ
16912017-02-13 Jakub Jelinek <jakub@redhat.com>
1692
1693 * c-parser.c (c_parser_oacc_declare): Add missing space in
1694 diagnostics.
1695
8a398bc5
PK
16962017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1697
1698 PR c/79478
1699 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1700 set_c_expr_source_range when parsing ssa-name.
1701
3dcde5ef
PG
17022017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
1703 Richard Biener <rguenther@suse.de>
1704
1705 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1706 building IL when arguments are error_mark_node.
1707 (c_parser_gimple_unary_expression): Likewise.
1708 (c_parser_gimple_if_stmt): Likewise.
1709 (c_parser_gimple_switch_stmt): Likewise.
1710 (c_parser_gimple_return_stmt): Likewise.
1711 (c_parser_parse_ssa_name): When name lookup fails do not build
1712 an SSA name. Use undeclared rather than not declared in error
1713 reporting.
1714
192b048b
MP
17152017-02-09 Marek Polacek <polacek@redhat.com>
1716
1717 PR c/79428
1718 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1719 instead of c_parser_skip_until_found.
1720
56f71478
JJ
17212017-02-09 Jakub Jelinek <jakub@redhat.com>
1722
1723 PR c/79431
1724 * c-parser.c (c_parser_omp_declare_target): Don't invoke
1725 symtab_node::get on automatic variables.
1726
02889d23
CLT
17272016-02-09 Nathan Sidwell <nathan@codesourcery.com>
1728 Chung-Lin Tang <cltang@codesourcery.com>
1729
1730 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1731 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1732 semantic checking.
1733 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1734
7af4b20d
RB
17352017-02-07 Richard Biener <rguenther@suse.de>
1736
1737 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1738 (c_parser_gimple_postfix_expression_after_primary):
1739 Do not use c_build_function_call_vec to avoid folding and promotion.
1740 Simplify.
1741
e5e391d6
MO
17422017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1743
1744 PR lto/79061
1745 * c-decl.c (pop_scope): Pass main_input_filename to
1746 build_translation_unit_decl.
1747
c2e84327
DM
17482017-01-24 David Malcolm <dmalcolm@redhat.com>
1749
1750 * c-parser.c: Include "read-rtl-function.h" and
1751 "run-rtl-passes.h".
1752 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
1753 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
1754 production. Update for renaming of field "gimple_pass" to
1755 "gimple_or_rtl_pass". If __RTL was seen, call
1756 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
1757 to an auto_timevar, to cope with early exit.
1758 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1759 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1760 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1761 Handle RID_RTL.
1762 (c_parser_parse_rtl_body): New function.
1763 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1764 (struct c_declspecs): Rename field "gimple_pass" to
1765 "gimple_or_rtl_pass". Add field "rtl_p".
1766 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1767 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1768 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1769 (c_parser_gimple_or_rtl_pass_list): ...this.
1770
2ebd93e1
MP
17712017-01-20 Marek Polacek <polacek@redhat.com>
1772
1773 PR c/64279
1774 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1775
b1c95bb5
RB
17762017-01-13 Richard Biener <rguenther@suse.de>
1777
1778 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1779 nops.
1780
25329913
RB
17812017-01-13 Richard Biener <rguenther@suse.de>
1782
1783 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1784 _Literal ( type-name ) number.
1785
6bb4ea5c
RB
17862017-01-12 Richard Biener <rguenther@suse.de>
1787
1788 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1789 __MEM.
1790
6b5b4e9c
JJ
17912017-01-11 Jakub Jelinek <jakub@redhat.com>
1792
1793 PR c++/72813
1794 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
1795 PCH file.
1796
e3252775
RB
17972017-01-11 Richard Biener <rguenther@suse.de>
1798
1799 PR bootstrap/79052
1800 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
1801 returns on parse errors.
1802
a9342885
MP
18032017-01-04 Marek Polacek <polacek@redhat.com>
1804
1805 PR c++/64767
1806 * c-parser.c (c_parser_postfix_expression): Mark zero character
1807 constants by setting original_type in c_expr.
1808 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
1809 with a zero character constant.
1810 (char_type_p): New function.
1811
5dd9a9d0
DM
18122017-01-04 David Malcolm <dmalcolm@redhat.com>
1813
1814 * c-parser.c (c_parser_declaration_or_fndef): Create a
1815 rich_location at init_loc and parse it to start_init.
1816 (last_init_list_comma): New global.
1817 (c_parser_braced_init): Update last_init_list_comma when parsing
1818 commas. Pass it to pop_init_level. Pass location of closing
1819 brace to pop_init_level.
1820 (c_parser_postfix_expression_after_paren_type): Create a
1821 rich_location at type_loc and parse it to start_init.
1822 (c_parser_omp_declare_reduction): Likewise for loc.
1823 * c-tree.h (start_init): Add rich_location * param.
1824 (pop_init_level): Add location_t param.
1825 * c-typeck.c (struct initializer_stack): Add field
1826 "missing_brace_richloc".
1827 (start_init): Add richloc param, use it to initialize
1828 the stack node's missing_brace_richloc.
1829 (last_init_list_comma): New decl.
1830 (finish_implicit_inits): Pass last_init_list_comma to
1831 pop_init_level.
1832 (push_init_level): When finding missing open braces, add fix-it
1833 hints to the richloc.
1834 (pop_init_level): Add "insert_before" param and pass it
1835 when calling pop_init_level. Add fixits about missing
1836 close braces to any richloc. Use the richloc for the
1837 -Wmissing-braces warning.
1838 (set_designator): Pass last_init_list_comma to pop_init_level.
1839 (process_init_element): Likewise.
1840
cbe34bb5
JJ
18412017-01-01 Jakub Jelinek <jakub@redhat.com>
1842
1843 Update copyright years.
1844
d17680f3
JJ
18452016-12-21 Jakub Jelinek <jakub@redhat.com>
1846
0dba7960
JJ
1847 PR bootstrap/78817
1848 * c-typeck.c (build_function_call_vec): If check_function_arguments
1849 returns true, set TREE_NO_WARNING on CALL_EXPR.
1850
d17680f3
JJ
1851 PR c/77767
1852 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
1853 to *expr instead of overwriting it.
1854
aa90531e
RB
18552016-12-20 Richard Biener <rguenther@suse.de>
1856
1857 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
1858 error recovery.
1859 (c_parser_gimple_statement): Only build assigns for non-error
1860 stmts.
1861 (c_parser_gimple_postfix_expression_after): Improve error recovery.
1862
629b3d75
MJ
18632016-12-14 Martin Jambor <mjambor@suse.cz>
1864
1865 * c-parser.c: Include omp-general.h and omp-offload.h instead of
1866 omp-low.h.
1867 (c_finish_oacc_routine): Adjusted call to
1868 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
1869 to use their new names.
1870 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
1871 use its new name.
1872 (c_parser_oacc_update): Likewise.
1873 (c_parser_omp_simd): Likewise.
1874 (c_parser_omp_target_update): Likewise.
1875 * c-typeck.c: Include omp-general.h instead of omp-low.h.
1876 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
1877 name.
1878 (c_finish_omp_cancellation_point): Likewise.
1879 * gimple-parser.c: Do not include omp-low.h
1880
c5af52eb
CP
18812016-12-02 Cesar Philippidis <cesar@codesourcery.com>
1882 James Norris <jnorris@codesourcery.com>
1883
1884 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
1885 EXIT_DATA,WAIT} are not used in compound statements.
1886 (c_parser_oacc_enter_exit_data): Update diagnostics.
1887
48330c93
BE
18882016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1889
1890 PR c++/71973
1891 * c-decl.c (diagnose_mismatched_decls): Use
1892 OPT_Wbuiltin_declaration_mismatch here too.
1893
899ca90e 18942016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
1895 Alan Hayward <alan.hayward@arm.com>
1896 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
1897
1898 * c-decl.c (merge_decls): Use SET_DECL_MODE.
1899 (make_label, finish_struct): Likewise.
1900
1ee62b92 19012016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 1902 Richard Biener <rguenther@suse.de>
22b15758 1903
8e745a17
JJ
1904 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
1905 * config-lang.in (gtfiles): Add c/c-parser.h.
1906 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
1907 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
1908 * c-parser.c (enum c_id_kind, struct c_token,
1909 c_parser_next_token_is, c_parser_next_token_is_not,
1910 c_parser_next_token_is_keyword,
1911 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
1912 Split out to ...
1913 * c-parser.h: ... new header.
1914 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 1915 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
1916 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1917 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1918 c_parser_error, c_parser_require, c_parser_skip_until_found,
1919 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1920 c_parser_type_name): Export.
1921 (c_parser_tokens_buf): New function.
1922 (c_parser_error): Likewise.
1923 (c_parser_set_error): Likewise.
1924 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
1925 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
1926 via c_parser_parse_gimple_body.
8e745a17
JJ
1927 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
1928 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1929 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1930 c_parser_error, c_parser_require, c_parser_skip_until_found,
1931 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1932 c_parser_type_name): Declare.
1ee62b92
PG
1933 (struct c_parser): Declare forward.
1934 (c_parser_tokens_buf): Declare.
8e745a17
JJ
1935 (c_parser_error): Likewise.
1936 (c_parser_set_error): Likewise.
1937 * gimple-parser.c: New file.
1938 * gimple-parser.h: Likewise.
1ee62b92 1939
22b15758
UB
19402016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1941
1942 PR c/35503
1943 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1944 warn_for_restrict.
1945
84ff4775
LCW
19462016-09-11 Le-Chun Wu <lcwu@google.com>
1947 Mark Wielaard <mjw@redhat.com>
1948
1949 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
1950 to the given -Wshadow= variant.
1951
4d0cdd0c
TP
19522016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
1953
1954 * c-typeck.c: Include memmodel.h.
1955
1202f33e
JJ
19562016-10-13 Jakub Jelinek <jakub@redhat.com>
1957
1958 PR target/77957
1959 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
1960 instead of lhd_return_null_tree_v.
1961
8a14afd0
BS
19622016-10-07 Bernd Schmidt <bschmidt@redhat.com>
1963
1964 PR c++/69733
1965 * c-decl.c (smallest_type_quals_location): New static function.
1966 (grokdeclarator): Try to find the correct location for an ignored
1967 qualifier.
1968
81fea426
MP
19692016-09-26 Marek Polacek <polacek@redhat.com>
1970
1971 PR c/7652
1972 * c-decl.c (pop_scope): Add gcc_fallthrough.
1973
19742016-09-26 Marek Polacek <polacek@redhat.com>
1975
1976 PR c/7652
1977 * c-parser.c (struct c_token): Add flags field.
1978 (c_lex_one_token): Pass it to c_lex_with_flags.
1979 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
1980 into IFN_FALLTHROUGH.
1981 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
1982 attribute fallthrough after a case label or default label.
1983 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
1984
9a2300e9
MP
19852016-09-24 Marek Polacek <polacek@redhat.com>
1986
1987 PR c/77490
1988 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
1989 have boolean value. Warn about ++/-- on booleans.
1990
7de76362
JJ
19912016-09-23 Jakub Jelinek <jakub@redhat.com>
1992
1993 * c-parser.c (incomplete_record_decls): Remove unnecessary
1994 = vNULL initialization of file scope vec.
1995
5b73d2ab
MP
19962016-09-16 Marek Polacek <polacek@redhat.com>
1997
1998 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
1999
e51fbec3
MP
20002016-09-14 Marek Polacek <polacek@redhat.com>
2001
2002 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
2003 (fix_array_notation_expr): Likewise.
2004 * c-decl.c (finish_decl): Likewise.
2005 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2006 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
2007 (function_to_pointer_conversion): Use false instead of 0.
2008 (convert_lvalue_to_rvalue): Likewise.
2009 (parser_build_unary_op): Likewise.
2010 (build_atomic_assign): Likewise.
2011 (build_unary_op): Change nonconvert parameter type to bool, use
2012 true/false instead of 1/0.
2013 (build_binary_op): Use true instead of 1.
2014
254830ba
DM
20152016-09-13 David Malcolm <dmalcolm@redhat.com>
2016
2017 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
2018 of add_fixit_insert to add_fixit_insert_before.
2019
4c13ba17
MP
20202016-09-13 Marek Polacek <polacek@redhat.com>
2021
2022 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
2023 it.
2024
54dcdb88
BE
20252016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
2026
2027 PR c++/77496
2028 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
2029 COMPOUND_EXPR to warn_for_omitted_condop.
2030
e5106e27
DM
20312016-09-07 David Malcolm <dmalcolm@redhat.com>
2032
2033 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
2034 c_get_substring_location for this new langhook.
2035
9dc5773f
JJ
20362016-09-02 Jakub Jelinek <jakub@redhat.com>
2037
2038 PR c/65467
2039 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
2040 flag_openmp.
2041 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
2042 instead of mark_exp_read on low_bound/length expression.
2043 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
2044 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2045 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2046 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
2047 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
2048 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
2049 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
2050 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
2051 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
2052 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
2053 instead of mark_expr_read.
2054 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
2055 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
2056 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
2057 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
2058 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
2059 array section bases outside of depend clause, for depend clause
2060 use convert_lvalue_to_rvalue on the base.
2061 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
2062 linear, aligned, map, to and from clauses.
2063 (c_omp_clause_copy_ctor): New function.
2064
295844f6
MP
20652016-09-01 Marek Polacek <polacek@redhat.com>
2066
2067 PR c/7652
2068 * c-typeck.c (composite_type): Add FALLTHRU comment.
2069
089af25c
DM
20702016-08-31 David Malcolm <dmalcolm@redhat.com>
2071
2072 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
2073 to the insertion fixits for "struct", "union", and "enum".
2074
f9087798
DM
20752016-08-30 David Malcolm <dmalcolm@redhat.com>
2076
2077 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
2078 rather than add_fixit_misspelled_id.
2079 (undeclared_variable): Likewise.
2080 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
2081 now-redundant "here" params from add_fixit_insert method calls.
2082 (c_parser_parameter_declaration): Likewise.
2083 * c-typeck.c (build_component_ref): Remove now-redundant range
2084 param from add_fixit_replace method calls.
2085
ebef225f
MP
20862016-08-25 Marek Polacek <polacek@redhat.com>
2087
2088 * c-typeck.c (parser_build_binary_op): Pass LHS to
2089 warn_logical_not_parentheses.
2090
fe377a48
MP
20912016-08-25 Marek Polacek <polacek@redhat.com>
2092
2093 PR c/77323
2094 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
2095 or _FloatN or _FloatNx is not supported.
2096 (finish_declspecs): Set type to integer_type_node when _FloatN or
2097 _FloatNx is not supported.
2098
c65699ef
JM
20992016-08-19 Joseph Myers <joseph@codesourcery.com>
2100
2101 PR c/32187
2102 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
2103 (struct c_declspecs): Add field floatn_nx_idx.
2104 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
2105 and _FloatNx type specifiers.
2106 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
2107 (c_parser_declspecs, c_parser_attribute_any_word)
2108 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
2109 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
2110 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
2111 narrower than double.
2112
2f1364c2
JJ
21132016-08-12 Jakub Jelinek <jakub@redhat.com>
2114 Martin Liska <mliska@suse.cz>
2115
2116 PR c/67410
2117 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
2118 % to determine val element to change. Assert that
2119 wchar_bytes * charwidth fits into val array.
2120
191816a3
MP
21212016-08-12 Marek Polacek <polacek@redhat.com>
2122
2123 PR c/7652
2124 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
2125 (c_parser_postfix_expression): Likewise.
2126 * c-typeck.c (build_unary_op): Adjust fall through comment.
2127 (c_mark_addressable): Likewise.
2128
b95a64bb
JJ
21292016-08-11 Jakub Jelinek <jakub@redhat.com>
2130
2131 PR c/72816
2132 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
2133 array member through typedef, for orig_qual_indirect == 0 clear
2134 orig_qual_type.
2135
895aa8e1
DM
21362016-08-08 David Malcolm <dmalcolm@redhat.com>
2137
2138 PR c/64955
2139 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
2140 this up to selftest::run_c_tests.
2141 (selftest::run_c_tests): New function.
2142
0b212d8c
TS
21432016-08-04 Thomas Schwinge <thomas@codesourcery.com>
2144
ae9281fc
TS
2145 * c-parser.c (struct oacc_routine_data): Add error_seen and
2146 fndecl_seen members.
2147 (c_finish_oacc_routine): Use these.
2148 (c_parser_declaration_or_fndef): Adjust.
2149 (c_parser_oacc_routine): Likewise. Support more C language
2150 constructs, and improve diagnostics. Move pragma context
2151 checking...
2152 (c_parser_pragma): ... here.
2153
0b212d8c
TS
2154 * c-parser.c (struct oacc_routine_data): New.
2155 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
2156 Simplify code.
2157 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
2158 declare target" attribute.
2159
76e2c821
JB
21602016-08-01 Jan Beulich <jbeulich@suse.com>
2161
2162 * c-fold.c (c_fully_fold_internal): Also emit shift count
2163 warnings for vector types.
2164 * c-typeck.c (build_binary_op): Likewise.
2165
f618a472
MP
21662016-07-29 Marek Polacek <polacek@redhat.com>
2167
2168 PR c/71742
2169 * c-decl.c (finish_struct): Rephrase an error message.
2170
efd0786f
MP
2171 PR c/71853
2172 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
2173 to error node for invalid code.
2174
e00dceaf
MP
2175 PR c/71573
2176 * c-decl.c (implicitly_declare): Return decl early not only for
2177 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
2178
673a107a
JJ
21792016-07-29 Jakub Jelinek <jakub@redhat.com>
2180
2181 PR c/71969
2182 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
2183 on GNU extern inline functions.
2184
a5b5c8b6
MP
21852016-07-29 Marek Polacek <polacek@redhat.com>
2186
2187 PR c/71583
2188 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
2189 check expr.value.
2190
e3fe09c1
UB
21912016-07-22 Uros Bizjak <ubizjak@gmail.com>
2192
2193 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
2194
7c8f7eaa
DM
21952016-07-20 David Malcolm <dmalcolm@redhat.com>
2196
2197 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
2198 spellcheck-tree.h
2199 (best_macro_match): Likewise, converting from a typedef to a
2200 subclass.
2201 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
2202 (lookup_name_fuzzy): Update for change of best_macro_match to a
2203 subclass with a ctor that calls cpp_forall_identifiers.
2204
de6a69ee
DM
22052016-07-20 David Malcolm <dmalcolm@redhat.com>
2206
2207 * c-decl.c (implicit_decl_warning): Update for conversion of
2208 return type of lookup_name_fuzzy to const char *.
2209 (undeclared_variable): Likewise.
2210 (lookup_name_fuzzy): Convert return type from tree to
2211 const char *.
2212 * c-parser.c (c_parser_declaration_or_fndef): Update for
2213 conversion of return type of lookup_name_fuzzy to const char *.
2214 (c_parser_parameter_declaration): Likewise.
2215
b1c9c068
CP
22162016-07-15 Cesar Philippidis <cesar@codesourcery.com>
2217
2218 * c-parser.c (c_parser_oacc_declare): Don't scan for
2219 GOMP_MAP_POINTER.
2220 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
2221 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
2222 zero-length subarrays.
2223
ddbbcb19
JJ
22242016-07-15 Jakub Jelinek <jakub@redhat.com>
2225
2226 PR c/71858
2227 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
2228 instead of FUZZY_LOOKUP_NAME.
2229 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
2230 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
2231
dd36b877
JJ
22322016-07-14 Jakub Jelinek <jakub@redhat.com>
2233
2234 PR c/71858
2235 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
2236
8c681247
TS
22372016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2238
2239 * c-parser.c (c_parser_generic_selection): Make type of variable
2240 auto_vec.
2241 (c_parser_omp_declare_simd): Likewise.
2242
bf4fa671
TS
22432016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2244
2245 * c-decl.c (struct c_struct_parse_info): Change member types
2246 from vec to auto_vec.
2247 (start_struct): Adjust.
2248 (finish_struct): Likewise.
2249
557e8c49
JJ
22502016-07-02 Jakub Jelinek <jakub@redhat.com>
2251
2252 PR c/71719
2253 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
2254
54d19c3b
TS
22552016-06-29 Thomas Schwinge <thomas@codesourcery.com>
2256
2257 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
2258 Move pragma context checking into...
2259 (c_parser_omp_cancellation_point): ... here, and improve
2260 diagnostic messages.
2261 * c-typeck.c (c_finish_omp_cancel)
2262 (c_finish_omp_cancellation_point): Improve diagnostic messages.
2263
152ef731
JJ
22642016-06-29 Jakub Jelinek <jakub@redhat.com>
2265
2266 PR c/71685
2267 * c-typeck.c (c_build_qualified_type): Don't clear
2268 C_TYPE_INCOMPLETE_VARS for the main variant.
2269
22702016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
2271
2272 PR c/71552
2273 * c-typeck.c (output_init_element): Diagnose incompatible types
2274 before non-constant initializers.
2275
e9ac1f86
JJ
22762016-06-28 Jakub Jelinek <jakub@redhat.com>
2277
2278 * Make-lang.in: Don't cat ../stage_current if it does not exist.
2279
277d7ee0
AK
22802016-06-23 Andi Kleen <ak@linux.intel.com>
2281
2282 * Make-lang.in: Add support for autofdo.
2283
1a4f11c8
DM
22842016-06-22 David Malcolm <dmalcolm@redhat.com>
2285
2286 PR c/70339
2287 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
2288 (implicit_decl_warning): When issuing warnings for implicit
2289 declarations, attempt to provide a suggestion via
2290 lookup_name_fuzzy.
2291 (undeclared_variable): Likewise when issuing errors.
2292 (lookup_name_in_scope): Likewise.
2293 (struct edit_distance_traits<cpp_hashnode *>): New struct.
2294 (best_macro_match): New typedef.
2295 (find_closest_macro_cpp_cb): New function.
2296 (lookup_name_fuzzy): New function.
2297 * c-parser.c: Include gcc-rich-location.h.
2298 (c_token_starts_typename): Split out case CPP_KEYWORD into...
2299 (c_keyword_starts_typename): ...this new function.
2300 (c_parser_declaration_or_fndef): When issuing errors about
2301 missing "struct" etc, add a fixit. For other kinds of errors,
2302 attempt to provide a suggestion via lookup_name_fuzzy.
2303 (c_parser_parms_declarator): When looking ahead to detect typos in
2304 type names, also reject CPP_KEYWORD.
2305 (c_parser_parameter_declaration): When issuing errors about
2306 unknown type names, attempt to provide a suggestion via
2307 lookup_name_fuzzy.
2308 * c-tree.h (c_keyword_starts_typename): New prototype.
2309
5a578671
JM
23102016-06-20 Joseph Myers <joseph@codesourcery.com>
2311
2312 PR c/71601
2313 * c-typeck.c (build_conditional_expr): Return error_mark_node if
2314 c_common_type returns error_mark_node.
2315
3f8257db 23162016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
2317
2318 PR c/69507
2319 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
2320 __alignof__ (expression).
2321
6a3f203c
DM
23222016-06-14 David Malcolm <dmalcolm@redhat.com>
2323
2324 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
2325
264757fb
DM
23262016-06-14 David Malcolm <dmalcolm@redhat.com>
2327
2328 * c-typeck.c (build_component_ref): Simplify fixit code by
2329 using gcc_rich_location::add_fixit_misspelled_id.
2330 (set_init_label): Likewise.
2331
f7e4f2e3
DM
23322016-06-13 David Malcolm <dmalcolm@redhat.com>
2333
2334 * c-parser.c (c_parser_initelt): Provide location of name for new
2335 location_t param of set_init_label.
2336 * c-tree.h (set_init_label): Add location_t param.
2337 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
2338 param and use it when issuing error messages about unrecognized
2339 field names. Attempt to provide a fixit hint if appropriate,
2340 otherwise update the error message to provide the type name.
2341
4b1ffdb1
TS
23422016-06-10 Thomas Schwinge <thomas@codesourcery.com>
2343
2344 PR c/71381
2345 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
2346 Loosen checking.
2347
44a845ca
MS
23482016-06-08 Martin Sebor <msebor@redhat.com>
2349 Jakub Jelinek <jakub@redhat.com>
2350
2351 PR c++/70507
2352 PR c/68120
2353 * c-typeck.c (convert_arguments): Don't promote last argument
2354 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2355
92a5f2ba
MP
23562016-06-08 Marek Polacek <polacek@redhat.com>
2357
2358 PR c/71418
2359 * c-decl.c (grokdeclarator): Check TYPE_P.
2360
08203f73
MP
2361 PR c/71426
2362 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
2363 code.
2364
6ffd47b7
DM
23652016-06-07 David Malcolm <dmalcolm@redhat.com>
2366
2367 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
2368 and structure element reference, capture the location of the
2369 element name token and pass it to build_component_ref.
2370 (c_parser_postfix_expression_after_primary): Likewise for
2371 structure element dereference.
2372 (c_parser_omp_variable_list): Likewise for
2373 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
2374 * c-tree.h (build_component_ref): Add location_t param.
2375 * c-typeck.c (build_component_ref): Add location_t param
2376 COMPONENT_LOC. Use it, if available, when issuing hints about
2377 mispelled member names to provide a fixit replacement hint.
2378
1f40cff3
MP
23792016-06-06 Marek Polacek <polacek@redhat.com>
2380
2381 PR c/71362
2382 * c-parser.c (c_parser_direct_declarator): Set location.
2383
5545a907
MP
23842016-06-06 Marek Polacek <polacek@redhat.com>
2385
2386 * c-typeck.c (comptypes_internal): Handle comparisons of
2387 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
2388 TYPE_REF_CAN_ALIAS_ALL.
2389
b605f663
CLT
23902016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
2391
2392 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
2393 arguments as addressable when async clause exists.
2394
00631022
JJ
23952016-05-30 Jakub Jelinek <jakub@redhat.com>
2396
2397 PR c++/71349
2398 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
2399 when combined with target construct.
2400
7211a097
JJ
24012016-05-26 Jakub Jelinek <jakub@redhat.com>
2402
2403 * c-parser.c (c_parser_omp_clause_schedule): Warn if
2404 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
2405
95efe6b6
MP
24062016-05-25 Marek Polacek <polacek@redhat.com>
2407
2408 PR c/71265
2409 * c-decl.c (c_make_fname_decl): Don't check seen_error.
2410
a23faf7a
MP
2411 PR c/71266
2412 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
2413
e46c7770
CP
24142016-05-24 Cesar Philippidis <cesar@codesourcery.com>
2415
2416 * c-parser.c (c_parser_oacc_declare): Add support for
2417 GOMP_MAP_FIRSTPRIVATE_POINTER.
2418 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
2419 argument with enum c_omp_region_type ort.
2420 (handle_omp_array_sections): Likewise. Update call to
2421 handle_omp_array_sections_1.
2422 (c_finish_omp_clauses): Add specific errors and warning messages for
2423 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
2424 call to handle_omp_array_sections.
2425
a04e69c0
TS
24262016-05-24 Thomas Schwinge <thomas@codesourcery.com>
2427
2428 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
2429
f17a223d
RB
24302016-05-24 Richard Biener <rguenther@suse.de>
2431
2432 PR middle-end/70434
2433 PR c/69504
2434 * c-typeck.c (build_array_ref): Do not complain about indexing
2435 non-lvalue vectors. Adjust for function name change.
2436
79063edd
MS
24372016-05-20 Martin Sebor <msebor@redhat.com>
2438
2439 PR c/71115
2440 * c-typeck.c (error_init): Use
2441 expansion_point_location_if_in_system_header.
2442 (warning_init): Same.
2443
8a40fef3
DM
24442016-05-19 David Malcolm <dmalcolm@redhat.com>
2445
2446 PR c/71171
2447 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
2448 in error-handling.
2449 (c_parser_postfix_expression): Likewise.
2450 * c-tree.h (c_expr::set_error): New method.
2451 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
2452 that result's range is initialized.
2453
e9892350
JG
24542016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
2455
2456 * c-typeck.c (parser_build_unary_op): Fix formatting.
2457
8fad45f5
MW
24582016-05-16 Matthew Wahab <matthew.wahab@arm.com>
2459
2460 * c-decl.c (grokdeclarator): Remove errmsg and use of
2461 targetm.invalid_return_type.
2462 (grokparms): Remove errmsg and use of
2463 targetm.invalid_parameter_type.
2464
aa4b467b
JM
24652016-05-13 Joseph Myers <joseph@codesourcery.com>
2466
2467 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2468 function return type.
2469
4f2e1536
MP
24702016-05-12 Marek Polacek <polacek@redhat.com>
2471
2472 PR c/70756
2473 * c-decl.c (build_compound_literal): Pass LOC down to
2474 c_incomplete_type_error.
2475 * c-tree.h (require_complete_type): Adjust declaration.
2476 (c_incomplete_type_error): Likewise.
2477 * c-typeck.c (require_complete_type): Add location parameter, pass it
2478 down to c_incomplete_type_error.
2479 (c_incomplete_type_error): Add location parameter, pass it down to
2480 error_at.
2481 (build_component_ref): Pass location down to c_incomplete_type_error.
2482 (default_conversion): Pass location down to require_complete_type.
2483 (build_array_ref): Likewise.
2484 (build_function_call_vec): Likewise.
2485 (convert_arguments): Likewise.
2486 (build_unary_op): Likewise.
2487 (build_c_cast): Likewise.
2488 (build_modify_expr): Likewise.
2489 (convert_for_assignment): Likewise.
2490 (c_finish_omp_clauses): Likewise.
2491
d6e83a8d
MM
24922016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2493
2494 PR c/43651
2495 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
2496 is enabled.
2497 * c-errors.c (pedwarn_c90): Return true if warned.
2498 * c-tree.h (pedwarn_c90): Change return type to bool.
2499 (enum c_declspec_word): Add new enumerator cdw_atomic.
2500
5c3a10fb
MP
25012016-05-11 Marek Polacek <polacek@redhat.com>
2502
2503 PR c++/71024
2504 * c-decl.c (diagnose_mismatched_decls): Factor out code to
2505 diagnose_mismatched_attributes and call it.
2506
cf68d92c
MP
25072016-05-10 Marek Polacek <polacek@redhat.com>
2508
2509 PR c/70255
2510 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2511 on a declaration following the definition.
2512
351f85c5
JJ
25132016-05-05 Jakub Jelinek <jakub@redhat.com>
2514
2515 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2516 parse it through to c_parser_c99_block_statement.
2517 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2518 caller.
2519
deef7113
MP
25202016-05-04 Marek Polacek <polacek@redhat.com>
2521
2522 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2523 OPT_Wdangling_else.
2524
de55efd5
MP
25252016-05-04 Marek Polacek <polacek@redhat.com>
2526
2527 PR c/48778
2528 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2529 for macro expansions.
2530
79ce98bc
MP
25312016-05-03 Marek Polacek <polacek@redhat.com>
2532
2533 PR c/70859
2534 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
2535 check_builtin_function_arguments.
2536
fb2647aa
RB
25372016-05-03 Richard Biener <rguenther@suse.de>
2538
2539 * Make-lang.in (cc1-checksum.c): For stage-final re-use
2540 the checksum from the previous stage.
2541
77886428
CP
25422016-05-02 Cesar Philippidis <cesar@codesourcery.com>
2543
2544 * c-parser.c (c_parser_oacc_all_clauses): Update call to
2545 c_finish_omp_clauses.
2546 (c_parser_omp_all_clauses): Likewise.
2547 (c_parser_oacc_cache): Likewise.
2548 (c_parser_oacc_loop): Likewise.
2549 (omp_split_clauses): Likewise.
2550 (c_parser_omp_declare_target): Likewise.
2551 (c_parser_cilk_all_clauses): Likewise.
2552 (c_parser_cilk_for): Likewise.
2553 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
2554 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2555
7176a4a0
MP
25562016-05-02 Marek Polacek <polacek@redhat.com>
2557
2558 PR c/70851
2559 * c-decl.c (grokdeclarator): Diagnose when array's size has an
2560 incomplete type.
2561
e7ff0319
CP
25622016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2563
2564 PR middle-end/70626
2565 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
2566 OACC_LOOP_CLAUSE_MASK.
2567 (c_parser_oacc_kernels_parallel): Update call to
2568 c_oacc_split_loop_clauses.
2569
9f405ce1
AM
25702016-04-28 Andrew MacLeod <amacleod@redhat.com>
2571
2572 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
2573 argument to build_modify_expr in two cases.
2574
c1e1f433
BS
25752016-04-27 Bernd Schmidt <bschmidt@redhat.com>
2576
2577 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2578 warn_for_memset instead of warning directly here.
2579
2448a956
MP
25802016-04-26 Marek Polacek <polacek@redhat.com>
2581
2582 PR c/67784
2583 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2584 out of ...
2585 (c_parser_for_statement): ... here.
2586 (c_parser_if_statement): Use it.
2587 (c_parser_switch_statement): Use it.
2588 (c_parser_while_statement): Use it.
2589
b02a5e26
MP
2590 PR c/70791
2591 * c-decl.c (pushdecl): Pass LOCUS down to warning.
2592
477d4906
IV
25932016-04-20 Ilya Verbin <ilya.verbin@intel.com>
2594
2595 PR c++/69363
2596 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2597 instead of c_finish_cilk_clauses.
2598 * c-tree.h (c_finish_omp_clauses): Add new default argument.
2599 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
2600 floating-point variables in the linear clause for Cilk Plus.
2601
fe37c7af
MM
26022016-04-18 Michael Matz <matz@suse.de>
2603
2604 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2605 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2606
949505a9
MP
26072016-04-15 Marek Polacek <polacek@redhat.com>
2608
2609 PR c/70671
2610 * c-typeck.c (build_unary_op): Pass location down to error and
2611 warning call.
2612
dda1bf61
JJ
26132016-04-15 Jakub Jelinek <jakub@redhat.com>
2614
2615 PR c/70436
2616 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2617 where needed.
2618 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2619 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2620 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2621 Adjust c_parser_pragma callers.
2622 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
2623 caller.
2624 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2625 c_parser_statement.
2626 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2627 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2628 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2629 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2630 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2631 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2632 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2633 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2634 down where needed.
2635 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
2636 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2637 calls.
2638
99cd9857
MP
26392016-04-13 Marek Polacek <polacek@redhat.com>
2640
2641 PR c/70436
2642 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2643 adjust callers.
2644 (c_parser_statement): Likewise.
2645 (c_parser_c99_block_statement): Likewise.
2646 (c_parser_while_statement): Likewise.
2647 (c_parser_for_statement): Likewise.
2648 (c_parser_if_body): Don't set IF_P here.
2649 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
2650 about dangling else here.
2651 * c-tree.h (c_finish_if_stmt): Adjust declaration.
2652 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
2653 warn about dangling else here.
2654
f13355da
MP
26552016-04-04 Marek Polacek <polacek@redhat.com>
2656
2657 PR c/70307
2658 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2659
5fde6a45
MP
26602016-03-31 Marek Polacek <polacek@redhat.com>
2661
2662 PR c/70297
2663 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2664
4bbf545b
DM
26652016-03-18 David Malcolm <dmalcolm@redhat.com>
2666
2667 PR c/70281
2668 * c-parser.c (c_parser_postfix_expression): Set the source range
2669 for uses of "__builtin_types_compatible_p".
2670
fcc2b74f
JJ
26712016-03-17 Jakub Jelinek <jakub@redhat.com>
2672
2673 PR c/70280
2674 * c-typeck.c (composite_type): Don't count void_list_node
2675 into len, if the list is terminated by void_list_node, start
2676 with void_list_node instead of NULL for newargs. Stop
2677 at void_list_node.
2678
ab4c578f
MP
26792016-03-16 Marek Polacek <polacek@redhat.com>
2680
2681 PR c/70093
2682 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2683 nested functions returning VM types.
2684
96b3c82d
CP
26852016-03-09 Cesar Philippidis <cesar@codesourcery.com>
2686
2687 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2688 when calling c_finish_omp_clauses.
2689
29b9828f
BS
26902016-03-04 Bernd Schmidt <bschmidt@redhat.com>
2691
2692 PR c/69824
2693 * c-decl.c (get_parm_info): Don't queue implicit function declarations
2694 for later.
2695
7ff6ca38
MP
26962016-03-04 Marek Polacek <polacek@redhat.com>
2697
2698 PR c/69798
2699 * c-parser.c (c_parser_postfix_expression): Call
2700 c_parser_cast_expression rather than c_parser_postfix_expression.
2701
686e2237
JJ
27022016-03-01 Jakub Jelinek <jakub@redhat.com>
2703
2704 PR c/69796
2705 PR c/69974
2706 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2707 of incomplete decls to error_mark_node.
2708
0b05329b
MP
27092016-02-24 Marek Polacek <polacek@redhat.com>
2710
2711 PR c/69819
2712 * c-decl.c (finish_decl): Don't update the copy of the type of a
2713 different decl type.
2714
067fbd8b
JJ
27152016-02-23 Jakub Jelinek <jakub@redhat.com>
2716
2717 PR objc/69844
2718 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2719 in id_kind reclassification.
2720
bf14eba2
JJ
27212016-02-16 Jakub Jelinek <jakub@redhat.com>
2722
2723 PR c/69835
2724 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2725
ba539195
JN
27262016-02-16 James Norris <jnorris@codesourcery.com>
2727
2728 PR c/64748
2729 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2730
16595a1f
BS
27312016-02-12 Bernd Schmidt <bschmidt@redhat.com>
2732
f48dfe98
BS
2733 * c-decl.c (build_null_declspecs): Zero the entire struct.
2734
16595a1f
BS
2735 PR c/69522
2736 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
2737 callers changed. If nested_p is true, use it to call
2738 finish_implicit_inits.
2739 * c-tree.h (finish_implicit_inits): Declare.
2740 * c-typeck.c (finish_implicit_inits): New function. Move code
2741 from ...
2742 (push_init_level): ... here.
2743 (set_designator, process_init_element): Call finish_implicit_inits.
2744
66756373
JJ
27452016-02-11 Jakub Jelinek <jakub@redhat.com>
2746
2747 PR c/69768
2748 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
2749 arguments for -Waddress warning.
2750
1066e9b5
JJ
27512016-02-04 Jakub Jelinek <jakub@redhat.com>
2752
2753 PR c/69669
2754 * c-decl.c (finish_enum): When honoring mode attribute,
2755 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2756
3a5d2ba4
JJ
27572016-01-29 Jakub Jelinek <jakub@redhat.com>
2758
2759 PR debug/69518
2760 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2761 all type variants, not just TYPE_MAIN_VARIANT.
2762
cbdd8ae0
JJ
27632016-01-27 Jakub Jelinek <jakub@redhat.com>
2764
2765 PR debug/66869
2766 * c-decl.c (c_write_global_declarations_1): Warn with
2767 warn_unused_function if static prototype without definition
2768 is not C_DECL_USED.
2769
fa74a4bc
MP
27702016-01-27 Marek Polacek <polacek@redhat.com>
2771
2772 PR c/68062
2773 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2774 to unsigned, if needed. Add -Wsign-compare warning.
2775
13f92e8d
JJ
27762016-01-26 Jakub Jelinek <jakub@redhat.com>
2777
2778 PR tree-optimization/69483
2779 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2780
cd8e73dc 27812016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
2782
2783 PR c/24293
2784 * c-tree.h (incomplete_record_decls): Declare.
2785 * c-parser.c (incomplete_record_decls): Define.
2786 (c_parser_translation_unit): Iterate through incomplete_record_decls and
2787 report error if any decl has zero size.
2788 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
2789 or enum type to incomplete_record_decls.
2790
e6d6ec9e
TV
27912016-01-14 Tom de Vries <tom@codesourcery.com>
2792
2793 PR tree-optimization/68773
2794 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
2795 set force_output.
2796
00083992
MP
27972016-01-14 Marek Polacek <polacek@redhat.com>
2798
2799 PR c/69262
2800 * c-decl.c (grokdeclarator): Provide more information for invalid
2801 array declarations.
2802
7443cf13
DM
28032016-01-06 David Malcolm <dmalcolm@redhat.com>
2804
2805 * c-parser.c (c_parser_unary_expression): For dereferences, build
2806 a combined location before calling build_indirect_ref, so that
2807 error reports cover the full range, manually updating the c_expr
2808 src_range.
2809
6b131d5b
MP
28102016-01-06 Marek Polacek <polacek@redhat.com>
2811
2812 PR sanitizer/69099
2813 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
2814 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
2815 NULL.
2816
818ab71a
JJ
28172016-01-04 Jakub Jelinek <jakub@redhat.com>
2818
2819 Update copyright years.
2820
2fe0a208
MP
28212016-01-04 Marek Polacek <polacek@redhat.com>
2822
2823 PR c/68908
2824 * c-typeck.c (build_atomic_assign): Improve commentary. Add
2825 optimization to use __atomic_fetch_* built-in if possible.
2826
c7b48c8a
TS
28272015-12-23 Thomas Schwinge <thomas@codesourcery.com>
2828
2829 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
2830 into...
2831 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
2832 all users.
2833
fda5652f
MP
28342015-12-22 Marek Polacek <polacek@redhat.com>
2835
2836 PR c/69002
2837 * c-typeck.c (build_component_ref): Warn when acessing elements of
2838 atomic structures or unions.
2839
745e411d
DM
28402015-12-21 David Malcolm <dmalcolm@redhat.com>
2841
2842 * c-typeck.c: Include "gcc-rich-location.h".
2843 (build_binary_op): In the two places that call binary_op_error,
2844 create a gcc_rich_location and populate it with the location of
2845 the binary op and its two operands.
2846
94c40e19
DM
28472015-12-16 David Malcolm <dmalcolm@redhat.com>
2848
2849 * c-parser.c (c_parser_statement_after_labels): When calling
2850 c_finish_return, Use the return expression's location if it has
2851 one, falling back to the location of the first token within it.
2852 * c-typeck.c (c_finish_return): When issuing warnings about
2853 the incorrect presence/absence of a return value, issue a note
2854 showing the declaration of the function.
2855
de67c4c3
DM
28562015-12-16 David Malcolm <dmalcolm@redhat.com>
2857
2858 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
2859 to 4.
2860 (c_parser_peek_nth_token): New function.
2861 (c_parser_peek_conflict_marker): New function.
2862 (c_parser_error): Detect conflict markers and report them as such.
2863
a10704e1
DM
28642015-12-16 David Malcolm <dmalcolm@redhat.com>
2865
2866 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
2867 to preserve range information for the primary expression
2868 in the call to c_parser_postfix_expression_after_primary.
2869
8062bca6
DM
28702015-12-16 David Malcolm <dmalcolm@redhat.com>
2871
2872 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
2873 expression location, falling back on the first token location,
2874 rather than always using the latter.
2875
d06f8b75
MP
28762015-12-16 Marek Polacek <polacek@redhat.com>
2877
2878 PR c/64637
2879 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
2880 available.
2881
2994fb91
MP
28822015-12-15 Marek Polacek <polacek@redhat.com>
2883
2884 PR c/68907
2885 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
2886 artificial decl.
2887
a1b93f8d
DM
28882015-12-08 David Malcolm <dmalcolm@redhat.com>
2889
2890 * c-parser.c (c_parser_alignof_expression): Capture location of
2891 closing parenthesis (if any), or of end of unary expression, and
2892 use it to build a src_range for the expression.
2893
46c6e1e2
DM
28942015-12-08 David Malcolm <dmalcolm@redhat.com>
2895
2896 PR c/68757
2897 * c-parser.c (c_parser_get_builtin_args): Add
2898 "out_close_paren_loc" param, and write back to it.
2899 (c_parser_postfix_expression): Capture the closing
2900 parenthesis location for RID_CHOOSE_EXPR,
2901 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
2902 RID_BUILTIN_SHUFFLE and use it to set the source range
2903 for such expressions; within RID_BUILTIN_COMPLEX set
2904 the underlying location.
2905
66189108
MP
29062015-12-07 Marek Polacek <polacek@redhat.com>
2907
2908 PR c/68668
2909 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
2910 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
2911
f187980b
EB
29122015-12-04 Eric Botcazou <ebotcazou@adacore.com>
2913
2914 * c-tree.h (c_build_va_arg): Adjust prototype.
2915 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
2916 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
2917 parameter, adjust throughout and issue an error if EXPR is a component
2918 with reverse storage order.
2919
4250754e
JM
29202015-12-02 Jason Merrill <jason@redhat.com>
2921
2922 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
2923 (c_fully_fold_internal, decl_constant_value_for_optimization):
2924 Move from c-common.c.
2925 * c-tree.h: Declare decl_constant_value_for_optimization.
2926 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
2927
e9e32ee6
JM
29282015-12-02 Joseph Myers <joseph@codesourcery.com>
2929
2930 PR c/68162
2931 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
2932 following link from declarator to next declarator. Track original
2933 qualified type and pass it to c_build_qualified_type.
2934 * c-typeck.c (c_build_qualified_type): Add arguments
2935 orig_qual_type and orig_qual_indirect.
2936
ff7a55bf
TS
29372015-12-02 Thomas Schwinge <thomas@codesourcery.com>
2938
2939 * c-parser.c (c_parser_omp_clause_name)
2940 (c_parser_oacc_all_clauses): Alphabetical sorting.
2941
657e4e47
JJ
29422015-12-02 Jakub Jelinek <jakub@redhat.com>
2943
2944 PR c/68533
2945 * c-decl.c (get_parm_info): Use b->locus instead of input_location
2946 for diagnostics.
2947
37d5ad46
JB
29482015-12-01 Julian Brown <julian@codesourcery.com>
2949 Cesar Philippidis <cesar@codesourcery.com>
2950 James Norris <James_Norris@mentor.com>
2951
2952 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
2953 (c_parser_oacc_clause_use_device): New function.
2954 (c_parser_oacc_all_clauses): Add use_device support.
2955 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
2956 (c_parser_oacc_host_data): New function.
2957 (c_parser_omp_construct): Add host_data support.
2958 * c-tree.h (c_finish_oacc_host_data): Add prototype.
2959 * c-typeck.c (c_finish_oacc_host_data): New function.
2960 (c_finish_omp_clauses): Add use_device support.
2961
a4850ce9
JH
29622015-11-29 Jan Hubicka <hubicka@ucw.cz>
2963
2964 PR c/67106
2965 * c-decl.c: Set TYPE_PACKED in variants.
2966
b58d3df2
ML
29672015-11-27 Martin Liska <mliska@suse.cz>
2968
2969 PR c++/68312
2970 * c-array-notation.c (fix_builtin_array_notation_fn):
2971 Use release_vec_vec instead of vec::release.
2972 (build_array_notation_expr): Likewise.
2973 (fix_conditional_array_notations_1): Likewise.
2974 (fix_array_notation_expr): Likewise.
2975 (fix_array_notation_call_expr): Likewise.
2976
aec17bfe
JJ
29772015-11-27 Jakub Jelinek <jakub@redhat.com>
2978
2979 PR c/63326
2980 * c-parser.c (c_parser_compound_statement_nostart): If
2981 last_label is true, use pragma_stmt instead of pragma_compound
2982 as second c_parser_pragma argument.
2983 (c_parser_omp_ordered, c_parser_omp_target_update,
2984 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
2985 false as second argument to c_parser_skip_to_pragma_eol after
2986 diagnosing standalone directives used in pragma_stmt context.
2987
688c4de0
IV
29882015-11-24 Ilya Verbin <ilya.verbin@intel.com>
2989
2990 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
2991 with "if (ENABLE_OFFLOADING)".
2992
cbd03aee
DM
29932015-11-23 David Malcolm <dmalcolm@redhat.com>
2994
2995 PR objc/68438
2996 * c-parser.c (c_parser_postfix_expression): Set up source ranges
2997 for various Objective-C constructs: Class.name syntax,
2998 @selector(), @protocol(), @encode(), and [] message syntax.
2999
a87a86e1
DM
30002015-11-20 David Malcolm <dmalcolm@redhat.com>
3001
3002 PR 62314
3003 * c-typeck.c (should_suggest_deref_p): New function.
3004 (build_component_ref): Special-case POINTER_TYPE when
3005 generating a "not a structure of union" error message, and
3006 suggest a "->" rather than a ".", providing a fix-it hint.
3007
8ece8dfb
DM
30082015-11-19 David Malcolm <dmalcolm@redhat.com>
3009
3010 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
3011 candidate into a new function, find_closest_identifier.
3012
433068cc
MP
30132015-11-19 Marek Polacek <polacek@redhat.com>
3014
3015 PR c/68412
3016 * c-typeck.c (parser_build_binary_op): Properly handle
3017 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
3018
bef08b71
DM
30192015-11-17 David Malcolm <dmalcolm@redhat.com>
3020
3021 * c-parser.c (set_c_expr_source_range): Bulletproof both
3022 overloaded implementations against NULL expr->value.
3023 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
3024 values.
3025 (c_parser_unary_expression): Likewise when handling addresses of
3026 labels.
3027 (c_parser_postfix_expression): Likewise for statement expressions,
3028 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
3029 __builtin_va_arg, and for __builtin_offset_of.
3030 (c_parser_postfix_expression_after_paren_type): Initialize expr's
3031 src_range using the range of the braced initializer.
3032 (c_parser_transaction_expression): Set src_range for "ret" to a
3033 sane pair of values.
3034
fff77217
KY
30352015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
3036
3037 * c-parser.c (c_finish_omp_declare_simd): Look for
3038 "simd" attribute as well. Update error message.
3039
1d899da2
TS
30402015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3041
3042 * c-parser.c (c_parser_omp_declare_target): Adjust.
3043
e4606348
JJ
30442015-11-14 Jakub Jelinek <jakub@redhat.com>
3045
3046 * c-typeck.c (c_finish_omp_clauses): Don't mark
3047 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
3048
3e636daf
MP
30492015-11-14 Marek Polacek <polacek@redhat.com>
3050
3051 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
3052 * c-typeck.c: Likewise.
3053
ebedc9a3
DM
30542015-11-13 David Malcolm <dmalcolm@redhat.com>
3055
3056 * c-decl.c (warn_defaults_to): Pass line_table to
3057 rich_location ctor.
3058 * c-errors.c (pedwarn_c99): Likewise.
3059 (pedwarn_c90): Likewise.
3060 * c-parser.c (set_c_expr_source_range): New functions.
3061 (c_token::get_range): New method.
3062 (c_token::get_finish): New method.
3063 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
3064 based on the range from the start of the LHS to the end of the
3065 RHS.
3066 (c_parser_conditional_expression): Likewise, based on the range
3067 from the start of the cond.value to the end of exp2.value.
3068 (c_parser_binary_expression): Call set_c_expr_source_range on
3069 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
3070 (c_parser_cast_expression): Call set_c_expr_source_range on ret
3071 based on the cast_loc through to the end of the expr.
3072 (c_parser_unary_expression): Likewise, based on the
3073 op_loc through to the end of op.
3074 (c_parser_sizeof_expression) Likewise, based on the start of the
3075 sizeof token through to either the closing paren or the end of
3076 expr.
3077 (c_parser_postfix_expression): Likewise, using the token range,
3078 or from the open paren through to the close paren for
3079 parenthesized expressions.
3080 (c_parser_postfix_expression_after_primary): Likewise, for
3081 various kinds of expression.
3082 * c-tree.h (struct c_expr): Add field "src_range".
3083 (c_expr::get_start): New method.
3084 (c_expr::get_finish): New method.
3085 (set_c_expr_source_range): New decls.
3086 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
3087 on ret for prefix unary ops.
3088 (parser_build_binary_op): Likewise, running from the start of
3089 arg1.value through to the end of arg2.value.
3090
ec8b536f
MP
30912015-11-13 Marek Polacek <polacek@redhat.com>
3092
3093 PR c/68320
3094 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
3095
277fe616
DM
30962015-11-13 David Malcolm <dmalcolm@redhat.com>
3097
3098 * c-typeck.c: Include spellcheck.h.
3099 (lookup_field_fuzzy_find_candidates): New function.
3100 (lookup_field_fuzzy): New function.
3101 (build_component_ref): If the field was not found, try using
3102 lookup_field_fuzzy and potentially offer a suggestion.
3103
6e232ba4
JN
31042015-11-12 James Norris <jnorris@codesourcery.com>
3105 Joseph Myers <joseph@codesourcery.com>
3106
3107 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
3108 (c_parser_omp_clause_name): Handle 'device_resident' clause.
3109 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3110 and PRAGMA_OMP_CLAUSE_LINK.
3111 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3112 and PRAGMA_OACC_CLAUSE_LINK.
3113 (OACC_DECLARE_CLAUSE_MASK): New definition.
3114 (c_parser_oacc_declare): New function.
3115
9be4f715
MP
31162015-11-12 Marek Polacek <polacek@redhat.com>
3117
3118 PR c/67784
3119 * c-parser.c (c_parser_for_statement): Reclassify the token in
3120 a correct scope.
3121
e78bede6
MP
31222015-11-11 Marek Polacek <polacek@redhat.com>
3123
3124 PR c/68107
3125 PR c++/68266
3126 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
3127 checking the size of an array.
3128
69f293c9
AM
31292015-11-11 Andrew MacLeod <amacleod@redhat.com>
3130
3131 * c-array-notation.c: Remove unused header files.
3132 * c-aux-info.c: Likewise.
3133 * c-convert.c: Likewise.
3134 * c-decl.c: Likewise.
3135 * c-errors.c: Likewise.
3136 * c-lang.c: Likewise.
3137 * c-objc-common.c: Likewise.
3138 * c-parser.c: Likewise.
3139 * c-typeck.c: Likewise.
3140 * gccspec.c: Likewise.
3141
3a40d81d
NS
31422015-11-09 Thomas Schwinge <thomas@codesourcery.com>
3143 Cesar Philippidis <cesar@codesourcery.com>
3144 James Norris <jnorris@codesourcery.com>
3145 Julian Brown <julian@codesourcery.com>
3146 Nathan Sidwell <nathan@codesourcery.com>
3147
3148 c/
3149 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
3150 routine arg.
3151 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
3152 (c_parser_pragma): Parse 'acc routine'.
3153 (OACC_ROUTINE_CLAUSE_MARK): Define.
3154 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
3155
fc402eec
AA
31562015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3157
3158 PR debug/67192
3159 * c-typeck.c (c_finish_loop): For unconditional loops, set the
3160 location of the backward-goto to the start of the loop body.
3161
f6b0b3db
AA
31622015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3163
3164 PR debug/67192
3165 * c-parser.c (c_parser_while_statement): Finish the loop before
3166 parsing ahead for misleading indentation.
3167 (c_parser_for_statement): Likewise.
3168
ee45a32d
EB
31692015-11-08 Eric Botcazou <ebotcazou@adacore.com>
3170
3171 * c-decl.c (finish_struct): If the structure has reverse storage
3172 order, rewrite the type of array fields with scalar component. Call
3173 maybe_apply_pragma_scalar_storage_order on entry.
3174 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
3175 errors on bit-fields and reverse SSO here and not...
3176 (c_mark_addressable): ...here.
3177 (output_init_element): Adjust call to initializer_constant_valid_p.
3178 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
3179
8a645150
DM
31802015-11-06 David Malcolm <dmalcolm@redhat.com>
3181
3182 * c-decl.c (warn_defaults_to): Update for change in signature
3183 of diagnostic_set_info.
3184 * c-errors.c (pedwarn_c99): Likewise.
3185 (pedwarn_c90): Likewise.
3186 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
3187 for textinfo::set_location.
3188
7a5e4956
CP
31892015-11-05 Cesar Philippidis <cesar@codesourcery.com>
3190 Thomas Schwinge <thomas@codesourcery.com>
3191 James Norris <jnorris@codesourcery.com>
3192
3193 * c-parser.c (c_parser_omp_clause_name): Add support for
3194 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
3195 (c_parser_omp_clause_default): Add is_oacc argument. Handle
3196 default(none) in OpenACC.
3197 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
3198 arguments.
3199 (c_parser_oacc_clause_tile): New function.
3200 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
3201 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
3202 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
3203 TILE}.
3204 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
3205 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
3206 FIRSTPRIVATE}.
3207 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
3208 (c_parser_oacc_update): Update the error message for missing clauses.
3209 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
3210 and OMP_CLAUSE_INDEPENDENT.
3211
bfcfbfa0
MP
32122015-11-05 Marek Polacek <polacek@redhat.com>
3213
3214 PR c/68090
3215 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
3216 deal with pre-evaluation on invalid types.
3217
e01d41e5
JJ
32182015-11-05 Jakub Jelinek <jakub@redhat.com>
3219 Ilya Verbin <ilya.verbin@intel.com>
3220
3221 * c-parser.c: Include context.h and gimple-expr.h.
3222 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
3223 monotonic together with nonmonotonic.
3224 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
3225 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
3226 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
3227 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
3228 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
3229 expressions on combined target teams before the target.
3230 (c_parser_omp_declare_target): If decl has "omp declare target" or
3231 "omp declare target link" attribute, and cgraph or varpool node already
3232 exists, then set corresponding flags. Call c_finish_omp_clauses
3233 in the parenthesized extended-list syntax case.
3234 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
3235 declare target.
3236 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
3237 on OMP_CLAUSE_REDUCTION array sections.
3238 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
3239 into the constant offset, or for variable low-bound using
3240 POINTER_PLUS_EXPR. For structure element based array sections use
3241 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
3242 (c_finish_omp_clauses): Drop generic_field_head, structure
3243 elements are now always mapped even as array section bases,
3244 diagnose same var in data sharing and mapping clauses. Diagnose if
3245 linear step on declare simd is neither a constant nor a uniform
3246 parameter. Look through POINTER_PLUS_EXPR for array section
3247 reductions. Diagnose the same var or function appearing multiple
3248 times on the same directive. Fix up wording for the to clause if t
3249 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
3250 modifier on kinds other than dynamic or guided or nonmonotonic
3251 modifier together with ordered clause.
3252
4bf9e5a8
TS
32532015-11-03 Thomas Schwinge <thomas@codesourcery.com>
3254 Chung-Lin Tang <cltang@codesourcery.com>
3255
3256 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
3257
2adfab87
AM
32582015-10-29 Andrew MacLeod <amacleod@redhat.com>
3259
3260 * c-array-notation.c: Reorder #include's and remove duplicates.
3261 * c-aux-info.c: Likewise.
3262 * c-convert.c: Likewise.
3263 * c-decl.c: Likewise.
3264 * c-errors.c: Likewise.
3265 * c-lang.c: Likewise.
3266 * c-objc-common.c: Likewise.
3267 * c-parser.c: Likewise.
3268 * c-typeck.c: Likewise.
3269
e922069e
JW
32702015-10-26 Jim Wilson <jim.wilson@linaro.org>
3271
3272 PR debug/66068
3273 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
3274 after calling build_qualified_type.
3275
765dd391
CP
32762015-10-27 Cesar Philippidis <cesar@codesourcery.com>
3277 Thomas Schwinge <thomas@codesourcery.com>
3278 James Norris <jnorris@codesourcery.com>
3279 Joseph Myers <joseph@codesourcery.com>
3280 Julian Brown <julian@codesourcery.com>
3281 Bernd Schmidt <bschmidt@redhat.com>
3282
3283 * c-parser.c (c_parser_oacc_shape_clause): New.
3284 (c_parser_oacc_simple_clause): New.
3285 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
3286 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
3287
88bae6f4
TS
32882015-10-27 Thomas Schwinge <thomas@codesourcery.com>
3289 James Norris <jnorris@codesourcery.com>
3290 Cesar Philippidis <cesar@codesourcery.com>
3291
3292 PR c/64765
3293 PR c/64880
3294 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
3295 parameters, and handle these. Adjust all users.
3296 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
3297 into...
3298 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
3299 all users.
3300 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
3301 declare functions.
3302 (c_finish_omp_construct): Declare function.
3303 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
3304 Merge functions into...
3305 (c_finish_omp_construct): ... this new function.
3306
a8fc2579
RB
33072015-10-22 Richard Biener <rguenther@suse.de>
3308
3309 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
3310 before folding a MINUS_EXPR.
3311
e9122ef6
MP
33122015-10-21 Marek Polacek <polacek@redhat.com>
3313
3314 PR c/68024
3315 * c-decl.c (start_function): Warn about vararg functions without
3316 a prototype.
3317
9f47c7e5
IE
33182015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
3319
3320 * c-typeck.c (build_conditional_expr): Use boolean vector
3321 type for vector comparison.
3322 (build_vec_cmp): New.
3323 (build_binary_op): Use build_vec_cmp for comparison.
3324
fa60eeb9
MP
33252015-10-20 Marek Polacek <polacek@redhat.com>
3326
3327 * c-parser.c (is_cilkplus_vector_p): Don't define here.
3328
2c7020eb
MP
33292015-10-20 Marek Polacek <polacek@redhat.com>
3330
3331 PR c/67964
3332 * c-parser.c (c_parser_attributes): Break out of the loop if the
3333 token after an attribute isn't a comma.
3334
d9a6bd32
JJ
33352015-10-13 Jakub Jelinek <jakub@redhat.com>
3336 Aldy Hernandez <aldyh@redhat.com>
3337
3338 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
3339 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
3340 (c_parser_omp_variable_list): Handle structure elements for
3341 map, to and from clauses. Handle array sections in reduction
3342 clause. Formatting fixes.
3343 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
3344 if clause modifiers.
3345 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3346 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3347 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
3348 c_parser_omp_clause_is_device_ptr): New functions.
3349 (c_parser_omp_clause_ordered): Parse optional parameter.
3350 (c_parser_omp_clause_reduction): Handle array reductions.
3351 (c_parser_omp_clause_schedule): Parse optional simd modifier.
3352 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
3353 functions.
3354 (c_parser_omp_clause_linear): Parse linear clause modifiers.
3355 (c_parser_omp_clause_depend_sink): New function.
3356 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
3357 (c_parser_omp_clause_map): Parse release/delete map kinds and
3358 optional always modifier.
3359 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
3360 and c_finish_omp_clauses callers.
3361 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
3362 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
3363 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
3364 (OMP_CRITICAL_CLAUSE_MASK): Define.
3365 (c_parser_omp_critical): Parse critical clauses.
3366 (c_parser_omp_for_loop): Handle doacross loops, adjust
3367 c_finish_omp_for and c_finish_omp_clauses callers.
3368 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
3369 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
3370 (OMP_FOR_CLAUSE_MASK): Add linear clause.
3371 (c_parser_omp_for): Disallow ordered clause when combined with
3372 distribute. Disallow linear clause when combined with distribute
3373 and not combined with simd.
3374 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
3375 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
3376 parse clauses and if depend clause is found, don't parse a body.
3377 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
3378 Allow target parallel without for after it.
3379 (OMP_TASK_CLAUSE_MASK): Add priority clause.
3380 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
3381 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
3382 invalid kinds.
3383 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
3384 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
3385 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
3386 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
3387 functions.
3388 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
3389 defaultmap and is_device_ptr clauses.
3390 (c_parser_omp_target): Parse target parallel and target simd. Set
3391 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
3392 and target exit data. Diagnose invalid map kinds.
3393 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
3394 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
3395 construct.
3396 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
3397 &omp_priv.
3398 (OMP_TASKLOOP_CLAUSE_MASK): Define.
3399 (c_parser_omp_taskloop): New function.
3400 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
3401 handle PRAGMA_OMP_TASKLOOP.
3402 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
3403 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
3404 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
3405 Add IS_OMP argument, handle structure element bases, diagnose
3406 bitfields, pass IS_OMP recursively, diagnose known zero length
3407 array sections in depend clauses, handle array sections in reduction
3408 clause, diagnose negative length even for pointers.
3409 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
3410 types, pass IS_OMP down to handle_omp_array_sections_1, handle
3411 array sections in reduction clause, set
3412 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
3413 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
3414 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
3415 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
3416
21ba0cea
MP
34172015-10-06 Marek Polacek <polacek@redhat.com>
3418
3419 * c-parser.c (c_parser_statement_after_labels): Use
3420 protected_set_expr_location.
3421 (c_parser_omp_clause_num_gangs): Likewise.
3422 (c_parser_omp_clause_num_threads): Likewise.
3423 (c_parser_omp_clause_num_workers): Likewise.
3424 (c_parser_omp_clause_vector_length): Likewise.
3425 (c_parser_omp_clause_num_teams): Likewise.
3426 (c_parser_omp_clause_thread_limit): Likewise.
3427 * c-typeck.c (build_c_cast): Likewise.
3428 (c_cast_expr): Likewise.
3429
624d31fe
RS
34302015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3431
3432 * c-typeck.c (c_tree_equal): Use real_equal instead of
3433 REAL_VALUES_EQUAL.
3434
b8fd7909
JM
34352015-10-04 Jason Merrill <jason@redhat.com>
3436
3437 * c-parser.c (c_lex_one_token): Handle @synchronized.
3438 * c-decl.c (match_builtin_function_types): A declaration of a built-in
3439 can change whether the function is transaction_safe.
3440
1c7485af
MP
34412015-10-02 Marek Polacek <polacek@redhat.com>
3442
3443 PR c/67730
3444 * c-typeck.c (convert_for_assignment): Use the expansion point
3445 location throughout.
3446
3e3b8d63
MP
34472015-10-02 Marek Polacek <polacek@redhat.com>
3448
3449 PR c/64249
3450 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
3451 and pass it down to c_parser_if_statement.
3452 (c_parser_else_body): Add CHAIN parameter and pass it down to
3453 c_parser_statement_after_labels.
3454 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
3455 duplicated if-else-if conditions.
3456
aabef2de
MP
34572015-10-01 Marek Polacek <polacek@redhat.com>
3458
3459 * c-typeck.c (convert_for_assignment): Improve commentary.
3460
de8ddd5f
MP
34612015-09-30 Marek Polacek <polacek@redhat.com>
3462
3463 PR c/67730
3464 * c-typeck.c (c_finish_return): Use the expansion point location for
3465 certain "return with value" warnings.
3466
c4914de6
MLI
34672015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3468
3469 * c-parser.c (pragma_lex): Add loc argument.
3470
0e36f5c7
MP
34712015-09-15 Marek Polacek <polacek@redhat.com>
3472
3473 PR c/67580
3474 * c-decl.c (tag_exists_p): New function.
3475 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3476 struct/union/enum keywords are missing.
3477 * c-tree.h (tag_exists_p): Declare.
3478
2f3bb934
MP
34792015-09-15 Marek Polacek <polacek@redhat.com>
3480
3481 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3482 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3483 Return NULL_TREE instead of 0.
3484 (lookup_name): Return NULL_TREE instead of 0.
3485 (lookup_name_in_scope): Likewise.
3486 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3487 (parser_xref_tag): Use false instead of 0.
3488 (start_struct): Use true instead of 1.
3489 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3490
aa256c4a
MP
34912015-09-14 Marek Polacek <polacek@redhat.com>
3492
3493 * c-typeck.c (set_nonincremental_init_from_string): Use
3494 HOST_WIDE_INT_M1U when shifting a negative value.
3495
dbb68221
MW
34962015-09-09 Mark Wielaard <mjw@redhat.com>
3497
3498 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
3499 parm against NULL.
3500
a8a098ac
JJ
35012015-09-10 Jakub Jelinek <jakub@redhat.com>
3502
3503 PR c/67502
3504 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
3505 into OMP_FOR_PRE_BODY rather than before the loop.
3506
f4b189d5
JJ
35072015-09-09 Jakub Jelinek <jakub@redhat.com>
3508
0bb99c11
JJ
3509 PR c/67501
3510 * c-parser.c (c_parser_oacc_all_clauses,
3511 c_parser_omp_all_clauses): Remove invalid clause from
3512 list of clauses even if parser->error is set.
3513
fce5e5e3
JJ
3514 PR c/67500
3515 * c-parser.c (c_parser_omp_clause_aligned,
3516 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3517 test for errors.
3518 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3519 error_mark_node.
3520
f4b189d5
JJ
3521 PR c/67495
3522 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3523 instead of c_parser_unary_expression. If the result is !lvalue_p,
3524 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3525
b2aaf235
MP
35262015-09-04 Marek Polacek <polacek@redhat.com>
3527
3528 PR sanitizer/67279
3529 * c-typeck.c (build_binary_op): Don't instrument static initializers.
3530
1807ffc1
MS
35312015-09-03 Martin Sebor <msebor@redhat.com>
3532
3533 PR c/66516
8b652e65
JJ
3534 * c-typeck.c (convert_arguments, parser_build_unary_op,
3535 build_conditional_expr, c_cast_expr, convert_for_assignment,
3536 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
3537 reject_gcc_builtin.
3538 (c_decl_implicit): Define.
3539
d04ff417
MP
35402015-09-02 Marek Polacek <polacek@redhat.com>
3541
3542 PR c/67432
3543 * c-parser.c (c_parser_enum_specifier): Give a better error for
3544 an empty enum.
3545
a79683d5
TS
35462015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3547
3548 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3549
191a6b94
MP
35502015-08-12 Marek Polacek <polacek@redhat.com>
3551
3552 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
3553 LOC to it.
3554
420a9d9b
MP
35552015-08-03 Marek Polacek <polacek@redhat.com>
3556
3557 PR c/67088
3558 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
3559 Use it.
3560 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
3561
992118a1
PP
35622015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3563
3564 * c-parser.c (c_parser_if_body): Take token_indent_info
3565 argument. Call warn_for_misleading_indentation even when the
3566 body is a semicolon. Extract token_indent_infos corresponding
3567 to the guard, body and next tokens. Adjust call to
3568 warn_for_misleading_indentation accordingly.
3569 (c_parser_else_body): Likewise.
3570 (c_parser_if_statement): Likewise.
3571 (c_parser_while_statement): Likewise.
3572 (c_parser_for_statement): Likewise.
3573
46308474
LFSM
35742015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
3575 Manuel López-Ibáñez <manu@gcc.gnu.org>
3576
3577 * c-decl.c (get_parm_info): Remove static var. Update warning
3578 message.
3579
05b28fd6
MP
35802015-07-27 Marek Polacek <polacek@redhat.com>
3581
3582 PR c++/66555
3583 PR c/54979
3584 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3585
451b5e48
MP
35862015-07-20 Marek Polacek <polacek@redhat.com>
3587
3588 PR c++/55095
3589 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3590 (build_binary_op): Warn about left shift overflows.
3591
1916bcb5
AM
35922015-07-09 Andrew MacLeod <amacleod@redhat.com>
3593
3594 * c-array-notation.c: Adjust includes for flags.h changes.
3595 * c-objc-common.c: Likewise.
3596
c7131fb2
AM
35972015-07-07 Andrew MacLeod <amacleod@redhat.com>
3598
3599 * c-array-notation.c: Adjust includes.
3600 * c-aux-info.c: Likewise.
3601 * c-convert.c: Likewise.
3602 * c-decl.c: Likewise.
3603 * c-errors.c: Likewise.
3604 * c-lang.c: Likewise.
3605 * c-objc-common.c: Likewise.
3606 * c-parser.c: Likewise.
3607 * c-typeck.c: Likewise.
3608
da2e71c9
MLI
36092015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3610
3611 PR fortran/66605
3612 * c-decl.c (finish_function): Call do_warn_unused_parameter.
3613
b155cfd9
MP
36142015-06-29 Marek Polacek <polacek@redhat.com>
3615
3616 PR c/66322
3617 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3618 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
3619 about -Wswitch-bool here.
3620 (do_case): Update c_add_case_label call.
3621 (c_finish_case): Update c_do_switch_warnings call.
3622
31521951
MP
36232015-06-27 Marek Polacek <polacek@redhat.com>
3624
3625 * c-typeck.c: Use VECTOR_TYPE_P throughout.
3626
22d03525
MP
36272015-06-26 Marek Polacek <polacek@redhat.com>
3628
3629 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3630 INDIRECT_REF_P.
3631 * c-typeck.c (array_to_pointer_conversion): Likewise.
3632 (build_unary_op): Likewise.
3633 (c_finish_return): Likewise.
3634
f0889939
AM
36352015-06-25 Andrew MacLeod <amacleod@redhat.com>
3636
3637 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3638 * c-parser.c: Likewise.
3639
8d67ee55
RS
36402015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3641
3642 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3643 instead of pointer_hash.
3644 (detect_field_duplicates): Likewise.
3645
0ae9bd27
MP
36462015-06-25 Marek Polacek <polacek@redhat.com>
3647
3648 * c-array-notation.c: Use VAR_P throughout.
3649 * c-decl.c: Likewise.
3650 * c-objc-common.c: Likewise.
3651 * c-parser.c: Likewise.
3652 * c-typeck.c: Likewise.
3653
62f9079a
MP
36542015-06-25 Marek Polacek <polacek@redhat.com>
3655
3656 * c-decl.c: Use is_global_var throughout.
3657 * c-parser.c: Likewise.
3658 * c-typeck.c: Likewise.
3659
abb226c9
AM
36602015-06-17 Andrew MacLeod <amacleod@redhat.com>
3661
3662 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3663 * c-aux-info.c: Likewise.
3664 * c-convert.c: Likewise.
3665 * c-decl.c: Likewise.
3666 * c-errors.c: Likewise.
3667 * c-lang.c: Likewise.
3668 * c-objc-common.c: Likewise.
3669 * c-parser.c: Likewise.
3670 * c-typeck.c: Likewise.
3671
8cbababc
JH
36722015-06-11 Jan Hubicka <hubicka@ucw.cz>
3673
3674 PR middle-end/66325
3675 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3676 variants.
3677
a0349665
PMR
36782015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
3679
3680 * c-decl.c (pop_scope): Register the main translation unit
3681 through the new debug hook.
3682
13fdf2e2
AM
36832015-06-08 Andrew MacLeod <amacleod@redhat.com>
3684
3685 * c-array-notation.c : Adjust include files.
3686 * c-aux-info.c : Likewise.
3687 * c-convert.c : Likewise.
3688 * c-decl.c : Likewise.
3689 * c-errors.c : Likewise.
3690 * c-lang.c : Likewise.
3691 * c-lang.h : Likewise.
3692 * c-objc-common.c : Likewise.
3693 * c-parser.c : Likewise.
3694 * c-typeck.c : Likewise.
3695
d7438551
AH
36962015-06-05 Aldy Hernandez <aldyh@redhat.com>
3697
3698 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3699 immediately clobber it.
3700 (c_write_global_declarations_1): Remove call to
3701 check_global_declaration_1.
3702 (c_write_global_declarations_2): Remove.
3703 (c_write_final_cleanups): Rename from c_write_global_declarations.
3704 Remove call to finalize_compilation_unit.
3705 Remove calls to debugging hooks.
3706 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3707 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3708 * c-tree.h: Remove c_write_global_declarations.
3709
ecb9f223
AM
37102015-06-04 Andrew MacLeod <amacleod@redhat.com>
3711
3712 * c-array-notation.c: Adjust includes for restructured coretypes.h.
3713 * c-aux-info.c: Likewise.
3714 * c-convert.c: Likewise.
3715 * c-decl.c: Likewise.
3716 * c-errors.c: Likewise.
3717 * c-lang.c: Likewise.
3718 * c-objc-common.c: Likewise.
3719 * c-parser.c: Likewise.
3720 * c-typeck.c: Likewise.
3721
9482b620
MP
37222015-06-04 Marek Polacek <polacek@redhat.com>
3723
3724 PR c/66341
3725 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3726 it is a lvalue.
3727
bc51ace3
PK
37282015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3729
3730 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3731 Warn for empty struct.
3732 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3733
ea5b45b6
AT
37342015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
3735
3736 * c-decl.c (start_function): Call plugin before parsing.
3737 (finish_function): Call plugin after parsing.
3738
c2d47482
PK
37392015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3740
3741 PR c/49551
3742 * c-decl.c (merge_decls): Merge DECL_COMMON.
3743
a95492ab
JW
37442015-05-22 Jim Wilson <jim.wilson@linaro.org>
3745
3746 * Make-lang.in (check_gcc_pallelize): Define.
3747
fd5c817a
MP
37482015-05-22 Marek Polacek <polacek@redhat.com>
3749
3750 PR c/47043
3751 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
3752 attributes.
3753
c7b70a3c
MP
37542015-05-21 Marek Polacek <polacek@redhat.com>
3755
3756 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3757 DECL_BUILT_IN.
3758
21b634ae
MP
37592015-05-20 Marek Polacek <polacek@redhat.com>
3760
3761 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3762 * c-typeck.c: Likewise.
3763
296a8c2f
MP
37642015-05-19 Marek Polacek <polacek@redhat.com>
3765
3766 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3767
41b37d5e
JJ
37682015-05-19 Jakub Jelinek <jakub@redhat.com>
3769
3770 PR middle-end/66199
3771 * c-parser.c (c_parser_omp_for_loop): Don't add
3772 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3773 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3774 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3775 constructs.
3776
fab27f52
MM
37772015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
3778
3779 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 3780 swaps.
fab27f52 3781
40de31cf
MLI
37822015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3783
3784 PR fortran/44054
3785 * c-objc-common.c (c_tree_printer): Replace locus pointer with
3786 accessor function.
3787
3aa3c9fc
MP
37882015-05-14 Marek Polacek <polacek@redhat.com>
3789
3790 PR c/66066
3791 PR c/66127
3792 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
3793 rather than with 0.
3794
c3388e62
DM
37952015-05-12 David Malcolm <dmalcolm@redhat.com>
3796
3797 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
3798 to add a call to warn_for_misleading_indentation.
3799 (c_parser_else_body): Likewise, adding param "else_loc".
3800 (c_parser_if_statement): Check for misleading indentation.
3801 (c_parser_while_statement): Likewise.
3802 (c_parser_for_statement): Likewise.
3803
755e528f
MP
38042015-05-08 Marek Polacek <polacek@redhat.com>
3805
3806 PR c/64918
3807 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
3808 (output_init_element): Likewise.
3809
0173bd2a
MP
38102015-05-07 Marek Polacek <polacek@redhat.com>
3811
3812 PR c/65179
3813 * c-typeck.c (build_binary_op): Warn when left shifting a negative
3814 value.
3815
9babc352
MP
38162015-04-30 Marek Polacek <polacek@redhat.com>
3817
3818 * c-typeck.c (set_init_label): Call error_at instead of error and
3819 pass LOC to it.
3820
ac9f18db
MP
3821 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
3822 the type of a decl.
3823
ec3fba51
MP
3824 * c-typeck.c (c_build_va_arg): Clarify the error message.
3825
b811915d
TS
38262015-04-29 Thomas Schwinge <thomas@codesourcery.com>
3827
3828 * c-parser.c (c_parser_oacc_enter_exit_data): Use
3829 OMP_STANDALONE_CLAUSES.
3830
f3075008
MP
38312015-04-28 Marek Polacek <polacek@redhat.com>
3832
3833 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
3834
4e81b788
MP
38352015-04-28 Marek Polacek <polacek@redhat.com>
3836
3837 PR c/65901
3838 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
3839
6c1db78e
MP
38402015-04-25 Marek Polacek <polacek@redhat.com>
3841
3842 PR c/52085
3843 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
3844 attribute.
3845
5c4abbb8
MP
38462015-04-23 Marek Polacek <polacek@redhat.com>
3847
3848 PR c/65345
3849 * c-decl.c (set_labels_context_r): New function.
3850 (store_parm_decls): Call it via walk_tree_without_duplicates.
3851 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
3852 instead of create_tmp_var. Build TARGET_EXPR instead of
3853 COMPOUND_EXPR.
3854 (build_atomic_assign): Use create_tmp_var_raw instead of
3855 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
3856
06aca1d5
IV
38572015-04-20 Ilya Verbin <ilya.verbin@intel.com>
3858
3859 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
3860 (c_parser_omp_target_update): Add missed %> to error_at ().
3861
8fba1830
BRF
38622015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
3863
3864 PR target/55143
3865 * c-decl.c (c_default_pointer_mode): Remove definition.
3866 * c-tree.h (c_default_pointer_mode): Remove declaration.
3867
62021f64
TB
38682015-03-27 Tobias Burnus <burnus@net-b.de>
3869
3870 PR c/65586
3871 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
3872 error out.
3873 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
3874 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
3875 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
3876
9b65e171
JJ
38772015-03-19 Jakub Jelinek <jakub@redhat.com>
3878
3879 * c-decl.c (c_decl_attributes): Also add "omp declare target"
3880 attribute for DECL_EXTERNAL VAR_DECLs.
3881
17958621
JJ
38822015-03-11 Jakub Jelinek <jakub@redhat.com>
3883
3884 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
3885 argument.
3886
7ccb1a11
JJ
38872015-03-10 Jakub Jelinek <jakub@redhat.com>
3888
3889 PR c/65120
3890 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
3891 before preparing arguments to warn_logical_not_parentheses.
3892
01177669
JJ
38932015-03-09 Jakub Jelinek <jakub@redhat.com>
3894
3895 PR c/65120
3896 * c-typeck.c (parser_build_binary_op): Don't warn for
3897 !!x == y or !b == y where b is _Bool.
3898
802ac282
MP
38992015-03-09 Marek Polacek <polacek@redhat.com>
3900
3901 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
3902 * c-decl.c (grokdeclarator): Likewise.
3903 * c-typeck.c (build_binary_op): Likewise.
3904
e5165b60
MP
39052015-02-27 Marek Polacek <polacek@redhat.com>
3906
3907 PR c/65228
3908 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
3909
065d214c
MP
39102015-02-14 Marek Polacek <polacek@redhat.com>
3911
3912 PR c/64768
3913 * c-decl.c (grokdeclarator): Set the range of a flexible array member
3914 declared through a typedef name.
3915
e5d9235b
MP
39162015-02-13 Marek Polacek <polacek@redhat.com>
3917
3918 PR c/65050
3919 * c-decl.c (grokdeclarator): Print also the type when giving
3920 the error message about array's incomplete element type.
3921
fa01ffcc
JJ
39222015-02-11 Jakub Jelinek <jakub@redhat.com>
3923
3924 PR c/64824
3925 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
3926 check in the POP macro.
3927
c3e38a03
MP
39282015-02-09 Marek Polacek <polacek@redhat.com>
3929
3930 PR c/64856
3931 * c-typeck.c (process_init_element): Don't always wrap
3932 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
3933 initializing a range of elements.
3934
4886ec8e
JJ
39352015-02-04 Jakub Jelinek <jakub@redhat.com>
3936
3937 PR c/64824
3938 PR c/64868
3939 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
3940
c3e38a03 39412015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
3942
3943 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
3944 processing enum declaration.
3945
7b33f0c8
MP
39462015-01-29 Marek Polacek <polacek@redhat.com>
3947
3948 PR c/64709
3949 * c-typeck.c (pop_init_level): If constructor_elements has
3950 exactly one element with integer_zerop value, set constructor_zeroinit
3951 to 1. Remove braces around warning_init call.
3952
dea63e49
JJ
39532015-01-27 Jakub Jelinek <jakub@redhat.com>
3954
3955 PR c/64766
3956 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
3957 of FUNCTION_DECLs with error_mark_node.
3958
d38f7dce
JJ
39592015-01-26 Jakub Jelinek <jakub@redhat.com>
3960
3961 PR c/64778
3962 * c-typeck.c (convert_arguments): Return -1 if there are
3963 error_args, even if we've diagnosed too many arguments.
3964
cbf5d0e7
RB
39652015-01-21 Richard Biener <rguenther@suse.de>
3966
3967 PR middle-end/64313
3968 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
3969 for builtins the user declared correctly.
3970
41dbbb37
TS
39712015-01-15 Thomas Schwinge <thomas@codesourcery.com>
3972 Bernd Schmidt <bernds@codesourcery.com>
3973 Cesar Philippidis <cesar@codesourcery.com>
3974 James Norris <jnorris@codesourcery.com>
3975 Jakub Jelinek <jakub@redhat.com>
3976 Ilmir Usmanov <i.usmanov@samsung.com>
3977
3978 * c-parser.c: Include "gomp-constants.h".
3979 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3980 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3981 Use OMP_CLAUSE_SET_MAP_KIND.
3982 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
3983 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
3984 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
3985 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
3986 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
3987 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
3988 "copyout", "create", "delete", "deviceptr", "gang", "host",
3989 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
3990 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3991 "present_or_create", "pcreate", "seq", "self", "vector",
3992 "vector_length", "wait", "worker".
3993 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3994 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
3995 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3996 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3997 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
3998 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
3999 (c_parser_oacc_data_clause_deviceptr)
4000 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
4001 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
4002 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
4003 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
4004 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
4005 (c_parser_oacc_parallel, c_parser_oacc_update)
4006 (c_parser_oacc_wait): New functions.
4007 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
4008 (c_finish_oacc_data): New prototypes.
4009 * c-typeck.c: Include "gomp-constants.h".
4010 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
4011 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
4012 OMP_CLAUSE_SET_MAP_KIND.
4013 (c_finish_oacc_parallel, c_finish_oacc_kernels)
4014 (c_finish_oacc_data): New functions.
4015 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
4016 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
4017 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
4018 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
4019 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
4020 GOMP_MAP_FORCE_DEVICEPTR.
4021
adfac8df
JJ
40222015-01-09 Michael Collison <michael.collison@linaro.org>
4023
4024 * c-array-notation.c: Include hash-set.h, machmode.h,
4025 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4026 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
4027 * c-aux-info.c: Ditto.
4028 * c-convert.c: Ditto.
4029 * c-decl.c: Ditto.
4030 * c-errors.c: Ditto.
4031 * c-lang.c: Dittoxs.
4032 * c-objc-common.c: Ditto.
4033 * c-parser.c: Ditto.
4034 * c-typeck.c: Include hash-set.h, machmode.h,
4035 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4036 fold-const.h, wide-int.h, inchash.h, real.h and
4037 fixed-value.h due to flattening of tree.h.
4038
2cc901dc
MP
40392015-01-07 Marek Polacek <polacek@redhat.com>
4040
4041 PR c/64417
4042 * c-typeck.c (process_init_element): Disallow initialization of
4043 a flexible array member with a string constant if the structure
4044 is in an array.
4045
5624e564
JJ
40462015-01-05 Jakub Jelinek <jakub@redhat.com>
4047
e5341100
JJ
4048 PR sanitizer/64344
4049 * c-typeck.c (convert_for_assignment, c_finish_return): For
4050 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
4051 types also set in_late_binary_op around convert call.
4052 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
4053 to integral type casts, if not in_late_binary_op, pass c_fully_fold
4054 result on expr as last argument to ubsan_instrument_float_cast,
4055 if in_late_binary_op, don't use c_save_expr but save_expr.
4056
5624e564
JJ
4057 Update copyright years.
4058
5bd012f8
MP
40592015-01-05 Marek Polacek <polacek@redhat.com>
4060
4061 PR c/64423
4062 * c-typeck.c (build_array_ref): Pass loc down to
4063 warn_array_subscript_with_type_char.
4064
3f8257db 40652014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
4066
4067 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 4068 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 4069 element type.
8e745a17 4070 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 4071 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 4072 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 4073 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 4074 to PEDWARN_FOR_QUALIFIERS.
768952be 4075
8f94a8c4
JJ
40762014-12-17 Jakub Jelinek <jakub@redhat.com>
4077
4078 PR sanitizer/64289
4079 * c-convert.c: Include ubsan.h.
4080 (convert): For real -> integral casts and
4081 -fsanitize=float-cast-overflow don't call convert_to_integer, but
4082 instead instrument the float cast directly.
4083
b731b390
JJ
40842014-11-29 Jakub Jelinek <jakub@redhat.com>
4085
4086 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
4087 c_finish_stmt_expr): Remove NULL last argument from
4088 create_tmp_var_raw and create_tmp_var calls.
4089 * c-array-notation.c (fix_builtin_array_notation_fn,
4090 build_array_notation_expr, fix_conditional_array_notations_1,
4091 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
4092
541e35a6
MP
40932014-11-28 Marek Polacek <polacek@redhat.com>
4094
4095 PR c/63862
4096 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
4097 convert the right operand to integer type.
4098
b286be94
MP
40992014-11-25 Marek Polacek <polacek@redhat.com>
4100
4101 PR c/63877
4102 * c-decl.c (start_function): Disable -Wmissing-declarations warning
4103 for inline functions.
4104
aa7da51a
JJ
41052014-11-21 Jakub Jelinek <jakub@redhat.com>
4106
4107 PR target/63764
4108 * c-typeck.c (build_array_ref): Adjust
4109 convert_vector_to_pointer_for_subscript caller. If it returns true,
4110 call non_lvalue_loc on the result.
4111
d876207f
RB
41122014-11-11 Richard Biener <rguenther@suse.de>
4113
4114 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
4115 to true.
4116
e5e44252
AK
41172014-11-10 Andi Kleen <ak@linux.intel.com>
4118
4119 PR c/60804
4120 * c-parser.c (c_parser_statement_after_labels): Call
4121 check_no_cilk.
4122 (c_parser_if_statement): Dito.
4123 (c_parser_switch_statement): Dito.
4124 (c_parser_while_statement): Dito.
4125 (c_parser_do_statement): Dito.
4126 (c_parser_for_statement): Dito.
4127 * c-typeck.c (c_finish_loop): Dito.
4128
13c21655
PC
41292014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
4130
4131 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
4132 OPT_Wshift_count_overflow in the warnings.
4133
2d51fcef
MP
41342014-10-30 Marek Polacek <polacek@redhat.com>
4135
4136 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
4137 print the stripped version as well, if they're not the same.
4138
ef4bddc2
RS
41392014-10-29 Richard Sandiford <richard.sandiford@arm.com>
4140
4141 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
4142 machine_mode.
4143
c582198b
AM
41442014-10-28 Andrew MacLeod <amacleod@redhat.com>
4145
4146 * c-decl.c: Adjust include files.
4147 * c-parser.c: Ditto.
4148
ddc8de03
PM
41492014-10-27 Phil Muldoon <pmuldoon@redhat.com>
4150 Tom Tromey <tromey@redhat.com>
4151
4152 * c-tree.h (enum c_oracle_request): New.
4153 (c_binding_oracle_function): New typedef.
4154 (c_binding_oracle, c_pushtag, c_bind): Declare.
4155 * c-decl.c (c_binding_oracle): New global.
4156 (I_SYMBOL_CHECKED): New macro.
4157 (i_symbol_binding): New function.
4158 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
4159 (I_TAG_CHECKED): New macro.
4160 (i_tag_binding): New function.
4161 (I_TAG_BINDING, I_TAG_DECL): Redefine.
4162 (I_LABEL_CHECKED): New macro.
4163 (i_label_binding): New function.
4164 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
4165 (c_print_identifier): Save and restore c_binding_oracle.
4166 (c_pushtag, c_bind): New functions.
4167
60393bbc
AM
41682014-10-27 Andrew MacLeod <amacleod@redhat.com>
4169
4170 * c-typeck.c: Adjust include files.
4171
d723bb7c
MLI
41722014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
4173
4174 PR c++/53061
4175 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
4176 initialization here...
4177 (c_initialize_diagnostics): ... but here. Set defaults after
4178 building pretty-printer.
4179
1bc5a451
MP
41802014-10-23 Marek Polacek <polacek@redhat.com>
4181
4182 PR c/63626
4183 * c-decl.c (pop_scope): Don't print warning in external_scope.
4184
4435bb92
MP
41852014-10-19 Marek Polacek <polacek@redhat.com>
4186
4187 PR c/63567
4188 * c-typeck.c (output_init_element): Allow initializing objects with
4189 static storage duration with compound literals even in C99 and add
4190 pedwarn for it.
4191
7278465e
MP
41922014-10-17 Marek Polacek <polacek@redhat.com>
4193
4194 PR c/63567
4195 * c-typeck.c (digest_init): Allow initializing objects with static
4196 storage duration with compound literals even in C99 and add pedwarn
4197 for it.
4198
d9b7be2e
MP
41992014-10-17 Marek Polacek <polacek@redhat.com>
4200
4201 PR c/63543
4202 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
4203 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
4204 error multiple times. Print the type.
4205
f406ae1f
MP
42062014-10-17 Marek Polacek <polacek@redhat.com>
4207
4208 PR c/63549
4209 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
4210 type.
4211
92574c7c
MP
42122014-10-17 Marek Polacek <polacek@redhat.com>
4213
4214 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
4215 (start_function): Use OPT_Wimplicit_int instead of 0.
4216 (store_parm_decls_oldstyle): Likewise.
4217
1bc4a978
MT
42182014-10-17 Alan Modra <amodra@gmail.com>
4219
4220 PR middle-end/61848
4221 * c-decl.c (merge_decls): Don't merge section name or tls model
4222 to newdecl symtab node, instead merge to olddecl. Override
4223 existing olddecl section name. Set tls_model for all thread-local
4224 vars, not just OMP thread-private ones. Remove incorrect comment.
4225
83685514
AM
42262014-10-16 Andrew MacLeod <amacleod@redhat.com>
4227
4228 * c-decl.c: Adjust include files.
4229
78a7c317
DD
42302014-10-14 DJ Delorie <dj@redhat.com>
4231
4232 * c-parser.c (c_parse_init): Add RID entries for each __intN.
4233 (c_token_starts_typename): Check all __intN, not just __int128.
4234 (c_token_starts_declspecs): Likewise.
4235 (c_parser_declspecs): Likewise.
4236 (c_parser_attribute_any_word): Likewise.
4237 (c_parser_objc_selector): Likewise.
4238 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
4239 (struct c_declspecs): Add int_n_idx field to record *which* __intN
4240 is specified.
4241 * c-decl.c (declspecs_add_type): Check for all __intN, not just
4242 __int128.
4243 (finish_declspecs): Likewise.
4244
74d98c1e
AB
42452014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
4246
8e745a17 4247 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 4248 the duplicate code.
8e745a17 4249 (c_parser_statement): Call the new function.
74d98c1e 4250
84937de2
MP
42512014-10-09 Marek Polacek <polacek@redhat.com>
4252
4253 PR c/63480
4254 * c-typeck.c (pop_init_level): Don't warn about initializing
4255 with { }.
4256
0382aaa0
MP
42572014-10-07 Marek Polacek <polacek@redhat.com>
4258
4259 PR c/59717
4260 * c-decl.c (header_for_builtin_fn): New function.
4261 (implicitly_declare): Suggest which header to include.
4262
7a0ca710
MP
42632014-10-07 Marek Polacek <polacek@redhat.com>
4264
4265 * c-convert.c (convert): Use error_operand_p.
4266 * c-typeck.c (require_complete_type): Likewise.
4267 (really_atomic_lvalue): Likewise.
4268 (digest_init): Likewise.
4269 (handle_omp_array_sections_1): Likewise.
4270
6bc8a126
MP
42712014-10-03 Marek Polacek <polacek@redhat.com>
4272
4273 PR c/63453
4274 * c-decl.c (pop_scope): Don't warn about "inline function declared
4275 but never defined" for functions marked with gnu_inline attribute.
4276
d90c0a59
JJ
42772014-09-25 Jakub Jelinek <jakub@redhat.com>
4278
4279 PR c++/63249
4280 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
4281 on low_bound and length.
4282
083e891e
MP
42832014-09-24 Marek Polacek <polacek@redhat.com>
4284
4285 PR c/61405
4286 PR c/53874
4287 * c-parser.c: Don't define CPP_KEYWORD.
4288 (c_parser_switch_statement): Pass original type to c_finish_case.
4289 * c-tree.h (c_finish_case): Update declaration.
4290 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
4291 conditionally to c_do_switch_warnings.
4292
8d95fe25
MP
42932014-09-03 Marek Polacek <polacek@redhat.com>
4294
4295 PR c/62024
4296 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
4297 conversions.
4298
9a771876
JJ
42992014-09-02 Jakub Jelinek <jakub@redhat.com>
4300 Balaji V. Iyer <balaji.v.iyer@intel.com>
4301 Igor Zamyatin <igor.zamyatin@intel.com>
4302
4303 * c-parser.c (c_parser_cilk_for): New function.
4304 (c_parser_cilk_grainsize): Likewise.
4305 (c_get_temp_regvar): Likewise.
4306 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
4307 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
4308 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
4309 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
4310 case.
4311
b7679d96
CG
43122014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
4313
4314 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
4315 with using HOST_WIDE_INT without truncation to 'int'
4316
59ea0364
MP
43172014-08-22 Marek Polacek <polacek@redhat.com>
4318
4319 PR c++/62199
4320 * c-typeck.c (parser_build_binary_op): Adjust call to
4321 warn_logical_not_parentheses.
4322
671a475e
IZ
43232014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
4324
4325 PR other/62008
4326 * c-parser.c (c_parser_array_notation): Check for correct
4327 type of an array added.
4328
04159acf
MP
43292014-08-19 Marek Polacek <polacek@redhat.com>
4330
4331 PR c++/62153
4332 * c-typeck.c (build_binary_op): If either operand of a comparison
4333 is a boolean expression, call maybe_warn_bool_compare.
4334
c77935ee
PP
43352014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
4336
4337 PR c/45584
4338 * c-typeck.c (build_c_cast): Do a conversion even when the
4339 TYPE_MAIN_VARIANTs are the same.
4340
35aff4fb
MP
43412014-08-19 Marek Polacek <polacek@redhat.com>
4342
4343 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
4344 pedwarn_c99 instead of pedwarn.
4345 (grokfield): Likewise.
4346 (warn_defaults_to): New function.
4347 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
4348 Unconditionally call pedwarn_c99 instead of pedwarn.
4349 (start_function): Call warn_defaults_to instead of pedwarn_c99.
4350 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
4351 check flag_isoc11 before.
4352 * c-errors.c (pedwarn_c99): Change the return type to bool.
4353 Handle -Wc99-c11-compat.
4354 * c-parser.c (disable_extension_diagnostics): Handle
4355 warn_c99_c11_compat.
4356 (restore_extension_diagnostics): Likewise.
4357 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
4358 instead of pedwarn, don't check flag_isoc11 before.
4359 (c_parser_declspecs): Likewise.
4360 (c_parser_alignas_specifier): Likewise.
4361 (c_parser_alignof_expression): Likewise.
4362 (c_parser_generic_selection): Likewise.
4363 * c-tree.h (pedwarn_c99): Update declaration.
4364 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
4365 of pedwarn_c99.
4366
177cce46
MP
43672014-08-19 Marek Polacek <polacek@redhat.com>
4368
4369 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
4370 to pedwarn_c90.
4371 * c-errors.c: Include "opts.h".
4372 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
4373 * c-parser.c (disable_extension_diagnostics): Handle negative value
4374 of warn_c90_c99_compat, too.
4375 (restore_extension_diagnostics): Likewise.
4376 (c_parser_compound_statement_nostart): Pass
4377 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
4378
6dc99c33
MP
43792014-08-12 Marek Polacek <polacek@redhat.com>
4380
4381 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
4382 Add pedwarn.
4383 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
4384 Likewise.
4385 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
4386
3f8257db 43872014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
4388
4389 PR c/51849
4390 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
4391 Call pedwarn_c90 instead of pedwarn.
4392 (check_bitfield_type_and_width): Likewise.
4393 (declspecs_add_qual): Likewise.
4394 (declspecs_add_type): Likewise.
4395 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
4396 Adjust to only call pedwarn_c90.
4397 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
4398 pedwarn_c90 instead of pedwarn.
4399 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
4400 * c-parser.c (disable_extension_diagnostics): Handle
4401 warn_c90_c99_compat.
4402 (restore_extension_diagnostics): Likewise.
4403 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
4404 pedwarn_c90 instead of pedwarn.
4405 (c_parser_initelt): Likewise.
4406 (c_parser_postfix_expression): Likewise.
4407 (c_parser_postfix_expression_after_paren_type): Likewise.
4408 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
4409 * c-tree.h: Fix formatting.
4410 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
4411 pedwarn_c90 instead of pedwarn.
4412
9f25a338
TS
44132014-08-07 Trevor Saunders <tsaunders@mozilla.com>
4414
4415 * c-typeck.c: Remove include of pointer-set.h.
4416
044331a8
MP
44172014-08-07 Marek Polacek <polacek@redhat.com>
4418
4419 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
4420
b787e7a2
TS
44212014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4422
4423 * c-typeck.c: Use hash_map instead of pointer_map.
4424
6e2830c3
TS
44252014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4426
4427 * c-decl.c: Use hash_set instead of pointer_set.
4428
a7ee52fb
IZ
44292014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
4430
4431 PR middle-end/61455
4432 * c-array-notation.c (expand_array_notations): Handling
4433 of DECL_EXPR added.
4434
b4dfdc11
MG
44352014-07-31 Marc Glisse <marc.glisse@inria.fr>
4436
4437 PR c++/60517
4438 * c-typeck.c (c_finish_return): Return 0 instead of the address of
4439 a local variable.
4440
976d5a22
TT
44412014-07-30 Tom Tromey <tromey@redhat.com>
4442
4443 * c-typeck.c (struct constructor_stack) <designator_depth>: New
4444 field.
4445 (really_start_incremental_init, push_init_level): Initialize
4446 designator_depth.
4447 (pop_init_level): Set global designator_depth.
4448 (process_init_element): Check for designated_init attribute.
4449
30281de2
MP
44502014-07-20 Marek Polacek <polacek@redhat.com>
4451
4452 PR c/61852
4453 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
4454 (implicitly_declare): Pass location to implicit_decl_warning.
4455
b108f48f
JJ
44562014-07-14 Jakub Jelinek <jakub@redhat.com>
4457
4458 PR middle-end/61294
4459 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
4460 If non-NULL, call c_parser_check_literal_zero.
4461 (c_parser_check_literal_zero): New function.
4462 (c_parser_postfix_expression_after_primary): Adjust
4463 c_parser_expr_list caller, handle -Wmemset-transposed-args.
4464
773ec47f
MP
44652014-07-06 Marek Polacek <polacek@redhat.com>
4466
4467 PR c/6940
4468 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4469 * c-tree.h (C_ARRAY_PARAMETER): Define.
4470 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4471 function parameter.
4472
22e1cf1c 44732014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 4474 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
4475
4476 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4477 releasing symbol.
4478
52ec0ea3
MP
44792014-07-01 Marek Polacek <polacek@redhat.com>
4480
4481 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4482 instead of 0 to WARN_FOR_ASSIGNMENT.
4483
d5c3d343
MP
44842014-07-01 Marek Polacek <polacek@redhat.com>
4485
4486 PR c/58286
4487 * c-typeck.c (convert_for_assignment): Pass
4488 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4489
6a7253a4
MP
44902014-06-30 Marek Polacek <polacek@redhat.com>
4491
4492 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4493 has no_sanitize_undefined attribute.
4494
5e88a8f4
IZ
44952014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
4496
4497 PR middle-end/57541
4498 * c-array-notation.c (fix_builtin_array_notation_fn):
4499 Check for 0 arguments in builtin call. Check that bultin argument is
4500 correct.
4501 * c-parser.c (c_parser_array_notation): Check for incorrect initial
4502 index.
4503
9698b078
SH
45042014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
4505
4506 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
4507 qualifiers in __auto_type for atomic types.
4508 (c_parser_typeof_specifier): Discard all type qualifiers in
4509 __typeof__ for atomic types.
4510
6e07c515
MP
45112014-06-25 Marek Polacek <polacek@redhat.com>
4512
4513 PR c/61162
4514 * c-parser.c (c_parser_statement_after_labels): Pass the location of
4515 the return expression to c_finish_return.
4516
da6f124d
JJ
45172014-06-25 Jakub Jelinek <jakub@redhat.com>
4518
4519 * c-typeck.c (c_finish_omp_clauses): Make sure
4520 OMP_CLAUSE_LINEAR_STEP has correct type.
4521
c203e8a7
TS
45222014-06-24 Trevor Saunders <tsaunders@mozilla.com>
4523
4524 * c-decl.c: Adjust.
4525
56ad0e38
JJ
45262014-06-24 Jakub Jelinek <jakub@redhat.com>
4527
4528 * c-parser.c (c_parser_omp_for_loop): For
4529 #pragma omp parallel for simd move lastprivate clause from parallel
4530 to for rather than simd.
4531
47c2554f
MP
45322014-06-23 Marek Polacek <polacek@redhat.com>
4533
4534 * c-typeck.c (parser_build_binary_op): Don't call
4535 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
4536
56363ffd
JH
45372014-06-15 Jan Hubicka <hubicka@ucw.cz>
4538
4539 * c-parser.c (c_parser_omp_threadprivate): Likewise.
4540 * c-decl.c (merge_decls): Likewise.
4541
d7ff7ae5
MP
45422014-06-09 Marek Polacek <polacek@redhat.com>
4543
4544 PR c/36446
4545 * c-typeck.c (error_init): Call inform instead of error_at.
4546 (pedwarn_init): Call inform instead of pedwarn.
4547 (warning_init): Call inform instead of warning_at.
4548
24d047a3
JH
45492014-06-07 Jan Hubicka <hubicka@ucw.cz>
4550
4551 * c-decl.c (merge_decls): Use set_decl_section_name.
4552 (duplicate_decls): Remove node if it exists.
4553
9bac5cbb
G
45542014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
4555
4556 PR c/53119
4557 * c-typeck.c (push_init_level, process_init_element,
4558 pop_init_level): Correct check for zero initialization, move
4559 missing brace warning to respect zero initialization.
4560
8ffcdea8
MP
45612014-06-05 Marek Polacek <polacek@redhat.com>
4562
4563 PR c/56724
4564 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
4565
742938c9
MP
45662014-06-05 Marek Polacek <polacek@redhat.com>
4567
4568 PR c/49706
4569 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
4570 on the left hand side operand of a comparison.
4571
6447c55d
MP
45722014-06-05 Marek Polacek <polacek@redhat.com>
4573
4574 PR c/48062
4575 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
4576 Print note only if the warning was printed.
4577
9dc7743c
IZ
45782014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
4579
4580 PR c/58942
4581 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4582 with a pointer.
4583
fedfecef
MP
45842014-06-03 Marek Polacek <polacek@redhat.com>
4585
4586 PR c/60439
4587 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4588 c_start_case.
4589 * c-tree.h (c_start_case): Update.
4590 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
4591 switch condition has boolean value.
4592
9b2b7279
AM
45932014-06-02 Andrew MacLeod <amacleod@redhat.com>
4594
4595 * c-decl.c: Include builtins.h.
4596 * c-parser.c: Likewise.
4597
5c1bc275
MP
45982014-05-27 Marek Polacek <polacek@redhat.com>
4599
4600 PR c/56724
4601 * c-typeck.c (convert_arguments): Get location of a parameter. Change
4602 error and warning calls to error_at and warning_at. Pass location of
4603 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
4604 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4605 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
4606
97563bc8
IZ
46072014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
4608
4609 PR c/61191
4610 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4611 function parameters.
4612
aede2c10
JH
46132014-05-23 Jan Hubicka <hubicka@ucw.cz>
4614
4615 * c-decl.c (merge_decls): Preserve symtab node pointers.
4616 (duplicate_decls): Free new decl.
4617
edbba2ce
TS
46182014-05-23 Thomas Schwinge <thomas@codesourcery.com>
4619
f3316c6d
TS
4620 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4621 initialization.
4622
edbba2ce
TS
4623 * c-parser.c (c_parser_omp_target): Return bool values.
4624
68c81f24
TS
46252014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4626
4627 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4628 num_teams_loc variable to num_thread_limit_loc.
4629
632f2871
RS
46302014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4631
4632 * c-array-notation.c (expand_array_notations): Use void_node
4633 instead of void_zero_node.
4634
766090c2
TS
46352014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4636
4637 * c-decl.c (finish_struct): Adjust.
4638 (finish_enum): Likewise.
4639 (bind): Adjust.
4640 (record_inline_static): Likewise.
4641 (push_scope): Likewise.
4642 (make_label): Likewise.
4643 (lookup_label_for_goto): Likewise.
4644 (finish_struct): Likewise.
4645 (finish_enum): Likewise.
4646 (store_parm_decls): Likewise.
4647 (c_push_function_context): Likewise.
4648 * c-lang.h: Remove usage of variable_size gty attribute.
4649 * c-parser.c (c_parse_init): Adjust.
4650 (c_parse_file): Likewise.
4651
2b107f6b
MP
46522014-05-13 Marek Polacek <polacek@redhat.com>
4653
4654 PR c/61162
4655 * c-typeck.c (convert_for_assignment): Pass location to
4656 WARN_FOR_ASSIGNMENT instead of input_location.
4657
d033409e
MP
46582014-05-10 Marek Polacek <polacek@redhat.com>
4659
4660 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4661 maybe_warn_string_init.
4662 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4663 maybe_warn_string_init.
4664 * c-tree.h (maybe_warn_string_init): Update declaration.
4665 * c-typeck.c (maybe_warn_string_init): Add location parameter.
4666 Call pedwarn_init with loc instead of with input_location.
4667 (digest_init): Pass init_loc to maybe_warn_string_init.
4668 (pop_init_level): Call pedwarn_init with loc instead of with
4669 input_location.
4670 (set_init_index): Likewise.
4671 (process_init_element): Likewise.
4672
ea58ef42
MP
46732014-05-09 Marek Polacek <polacek@redhat.com>
4674
4675 PR c/61096
4676 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4677 (c_parser_initelt): Pass location to set_init_label. Pass array index
4678 location to set_init_index.
4679 * c-tree.h (push_init_level): Update declaration.
4680 (pop_init_level): Likewise.
4681 (set_init_index): Likewise.
4682 (set_init_label): Likewise.
4683 * c-typeck.c (error_init): Add location parameter. Call error_at
4684 instead of error.
4685 (digest_init): Pass init_loc to error_init.
4686 (really_start_incremental_init):
4687 (push_init_level): Add location parameter. Pass loc to pop_init_level
4688 and error_init.
4689 (pop_init_level): Likewise.
4690 (set_designator): Add location parameter. Pass loc to pop_init_level,
4691 push_init_level, and error_init.
4692 (set_init_index): Add location parameter. Pass loc to error_init and
4693 set_designator.
4694 (set_init_label): Likewise.
4695 (output_init_element): Pass loc to error_init.
4696 (process_init_element): Pass loc to error_init, pop_init_level,
4697 pedwarn_init, and push_init_level.
4698
661a0813
MP
46992014-05-09 Marek Polacek <polacek@redhat.com>
4700
4701 PR c/50459
4702 * c-parser.c (c_parser_attributes): Parse the arguments as an
4703 expression-list if the attribute takes identifier.
4704
2793eeab
MP
47052014-05-08 Marek Polacek <polacek@redhat.com>
4706
4707 PR c/61053
4708 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4709 TYPE_ALIGN_UNIT.
4710
f827930a
MP
47112014-05-08 Marek Polacek <polacek@redhat.com>
4712
4713 PR c/61077
4714 * c-decl.c (start_function): Warn for _Atomic-qualified return type
4715 of main.
4716
1d60af08
KZ
47172014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4718 Mike Stump <mikestump@comcast.net>
4719 Richard Sandiford <rdsandiford@googlemail.com>
4720
4721 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4722 (finish_enum): Use wide-int interfaces.
4723 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4724 * c-typeck.c (build_c_cast): Likewise.
4725 (set_nonincremental_init_from_string): Likewise.
4726 (c_tree_equal): Likewise.
4727
a0e24419
MP
47282014-05-02 Marek Polacek <polacek@redhat.com>
4729
4730 PR c/25801
4731 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
4732 Return size_one_node when the type is not complete.
4733 (pointer_diff): Remove comment.
4734 (build_unary_op): Improve error messages.
4735
19fc9faa
MP
47362014-05-02 Marek Polacek <polacek@redhat.com>
4737
4738 * c-typeck.c (c_finish_return): Separate warning_at calls.
4739
63bc4e87
MP
47402014-05-02 Marek Polacek <polacek@redhat.com>
4741
4742 * c-tree.h (error_init): Remove declaration.
4743 (pedwarn_init): Likewise.
4744 * c-typeck.c (error_init): Make static and move above.
4745 (pedwarn_init): Likewise.
4746 (warning_init): Move above.
4747 (maybe_warn_string_init): Likewise.
4748
4bd2511b
JL
47492014-05-01 Jeff Law <law@redhat.com>
4750
4751 Revert:
4752
4753 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4754 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
4755 avoid goto.
4756
6a358dcb
MP
47572014-05-02 Marek Polacek <polacek@redhat.com>
4758
4759 PR c/60784
4760 * c-typeck.c (push_init_level): Set constructor_designated to
4761 p->designated for structures.
4762
ae5ebda4
MP
47632014-05-01 Marek Polacek <polacek@redhat.com>
4764
4765 PR c/60915
4766 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4767 function-definition has an attribute after the declarator.
4768
96b40f8d
MP
47692014-05-01 Marek Polacek <polacek@redhat.com>
4770
4771 PR c/60257
4772 * c-typeck.c (warning_init): Add location_t parameter. Call
4773 warning_at instead of warning.
4774 (push_init_level): Pass input_location to warning_init.
4775 (add_pending_init): Add location_t parameter. Pass loc to
4776 warning_init.
4777 (set_nonincremental_init): Pass input_location to add_pending_init.
4778 (set_nonincremental_init_from_string): Likewise.
4779 (output_init_element): Pass loc to warning_init and to
4780 add_pending_init.
4781
32e00768
MP
47822014-05-01 Marek Polacek <polacek@redhat.com>
4783
4784 PR c/43395
4785 * c-typeck.c (c_finish_return): Distinguish between label and variable
4786 when warning about returning local address.
4787
c9379ce2
MP
47882014-05-01 Marek Polacek <polacek@redhat.com>
4789
4790 PR c/29467
4791 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
4792 in C89 mode.
4793
d00887e8
MP
47942014-05-01 Marek Polacek <polacek@redhat.com>
4795
4796 PR c/43245
4797 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
4798 instead of 0 to WARN_FOR_QUALIFIERS.
4799
5436fa2e
MP
48002014-05-01 Marek Polacek <polacek@redhat.com>
4801
4802 PR c/56989
4803 * c-typeck.c (default_conversion): Use better location for
4804 error call.
4805
f8ed5150
MP
48062014-04-30 Marek Polacek <polacek@redhat.com>
4807
4808 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
4809 also when SANITIZE_FLOAT_DIVIDE is on.
4810
8337d1db
MP
48112014-04-30 Marek Polacek <polacek@redhat.com>
4812
4813 PR c/60139
4814 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
4815 and pedwarn_init. Use loc insted of input_location.
4816
c4bdc42f
MP
48172014-04-30 Marek Polacek <polacek@redhat.com>
4818
4819 PR c/60351
4820 * c-typeck.c (build_binary_op): Use location when warning about
4821 shift count.
4822
45484dcf
MP
48232014-04-25 Marek Polacek <polacek@redhat.com>
4824
4825 PR c/18079
4826 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
4827 always_inline/noinline and hot/cold attributes.
4828
34cf811f
MP
48292014-04-25 Marek Polacek <polacek@redhat.com>
4830
4831 PR c/60114
4832 * c-parser.c (c_parser_initelt): Pass input_location to
4833 process_init_element.
4834 (c_parser_initval): Pass loc to process_init_element.
4835 * c-tree.h (process_init_element): Adjust declaration.
4836 * c-typeck.c (push_init_level): Pass input_location to
4837 process_init_element.
4838 (pop_init_level): Likewise.
4839 (set_designator): Likewise.
4840 (output_init_element): Add location_t parameter. Pass loc to
4841 digest_init.
4842 (output_pending_init_elements): Pass input_location to
4843 output_init_element.
4844 (process_init_element): Add location_t parameter. Pass loc to
4845 output_init_element.
4846
42056eac
JJ
48472014-04-24 Jakub Jelinek <jakub@redhat.com>
4848
4849 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
4850 atomic-clause, allow comma in between atomic-clause and
4851 seq_cst.
4852
e162a134
JJ
48532014-04-22 Jakub Jelinek <jakub@redhat.com>
4854
4855 PR c/59073
4856 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
4857 fails, don't set OM_PARALLEL_COMBINED and return NULL.
4858
2f6babac
IZ
48592014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
4860
4861 PR middle-end/60469
4862 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4863 create_tmp_var instead build_decl for creating temps.
4864 (build_array_notation_expr): Likewise.
4865 (fix_conditional_array_notations_1): Likewise.
4866 (fix_array_notation_expr): Likewise.
4867 (fix_array_notation_call_expr): Likewise.
4868
8edbfaa6
JJ
48692014-03-28 Jakub Jelinek <jakub@redhat.com>
4870
4871 PR c++/60689
4872 * c-tree.h (c_build_function_call_vec): New prototype.
4873 * c-typeck.c (build_function_call_vec): Don't call
4874 resolve_overloaded_builtin here.
4875 (c_build_function_call_vec): New wrapper function around
4876 build_function_call_vec. Call resolve_overloaded_builtin here.
4877 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
4878 Call c_build_function_call_vec instead of build_function_call_vec.
4879 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4880 * c-decl.c (finish_decl): Likewise.
4881
7485aeea
MLI
48822014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4883
4884 PR c/55383
4885 * c-typeck.c: Use correct format string in cast-qual warning
4886
b17a8b07
TS
48872014-03-07 Thomas Schwinge <thomas@codesourcery.com>
4888
4889 * c-decl.c (c_decl_attributes): Use
4890 lang_hooks.types.omp_mappable_type.
4891 * c-typeck.c (c_finish_omp_clauses): Likewise.
4892
3af9c5e9
MP
48932014-03-06 Marek Polacek <polacek@redhat.com>
4894
4895 PR c/60197
4896 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
4897 of checking tree code.
4898
1c9f5f33
PK
48992014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4900
4901 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
4902 (c_parser_parameter_declaration): Likewise.
4903
cc28fc7f
MP
49042014-02-19 Marek Polacek <polacek@redhat.com>
4905
4906 PR c/60195
4907 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
4908 Call mark_exp_read on exp.value.
4909 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
4910 TREE_ADDRESSABLE on old instead of val.
4911 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
4912
b581c05c
PK
49132014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4914
4915 * c-parser.c (c_parser_get_builtin_args): Replace calls to
4916 C_EXPR_APPEND by vec_safe_push.
4917 * c-tree.h (C_EXPR_APPEND): Remove.
4918
81e5eca8
MP
49192014-01-31 Marek Polacek <polacek@redhat.com>
4920
4921 PR c/59963
4922 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
4923 build_function_call_vec.
4924 (build_function_call): Likewise.
4925 (build_atomic_assign): Likewise.
4926 (build_function_call_vec): Add arg_loc parameter. Use it.
4927 (convert_arguments): Likewise.
4928 (convert_for_assignment): Rename rhs_loc to expr_loc.
4929 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
4930 (c_parser_objc_keywordexpr): Likewise.
4931 (c_parser_postfix_expression_after_primary): Call
4932 build_function_call_vec with expr_loc rather than op_loc.
4933 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
4934 build_function_call_vec.
4935 (c_parser_expr_list): Add locations parameter. Fill it with locations
4936 of function arguments.
4937 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
4938
68fca595
MP
49392014-01-30 Marek Polacek <polacek@redhat.com>
4940
4941 PR c/59940
4942 * c-typeck.c (build_function_call_vec): Use loc parameter.
4943 (convert_arguments): Add location parameter. Use it.
4944 (ep_convert_and_check): Likewise.
4945 (build_atomic_assign): Adjust convert_for_assignment call.
4946 (build_modify_expr): Likewise.
4947 (digest_init): Likewise.
4948 (c_finish_return): Likewise.
4949 (build_conditional_expr): Adjust ep_convert_and_check calls.
4950 (convert_for_assignment): Add rhs_loc parameter. Use it.
4951 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
4952 calls.
4953
fa337f3a
RB
49542014-01-30 Richard Biener <rguenther@suse.de>
4955
4956 PR c/59905
4957 * c-typeck.c (build_function_call_vec): Do not replace calls
4958 to a function via an incompatible type with a runtime abort.
4959
b72271b9
BI
49602014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
4961
4962 * c-parser.c (c_parser_declaration_or_fndef): Replaced
4963 flag_enable_cilkplus with flag_cilkplus.
4964 (c_parser_direct_declarator_inner): Likewise.
4965 (c_parser_attribute_any_word): Likewise.
4966 (c_parser_attributes): Likewise.
4967 (c_parser_compound_statement): Likewise.
4968 (c_parser_statement_after_labels): Likewise.
4969 (c_parser_if_statement): Likewise.
4970 (c_parser_switch_statement): Likewise.
4971 (c_parser_do_statement): Likewise.
4972 (c_parser_for_statement): Likewise.
4973 (c_parser_unary_expression): Likewise.
4974 (c_parser_postfix_expression): Likewise.
4975 (c_parser_postfix_expression_after_primary): Likewise.
4976 (c_parser_postfix_expression_after_primary): Likewise.
4977 (c_parser_omp_clause_name): Likewise.
4978 (c_finish_omp_declare_simd): Likewise.
4979 (c_parser_cilk_verify_simd): Likewise.
4980 * c-typeck.c (build_array_ref): Likewise.
4981 (build_function_call_vec): Likewise.
4982 (convert_arguments): Likewise.
4983 (build_compound_expr): Likewise.
4984 (c_finish_return): Likewise.
4985 (c_finish_if_stmt): Likewise.
4986 (c_finish_loop): Likewise.
4987 (build_binary_op): Likewise.
4988
393e8e8b
MP
49892014-01-23 Marek Polacek <polacek@redhat.com>
4990
4991 PR c/59846
4992 * c-typeck.c (parser_build_binary_op): Use location instead of
4993 input_location.
4994 (build_binary_op): Pass location to shorten_compare.
4995
f04dda30
MP
49962014-01-23 Marek Polacek <polacek@redhat.com>
4997
4998 PR c/58346
4999 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
5000 an empty aggregate.
5001
789eadcd
MP
50022014-01-23 Marek Polacek <polacek@redhat.com>
5003
5004 PR c/59871
5005 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
5006 of a comma expression.
5007 (emit_side_effect_warnings): Likewise.
5008
40f14e9f
BI
50092014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5010
5011 PR c/59825
5012 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
5013 function to use walk_tree and moved a lot of its functionality to
5014 expand_array_notations.
5015 (expand_array_notations): New function.
5016
74558dd9
BI
50172014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5018
5019 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
5020 attribute an attribute without value.
5021
652fea39
JJ
50222014-01-23 Jakub Jelinek <jakub@redhat.com>
5023
5024 PR middle-end/58809
5025 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
5026 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
5027
f34f1c87
MP
50282014-01-22 Marek Polacek <polacek@redhat.com>
5029
5030 PR c/59891
5031 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
5032 of remove_c_maybe_const_expr on op1 and op2.
5033
241f845a
JJ
50342014-01-15 Jakub Jelinek <jakub@redhat.com>
5035
5036 PR c/58943
5037 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
5038 effects, preevaluate rhs using SAVE_EXPR first.
5039
9a74f20c
BI
50402014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
5041
5042 PR c++/59631
5043 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
5044 statements with if-elseif statements.
5045
96066ce1
MP
50462014-01-06 Marek Polacek <polacek@redhat.com>
5047
5048 PR c/57773
5049 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
5050 defined bit-field types only in ISO C.
5051
23a5b65a
RS
50522014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5053
5054 Update copyright years
5055
f9030485
RS
50562014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5057
5058 * c-array-notation.c: Use the standard form for the copyright notice.
5059
41958c28
BI
50602013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
5061
5062 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
5063 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
5064 field in parser is not empty. If not-empty, call the function
5065 c_parser_finish_omp_declare_simd.
5066 (c_parser_cilk_clause_vectorlength): Modified function to be shared
5067 between SIMD-enabled functions and #pragma simd. Added new parameter.
5068 (c_parser_cilk_all_clauses): Modified the usage of the function
5069 c_parser_cilk_clause_vectorlength as mentioned above.
5070 (c_parser_cilk_simd_fn_vector_attrs): New function.
5071 (c_finish_cilk_simd_fn_tokens): Likewise.
5072 (is_cilkplus_vector_p): Likewise.
5073 (c_parser_omp_clause_name): Added checking for "vectorlength,"
5074 "nomask," and "mask" strings in clause name.
5075 (c_parser_omp_all_clauses): Added 3 new case statements:
5076 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
5077 PRAGMA_CILK_CLAUSE_NOMASK.
5078 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
5079 check for vector attribute and if so call the function
5080 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
5081 called the function c_finish_cilk_simd_fn_tokens.
5082 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
5083 parser field is non-empty. If so, parse them as you would parse
5084 the omp declare simd pragma.
5085 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
5086 Added a check when step is a parameter and flag it as error.
5087 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
5088 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
5089 pragma_omp_clause.
5090
cef0fd0e
TS
50912013-12-17 Thomas Schwinge <thomas@codesourcery.com>
5092
5093 * c-parser.c (c_parser_omp_parallel): Fix description.
5094
12893402
BI
50952013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
5096
5097 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
5098 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5099 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
5100 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
5101
296674db
JM
51022013-12-04 Joseph Myers <joseph@codesourcery.com>
5103
5104 PR c/52023
5105 * c-parser.c (c_parser_alignas_specifier): Use
5106 c_sizeof_or_alignof_type instead of c_alignof.
5107 (c_parser_alignof_expression): Likewise, with min_alignof
5108 parameter depending on alignof spelling used.
5109
edd28054
MP
51102013-12-04 Marek Polacek <polacek@redhat.com>
5111
5112 PR c/54113
5113 * c-decl.c (start_function): Don't warn for missing prototype for
5114 inline functions.
5115
da0fc454
MP
51162013-12-03 Marek Polacek <polacek@redhat.com>
5117
5118 PR c/59351
5119 * c-decl.c (build_compound_literal): Allow compound literals with
5120 empty initial value.
5121
4c2ecab0
JM
51222013-12-02 Joseph Myers <joseph@codesourcery.com>
5123
5124 PR c/58235
5125 * c-typeck.c (build_modify_expr): Diagnose assignment to
5126 expression with array type.
5127
340baef7
JM
51282013-11-29 Joseph Myers <joseph@codesourcery.com>
5129
5130 PR c/42262
5131 * c-typeck.c (process_init_element): Do not treat a string as
5132 initializing a whole array when used with a designator for an
5133 individual element.
5134
6763b9f7
JM
51352013-11-29 Joseph Myers <joseph@codesourcery.com>
5136
5137 PR c/57574
5138 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
5139 an inline function following a static declaration.
5140
e7bd1de1
JJ
51412013-11-28 Jakub Jelinek <jakub@redhat.com>
5142
5143 PR c/59310
5144 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
5145 to p_name before calling c_parser_omp_teams instead of after.
5146 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
5147 argument. Remove unused p_name variable.
5148
0136f8f0
AH
51492013-11-27 Aldy Hernandez <aldyh@redhat.com>
5150 Jakub Jelinek <jakub@redhat.com>
5151
5152 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
5153 external_scope is NULL.
5154
241b71bb
TV
51552013-11-27 Tom de Vries <tom@codesourcery.com>
5156 Marc Glisse <marc.glisse@inria.fr>
5157
5158 PR c++/59032
5159 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
5160
2fb9a547
AM
51612013-11-22 Andrew MacLeod <amacleod@redhat.com>
5162
5163 * c-typeck.c: Add required include files from gimple.h.
5164
8400e75e
DM
51652013-11-22 David Malcolm <dmalcolm@redhat.com>
5166
5167 * c-decl.c (define_label, shadow_tag_warned)
5168 (check_bitfield_type_and_width, grokdeclarator, grokparms,
5169 store_parm_decls_newstyle, store_parm_decls_oldstyle)
5170 (declspecs_add_type): Remove use of in_system_header macro.
5171 * c-parser.c (c_parser_unary_expression): Likewise.
5172 * c-typeck.c (store_init_value, process_init_element)
5173 (c_start_case): Likewise.
5174
5175 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
5176 macro.
5177
5178 * c-parser.c (c_parser_set_source_position_from_token): Remove
5179 reference to in_system_header from comment.
5180
386b1f1f
RS
51812013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5182
5183 * c-decl.c (grokdeclarator): Update comment to refer to
5184 tree_to_[su]hwi rather than tree_low_cst.
5185
ae7e9ddd
RS
51862013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5187
5188 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
5189 tree_to_uhwi throughout.
5190
9439e9a1
RS
51912013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5192
5193 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
5194 throughout.
5195
9541ffee
RS
51962013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5197
5198 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
5199 throughout.
5200
c02065fc
AH
52012013-11-15 Aldy Hernandez <aldyh@redhat.com>
5202
5203 * c-parser.c (c_parser_cilk_simd): New.
5204 (c_parser_cilk_verify_simd): New.
5205 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
5206 (c_parser_omp_for_loop): Add case for NE_EXPR.
5207 Set c_break_label for CILK_SIMD.
5208 (c_parser_cilk_clause_vectorlength): New.
5209 (c_parser_cilk_clause_linear): New.
5210 (c_parser_cilk_clause_name): New.
5211 (c_parser_cilk_all_clauses): New.
5212 * c-typeck.c (build_unary_op): Pass location argument to
5213 readonly_error.
5214 (build_modify_expr): Same.
5215 (build_asm_expr): Same.
5216 (c_finish_bc_stmt): Error on break/continue in loops.
5217
18f429e2
AM
52182013-11-14 Andrew MacLeod <amacleod@redhat.com>
5219
5220 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
5221
d8a2d370
DN
52222013-11-14 Diego Novillo <dnovillo@google.com>
5223
5224 * c-decl.c: Include print-tree.h.
5225 Include stor-layout.h.
5226 Include varasm.h.
5227 Include attribs.h.
5228 Include stringpool.h.
5229 * c-lang.c: Include fold-const.h.
5230 * c-parser.c: Include stringpool.h.
5231 Include attribs.h.
5232 Include stor-layout.h.
5233 Include varasm.h.
5234 Include trans-mem.h.
5235 * c-typeck.c: Include stor-layout.h.
5236 Include trans-mem.h.
5237 Include varasm.h.
5238 Include stmt.h.
5239
38b7bc7f
JM
52402013-11-13 Joseph Myers <joseph@codesourcery.com>
5241
5242 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
5243 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
5244 __auto_type.
5245 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
5246 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
5247 RID_AUTO_TYPE.
5248 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
5249 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
5250 (c_parser_declarator, c_parser_direct_declarator_inner)
5251 (c_parser_parameter_declaration, c_parser_type_name): All callers
5252 changed.
5253 (c_parser_declaration_or_fndef): Handle declarations with type
5254 determined from the initializer.
5255
45b0be94
AM
52562013-11-12 Andrew MacLeod <amacleod@redhat.com>
5257
18f429e2 5258 * c-typeck.c: Include gimplify.h.
45b0be94 5259
582d9b50
JM
52602013-11-12 Joseph Myers <joseph@codesourcery.com>
5261
5262 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
5263 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
5264 comment.
5265 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
5266 or _Thread_local as appropriate in diagnostics.
5267 (build_null_declspecs): Initialize ret->thread_gnu_p.
5268 (declspecs_add_scspec): Handle either __thread or _Thread_local
5269 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
5270 pedantic. Do not disallow _Thread_local extern and _Thread_local
5271 static.
5272
267bac10
JM
52732013-11-07 Joseph Myers <joseph@codesourcery.com>
5274 Andrew MacLeod <amacleod@redhat.com>
5275
5276 * c-aux-info.c (gen_type): Handle atomic qualifier.
5277 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
5278 qualifiers when compating types.
5279 (shadow_tag_warned): Handle atomic_p in declspecs.
5280 (quals_from_declspecs): Likewise.
5281 (start_decl): Use c_type_promotes_to when promoting argument
5282 types.
5283 (grokdeclarator): Handle _Atomic.
5284 (get_parm_info): Diagnose any qualifier on "void" as only
5285 parameter.
5286 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
5287 comparing types. Use c_type_promotes_to when promoting argument
5288 types.
5289 (finish_function): Use c_type_promotes_to when promoting argument
5290 types.
5291 (build_null_declspecs): Handle atomic_p in declspecs.
5292 (declspecs_add_qual): Handle RID_ATOMIC.
5293 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
5294 (c_token_starts_declspecs): Handle RID_ATOMIC.
5295 (c_parser_declspecs): Handle atomic type specifiers and
5296 qualifiers.
5297 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
5298 from types of expressions with atomic type.
5299 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
5300 (c_parser_attribute_any_word): Handle RID_ATOMIC.
5301 (c_parser_initializer, c_parser_initelt, c_parser_initval)
5302 (c_parser_statement_after_labels, c_parser_switch_statement)
5303 (c_parser_for_statement, c_parser_expr_no_commas)
5304 (c_parser_conditional_expression, c_parser_binary_expression)
5305 (c_parser_cast_expression, c_parser_unary_expression)
5306 (c_parser_postfix_expression)
5307 (c_parser_postfix_expression_after_primary, c_parser_expression):
5308 Use convert_lvalue_to_rvalue.
5309 (c_parser_expression_conv, c_parser_expr_list): Document
5310 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
5311 (c_parser_objc_synchronized_statement): Use
5312 convert_lvalue_to_rvalue.
5313 (c_parser_objc_selector): Handle RID_ATOMIC.
5314 (c_parser_objc_receiver, c_parser_array_notation): Use
5315 convert_lvalue_to_rvalue.
5316 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
5317 _Atomic (type-name).
5318 (struct c_declspecs): Add atomic_p field.
5319 (convert_lvalue_to_rvalue): Declare.
5320 * c-typeck.c (c_type_promotes_to): Promote atomic types to
5321 corresponding atomic types.
5322 (qualify_type): Don't add _Atomic qualifiers from second argument.
5323 (comp_target_types): Do not allow _Atomic mismatches.
5324 (type_lists_compatible_p): Do not remove atomic qualifiers when
5325 comparing types.
5326 (really_atomic_lvalue, convert_lvalue_to_rvalue)
5327 (build_atomic_assign): New functions.
5328 (build_unary_op): Use build_atomic_assign for atomic increment and
5329 decrement.
5330 (build_conditional_expr): Do not treat _Atomic void as a qualified
5331 version of void.
5332 (build_modify_expr): Use build_atomic_assign for atomic LHS.
5333 (find_anonymous_field_with_type, convert_to_anonymous_field)
5334 (convert_for_assignment): Do not remove atomic qualifiers when
5335 comparing types.
5336 (digest_init): Do not accept initialization of arrays of atomic
5337 elements by string constants.
5338 (build_asm_expr): Use convert_lvalue_to_rvalue.
5339 (build_binary_op): Do not treat _Atomic void as a qualified
5340 version of void.
5341
0c249d4b
DD
53422013-11-06 DJ Delorie <dj@redhat.com>
5343
5344 * c-decl.c (locate_old_decl): If a previous conflicting decl is
5345 both explicit and builtin, print the location of the explicit one.
5346
6d7f7e0a
TB
53472013-11-05 Tobias Burnus <burnus@net-b.de>
5348
5349 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
5350 c_parser_omp_distribute, c_parser_omp_teams,
5351 c_parser_omp_target, c_parser_omp_declare): Handle
5352 -fopenmp-simd.
5353
b906f4ca
MP
53542013-11-03 Marek Polacek <polacek@redhat.com>
5355
5356 * c-decl.c (grokdeclarator): Add VLA instrumentation.
5357
ee1d5a02
JJ
53582013-11-01 Jakub Jelinek <jakub@redhat.com>
5359
5360 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
5361 check_dup_generic at the end, unless remove is true.
5362 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
5363 remove = true;.
5364 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
5365
5a9785fb
JJ
53662013-10-31 Jakub Jelinek <jakub@redhat.com>
5367
5368 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
5369 with decl that is not pointer nor array.
5370
939b37da
BI
53712013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
5372
5373 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
5374 a spawning function is found.
5375 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
5376 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
5377 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5378 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
5379 case.
5380 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
5381 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
5382 expr.
5383 (c_finish_return): Added a check to reject _Cilk_spawn in return
5384 expression.
5385 (build_cilk_spawn): New function.
5386 (build_cilk_sync): Likewise.
5387 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
5388
d4af74d4
TB
53892013-10-27 Tobias Burnus <burnus@net-b.de>
5390
5391 PR other/33426
5392 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
5393 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
5394 (c_parser_statement_after_labels): Update calls.
5395
d73749df 53962013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
5397
5398 PR other/33426
5399 * c-parser.c (c_parser_pragma, c_parser_for_statement):
5400 Handle PRAGMA_IVDEP.
5401 (c_parser_statement_after_labels): Update call.
5402
f28aa681
MP
54032013-10-24 Marek Polacek <polacek@redhat.com>
5404
5405 * c-parser.c (c_parser_struct_declaration): Add a comment.
5406 (c_parser_declarator): Don't allow _Alignas here.
5407
0645c1a2
AM
54082013-10-17 Andrew MacLeod <amacleod@redhat.com>
5409
5410 * c-parser.c: Include omp-low.h.
5411 * c-typeck.c: Likewise.
5412
568a31f2
MP
54132013-10-17 Marek Polacek <polacek@redhat.com>
5414
5415 PR c/58267
5416 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
5417 Document syntax of the array-declarator.
5418 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
5419 are not permitted.
5420 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
5421 (c_parser_struct_declaration): Likewise.
5422 (c_parser_declarator): Likewise.
5423 (c_parser_direct_declarator_inner): Likewise.
5424 (c_parser_parameter_declaration): Likewise.
5425 (c_parser_type_name): Likewise.
5426
acf0174b
JJ
54272013-10-11 Jakub Jelinek <jakub@redhat.com>
5428
5429 * c-lang.h (current_omp_declare_target_attribute): New extern
5430 decl.
5431 * c-parser.c: Include c-lang.h.
5432 (struct c_parser): Change tokens to c_token *.
5433 Add tokens_buf field. Change tokens_avail type to unsigned int.
5434 (c_parser_consume_token): If parser->tokens isn't
5435 &parser->tokens_buf[0], increment parser->tokens.
5436 (c_parser_consume_pragma): Likewise.
5437 (enum pragma_context): Add pragma_struct and pragma_param.
5438 (c_parser_external_declaration): Adjust
5439 c_parser_declaration_or_fndef caller.
5440 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
5441 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
5442 Adjust recursive call.
5443 (c_parser_struct_or_union_specifier): Use pragma_struct instead
5444 of pragma_external.
5445 (c_parser_parameter_declaration): Use pragma_param instead of
5446 pragma_external.
5447 (c_parser_compound_statement_nostart, c_parser_label,
5448 c_parser_for_statement): Adjust
5449 c_parser_declaration_or_fndef callers.
5450 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
5451 it through to c_parser_conditional_expression.
5452 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
5453 pass it through to c_parser_binary_expression. Adjust recursive
5454 call.
5455 (c_parser_binary_expression): Remove prec argument, add
5456 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
5457 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
5458 binop matches it, use build2 instead of parser_build_binary_op.
5459 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
5460 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
5461 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
5462 Handle pragma_struct and pragma_param the same as pragma_external.
5463 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5464 (c_parser_omp_variable_list): Parse array sections for
5465 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5466 (c_parser_omp_clause_collapse): Fully fold collapse expression.
5467 (c_parser_omp_clause_reduction): Handle user defined reductions.
5468 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5469 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5470 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5471 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5472 c_parser_omp_clause_depend, c_parser_omp_clause_map,
5473 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5474 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5475 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5476 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
5477 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
5478 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5479 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
5480 (c_parser_omp_for_loop): Add CODE argument, pass it through
5481 to c_finish_omp_for. Change last argument to cclauses,
5482 and adjust uses to grab parallel clauses from the array of all
5483 the split clauses. Adjust c_parser_binary_expression,
5484 c_parser_declaration_or_fndef and c_finish_omp_for callers.
5485 (omp_split_clauses): New function.
5486 (c_parser_omp_simd): New function.
5487 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5488 Allow the function to be called also when parsing combined constructs,
5489 and call c_parser_omp_simd when parsing for simd.
5490 (c_parser_omp_sections_scope): If section-sequence doesn't start with
5491 #pragma omp section, require exactly one structured-block instead of
5492 sequence of statements.
5493 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5494 Allow the function to be called also when parsing combined constructs.
5495 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
5496 Allow the function to be called also when parsing combined
5497 constructs.
5498 (c_parser_omp_taskgroup, c_parser_omp_cancel,
5499 c_parser_omp_cancellation_point, c_parser_omp_distribute,
5500 c_parser_omp_teams, c_parser_omp_target_data,
5501 c_parser_omp_target_update, c_parser_omp_target,
5502 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
5503 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
5504 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
5505 (c_parser_omp_construct): Add p_name and mask vars. Handle
5506 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
5507 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
5508 and c_parser_omp_sections callers.
5509 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
5510 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5511 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5512 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
5513 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
5514 OMP_CLAUSE_DEPEND.
5515 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5516 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5517 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5518 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5519 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5520 * c-typeck.c: Include tree-inline.h.
5521 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5522 handle_omp_array_sections_1, handle_omp_array_sections,
5523 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5524 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5525 user defined reductions.
5526 (c_tree_equal): New function.
5527 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5528 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5529 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5530 c_check_omp_declare_reduction_r): New prototypes.
5531 * c-decl.c (current_omp_declare_target_attribute): New variable.
5532 (c_decl_attributes): New function.
5533 (start_decl, start_function): Use it instead of decl_attributes.
5534 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5535 c_omp_reduction_decl, c_omp_reduction_lookup,
5536 c_check_omp_declare_reduction_r): New functions.
5537
0a6c2227
TT
55382013-09-25 Tom Tromey <tromey@redhat.com>
5539
5540 * Make-lang.in (c/gccspec.o): Remove.
5541 (CFLAGS-c/gccspec.o): New variable.
5542 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
5543 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
5544 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5545
f3bc55f0
TT
55462013-09-25 Tom Tromey <tromey@redhat.com>
5547
5548 * Make-lang.in (c/gccspec.o): Don't use subshell.
5549
a24d975c
MP
55502013-09-18 Marek Polacek <polacek@redhat.com>
5551
5552 PR sanitize/58443
5553 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5554 Remove unnecessary check.
5555
ce6923c5
MP
55562013-09-18 Marek Polacek <polacek@redhat.com>
5557
5558 PR sanitizer/58411
5559 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
5560 no_sanitize_undefined attribute.
5561
a1e51df9
KT
55622013-09-13 Kai Tietz <ktietz@redhat.com>
5563
5564 PR target/57848
5565 * c-decl.c (c_builtin_function_ext_scope): Remove
5566 wrong assumption that it is never called on prexisting
5567 symbol.
5568
0af94e6f
JR
55692013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
5570
5571 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
5572
20059c8b
GDR
55732013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5574
5575 * c-objc-common.c (c_tree_printer): Tidy.
5576
de5a5fa1
MP
55772013-08-30 Marek Polacek <polacek@redhat.com>
5578
5579 * c-typeck.c (build_binary_op): Add division by zero and shift
5580 instrumentation.
5581
2531a1d9 55822013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 5583 Joseph Myers <joseph@codesourcery.com>
2531a1d9 5584
6e2bcc98 5585 PR c/35649
2531a1d9
JR
5586 * c-typeck.c (c_common_type): Prefer double_type_node over
5587 other REAL_TYPE types with the same precision.
5588 (convert_arguments): Likewise.
5589
025311c4
GDR
55902013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5591
5592 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
5593 (c_initialize_diagnostics): Call a destructor for the early printer.
5594
da6ca2b5
GDR
55952013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5596
5597 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5598 printer initialization.
5599
318cda85 56002013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 5601
318cda85
BI
5602 PR c/57490
5603 * c-array-notation.c (fix_conditional_array_notations_1): Added a
5604 check for truth values.
5605 (expand_array_notation_exprs): Added truth values case. Removed an
5606 unwanted else. Added for-loop to walk through subtrees in default
5607 case.
5608
b066401f
GDR
56092013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5610
5611 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5612
fb48aadc
JM
56132013-07-23 Joseph Myers <joseph@codesourcery.com>
5614
5615 * c-parser.c (struct c_generic_association): Fix typo.
5616
433cc7b0
TT
56172013-07-23 Tom Tromey <tromey@redhat.com>
5618 Joseph Myers <joseph@codesourcery.com>
5619
5620 * c-parser.c (struct c_generic_association): New.
5621 (c_generic_association_d): New typedef.
5622 (c_parser_generic_selection): New function.
5623 (c_parser_postfix_expression): Handle RID_GENERIC.
5624
26d40c3d
JM
56252013-07-13 Jason Merrill <jason@redhat.com>
5626
5627 PR c++/57793
5628 * c-decl.c (finish_struct): Check for too-large class.
5629
ecdbd01a 56302013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
5631
5632 PR c/57821
5633 * c-typeck.c (set_init_index): When folding, check for index overflow.
5634
1141ed3f
BI
56352013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5636
5637 * c-parser.c (c_parser_array_notation): Removed rejection of array
5638 notations in an array of function pointers.
5639
713b46fa
BI
56402013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5641
5642 * c-array-notation.c (make_triplet_val_inv): New function.
5643 (create_cmp_incr): Likewise.
5644 (create_array_refs): Likewise.
5645 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5646 Also modularized common parts between functions and called the function.
5647 (build_array_notation_expr): Likewise.
5648 (fix_conditional_array_notations_1): Likewise.
5649 (fix_array_notation_expr): Likewise.
5650 (fix_array_notation_call_expr): Likewise.
5651
92f20202
MP
56522013-06-18 Marek Polacek <polacek@redhat.com>
5653
5654 PR c/57630
5655 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5656
73a23b06
BI
56572013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
5658
5659 * c-array-notation.c (build_array_notation_expr): Reject array notation
5660 mismatch between LHS and RHS even inside a call_expr. Also, removed
5661 a couple while statements that were dead code.
5662
00b8517d
BI
56632013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
5664
5665 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5666 excessive precision expressions in function parameters. Also removed
5667 couple unwanted while statements.
5668
1509bdda
BI
56692013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5670
5671 * c-array-notation.c (expand_array_notation_exprs): Added
5672 ARRAY_NOTATION_REF case.
5673
d60f1706
BI
56742013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5675
5676 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5677 function to c-family/array-notation-common.c.
5678 (is_cilkplus_reduce_builtin): Likewise.
5679 (find_rank): Likewise.
5680 (extract_array_notation_exprs): Likewise.
5681 (replace_array_notations): Likewise.
5682 (find_inv_trees): Likewise.
5683 (replace_inv_trees): Likewise.
5684 (contains_array_notation_expr): Likewise.
5685 (find_correct_array_notation_type): Likewise.
5686 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5687 (struct inv_list): Moved this to c-family/array-notation-common.c.
5688 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5689
6d6efbb3
BI
56902013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
5691
5692 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5693 reduction functions outside the for-loop. Added a check if the fundecl
5694 is non-NULL. Finally, removed an unwanted if-statement, and made the
5695 body unconditional.
5696
25c22937
BI
56972013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5698
5699 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5700 condition of the if-statement matches the rank of else-block and then-
5701 block when array notations are used.
5702 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5703 expression after the entire function body is parsed.
5704 (c_parser_expr_no_commas): Delayed creating array notation expressions
5705 to the end of function parsing.
5706 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5707 whole if-statement instead of just the condition.
5708 (expand_array_notation_exprs): Added MODIFY_EXPR case.
5709
edd25645
BI
57102013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5711
5712 PR c/57474
5713 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5714 array to NULL_TREE if they are unused. Also added a check for the
5715 field to be NULL before its fields are used in future.
5716
065ce7f1
RO
57172013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5718
5719 PR bootstrap/57450
5720 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5721 (build_array_notation_expr): Likewise.
5722
36536d79
BI
57232013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5724
5725 * c-typeck.c (build_array_ref): Added a check to see if array's
5726 index is greater than one. If true, then emit an error.
5727 (build_function_call_vec): Exclude error reporting and checking
5728 for builtin array-notation functions.
5729 (convert_arguments): Likewise.
5730 (c_finish_return): Added a check for array notations as a return
5731 expression. If true, then emit an error.
5732 (c_finish_loop): Added a check for array notations in a loop
5733 condition. If true then emit an error.
5734 (lvalue_p): Added a ARRAY_NOTATION_REF case.
5735 (build_binary_op): Added a check for array notation expr inside
5736 op1 and op0. If present, we call another function to find correct
5737 type.
5738 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
5739 * c-parser.c (c_parser_compound_statement): Check if array
5740 notation code is used in tree, if so, then transform them into
5741 appropriate C code.
5742 (c_parser_expr_no_commas): Check if array notation is used in LHS
5743 or RHS, if so, then build array notation expression instead of
5744 regular modify.
5745 (c_parser_postfix_expression_after_primary): Added a check for
5746 colon(s) after square braces, if so then handle it like an array
5747 notation. Also, break up array notations in unary op if found.
5748 (c_parser_direct_declarator_inner): Added a check for array
5749 notation.
5750 (c_parser_compound_statement): Added a check for array notation in
5751 a stmt. If one is present, then expand array notation expr.
5752 (c_parser_if_statement): Likewise.
5753 (c_parser_switch_statement): Added a check for array notations in
5754 a switch statement's condition. If true, then output an error.
5755 (c_parser_while_statement): Similarly, but for a while.
5756 (c_parser_do_statement): Similarly, but for a do-while.
5757 (c_parser_for_statement): Similarly, but for a for-loop.
5758 (c_parser_unary_expression): Check if array notation is used in a
5759 pre-increment or pre-decrement expression. If true, then expand
5760 them.
5761 (c_parser_array_notation): New function.
5762 * c-array-notation.c: New file.
5763 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5764
cd192ccc
MS
57652013-05-23 Mike Stump <mikestump@comcast.net>
5766
5767 * c-typeck.c (convert_for_assignment): Handle references to memory
5768 spaces better.
5769
427b248d
JM
57702013-05-16 Jason Merrill <jason@redhat.com>
5771
5772 * Make-lang.in (cc1$(exeext)): Use link mutex.
5773
44d90fe1
PC
57742013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5775
5776 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5777 to simply use OPT_Wpointer_arith.
5778 (build_unary_op): Likewise.
5779
4e7d7b3d
JJ
57802013-04-03 Jakub Jelinek <jakub@redhat.com>
5781
5782 PR c/19449
5783 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
5784 argument. If set, or it temporarily for parsing of the first
5785 argument into force_folding_builtin_constant_p.
5786 (c_parser_postfix_expression): Adjust callers.
5787
839b422f
RB
57882013-03-21 Richard Biener <rguenther@suse.de>
5789
5790 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
5791 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
5792
2ee028f1
MP
57932013-02-12 Marek Polacek <polacek@redhat.com>
5794
5795 PR c/44938
5796 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
5797 origtypes to NULL.
5798
8824edff
JJ
57992013-01-24 Jakub Jelinek <jakub@redhat.com>
5800
5801 PR c/56078
5802 * c-typeck.c (set_nonincremental_init_from_string): If
5803 constructor_max_index is NULL, treat it as if tree_int_cst_lt
5804 returned false.
5805 (process_init_element): Likewise.
5806
eadd3d0d
JJ
58072012-12-20 Jakub Jelinek <jakub@redhat.com>
5808
5809 PR c++/55619
5810 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
5811 argument, don't call default_function_array_conversion
5812 nor c_fully_fold here.
5813 (c_parser_asm_statement): Adjust callers.
5814 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
5815 and outputs here, and call default_function_array_conversion
5816 on inputs that don't need to be addressable.
5817
f8a93a2e
JJ
58182012-12-18 Jakub Jelinek <jakub@redhat.com>
5819
5820 PR c/39464
5821 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
5822 warning require that both c_common_unsigned_type as well as
5823 c_common_signed_type is the same for both mvl and mvr types.
5824
9771b263
DN
58252012-11-16 Diego Novillo <dnovillo@google.com>
5826
5827 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
5828
5829 * c-common.c: Use new vec API in vec.h.
5830 * c-common.h: Likewise.
5831 * c-gimplify.c: Likewise.
5832 * c-pragma.c: Likewise.
5833 * c-pretty-print.c: Likewise.
5834 * c-pretty-print.h: Likewise.
5835 * c-semantics.c: Likewise.
5836 * c-decl.c: Likewise.
5837 * c-parser.c: Likewise.
5838 * c-tree.h: Likewise.
5839 * c-typeck.c: Likewise.
5840
880661a4
JW
58412012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
5842
5843 PR c++/54930
5844 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
5845
077d1abe
MLI
58462012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5847
5848 PR c/53066
5849 * c-decl.c (warn_if_shadowing): Do not warn if a variable
5850 shadows a function, unless the variable is a function or a
5851 pointer-to-function.
5852
3a785c97
JJ
58532012-10-12 Jakub Jelinek <jakub@redhat.com>
5854
5855 PR c/54381
5856 * c-parser.c (struct c_tree_loc_pair): Removed.
5857 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
5858 add location_t * and tree * arguments, fill in array of 3
5859 sizeof_arg trees and corresponding locs.
5860 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
5861 c_parser_expr_list callers.
5862 (c_parser_postfix_expression_after_primary): Likewise. Pass
5863 array of 3 sizeof_arg trees and locs (corresponding to first
5864 3 arguments) to sizeof_pointer_memaccess_warning.
5865
703c8606
LC
58662012-10-09 Lawrence Crowl <crowl@google.com>
5867
5868 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
5869 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
5870 hash table.
5871
5d9de0d0
PC
58722012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
5873
5874 PR c++/54194
5875 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
5876 call.
5877
a212e43f
MG
58782012-10-09 Marc Glisse <marc.glisse@inria.fr>
5879
5880 PR c++/54427
5881 * c-typeck.c: Include c-common.h.
5882 (enum stv_conv): Moved to c-common.h.
5883 (scalar_to_vector): Moved to c-common.c.
5884 (build_binary_op): Adapt to scalar_to_vector's new prototype.
5885 * Make-lang.in: c-typeck.c depends on c-common.h.
5886
3b78de56
AC
58872012-10-04 Arnaud Charlet <charlet@adacore.com>
5888
5889 * c-decl.c (c_write_global_declarations): Fix handling of
5890 -fdump-ada-spec*.
5891
78c60e3d
SS
58922012-09-30 Sharad Singhai <singhai@google.com>
5893
5894 * c-decl.c (c_write_global_declarations): Use a different method
5895 to determine if the dump has ben initialized.
5896
9f33203d
JM
58972012-09-14 Joseph Myers <joseph@codesourcery.com>
5898
5899 PR c/54552
5900 * c-typeck.c (c_cast_expr): When casting to a type requiring
5901 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
5902 c_fully_fold first.
5903
a27d595d
JM
59042012-09-14 Joseph Myers <joseph@codesourcery.com>
5905
5906 PR c/54103
5907 * c-typeck.c (build_unary_op): Pass original argument of
5908 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
5909 any C_MAYBE_CONST_EXPR, if it has integer operands.
5910 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
5911 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
5912 to c_objc_common_truthvalue_conversion, then remove any
5913 C_MAYBE_CONST_EXPR, if they have integer operands. Use
5914 c_objc_common_truthvalue_conversion not
5915 c_common_truthvalue_conversion.
5916 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
5917 call note_integer_operands for arguments with integer operands
5918 that are not integer constants.
5919
9feb29df
JJ
59202012-09-13 Jakub Jelinek <jakub@redhat.com>
5921
5922 PR c/54559
5923 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
5924 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
5925
d409320c
JJ
59262012-08-31 Jakub Jelinek <jakub@redhat.com>
5927
5928 PR c/54428
5929 * c-convert.c (convert): Don't call fold_convert_loc if
5930 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
5931 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
5932 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
5933
6265d07c
JJ
59342012-08-24 Jakub Jelinek <jakub@redhat.com>
5935
5936 PR c/54355
5937 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
5938 for nested and empty_ok arguments in the call to
5939 c_parser_declaration_or_fndef.
5940
1a4049e7
JJ
59412012-08-17 Jakub Jelinek <jakub@redhat.com>
5942
5943 * c-tree.h (c_last_sizeof_arg): Declare.
5944 * c-parser.c (struct c_tree_loc_pair): New type.
5945 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
5946 non-NULL.
5947 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
5948 (c_parser_postfix_expression_after_primary): Likewise. Call
5949 sizeof_pointer_memaccess_warning if needed.
5950 (sizeof_ptr_memacc_comptypes): New function.
5951 * c-typeck.c (c_last_sizeof_arg): New global variable.
5952 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
5953
0229aee9
UB
59542012-07-24 Uros Bizjak <ubizjak@gmail.com>
5955
5956 * c-lang.h (lang_decl): Add variable_size GTY option.
5957
7ee2468b
SB
59582012-07-16 Steven Bosscher <steven@gcc.gnu.org>
5959
5960 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
5961 * Make-lang.in: Fix dependencies.
5962
d4a10d0a
SB
59632012-06-29 Steven Bosscher <steven@gcc.gnu.org>
5964
5965 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
5966 and add language Makefile hooks.
5967 * config-lang.in: New file.
5968 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
5969 add the required "normal" config-lang.in rules.
5970 * c-lang.h: Moved from gcc/ to here.
5971 * c-tree.h: Likewise.
5972 * c-objc-common.c: Likewise.
5973 * c-objc-common.h: Likewise.
5974 * c-typeck.c: Likewise.
5975 * c-convert.c: Likewise.
5976 * c-lang.c: Likewise.
5977 * c-aux-info.c: Likewise.
5978 * c-errors.c: Likewise.
5979 * gccspec.c: Likewise.
5980 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
5981 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
5982\f
a5544970 5983Copyright (C) 2012-2019 Free Software Foundation, Inc.
d4a10d0a
SB
5984
5985Copying and distribution of this file, with or without modification,
5986are permitted in any medium without royalty provided the copyright
5987notice and this notice are preserved.