]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
C++: better locations for bogus initializations (PR c++/88375)
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
a14feb3c
DM
12018-12-19 David Malcolm <dmalcolm@redhat.com>
2
3 PR c++/87504
4 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
5 Move from here to gcc-rich-location.h and gcc-rich-location.c.
6 (build_binary_op): Use struct op_location_t and
7 class binary_op_rich_location.
8
6d939173
JJ
92018-12-11 Jakub Jelinek <jakub@redhat.com>
10
11 PR sanitizer/88426
12 * c-convert.c (convert): Call c_fully_fold before calling
13 ubsan_instrument_float_cast.
14
b7055028
SB
152018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
16
17 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
18 setting "quals".
19
5b76e75f
SB
202018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
21
22 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
23 after asm. Pass a flag for it to build_asm_expr.
24 * c-tree.h (build_asm_expr): Update declaration.
25 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
26 set ASM_INLINE_P.
27
30bd42b9
SB
282018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
29
30 PR inline-asm/55681
31 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
32 combination of volatile and goto, in any order, without repetitions.
33
9df6c0e4
JB
342018-12-04 James Norris <jnorris@codesourcery.com>
35 Cesar Philippidis <cesar@codesourcery.com>
36 Julian Brown <julian@codesourcery.com>
37
38 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
39 code.
40
f44697b7
RB
412018-11-30 Richard Biener <rguenther@suse.de>
42
43 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
44 _Literal (type) { ... } as empty aggregate or vector constructor.
45
550dfbdc
MS
462018-11-29 Martin Sebor <msebor@redhat.com>
47
48 PR c/88091
49 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
50 (convert_arguments): Add comments. Pass additional argument to
51 the function above.
52
673670da
MS
532018-11-29 Martin Sebor <msebor@redhat.com>
54
55 PR c/88172
56 PR testsuite/88208
57 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
58
db1d09b0
MS
592018-11-23 Martin Sebor <msebor@redhat.com>
60
61 PR testsuite/88098
62 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
63 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
64
98f08eb8
MS
652018-11-20 Martin Sebor <msebor@redhat.com>
66
67 * c-parser.c (c_parser_has_attribute_expression): New function.
68 (c_parser_attribute): New function.
69 (c_parser_attributes): Move code into c_parser_attribute.
70 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
71
cd5da983
MS
722018-11-15 Martin Sebor <msebor@redhat.com>
73
74 PR c/83656
75 * c-decl.c (header_for_builtin_fn): Declare.
76 (diagnose_mismatched_decls): Diagnose declarations of built-in
77 functions without a prototype.
78 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
79 (convert_argument): Same.
80 (convert_arguments): Factor code out into convert_argument.
81 Detect mismatches between built-in formal arguments in calls
82 to built-in without prototype.
83 (build_conditional_expr): Same.
84 (type_or_builtin_type): New function.
85 (convert_for_assignment): Add argument. Conditionally issue
86 warnings instead of errors for mismatches.
87
620e594b
DM
882018-11-13 David Malcolm <dmalcolm@redhat.com>
89
90 * c-decl.c: Replace "source_location" with "location_t".
91 * c-tree.h: Likewise.
92 * c-typeck.c: Likewise.
93 * gimple-parser.c: Likewise.
94
3179ebae
JJ
952018-11-09 Jakub Jelinek <jakub@redhat.com>
96
81a227c6
JJ
97 * c-parser.c (c_parser_omp_clause_final): Use
98 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
99 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
100 parsing instead of c_parser_paren_condition.
101 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
102 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
103 c_fully_fold instead of c_parser_condition.
104 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
105 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
106 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
107 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
108 c_parser_expr_no_commas instead of c_parser_expression.
109
98c91c56
JJ
110 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
111 reduction clause with inscan modifier.
112
3179ebae
JJ
113 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
114 clauses other than atomic_default_mem_order.
115
28567c40
JJ
1162018-11-08 Jakub Jelinek <jakub@redhat.com>
117
118 * c-parser.c: Include memmode.h.
119 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
120 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
121 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
122 task_reduction clauses.
123 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
124 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
125 section, or lvalue assignment expression.
126 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
127 (c_parser_omp_clause_lastprivate): Parse optional
128 conditional: modifier.
129 (c_parser_omp_clause_hint): Require constant integer expression rather
130 than just integer expression.
131 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
132 clause.
133 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
134 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
135 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
136 functions.
137 (c_parser_omp_clause_depend): Parse iterator modifier and handle
138 iterators. Parse mutexinoutset and depobj kinds.
139 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
140 callers.
141 (c_parser_omp_all_clauses): Likewise. Handle
142 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
143 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
144 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
145 default memory order from requires directive if any. Adjust
146 c_finish_omp_atomic caller.
147 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
148 (c_parser_omp_flush): Parse flush with memory-order-clause.
149 (c_parser_omp_for_loop): Allow NE_EXPR even in
150 OpenMP loops, adjust c_finish_omp_for caller.
151 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
152 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
153 Allow to be called while parsing combined parallel master.
154 Parse combined master taskloop{, simd}.
155 (c_parser_omp_parallel): Parse combined
156 parallel master{, taskloop{, simd}} constructs.
157 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
158 (OMP_TASKGROUP_CLAUSE_MASK): Define.
159 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
160 (OMP_TASKWAIT_CLAUSE_MASK): Define.
161 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
162 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
163 around teams body. Use SET_EXPR_LOCATION.
164 (c_parser_omp_target_data): Allow target data
165 with only use_device_ptr clauses.
166 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
167 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
168 (c_parser_omp_requires): New function.
169 (c_finish_taskloop_clauses): New function.
170 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
171 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
172 declaration. Disallow in_reduction clause when combined with parallel
173 master.
174 (c_parser_omp_construct): Adjust c_parser_omp_master and
175 c_parser_omp_taskgroup callers.
176 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
177 other than cancel.
178 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
179 like OMP_CLAUSE_REDUCTION.
180 (handle_omp_array_sections): Likewise. Call save_expr on array
181 reductions before calling build_index_type. Handle depend clauses
182 with iterators.
183 (struct c_find_omp_var_s): New type.
184 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
185 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
186 with static, runtime or auto schedule kinds. Call save_expr for whole
187 array reduction sizes. Diagnose reductions with zero sized elements
188 or variable length structures. Diagnose nogroup clause used with
189 reduction clause(s). Handle depend clause with
190 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
191 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
192 some different type for other kinds. Use build_unary_op with
193 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
194 Handle depend clauses with iterators. Remove no longer needed special
195 case that predetermined const qualified vars may be specified in
196 firstprivate clause. Complain if const qualified vars are mentioned
197 in data-sharing clauses other than firstprivate or shared. Use
198 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
199 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
200 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
201 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
202
7e2de6df
DM
2032018-10-29 David Malcolm <dmalcolm@redhat.com>
204
205 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
206 logic for change to name_hint::operator bool.
207 (undeclared_variable): Likewise.
208 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
209 (c_parser_parameter_declaration): Likewise.
210
9f936c86
JM
2112018-10-17 Joseph Myers <joseph@codesourcery.com>
212
213 * c-errors.c (pedwarn_c11): New function.
214 * c-parser.c (disable_extension_diagnostics): Save
215 warn_c11_c2x_compat and set it to 0.
216 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
217 (c_parser_static_assert_declaration_no_semi): Handle
218 _Static_assert without string constant.
219 * c-tree.h (pedwarn_c11): New prototype.
220
033eb567
DM
2212018-10-17 David Malcolm <dmalcolm@redhat.com>
222
223 * Make-lang.in (selftest-c): New.
224 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
225 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
226 from gcc/Makefile.in.
227
0edf3afe
RB
2282018-10-02 Richard Biener <rguenther@suse.de>
229
230 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
231
8313a764
JM
2322018-09-26 Joseph Myers <joseph@codesourcery.com>
233
234 PR c/87390
235 * c-typeck.c (build_binary_op): Use excess precision for
236 comparisons of integers and floating-point for C11 and later.
237
ce6f0888
MJ
2382018-09-26 Martin Jambor <mjambor@suse.cz>
239
240 PR c/87347
241 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
242 comment.
243
9c4a4b3c
DM
2442018-09-17 David Malcolm <dmalcolm@redhat.com>
245
246 * c-objc-common.c (range_label_for_type_mismatch::get_text):
247 Update for new param.
248 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
249 Likewise.
250
80c6d1f4
MJ
2512018-09-17 Martin Jambor <mjambor@suse.cz>
252
253 PR c/63886
254 * c-parser.c: (warn_for_abs): New function.
255 (c_parser_postfix_expression_after_primary): Call it.
256
4a426e36
BE
2572018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
258
259 * c-typeck.c (digest_init): Shorten overlength strings.
260
6d900107
BE
2612018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
262
263 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
264
b5764229
BE
2652018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
266
267 * c-decl.c (finish_decl): Call braced_list_to_string here ...
268 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
269
22eea6b2
AM
2702018-08-30 Alexander Monakov <amonakov@ispras.ru>
271
272 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
273 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
274
85204e23
DM
2752018-08-27 David Malcolm <dmalcolm@redhat.com>
276
277 PR 87091
278 * c-decl.c (implicitly_declare): Update call to
279 maybe_add_include_fixit to suggest overriding the location, as it
280 is for a note.
281 * c-objc-common.c (c_tree_printer): Update for conversion of
282 show_caret_p to a tri-state.
283
3d78e008
ML
2842018-08-27 Martin Liska <mliska@suse.cz>
285
286 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
287 fndecl_built_in_p and remove check for FUNCTION_DECL if
288 possible.
3d78e008
ML
289 (diagnose_mismatched_decls): Likewise.
290 (merge_decls): Likewise.
291 (warn_if_shadowing): Likewise.
292 (pushdecl): Likewise.
293 (implicitly_declare): Likewise.
294 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
295 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
296 * c-typeck.c (build_function_call_vec): Likewise.
297 (convert_arguments): Likewise.
298
097f82ec
DM
2992018-08-20 David Malcolm <dmalcolm@redhat.com>
300
301 PR other/84889
302 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
303 (diagnose_mismatched_decls): Likewise, in various places.
304 (warn_if_shadowing): Likewise.
305 (implicit_decl_warning): Likewise.
306 (implicitly_declare): Likewise.
307 (undeclared_variable): Likewise.
308 (declare_label): Likewise.
309 (grokdeclarator): Likewise.
310 (start_function): Likewise.
311 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
312 (c_parser_parameter_declaration): Likewise.
313 (c_parser_binary_expression): Likewise.
314 * c-typeck.c (c_expr_sizeof_expr): Likewise.
315 (parser_build_binary_op): Likewise.
316 (build_unary_op): Likewise.
317 (error_init): Likewise.
318 (pedwarn_init): Likewise.
319 (warning_init): Likewise.
320 (convert_for_assignment): Likewise.
321
96e6ae57
DM
3222018-08-15 David Malcolm <dmalcolm@redhat.com>
323
324 * c-objc-common.c: Include "gcc-rich-location.h".
325 (c_tree_printer): Move implemenation of '%T' to...
326 (print_type): ...this new function.
327 (range_label_for_type_mismatch::get_text): New function.
328 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
329 range for the various ic_argpass cases.
330 (class maybe_range_label_for_tree_type_mismatch): New class.
331 (build_binary_op): Use it when calling binary_op_error.
332
0cd020ae
PK
3332018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
334
335 * c-decl.c (start_decl): Do not warn if variables is named as main
336 and is a local variable.
337
72733314
IS
3382018-08-15 Iain Sandoe <iain@sandoe.co.uk>
339
340 PR c/19315
341 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
342 objects of unknown size.
343
23aa9f7c
MS
3442018-08-13 Martin Sebor <msebor@redhat.com>
345
346 PR tree-optimization/71625
347 * c-parser.c (c_parser_declaration_or_fndef): Call
348 braced_list_to_string.
349
e5e7e50d
BH
3502018-08-03 Bogdan Harjoc <harjoc@gmail.com>
351
352 PR c/86690
353 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
354 errors.
355
8a45b051
MS
3562018-08-01 Martin Sebor <msebor@redhat.com>
357
358 PR tree-optimization/86650
359 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
360 and TREE_BLOCK (t) from within percent_K_format to this callsite.
361
5922dcb5
JJ
3622018-08-01 Jakub Jelinek <jakub@redhat.com>
363
364 PR c/85704
365 * c-typeck.c (init_field_decl_cmp): New function.
366 (output_pending_init_elements): Use it for field comparisons
367 instead of pure bit_position comparisons.
368
9b452033
JJ
3692018-07-12 Jakub Jelinek <jakub@redhat.com>
370
371 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
372 type here, instead add "omp declare target implicit" attribute.
373 (finish_decl): Diagnose vars without mappable type here.
374
829c6349
CLT
3752018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
376 Thomas Schwinge <thomas@codesourcery.com>
377 Cesar Philippidis <cesar@codesourcery.com>
378
379 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
380 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
381 to their non-present_or_* counterparts. Make 'self' an alias to
382 PRAGMA_OACC_CLAUSE_HOST.
383 (c_parser_oacc_data_clause): Update GOMP mappings for
384 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
385 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
386 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
387 Remove support for present_or_* clauses.
388 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
389 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
390 (OACC_DECLARE_CLAUSE_MASK): Likewise.
391 (OACC_DATA_CLAUSE_MASK): Likewise.
392 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
393 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
394 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
395 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
396 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
397
e197e64e
KV
3982018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
399
400 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
401 * gimple-parser.c (c_parser_gimple_statement): Likewise.
402 (c_parser_gimple_unary_expression): Likewise.
403
487f2f61
JJ
4042018-06-15 Jakub Jelinek <jakub@redhat.com>
405
406 PR c/86093
407 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
408 before doing POINTER_DIFF_EXPR.
409
e4d44a37
MP
4102018-06-07 Marek Polacek <polacek@redhat.com>
411
412 PR c/85318
413 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
414 for loop initial declarations.
415
b67b9225
DP
4162018-05-30 David Pagan <dave.pagan@oracle.com>
417
418 PR c/55976
419 * c-decl.c (grokdeclarator): Update check for return type warnings.
420 (start_function): Likewise.
421 (finish_function): Likewise.
422 * c-typeck.c (c_finish_return): Update check for return type warnings.
423 Pass OPT_Wreturn_type to pedwarn when appropriate.
424
c566cc9f
RS
4252018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
426
427 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
428 __FMA_EXPR handlng.
429
e4f81565
RS
4302018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
431
432 * gimple-parser.c: Include internal-fn.h.
433 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
434 (c_parser_gimple_call_internal): New function.
435 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
436 Fix typos in comment.
437
79e7b1fe
JJ
4382018-05-10 Jakub Jelinek <jakub@redhat.com>
439
440 PR c++/85662
441 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
442 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
443 fold_convert_loc.
444 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
445 fold_offsetof_1, pass argtype as TYPE to it and drop the
446 fold_convert_loc.
447
f7584c81
DP
4482018-05-02 David Pagan <dave.pagan@oracle.com>
449
450 PR c/30552
451 * c-decl.c (old_style_parameter_scope): New function.
452 * c-parser.c (c_parser_postfix_expression): Check for statement
453 expressions in old-style function parameter list declarations.
454 * c-parser.h (old_style_parameter_scope): New extern declaration.
455
b33a0cb3
JJ
4562018-04-25 Jakub Jelinek <jakub@redhat.com>
457
458 PR sanitizer/84307
459 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
460 it is not TREE_STATIC.
461 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
462 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
463 its COMPOUND_LITERAL_EXPR_DECL.
464
c5c5822a
JM
4652018-03-21 Joseph Myers <joseph@codesourcery.com>
466
467 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
468 where all functions return the same _FloatN or _FloatNx type,
469 treat integer types as _Float64 instead of double.
470
aa1c9429
JJ
4712018-03-21 Jakub Jelinek <jakub@redhat.com>
472
473 PR c/84999
474 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
475 building vector comparison, diagnose it and return error_mark_node.
476
9bb45a95
JJ
4772018-03-15 Jakub Jelinek <jakub@redhat.com>
478
479 PR c/84853
480 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
481 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
482 INTEGER_TYPE element type.
483
ada6bad9
DP
4842018-03-13 David Pagan <dave.pagan@oracle.com>
485
486 PR c/46921
487 * c-typeck.c (output_init_element): Ensure field initializer
488 expression is always evaluated if there are side effects.
489
849bbdb9
JJ
4902018-03-06 Jakub Jelinek <jakub@redhat.com>
491
492 PR c/84721
493 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
494 !building_stmt_list_p ().
495
d74641bd
RS
4962018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
497
498 PR c/84305
499 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
500 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
501 and include the BIND_EXPR in the list of things that need to be
502 pre-evaluated.
503
0444aa9c
NS
5042018-02-09 Nathan Sidwell <nathan@acm.org>
505
506 PR c/84293
507 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
508 to strict_aliasing_warning.
509
7c30b12a
PC
5102018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
511
512 * c-typeck.c (really_start_incremental_init, push_init_level,
513 set_nonincremental_init, output_init_element, process_init_element):
514 Use DECL_UNNAMED_BIT_FIELD.
515
2be4dfcb
MP
5162018-01-31 Marek Polacek <polacek@redhat.com>
517
518 PR c/81779
519 * c-parser.c (c_parser_compound_statement_nostart): Call
520 expansion_point_location_if_in_system_header.
521
bb9869d5
DM
5222018-01-17 David Malcolm <dmalcolm@redhat.com>
523
524 PR c++/83814
525 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
526 the C part.
527
b4923738
JJ
5282018-01-13 Jakub Jelinek <jakub@redhat.com>
529
530 PR c/83801
531 * c-tree.h (decl_constant_value_1): Add a bool argument.
532 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
533 returning a CONSTRUCTOR if it is true. Use error_operand_p.
534 (decl_constant_value): Adjust caller.
535 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
536 decl_constant_value_1 as IN_INIT. Otherwise, punt if
537 decl_constant_value returns initializer that has BLKmode or
538 array type.
539 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
540
928686b1
RS
5412018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
542 Alan Hayward <alan.hayward@arm.com>
543 David Sherwood <david.sherwood@arm.com>
544
545 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
546 TYPE_VECTOR_SUBPARTS.
547
85ec4feb
JJ
5482018-01-03 Jakub Jelinek <jakub@redhat.com>
549
550 Update copyright years.
551
913884f7
JJ
5522018-01-01 Jakub Jelinek <jakub@redhat.com>
553
554 PR c/83595
555 * c-parser.c (c_parser_braced_init, c_parser_initelt,
556 c_parser_conditional_expression, c_parser_cast_expression,
557 c_parser_sizeof_expression, c_parser_alignof_expression,
558 c_parser_postfix_expression, c_parser_omp_declare_reduction,
559 c_parser_transaction_expression): Use set_error () method instead
560 of setting value member to error_mark_node.
561
c6cfa2bf
MM
5622017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
563
564 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
565 and _Float<N>X built-in functions.
566
11d29d63
JJ
5672017-12-22 Jakub Jelinek <jakub@redhat.com>
568
14ec014e
JJ
569 PR debug/83550
570 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
571 TYPE_STUB_DECL and call rest_of_type_compilation before processing
572 incomplete vars rather than after it.
573
11d29d63
JJ
574 PR debug/83547
575 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
576 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
577 and consider empty ones if there are no other stmts. For
578 -Wunused-value walk all statements before the one only followed by
579 DEBUG_BEGIN_STMTs.
580
170a8bd6 5812017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 582 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
583
584 * c-parser.c (c_parser_while_statement): Add unroll parameter and
585 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
586 (c_parser_do_statement): Likewise.
587 (c_parser_for_statement): Likewise.
588 (c_parser_statement_after_labels): Adjust calls to above.
589 (c_parse_pragma_ivdep): New static function.
590 (c_parser_pragma_unroll): Likewise.
591 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
592 <PRAGMA_UNROLL>: New case.
593
01512446
JJ
5942017-12-19 Jakub Jelinek <jakub@redhat.com>
595
596 * c-typeck.c (comptypes_internal, function_types_compatible_p,
597 perform_integral_promotions, digest_init): Replace Yoda conditions
598 with typical order conditions.
599 * c-decl.c (check_bitfield_type_and_width): Likewise.
600
c65e18d3
BE
6012017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
602
603 * c-typeck.c (c_safe_arg_type_equiv_p,
604 c_safe_function_type_cast_p): New function.
605 (build_c_cast): Implement -Wcast-function-type.
606
b7280579
RB
6072017-12-14 Richard Biener <rguenther@suse.de>
608
609 PR c/83415
610 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
611 like REALPART_EXPR for the behavior of whether its operand
612 is an lvalue.
613
49e6a6c0
MP
6142017-12-12 Marek Polacek <polacek@redhat.com>
615
616 PR c/82679
617 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
618
96a95ac1
AO
6192017-12-12 Alexandre Oliva <aoliva@redhat.com>
620
621 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
622 * c-parser.c (add_debug_begin_stmt): New.
623 (c_parser_declaration_or_fndef): Call it.
624 (c_parser_compound_statement_nostart): Likewise.
625 (c_parser_statement_after_labels): Likewise.
626 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
627
4b2b493f
JM
6282017-12-07 Joseph Myers <joseph@codesourcery.com>
629
630 * c-decl.c (build_compound_literal): Add parameter alignas_align
631 and set alignment of decl if nonzero.
632 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
633 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
634 qualifier.
635 (c_parser_struct_declaration): Update syntax comment.
636 (c_parser_type_name): Add alignas_ok argument and pass it to
637 c_parser_declspecs.
638 (c_parser_cast_expression): Pass true to c_parser_type_name and
639 give error if a cast used an _Alignas specifier.
640 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
641 give error if sizeof (type-name) used an _Alignas specifier.
642 (c_parser_alignof_expression): Pass true to c_parser_type_name and
643 give error if _Alignof (type-name) used an _Alignas specifier.
644 (c_parser_postfix_expression_after_paren_type): Check specified
645 alignment for a compound literal and pass it to
646 build_compound_literal.
647 * c-parser.h (c_parser_type_name): Update prototype.
648 * c-tree.h (build_compound_literal): Update prototype.
649
5d9ae53d
MS
6502017-12-07 Martin Sebor <msebor@redhat.com>
651
652 PR c/81544
653 * c-decl.c (c_decl_attributes): Look up existing declaration and
654 pass it to decl_attributes.
655
c79144f8
DM
6562017-12-06 David Malcolm <dmalcolm@redhat.com>
657
658 PR c/83236
659 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
660 reserved for use by the implementation.
661
613bc14f
DM
6622017-12-06 David Malcolm <dmalcolm@redhat.com>
663
664 * c-decl.c: Include "c-family/c-spellcheck.h".
665
05abad4c
ML
6662017-12-05 Martin Liska <mliska@suse.cz>
667 Jakub Jelinek <jakub@redhat.com>
668
669 * c-typeck.c (pointer_diff): Add new argument and instrument
670 pointer subtraction.
671 (build_binary_op): Similar for pointer comparison.
672
cc6534d4
JJ
6732017-12-01 Jakub Jelinek <jakub@redhat.com>
674
65791f42
JJ
675 PR c/79153
676 * c-parser.c: Include tree-iterator.h.
677 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
678 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
679 on it.
680
cc6534d4
JJ
681 PR c/83222
682 * c-tree.h (decl_constant_value_1): Declare.
683 * c-typeck.c (decl_constant_value_1): New function.
684 (decl_constant_value): Use it.
685 * c-fold.c (c_fully_fold_internal): If in_init, use
686 decl_constant_value_1 instead of decl_constant_value.
687
5de73c05
JJ
6882017-11-30 Jakub Jelinek <jakub@redhat.com>
689
690 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
691
058f0b9e
JJ
6922017-11-28 Jakub Jelinek <jakub@redhat.com>
693
694 PR sanitizer/81275
695 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
696 c_switch_covers_all_cases_p returns true.
697
5e9d6aa4 6982017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 699 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
700
701 * Make-lang.in (c/c-array-notation.o): Remove.
702 * c-array-notation.c: Delete.
703 * c-decl.c: Remove cilkplus condition.
704 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
705 c_parser_cilk_verify_simd, c_parser_array_notation,
706 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
707 c_parser_cilk_simd_fn_vector_attrs,
708 c_finish_cilk_simd_fn_tokens): Delete.
709 (c_parser_declaration_or_fndef): Remove cilkplus condition.
710 (c_parser_direct_declarator_inner): Ditto.
711 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
712 (c_parser_attributes, c_parser_compound_statement,
713 c_parser_statement_after_labels, c_parser_if_statement,
714 c_parser_switch_statement, c_parser_while_statement,
715 c_parser_do_statement, c_parser_for_statement,
716 c_parser_unary_expression, c_parser_postfix_expression,
717 c_parser_postfix_expression_after_primary,
718 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
719 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
720 support.
721 * c-typeck.c (build_array_ref, build_function_call_vec,
722 convert_arguments,
723 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
724 c_finish_loop, build_binary_op): Remove cilkplus support.
725
9e851845
JJ
7262017-11-28 Jakub Jelinek <jakub@redhat.com>
727
728 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
729 of build3.
730
8c7dbea9
BK
7312017-11-14 Boris Kolpackov <boris@codesynthesis.com>
732
733 * Make-lang.in (c.install-plugin): Install backend import library.
734
41521dee
JJ
7352017-11-23 Jakub Jelinek <jakub@redhat.com>
736
737 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
738 pragma_stmt context.
739
ac9effed
EB
7402017-11-23 Mike Stump <mikestump@comcast.net>
741 Eric Botcazou <ebotcazou@adacore.com>
742
743 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
744 ANNOTATE_EXPR.
745 (c_parser_do_statement): Likewise.
746 (c_parser_for_statement): Likewise.
747
ce95abc4
DM
7482017-11-22 David Malcolm <dmalcolm@redhat.com>
749
750 PR c++/62170
751 * c-objc-common.c (c_tree_printer): Convert penultimate param from
752 bool to bool *. Within '%T' handling, if showing an "aka", use
753 "quoted" param to add appropriate quoting.
754
974aedcc
MP
7552017-11-22 Marek Polacek <polacek@redhat.com>
756
757 PR c++/60336
758 PR middle-end/67239
759 PR target/68355
760 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
761
d4300cc6
DM
7622017-11-21 David Malcolm <dmalcolm@redhat.com>
763
764 PR c/83056
765 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
766 earlier failed lookups.
767
1af4ebf5
MG
7682017-11-21 Marc Glisse <marc.glisse@inria.fr>
769
770 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
771 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
772
26edace6
DM
7732017-11-20 David Malcolm <dmalcolm@redhat.com>
774
775 PR c/81404
776 * c-decl.c: Include "c-family/known-headers.h".
777 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
778 to known-headers.cc.
779 (class suggest_missing_header): Move to known-header.h.
780 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
781 than get_c_name_hint.
782
b1212255
DM
7832017-11-20 David Malcolm <dmalcolm@redhat.com>
784
785 * c-decl.c (get_c_name_hint): New function.
786 (class suggest_missing_header): New class.
787 (lookup_name_fuzzy): Call get_c_name_hint and use it to
788 suggest missing headers to the user.
789
6c7a259b
DM
7902017-11-20 David Malcolm <dmalcolm@redhat.com>
791
792 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
793 Include "c-family/name-hint.h"
794 (implicit_decl_warning): Convert "hint" from
795 const char * to name_hint. Pass location to
796 lookup_name_fuzzy. Suppress any deferred diagnostic if the
797 warning was not printed.
798 (undeclared_variable): Likewise for "guessed_id".
799 (lookup_name_fuzzy): Convert return type from const char *
800 to name_hint. Add location_t param.
801 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
802 Include "c-family/name-hint.h"
803 (c_parser_declaration_or_fndef): Convert "hint" from
804 const char * to name_hint. Pass location to lookup_name_fuzzy.
805 (c_parser_parameter_declaration): Likewise.
806
f9c59f7e
JJ
8072017-11-19 Jakub Jelinek <jakub@redhat.com>
808
809 PR c/66618
810 PR c/69960
811 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
812 where needed.
813 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
814 handle_omp_array_sections): Likewise.
815 (digest_init): Don't call decl_constant_value_for_optimization.
816 * c-tree.h (decl_constant_value_for_optimization): Removed.
817 * c-fold.c (c_fold_array_ref): New function.
818 (c_fully_fold_internal): Add LVAL argument, propagate it through
819 recursive calls. For VAR_P call decl_constant_value and
820 unshare if not LVAL and either optimizing or IN_INIT. Remove
821 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
822 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
823 (c_fully_fold): Add LVAL argument, pass it through to
824 c_fully_fold_internal.
825 (decl_constant_value_for_optimization): Removed.
826
3ca0dc60
JM
8272017-11-15 Joseph Myers <joseph@codesourcery.com>
828
829 PR c/81156
830 * c-parser.c (check_tgmath_function): New function.
831 (enum tgmath_parm_kind): New enum.
832 (c_parser_postfix_expression): Handle __builtin_tgmath.
833
64a5912c
DM
8342017-10-31 David Malcolm <dmalcolm@redhat.com>
835
836 * c-decl.c (implicit_decl_warning): Update for renaming of
837 pedwarn_at_rich_loc and warning_at_rich_loc.
838 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
839 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
840 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
841 (c_parser_struct_or_union_specifier): Likewise for renaming of
842 pedwarn_at_rich_loc.
843 (c_parser_parameter_declaration): Likewise for renaming of
844 error_at_rich_loc.
845 * c-typeck.c (build_component_ref): Likewise.
846 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
847 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
848 (set_init_label): Likewise for renaming of error_at_rich_loc.
849
c1136864
RB
8502017-10-30 Richard Biener <rguenther@suse.de>
851
852 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
853 stmts.
854
ee5fd23a
MM
8552017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
856
857 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
858 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
859
1a59ccf2
DM
8602017-10-25 David Malcolm <dmalcolm@redhat.com>
861
862 PR c/7356
863 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
864 semicolons.
865
bc1a75dd
JJ
8662017-10-25 Jakub Jelinek <jakub@redhat.com>
867
868 PR libstdc++/81706
869 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
870 newdecl to corresponding __builtin_ if any.
871
ff1ff960
PC
8722017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
873
874 PR c++/82466
875 * c-decl.c (diagnose_mismatched_decls): Use
876 OPT_Wbuiltin_declaration_mismatch.
877
62e1c678
DM
8782017-10-12 David Malcolm <dmalcolm@redhat.com>
879
880 * c-parser.c (c_parser_require): Add "type_is_unique" param and
881 use it to guard calls to maybe_suggest_missing_token_insertion.
882 (c_parser_parms_list_declarator): Override default value of new
883 "type_is_unique" param to c_parser_require.
884 (c_parser_asm_statement): Likewise.
885 * c-parser.h (c_parser_require): Add "type_is_unique" param,
886 defaulting to true.
887
a92f6726
NS
8882017-10-11 Nathan Sidwell <nathan@acm.org>
889
890 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
891
8e6cdc90
RS
8922017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
893
894 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
895 operating on trees as wide_ints.
896 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
897 (c_tree_equal): Likewise.
898
8139a48e
DM
8992017-10-04 David Malcolm <dmalcolm@redhat.com>
900
901 * c-decl.c (push_parm_decl): Store c_parm's location into the
902 PARAM_DECL.
903 (build_c_parm): Add "loc" param and store it within the c_parm.
904 * c-parser.c (struct c_parser): Add "last_token_location" field.
905 (c_parser_consume_token): Store location of the token into the
906 new field.
907 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
908 when handling a FUNCTION_DECL, if it doesn't already have them.
909 (c_parser_parameter_declaration): Generate a location for the
910 parameter, and pass it to the call to build_c_parm.
911 * c-tree.h (struct c_parm): Add field "loc".
912 (build_c_parm): Add location_t param.
913 * c-typeck.c (get_fndecl_argument_location): New function.
914 (inform_for_arg): New function.
915 (convert_for_assignment): Use inform_for_arg when dealing with
916 ic_argpass.
917
2a389958
JJ
9182017-09-29 Jakub Jelinek <jakub@redhat.com>
919
7d386d45
JJ
920 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
921 width is non-NULL.
922 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
923 don't SET_DECL_C_BIT_FIELD here.
924
2a389958
JJ
925 PR c/82340
926 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
927 instead of trying to set just TREE_READONLY manually.
928
ebc6a85e
TV
9292017-09-16 Tom de Vries <tom@codesourcery.com>
930
931 PR c/81875
932 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
933 cond itself.
934
bb75facd
JM
9352017-09-15 Joseph Myers <joseph@codesourcery.com>
936
937 PR c/82071
938 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
939 for C11.
940 (build_conditional_expr): For C11, generate result with excess
941 precision when one argument is an integer and the other is of a
942 type using excess precision.
943
1d933576
BE
9442017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
945
946 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
947
267bbb6f
MP
9482017-09-13 Marek Polacek <polacek@redhat.com>
949
950 PR c/82167
951 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
952 than expr.original_type.
953
6836632e
NS
9542017-09-12 Nathan Sidwell <nathan@acm.org>
955
956 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
957 resort_sorted_fields): Moved from c-family/c-common.c.
958 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
959
e035be33
JM
9602017-09-01 Joseph Myers <joseph@codesourcery.com>
961
962 PR c/82071
963 * c-typeck.c (build_atomic_assign): Handle argument with excess
964 precision. Ensure any EXCESS_PRECISION_EXPR is present in
965 argument passed to build_binary_op and convert_for_assignment but
966 not for call to c_fully_fold.
967 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
968 Ensure build_binary_op is called with argument with original
969 semantic type. Avoid calling c_fully_fold with an
970 EXCESS_PRECISION_EXPR from build_binary_op.
971
d2e05fcb
JJ
9722017-09-01 Jakub Jelinek <jakub@redhat.com>
973
974 PR c/81887
975 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
976
b397965c
RS
9772017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
978 Alan Hayward <alan.hayward@arm.com>
979 David Sherwood <david.sherwood@arm.com>
980
981 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
982 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
983 m1 and m2 to the signed equivalent of a fixed-point
984 SCALAR_TYPE_MODE.
985
14e18d71
DM
9862017-08-24 David Malcolm <dmalcolm@redhat.com>
987
988 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
989 than CAN_HAVE_LOCATION_P when determining whether to use the
990 location_t value within "value".
991
7f204c0f
DM
9922017-08-21 David Malcolm <dmalcolm@redhat.com>
993
994 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
995 rather than peeking the location of the first token.
996 * c-tree.h (c_expr::get_location): New method.
997
2f687306
DM
9982017-08-21 David Malcolm <dmalcolm@redhat.com>
999
1000 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
1001 to check_function_arguments.
1002
3e7b80d7
MP
10032017-08-18 Marek Polacek <polacek@redhat.com>
1004
1005 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
1006 commentary.
1007
00aa1fa2
L
10082017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1009
1010 PR c/53037
1011 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
1012 (check_bitfield_type_and_width): Don't allow bit-field with
1013 warn_if_not_aligned type.
1014
da67acb9
MS
10152017-08-14 Martin Sebor <msebor@redhat.com>
1016
1017 PR c/81117
1018 * c-objc-common.c (c_objc_common_init): Handle 'G'.
1019
bb85aa74
MP
10202017-08-11 Marek Polacek <polacek@redhat.com>
1021
1022 PR c/81795
1023 * c-decl.c (pushtag): Only print inform if the warning was printed.
1024 (grokdeclarator): Likewise.
1025
32129a17
DM
10262017-08-10 David Malcolm <dmalcolm@redhat.com>
1027
1028 * c-parser.c (c_parser_error): Rename to...
1029 (c_parser_error_richloc): ...this, making static, and adding
1030 "richloc" parameter, passing it to the c_parse_error call,
1031 rather than calling c_parser_set_source_position_from_token.
1032 (c_parser_error): Reintroduce, reimplementing in terms of the
1033 above, converting return type from void to bool.
1034 (class token_pair): New class.
1035 (struct matching_paren_traits): New struct.
1036 (matching_parens): New typedef.
1037 (struct matching_brace_traits): New struct.
1038 (matching_braces): New typedef.
1039 (get_matching_symbol): New function.
1040 (c_parser_require): Add param MATCHING_LOCATION, using it to
1041 highlight matching "opening" tokens for missing "closing" tokens.
1042 (c_parser_skip_until_found): Likewise.
1043 (c_parser_static_assert_declaration_no_semi): Convert explicit
1044 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
1045 class matching_parens, so that the pertinent open parenthesis is
1046 highlighted when there are problems locating the close
1047 parenthesis.
1048 (c_parser_struct_or_union_specifier): Likewise.
1049 (c_parser_typeof_specifier): Likewise.
1050 (c_parser_alignas_specifier): Likewise.
1051 (c_parser_simple_asm_expr): Likewise.
1052 (c_parser_braced_init): Likewise, for matching_braces.
1053 (c_parser_paren_condition): Likewise, for matching_parens.
1054 (c_parser_switch_statement): Likewise.
1055 (c_parser_for_statement): Likewise.
1056 (c_parser_asm_statement): Likewise.
1057 (c_parser_asm_operands): Likewise.
1058 (c_parser_cast_expression): Likewise.
1059 (c_parser_sizeof_expression): Likewise.
1060 (c_parser_alignof_expression): Likewise.
1061 (c_parser_generic_selection): Likewise.
1062 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
1063 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
1064 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
1065 In case CPP_OPEN_PAREN, pass loc_open_paren to the
1066 c_parser_skip_until_found call.
1067 (c_parser_objc_class_definition): Use class matching_parens as
1068 above.
1069 (c_parser_objc_method_decl): Likewise.
1070 (c_parser_objc_try_catch_finally_statement): Likewise.
1071 (c_parser_objc_synchronized_statement): Likewise.
1072 (c_parser_objc_at_property_declaration): Likewise.
1073 (c_parser_oacc_wait_list): Likewise.
1074 (c_parser_omp_var_list_parens): Likewise.
1075 (c_parser_omp_clause_collapse): Likewise.
1076 (c_parser_omp_clause_default): Likewise.
1077 (c_parser_omp_clause_if): Likewise.
1078 (c_parser_omp_clause_num_threads): Likewise.
1079 (c_parser_omp_clause_num_tasks): Likewise.
1080 (c_parser_omp_clause_grainsize): Likewise.
1081 (c_parser_omp_clause_priority): Likewise.
1082 (c_parser_omp_clause_hint): Likewise.
1083 (c_parser_omp_clause_defaultmap): Likewise.
1084 (c_parser_oacc_single_int_clause): Likewise.
1085 (c_parser_omp_clause_ordered): Likewise.
1086 (c_parser_omp_clause_reduction): Likewise.
1087 (c_parser_omp_clause_schedule): Likewise.
1088 (c_parser_omp_clause_num_teams): Likewise.
1089 (c_parser_omp_clause_thread_limit): Likewise.
1090 (c_parser_omp_clause_aligned): Likewise.
1091 (c_parser_omp_clause_linear): Likewise.
1092 (c_parser_omp_clause_safelen): Likewise.
1093 (c_parser_omp_clause_simdlen): Likewise.
1094 (c_parser_omp_clause_depend): Likewise.
1095 (c_parser_omp_clause_map): Likewise.
1096 (c_parser_omp_clause_device): Likewise.
1097 (c_parser_omp_clause_dist_schedule): Likewise.
1098 (c_parser_omp_clause_proc_bind): Likewise.
1099 (c_parser_omp_clause_uniform): Likewise.
1100 (c_parser_omp_for_loop): Likewise.
1101 (c_parser_cilk_clause_vectorlength): Likewise.
1102 (c_parser_cilk_clause_linear): Likewise.
1103 (c_parser_transaction_expression): Likewise.
1104 * c-parser.h (c_parser_require): Add param matching_location with
1105 default UNKNOWN_LOCATION.
1106 (c_parser_error): Convert return type from void to bool.
1107 (c_parser_skip_until_found): Add param matching_location with
1108 default UNKNOWN_LOCATION.
1109
30af3a2b
MP
11102017-08-09 Marek Polacek <polacek@redhat.com>
1111
1112 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
1113 * c-tree.h (build_external_ref): Update declaration.
1114 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
1115 (build_external_ref): Change the type of a parameter to bool.
1116 (parser_build_binary_op): Use true/false instead of 1/0.
1117 (pointer_diff): Likewise.
1118 (build_modify_expr): Likewise.
1119 (set_designator): Change the type of a parameter to bool.
1120 (set_init_index): Use true/false instead of 1/0.
1121 (set_init_label): Likewise.
1122 (output_init_element): Change the type of a parameter to bool.
1123 (output_pending_init_elements): Use true/false instead of 1/0.
1124 (process_init_element): Likewise.
1125 (build_binary_op): Change the type of a parameter to bool.
1126
296c53ac
MP
11272017-08-09 Marek Polacek <polacek@redhat.com>
1128
1129 PR c/81233
1130 * c-typeck.c (pedwarn_init): Make the function take a variable list.
1131 Call emit_diagnostic_valist instead of pedwarn.
1132 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
1133 Print the relevant types in diagnostics.
1134
a32c8316
MP
11352017-08-09 Marek Polacek <polacek@redhat.com>
1136
1137 PR c/81417
1138 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
1139 build_conditional_expr.
1140 * c-parser.c (c_parser_conditional_expression): Create locations for
1141 EXP1 and EXP2 from their source ranges. Pass the locations down to
1142 build_conditional_expr.
1143 * c-tree.h (build_conditional_expr): Update declaration.
1144 * c-typeck.c (build_conditional_expr): Add location_t parameters.
1145 For -Wsign-compare, also print the types.
1146
314e6352
ML
11472017-08-08 Martin Liska <mliska@suse.cz>
1148
1149 * c-convert.c: Include header files.
1150 * c-typeck.c: Likewise.
1151
577eec56
ML
11522017-08-07 Martin Liska <mliska@suse.cz>
1153
1154 * c-parser.c (c_parser_attributes): Canonicalize name of an
1155 attribute.
1156
f7b6353a
MP
11572017-08-02 Marek Polacek <polacek@redhat.com>
1158
1159 PR c/81289
1160 * c-parser.c (c_parser_unary_expression): Use set_error.
1161
8a6eab34
MP
1162 PR c/81448
1163 PR c/81306
1164 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
1165 warnings. Avoid walking MACRO_MAP_LOCATIONS.
1166
7fef86d3
JH
11672017-07-31 Jan Hubicka <hubicka@ucw.cz>
1168 Martin Liska <mliska@suse.cz>
1169
1170 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 1171 statement.
7fef86d3 1172
f34ebeb2
ML
11732017-07-31 Martin Liska <mliska@suse.cz>
1174
1175 PR sanitize/81530
1176 * c-convert.c (convert): Guard condition with flag_sanitize_p
1177 also with current_function_decl non-null equality.
1178 * c-decl.c (grokdeclarator): Likewise.
1179 * c-typeck.c (build_binary_op): Likewise.
1180
8595f67b
MP
11812017-07-25 Marek Polacek <polacek@redhat.com>
1182
1183 * c-decl.c (grokfield): Remove local variable.
1184
d49718d6
MP
11852017-07-25 Marek Polacek <polacek@redhat.com>
1186
1187 PR c/81364
1188 * c-parser.c (c_parser_else_body): Don't warn about multistatement
1189 macro expansion if the body is in { }.
1190 (c_parser_while_statement): Likewise.
1191 (c_parser_for_statement): Likewise.
1192
ff22eb12
NS
11932017-07-18 Nathan Sidwell <nathan@acm.org>
1194
1195 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
1196
eea77d1f
DM
11972017-07-14 David Malcolm <dmalcolm@redhat.com>
1198
1199 * c-decl.c (implicitly_declare): When suggesting a missing
1200 #include, provide a fix-it hint.
1201
b6f43128
DM
12022017-07-06 David Malcolm <dmalcolm@redhat.com>
1203
1204 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
1205 and call that instead.
1206 * c-tree.h (selftest::run_c_tests): New decl.
1207
3e2becc4
MP
12082017-06-26 Marek Polacek <polacek@redhat.com>
1209
1210 PR c/80116
1211 * c-parser.c (c_parser_if_body): Set the location of the
1212 body of the conditional after parsing all the labels. Call
1213 warn_for_multistatement_macros.
1214 (c_parser_else_body): Likewise.
1215 (c_parser_switch_statement): Likewise.
1216 (c_parser_while_statement): Likewise.
1217 (c_parser_for_statement): Likewise.
1218 (c_parser_statement): Add a default argument. Save the location
1219 after labels have been parsed.
1220 (c_parser_c99_block_statement): Likewise.
1221
343ae898
RB
12222017-06-19 Richard Biener <rguenther@suse.de>
1223
1224 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1225 negated _Literals to parse _Literal (int) -1.
1226
45b2222a
ML
12272017-06-13 Martin Liska <mliska@suse.cz>
1228
1229 PR sanitize/78204
1230 * c-convert.c (convert): Use sanitize_flags_p.
1231 * c-decl.c (grokdeclarator): Likewise.
1232 * c-typeck.c (convert_for_assignment): Likewise.
1233 (c_finish_return): Likewise.
1234 (build_binary_op): Likewise.
1235
8ab7005b
JJ
12362017-06-08 Jakub Jelinek <jakub@redhat.com>
1237
1238 PR c/81006
1239 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
1240 to sizetype before size_binop.
1241
363dc72c
JJ
12422017-06-07 Jakub Jelinek <jakub@redhat.com>
1243
1244 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
1245 of TDI_generic.
1246
dc949728
MP
12472017-06-06 Marek Polacek <polacek@redhat.com>
1248
1249 PR c/79983
1250 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
1251 ref.
1252 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
1253
40ffd95f
BE
12542017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1255
1256 * c-parser.c (c_parser_binary_expression): Implement the
1257 -Wsizeof_pointer_div warning.
1258 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
1259 from a parenthesized expression.
1260 (c_parser_expr_list): Use c_last_sizeof_loc.
1261 * c-tree.h (c_last_sizeof_loc): New external.
1262 * c-typeck.c (c_last_sizeof_loc): New variable.
1263 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
1264
9fc5e7a4
MM
12652017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
1266
1267 PR testsuite/80580
1268 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
1269
f012c8ef
DM
12702017-05-30 David Malcolm <dmalcolm@redhat.com>
1271
1272 * c-objc-common.c (c_tree_printer): Gain bool and const char **
1273 parameters.
1274
3cd211af
MS
12752017-05-24 Martin Sebor <msebor@redhat.com>
1276
1277 PR c/80731
1278 * c-fold.c (c_fully_fold_internal): Adjust.
1279 * c-typeck.c (parser_build_unary_op): Adjust.
1280
fd71a9a2
TS
12812017-05-23 Thomas Schwinge <thomas@codesourcery.com>
1282
1283 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
1284 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
1285 "VECTOR_LENGTH".
1286
92fa0f9e
MP
12872017-05-23 Marek Polacek <polacek@redhat.com>
1288
1289 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
1290 quotes.
1291
d11c168a
JJ
12922017-05-22 Jakub Jelinek <jakub@redhat.com>
1293
1294 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
1295 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
1296 it returned invariant. Call tree_invariant_p unconditionally
1297 afterwards to decide whether to return expr or op0.
1298
58aca9d9
NS
12992017-05-22 Nathan Sidwell <nathan@acm.org>
1300
1301 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
1302
7fd549d2
TS
13032017-05-19 Thomas Schwinge <thomas@codesourcery.com>
1304
1305 * c-parser.c (c_parser_omp_clause_default): Handle
1306 "OMP_CLAUSE_DEFAULT_PRESENT".
1307
6ecd2339
BE
13082017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1309
1310 * config-lang.in (gtfiles): Add c-family/c-format.c.
1311
8a57ecff
NS
13122017-05-18 Nathan Sidwell <nathan@acm.org>
1313
1314 * c-decl.c (pushdecl_top_level): Delete unused function.
1315
6574d78e
MP
13162017-05-18 Marek Polacek <polacek@redhat.com>
1317
1318 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
1319 (check_earlier_gotos): Likewise.
1320 (define_label): Likewise.
1321 (pending_xref_error): Likewise.
1322 (smallest_type_quals_location): Likewise.
1323 (grokdeclarator): Likewise.
1324 (grokparms): Likewise.
1325 (identifier_global_value): Likewise.
1326 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
1327 (find_init_member): Likewise.
1328
e3455240
MP
13292017-05-18 Marek Polacek <polacek@redhat.com>
1330
1331 * c-decl.c (start_decl): Use false/true instead of 0/1.
1332 (grokdeclarator): Likewise.
1333 (finish_struct): Likewise.
1334 (start_function): Change the return type to bool. Use false/true
1335 instead of 0/1.
1336 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
1337 * c-tree.h (start_function): Update.
1338 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
1339 (set_designator): Change the return type to bool. Use false/true
1340 instead of 0/1.
1341
3fa8871b
MP
13422017-05-17 Marek Polacek <polacek@redhat.com>
1343
1344 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
1345 * c-typeck.c: Likewise.
1346
142473df
MP
13472017-05-17 Marek Polacek <polacek@redhat.com>
1348
1349 PR sanitizer/80659
1350 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
1351 DECL_IGNORED_P even for non-static compound literals.
1352
1a817418
ML
13532017-05-17 Martin Liska <mliska@suse.cz>
1354
1355 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1356 use it instead of int type.
1357
b2fa0a8b
MP
13582017-05-17 Marek Polacek <polacek@redhat.com>
1359
1360 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
1361 call c_fully_fold.
1362 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
1363 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
1364 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1365 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1366 save_expr.
1367 (c_parser_conditional_expression): Likewise.
1368 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1369 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1370 (process_init_element): Likewise.
1371 (build_binary_op): Likewise.
1372 (handle_omp_array_sections_1): Likewise.
1373
1e47f02b
TS
13742017-05-12 Thomas Schwinge <thomas@codesourcery.com>
1375
1376 * c-parser.c (c_parser_omp_clause_num_gangs)
1377 (c_parser_omp_clause_num_workers)
1378 (c_parser_omp_clause_vector_length): Merge functions into...
1379 (c_parser_oacc_single_int_clause): ... this new function. Adjust
1380 all users.
1381
c24e924f
NS
13822017-05-11 Nathan Sidwell <nathan@acm.org>
1383
1384 * gimple-parser.c: Don't #include tree-dump.h.
1385
c587104e
MM
13862017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1387
1388 PR testsuite/80580
1389 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
1390
67ac9a9d
MM
13912017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1392
1393 PR testsuite/80580
1394 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1395 incorrect __MEM syntax.
1396
ac4eb40f
MM
13972017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1398
1399 PR testsuite/80580
1400 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1401 type of unary '*'.
1402
641da50a
NS
14032017-05-09 Nathan Sidwell <nathan@acm.org>
1404
1405 * c-tree.h (pushdecl): Declare.
1406
56d35585
DM
14072017-05-05 David Malcolm <dmalcolm@redhat.com>
1408
1409 * c-decl.c (warn_defaults_to): Replace report_diagnostic
1410 with diagnostic_report_diagnostic.
1411 * c-errors.c (pedwarn_c99): Likewise.
1412 (pedwarn_c90): Likewise.
1413
815d9cc6
XR
14142017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1415
92a285c1 1416 PR c++/80038
815d9cc6
XR
1417 * c-gimplify.c (c_gimplify_expr): Remove calls to
1418 cilk_gimplifY_call_params_in_spawned_fn.
1419
1c4ea66f
DM
14202017-04-25 David Malcolm <dmalcolm@redhat.com>
1421
1422 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1423 hint for removing extra semicolon.
1424
666f7903
JJ
14252017-04-21 Jakub Jelinek <jakub@redhat.com>
1426
1427 PR c/80468
1428 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
1429 enabled, set specs->type to integer_type_node.
1430
5764ee3c
JW
14312017-04-03 Jonathan Wakely <jwakely@redhat.com>
1432
1433 * c-array-notation.c: Fix typo in comment.
1434
10fa8dfb
MP
14352017-03-29 Marek Polacek <polacek@redhat.com>
1436
1437 PR c/79730
1438 * c-decl.c (finish_decl): Check VAR_P.
1439
a9e4a1a5
JJ
14402017-03-27 Jakub Jelinek <jakub@redhat.com>
1441
1442 PR middle-end/80162
1443 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1444 * c-typeck.c (c_mark_addressable): Likewise. Look through
1445 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1446 to ARRAY_TYPE.
1447 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
1448
ee3ff394
MP
14492017-03-23 Marek Polacek <polacek@redhat.com>
1450
1451 * c-tree.h: Remove a C_RID_YYCODE reference.
1452
4d1b8e70
JJ
14532017-03-21 Jakub Jelinek <jakub@redhat.com>
1454
1455 PR c/80097
1456 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
1457 optional COMPOUND_EXPR with ubsan instrumentation.
1458
31dc71a8
MP
14592017-03-17 Marek Polacek <polacek@redhat.com>
1460
1461 * c-parser.c: Add C11 references.
1462
d579c385
MP
14632017-03-15 Marek Polacek <polacek@redhat.com>
1464
1465 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
1466
85059a38
MP
14672017-03-11 Marek Polacek <polacek@redhat.com>
1468
1469 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
1470
2f6f187a
DM
14712017-03-10 David Malcolm <dmalcolm@redhat.com>
1472
1473 PR translation/79848
1474 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1475 "%qs".
1476 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1477
36618428
MP
14782017-03-09 Marek Polacek <polacek@redhat.com>
1479
1480 PR sanitizer/79757
1481 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1482 parameter declarations with initializers.
1483
01e5af5a
JJ
14842017-03-09 Jakub Jelinek <jakub@redhat.com>
1485
1486 PR c/79969
1487 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
1488 TYPE_STUB_DECL.
1489
a71dbc63
JJ
14902017-03-07 Jakub Jelinek <jakub@redhat.com>
1491
1492 PR c/79834
1493 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1494 for "may only be used in compound statements" diagnostics, change it
1495 such that the same translatable string is used for all pragmas. For
1496 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1497 diagnostics.
1498 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1499 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1500 "may only be used in compound statements" diagnostics, such that the
1501 same translatable string is used for all pragmas.
1502
1ff4bae6
MP
15032017-03-04 Marek Polacek <polacek@redhat.com>
1504
1505 PR c/79847
1506 * c-decl.c (implicit_decl_warning): Add missing space.
1507
7f5a7d78
MP
15082017-03-03 Marek Polacek <polacek@redhat.com>
1509
1510 PR c/79758
1511 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1512 current_function_prototype_arg_types is error_mark_node. Fix
1513 formatting. Use TREE_VALUE instead of TREE_TYPE.
1514
883c8f06
JJ
15152017-03-03 Jakub Jelinek <jakub@redhat.com>
1516
79c9b7a8
JJ
1517 PR c/79837
1518 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1519 %<min%> or %<max%> in the diagnostics, instead mention identifier.
1520 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1521 diagnostics.
1522
883c8f06
JJ
1523 PR c/79836
1524 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1525 instead of %<_Generic>.
1526 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1527 (c_parser_omp_target_exit_data): Use %<release%> instead of
1528 %<release>.
1529
324ff1a0
JJ
15302017-02-28 Jakub Jelinek <jakub@redhat.com>
1531
1532 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1533 instead of just cond ? "..." : "...".
1534 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1535 for "enter"/"exit" keyword.
1536 (c_finish_oacc_routine): Don't use %s to supply portions of the
1537 message.
1538
4227c9ad
JJ
15392017-02-24 Jakub Jelinek <jakub@redhat.com>
1540
1541 PR c++/79588
1542 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1543 handle -Wrestrict here.
1544 * c-typeck.c (build_function_call_vec): Adjust
1545 check_function_arguments caller.
1546
5d972e66
RB
15472017-02-23 Richard Biener <rguenther@suse.de>
1548
1549 PR c/79684
1550 * gimple-parser.c (c_parser_gimple_statement): Use set_error
1551 to initialize c_exprs to return.
1552 (c_parser_gimple_binary_expression): Likewise.
1553 (c_parser_gimple_unary_expression): Likewise.
1554 (c_parser_gimple_postfix_expression): Likewise.
1555
61ac5ebe
MP
15562017-02-22 Marek Polacek <polacek@redhat.com>
1557
1558 PR c/79662
1559 * c-typeck.c (convert_arguments): Handle error_mark_node.
1560
41d1b0b1
PK
15612017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1562
1563 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1564 value of c_parser_parse_ssa_name against error_mark_node and emit
1565 error if ssa name is anonymous and written as default definition.
1566
eab1f169
PK
15672017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1568
1569 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1570 FMA_EXPR.
1571
bcac0b4d
JJ
15722017-02-16 Jakub Jelinek <jakub@redhat.com>
1573
1574 PR c++/79512
1575 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1576 ignore #pragma omp target even when not followed by identifier.
1577
1be33173
PK
15782017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1579
1580 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1581 (c_parser_gimple_unary_expression): Likewise.
1582
aa326bfb
JJ
15832017-02-13 Jakub Jelinek <jakub@redhat.com>
1584
1585 * c-parser.c (c_parser_oacc_declare): Add missing space in
1586 diagnostics.
1587
8a398bc5
PK
15882017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1589
1590 PR c/79478
1591 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1592 set_c_expr_source_range when parsing ssa-name.
1593
3dcde5ef
PG
15942017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
1595 Richard Biener <rguenther@suse.de>
1596
1597 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1598 building IL when arguments are error_mark_node.
1599 (c_parser_gimple_unary_expression): Likewise.
1600 (c_parser_gimple_if_stmt): Likewise.
1601 (c_parser_gimple_switch_stmt): Likewise.
1602 (c_parser_gimple_return_stmt): Likewise.
1603 (c_parser_parse_ssa_name): When name lookup fails do not build
1604 an SSA name. Use undeclared rather than not declared in error
1605 reporting.
1606
192b048b
MP
16072017-02-09 Marek Polacek <polacek@redhat.com>
1608
1609 PR c/79428
1610 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1611 instead of c_parser_skip_until_found.
1612
56f71478
JJ
16132017-02-09 Jakub Jelinek <jakub@redhat.com>
1614
1615 PR c/79431
1616 * c-parser.c (c_parser_omp_declare_target): Don't invoke
1617 symtab_node::get on automatic variables.
1618
02889d23
CLT
16192016-02-09 Nathan Sidwell <nathan@codesourcery.com>
1620 Chung-Lin Tang <cltang@codesourcery.com>
1621
1622 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1623 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1624 semantic checking.
1625 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1626
7af4b20d
RB
16272017-02-07 Richard Biener <rguenther@suse.de>
1628
1629 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1630 (c_parser_gimple_postfix_expression_after_primary):
1631 Do not use c_build_function_call_vec to avoid folding and promotion.
1632 Simplify.
1633
e5e391d6
MO
16342017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1635
1636 PR lto/79061
1637 * c-decl.c (pop_scope): Pass main_input_filename to
1638 build_translation_unit_decl.
1639
c2e84327
DM
16402017-01-24 David Malcolm <dmalcolm@redhat.com>
1641
1642 * c-parser.c: Include "read-rtl-function.h" and
1643 "run-rtl-passes.h".
1644 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
1645 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
1646 production. Update for renaming of field "gimple_pass" to
1647 "gimple_or_rtl_pass". If __RTL was seen, call
1648 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
1649 to an auto_timevar, to cope with early exit.
1650 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1651 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1652 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1653 Handle RID_RTL.
1654 (c_parser_parse_rtl_body): New function.
1655 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1656 (struct c_declspecs): Rename field "gimple_pass" to
1657 "gimple_or_rtl_pass". Add field "rtl_p".
1658 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1659 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1660 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1661 (c_parser_gimple_or_rtl_pass_list): ...this.
1662
2ebd93e1
MP
16632017-01-20 Marek Polacek <polacek@redhat.com>
1664
1665 PR c/64279
1666 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1667
b1c95bb5
RB
16682017-01-13 Richard Biener <rguenther@suse.de>
1669
1670 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1671 nops.
1672
25329913
RB
16732017-01-13 Richard Biener <rguenther@suse.de>
1674
1675 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1676 _Literal ( type-name ) number.
1677
6bb4ea5c
RB
16782017-01-12 Richard Biener <rguenther@suse.de>
1679
1680 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1681 __MEM.
1682
6b5b4e9c
JJ
16832017-01-11 Jakub Jelinek <jakub@redhat.com>
1684
1685 PR c++/72813
1686 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
1687 PCH file.
1688
e3252775
RB
16892017-01-11 Richard Biener <rguenther@suse.de>
1690
1691 PR bootstrap/79052
1692 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
1693 returns on parse errors.
1694
a9342885
MP
16952017-01-04 Marek Polacek <polacek@redhat.com>
1696
1697 PR c++/64767
1698 * c-parser.c (c_parser_postfix_expression): Mark zero character
1699 constants by setting original_type in c_expr.
1700 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
1701 with a zero character constant.
1702 (char_type_p): New function.
1703
5dd9a9d0
DM
17042017-01-04 David Malcolm <dmalcolm@redhat.com>
1705
1706 * c-parser.c (c_parser_declaration_or_fndef): Create a
1707 rich_location at init_loc and parse it to start_init.
1708 (last_init_list_comma): New global.
1709 (c_parser_braced_init): Update last_init_list_comma when parsing
1710 commas. Pass it to pop_init_level. Pass location of closing
1711 brace to pop_init_level.
1712 (c_parser_postfix_expression_after_paren_type): Create a
1713 rich_location at type_loc and parse it to start_init.
1714 (c_parser_omp_declare_reduction): Likewise for loc.
1715 * c-tree.h (start_init): Add rich_location * param.
1716 (pop_init_level): Add location_t param.
1717 * c-typeck.c (struct initializer_stack): Add field
1718 "missing_brace_richloc".
1719 (start_init): Add richloc param, use it to initialize
1720 the stack node's missing_brace_richloc.
1721 (last_init_list_comma): New decl.
1722 (finish_implicit_inits): Pass last_init_list_comma to
1723 pop_init_level.
1724 (push_init_level): When finding missing open braces, add fix-it
1725 hints to the richloc.
1726 (pop_init_level): Add "insert_before" param and pass it
1727 when calling pop_init_level. Add fixits about missing
1728 close braces to any richloc. Use the richloc for the
1729 -Wmissing-braces warning.
1730 (set_designator): Pass last_init_list_comma to pop_init_level.
1731 (process_init_element): Likewise.
1732
cbe34bb5
JJ
17332017-01-01 Jakub Jelinek <jakub@redhat.com>
1734
1735 Update copyright years.
1736
d17680f3
JJ
17372016-12-21 Jakub Jelinek <jakub@redhat.com>
1738
0dba7960
JJ
1739 PR bootstrap/78817
1740 * c-typeck.c (build_function_call_vec): If check_function_arguments
1741 returns true, set TREE_NO_WARNING on CALL_EXPR.
1742
d17680f3
JJ
1743 PR c/77767
1744 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
1745 to *expr instead of overwriting it.
1746
aa90531e
RB
17472016-12-20 Richard Biener <rguenther@suse.de>
1748
1749 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
1750 error recovery.
1751 (c_parser_gimple_statement): Only build assigns for non-error
1752 stmts.
1753 (c_parser_gimple_postfix_expression_after): Improve error recovery.
1754
629b3d75
MJ
17552016-12-14 Martin Jambor <mjambor@suse.cz>
1756
1757 * c-parser.c: Include omp-general.h and omp-offload.h instead of
1758 omp-low.h.
1759 (c_finish_oacc_routine): Adjusted call to
1760 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
1761 to use their new names.
1762 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
1763 use its new name.
1764 (c_parser_oacc_update): Likewise.
1765 (c_parser_omp_simd): Likewise.
1766 (c_parser_omp_target_update): Likewise.
1767 * c-typeck.c: Include omp-general.h instead of omp-low.h.
1768 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
1769 name.
1770 (c_finish_omp_cancellation_point): Likewise.
1771 * gimple-parser.c: Do not include omp-low.h
1772
c5af52eb
CP
17732016-12-02 Cesar Philippidis <cesar@codesourcery.com>
1774 James Norris <jnorris@codesourcery.com>
1775
1776 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
1777 EXIT_DATA,WAIT} are not used in compound statements.
1778 (c_parser_oacc_enter_exit_data): Update diagnostics.
1779
48330c93
BE
17802016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1781
1782 PR c++/71973
1783 * c-decl.c (diagnose_mismatched_decls): Use
1784 OPT_Wbuiltin_declaration_mismatch here too.
1785
899ca90e 17862016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
1787 Alan Hayward <alan.hayward@arm.com>
1788 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
1789
1790 * c-decl.c (merge_decls): Use SET_DECL_MODE.
1791 (make_label, finish_struct): Likewise.
1792
1ee62b92 17932016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 1794 Richard Biener <rguenther@suse.de>
22b15758 1795
8e745a17
JJ
1796 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
1797 * config-lang.in (gtfiles): Add c/c-parser.h.
1798 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
1799 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
1800 * c-parser.c (enum c_id_kind, struct c_token,
1801 c_parser_next_token_is, c_parser_next_token_is_not,
1802 c_parser_next_token_is_keyword,
1803 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
1804 Split out to ...
1805 * c-parser.h: ... new header.
1806 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 1807 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
1808 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1809 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1810 c_parser_error, c_parser_require, c_parser_skip_until_found,
1811 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1812 c_parser_type_name): Export.
1813 (c_parser_tokens_buf): New function.
1814 (c_parser_error): Likewise.
1815 (c_parser_set_error): Likewise.
1816 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
1817 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
1818 via c_parser_parse_gimple_body.
8e745a17
JJ
1819 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
1820 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1821 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1822 c_parser_error, c_parser_require, c_parser_skip_until_found,
1823 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1824 c_parser_type_name): Declare.
1ee62b92
PG
1825 (struct c_parser): Declare forward.
1826 (c_parser_tokens_buf): Declare.
8e745a17
JJ
1827 (c_parser_error): Likewise.
1828 (c_parser_set_error): Likewise.
1829 * gimple-parser.c: New file.
1830 * gimple-parser.h: Likewise.
1ee62b92 1831
22b15758
UB
18322016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1833
1834 PR c/35503
1835 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1836 warn_for_restrict.
1837
84ff4775
LCW
18382016-09-11 Le-Chun Wu <lcwu@google.com>
1839 Mark Wielaard <mjw@redhat.com>
1840
1841 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
1842 to the given -Wshadow= variant.
1843
4d0cdd0c
TP
18442016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
1845
1846 * c-typeck.c: Include memmodel.h.
1847
1202f33e
JJ
18482016-10-13 Jakub Jelinek <jakub@redhat.com>
1849
1850 PR target/77957
1851 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
1852 instead of lhd_return_null_tree_v.
1853
8a14afd0
BS
18542016-10-07 Bernd Schmidt <bschmidt@redhat.com>
1855
1856 PR c++/69733
1857 * c-decl.c (smallest_type_quals_location): New static function.
1858 (grokdeclarator): Try to find the correct location for an ignored
1859 qualifier.
1860
81fea426
MP
18612016-09-26 Marek Polacek <polacek@redhat.com>
1862
1863 PR c/7652
1864 * c-decl.c (pop_scope): Add gcc_fallthrough.
1865
18662016-09-26 Marek Polacek <polacek@redhat.com>
1867
1868 PR c/7652
1869 * c-parser.c (struct c_token): Add flags field.
1870 (c_lex_one_token): Pass it to c_lex_with_flags.
1871 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
1872 into IFN_FALLTHROUGH.
1873 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
1874 attribute fallthrough after a case label or default label.
1875 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
1876
9a2300e9
MP
18772016-09-24 Marek Polacek <polacek@redhat.com>
1878
1879 PR c/77490
1880 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
1881 have boolean value. Warn about ++/-- on booleans.
1882
7de76362
JJ
18832016-09-23 Jakub Jelinek <jakub@redhat.com>
1884
1885 * c-parser.c (incomplete_record_decls): Remove unnecessary
1886 = vNULL initialization of file scope vec.
1887
5b73d2ab
MP
18882016-09-16 Marek Polacek <polacek@redhat.com>
1889
1890 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
1891
e51fbec3
MP
18922016-09-14 Marek Polacek <polacek@redhat.com>
1893
1894 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
1895 (fix_array_notation_expr): Likewise.
1896 * c-decl.c (finish_decl): Likewise.
1897 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1898 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
1899 (function_to_pointer_conversion): Use false instead of 0.
1900 (convert_lvalue_to_rvalue): Likewise.
1901 (parser_build_unary_op): Likewise.
1902 (build_atomic_assign): Likewise.
1903 (build_unary_op): Change nonconvert parameter type to bool, use
1904 true/false instead of 1/0.
1905 (build_binary_op): Use true instead of 1.
1906
254830ba
DM
19072016-09-13 David Malcolm <dmalcolm@redhat.com>
1908
1909 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
1910 of add_fixit_insert to add_fixit_insert_before.
1911
4c13ba17
MP
19122016-09-13 Marek Polacek <polacek@redhat.com>
1913
1914 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
1915 it.
1916
54dcdb88
BE
19172016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
1918
1919 PR c++/77496
1920 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
1921 COMPOUND_EXPR to warn_for_omitted_condop.
1922
e5106e27
DM
19232016-09-07 David Malcolm <dmalcolm@redhat.com>
1924
1925 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
1926 c_get_substring_location for this new langhook.
1927
9dc5773f
JJ
19282016-09-02 Jakub Jelinek <jakub@redhat.com>
1929
1930 PR c/65467
1931 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
1932 flag_openmp.
1933 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
1934 instead of mark_exp_read on low_bound/length expression.
1935 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
1936 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1937 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1938 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
1939 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
1940 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
1941 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
1942 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
1943 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
1944 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
1945 instead of mark_expr_read.
1946 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
1947 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1948 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
1949 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
1950 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
1951 array section bases outside of depend clause, for depend clause
1952 use convert_lvalue_to_rvalue on the base.
1953 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
1954 linear, aligned, map, to and from clauses.
1955 (c_omp_clause_copy_ctor): New function.
1956
295844f6
MP
19572016-09-01 Marek Polacek <polacek@redhat.com>
1958
1959 PR c/7652
1960 * c-typeck.c (composite_type): Add FALLTHRU comment.
1961
089af25c
DM
19622016-08-31 David Malcolm <dmalcolm@redhat.com>
1963
1964 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
1965 to the insertion fixits for "struct", "union", and "enum".
1966
f9087798
DM
19672016-08-30 David Malcolm <dmalcolm@redhat.com>
1968
1969 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
1970 rather than add_fixit_misspelled_id.
1971 (undeclared_variable): Likewise.
1972 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
1973 now-redundant "here" params from add_fixit_insert method calls.
1974 (c_parser_parameter_declaration): Likewise.
1975 * c-typeck.c (build_component_ref): Remove now-redundant range
1976 param from add_fixit_replace method calls.
1977
ebef225f
MP
19782016-08-25 Marek Polacek <polacek@redhat.com>
1979
1980 * c-typeck.c (parser_build_binary_op): Pass LHS to
1981 warn_logical_not_parentheses.
1982
fe377a48
MP
19832016-08-25 Marek Polacek <polacek@redhat.com>
1984
1985 PR c/77323
1986 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
1987 or _FloatN or _FloatNx is not supported.
1988 (finish_declspecs): Set type to integer_type_node when _FloatN or
1989 _FloatNx is not supported.
1990
c65699ef
JM
19912016-08-19 Joseph Myers <joseph@codesourcery.com>
1992
1993 PR c/32187
1994 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
1995 (struct c_declspecs): Add field floatn_nx_idx.
1996 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
1997 and _FloatNx type specifiers.
1998 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
1999 (c_parser_declspecs, c_parser_attribute_any_word)
2000 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
2001 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
2002 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
2003 narrower than double.
2004
2f1364c2
JJ
20052016-08-12 Jakub Jelinek <jakub@redhat.com>
2006 Martin Liska <mliska@suse.cz>
2007
2008 PR c/67410
2009 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
2010 % to determine val element to change. Assert that
2011 wchar_bytes * charwidth fits into val array.
2012
191816a3
MP
20132016-08-12 Marek Polacek <polacek@redhat.com>
2014
2015 PR c/7652
2016 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
2017 (c_parser_postfix_expression): Likewise.
2018 * c-typeck.c (build_unary_op): Adjust fall through comment.
2019 (c_mark_addressable): Likewise.
2020
b95a64bb
JJ
20212016-08-11 Jakub Jelinek <jakub@redhat.com>
2022
2023 PR c/72816
2024 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
2025 array member through typedef, for orig_qual_indirect == 0 clear
2026 orig_qual_type.
2027
895aa8e1
DM
20282016-08-08 David Malcolm <dmalcolm@redhat.com>
2029
2030 PR c/64955
2031 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
2032 this up to selftest::run_c_tests.
2033 (selftest::run_c_tests): New function.
2034
0b212d8c
TS
20352016-08-04 Thomas Schwinge <thomas@codesourcery.com>
2036
ae9281fc
TS
2037 * c-parser.c (struct oacc_routine_data): Add error_seen and
2038 fndecl_seen members.
2039 (c_finish_oacc_routine): Use these.
2040 (c_parser_declaration_or_fndef): Adjust.
2041 (c_parser_oacc_routine): Likewise. Support more C language
2042 constructs, and improve diagnostics. Move pragma context
2043 checking...
2044 (c_parser_pragma): ... here.
2045
0b212d8c
TS
2046 * c-parser.c (struct oacc_routine_data): New.
2047 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
2048 Simplify code.
2049 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
2050 declare target" attribute.
2051
76e2c821
JB
20522016-08-01 Jan Beulich <jbeulich@suse.com>
2053
2054 * c-fold.c (c_fully_fold_internal): Also emit shift count
2055 warnings for vector types.
2056 * c-typeck.c (build_binary_op): Likewise.
2057
f618a472
MP
20582016-07-29 Marek Polacek <polacek@redhat.com>
2059
2060 PR c/71742
2061 * c-decl.c (finish_struct): Rephrase an error message.
2062
efd0786f
MP
2063 PR c/71853
2064 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
2065 to error node for invalid code.
2066
e00dceaf
MP
2067 PR c/71573
2068 * c-decl.c (implicitly_declare): Return decl early not only for
2069 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
2070
673a107a
JJ
20712016-07-29 Jakub Jelinek <jakub@redhat.com>
2072
2073 PR c/71969
2074 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
2075 on GNU extern inline functions.
2076
a5b5c8b6
MP
20772016-07-29 Marek Polacek <polacek@redhat.com>
2078
2079 PR c/71583
2080 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
2081 check expr.value.
2082
e3fe09c1
UB
20832016-07-22 Uros Bizjak <ubizjak@gmail.com>
2084
2085 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
2086
7c8f7eaa
DM
20872016-07-20 David Malcolm <dmalcolm@redhat.com>
2088
2089 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
2090 spellcheck-tree.h
2091 (best_macro_match): Likewise, converting from a typedef to a
2092 subclass.
2093 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
2094 (lookup_name_fuzzy): Update for change of best_macro_match to a
2095 subclass with a ctor that calls cpp_forall_identifiers.
2096
de6a69ee
DM
20972016-07-20 David Malcolm <dmalcolm@redhat.com>
2098
2099 * c-decl.c (implicit_decl_warning): Update for conversion of
2100 return type of lookup_name_fuzzy to const char *.
2101 (undeclared_variable): Likewise.
2102 (lookup_name_fuzzy): Convert return type from tree to
2103 const char *.
2104 * c-parser.c (c_parser_declaration_or_fndef): Update for
2105 conversion of return type of lookup_name_fuzzy to const char *.
2106 (c_parser_parameter_declaration): Likewise.
2107
b1c9c068
CP
21082016-07-15 Cesar Philippidis <cesar@codesourcery.com>
2109
2110 * c-parser.c (c_parser_oacc_declare): Don't scan for
2111 GOMP_MAP_POINTER.
2112 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
2113 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
2114 zero-length subarrays.
2115
ddbbcb19
JJ
21162016-07-15 Jakub Jelinek <jakub@redhat.com>
2117
2118 PR c/71858
2119 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
2120 instead of FUZZY_LOOKUP_NAME.
2121 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
2122 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
2123
dd36b877
JJ
21242016-07-14 Jakub Jelinek <jakub@redhat.com>
2125
2126 PR c/71858
2127 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
2128
8c681247
TS
21292016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2130
2131 * c-parser.c (c_parser_generic_selection): Make type of variable
2132 auto_vec.
2133 (c_parser_omp_declare_simd): Likewise.
2134
bf4fa671
TS
21352016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2136
2137 * c-decl.c (struct c_struct_parse_info): Change member types
2138 from vec to auto_vec.
2139 (start_struct): Adjust.
2140 (finish_struct): Likewise.
2141
557e8c49
JJ
21422016-07-02 Jakub Jelinek <jakub@redhat.com>
2143
2144 PR c/71719
2145 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
2146
54d19c3b
TS
21472016-06-29 Thomas Schwinge <thomas@codesourcery.com>
2148
2149 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
2150 Move pragma context checking into...
2151 (c_parser_omp_cancellation_point): ... here, and improve
2152 diagnostic messages.
2153 * c-typeck.c (c_finish_omp_cancel)
2154 (c_finish_omp_cancellation_point): Improve diagnostic messages.
2155
152ef731
JJ
21562016-06-29 Jakub Jelinek <jakub@redhat.com>
2157
2158 PR c/71685
2159 * c-typeck.c (c_build_qualified_type): Don't clear
2160 C_TYPE_INCOMPLETE_VARS for the main variant.
2161
21622016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
2163
2164 PR c/71552
2165 * c-typeck.c (output_init_element): Diagnose incompatible types
2166 before non-constant initializers.
2167
e9ac1f86
JJ
21682016-06-28 Jakub Jelinek <jakub@redhat.com>
2169
2170 * Make-lang.in: Don't cat ../stage_current if it does not exist.
2171
277d7ee0
AK
21722016-06-23 Andi Kleen <ak@linux.intel.com>
2173
2174 * Make-lang.in: Add support for autofdo.
2175
1a4f11c8
DM
21762016-06-22 David Malcolm <dmalcolm@redhat.com>
2177
2178 PR c/70339
2179 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
2180 (implicit_decl_warning): When issuing warnings for implicit
2181 declarations, attempt to provide a suggestion via
2182 lookup_name_fuzzy.
2183 (undeclared_variable): Likewise when issuing errors.
2184 (lookup_name_in_scope): Likewise.
2185 (struct edit_distance_traits<cpp_hashnode *>): New struct.
2186 (best_macro_match): New typedef.
2187 (find_closest_macro_cpp_cb): New function.
2188 (lookup_name_fuzzy): New function.
2189 * c-parser.c: Include gcc-rich-location.h.
2190 (c_token_starts_typename): Split out case CPP_KEYWORD into...
2191 (c_keyword_starts_typename): ...this new function.
2192 (c_parser_declaration_or_fndef): When issuing errors about
2193 missing "struct" etc, add a fixit. For other kinds of errors,
2194 attempt to provide a suggestion via lookup_name_fuzzy.
2195 (c_parser_parms_declarator): When looking ahead to detect typos in
2196 type names, also reject CPP_KEYWORD.
2197 (c_parser_parameter_declaration): When issuing errors about
2198 unknown type names, attempt to provide a suggestion via
2199 lookup_name_fuzzy.
2200 * c-tree.h (c_keyword_starts_typename): New prototype.
2201
5a578671
JM
22022016-06-20 Joseph Myers <joseph@codesourcery.com>
2203
2204 PR c/71601
2205 * c-typeck.c (build_conditional_expr): Return error_mark_node if
2206 c_common_type returns error_mark_node.
2207
3f8257db 22082016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
2209
2210 PR c/69507
2211 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
2212 __alignof__ (expression).
2213
6a3f203c
DM
22142016-06-14 David Malcolm <dmalcolm@redhat.com>
2215
2216 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
2217
264757fb
DM
22182016-06-14 David Malcolm <dmalcolm@redhat.com>
2219
2220 * c-typeck.c (build_component_ref): Simplify fixit code by
2221 using gcc_rich_location::add_fixit_misspelled_id.
2222 (set_init_label): Likewise.
2223
f7e4f2e3
DM
22242016-06-13 David Malcolm <dmalcolm@redhat.com>
2225
2226 * c-parser.c (c_parser_initelt): Provide location of name for new
2227 location_t param of set_init_label.
2228 * c-tree.h (set_init_label): Add location_t param.
2229 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
2230 param and use it when issuing error messages about unrecognized
2231 field names. Attempt to provide a fixit hint if appropriate,
2232 otherwise update the error message to provide the type name.
2233
4b1ffdb1
TS
22342016-06-10 Thomas Schwinge <thomas@codesourcery.com>
2235
2236 PR c/71381
2237 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
2238 Loosen checking.
2239
44a845ca
MS
22402016-06-08 Martin Sebor <msebor@redhat.com>
2241 Jakub Jelinek <jakub@redhat.com>
2242
2243 PR c++/70507
2244 PR c/68120
2245 * c-typeck.c (convert_arguments): Don't promote last argument
2246 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2247
92a5f2ba
MP
22482016-06-08 Marek Polacek <polacek@redhat.com>
2249
2250 PR c/71418
2251 * c-decl.c (grokdeclarator): Check TYPE_P.
2252
08203f73
MP
2253 PR c/71426
2254 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
2255 code.
2256
6ffd47b7
DM
22572016-06-07 David Malcolm <dmalcolm@redhat.com>
2258
2259 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
2260 and structure element reference, capture the location of the
2261 element name token and pass it to build_component_ref.
2262 (c_parser_postfix_expression_after_primary): Likewise for
2263 structure element dereference.
2264 (c_parser_omp_variable_list): Likewise for
2265 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
2266 * c-tree.h (build_component_ref): Add location_t param.
2267 * c-typeck.c (build_component_ref): Add location_t param
2268 COMPONENT_LOC. Use it, if available, when issuing hints about
2269 mispelled member names to provide a fixit replacement hint.
2270
1f40cff3
MP
22712016-06-06 Marek Polacek <polacek@redhat.com>
2272
2273 PR c/71362
2274 * c-parser.c (c_parser_direct_declarator): Set location.
2275
5545a907
MP
22762016-06-06 Marek Polacek <polacek@redhat.com>
2277
2278 * c-typeck.c (comptypes_internal): Handle comparisons of
2279 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
2280 TYPE_REF_CAN_ALIAS_ALL.
2281
b605f663
CLT
22822016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
2283
2284 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
2285 arguments as addressable when async clause exists.
2286
00631022
JJ
22872016-05-30 Jakub Jelinek <jakub@redhat.com>
2288
2289 PR c++/71349
2290 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
2291 when combined with target construct.
2292
7211a097
JJ
22932016-05-26 Jakub Jelinek <jakub@redhat.com>
2294
2295 * c-parser.c (c_parser_omp_clause_schedule): Warn if
2296 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
2297
95efe6b6
MP
22982016-05-25 Marek Polacek <polacek@redhat.com>
2299
2300 PR c/71265
2301 * c-decl.c (c_make_fname_decl): Don't check seen_error.
2302
a23faf7a
MP
2303 PR c/71266
2304 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
2305
e46c7770
CP
23062016-05-24 Cesar Philippidis <cesar@codesourcery.com>
2307
2308 * c-parser.c (c_parser_oacc_declare): Add support for
2309 GOMP_MAP_FIRSTPRIVATE_POINTER.
2310 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
2311 argument with enum c_omp_region_type ort.
2312 (handle_omp_array_sections): Likewise. Update call to
2313 handle_omp_array_sections_1.
2314 (c_finish_omp_clauses): Add specific errors and warning messages for
2315 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
2316 call to handle_omp_array_sections.
2317
a04e69c0
TS
23182016-05-24 Thomas Schwinge <thomas@codesourcery.com>
2319
2320 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
2321
f17a223d
RB
23222016-05-24 Richard Biener <rguenther@suse.de>
2323
2324 PR middle-end/70434
2325 PR c/69504
2326 * c-typeck.c (build_array_ref): Do not complain about indexing
2327 non-lvalue vectors. Adjust for function name change.
2328
79063edd
MS
23292016-05-20 Martin Sebor <msebor@redhat.com>
2330
2331 PR c/71115
2332 * c-typeck.c (error_init): Use
2333 expansion_point_location_if_in_system_header.
2334 (warning_init): Same.
2335
8a40fef3
DM
23362016-05-19 David Malcolm <dmalcolm@redhat.com>
2337
2338 PR c/71171
2339 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
2340 in error-handling.
2341 (c_parser_postfix_expression): Likewise.
2342 * c-tree.h (c_expr::set_error): New method.
2343 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
2344 that result's range is initialized.
2345
e9892350
JG
23462016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
2347
2348 * c-typeck.c (parser_build_unary_op): Fix formatting.
2349
8fad45f5
MW
23502016-05-16 Matthew Wahab <matthew.wahab@arm.com>
2351
2352 * c-decl.c (grokdeclarator): Remove errmsg and use of
2353 targetm.invalid_return_type.
2354 (grokparms): Remove errmsg and use of
2355 targetm.invalid_parameter_type.
2356
aa4b467b
JM
23572016-05-13 Joseph Myers <joseph@codesourcery.com>
2358
2359 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2360 function return type.
2361
4f2e1536
MP
23622016-05-12 Marek Polacek <polacek@redhat.com>
2363
2364 PR c/70756
2365 * c-decl.c (build_compound_literal): Pass LOC down to
2366 c_incomplete_type_error.
2367 * c-tree.h (require_complete_type): Adjust declaration.
2368 (c_incomplete_type_error): Likewise.
2369 * c-typeck.c (require_complete_type): Add location parameter, pass it
2370 down to c_incomplete_type_error.
2371 (c_incomplete_type_error): Add location parameter, pass it down to
2372 error_at.
2373 (build_component_ref): Pass location down to c_incomplete_type_error.
2374 (default_conversion): Pass location down to require_complete_type.
2375 (build_array_ref): Likewise.
2376 (build_function_call_vec): Likewise.
2377 (convert_arguments): Likewise.
2378 (build_unary_op): Likewise.
2379 (build_c_cast): Likewise.
2380 (build_modify_expr): Likewise.
2381 (convert_for_assignment): Likewise.
2382 (c_finish_omp_clauses): Likewise.
2383
d6e83a8d
MM
23842016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2385
2386 PR c/43651
2387 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
2388 is enabled.
2389 * c-errors.c (pedwarn_c90): Return true if warned.
2390 * c-tree.h (pedwarn_c90): Change return type to bool.
2391 (enum c_declspec_word): Add new enumerator cdw_atomic.
2392
5c3a10fb
MP
23932016-05-11 Marek Polacek <polacek@redhat.com>
2394
2395 PR c++/71024
2396 * c-decl.c (diagnose_mismatched_decls): Factor out code to
2397 diagnose_mismatched_attributes and call it.
2398
cf68d92c
MP
23992016-05-10 Marek Polacek <polacek@redhat.com>
2400
2401 PR c/70255
2402 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2403 on a declaration following the definition.
2404
351f85c5
JJ
24052016-05-05 Jakub Jelinek <jakub@redhat.com>
2406
2407 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2408 parse it through to c_parser_c99_block_statement.
2409 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2410 caller.
2411
deef7113
MP
24122016-05-04 Marek Polacek <polacek@redhat.com>
2413
2414 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2415 OPT_Wdangling_else.
2416
de55efd5
MP
24172016-05-04 Marek Polacek <polacek@redhat.com>
2418
2419 PR c/48778
2420 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2421 for macro expansions.
2422
79ce98bc
MP
24232016-05-03 Marek Polacek <polacek@redhat.com>
2424
2425 PR c/70859
2426 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
2427 check_builtin_function_arguments.
2428
fb2647aa
RB
24292016-05-03 Richard Biener <rguenther@suse.de>
2430
2431 * Make-lang.in (cc1-checksum.c): For stage-final re-use
2432 the checksum from the previous stage.
2433
77886428
CP
24342016-05-02 Cesar Philippidis <cesar@codesourcery.com>
2435
2436 * c-parser.c (c_parser_oacc_all_clauses): Update call to
2437 c_finish_omp_clauses.
2438 (c_parser_omp_all_clauses): Likewise.
2439 (c_parser_oacc_cache): Likewise.
2440 (c_parser_oacc_loop): Likewise.
2441 (omp_split_clauses): Likewise.
2442 (c_parser_omp_declare_target): Likewise.
2443 (c_parser_cilk_all_clauses): Likewise.
2444 (c_parser_cilk_for): Likewise.
2445 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
2446 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2447
7176a4a0
MP
24482016-05-02 Marek Polacek <polacek@redhat.com>
2449
2450 PR c/70851
2451 * c-decl.c (grokdeclarator): Diagnose when array's size has an
2452 incomplete type.
2453
e7ff0319
CP
24542016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2455
2456 PR middle-end/70626
2457 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
2458 OACC_LOOP_CLAUSE_MASK.
2459 (c_parser_oacc_kernels_parallel): Update call to
2460 c_oacc_split_loop_clauses.
2461
9f405ce1
AM
24622016-04-28 Andrew MacLeod <amacleod@redhat.com>
2463
2464 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
2465 argument to build_modify_expr in two cases.
2466
c1e1f433
BS
24672016-04-27 Bernd Schmidt <bschmidt@redhat.com>
2468
2469 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2470 warn_for_memset instead of warning directly here.
2471
2448a956
MP
24722016-04-26 Marek Polacek <polacek@redhat.com>
2473
2474 PR c/67784
2475 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2476 out of ...
2477 (c_parser_for_statement): ... here.
2478 (c_parser_if_statement): Use it.
2479 (c_parser_switch_statement): Use it.
2480 (c_parser_while_statement): Use it.
2481
b02a5e26
MP
2482 PR c/70791
2483 * c-decl.c (pushdecl): Pass LOCUS down to warning.
2484
477d4906
IV
24852016-04-20 Ilya Verbin <ilya.verbin@intel.com>
2486
2487 PR c++/69363
2488 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2489 instead of c_finish_cilk_clauses.
2490 * c-tree.h (c_finish_omp_clauses): Add new default argument.
2491 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
2492 floating-point variables in the linear clause for Cilk Plus.
2493
fe37c7af
MM
24942016-04-18 Michael Matz <matz@suse.de>
2495
2496 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2497 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2498
949505a9
MP
24992016-04-15 Marek Polacek <polacek@redhat.com>
2500
2501 PR c/70671
2502 * c-typeck.c (build_unary_op): Pass location down to error and
2503 warning call.
2504
dda1bf61
JJ
25052016-04-15 Jakub Jelinek <jakub@redhat.com>
2506
2507 PR c/70436
2508 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2509 where needed.
2510 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2511 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2512 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2513 Adjust c_parser_pragma callers.
2514 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
2515 caller.
2516 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2517 c_parser_statement.
2518 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2519 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2520 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2521 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2522 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2523 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2524 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2525 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2526 down where needed.
2527 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
2528 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2529 calls.
2530
99cd9857
MP
25312016-04-13 Marek Polacek <polacek@redhat.com>
2532
2533 PR c/70436
2534 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2535 adjust callers.
2536 (c_parser_statement): Likewise.
2537 (c_parser_c99_block_statement): Likewise.
2538 (c_parser_while_statement): Likewise.
2539 (c_parser_for_statement): Likewise.
2540 (c_parser_if_body): Don't set IF_P here.
2541 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
2542 about dangling else here.
2543 * c-tree.h (c_finish_if_stmt): Adjust declaration.
2544 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
2545 warn about dangling else here.
2546
f13355da
MP
25472016-04-04 Marek Polacek <polacek@redhat.com>
2548
2549 PR c/70307
2550 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2551
5fde6a45
MP
25522016-03-31 Marek Polacek <polacek@redhat.com>
2553
2554 PR c/70297
2555 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2556
4bbf545b
DM
25572016-03-18 David Malcolm <dmalcolm@redhat.com>
2558
2559 PR c/70281
2560 * c-parser.c (c_parser_postfix_expression): Set the source range
2561 for uses of "__builtin_types_compatible_p".
2562
fcc2b74f
JJ
25632016-03-17 Jakub Jelinek <jakub@redhat.com>
2564
2565 PR c/70280
2566 * c-typeck.c (composite_type): Don't count void_list_node
2567 into len, if the list is terminated by void_list_node, start
2568 with void_list_node instead of NULL for newargs. Stop
2569 at void_list_node.
2570
ab4c578f
MP
25712016-03-16 Marek Polacek <polacek@redhat.com>
2572
2573 PR c/70093
2574 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2575 nested functions returning VM types.
2576
96b3c82d
CP
25772016-03-09 Cesar Philippidis <cesar@codesourcery.com>
2578
2579 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2580 when calling c_finish_omp_clauses.
2581
29b9828f
BS
25822016-03-04 Bernd Schmidt <bschmidt@redhat.com>
2583
2584 PR c/69824
2585 * c-decl.c (get_parm_info): Don't queue implicit function declarations
2586 for later.
2587
7ff6ca38
MP
25882016-03-04 Marek Polacek <polacek@redhat.com>
2589
2590 PR c/69798
2591 * c-parser.c (c_parser_postfix_expression): Call
2592 c_parser_cast_expression rather than c_parser_postfix_expression.
2593
686e2237
JJ
25942016-03-01 Jakub Jelinek <jakub@redhat.com>
2595
2596 PR c/69796
2597 PR c/69974
2598 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2599 of incomplete decls to error_mark_node.
2600
0b05329b
MP
26012016-02-24 Marek Polacek <polacek@redhat.com>
2602
2603 PR c/69819
2604 * c-decl.c (finish_decl): Don't update the copy of the type of a
2605 different decl type.
2606
067fbd8b
JJ
26072016-02-23 Jakub Jelinek <jakub@redhat.com>
2608
2609 PR objc/69844
2610 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2611 in id_kind reclassification.
2612
bf14eba2
JJ
26132016-02-16 Jakub Jelinek <jakub@redhat.com>
2614
2615 PR c/69835
2616 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2617
ba539195
JN
26182016-02-16 James Norris <jnorris@codesourcery.com>
2619
2620 PR c/64748
2621 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2622
16595a1f
BS
26232016-02-12 Bernd Schmidt <bschmidt@redhat.com>
2624
f48dfe98
BS
2625 * c-decl.c (build_null_declspecs): Zero the entire struct.
2626
16595a1f
BS
2627 PR c/69522
2628 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
2629 callers changed. If nested_p is true, use it to call
2630 finish_implicit_inits.
2631 * c-tree.h (finish_implicit_inits): Declare.
2632 * c-typeck.c (finish_implicit_inits): New function. Move code
2633 from ...
2634 (push_init_level): ... here.
2635 (set_designator, process_init_element): Call finish_implicit_inits.
2636
66756373
JJ
26372016-02-11 Jakub Jelinek <jakub@redhat.com>
2638
2639 PR c/69768
2640 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
2641 arguments for -Waddress warning.
2642
1066e9b5
JJ
26432016-02-04 Jakub Jelinek <jakub@redhat.com>
2644
2645 PR c/69669
2646 * c-decl.c (finish_enum): When honoring mode attribute,
2647 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2648
3a5d2ba4
JJ
26492016-01-29 Jakub Jelinek <jakub@redhat.com>
2650
2651 PR debug/69518
2652 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2653 all type variants, not just TYPE_MAIN_VARIANT.
2654
cbdd8ae0
JJ
26552016-01-27 Jakub Jelinek <jakub@redhat.com>
2656
2657 PR debug/66869
2658 * c-decl.c (c_write_global_declarations_1): Warn with
2659 warn_unused_function if static prototype without definition
2660 is not C_DECL_USED.
2661
fa74a4bc
MP
26622016-01-27 Marek Polacek <polacek@redhat.com>
2663
2664 PR c/68062
2665 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2666 to unsigned, if needed. Add -Wsign-compare warning.
2667
13f92e8d
JJ
26682016-01-26 Jakub Jelinek <jakub@redhat.com>
2669
2670 PR tree-optimization/69483
2671 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2672
cd8e73dc 26732016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
2674
2675 PR c/24293
2676 * c-tree.h (incomplete_record_decls): Declare.
2677 * c-parser.c (incomplete_record_decls): Define.
2678 (c_parser_translation_unit): Iterate through incomplete_record_decls and
2679 report error if any decl has zero size.
2680 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
2681 or enum type to incomplete_record_decls.
2682
e6d6ec9e
TV
26832016-01-14 Tom de Vries <tom@codesourcery.com>
2684
2685 PR tree-optimization/68773
2686 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
2687 set force_output.
2688
00083992
MP
26892016-01-14 Marek Polacek <polacek@redhat.com>
2690
2691 PR c/69262
2692 * c-decl.c (grokdeclarator): Provide more information for invalid
2693 array declarations.
2694
7443cf13
DM
26952016-01-06 David Malcolm <dmalcolm@redhat.com>
2696
2697 * c-parser.c (c_parser_unary_expression): For dereferences, build
2698 a combined location before calling build_indirect_ref, so that
2699 error reports cover the full range, manually updating the c_expr
2700 src_range.
2701
6b131d5b
MP
27022016-01-06 Marek Polacek <polacek@redhat.com>
2703
2704 PR sanitizer/69099
2705 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
2706 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
2707 NULL.
2708
818ab71a
JJ
27092016-01-04 Jakub Jelinek <jakub@redhat.com>
2710
2711 Update copyright years.
2712
2fe0a208
MP
27132016-01-04 Marek Polacek <polacek@redhat.com>
2714
2715 PR c/68908
2716 * c-typeck.c (build_atomic_assign): Improve commentary. Add
2717 optimization to use __atomic_fetch_* built-in if possible.
2718
c7b48c8a
TS
27192015-12-23 Thomas Schwinge <thomas@codesourcery.com>
2720
2721 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
2722 into...
2723 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
2724 all users.
2725
fda5652f
MP
27262015-12-22 Marek Polacek <polacek@redhat.com>
2727
2728 PR c/69002
2729 * c-typeck.c (build_component_ref): Warn when acessing elements of
2730 atomic structures or unions.
2731
745e411d
DM
27322015-12-21 David Malcolm <dmalcolm@redhat.com>
2733
2734 * c-typeck.c: Include "gcc-rich-location.h".
2735 (build_binary_op): In the two places that call binary_op_error,
2736 create a gcc_rich_location and populate it with the location of
2737 the binary op and its two operands.
2738
94c40e19
DM
27392015-12-16 David Malcolm <dmalcolm@redhat.com>
2740
2741 * c-parser.c (c_parser_statement_after_labels): When calling
2742 c_finish_return, Use the return expression's location if it has
2743 one, falling back to the location of the first token within it.
2744 * c-typeck.c (c_finish_return): When issuing warnings about
2745 the incorrect presence/absence of a return value, issue a note
2746 showing the declaration of the function.
2747
de67c4c3
DM
27482015-12-16 David Malcolm <dmalcolm@redhat.com>
2749
2750 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
2751 to 4.
2752 (c_parser_peek_nth_token): New function.
2753 (c_parser_peek_conflict_marker): New function.
2754 (c_parser_error): Detect conflict markers and report them as such.
2755
a10704e1
DM
27562015-12-16 David Malcolm <dmalcolm@redhat.com>
2757
2758 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
2759 to preserve range information for the primary expression
2760 in the call to c_parser_postfix_expression_after_primary.
2761
8062bca6
DM
27622015-12-16 David Malcolm <dmalcolm@redhat.com>
2763
2764 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
2765 expression location, falling back on the first token location,
2766 rather than always using the latter.
2767
d06f8b75
MP
27682015-12-16 Marek Polacek <polacek@redhat.com>
2769
2770 PR c/64637
2771 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
2772 available.
2773
2994fb91
MP
27742015-12-15 Marek Polacek <polacek@redhat.com>
2775
2776 PR c/68907
2777 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
2778 artificial decl.
2779
a1b93f8d
DM
27802015-12-08 David Malcolm <dmalcolm@redhat.com>
2781
2782 * c-parser.c (c_parser_alignof_expression): Capture location of
2783 closing parenthesis (if any), or of end of unary expression, and
2784 use it to build a src_range for the expression.
2785
46c6e1e2
DM
27862015-12-08 David Malcolm <dmalcolm@redhat.com>
2787
2788 PR c/68757
2789 * c-parser.c (c_parser_get_builtin_args): Add
2790 "out_close_paren_loc" param, and write back to it.
2791 (c_parser_postfix_expression): Capture the closing
2792 parenthesis location for RID_CHOOSE_EXPR,
2793 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
2794 RID_BUILTIN_SHUFFLE and use it to set the source range
2795 for such expressions; within RID_BUILTIN_COMPLEX set
2796 the underlying location.
2797
66189108
MP
27982015-12-07 Marek Polacek <polacek@redhat.com>
2799
2800 PR c/68668
2801 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
2802 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
2803
f187980b
EB
28042015-12-04 Eric Botcazou <ebotcazou@adacore.com>
2805
2806 * c-tree.h (c_build_va_arg): Adjust prototype.
2807 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
2808 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
2809 parameter, adjust throughout and issue an error if EXPR is a component
2810 with reverse storage order.
2811
4250754e
JM
28122015-12-02 Jason Merrill <jason@redhat.com>
2813
2814 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
2815 (c_fully_fold_internal, decl_constant_value_for_optimization):
2816 Move from c-common.c.
2817 * c-tree.h: Declare decl_constant_value_for_optimization.
2818 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
2819
e9e32ee6
JM
28202015-12-02 Joseph Myers <joseph@codesourcery.com>
2821
2822 PR c/68162
2823 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
2824 following link from declarator to next declarator. Track original
2825 qualified type and pass it to c_build_qualified_type.
2826 * c-typeck.c (c_build_qualified_type): Add arguments
2827 orig_qual_type and orig_qual_indirect.
2828
ff7a55bf
TS
28292015-12-02 Thomas Schwinge <thomas@codesourcery.com>
2830
2831 * c-parser.c (c_parser_omp_clause_name)
2832 (c_parser_oacc_all_clauses): Alphabetical sorting.
2833
657e4e47
JJ
28342015-12-02 Jakub Jelinek <jakub@redhat.com>
2835
2836 PR c/68533
2837 * c-decl.c (get_parm_info): Use b->locus instead of input_location
2838 for diagnostics.
2839
37d5ad46
JB
28402015-12-01 Julian Brown <julian@codesourcery.com>
2841 Cesar Philippidis <cesar@codesourcery.com>
2842 James Norris <James_Norris@mentor.com>
2843
2844 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
2845 (c_parser_oacc_clause_use_device): New function.
2846 (c_parser_oacc_all_clauses): Add use_device support.
2847 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
2848 (c_parser_oacc_host_data): New function.
2849 (c_parser_omp_construct): Add host_data support.
2850 * c-tree.h (c_finish_oacc_host_data): Add prototype.
2851 * c-typeck.c (c_finish_oacc_host_data): New function.
2852 (c_finish_omp_clauses): Add use_device support.
2853
a4850ce9
JH
28542015-11-29 Jan Hubicka <hubicka@ucw.cz>
2855
2856 PR c/67106
2857 * c-decl.c: Set TYPE_PACKED in variants.
2858
b58d3df2
ML
28592015-11-27 Martin Liska <mliska@suse.cz>
2860
2861 PR c++/68312
2862 * c-array-notation.c (fix_builtin_array_notation_fn):
2863 Use release_vec_vec instead of vec::release.
2864 (build_array_notation_expr): Likewise.
2865 (fix_conditional_array_notations_1): Likewise.
2866 (fix_array_notation_expr): Likewise.
2867 (fix_array_notation_call_expr): Likewise.
2868
aec17bfe
JJ
28692015-11-27 Jakub Jelinek <jakub@redhat.com>
2870
2871 PR c/63326
2872 * c-parser.c (c_parser_compound_statement_nostart): If
2873 last_label is true, use pragma_stmt instead of pragma_compound
2874 as second c_parser_pragma argument.
2875 (c_parser_omp_ordered, c_parser_omp_target_update,
2876 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
2877 false as second argument to c_parser_skip_to_pragma_eol after
2878 diagnosing standalone directives used in pragma_stmt context.
2879
688c4de0
IV
28802015-11-24 Ilya Verbin <ilya.verbin@intel.com>
2881
2882 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
2883 with "if (ENABLE_OFFLOADING)".
2884
cbd03aee
DM
28852015-11-23 David Malcolm <dmalcolm@redhat.com>
2886
2887 PR objc/68438
2888 * c-parser.c (c_parser_postfix_expression): Set up source ranges
2889 for various Objective-C constructs: Class.name syntax,
2890 @selector(), @protocol(), @encode(), and [] message syntax.
2891
a87a86e1
DM
28922015-11-20 David Malcolm <dmalcolm@redhat.com>
2893
2894 PR 62314
2895 * c-typeck.c (should_suggest_deref_p): New function.
2896 (build_component_ref): Special-case POINTER_TYPE when
2897 generating a "not a structure of union" error message, and
2898 suggest a "->" rather than a ".", providing a fix-it hint.
2899
8ece8dfb
DM
29002015-11-19 David Malcolm <dmalcolm@redhat.com>
2901
2902 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
2903 candidate into a new function, find_closest_identifier.
2904
433068cc
MP
29052015-11-19 Marek Polacek <polacek@redhat.com>
2906
2907 PR c/68412
2908 * c-typeck.c (parser_build_binary_op): Properly handle
2909 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
2910
bef08b71
DM
29112015-11-17 David Malcolm <dmalcolm@redhat.com>
2912
2913 * c-parser.c (set_c_expr_source_range): Bulletproof both
2914 overloaded implementations against NULL expr->value.
2915 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
2916 values.
2917 (c_parser_unary_expression): Likewise when handling addresses of
2918 labels.
2919 (c_parser_postfix_expression): Likewise for statement expressions,
2920 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
2921 __builtin_va_arg, and for __builtin_offset_of.
2922 (c_parser_postfix_expression_after_paren_type): Initialize expr's
2923 src_range using the range of the braced initializer.
2924 (c_parser_transaction_expression): Set src_range for "ret" to a
2925 sane pair of values.
2926
fff77217
KY
29272015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
2928
2929 * c-parser.c (c_finish_omp_declare_simd): Look for
2930 "simd" attribute as well. Update error message.
2931
1d899da2
TS
29322015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2933
2934 * c-parser.c (c_parser_omp_declare_target): Adjust.
2935
e4606348
JJ
29362015-11-14 Jakub Jelinek <jakub@redhat.com>
2937
2938 * c-typeck.c (c_finish_omp_clauses): Don't mark
2939 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
2940
3e636daf
MP
29412015-11-14 Marek Polacek <polacek@redhat.com>
2942
2943 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
2944 * c-typeck.c: Likewise.
2945
ebedc9a3
DM
29462015-11-13 David Malcolm <dmalcolm@redhat.com>
2947
2948 * c-decl.c (warn_defaults_to): Pass line_table to
2949 rich_location ctor.
2950 * c-errors.c (pedwarn_c99): Likewise.
2951 (pedwarn_c90): Likewise.
2952 * c-parser.c (set_c_expr_source_range): New functions.
2953 (c_token::get_range): New method.
2954 (c_token::get_finish): New method.
2955 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
2956 based on the range from the start of the LHS to the end of the
2957 RHS.
2958 (c_parser_conditional_expression): Likewise, based on the range
2959 from the start of the cond.value to the end of exp2.value.
2960 (c_parser_binary_expression): Call set_c_expr_source_range on
2961 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
2962 (c_parser_cast_expression): Call set_c_expr_source_range on ret
2963 based on the cast_loc through to the end of the expr.
2964 (c_parser_unary_expression): Likewise, based on the
2965 op_loc through to the end of op.
2966 (c_parser_sizeof_expression) Likewise, based on the start of the
2967 sizeof token through to either the closing paren or the end of
2968 expr.
2969 (c_parser_postfix_expression): Likewise, using the token range,
2970 or from the open paren through to the close paren for
2971 parenthesized expressions.
2972 (c_parser_postfix_expression_after_primary): Likewise, for
2973 various kinds of expression.
2974 * c-tree.h (struct c_expr): Add field "src_range".
2975 (c_expr::get_start): New method.
2976 (c_expr::get_finish): New method.
2977 (set_c_expr_source_range): New decls.
2978 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
2979 on ret for prefix unary ops.
2980 (parser_build_binary_op): Likewise, running from the start of
2981 arg1.value through to the end of arg2.value.
2982
ec8b536f
MP
29832015-11-13 Marek Polacek <polacek@redhat.com>
2984
2985 PR c/68320
2986 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
2987
277fe616
DM
29882015-11-13 David Malcolm <dmalcolm@redhat.com>
2989
2990 * c-typeck.c: Include spellcheck.h.
2991 (lookup_field_fuzzy_find_candidates): New function.
2992 (lookup_field_fuzzy): New function.
2993 (build_component_ref): If the field was not found, try using
2994 lookup_field_fuzzy and potentially offer a suggestion.
2995
6e232ba4
JN
29962015-11-12 James Norris <jnorris@codesourcery.com>
2997 Joseph Myers <joseph@codesourcery.com>
2998
2999 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
3000 (c_parser_omp_clause_name): Handle 'device_resident' clause.
3001 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3002 and PRAGMA_OMP_CLAUSE_LINK.
3003 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3004 and PRAGMA_OACC_CLAUSE_LINK.
3005 (OACC_DECLARE_CLAUSE_MASK): New definition.
3006 (c_parser_oacc_declare): New function.
3007
9be4f715
MP
30082015-11-12 Marek Polacek <polacek@redhat.com>
3009
3010 PR c/67784
3011 * c-parser.c (c_parser_for_statement): Reclassify the token in
3012 a correct scope.
3013
e78bede6
MP
30142015-11-11 Marek Polacek <polacek@redhat.com>
3015
3016 PR c/68107
3017 PR c++/68266
3018 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
3019 checking the size of an array.
3020
69f293c9
AM
30212015-11-11 Andrew MacLeod <amacleod@redhat.com>
3022
3023 * c-array-notation.c: Remove unused header files.
3024 * c-aux-info.c: Likewise.
3025 * c-convert.c: Likewise.
3026 * c-decl.c: Likewise.
3027 * c-errors.c: Likewise.
3028 * c-lang.c: Likewise.
3029 * c-objc-common.c: Likewise.
3030 * c-parser.c: Likewise.
3031 * c-typeck.c: Likewise.
3032 * gccspec.c: Likewise.
3033
3a40d81d
NS
30342015-11-09 Thomas Schwinge <thomas@codesourcery.com>
3035 Cesar Philippidis <cesar@codesourcery.com>
3036 James Norris <jnorris@codesourcery.com>
3037 Julian Brown <julian@codesourcery.com>
3038 Nathan Sidwell <nathan@codesourcery.com>
3039
3040 c/
3041 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
3042 routine arg.
3043 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
3044 (c_parser_pragma): Parse 'acc routine'.
3045 (OACC_ROUTINE_CLAUSE_MARK): Define.
3046 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
3047
fc402eec
AA
30482015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3049
3050 PR debug/67192
3051 * c-typeck.c (c_finish_loop): For unconditional loops, set the
3052 location of the backward-goto to the start of the loop body.
3053
f6b0b3db
AA
30542015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3055
3056 PR debug/67192
3057 * c-parser.c (c_parser_while_statement): Finish the loop before
3058 parsing ahead for misleading indentation.
3059 (c_parser_for_statement): Likewise.
3060
ee45a32d
EB
30612015-11-08 Eric Botcazou <ebotcazou@adacore.com>
3062
3063 * c-decl.c (finish_struct): If the structure has reverse storage
3064 order, rewrite the type of array fields with scalar component. Call
3065 maybe_apply_pragma_scalar_storage_order on entry.
3066 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
3067 errors on bit-fields and reverse SSO here and not...
3068 (c_mark_addressable): ...here.
3069 (output_init_element): Adjust call to initializer_constant_valid_p.
3070 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
3071
8a645150
DM
30722015-11-06 David Malcolm <dmalcolm@redhat.com>
3073
3074 * c-decl.c (warn_defaults_to): Update for change in signature
3075 of diagnostic_set_info.
3076 * c-errors.c (pedwarn_c99): Likewise.
3077 (pedwarn_c90): Likewise.
3078 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
3079 for textinfo::set_location.
3080
7a5e4956
CP
30812015-11-05 Cesar Philippidis <cesar@codesourcery.com>
3082 Thomas Schwinge <thomas@codesourcery.com>
3083 James Norris <jnorris@codesourcery.com>
3084
3085 * c-parser.c (c_parser_omp_clause_name): Add support for
3086 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
3087 (c_parser_omp_clause_default): Add is_oacc argument. Handle
3088 default(none) in OpenACC.
3089 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
3090 arguments.
3091 (c_parser_oacc_clause_tile): New function.
3092 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
3093 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
3094 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
3095 TILE}.
3096 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
3097 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
3098 FIRSTPRIVATE}.
3099 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
3100 (c_parser_oacc_update): Update the error message for missing clauses.
3101 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
3102 and OMP_CLAUSE_INDEPENDENT.
3103
bfcfbfa0
MP
31042015-11-05 Marek Polacek <polacek@redhat.com>
3105
3106 PR c/68090
3107 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
3108 deal with pre-evaluation on invalid types.
3109
e01d41e5
JJ
31102015-11-05 Jakub Jelinek <jakub@redhat.com>
3111 Ilya Verbin <ilya.verbin@intel.com>
3112
3113 * c-parser.c: Include context.h and gimple-expr.h.
3114 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
3115 monotonic together with nonmonotonic.
3116 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
3117 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
3118 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
3119 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
3120 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
3121 expressions on combined target teams before the target.
3122 (c_parser_omp_declare_target): If decl has "omp declare target" or
3123 "omp declare target link" attribute, and cgraph or varpool node already
3124 exists, then set corresponding flags. Call c_finish_omp_clauses
3125 in the parenthesized extended-list syntax case.
3126 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
3127 declare target.
3128 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
3129 on OMP_CLAUSE_REDUCTION array sections.
3130 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
3131 into the constant offset, or for variable low-bound using
3132 POINTER_PLUS_EXPR. For structure element based array sections use
3133 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
3134 (c_finish_omp_clauses): Drop generic_field_head, structure
3135 elements are now always mapped even as array section bases,
3136 diagnose same var in data sharing and mapping clauses. Diagnose if
3137 linear step on declare simd is neither a constant nor a uniform
3138 parameter. Look through POINTER_PLUS_EXPR for array section
3139 reductions. Diagnose the same var or function appearing multiple
3140 times on the same directive. Fix up wording for the to clause if t
3141 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
3142 modifier on kinds other than dynamic or guided or nonmonotonic
3143 modifier together with ordered clause.
3144
4bf9e5a8
TS
31452015-11-03 Thomas Schwinge <thomas@codesourcery.com>
3146 Chung-Lin Tang <cltang@codesourcery.com>
3147
3148 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
3149
2adfab87
AM
31502015-10-29 Andrew MacLeod <amacleod@redhat.com>
3151
3152 * c-array-notation.c: Reorder #include's and remove duplicates.
3153 * c-aux-info.c: Likewise.
3154 * c-convert.c: Likewise.
3155 * c-decl.c: Likewise.
3156 * c-errors.c: Likewise.
3157 * c-lang.c: Likewise.
3158 * c-objc-common.c: Likewise.
3159 * c-parser.c: Likewise.
3160 * c-typeck.c: Likewise.
3161
e922069e
JW
31622015-10-26 Jim Wilson <jim.wilson@linaro.org>
3163
3164 PR debug/66068
3165 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
3166 after calling build_qualified_type.
3167
765dd391
CP
31682015-10-27 Cesar Philippidis <cesar@codesourcery.com>
3169 Thomas Schwinge <thomas@codesourcery.com>
3170 James Norris <jnorris@codesourcery.com>
3171 Joseph Myers <joseph@codesourcery.com>
3172 Julian Brown <julian@codesourcery.com>
3173 Bernd Schmidt <bschmidt@redhat.com>
3174
3175 * c-parser.c (c_parser_oacc_shape_clause): New.
3176 (c_parser_oacc_simple_clause): New.
3177 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
3178 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
3179
88bae6f4
TS
31802015-10-27 Thomas Schwinge <thomas@codesourcery.com>
3181 James Norris <jnorris@codesourcery.com>
3182 Cesar Philippidis <cesar@codesourcery.com>
3183
3184 PR c/64765
3185 PR c/64880
3186 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
3187 parameters, and handle these. Adjust all users.
3188 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
3189 into...
3190 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
3191 all users.
3192 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
3193 declare functions.
3194 (c_finish_omp_construct): Declare function.
3195 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
3196 Merge functions into...
3197 (c_finish_omp_construct): ... this new function.
3198
a8fc2579
RB
31992015-10-22 Richard Biener <rguenther@suse.de>
3200
3201 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
3202 before folding a MINUS_EXPR.
3203
e9122ef6
MP
32042015-10-21 Marek Polacek <polacek@redhat.com>
3205
3206 PR c/68024
3207 * c-decl.c (start_function): Warn about vararg functions without
3208 a prototype.
3209
9f47c7e5
IE
32102015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
3211
3212 * c-typeck.c (build_conditional_expr): Use boolean vector
3213 type for vector comparison.
3214 (build_vec_cmp): New.
3215 (build_binary_op): Use build_vec_cmp for comparison.
3216
fa60eeb9
MP
32172015-10-20 Marek Polacek <polacek@redhat.com>
3218
3219 * c-parser.c (is_cilkplus_vector_p): Don't define here.
3220
2c7020eb
MP
32212015-10-20 Marek Polacek <polacek@redhat.com>
3222
3223 PR c/67964
3224 * c-parser.c (c_parser_attributes): Break out of the loop if the
3225 token after an attribute isn't a comma.
3226
d9a6bd32
JJ
32272015-10-13 Jakub Jelinek <jakub@redhat.com>
3228 Aldy Hernandez <aldyh@redhat.com>
3229
3230 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
3231 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
3232 (c_parser_omp_variable_list): Handle structure elements for
3233 map, to and from clauses. Handle array sections in reduction
3234 clause. Formatting fixes.
3235 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
3236 if clause modifiers.
3237 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3238 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3239 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
3240 c_parser_omp_clause_is_device_ptr): New functions.
3241 (c_parser_omp_clause_ordered): Parse optional parameter.
3242 (c_parser_omp_clause_reduction): Handle array reductions.
3243 (c_parser_omp_clause_schedule): Parse optional simd modifier.
3244 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
3245 functions.
3246 (c_parser_omp_clause_linear): Parse linear clause modifiers.
3247 (c_parser_omp_clause_depend_sink): New function.
3248 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
3249 (c_parser_omp_clause_map): Parse release/delete map kinds and
3250 optional always modifier.
3251 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
3252 and c_finish_omp_clauses callers.
3253 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
3254 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
3255 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
3256 (OMP_CRITICAL_CLAUSE_MASK): Define.
3257 (c_parser_omp_critical): Parse critical clauses.
3258 (c_parser_omp_for_loop): Handle doacross loops, adjust
3259 c_finish_omp_for and c_finish_omp_clauses callers.
3260 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
3261 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
3262 (OMP_FOR_CLAUSE_MASK): Add linear clause.
3263 (c_parser_omp_for): Disallow ordered clause when combined with
3264 distribute. Disallow linear clause when combined with distribute
3265 and not combined with simd.
3266 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
3267 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
3268 parse clauses and if depend clause is found, don't parse a body.
3269 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
3270 Allow target parallel without for after it.
3271 (OMP_TASK_CLAUSE_MASK): Add priority clause.
3272 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
3273 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
3274 invalid kinds.
3275 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
3276 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
3277 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
3278 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
3279 functions.
3280 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
3281 defaultmap and is_device_ptr clauses.
3282 (c_parser_omp_target): Parse target parallel and target simd. Set
3283 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
3284 and target exit data. Diagnose invalid map kinds.
3285 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
3286 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
3287 construct.
3288 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
3289 &omp_priv.
3290 (OMP_TASKLOOP_CLAUSE_MASK): Define.
3291 (c_parser_omp_taskloop): New function.
3292 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
3293 handle PRAGMA_OMP_TASKLOOP.
3294 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
3295 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
3296 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
3297 Add IS_OMP argument, handle structure element bases, diagnose
3298 bitfields, pass IS_OMP recursively, diagnose known zero length
3299 array sections in depend clauses, handle array sections in reduction
3300 clause, diagnose negative length even for pointers.
3301 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
3302 types, pass IS_OMP down to handle_omp_array_sections_1, handle
3303 array sections in reduction clause, set
3304 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
3305 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
3306 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
3307 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
3308
21ba0cea
MP
33092015-10-06 Marek Polacek <polacek@redhat.com>
3310
3311 * c-parser.c (c_parser_statement_after_labels): Use
3312 protected_set_expr_location.
3313 (c_parser_omp_clause_num_gangs): Likewise.
3314 (c_parser_omp_clause_num_threads): Likewise.
3315 (c_parser_omp_clause_num_workers): Likewise.
3316 (c_parser_omp_clause_vector_length): Likewise.
3317 (c_parser_omp_clause_num_teams): Likewise.
3318 (c_parser_omp_clause_thread_limit): Likewise.
3319 * c-typeck.c (build_c_cast): Likewise.
3320 (c_cast_expr): Likewise.
3321
624d31fe
RS
33222015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3323
3324 * c-typeck.c (c_tree_equal): Use real_equal instead of
3325 REAL_VALUES_EQUAL.
3326
b8fd7909
JM
33272015-10-04 Jason Merrill <jason@redhat.com>
3328
3329 * c-parser.c (c_lex_one_token): Handle @synchronized.
3330 * c-decl.c (match_builtin_function_types): A declaration of a built-in
3331 can change whether the function is transaction_safe.
3332
1c7485af
MP
33332015-10-02 Marek Polacek <polacek@redhat.com>
3334
3335 PR c/67730
3336 * c-typeck.c (convert_for_assignment): Use the expansion point
3337 location throughout.
3338
3e3b8d63
MP
33392015-10-02 Marek Polacek <polacek@redhat.com>
3340
3341 PR c/64249
3342 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
3343 and pass it down to c_parser_if_statement.
3344 (c_parser_else_body): Add CHAIN parameter and pass it down to
3345 c_parser_statement_after_labels.
3346 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
3347 duplicated if-else-if conditions.
3348
aabef2de
MP
33492015-10-01 Marek Polacek <polacek@redhat.com>
3350
3351 * c-typeck.c (convert_for_assignment): Improve commentary.
3352
de8ddd5f
MP
33532015-09-30 Marek Polacek <polacek@redhat.com>
3354
3355 PR c/67730
3356 * c-typeck.c (c_finish_return): Use the expansion point location for
3357 certain "return with value" warnings.
3358
c4914de6
MLI
33592015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3360
3361 * c-parser.c (pragma_lex): Add loc argument.
3362
0e36f5c7
MP
33632015-09-15 Marek Polacek <polacek@redhat.com>
3364
3365 PR c/67580
3366 * c-decl.c (tag_exists_p): New function.
3367 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3368 struct/union/enum keywords are missing.
3369 * c-tree.h (tag_exists_p): Declare.
3370
2f3bb934
MP
33712015-09-15 Marek Polacek <polacek@redhat.com>
3372
3373 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3374 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3375 Return NULL_TREE instead of 0.
3376 (lookup_name): Return NULL_TREE instead of 0.
3377 (lookup_name_in_scope): Likewise.
3378 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3379 (parser_xref_tag): Use false instead of 0.
3380 (start_struct): Use true instead of 1.
3381 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3382
aa256c4a
MP
33832015-09-14 Marek Polacek <polacek@redhat.com>
3384
3385 * c-typeck.c (set_nonincremental_init_from_string): Use
3386 HOST_WIDE_INT_M1U when shifting a negative value.
3387
dbb68221
MW
33882015-09-09 Mark Wielaard <mjw@redhat.com>
3389
3390 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
3391 parm against NULL.
3392
a8a098ac
JJ
33932015-09-10 Jakub Jelinek <jakub@redhat.com>
3394
3395 PR c/67502
3396 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
3397 into OMP_FOR_PRE_BODY rather than before the loop.
3398
f4b189d5
JJ
33992015-09-09 Jakub Jelinek <jakub@redhat.com>
3400
0bb99c11
JJ
3401 PR c/67501
3402 * c-parser.c (c_parser_oacc_all_clauses,
3403 c_parser_omp_all_clauses): Remove invalid clause from
3404 list of clauses even if parser->error is set.
3405
fce5e5e3
JJ
3406 PR c/67500
3407 * c-parser.c (c_parser_omp_clause_aligned,
3408 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3409 test for errors.
3410 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3411 error_mark_node.
3412
f4b189d5
JJ
3413 PR c/67495
3414 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3415 instead of c_parser_unary_expression. If the result is !lvalue_p,
3416 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3417
b2aaf235
MP
34182015-09-04 Marek Polacek <polacek@redhat.com>
3419
3420 PR sanitizer/67279
3421 * c-typeck.c (build_binary_op): Don't instrument static initializers.
3422
1807ffc1
MS
34232015-09-03 Martin Sebor <msebor@redhat.com>
3424
3425 PR c/66516
8b652e65
JJ
3426 * c-typeck.c (convert_arguments, parser_build_unary_op,
3427 build_conditional_expr, c_cast_expr, convert_for_assignment,
3428 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
3429 reject_gcc_builtin.
3430 (c_decl_implicit): Define.
3431
d04ff417
MP
34322015-09-02 Marek Polacek <polacek@redhat.com>
3433
3434 PR c/67432
3435 * c-parser.c (c_parser_enum_specifier): Give a better error for
3436 an empty enum.
3437
a79683d5
TS
34382015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3439
3440 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3441
191a6b94
MP
34422015-08-12 Marek Polacek <polacek@redhat.com>
3443
3444 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
3445 LOC to it.
3446
420a9d9b
MP
34472015-08-03 Marek Polacek <polacek@redhat.com>
3448
3449 PR c/67088
3450 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
3451 Use it.
3452 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
3453
992118a1
PP
34542015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3455
3456 * c-parser.c (c_parser_if_body): Take token_indent_info
3457 argument. Call warn_for_misleading_indentation even when the
3458 body is a semicolon. Extract token_indent_infos corresponding
3459 to the guard, body and next tokens. Adjust call to
3460 warn_for_misleading_indentation accordingly.
3461 (c_parser_else_body): Likewise.
3462 (c_parser_if_statement): Likewise.
3463 (c_parser_while_statement): Likewise.
3464 (c_parser_for_statement): Likewise.
3465
46308474
LFSM
34662015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
3467 Manuel López-Ibáñez <manu@gcc.gnu.org>
3468
3469 * c-decl.c (get_parm_info): Remove static var. Update warning
3470 message.
3471
05b28fd6
MP
34722015-07-27 Marek Polacek <polacek@redhat.com>
3473
3474 PR c++/66555
3475 PR c/54979
3476 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3477
451b5e48
MP
34782015-07-20 Marek Polacek <polacek@redhat.com>
3479
3480 PR c++/55095
3481 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3482 (build_binary_op): Warn about left shift overflows.
3483
1916bcb5
AM
34842015-07-09 Andrew MacLeod <amacleod@redhat.com>
3485
3486 * c-array-notation.c: Adjust includes for flags.h changes.
3487 * c-objc-common.c: Likewise.
3488
c7131fb2
AM
34892015-07-07 Andrew MacLeod <amacleod@redhat.com>
3490
3491 * c-array-notation.c: Adjust includes.
3492 * c-aux-info.c: Likewise.
3493 * c-convert.c: Likewise.
3494 * c-decl.c: Likewise.
3495 * c-errors.c: Likewise.
3496 * c-lang.c: Likewise.
3497 * c-objc-common.c: Likewise.
3498 * c-parser.c: Likewise.
3499 * c-typeck.c: Likewise.
3500
da2e71c9
MLI
35012015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3502
3503 PR fortran/66605
3504 * c-decl.c (finish_function): Call do_warn_unused_parameter.
3505
b155cfd9
MP
35062015-06-29 Marek Polacek <polacek@redhat.com>
3507
3508 PR c/66322
3509 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3510 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
3511 about -Wswitch-bool here.
3512 (do_case): Update c_add_case_label call.
3513 (c_finish_case): Update c_do_switch_warnings call.
3514
31521951
MP
35152015-06-27 Marek Polacek <polacek@redhat.com>
3516
3517 * c-typeck.c: Use VECTOR_TYPE_P throughout.
3518
22d03525
MP
35192015-06-26 Marek Polacek <polacek@redhat.com>
3520
3521 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3522 INDIRECT_REF_P.
3523 * c-typeck.c (array_to_pointer_conversion): Likewise.
3524 (build_unary_op): Likewise.
3525 (c_finish_return): Likewise.
3526
f0889939
AM
35272015-06-25 Andrew MacLeod <amacleod@redhat.com>
3528
3529 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3530 * c-parser.c: Likewise.
3531
8d67ee55
RS
35322015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3533
3534 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3535 instead of pointer_hash.
3536 (detect_field_duplicates): Likewise.
3537
0ae9bd27
MP
35382015-06-25 Marek Polacek <polacek@redhat.com>
3539
3540 * c-array-notation.c: Use VAR_P throughout.
3541 * c-decl.c: Likewise.
3542 * c-objc-common.c: Likewise.
3543 * c-parser.c: Likewise.
3544 * c-typeck.c: Likewise.
3545
62f9079a
MP
35462015-06-25 Marek Polacek <polacek@redhat.com>
3547
3548 * c-decl.c: Use is_global_var throughout.
3549 * c-parser.c: Likewise.
3550 * c-typeck.c: Likewise.
3551
abb226c9
AM
35522015-06-17 Andrew MacLeod <amacleod@redhat.com>
3553
3554 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3555 * c-aux-info.c: Likewise.
3556 * c-convert.c: Likewise.
3557 * c-decl.c: Likewise.
3558 * c-errors.c: Likewise.
3559 * c-lang.c: Likewise.
3560 * c-objc-common.c: Likewise.
3561 * c-parser.c: Likewise.
3562 * c-typeck.c: Likewise.
3563
8cbababc
JH
35642015-06-11 Jan Hubicka <hubicka@ucw.cz>
3565
3566 PR middle-end/66325
3567 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3568 variants.
3569
a0349665
PMR
35702015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
3571
3572 * c-decl.c (pop_scope): Register the main translation unit
3573 through the new debug hook.
3574
13fdf2e2
AM
35752015-06-08 Andrew MacLeod <amacleod@redhat.com>
3576
3577 * c-array-notation.c : Adjust include files.
3578 * c-aux-info.c : Likewise.
3579 * c-convert.c : Likewise.
3580 * c-decl.c : Likewise.
3581 * c-errors.c : Likewise.
3582 * c-lang.c : Likewise.
3583 * c-lang.h : Likewise.
3584 * c-objc-common.c : Likewise.
3585 * c-parser.c : Likewise.
3586 * c-typeck.c : Likewise.
3587
d7438551
AH
35882015-06-05 Aldy Hernandez <aldyh@redhat.com>
3589
3590 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3591 immediately clobber it.
3592 (c_write_global_declarations_1): Remove call to
3593 check_global_declaration_1.
3594 (c_write_global_declarations_2): Remove.
3595 (c_write_final_cleanups): Rename from c_write_global_declarations.
3596 Remove call to finalize_compilation_unit.
3597 Remove calls to debugging hooks.
3598 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3599 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3600 * c-tree.h: Remove c_write_global_declarations.
3601
ecb9f223
AM
36022015-06-04 Andrew MacLeod <amacleod@redhat.com>
3603
3604 * c-array-notation.c: Adjust includes for restructured coretypes.h.
3605 * c-aux-info.c: Likewise.
3606 * c-convert.c: Likewise.
3607 * c-decl.c: Likewise.
3608 * c-errors.c: Likewise.
3609 * c-lang.c: Likewise.
3610 * c-objc-common.c: Likewise.
3611 * c-parser.c: Likewise.
3612 * c-typeck.c: Likewise.
3613
9482b620
MP
36142015-06-04 Marek Polacek <polacek@redhat.com>
3615
3616 PR c/66341
3617 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3618 it is a lvalue.
3619
bc51ace3
PK
36202015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3621
3622 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3623 Warn for empty struct.
3624 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3625
ea5b45b6
AT
36262015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
3627
3628 * c-decl.c (start_function): Call plugin before parsing.
3629 (finish_function): Call plugin after parsing.
3630
c2d47482
PK
36312015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3632
3633 PR c/49551
3634 * c-decl.c (merge_decls): Merge DECL_COMMON.
3635
a95492ab
JW
36362015-05-22 Jim Wilson <jim.wilson@linaro.org>
3637
3638 * Make-lang.in (check_gcc_pallelize): Define.
3639
fd5c817a
MP
36402015-05-22 Marek Polacek <polacek@redhat.com>
3641
3642 PR c/47043
3643 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
3644 attributes.
3645
c7b70a3c
MP
36462015-05-21 Marek Polacek <polacek@redhat.com>
3647
3648 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3649 DECL_BUILT_IN.
3650
21b634ae
MP
36512015-05-20 Marek Polacek <polacek@redhat.com>
3652
3653 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3654 * c-typeck.c: Likewise.
3655
296a8c2f
MP
36562015-05-19 Marek Polacek <polacek@redhat.com>
3657
3658 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3659
41b37d5e
JJ
36602015-05-19 Jakub Jelinek <jakub@redhat.com>
3661
3662 PR middle-end/66199
3663 * c-parser.c (c_parser_omp_for_loop): Don't add
3664 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3665 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3666 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3667 constructs.
3668
fab27f52
MM
36692015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
3670
3671 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 3672 swaps.
fab27f52 3673
40de31cf
MLI
36742015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3675
3676 PR fortran/44054
3677 * c-objc-common.c (c_tree_printer): Replace locus pointer with
3678 accessor function.
3679
3aa3c9fc
MP
36802015-05-14 Marek Polacek <polacek@redhat.com>
3681
3682 PR c/66066
3683 PR c/66127
3684 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
3685 rather than with 0.
3686
c3388e62
DM
36872015-05-12 David Malcolm <dmalcolm@redhat.com>
3688
3689 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
3690 to add a call to warn_for_misleading_indentation.
3691 (c_parser_else_body): Likewise, adding param "else_loc".
3692 (c_parser_if_statement): Check for misleading indentation.
3693 (c_parser_while_statement): Likewise.
3694 (c_parser_for_statement): Likewise.
3695
755e528f
MP
36962015-05-08 Marek Polacek <polacek@redhat.com>
3697
3698 PR c/64918
3699 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
3700 (output_init_element): Likewise.
3701
0173bd2a
MP
37022015-05-07 Marek Polacek <polacek@redhat.com>
3703
3704 PR c/65179
3705 * c-typeck.c (build_binary_op): Warn when left shifting a negative
3706 value.
3707
9babc352
MP
37082015-04-30 Marek Polacek <polacek@redhat.com>
3709
3710 * c-typeck.c (set_init_label): Call error_at instead of error and
3711 pass LOC to it.
3712
ac9f18db
MP
3713 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
3714 the type of a decl.
3715
ec3fba51
MP
3716 * c-typeck.c (c_build_va_arg): Clarify the error message.
3717
b811915d
TS
37182015-04-29 Thomas Schwinge <thomas@codesourcery.com>
3719
3720 * c-parser.c (c_parser_oacc_enter_exit_data): Use
3721 OMP_STANDALONE_CLAUSES.
3722
f3075008
MP
37232015-04-28 Marek Polacek <polacek@redhat.com>
3724
3725 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
3726
4e81b788
MP
37272015-04-28 Marek Polacek <polacek@redhat.com>
3728
3729 PR c/65901
3730 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
3731
6c1db78e
MP
37322015-04-25 Marek Polacek <polacek@redhat.com>
3733
3734 PR c/52085
3735 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
3736 attribute.
3737
5c4abbb8
MP
37382015-04-23 Marek Polacek <polacek@redhat.com>
3739
3740 PR c/65345
3741 * c-decl.c (set_labels_context_r): New function.
3742 (store_parm_decls): Call it via walk_tree_without_duplicates.
3743 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
3744 instead of create_tmp_var. Build TARGET_EXPR instead of
3745 COMPOUND_EXPR.
3746 (build_atomic_assign): Use create_tmp_var_raw instead of
3747 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
3748
06aca1d5
IV
37492015-04-20 Ilya Verbin <ilya.verbin@intel.com>
3750
3751 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
3752 (c_parser_omp_target_update): Add missed %> to error_at ().
3753
8fba1830
BRF
37542015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
3755
3756 PR target/55143
3757 * c-decl.c (c_default_pointer_mode): Remove definition.
3758 * c-tree.h (c_default_pointer_mode): Remove declaration.
3759
62021f64
TB
37602015-03-27 Tobias Burnus <burnus@net-b.de>
3761
3762 PR c/65586
3763 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
3764 error out.
3765 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
3766 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
3767 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
3768
9b65e171
JJ
37692015-03-19 Jakub Jelinek <jakub@redhat.com>
3770
3771 * c-decl.c (c_decl_attributes): Also add "omp declare target"
3772 attribute for DECL_EXTERNAL VAR_DECLs.
3773
17958621
JJ
37742015-03-11 Jakub Jelinek <jakub@redhat.com>
3775
3776 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
3777 argument.
3778
7ccb1a11
JJ
37792015-03-10 Jakub Jelinek <jakub@redhat.com>
3780
3781 PR c/65120
3782 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
3783 before preparing arguments to warn_logical_not_parentheses.
3784
01177669
JJ
37852015-03-09 Jakub Jelinek <jakub@redhat.com>
3786
3787 PR c/65120
3788 * c-typeck.c (parser_build_binary_op): Don't warn for
3789 !!x == y or !b == y where b is _Bool.
3790
802ac282
MP
37912015-03-09 Marek Polacek <polacek@redhat.com>
3792
3793 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
3794 * c-decl.c (grokdeclarator): Likewise.
3795 * c-typeck.c (build_binary_op): Likewise.
3796
e5165b60
MP
37972015-02-27 Marek Polacek <polacek@redhat.com>
3798
3799 PR c/65228
3800 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
3801
065d214c
MP
38022015-02-14 Marek Polacek <polacek@redhat.com>
3803
3804 PR c/64768
3805 * c-decl.c (grokdeclarator): Set the range of a flexible array member
3806 declared through a typedef name.
3807
e5d9235b
MP
38082015-02-13 Marek Polacek <polacek@redhat.com>
3809
3810 PR c/65050
3811 * c-decl.c (grokdeclarator): Print also the type when giving
3812 the error message about array's incomplete element type.
3813
fa01ffcc
JJ
38142015-02-11 Jakub Jelinek <jakub@redhat.com>
3815
3816 PR c/64824
3817 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
3818 check in the POP macro.
3819
c3e38a03
MP
38202015-02-09 Marek Polacek <polacek@redhat.com>
3821
3822 PR c/64856
3823 * c-typeck.c (process_init_element): Don't always wrap
3824 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
3825 initializing a range of elements.
3826
4886ec8e
JJ
38272015-02-04 Jakub Jelinek <jakub@redhat.com>
3828
3829 PR c/64824
3830 PR c/64868
3831 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
3832
c3e38a03 38332015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
3834
3835 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
3836 processing enum declaration.
3837
7b33f0c8
MP
38382015-01-29 Marek Polacek <polacek@redhat.com>
3839
3840 PR c/64709
3841 * c-typeck.c (pop_init_level): If constructor_elements has
3842 exactly one element with integer_zerop value, set constructor_zeroinit
3843 to 1. Remove braces around warning_init call.
3844
dea63e49
JJ
38452015-01-27 Jakub Jelinek <jakub@redhat.com>
3846
3847 PR c/64766
3848 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
3849 of FUNCTION_DECLs with error_mark_node.
3850
d38f7dce
JJ
38512015-01-26 Jakub Jelinek <jakub@redhat.com>
3852
3853 PR c/64778
3854 * c-typeck.c (convert_arguments): Return -1 if there are
3855 error_args, even if we've diagnosed too many arguments.
3856
cbf5d0e7
RB
38572015-01-21 Richard Biener <rguenther@suse.de>
3858
3859 PR middle-end/64313
3860 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
3861 for builtins the user declared correctly.
3862
41dbbb37
TS
38632015-01-15 Thomas Schwinge <thomas@codesourcery.com>
3864 Bernd Schmidt <bernds@codesourcery.com>
3865 Cesar Philippidis <cesar@codesourcery.com>
3866 James Norris <jnorris@codesourcery.com>
3867 Jakub Jelinek <jakub@redhat.com>
3868 Ilmir Usmanov <i.usmanov@samsung.com>
3869
3870 * c-parser.c: Include "gomp-constants.h".
3871 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3872 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3873 Use OMP_CLAUSE_SET_MAP_KIND.
3874 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
3875 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
3876 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
3877 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
3878 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
3879 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
3880 "copyout", "create", "delete", "deviceptr", "gang", "host",
3881 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
3882 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3883 "present_or_create", "pcreate", "seq", "self", "vector",
3884 "vector_length", "wait", "worker".
3885 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3886 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
3887 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3888 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3889 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
3890 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
3891 (c_parser_oacc_data_clause_deviceptr)
3892 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
3893 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
3894 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
3895 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
3896 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
3897 (c_parser_oacc_parallel, c_parser_oacc_update)
3898 (c_parser_oacc_wait): New functions.
3899 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
3900 (c_finish_oacc_data): New prototypes.
3901 * c-typeck.c: Include "gomp-constants.h".
3902 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
3903 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
3904 OMP_CLAUSE_SET_MAP_KIND.
3905 (c_finish_oacc_parallel, c_finish_oacc_kernels)
3906 (c_finish_oacc_data): New functions.
3907 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
3908 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
3909 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
3910 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
3911 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
3912 GOMP_MAP_FORCE_DEVICEPTR.
3913
adfac8df
JJ
39142015-01-09 Michael Collison <michael.collison@linaro.org>
3915
3916 * c-array-notation.c: Include hash-set.h, machmode.h,
3917 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3918 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
3919 * c-aux-info.c: Ditto.
3920 * c-convert.c: Ditto.
3921 * c-decl.c: Ditto.
3922 * c-errors.c: Ditto.
3923 * c-lang.c: Dittoxs.
3924 * c-objc-common.c: Ditto.
3925 * c-parser.c: Ditto.
3926 * c-typeck.c: Include hash-set.h, machmode.h,
3927 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3928 fold-const.h, wide-int.h, inchash.h, real.h and
3929 fixed-value.h due to flattening of tree.h.
3930
2cc901dc
MP
39312015-01-07 Marek Polacek <polacek@redhat.com>
3932
3933 PR c/64417
3934 * c-typeck.c (process_init_element): Disallow initialization of
3935 a flexible array member with a string constant if the structure
3936 is in an array.
3937
5624e564
JJ
39382015-01-05 Jakub Jelinek <jakub@redhat.com>
3939
e5341100
JJ
3940 PR sanitizer/64344
3941 * c-typeck.c (convert_for_assignment, c_finish_return): For
3942 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
3943 types also set in_late_binary_op around convert call.
3944 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
3945 to integral type casts, if not in_late_binary_op, pass c_fully_fold
3946 result on expr as last argument to ubsan_instrument_float_cast,
3947 if in_late_binary_op, don't use c_save_expr but save_expr.
3948
5624e564
JJ
3949 Update copyright years.
3950
5bd012f8
MP
39512015-01-05 Marek Polacek <polacek@redhat.com>
3952
3953 PR c/64423
3954 * c-typeck.c (build_array_ref): Pass loc down to
3955 warn_array_subscript_with_type_char.
3956
3f8257db 39572014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
3958
3959 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 3960 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 3961 element type.
8e745a17 3962 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 3963 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 3964 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 3965 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 3966 to PEDWARN_FOR_QUALIFIERS.
768952be 3967
8f94a8c4
JJ
39682014-12-17 Jakub Jelinek <jakub@redhat.com>
3969
3970 PR sanitizer/64289
3971 * c-convert.c: Include ubsan.h.
3972 (convert): For real -> integral casts and
3973 -fsanitize=float-cast-overflow don't call convert_to_integer, but
3974 instead instrument the float cast directly.
3975
b731b390
JJ
39762014-11-29 Jakub Jelinek <jakub@redhat.com>
3977
3978 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
3979 c_finish_stmt_expr): Remove NULL last argument from
3980 create_tmp_var_raw and create_tmp_var calls.
3981 * c-array-notation.c (fix_builtin_array_notation_fn,
3982 build_array_notation_expr, fix_conditional_array_notations_1,
3983 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
3984
541e35a6
MP
39852014-11-28 Marek Polacek <polacek@redhat.com>
3986
3987 PR c/63862
3988 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
3989 convert the right operand to integer type.
3990
b286be94
MP
39912014-11-25 Marek Polacek <polacek@redhat.com>
3992
3993 PR c/63877
3994 * c-decl.c (start_function): Disable -Wmissing-declarations warning
3995 for inline functions.
3996
aa7da51a
JJ
39972014-11-21 Jakub Jelinek <jakub@redhat.com>
3998
3999 PR target/63764
4000 * c-typeck.c (build_array_ref): Adjust
4001 convert_vector_to_pointer_for_subscript caller. If it returns true,
4002 call non_lvalue_loc on the result.
4003
d876207f
RB
40042014-11-11 Richard Biener <rguenther@suse.de>
4005
4006 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
4007 to true.
4008
e5e44252
AK
40092014-11-10 Andi Kleen <ak@linux.intel.com>
4010
4011 PR c/60804
4012 * c-parser.c (c_parser_statement_after_labels): Call
4013 check_no_cilk.
4014 (c_parser_if_statement): Dito.
4015 (c_parser_switch_statement): Dito.
4016 (c_parser_while_statement): Dito.
4017 (c_parser_do_statement): Dito.
4018 (c_parser_for_statement): Dito.
4019 * c-typeck.c (c_finish_loop): Dito.
4020
13c21655
PC
40212014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
4022
4023 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
4024 OPT_Wshift_count_overflow in the warnings.
4025
2d51fcef
MP
40262014-10-30 Marek Polacek <polacek@redhat.com>
4027
4028 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
4029 print the stripped version as well, if they're not the same.
4030
ef4bddc2
RS
40312014-10-29 Richard Sandiford <richard.sandiford@arm.com>
4032
4033 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
4034 machine_mode.
4035
c582198b
AM
40362014-10-28 Andrew MacLeod <amacleod@redhat.com>
4037
4038 * c-decl.c: Adjust include files.
4039 * c-parser.c: Ditto.
4040
ddc8de03
PM
40412014-10-27 Phil Muldoon <pmuldoon@redhat.com>
4042 Tom Tromey <tromey@redhat.com>
4043
4044 * c-tree.h (enum c_oracle_request): New.
4045 (c_binding_oracle_function): New typedef.
4046 (c_binding_oracle, c_pushtag, c_bind): Declare.
4047 * c-decl.c (c_binding_oracle): New global.
4048 (I_SYMBOL_CHECKED): New macro.
4049 (i_symbol_binding): New function.
4050 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
4051 (I_TAG_CHECKED): New macro.
4052 (i_tag_binding): New function.
4053 (I_TAG_BINDING, I_TAG_DECL): Redefine.
4054 (I_LABEL_CHECKED): New macro.
4055 (i_label_binding): New function.
4056 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
4057 (c_print_identifier): Save and restore c_binding_oracle.
4058 (c_pushtag, c_bind): New functions.
4059
60393bbc
AM
40602014-10-27 Andrew MacLeod <amacleod@redhat.com>
4061
4062 * c-typeck.c: Adjust include files.
4063
d723bb7c
MLI
40642014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
4065
4066 PR c++/53061
4067 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
4068 initialization here...
4069 (c_initialize_diagnostics): ... but here. Set defaults after
4070 building pretty-printer.
4071
1bc5a451
MP
40722014-10-23 Marek Polacek <polacek@redhat.com>
4073
4074 PR c/63626
4075 * c-decl.c (pop_scope): Don't print warning in external_scope.
4076
4435bb92
MP
40772014-10-19 Marek Polacek <polacek@redhat.com>
4078
4079 PR c/63567
4080 * c-typeck.c (output_init_element): Allow initializing objects with
4081 static storage duration with compound literals even in C99 and add
4082 pedwarn for it.
4083
7278465e
MP
40842014-10-17 Marek Polacek <polacek@redhat.com>
4085
4086 PR c/63567
4087 * c-typeck.c (digest_init): Allow initializing objects with static
4088 storage duration with compound literals even in C99 and add pedwarn
4089 for it.
4090
d9b7be2e
MP
40912014-10-17 Marek Polacek <polacek@redhat.com>
4092
4093 PR c/63543
4094 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
4095 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
4096 error multiple times. Print the type.
4097
f406ae1f
MP
40982014-10-17 Marek Polacek <polacek@redhat.com>
4099
4100 PR c/63549
4101 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
4102 type.
4103
92574c7c
MP
41042014-10-17 Marek Polacek <polacek@redhat.com>
4105
4106 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
4107 (start_function): Use OPT_Wimplicit_int instead of 0.
4108 (store_parm_decls_oldstyle): Likewise.
4109
1bc4a978
MT
41102014-10-17 Alan Modra <amodra@gmail.com>
4111
4112 PR middle-end/61848
4113 * c-decl.c (merge_decls): Don't merge section name or tls model
4114 to newdecl symtab node, instead merge to olddecl. Override
4115 existing olddecl section name. Set tls_model for all thread-local
4116 vars, not just OMP thread-private ones. Remove incorrect comment.
4117
83685514
AM
41182014-10-16 Andrew MacLeod <amacleod@redhat.com>
4119
4120 * c-decl.c: Adjust include files.
4121
78a7c317
DD
41222014-10-14 DJ Delorie <dj@redhat.com>
4123
4124 * c-parser.c (c_parse_init): Add RID entries for each __intN.
4125 (c_token_starts_typename): Check all __intN, not just __int128.
4126 (c_token_starts_declspecs): Likewise.
4127 (c_parser_declspecs): Likewise.
4128 (c_parser_attribute_any_word): Likewise.
4129 (c_parser_objc_selector): Likewise.
4130 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
4131 (struct c_declspecs): Add int_n_idx field to record *which* __intN
4132 is specified.
4133 * c-decl.c (declspecs_add_type): Check for all __intN, not just
4134 __int128.
4135 (finish_declspecs): Likewise.
4136
74d98c1e
AB
41372014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
4138
8e745a17 4139 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 4140 the duplicate code.
8e745a17 4141 (c_parser_statement): Call the new function.
74d98c1e 4142
84937de2
MP
41432014-10-09 Marek Polacek <polacek@redhat.com>
4144
4145 PR c/63480
4146 * c-typeck.c (pop_init_level): Don't warn about initializing
4147 with { }.
4148
0382aaa0
MP
41492014-10-07 Marek Polacek <polacek@redhat.com>
4150
4151 PR c/59717
4152 * c-decl.c (header_for_builtin_fn): New function.
4153 (implicitly_declare): Suggest which header to include.
4154
7a0ca710
MP
41552014-10-07 Marek Polacek <polacek@redhat.com>
4156
4157 * c-convert.c (convert): Use error_operand_p.
4158 * c-typeck.c (require_complete_type): Likewise.
4159 (really_atomic_lvalue): Likewise.
4160 (digest_init): Likewise.
4161 (handle_omp_array_sections_1): Likewise.
4162
6bc8a126
MP
41632014-10-03 Marek Polacek <polacek@redhat.com>
4164
4165 PR c/63453
4166 * c-decl.c (pop_scope): Don't warn about "inline function declared
4167 but never defined" for functions marked with gnu_inline attribute.
4168
d90c0a59
JJ
41692014-09-25 Jakub Jelinek <jakub@redhat.com>
4170
4171 PR c++/63249
4172 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
4173 on low_bound and length.
4174
083e891e
MP
41752014-09-24 Marek Polacek <polacek@redhat.com>
4176
4177 PR c/61405
4178 PR c/53874
4179 * c-parser.c: Don't define CPP_KEYWORD.
4180 (c_parser_switch_statement): Pass original type to c_finish_case.
4181 * c-tree.h (c_finish_case): Update declaration.
4182 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
4183 conditionally to c_do_switch_warnings.
4184
8d95fe25
MP
41852014-09-03 Marek Polacek <polacek@redhat.com>
4186
4187 PR c/62024
4188 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
4189 conversions.
4190
9a771876
JJ
41912014-09-02 Jakub Jelinek <jakub@redhat.com>
4192 Balaji V. Iyer <balaji.v.iyer@intel.com>
4193 Igor Zamyatin <igor.zamyatin@intel.com>
4194
4195 * c-parser.c (c_parser_cilk_for): New function.
4196 (c_parser_cilk_grainsize): Likewise.
4197 (c_get_temp_regvar): Likewise.
4198 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
4199 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
4200 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
4201 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
4202 case.
4203
b7679d96
CG
42042014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
4205
4206 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
4207 with using HOST_WIDE_INT without truncation to 'int'
4208
59ea0364
MP
42092014-08-22 Marek Polacek <polacek@redhat.com>
4210
4211 PR c++/62199
4212 * c-typeck.c (parser_build_binary_op): Adjust call to
4213 warn_logical_not_parentheses.
4214
671a475e
IZ
42152014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
4216
4217 PR other/62008
4218 * c-parser.c (c_parser_array_notation): Check for correct
4219 type of an array added.
4220
04159acf
MP
42212014-08-19 Marek Polacek <polacek@redhat.com>
4222
4223 PR c++/62153
4224 * c-typeck.c (build_binary_op): If either operand of a comparison
4225 is a boolean expression, call maybe_warn_bool_compare.
4226
c77935ee
PP
42272014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
4228
4229 PR c/45584
4230 * c-typeck.c (build_c_cast): Do a conversion even when the
4231 TYPE_MAIN_VARIANTs are the same.
4232
35aff4fb
MP
42332014-08-19 Marek Polacek <polacek@redhat.com>
4234
4235 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
4236 pedwarn_c99 instead of pedwarn.
4237 (grokfield): Likewise.
4238 (warn_defaults_to): New function.
4239 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
4240 Unconditionally call pedwarn_c99 instead of pedwarn.
4241 (start_function): Call warn_defaults_to instead of pedwarn_c99.
4242 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
4243 check flag_isoc11 before.
4244 * c-errors.c (pedwarn_c99): Change the return type to bool.
4245 Handle -Wc99-c11-compat.
4246 * c-parser.c (disable_extension_diagnostics): Handle
4247 warn_c99_c11_compat.
4248 (restore_extension_diagnostics): Likewise.
4249 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
4250 instead of pedwarn, don't check flag_isoc11 before.
4251 (c_parser_declspecs): Likewise.
4252 (c_parser_alignas_specifier): Likewise.
4253 (c_parser_alignof_expression): Likewise.
4254 (c_parser_generic_selection): Likewise.
4255 * c-tree.h (pedwarn_c99): Update declaration.
4256 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
4257 of pedwarn_c99.
4258
177cce46
MP
42592014-08-19 Marek Polacek <polacek@redhat.com>
4260
4261 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
4262 to pedwarn_c90.
4263 * c-errors.c: Include "opts.h".
4264 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
4265 * c-parser.c (disable_extension_diagnostics): Handle negative value
4266 of warn_c90_c99_compat, too.
4267 (restore_extension_diagnostics): Likewise.
4268 (c_parser_compound_statement_nostart): Pass
4269 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
4270
6dc99c33
MP
42712014-08-12 Marek Polacek <polacek@redhat.com>
4272
4273 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
4274 Add pedwarn.
4275 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
4276 Likewise.
4277 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
4278
3f8257db 42792014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
4280
4281 PR c/51849
4282 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
4283 Call pedwarn_c90 instead of pedwarn.
4284 (check_bitfield_type_and_width): Likewise.
4285 (declspecs_add_qual): Likewise.
4286 (declspecs_add_type): Likewise.
4287 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
4288 Adjust to only call pedwarn_c90.
4289 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
4290 pedwarn_c90 instead of pedwarn.
4291 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
4292 * c-parser.c (disable_extension_diagnostics): Handle
4293 warn_c90_c99_compat.
4294 (restore_extension_diagnostics): Likewise.
4295 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
4296 pedwarn_c90 instead of pedwarn.
4297 (c_parser_initelt): Likewise.
4298 (c_parser_postfix_expression): Likewise.
4299 (c_parser_postfix_expression_after_paren_type): Likewise.
4300 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
4301 * c-tree.h: Fix formatting.
4302 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
4303 pedwarn_c90 instead of pedwarn.
4304
9f25a338
TS
43052014-08-07 Trevor Saunders <tsaunders@mozilla.com>
4306
4307 * c-typeck.c: Remove include of pointer-set.h.
4308
044331a8
MP
43092014-08-07 Marek Polacek <polacek@redhat.com>
4310
4311 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
4312
b787e7a2
TS
43132014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4314
4315 * c-typeck.c: Use hash_map instead of pointer_map.
4316
6e2830c3
TS
43172014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4318
4319 * c-decl.c: Use hash_set instead of pointer_set.
4320
a7ee52fb
IZ
43212014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
4322
4323 PR middle-end/61455
4324 * c-array-notation.c (expand_array_notations): Handling
4325 of DECL_EXPR added.
4326
b4dfdc11
MG
43272014-07-31 Marc Glisse <marc.glisse@inria.fr>
4328
4329 PR c++/60517
4330 * c-typeck.c (c_finish_return): Return 0 instead of the address of
4331 a local variable.
4332
976d5a22
TT
43332014-07-30 Tom Tromey <tromey@redhat.com>
4334
4335 * c-typeck.c (struct constructor_stack) <designator_depth>: New
4336 field.
4337 (really_start_incremental_init, push_init_level): Initialize
4338 designator_depth.
4339 (pop_init_level): Set global designator_depth.
4340 (process_init_element): Check for designated_init attribute.
4341
30281de2
MP
43422014-07-20 Marek Polacek <polacek@redhat.com>
4343
4344 PR c/61852
4345 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
4346 (implicitly_declare): Pass location to implicit_decl_warning.
4347
b108f48f
JJ
43482014-07-14 Jakub Jelinek <jakub@redhat.com>
4349
4350 PR middle-end/61294
4351 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
4352 If non-NULL, call c_parser_check_literal_zero.
4353 (c_parser_check_literal_zero): New function.
4354 (c_parser_postfix_expression_after_primary): Adjust
4355 c_parser_expr_list caller, handle -Wmemset-transposed-args.
4356
773ec47f
MP
43572014-07-06 Marek Polacek <polacek@redhat.com>
4358
4359 PR c/6940
4360 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4361 * c-tree.h (C_ARRAY_PARAMETER): Define.
4362 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4363 function parameter.
4364
22e1cf1c 43652014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 4366 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
4367
4368 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4369 releasing symbol.
4370
52ec0ea3
MP
43712014-07-01 Marek Polacek <polacek@redhat.com>
4372
4373 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4374 instead of 0 to WARN_FOR_ASSIGNMENT.
4375
d5c3d343
MP
43762014-07-01 Marek Polacek <polacek@redhat.com>
4377
4378 PR c/58286
4379 * c-typeck.c (convert_for_assignment): Pass
4380 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4381
6a7253a4
MP
43822014-06-30 Marek Polacek <polacek@redhat.com>
4383
4384 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4385 has no_sanitize_undefined attribute.
4386
5e88a8f4
IZ
43872014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
4388
4389 PR middle-end/57541
4390 * c-array-notation.c (fix_builtin_array_notation_fn):
4391 Check for 0 arguments in builtin call. Check that bultin argument is
4392 correct.
4393 * c-parser.c (c_parser_array_notation): Check for incorrect initial
4394 index.
4395
9698b078
SH
43962014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
4397
4398 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
4399 qualifiers in __auto_type for atomic types.
4400 (c_parser_typeof_specifier): Discard all type qualifiers in
4401 __typeof__ for atomic types.
4402
6e07c515
MP
44032014-06-25 Marek Polacek <polacek@redhat.com>
4404
4405 PR c/61162
4406 * c-parser.c (c_parser_statement_after_labels): Pass the location of
4407 the return expression to c_finish_return.
4408
da6f124d
JJ
44092014-06-25 Jakub Jelinek <jakub@redhat.com>
4410
4411 * c-typeck.c (c_finish_omp_clauses): Make sure
4412 OMP_CLAUSE_LINEAR_STEP has correct type.
4413
c203e8a7
TS
44142014-06-24 Trevor Saunders <tsaunders@mozilla.com>
4415
4416 * c-decl.c: Adjust.
4417
56ad0e38
JJ
44182014-06-24 Jakub Jelinek <jakub@redhat.com>
4419
4420 * c-parser.c (c_parser_omp_for_loop): For
4421 #pragma omp parallel for simd move lastprivate clause from parallel
4422 to for rather than simd.
4423
47c2554f
MP
44242014-06-23 Marek Polacek <polacek@redhat.com>
4425
4426 * c-typeck.c (parser_build_binary_op): Don't call
4427 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
4428
56363ffd
JH
44292014-06-15 Jan Hubicka <hubicka@ucw.cz>
4430
4431 * c-parser.c (c_parser_omp_threadprivate): Likewise.
4432 * c-decl.c (merge_decls): Likewise.
4433
d7ff7ae5
MP
44342014-06-09 Marek Polacek <polacek@redhat.com>
4435
4436 PR c/36446
4437 * c-typeck.c (error_init): Call inform instead of error_at.
4438 (pedwarn_init): Call inform instead of pedwarn.
4439 (warning_init): Call inform instead of warning_at.
4440
24d047a3
JH
44412014-06-07 Jan Hubicka <hubicka@ucw.cz>
4442
4443 * c-decl.c (merge_decls): Use set_decl_section_name.
4444 (duplicate_decls): Remove node if it exists.
4445
9bac5cbb
G
44462014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
4447
4448 PR c/53119
4449 * c-typeck.c (push_init_level, process_init_element,
4450 pop_init_level): Correct check for zero initialization, move
4451 missing brace warning to respect zero initialization.
4452
8ffcdea8
MP
44532014-06-05 Marek Polacek <polacek@redhat.com>
4454
4455 PR c/56724
4456 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
4457
742938c9
MP
44582014-06-05 Marek Polacek <polacek@redhat.com>
4459
4460 PR c/49706
4461 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
4462 on the left hand side operand of a comparison.
4463
6447c55d
MP
44642014-06-05 Marek Polacek <polacek@redhat.com>
4465
4466 PR c/48062
4467 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
4468 Print note only if the warning was printed.
4469
9dc7743c
IZ
44702014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
4471
4472 PR c/58942
4473 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4474 with a pointer.
4475
fedfecef
MP
44762014-06-03 Marek Polacek <polacek@redhat.com>
4477
4478 PR c/60439
4479 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4480 c_start_case.
4481 * c-tree.h (c_start_case): Update.
4482 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
4483 switch condition has boolean value.
4484
9b2b7279
AM
44852014-06-02 Andrew MacLeod <amacleod@redhat.com>
4486
4487 * c-decl.c: Include builtins.h.
4488 * c-parser.c: Likewise.
4489
5c1bc275
MP
44902014-05-27 Marek Polacek <polacek@redhat.com>
4491
4492 PR c/56724
4493 * c-typeck.c (convert_arguments): Get location of a parameter. Change
4494 error and warning calls to error_at and warning_at. Pass location of
4495 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
4496 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4497 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
4498
97563bc8
IZ
44992014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
4500
4501 PR c/61191
4502 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4503 function parameters.
4504
aede2c10
JH
45052014-05-23 Jan Hubicka <hubicka@ucw.cz>
4506
4507 * c-decl.c (merge_decls): Preserve symtab node pointers.
4508 (duplicate_decls): Free new decl.
4509
edbba2ce
TS
45102014-05-23 Thomas Schwinge <thomas@codesourcery.com>
4511
f3316c6d
TS
4512 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4513 initialization.
4514
edbba2ce
TS
4515 * c-parser.c (c_parser_omp_target): Return bool values.
4516
68c81f24
TS
45172014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4518
4519 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4520 num_teams_loc variable to num_thread_limit_loc.
4521
632f2871
RS
45222014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4523
4524 * c-array-notation.c (expand_array_notations): Use void_node
4525 instead of void_zero_node.
4526
766090c2
TS
45272014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4528
4529 * c-decl.c (finish_struct): Adjust.
4530 (finish_enum): Likewise.
4531 (bind): Adjust.
4532 (record_inline_static): Likewise.
4533 (push_scope): Likewise.
4534 (make_label): Likewise.
4535 (lookup_label_for_goto): Likewise.
4536 (finish_struct): Likewise.
4537 (finish_enum): Likewise.
4538 (store_parm_decls): Likewise.
4539 (c_push_function_context): Likewise.
4540 * c-lang.h: Remove usage of variable_size gty attribute.
4541 * c-parser.c (c_parse_init): Adjust.
4542 (c_parse_file): Likewise.
4543
2b107f6b
MP
45442014-05-13 Marek Polacek <polacek@redhat.com>
4545
4546 PR c/61162
4547 * c-typeck.c (convert_for_assignment): Pass location to
4548 WARN_FOR_ASSIGNMENT instead of input_location.
4549
d033409e
MP
45502014-05-10 Marek Polacek <polacek@redhat.com>
4551
4552 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4553 maybe_warn_string_init.
4554 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4555 maybe_warn_string_init.
4556 * c-tree.h (maybe_warn_string_init): Update declaration.
4557 * c-typeck.c (maybe_warn_string_init): Add location parameter.
4558 Call pedwarn_init with loc instead of with input_location.
4559 (digest_init): Pass init_loc to maybe_warn_string_init.
4560 (pop_init_level): Call pedwarn_init with loc instead of with
4561 input_location.
4562 (set_init_index): Likewise.
4563 (process_init_element): Likewise.
4564
ea58ef42
MP
45652014-05-09 Marek Polacek <polacek@redhat.com>
4566
4567 PR c/61096
4568 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4569 (c_parser_initelt): Pass location to set_init_label. Pass array index
4570 location to set_init_index.
4571 * c-tree.h (push_init_level): Update declaration.
4572 (pop_init_level): Likewise.
4573 (set_init_index): Likewise.
4574 (set_init_label): Likewise.
4575 * c-typeck.c (error_init): Add location parameter. Call error_at
4576 instead of error.
4577 (digest_init): Pass init_loc to error_init.
4578 (really_start_incremental_init):
4579 (push_init_level): Add location parameter. Pass loc to pop_init_level
4580 and error_init.
4581 (pop_init_level): Likewise.
4582 (set_designator): Add location parameter. Pass loc to pop_init_level,
4583 push_init_level, and error_init.
4584 (set_init_index): Add location parameter. Pass loc to error_init and
4585 set_designator.
4586 (set_init_label): Likewise.
4587 (output_init_element): Pass loc to error_init.
4588 (process_init_element): Pass loc to error_init, pop_init_level,
4589 pedwarn_init, and push_init_level.
4590
661a0813
MP
45912014-05-09 Marek Polacek <polacek@redhat.com>
4592
4593 PR c/50459
4594 * c-parser.c (c_parser_attributes): Parse the arguments as an
4595 expression-list if the attribute takes identifier.
4596
2793eeab
MP
45972014-05-08 Marek Polacek <polacek@redhat.com>
4598
4599 PR c/61053
4600 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4601 TYPE_ALIGN_UNIT.
4602
f827930a
MP
46032014-05-08 Marek Polacek <polacek@redhat.com>
4604
4605 PR c/61077
4606 * c-decl.c (start_function): Warn for _Atomic-qualified return type
4607 of main.
4608
1d60af08
KZ
46092014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4610 Mike Stump <mikestump@comcast.net>
4611 Richard Sandiford <rdsandiford@googlemail.com>
4612
4613 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4614 (finish_enum): Use wide-int interfaces.
4615 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4616 * c-typeck.c (build_c_cast): Likewise.
4617 (set_nonincremental_init_from_string): Likewise.
4618 (c_tree_equal): Likewise.
4619
a0e24419
MP
46202014-05-02 Marek Polacek <polacek@redhat.com>
4621
4622 PR c/25801
4623 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
4624 Return size_one_node when the type is not complete.
4625 (pointer_diff): Remove comment.
4626 (build_unary_op): Improve error messages.
4627
19fc9faa
MP
46282014-05-02 Marek Polacek <polacek@redhat.com>
4629
4630 * c-typeck.c (c_finish_return): Separate warning_at calls.
4631
63bc4e87
MP
46322014-05-02 Marek Polacek <polacek@redhat.com>
4633
4634 * c-tree.h (error_init): Remove declaration.
4635 (pedwarn_init): Likewise.
4636 * c-typeck.c (error_init): Make static and move above.
4637 (pedwarn_init): Likewise.
4638 (warning_init): Move above.
4639 (maybe_warn_string_init): Likewise.
4640
4bd2511b
JL
46412014-05-01 Jeff Law <law@redhat.com>
4642
4643 Revert:
4644
4645 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4646 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
4647 avoid goto.
4648
6a358dcb
MP
46492014-05-02 Marek Polacek <polacek@redhat.com>
4650
4651 PR c/60784
4652 * c-typeck.c (push_init_level): Set constructor_designated to
4653 p->designated for structures.
4654
ae5ebda4
MP
46552014-05-01 Marek Polacek <polacek@redhat.com>
4656
4657 PR c/60915
4658 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4659 function-definition has an attribute after the declarator.
4660
96b40f8d
MP
46612014-05-01 Marek Polacek <polacek@redhat.com>
4662
4663 PR c/60257
4664 * c-typeck.c (warning_init): Add location_t parameter. Call
4665 warning_at instead of warning.
4666 (push_init_level): Pass input_location to warning_init.
4667 (add_pending_init): Add location_t parameter. Pass loc to
4668 warning_init.
4669 (set_nonincremental_init): Pass input_location to add_pending_init.
4670 (set_nonincremental_init_from_string): Likewise.
4671 (output_init_element): Pass loc to warning_init and to
4672 add_pending_init.
4673
32e00768
MP
46742014-05-01 Marek Polacek <polacek@redhat.com>
4675
4676 PR c/43395
4677 * c-typeck.c (c_finish_return): Distinguish between label and variable
4678 when warning about returning local address.
4679
c9379ce2
MP
46802014-05-01 Marek Polacek <polacek@redhat.com>
4681
4682 PR c/29467
4683 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
4684 in C89 mode.
4685
d00887e8
MP
46862014-05-01 Marek Polacek <polacek@redhat.com>
4687
4688 PR c/43245
4689 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
4690 instead of 0 to WARN_FOR_QUALIFIERS.
4691
5436fa2e
MP
46922014-05-01 Marek Polacek <polacek@redhat.com>
4693
4694 PR c/56989
4695 * c-typeck.c (default_conversion): Use better location for
4696 error call.
4697
f8ed5150
MP
46982014-04-30 Marek Polacek <polacek@redhat.com>
4699
4700 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
4701 also when SANITIZE_FLOAT_DIVIDE is on.
4702
8337d1db
MP
47032014-04-30 Marek Polacek <polacek@redhat.com>
4704
4705 PR c/60139
4706 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
4707 and pedwarn_init. Use loc insted of input_location.
4708
c4bdc42f
MP
47092014-04-30 Marek Polacek <polacek@redhat.com>
4710
4711 PR c/60351
4712 * c-typeck.c (build_binary_op): Use location when warning about
4713 shift count.
4714
45484dcf
MP
47152014-04-25 Marek Polacek <polacek@redhat.com>
4716
4717 PR c/18079
4718 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
4719 always_inline/noinline and hot/cold attributes.
4720
34cf811f
MP
47212014-04-25 Marek Polacek <polacek@redhat.com>
4722
4723 PR c/60114
4724 * c-parser.c (c_parser_initelt): Pass input_location to
4725 process_init_element.
4726 (c_parser_initval): Pass loc to process_init_element.
4727 * c-tree.h (process_init_element): Adjust declaration.
4728 * c-typeck.c (push_init_level): Pass input_location to
4729 process_init_element.
4730 (pop_init_level): Likewise.
4731 (set_designator): Likewise.
4732 (output_init_element): Add location_t parameter. Pass loc to
4733 digest_init.
4734 (output_pending_init_elements): Pass input_location to
4735 output_init_element.
4736 (process_init_element): Add location_t parameter. Pass loc to
4737 output_init_element.
4738
42056eac
JJ
47392014-04-24 Jakub Jelinek <jakub@redhat.com>
4740
4741 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
4742 atomic-clause, allow comma in between atomic-clause and
4743 seq_cst.
4744
e162a134
JJ
47452014-04-22 Jakub Jelinek <jakub@redhat.com>
4746
4747 PR c/59073
4748 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
4749 fails, don't set OM_PARALLEL_COMBINED and return NULL.
4750
2f6babac
IZ
47512014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
4752
4753 PR middle-end/60469
4754 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4755 create_tmp_var instead build_decl for creating temps.
4756 (build_array_notation_expr): Likewise.
4757 (fix_conditional_array_notations_1): Likewise.
4758 (fix_array_notation_expr): Likewise.
4759 (fix_array_notation_call_expr): Likewise.
4760
8edbfaa6
JJ
47612014-03-28 Jakub Jelinek <jakub@redhat.com>
4762
4763 PR c++/60689
4764 * c-tree.h (c_build_function_call_vec): New prototype.
4765 * c-typeck.c (build_function_call_vec): Don't call
4766 resolve_overloaded_builtin here.
4767 (c_build_function_call_vec): New wrapper function around
4768 build_function_call_vec. Call resolve_overloaded_builtin here.
4769 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
4770 Call c_build_function_call_vec instead of build_function_call_vec.
4771 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4772 * c-decl.c (finish_decl): Likewise.
4773
7485aeea
MLI
47742014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4775
4776 PR c/55383
4777 * c-typeck.c: Use correct format string in cast-qual warning
4778
b17a8b07
TS
47792014-03-07 Thomas Schwinge <thomas@codesourcery.com>
4780
4781 * c-decl.c (c_decl_attributes): Use
4782 lang_hooks.types.omp_mappable_type.
4783 * c-typeck.c (c_finish_omp_clauses): Likewise.
4784
3af9c5e9
MP
47852014-03-06 Marek Polacek <polacek@redhat.com>
4786
4787 PR c/60197
4788 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
4789 of checking tree code.
4790
1c9f5f33
PK
47912014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4792
4793 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
4794 (c_parser_parameter_declaration): Likewise.
4795
cc28fc7f
MP
47962014-02-19 Marek Polacek <polacek@redhat.com>
4797
4798 PR c/60195
4799 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
4800 Call mark_exp_read on exp.value.
4801 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
4802 TREE_ADDRESSABLE on old instead of val.
4803 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
4804
b581c05c
PK
48052014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4806
4807 * c-parser.c (c_parser_get_builtin_args): Replace calls to
4808 C_EXPR_APPEND by vec_safe_push.
4809 * c-tree.h (C_EXPR_APPEND): Remove.
4810
81e5eca8
MP
48112014-01-31 Marek Polacek <polacek@redhat.com>
4812
4813 PR c/59963
4814 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
4815 build_function_call_vec.
4816 (build_function_call): Likewise.
4817 (build_atomic_assign): Likewise.
4818 (build_function_call_vec): Add arg_loc parameter. Use it.
4819 (convert_arguments): Likewise.
4820 (convert_for_assignment): Rename rhs_loc to expr_loc.
4821 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
4822 (c_parser_objc_keywordexpr): Likewise.
4823 (c_parser_postfix_expression_after_primary): Call
4824 build_function_call_vec with expr_loc rather than op_loc.
4825 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
4826 build_function_call_vec.
4827 (c_parser_expr_list): Add locations parameter. Fill it with locations
4828 of function arguments.
4829 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
4830
68fca595
MP
48312014-01-30 Marek Polacek <polacek@redhat.com>
4832
4833 PR c/59940
4834 * c-typeck.c (build_function_call_vec): Use loc parameter.
4835 (convert_arguments): Add location parameter. Use it.
4836 (ep_convert_and_check): Likewise.
4837 (build_atomic_assign): Adjust convert_for_assignment call.
4838 (build_modify_expr): Likewise.
4839 (digest_init): Likewise.
4840 (c_finish_return): Likewise.
4841 (build_conditional_expr): Adjust ep_convert_and_check calls.
4842 (convert_for_assignment): Add rhs_loc parameter. Use it.
4843 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
4844 calls.
4845
fa337f3a
RB
48462014-01-30 Richard Biener <rguenther@suse.de>
4847
4848 PR c/59905
4849 * c-typeck.c (build_function_call_vec): Do not replace calls
4850 to a function via an incompatible type with a runtime abort.
4851
b72271b9
BI
48522014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
4853
4854 * c-parser.c (c_parser_declaration_or_fndef): Replaced
4855 flag_enable_cilkplus with flag_cilkplus.
4856 (c_parser_direct_declarator_inner): Likewise.
4857 (c_parser_attribute_any_word): Likewise.
4858 (c_parser_attributes): Likewise.
4859 (c_parser_compound_statement): Likewise.
4860 (c_parser_statement_after_labels): Likewise.
4861 (c_parser_if_statement): Likewise.
4862 (c_parser_switch_statement): Likewise.
4863 (c_parser_do_statement): Likewise.
4864 (c_parser_for_statement): Likewise.
4865 (c_parser_unary_expression): Likewise.
4866 (c_parser_postfix_expression): Likewise.
4867 (c_parser_postfix_expression_after_primary): Likewise.
4868 (c_parser_postfix_expression_after_primary): Likewise.
4869 (c_parser_omp_clause_name): Likewise.
4870 (c_finish_omp_declare_simd): Likewise.
4871 (c_parser_cilk_verify_simd): Likewise.
4872 * c-typeck.c (build_array_ref): Likewise.
4873 (build_function_call_vec): Likewise.
4874 (convert_arguments): Likewise.
4875 (build_compound_expr): Likewise.
4876 (c_finish_return): Likewise.
4877 (c_finish_if_stmt): Likewise.
4878 (c_finish_loop): Likewise.
4879 (build_binary_op): Likewise.
4880
393e8e8b
MP
48812014-01-23 Marek Polacek <polacek@redhat.com>
4882
4883 PR c/59846
4884 * c-typeck.c (parser_build_binary_op): Use location instead of
4885 input_location.
4886 (build_binary_op): Pass location to shorten_compare.
4887
f04dda30
MP
48882014-01-23 Marek Polacek <polacek@redhat.com>
4889
4890 PR c/58346
4891 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
4892 an empty aggregate.
4893
789eadcd
MP
48942014-01-23 Marek Polacek <polacek@redhat.com>
4895
4896 PR c/59871
4897 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
4898 of a comma expression.
4899 (emit_side_effect_warnings): Likewise.
4900
40f14e9f
BI
49012014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4902
4903 PR c/59825
4904 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
4905 function to use walk_tree and moved a lot of its functionality to
4906 expand_array_notations.
4907 (expand_array_notations): New function.
4908
74558dd9
BI
49092014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4910
4911 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
4912 attribute an attribute without value.
4913
652fea39
JJ
49142014-01-23 Jakub Jelinek <jakub@redhat.com>
4915
4916 PR middle-end/58809
4917 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
4918 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
4919
f34f1c87
MP
49202014-01-22 Marek Polacek <polacek@redhat.com>
4921
4922 PR c/59891
4923 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
4924 of remove_c_maybe_const_expr on op1 and op2.
4925
241f845a
JJ
49262014-01-15 Jakub Jelinek <jakub@redhat.com>
4927
4928 PR c/58943
4929 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
4930 effects, preevaluate rhs using SAVE_EXPR first.
4931
9a74f20c
BI
49322014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
4933
4934 PR c++/59631
4935 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
4936 statements with if-elseif statements.
4937
96066ce1
MP
49382014-01-06 Marek Polacek <polacek@redhat.com>
4939
4940 PR c/57773
4941 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
4942 defined bit-field types only in ISO C.
4943
23a5b65a
RS
49442014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4945
4946 Update copyright years
4947
f9030485
RS
49482014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4949
4950 * c-array-notation.c: Use the standard form for the copyright notice.
4951
41958c28
BI
49522013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
4953
4954 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
4955 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
4956 field in parser is not empty. If not-empty, call the function
4957 c_parser_finish_omp_declare_simd.
4958 (c_parser_cilk_clause_vectorlength): Modified function to be shared
4959 between SIMD-enabled functions and #pragma simd. Added new parameter.
4960 (c_parser_cilk_all_clauses): Modified the usage of the function
4961 c_parser_cilk_clause_vectorlength as mentioned above.
4962 (c_parser_cilk_simd_fn_vector_attrs): New function.
4963 (c_finish_cilk_simd_fn_tokens): Likewise.
4964 (is_cilkplus_vector_p): Likewise.
4965 (c_parser_omp_clause_name): Added checking for "vectorlength,"
4966 "nomask," and "mask" strings in clause name.
4967 (c_parser_omp_all_clauses): Added 3 new case statements:
4968 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
4969 PRAGMA_CILK_CLAUSE_NOMASK.
4970 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
4971 check for vector attribute and if so call the function
4972 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
4973 called the function c_finish_cilk_simd_fn_tokens.
4974 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
4975 parser field is non-empty. If so, parse them as you would parse
4976 the omp declare simd pragma.
4977 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
4978 Added a check when step is a parameter and flag it as error.
4979 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
4980 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
4981 pragma_omp_clause.
4982
cef0fd0e
TS
49832013-12-17 Thomas Schwinge <thomas@codesourcery.com>
4984
4985 * c-parser.c (c_parser_omp_parallel): Fix description.
4986
12893402
BI
49872013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
4988
4989 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
4990 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4991 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
4992 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
4993
296674db
JM
49942013-12-04 Joseph Myers <joseph@codesourcery.com>
4995
4996 PR c/52023
4997 * c-parser.c (c_parser_alignas_specifier): Use
4998 c_sizeof_or_alignof_type instead of c_alignof.
4999 (c_parser_alignof_expression): Likewise, with min_alignof
5000 parameter depending on alignof spelling used.
5001
edd28054
MP
50022013-12-04 Marek Polacek <polacek@redhat.com>
5003
5004 PR c/54113
5005 * c-decl.c (start_function): Don't warn for missing prototype for
5006 inline functions.
5007
da0fc454
MP
50082013-12-03 Marek Polacek <polacek@redhat.com>
5009
5010 PR c/59351
5011 * c-decl.c (build_compound_literal): Allow compound literals with
5012 empty initial value.
5013
4c2ecab0
JM
50142013-12-02 Joseph Myers <joseph@codesourcery.com>
5015
5016 PR c/58235
5017 * c-typeck.c (build_modify_expr): Diagnose assignment to
5018 expression with array type.
5019
340baef7
JM
50202013-11-29 Joseph Myers <joseph@codesourcery.com>
5021
5022 PR c/42262
5023 * c-typeck.c (process_init_element): Do not treat a string as
5024 initializing a whole array when used with a designator for an
5025 individual element.
5026
6763b9f7
JM
50272013-11-29 Joseph Myers <joseph@codesourcery.com>
5028
5029 PR c/57574
5030 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
5031 an inline function following a static declaration.
5032
e7bd1de1
JJ
50332013-11-28 Jakub Jelinek <jakub@redhat.com>
5034
5035 PR c/59310
5036 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
5037 to p_name before calling c_parser_omp_teams instead of after.
5038 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
5039 argument. Remove unused p_name variable.
5040
0136f8f0
AH
50412013-11-27 Aldy Hernandez <aldyh@redhat.com>
5042 Jakub Jelinek <jakub@redhat.com>
5043
5044 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
5045 external_scope is NULL.
5046
241b71bb
TV
50472013-11-27 Tom de Vries <tom@codesourcery.com>
5048 Marc Glisse <marc.glisse@inria.fr>
5049
5050 PR c++/59032
5051 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
5052
2fb9a547
AM
50532013-11-22 Andrew MacLeod <amacleod@redhat.com>
5054
5055 * c-typeck.c: Add required include files from gimple.h.
5056
8400e75e
DM
50572013-11-22 David Malcolm <dmalcolm@redhat.com>
5058
5059 * c-decl.c (define_label, shadow_tag_warned)
5060 (check_bitfield_type_and_width, grokdeclarator, grokparms,
5061 store_parm_decls_newstyle, store_parm_decls_oldstyle)
5062 (declspecs_add_type): Remove use of in_system_header macro.
5063 * c-parser.c (c_parser_unary_expression): Likewise.
5064 * c-typeck.c (store_init_value, process_init_element)
5065 (c_start_case): Likewise.
5066
5067 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
5068 macro.
5069
5070 * c-parser.c (c_parser_set_source_position_from_token): Remove
5071 reference to in_system_header from comment.
5072
386b1f1f
RS
50732013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5074
5075 * c-decl.c (grokdeclarator): Update comment to refer to
5076 tree_to_[su]hwi rather than tree_low_cst.
5077
ae7e9ddd
RS
50782013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5079
5080 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
5081 tree_to_uhwi throughout.
5082
9439e9a1
RS
50832013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5084
5085 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
5086 throughout.
5087
9541ffee
RS
50882013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5089
5090 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
5091 throughout.
5092
c02065fc
AH
50932013-11-15 Aldy Hernandez <aldyh@redhat.com>
5094
5095 * c-parser.c (c_parser_cilk_simd): New.
5096 (c_parser_cilk_verify_simd): New.
5097 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
5098 (c_parser_omp_for_loop): Add case for NE_EXPR.
5099 Set c_break_label for CILK_SIMD.
5100 (c_parser_cilk_clause_vectorlength): New.
5101 (c_parser_cilk_clause_linear): New.
5102 (c_parser_cilk_clause_name): New.
5103 (c_parser_cilk_all_clauses): New.
5104 * c-typeck.c (build_unary_op): Pass location argument to
5105 readonly_error.
5106 (build_modify_expr): Same.
5107 (build_asm_expr): Same.
5108 (c_finish_bc_stmt): Error on break/continue in loops.
5109
18f429e2
AM
51102013-11-14 Andrew MacLeod <amacleod@redhat.com>
5111
5112 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
5113
d8a2d370
DN
51142013-11-14 Diego Novillo <dnovillo@google.com>
5115
5116 * c-decl.c: Include print-tree.h.
5117 Include stor-layout.h.
5118 Include varasm.h.
5119 Include attribs.h.
5120 Include stringpool.h.
5121 * c-lang.c: Include fold-const.h.
5122 * c-parser.c: Include stringpool.h.
5123 Include attribs.h.
5124 Include stor-layout.h.
5125 Include varasm.h.
5126 Include trans-mem.h.
5127 * c-typeck.c: Include stor-layout.h.
5128 Include trans-mem.h.
5129 Include varasm.h.
5130 Include stmt.h.
5131
38b7bc7f
JM
51322013-11-13 Joseph Myers <joseph@codesourcery.com>
5133
5134 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
5135 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
5136 __auto_type.
5137 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
5138 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
5139 RID_AUTO_TYPE.
5140 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
5141 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
5142 (c_parser_declarator, c_parser_direct_declarator_inner)
5143 (c_parser_parameter_declaration, c_parser_type_name): All callers
5144 changed.
5145 (c_parser_declaration_or_fndef): Handle declarations with type
5146 determined from the initializer.
5147
45b0be94
AM
51482013-11-12 Andrew MacLeod <amacleod@redhat.com>
5149
18f429e2 5150 * c-typeck.c: Include gimplify.h.
45b0be94 5151
582d9b50
JM
51522013-11-12 Joseph Myers <joseph@codesourcery.com>
5153
5154 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
5155 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
5156 comment.
5157 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
5158 or _Thread_local as appropriate in diagnostics.
5159 (build_null_declspecs): Initialize ret->thread_gnu_p.
5160 (declspecs_add_scspec): Handle either __thread or _Thread_local
5161 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
5162 pedantic. Do not disallow _Thread_local extern and _Thread_local
5163 static.
5164
267bac10
JM
51652013-11-07 Joseph Myers <joseph@codesourcery.com>
5166 Andrew MacLeod <amacleod@redhat.com>
5167
5168 * c-aux-info.c (gen_type): Handle atomic qualifier.
5169 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
5170 qualifiers when compating types.
5171 (shadow_tag_warned): Handle atomic_p in declspecs.
5172 (quals_from_declspecs): Likewise.
5173 (start_decl): Use c_type_promotes_to when promoting argument
5174 types.
5175 (grokdeclarator): Handle _Atomic.
5176 (get_parm_info): Diagnose any qualifier on "void" as only
5177 parameter.
5178 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
5179 comparing types. Use c_type_promotes_to when promoting argument
5180 types.
5181 (finish_function): Use c_type_promotes_to when promoting argument
5182 types.
5183 (build_null_declspecs): Handle atomic_p in declspecs.
5184 (declspecs_add_qual): Handle RID_ATOMIC.
5185 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
5186 (c_token_starts_declspecs): Handle RID_ATOMIC.
5187 (c_parser_declspecs): Handle atomic type specifiers and
5188 qualifiers.
5189 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
5190 from types of expressions with atomic type.
5191 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
5192 (c_parser_attribute_any_word): Handle RID_ATOMIC.
5193 (c_parser_initializer, c_parser_initelt, c_parser_initval)
5194 (c_parser_statement_after_labels, c_parser_switch_statement)
5195 (c_parser_for_statement, c_parser_expr_no_commas)
5196 (c_parser_conditional_expression, c_parser_binary_expression)
5197 (c_parser_cast_expression, c_parser_unary_expression)
5198 (c_parser_postfix_expression)
5199 (c_parser_postfix_expression_after_primary, c_parser_expression):
5200 Use convert_lvalue_to_rvalue.
5201 (c_parser_expression_conv, c_parser_expr_list): Document
5202 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
5203 (c_parser_objc_synchronized_statement): Use
5204 convert_lvalue_to_rvalue.
5205 (c_parser_objc_selector): Handle RID_ATOMIC.
5206 (c_parser_objc_receiver, c_parser_array_notation): Use
5207 convert_lvalue_to_rvalue.
5208 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
5209 _Atomic (type-name).
5210 (struct c_declspecs): Add atomic_p field.
5211 (convert_lvalue_to_rvalue): Declare.
5212 * c-typeck.c (c_type_promotes_to): Promote atomic types to
5213 corresponding atomic types.
5214 (qualify_type): Don't add _Atomic qualifiers from second argument.
5215 (comp_target_types): Do not allow _Atomic mismatches.
5216 (type_lists_compatible_p): Do not remove atomic qualifiers when
5217 comparing types.
5218 (really_atomic_lvalue, convert_lvalue_to_rvalue)
5219 (build_atomic_assign): New functions.
5220 (build_unary_op): Use build_atomic_assign for atomic increment and
5221 decrement.
5222 (build_conditional_expr): Do not treat _Atomic void as a qualified
5223 version of void.
5224 (build_modify_expr): Use build_atomic_assign for atomic LHS.
5225 (find_anonymous_field_with_type, convert_to_anonymous_field)
5226 (convert_for_assignment): Do not remove atomic qualifiers when
5227 comparing types.
5228 (digest_init): Do not accept initialization of arrays of atomic
5229 elements by string constants.
5230 (build_asm_expr): Use convert_lvalue_to_rvalue.
5231 (build_binary_op): Do not treat _Atomic void as a qualified
5232 version of void.
5233
0c249d4b
DD
52342013-11-06 DJ Delorie <dj@redhat.com>
5235
5236 * c-decl.c (locate_old_decl): If a previous conflicting decl is
5237 both explicit and builtin, print the location of the explicit one.
5238
6d7f7e0a
TB
52392013-11-05 Tobias Burnus <burnus@net-b.de>
5240
5241 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
5242 c_parser_omp_distribute, c_parser_omp_teams,
5243 c_parser_omp_target, c_parser_omp_declare): Handle
5244 -fopenmp-simd.
5245
b906f4ca
MP
52462013-11-03 Marek Polacek <polacek@redhat.com>
5247
5248 * c-decl.c (grokdeclarator): Add VLA instrumentation.
5249
ee1d5a02
JJ
52502013-11-01 Jakub Jelinek <jakub@redhat.com>
5251
5252 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
5253 check_dup_generic at the end, unless remove is true.
5254 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
5255 remove = true;.
5256 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
5257
5a9785fb
JJ
52582013-10-31 Jakub Jelinek <jakub@redhat.com>
5259
5260 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
5261 with decl that is not pointer nor array.
5262
939b37da
BI
52632013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
5264
5265 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
5266 a spawning function is found.
5267 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
5268 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
5269 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5270 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
5271 case.
5272 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
5273 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
5274 expr.
5275 (c_finish_return): Added a check to reject _Cilk_spawn in return
5276 expression.
5277 (build_cilk_spawn): New function.
5278 (build_cilk_sync): Likewise.
5279 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
5280
d4af74d4
TB
52812013-10-27 Tobias Burnus <burnus@net-b.de>
5282
5283 PR other/33426
5284 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
5285 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
5286 (c_parser_statement_after_labels): Update calls.
5287
d73749df 52882013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
5289
5290 PR other/33426
5291 * c-parser.c (c_parser_pragma, c_parser_for_statement):
5292 Handle PRAGMA_IVDEP.
5293 (c_parser_statement_after_labels): Update call.
5294
f28aa681
MP
52952013-10-24 Marek Polacek <polacek@redhat.com>
5296
5297 * c-parser.c (c_parser_struct_declaration): Add a comment.
5298 (c_parser_declarator): Don't allow _Alignas here.
5299
0645c1a2
AM
53002013-10-17 Andrew MacLeod <amacleod@redhat.com>
5301
5302 * c-parser.c: Include omp-low.h.
5303 * c-typeck.c: Likewise.
5304
568a31f2
MP
53052013-10-17 Marek Polacek <polacek@redhat.com>
5306
5307 PR c/58267
5308 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
5309 Document syntax of the array-declarator.
5310 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
5311 are not permitted.
5312 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
5313 (c_parser_struct_declaration): Likewise.
5314 (c_parser_declarator): Likewise.
5315 (c_parser_direct_declarator_inner): Likewise.
5316 (c_parser_parameter_declaration): Likewise.
5317 (c_parser_type_name): Likewise.
5318
acf0174b
JJ
53192013-10-11 Jakub Jelinek <jakub@redhat.com>
5320
5321 * c-lang.h (current_omp_declare_target_attribute): New extern
5322 decl.
5323 * c-parser.c: Include c-lang.h.
5324 (struct c_parser): Change tokens to c_token *.
5325 Add tokens_buf field. Change tokens_avail type to unsigned int.
5326 (c_parser_consume_token): If parser->tokens isn't
5327 &parser->tokens_buf[0], increment parser->tokens.
5328 (c_parser_consume_pragma): Likewise.
5329 (enum pragma_context): Add pragma_struct and pragma_param.
5330 (c_parser_external_declaration): Adjust
5331 c_parser_declaration_or_fndef caller.
5332 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
5333 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
5334 Adjust recursive call.
5335 (c_parser_struct_or_union_specifier): Use pragma_struct instead
5336 of pragma_external.
5337 (c_parser_parameter_declaration): Use pragma_param instead of
5338 pragma_external.
5339 (c_parser_compound_statement_nostart, c_parser_label,
5340 c_parser_for_statement): Adjust
5341 c_parser_declaration_or_fndef callers.
5342 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
5343 it through to c_parser_conditional_expression.
5344 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
5345 pass it through to c_parser_binary_expression. Adjust recursive
5346 call.
5347 (c_parser_binary_expression): Remove prec argument, add
5348 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
5349 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
5350 binop matches it, use build2 instead of parser_build_binary_op.
5351 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
5352 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
5353 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
5354 Handle pragma_struct and pragma_param the same as pragma_external.
5355 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5356 (c_parser_omp_variable_list): Parse array sections for
5357 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5358 (c_parser_omp_clause_collapse): Fully fold collapse expression.
5359 (c_parser_omp_clause_reduction): Handle user defined reductions.
5360 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5361 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5362 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5363 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5364 c_parser_omp_clause_depend, c_parser_omp_clause_map,
5365 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5366 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5367 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5368 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
5369 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
5370 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5371 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
5372 (c_parser_omp_for_loop): Add CODE argument, pass it through
5373 to c_finish_omp_for. Change last argument to cclauses,
5374 and adjust uses to grab parallel clauses from the array of all
5375 the split clauses. Adjust c_parser_binary_expression,
5376 c_parser_declaration_or_fndef and c_finish_omp_for callers.
5377 (omp_split_clauses): New function.
5378 (c_parser_omp_simd): New function.
5379 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5380 Allow the function to be called also when parsing combined constructs,
5381 and call c_parser_omp_simd when parsing for simd.
5382 (c_parser_omp_sections_scope): If section-sequence doesn't start with
5383 #pragma omp section, require exactly one structured-block instead of
5384 sequence of statements.
5385 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5386 Allow the function to be called also when parsing combined constructs.
5387 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
5388 Allow the function to be called also when parsing combined
5389 constructs.
5390 (c_parser_omp_taskgroup, c_parser_omp_cancel,
5391 c_parser_omp_cancellation_point, c_parser_omp_distribute,
5392 c_parser_omp_teams, c_parser_omp_target_data,
5393 c_parser_omp_target_update, c_parser_omp_target,
5394 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
5395 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
5396 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
5397 (c_parser_omp_construct): Add p_name and mask vars. Handle
5398 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
5399 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
5400 and c_parser_omp_sections callers.
5401 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
5402 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5403 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5404 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
5405 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
5406 OMP_CLAUSE_DEPEND.
5407 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5408 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5409 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5410 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5411 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5412 * c-typeck.c: Include tree-inline.h.
5413 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5414 handle_omp_array_sections_1, handle_omp_array_sections,
5415 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5416 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5417 user defined reductions.
5418 (c_tree_equal): New function.
5419 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5420 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5421 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5422 c_check_omp_declare_reduction_r): New prototypes.
5423 * c-decl.c (current_omp_declare_target_attribute): New variable.
5424 (c_decl_attributes): New function.
5425 (start_decl, start_function): Use it instead of decl_attributes.
5426 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5427 c_omp_reduction_decl, c_omp_reduction_lookup,
5428 c_check_omp_declare_reduction_r): New functions.
5429
0a6c2227
TT
54302013-09-25 Tom Tromey <tromey@redhat.com>
5431
5432 * Make-lang.in (c/gccspec.o): Remove.
5433 (CFLAGS-c/gccspec.o): New variable.
5434 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
5435 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
5436 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5437
f3bc55f0
TT
54382013-09-25 Tom Tromey <tromey@redhat.com>
5439
5440 * Make-lang.in (c/gccspec.o): Don't use subshell.
5441
a24d975c
MP
54422013-09-18 Marek Polacek <polacek@redhat.com>
5443
5444 PR sanitize/58443
5445 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5446 Remove unnecessary check.
5447
ce6923c5
MP
54482013-09-18 Marek Polacek <polacek@redhat.com>
5449
5450 PR sanitizer/58411
5451 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
5452 no_sanitize_undefined attribute.
5453
a1e51df9
KT
54542013-09-13 Kai Tietz <ktietz@redhat.com>
5455
5456 PR target/57848
5457 * c-decl.c (c_builtin_function_ext_scope): Remove
5458 wrong assumption that it is never called on prexisting
5459 symbol.
5460
0af94e6f
JR
54612013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
5462
5463 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
5464
20059c8b
GDR
54652013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5466
5467 * c-objc-common.c (c_tree_printer): Tidy.
5468
de5a5fa1
MP
54692013-08-30 Marek Polacek <polacek@redhat.com>
5470
5471 * c-typeck.c (build_binary_op): Add division by zero and shift
5472 instrumentation.
5473
2531a1d9 54742013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 5475 Joseph Myers <joseph@codesourcery.com>
2531a1d9 5476
6e2bcc98 5477 PR c/35649
2531a1d9
JR
5478 * c-typeck.c (c_common_type): Prefer double_type_node over
5479 other REAL_TYPE types with the same precision.
5480 (convert_arguments): Likewise.
5481
025311c4
GDR
54822013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5483
5484 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
5485 (c_initialize_diagnostics): Call a destructor for the early printer.
5486
da6ca2b5
GDR
54872013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5488
5489 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5490 printer initialization.
5491
318cda85 54922013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 5493
318cda85
BI
5494 PR c/57490
5495 * c-array-notation.c (fix_conditional_array_notations_1): Added a
5496 check for truth values.
5497 (expand_array_notation_exprs): Added truth values case. Removed an
5498 unwanted else. Added for-loop to walk through subtrees in default
5499 case.
5500
b066401f
GDR
55012013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5502
5503 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5504
fb48aadc
JM
55052013-07-23 Joseph Myers <joseph@codesourcery.com>
5506
5507 * c-parser.c (struct c_generic_association): Fix typo.
5508
433cc7b0
TT
55092013-07-23 Tom Tromey <tromey@redhat.com>
5510 Joseph Myers <joseph@codesourcery.com>
5511
5512 * c-parser.c (struct c_generic_association): New.
5513 (c_generic_association_d): New typedef.
5514 (c_parser_generic_selection): New function.
5515 (c_parser_postfix_expression): Handle RID_GENERIC.
5516
26d40c3d
JM
55172013-07-13 Jason Merrill <jason@redhat.com>
5518
5519 PR c++/57793
5520 * c-decl.c (finish_struct): Check for too-large class.
5521
ecdbd01a 55222013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
5523
5524 PR c/57821
5525 * c-typeck.c (set_init_index): When folding, check for index overflow.
5526
1141ed3f
BI
55272013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5528
5529 * c-parser.c (c_parser_array_notation): Removed rejection of array
5530 notations in an array of function pointers.
5531
713b46fa
BI
55322013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5533
5534 * c-array-notation.c (make_triplet_val_inv): New function.
5535 (create_cmp_incr): Likewise.
5536 (create_array_refs): Likewise.
5537 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5538 Also modularized common parts between functions and called the function.
5539 (build_array_notation_expr): Likewise.
5540 (fix_conditional_array_notations_1): Likewise.
5541 (fix_array_notation_expr): Likewise.
5542 (fix_array_notation_call_expr): Likewise.
5543
92f20202
MP
55442013-06-18 Marek Polacek <polacek@redhat.com>
5545
5546 PR c/57630
5547 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5548
73a23b06
BI
55492013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
5550
5551 * c-array-notation.c (build_array_notation_expr): Reject array notation
5552 mismatch between LHS and RHS even inside a call_expr. Also, removed
5553 a couple while statements that were dead code.
5554
00b8517d
BI
55552013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
5556
5557 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5558 excessive precision expressions in function parameters. Also removed
5559 couple unwanted while statements.
5560
1509bdda
BI
55612013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5562
5563 * c-array-notation.c (expand_array_notation_exprs): Added
5564 ARRAY_NOTATION_REF case.
5565
d60f1706
BI
55662013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5567
5568 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5569 function to c-family/array-notation-common.c.
5570 (is_cilkplus_reduce_builtin): Likewise.
5571 (find_rank): Likewise.
5572 (extract_array_notation_exprs): Likewise.
5573 (replace_array_notations): Likewise.
5574 (find_inv_trees): Likewise.
5575 (replace_inv_trees): Likewise.
5576 (contains_array_notation_expr): Likewise.
5577 (find_correct_array_notation_type): Likewise.
5578 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5579 (struct inv_list): Moved this to c-family/array-notation-common.c.
5580 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5581
6d6efbb3
BI
55822013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
5583
5584 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5585 reduction functions outside the for-loop. Added a check if the fundecl
5586 is non-NULL. Finally, removed an unwanted if-statement, and made the
5587 body unconditional.
5588
25c22937
BI
55892013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5590
5591 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5592 condition of the if-statement matches the rank of else-block and then-
5593 block when array notations are used.
5594 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5595 expression after the entire function body is parsed.
5596 (c_parser_expr_no_commas): Delayed creating array notation expressions
5597 to the end of function parsing.
5598 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5599 whole if-statement instead of just the condition.
5600 (expand_array_notation_exprs): Added MODIFY_EXPR case.
5601
edd25645
BI
56022013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5603
5604 PR c/57474
5605 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5606 array to NULL_TREE if they are unused. Also added a check for the
5607 field to be NULL before its fields are used in future.
5608
065ce7f1
RO
56092013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5610
5611 PR bootstrap/57450
5612 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5613 (build_array_notation_expr): Likewise.
5614
36536d79
BI
56152013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5616
5617 * c-typeck.c (build_array_ref): Added a check to see if array's
5618 index is greater than one. If true, then emit an error.
5619 (build_function_call_vec): Exclude error reporting and checking
5620 for builtin array-notation functions.
5621 (convert_arguments): Likewise.
5622 (c_finish_return): Added a check for array notations as a return
5623 expression. If true, then emit an error.
5624 (c_finish_loop): Added a check for array notations in a loop
5625 condition. If true then emit an error.
5626 (lvalue_p): Added a ARRAY_NOTATION_REF case.
5627 (build_binary_op): Added a check for array notation expr inside
5628 op1 and op0. If present, we call another function to find correct
5629 type.
5630 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
5631 * c-parser.c (c_parser_compound_statement): Check if array
5632 notation code is used in tree, if so, then transform them into
5633 appropriate C code.
5634 (c_parser_expr_no_commas): Check if array notation is used in LHS
5635 or RHS, if so, then build array notation expression instead of
5636 regular modify.
5637 (c_parser_postfix_expression_after_primary): Added a check for
5638 colon(s) after square braces, if so then handle it like an array
5639 notation. Also, break up array notations in unary op if found.
5640 (c_parser_direct_declarator_inner): Added a check for array
5641 notation.
5642 (c_parser_compound_statement): Added a check for array notation in
5643 a stmt. If one is present, then expand array notation expr.
5644 (c_parser_if_statement): Likewise.
5645 (c_parser_switch_statement): Added a check for array notations in
5646 a switch statement's condition. If true, then output an error.
5647 (c_parser_while_statement): Similarly, but for a while.
5648 (c_parser_do_statement): Similarly, but for a do-while.
5649 (c_parser_for_statement): Similarly, but for a for-loop.
5650 (c_parser_unary_expression): Check if array notation is used in a
5651 pre-increment or pre-decrement expression. If true, then expand
5652 them.
5653 (c_parser_array_notation): New function.
5654 * c-array-notation.c: New file.
5655 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5656
cd192ccc
MS
56572013-05-23 Mike Stump <mikestump@comcast.net>
5658
5659 * c-typeck.c (convert_for_assignment): Handle references to memory
5660 spaces better.
5661
427b248d
JM
56622013-05-16 Jason Merrill <jason@redhat.com>
5663
5664 * Make-lang.in (cc1$(exeext)): Use link mutex.
5665
44d90fe1
PC
56662013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5667
5668 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5669 to simply use OPT_Wpointer_arith.
5670 (build_unary_op): Likewise.
5671
4e7d7b3d
JJ
56722013-04-03 Jakub Jelinek <jakub@redhat.com>
5673
5674 PR c/19449
5675 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
5676 argument. If set, or it temporarily for parsing of the first
5677 argument into force_folding_builtin_constant_p.
5678 (c_parser_postfix_expression): Adjust callers.
5679
839b422f
RB
56802013-03-21 Richard Biener <rguenther@suse.de>
5681
5682 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
5683 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
5684
2ee028f1
MP
56852013-02-12 Marek Polacek <polacek@redhat.com>
5686
5687 PR c/44938
5688 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
5689 origtypes to NULL.
5690
8824edff
JJ
56912013-01-24 Jakub Jelinek <jakub@redhat.com>
5692
5693 PR c/56078
5694 * c-typeck.c (set_nonincremental_init_from_string): If
5695 constructor_max_index is NULL, treat it as if tree_int_cst_lt
5696 returned false.
5697 (process_init_element): Likewise.
5698
eadd3d0d
JJ
56992012-12-20 Jakub Jelinek <jakub@redhat.com>
5700
5701 PR c++/55619
5702 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
5703 argument, don't call default_function_array_conversion
5704 nor c_fully_fold here.
5705 (c_parser_asm_statement): Adjust callers.
5706 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
5707 and outputs here, and call default_function_array_conversion
5708 on inputs that don't need to be addressable.
5709
f8a93a2e
JJ
57102012-12-18 Jakub Jelinek <jakub@redhat.com>
5711
5712 PR c/39464
5713 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
5714 warning require that both c_common_unsigned_type as well as
5715 c_common_signed_type is the same for both mvl and mvr types.
5716
9771b263
DN
57172012-11-16 Diego Novillo <dnovillo@google.com>
5718
5719 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
5720
5721 * c-common.c: Use new vec API in vec.h.
5722 * c-common.h: Likewise.
5723 * c-gimplify.c: Likewise.
5724 * c-pragma.c: Likewise.
5725 * c-pretty-print.c: Likewise.
5726 * c-pretty-print.h: Likewise.
5727 * c-semantics.c: Likewise.
5728 * c-decl.c: Likewise.
5729 * c-parser.c: Likewise.
5730 * c-tree.h: Likewise.
5731 * c-typeck.c: Likewise.
5732
880661a4
JW
57332012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
5734
5735 PR c++/54930
5736 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
5737
077d1abe
MLI
57382012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5739
5740 PR c/53066
5741 * c-decl.c (warn_if_shadowing): Do not warn if a variable
5742 shadows a function, unless the variable is a function or a
5743 pointer-to-function.
5744
3a785c97
JJ
57452012-10-12 Jakub Jelinek <jakub@redhat.com>
5746
5747 PR c/54381
5748 * c-parser.c (struct c_tree_loc_pair): Removed.
5749 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
5750 add location_t * and tree * arguments, fill in array of 3
5751 sizeof_arg trees and corresponding locs.
5752 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
5753 c_parser_expr_list callers.
5754 (c_parser_postfix_expression_after_primary): Likewise. Pass
5755 array of 3 sizeof_arg trees and locs (corresponding to first
5756 3 arguments) to sizeof_pointer_memaccess_warning.
5757
703c8606
LC
57582012-10-09 Lawrence Crowl <crowl@google.com>
5759
5760 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
5761 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
5762 hash table.
5763
5d9de0d0
PC
57642012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
5765
5766 PR c++/54194
5767 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
5768 call.
5769
a212e43f
MG
57702012-10-09 Marc Glisse <marc.glisse@inria.fr>
5771
5772 PR c++/54427
5773 * c-typeck.c: Include c-common.h.
5774 (enum stv_conv): Moved to c-common.h.
5775 (scalar_to_vector): Moved to c-common.c.
5776 (build_binary_op): Adapt to scalar_to_vector's new prototype.
5777 * Make-lang.in: c-typeck.c depends on c-common.h.
5778
3b78de56
AC
57792012-10-04 Arnaud Charlet <charlet@adacore.com>
5780
5781 * c-decl.c (c_write_global_declarations): Fix handling of
5782 -fdump-ada-spec*.
5783
78c60e3d
SS
57842012-09-30 Sharad Singhai <singhai@google.com>
5785
5786 * c-decl.c (c_write_global_declarations): Use a different method
5787 to determine if the dump has ben initialized.
5788
9f33203d
JM
57892012-09-14 Joseph Myers <joseph@codesourcery.com>
5790
5791 PR c/54552
5792 * c-typeck.c (c_cast_expr): When casting to a type requiring
5793 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
5794 c_fully_fold first.
5795
a27d595d
JM
57962012-09-14 Joseph Myers <joseph@codesourcery.com>
5797
5798 PR c/54103
5799 * c-typeck.c (build_unary_op): Pass original argument of
5800 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
5801 any C_MAYBE_CONST_EXPR, if it has integer operands.
5802 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
5803 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
5804 to c_objc_common_truthvalue_conversion, then remove any
5805 C_MAYBE_CONST_EXPR, if they have integer operands. Use
5806 c_objc_common_truthvalue_conversion not
5807 c_common_truthvalue_conversion.
5808 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
5809 call note_integer_operands for arguments with integer operands
5810 that are not integer constants.
5811
9feb29df
JJ
58122012-09-13 Jakub Jelinek <jakub@redhat.com>
5813
5814 PR c/54559
5815 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
5816 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
5817
d409320c
JJ
58182012-08-31 Jakub Jelinek <jakub@redhat.com>
5819
5820 PR c/54428
5821 * c-convert.c (convert): Don't call fold_convert_loc if
5822 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
5823 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
5824 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
5825
6265d07c
JJ
58262012-08-24 Jakub Jelinek <jakub@redhat.com>
5827
5828 PR c/54355
5829 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
5830 for nested and empty_ok arguments in the call to
5831 c_parser_declaration_or_fndef.
5832
1a4049e7
JJ
58332012-08-17 Jakub Jelinek <jakub@redhat.com>
5834
5835 * c-tree.h (c_last_sizeof_arg): Declare.
5836 * c-parser.c (struct c_tree_loc_pair): New type.
5837 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
5838 non-NULL.
5839 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
5840 (c_parser_postfix_expression_after_primary): Likewise. Call
5841 sizeof_pointer_memaccess_warning if needed.
5842 (sizeof_ptr_memacc_comptypes): New function.
5843 * c-typeck.c (c_last_sizeof_arg): New global variable.
5844 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
5845
0229aee9
UB
58462012-07-24 Uros Bizjak <ubizjak@gmail.com>
5847
5848 * c-lang.h (lang_decl): Add variable_size GTY option.
5849
7ee2468b
SB
58502012-07-16 Steven Bosscher <steven@gcc.gnu.org>
5851
5852 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
5853 * Make-lang.in: Fix dependencies.
5854
d4a10d0a
SB
58552012-06-29 Steven Bosscher <steven@gcc.gnu.org>
5856
5857 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
5858 and add language Makefile hooks.
5859 * config-lang.in: New file.
5860 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
5861 add the required "normal" config-lang.in rules.
5862 * c-lang.h: Moved from gcc/ to here.
5863 * c-tree.h: Likewise.
5864 * c-objc-common.c: Likewise.
5865 * c-objc-common.h: Likewise.
5866 * c-typeck.c: Likewise.
5867 * c-convert.c: Likewise.
5868 * c-lang.c: Likewise.
5869 * c-aux-info.c: Likewise.
5870 * c-errors.c: Likewise.
5871 * gccspec.c: Likewise.
5872 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
5873 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
5874\f
85ec4feb 5875Copyright (C) 2012-2018 Free Software Foundation, Inc.
d4a10d0a
SB
5876
5877Copying and distribution of this file, with or without modification,
5878are permitted in any medium without royalty provided the copyright
5879notice and this notice are preserved.