]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
PR c++/62314: add fixit hint for missing "template <> " in explicit specialization
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
7176a4a0
MP
12016-05-02 Marek Polacek <polacek@redhat.com>
2
3 PR c/70851
4 * c-decl.c (grokdeclarator): Diagnose when array's size has an
5 incomplete type.
6
e7ff0319
CP
72016-04-29 Cesar Philippidis <cesar@codesourcery.com>
8
9 PR middle-end/70626
10 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
11 OACC_LOOP_CLAUSE_MASK.
12 (c_parser_oacc_kernels_parallel): Update call to
13 c_oacc_split_loop_clauses.
14
9f405ce1
AM
152016-04-28 Andrew MacLeod <amacleod@redhat.com>
16
17 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
18 argument to build_modify_expr in two cases.
19
c1e1f433
BS
202016-04-27 Bernd Schmidt <bschmidt@redhat.com>
21
22 * c-parser.c (c_parser_postfix_expression_after_primary): Call
23 warn_for_memset instead of warning directly here.
24
2448a956
MP
252016-04-26 Marek Polacek <polacek@redhat.com>
26
27 PR c/67784
28 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
29 out of ...
30 (c_parser_for_statement): ... here.
31 (c_parser_if_statement): Use it.
32 (c_parser_switch_statement): Use it.
33 (c_parser_while_statement): Use it.
34
b02a5e26
MP
35 PR c/70791
36 * c-decl.c (pushdecl): Pass LOCUS down to warning.
37
477d4906
IV
382016-04-20 Ilya Verbin <ilya.verbin@intel.com>
39
40 PR c++/69363
41 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
42 instead of c_finish_cilk_clauses.
43 * c-tree.h (c_finish_omp_clauses): Add new default argument.
44 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
45 floating-point variables in the linear clause for Cilk Plus.
46
fe37c7af
MM
472016-04-18 Michael Matz <matz@suse.de>
48
49 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
50 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
51
949505a9
MP
522016-04-15 Marek Polacek <polacek@redhat.com>
53
54 PR c/70671
55 * c-typeck.c (build_unary_op): Pass location down to error and
56 warning call.
57
dda1bf61
JJ
582016-04-15 Jakub Jelinek <jakub@redhat.com>
59
60 PR c/70436
61 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
62 where needed.
63 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
64 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
65 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
66 Adjust c_parser_pragma callers.
67 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
68 caller.
69 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
70 c_parser_statement.
71 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
72 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
73 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
74 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
75 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
76 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
77 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
78 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
79 down where needed.
80 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
81 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
82 calls.
83
99cd9857
MP
842016-04-13 Marek Polacek <polacek@redhat.com>
85
86 PR c/70436
87 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
88 adjust callers.
89 (c_parser_statement): Likewise.
90 (c_parser_c99_block_statement): Likewise.
91 (c_parser_while_statement): Likewise.
92 (c_parser_for_statement): Likewise.
93 (c_parser_if_body): Don't set IF_P here.
94 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
95 about dangling else here.
96 * c-tree.h (c_finish_if_stmt): Adjust declaration.
97 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
98 warn about dangling else here.
99
f13355da
MP
1002016-04-04 Marek Polacek <polacek@redhat.com>
101
102 PR c/70307
103 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
104
5fde6a45
MP
1052016-03-31 Marek Polacek <polacek@redhat.com>
106
107 PR c/70297
108 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
109
4bbf545b
DM
1102016-03-18 David Malcolm <dmalcolm@redhat.com>
111
112 PR c/70281
113 * c-parser.c (c_parser_postfix_expression): Set the source range
114 for uses of "__builtin_types_compatible_p".
115
fcc2b74f
JJ
1162016-03-17 Jakub Jelinek <jakub@redhat.com>
117
118 PR c/70280
119 * c-typeck.c (composite_type): Don't count void_list_node
120 into len, if the list is terminated by void_list_node, start
121 with void_list_node instead of NULL for newargs. Stop
122 at void_list_node.
123
ab4c578f
MP
1242016-03-16 Marek Polacek <polacek@redhat.com>
125
126 PR c/70093
127 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
128 nested functions returning VM types.
129
96b3c82d
CP
1302016-03-09 Cesar Philippidis <cesar@codesourcery.com>
131
132 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
133 when calling c_finish_omp_clauses.
134
29b9828f
BS
1352016-03-04 Bernd Schmidt <bschmidt@redhat.com>
136
137 PR c/69824
138 * c-decl.c (get_parm_info): Don't queue implicit function declarations
139 for later.
140
7ff6ca38
MP
1412016-03-04 Marek Polacek <polacek@redhat.com>
142
143 PR c/69798
144 * c-parser.c (c_parser_postfix_expression): Call
145 c_parser_cast_expression rather than c_parser_postfix_expression.
146
686e2237
JJ
1472016-03-01 Jakub Jelinek <jakub@redhat.com>
148
149 PR c/69796
150 PR c/69974
151 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
152 of incomplete decls to error_mark_node.
153
0b05329b
MP
1542016-02-24 Marek Polacek <polacek@redhat.com>
155
156 PR c/69819
157 * c-decl.c (finish_decl): Don't update the copy of the type of a
158 different decl type.
159
067fbd8b
JJ
1602016-02-23 Jakub Jelinek <jakub@redhat.com>
161
162 PR objc/69844
163 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
164 in id_kind reclassification.
165
bf14eba2
JJ
1662016-02-16 Jakub Jelinek <jakub@redhat.com>
167
168 PR c/69835
169 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
170
ba539195
JN
1712016-02-16 James Norris <jnorris@codesourcery.com>
172
173 PR c/64748
174 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
175
16595a1f
BS
1762016-02-12 Bernd Schmidt <bschmidt@redhat.com>
177
f48dfe98
BS
178 * c-decl.c (build_null_declspecs): Zero the entire struct.
179
16595a1f
BS
180 PR c/69522
181 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
182 callers changed. If nested_p is true, use it to call
183 finish_implicit_inits.
184 * c-tree.h (finish_implicit_inits): Declare.
185 * c-typeck.c (finish_implicit_inits): New function. Move code
186 from ...
187 (push_init_level): ... here.
188 (set_designator, process_init_element): Call finish_implicit_inits.
189
66756373
JJ
1902016-02-11 Jakub Jelinek <jakub@redhat.com>
191
192 PR c/69768
193 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
194 arguments for -Waddress warning.
195
1066e9b5
JJ
1962016-02-04 Jakub Jelinek <jakub@redhat.com>
197
198 PR c/69669
199 * c-decl.c (finish_enum): When honoring mode attribute,
200 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
201
3a5d2ba4
JJ
2022016-01-29 Jakub Jelinek <jakub@redhat.com>
203
204 PR debug/69518
205 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
206 all type variants, not just TYPE_MAIN_VARIANT.
207
cbdd8ae0
JJ
2082016-01-27 Jakub Jelinek <jakub@redhat.com>
209
210 PR debug/66869
211 * c-decl.c (c_write_global_declarations_1): Warn with
212 warn_unused_function if static prototype without definition
213 is not C_DECL_USED.
214
fa74a4bc
MP
2152016-01-27 Marek Polacek <polacek@redhat.com>
216
217 PR c/68062
218 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
219 to unsigned, if needed. Add -Wsign-compare warning.
220
13f92e8d
JJ
2212016-01-26 Jakub Jelinek <jakub@redhat.com>
222
223 PR tree-optimization/69483
224 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
225
cd8e73dc 2262016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
227
228 PR c/24293
229 * c-tree.h (incomplete_record_decls): Declare.
230 * c-parser.c (incomplete_record_decls): Define.
231 (c_parser_translation_unit): Iterate through incomplete_record_decls and
232 report error if any decl has zero size.
233 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
234 or enum type to incomplete_record_decls.
235
e6d6ec9e
TV
2362016-01-14 Tom de Vries <tom@codesourcery.com>
237
238 PR tree-optimization/68773
239 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
240 set force_output.
241
00083992
MP
2422016-01-14 Marek Polacek <polacek@redhat.com>
243
244 PR c/69262
245 * c-decl.c (grokdeclarator): Provide more information for invalid
246 array declarations.
247
7443cf13
DM
2482016-01-06 David Malcolm <dmalcolm@redhat.com>
249
250 * c-parser.c (c_parser_unary_expression): For dereferences, build
251 a combined location before calling build_indirect_ref, so that
252 error reports cover the full range, manually updating the c_expr
253 src_range.
254
6b131d5b
MP
2552016-01-06 Marek Polacek <polacek@redhat.com>
256
257 PR sanitizer/69099
258 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
259 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
260 NULL.
261
818ab71a
JJ
2622016-01-04 Jakub Jelinek <jakub@redhat.com>
263
264 Update copyright years.
265
2fe0a208
MP
2662016-01-04 Marek Polacek <polacek@redhat.com>
267
268 PR c/68908
269 * c-typeck.c (build_atomic_assign): Improve commentary. Add
270 optimization to use __atomic_fetch_* built-in if possible.
271
c7b48c8a
TS
2722015-12-23 Thomas Schwinge <thomas@codesourcery.com>
273
274 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
275 into...
276 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
277 all users.
278
fda5652f
MP
2792015-12-22 Marek Polacek <polacek@redhat.com>
280
281 PR c/69002
282 * c-typeck.c (build_component_ref): Warn when acessing elements of
283 atomic structures or unions.
284
745e411d
DM
2852015-12-21 David Malcolm <dmalcolm@redhat.com>
286
287 * c-typeck.c: Include "gcc-rich-location.h".
288 (build_binary_op): In the two places that call binary_op_error,
289 create a gcc_rich_location and populate it with the location of
290 the binary op and its two operands.
291
94c40e19
DM
2922015-12-16 David Malcolm <dmalcolm@redhat.com>
293
294 * c-parser.c (c_parser_statement_after_labels): When calling
295 c_finish_return, Use the return expression's location if it has
296 one, falling back to the location of the first token within it.
297 * c-typeck.c (c_finish_return): When issuing warnings about
298 the incorrect presence/absence of a return value, issue a note
299 showing the declaration of the function.
300
de67c4c3
DM
3012015-12-16 David Malcolm <dmalcolm@redhat.com>
302
303 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
304 to 4.
305 (c_parser_peek_nth_token): New function.
306 (c_parser_peek_conflict_marker): New function.
307 (c_parser_error): Detect conflict markers and report them as such.
308
a10704e1
DM
3092015-12-16 David Malcolm <dmalcolm@redhat.com>
310
311 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
312 to preserve range information for the primary expression
313 in the call to c_parser_postfix_expression_after_primary.
314
8062bca6
DM
3152015-12-16 David Malcolm <dmalcolm@redhat.com>
316
317 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
318 expression location, falling back on the first token location,
319 rather than always using the latter.
320
d06f8b75
MP
3212015-12-16 Marek Polacek <polacek@redhat.com>
322
323 PR c/64637
324 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
325 available.
326
2994fb91
MP
3272015-12-15 Marek Polacek <polacek@redhat.com>
328
329 PR c/68907
330 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
331 artificial decl.
332
a1b93f8d
DM
3332015-12-08 David Malcolm <dmalcolm@redhat.com>
334
335 * c-parser.c (c_parser_alignof_expression): Capture location of
336 closing parenthesis (if any), or of end of unary expression, and
337 use it to build a src_range for the expression.
338
46c6e1e2
DM
3392015-12-08 David Malcolm <dmalcolm@redhat.com>
340
341 PR c/68757
342 * c-parser.c (c_parser_get_builtin_args): Add
343 "out_close_paren_loc" param, and write back to it.
344 (c_parser_postfix_expression): Capture the closing
345 parenthesis location for RID_CHOOSE_EXPR,
346 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
347 RID_BUILTIN_SHUFFLE and use it to set the source range
348 for such expressions; within RID_BUILTIN_COMPLEX set
349 the underlying location.
350
66189108
MP
3512015-12-07 Marek Polacek <polacek@redhat.com>
352
353 PR c/68668
354 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
355 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
356
f187980b
EB
3572015-12-04 Eric Botcazou <ebotcazou@adacore.com>
358
359 * c-tree.h (c_build_va_arg): Adjust prototype.
360 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
361 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
362 parameter, adjust throughout and issue an error if EXPR is a component
363 with reverse storage order.
364
4250754e
JM
3652015-12-02 Jason Merrill <jason@redhat.com>
366
367 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
368 (c_fully_fold_internal, decl_constant_value_for_optimization):
369 Move from c-common.c.
370 * c-tree.h: Declare decl_constant_value_for_optimization.
371 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
372
e9e32ee6
JM
3732015-12-02 Joseph Myers <joseph@codesourcery.com>
374
375 PR c/68162
376 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
377 following link from declarator to next declarator. Track original
378 qualified type and pass it to c_build_qualified_type.
379 * c-typeck.c (c_build_qualified_type): Add arguments
380 orig_qual_type and orig_qual_indirect.
381
ff7a55bf
TS
3822015-12-02 Thomas Schwinge <thomas@codesourcery.com>
383
384 * c-parser.c (c_parser_omp_clause_name)
385 (c_parser_oacc_all_clauses): Alphabetical sorting.
386
657e4e47
JJ
3872015-12-02 Jakub Jelinek <jakub@redhat.com>
388
389 PR c/68533
390 * c-decl.c (get_parm_info): Use b->locus instead of input_location
391 for diagnostics.
392
37d5ad46
JB
3932015-12-01 Julian Brown <julian@codesourcery.com>
394 Cesar Philippidis <cesar@codesourcery.com>
395 James Norris <James_Norris@mentor.com>
396
397 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
398 (c_parser_oacc_clause_use_device): New function.
399 (c_parser_oacc_all_clauses): Add use_device support.
400 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
401 (c_parser_oacc_host_data): New function.
402 (c_parser_omp_construct): Add host_data support.
403 * c-tree.h (c_finish_oacc_host_data): Add prototype.
404 * c-typeck.c (c_finish_oacc_host_data): New function.
405 (c_finish_omp_clauses): Add use_device support.
406
a4850ce9
JH
4072015-11-29 Jan Hubicka <hubicka@ucw.cz>
408
409 PR c/67106
410 * c-decl.c: Set TYPE_PACKED in variants.
411
b58d3df2
ML
4122015-11-27 Martin Liska <mliska@suse.cz>
413
414 PR c++/68312
415 * c-array-notation.c (fix_builtin_array_notation_fn):
416 Use release_vec_vec instead of vec::release.
417 (build_array_notation_expr): Likewise.
418 (fix_conditional_array_notations_1): Likewise.
419 (fix_array_notation_expr): Likewise.
420 (fix_array_notation_call_expr): Likewise.
421
aec17bfe
JJ
4222015-11-27 Jakub Jelinek <jakub@redhat.com>
423
424 PR c/63326
425 * c-parser.c (c_parser_compound_statement_nostart): If
426 last_label is true, use pragma_stmt instead of pragma_compound
427 as second c_parser_pragma argument.
428 (c_parser_omp_ordered, c_parser_omp_target_update,
429 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
430 false as second argument to c_parser_skip_to_pragma_eol after
431 diagnosing standalone directives used in pragma_stmt context.
432
688c4de0
IV
4332015-11-24 Ilya Verbin <ilya.verbin@intel.com>
434
435 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
436 with "if (ENABLE_OFFLOADING)".
437
cbd03aee
DM
4382015-11-23 David Malcolm <dmalcolm@redhat.com>
439
440 PR objc/68438
441 * c-parser.c (c_parser_postfix_expression): Set up source ranges
442 for various Objective-C constructs: Class.name syntax,
443 @selector(), @protocol(), @encode(), and [] message syntax.
444
a87a86e1
DM
4452015-11-20 David Malcolm <dmalcolm@redhat.com>
446
447 PR 62314
448 * c-typeck.c (should_suggest_deref_p): New function.
449 (build_component_ref): Special-case POINTER_TYPE when
450 generating a "not a structure of union" error message, and
451 suggest a "->" rather than a ".", providing a fix-it hint.
452
8ece8dfb
DM
4532015-11-19 David Malcolm <dmalcolm@redhat.com>
454
455 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
456 candidate into a new function, find_closest_identifier.
457
433068cc
MP
4582015-11-19 Marek Polacek <polacek@redhat.com>
459
460 PR c/68412
461 * c-typeck.c (parser_build_binary_op): Properly handle
462 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
463
bef08b71
DM
4642015-11-17 David Malcolm <dmalcolm@redhat.com>
465
466 * c-parser.c (set_c_expr_source_range): Bulletproof both
467 overloaded implementations against NULL expr->value.
468 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
469 values.
470 (c_parser_unary_expression): Likewise when handling addresses of
471 labels.
472 (c_parser_postfix_expression): Likewise for statement expressions,
473 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
474 __builtin_va_arg, and for __builtin_offset_of.
475 (c_parser_postfix_expression_after_paren_type): Initialize expr's
476 src_range using the range of the braced initializer.
477 (c_parser_transaction_expression): Set src_range for "ret" to a
478 sane pair of values.
479
fff77217
KY
4802015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
481
482 * c-parser.c (c_finish_omp_declare_simd): Look for
483 "simd" attribute as well. Update error message.
484
1d899da2
TS
4852015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
486
487 * c-parser.c (c_parser_omp_declare_target): Adjust.
488
e4606348
JJ
4892015-11-14 Jakub Jelinek <jakub@redhat.com>
490
491 * c-typeck.c (c_finish_omp_clauses): Don't mark
492 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
493
3e636daf
MP
4942015-11-14 Marek Polacek <polacek@redhat.com>
495
496 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
497 * c-typeck.c: Likewise.
498
ebedc9a3
DM
4992015-11-13 David Malcolm <dmalcolm@redhat.com>
500
501 * c-decl.c (warn_defaults_to): Pass line_table to
502 rich_location ctor.
503 * c-errors.c (pedwarn_c99): Likewise.
504 (pedwarn_c90): Likewise.
505 * c-parser.c (set_c_expr_source_range): New functions.
506 (c_token::get_range): New method.
507 (c_token::get_finish): New method.
508 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
509 based on the range from the start of the LHS to the end of the
510 RHS.
511 (c_parser_conditional_expression): Likewise, based on the range
512 from the start of the cond.value to the end of exp2.value.
513 (c_parser_binary_expression): Call set_c_expr_source_range on
514 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
515 (c_parser_cast_expression): Call set_c_expr_source_range on ret
516 based on the cast_loc through to the end of the expr.
517 (c_parser_unary_expression): Likewise, based on the
518 op_loc through to the end of op.
519 (c_parser_sizeof_expression) Likewise, based on the start of the
520 sizeof token through to either the closing paren or the end of
521 expr.
522 (c_parser_postfix_expression): Likewise, using the token range,
523 or from the open paren through to the close paren for
524 parenthesized expressions.
525 (c_parser_postfix_expression_after_primary): Likewise, for
526 various kinds of expression.
527 * c-tree.h (struct c_expr): Add field "src_range".
528 (c_expr::get_start): New method.
529 (c_expr::get_finish): New method.
530 (set_c_expr_source_range): New decls.
531 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
532 on ret for prefix unary ops.
533 (parser_build_binary_op): Likewise, running from the start of
534 arg1.value through to the end of arg2.value.
535
ec8b536f
MP
5362015-11-13 Marek Polacek <polacek@redhat.com>
537
538 PR c/68320
539 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
540
277fe616
DM
5412015-11-13 David Malcolm <dmalcolm@redhat.com>
542
543 * c-typeck.c: Include spellcheck.h.
544 (lookup_field_fuzzy_find_candidates): New function.
545 (lookup_field_fuzzy): New function.
546 (build_component_ref): If the field was not found, try using
547 lookup_field_fuzzy and potentially offer a suggestion.
548
6e232ba4
JN
5492015-11-12 James Norris <jnorris@codesourcery.com>
550 Joseph Myers <joseph@codesourcery.com>
551
552 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
553 (c_parser_omp_clause_name): Handle 'device_resident' clause.
554 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
555 and PRAGMA_OMP_CLAUSE_LINK.
556 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
557 and PRAGMA_OACC_CLAUSE_LINK.
558 (OACC_DECLARE_CLAUSE_MASK): New definition.
559 (c_parser_oacc_declare): New function.
560
9be4f715
MP
5612015-11-12 Marek Polacek <polacek@redhat.com>
562
563 PR c/67784
564 * c-parser.c (c_parser_for_statement): Reclassify the token in
565 a correct scope.
566
e78bede6
MP
5672015-11-11 Marek Polacek <polacek@redhat.com>
568
569 PR c/68107
570 PR c++/68266
571 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
572 checking the size of an array.
573
69f293c9
AM
5742015-11-11 Andrew MacLeod <amacleod@redhat.com>
575
576 * c-array-notation.c: Remove unused header files.
577 * c-aux-info.c: Likewise.
578 * c-convert.c: Likewise.
579 * c-decl.c: Likewise.
580 * c-errors.c: Likewise.
581 * c-lang.c: Likewise.
582 * c-objc-common.c: Likewise.
583 * c-parser.c: Likewise.
584 * c-typeck.c: Likewise.
585 * gccspec.c: Likewise.
586
3a40d81d
NS
5872015-11-09 Thomas Schwinge <thomas@codesourcery.com>
588 Cesar Philippidis <cesar@codesourcery.com>
589 James Norris <jnorris@codesourcery.com>
590 Julian Brown <julian@codesourcery.com>
591 Nathan Sidwell <nathan@codesourcery.com>
592
593 c/
594 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
595 routine arg.
596 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
597 (c_parser_pragma): Parse 'acc routine'.
598 (OACC_ROUTINE_CLAUSE_MARK): Define.
599 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
600
fc402eec
AA
6012015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
602
603 PR debug/67192
604 * c-typeck.c (c_finish_loop): For unconditional loops, set the
605 location of the backward-goto to the start of the loop body.
606
f6b0b3db
AA
6072015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
608
609 PR debug/67192
610 * c-parser.c (c_parser_while_statement): Finish the loop before
611 parsing ahead for misleading indentation.
612 (c_parser_for_statement): Likewise.
613
ee45a32d
EB
6142015-11-08 Eric Botcazou <ebotcazou@adacore.com>
615
616 * c-decl.c (finish_struct): If the structure has reverse storage
617 order, rewrite the type of array fields with scalar component. Call
618 maybe_apply_pragma_scalar_storage_order on entry.
619 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
620 errors on bit-fields and reverse SSO here and not...
621 (c_mark_addressable): ...here.
622 (output_init_element): Adjust call to initializer_constant_valid_p.
623 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
624
8a645150
DM
6252015-11-06 David Malcolm <dmalcolm@redhat.com>
626
627 * c-decl.c (warn_defaults_to): Update for change in signature
628 of diagnostic_set_info.
629 * c-errors.c (pedwarn_c99): Likewise.
630 (pedwarn_c90): Likewise.
631 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
632 for textinfo::set_location.
633
7a5e4956
CP
6342015-11-05 Cesar Philippidis <cesar@codesourcery.com>
635 Thomas Schwinge <thomas@codesourcery.com>
636 James Norris <jnorris@codesourcery.com>
637
638 * c-parser.c (c_parser_omp_clause_name): Add support for
639 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
640 (c_parser_omp_clause_default): Add is_oacc argument. Handle
641 default(none) in OpenACC.
642 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
643 arguments.
644 (c_parser_oacc_clause_tile): New function.
645 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
646 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
647 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
648 TILE}.
649 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
650 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
651 FIRSTPRIVATE}.
652 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
653 (c_parser_oacc_update): Update the error message for missing clauses.
654 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
655 and OMP_CLAUSE_INDEPENDENT.
656
bfcfbfa0
MP
6572015-11-05 Marek Polacek <polacek@redhat.com>
658
659 PR c/68090
660 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
661 deal with pre-evaluation on invalid types.
662
e01d41e5
JJ
6632015-11-05 Jakub Jelinek <jakub@redhat.com>
664 Ilya Verbin <ilya.verbin@intel.com>
665
666 * c-parser.c: Include context.h and gimple-expr.h.
667 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
668 monotonic together with nonmonotonic.
669 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
670 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
671 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
672 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
673 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
674 expressions on combined target teams before the target.
675 (c_parser_omp_declare_target): If decl has "omp declare target" or
676 "omp declare target link" attribute, and cgraph or varpool node already
677 exists, then set corresponding flags. Call c_finish_omp_clauses
678 in the parenthesized extended-list syntax case.
679 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
680 declare target.
681 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
682 on OMP_CLAUSE_REDUCTION array sections.
683 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
684 into the constant offset, or for variable low-bound using
685 POINTER_PLUS_EXPR. For structure element based array sections use
686 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
687 (c_finish_omp_clauses): Drop generic_field_head, structure
688 elements are now always mapped even as array section bases,
689 diagnose same var in data sharing and mapping clauses. Diagnose if
690 linear step on declare simd is neither a constant nor a uniform
691 parameter. Look through POINTER_PLUS_EXPR for array section
692 reductions. Diagnose the same var or function appearing multiple
693 times on the same directive. Fix up wording for the to clause if t
694 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
695 modifier on kinds other than dynamic or guided or nonmonotonic
696 modifier together with ordered clause.
697
4bf9e5a8
TS
6982015-11-03 Thomas Schwinge <thomas@codesourcery.com>
699 Chung-Lin Tang <cltang@codesourcery.com>
700
701 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
702
2adfab87
AM
7032015-10-29 Andrew MacLeod <amacleod@redhat.com>
704
705 * c-array-notation.c: Reorder #include's and remove duplicates.
706 * c-aux-info.c: Likewise.
707 * c-convert.c: Likewise.
708 * c-decl.c: Likewise.
709 * c-errors.c: Likewise.
710 * c-lang.c: Likewise.
711 * c-objc-common.c: Likewise.
712 * c-parser.c: Likewise.
713 * c-typeck.c: Likewise.
714
e922069e
JW
7152015-10-26 Jim Wilson <jim.wilson@linaro.org>
716
717 PR debug/66068
718 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
719 after calling build_qualified_type.
720
765dd391
CP
7212015-10-27 Cesar Philippidis <cesar@codesourcery.com>
722 Thomas Schwinge <thomas@codesourcery.com>
723 James Norris <jnorris@codesourcery.com>
724 Joseph Myers <joseph@codesourcery.com>
725 Julian Brown <julian@codesourcery.com>
726 Bernd Schmidt <bschmidt@redhat.com>
727
728 * c-parser.c (c_parser_oacc_shape_clause): New.
729 (c_parser_oacc_simple_clause): New.
730 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
731 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
732
88bae6f4
TS
7332015-10-27 Thomas Schwinge <thomas@codesourcery.com>
734 James Norris <jnorris@codesourcery.com>
735 Cesar Philippidis <cesar@codesourcery.com>
736
737 PR c/64765
738 PR c/64880
739 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
740 parameters, and handle these. Adjust all users.
741 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
742 into...
743 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
744 all users.
745 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
746 declare functions.
747 (c_finish_omp_construct): Declare function.
748 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
749 Merge functions into...
750 (c_finish_omp_construct): ... this new function.
751
a8fc2579
RB
7522015-10-22 Richard Biener <rguenther@suse.de>
753
754 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
755 before folding a MINUS_EXPR.
756
e9122ef6
MP
7572015-10-21 Marek Polacek <polacek@redhat.com>
758
759 PR c/68024
760 * c-decl.c (start_function): Warn about vararg functions without
761 a prototype.
762
9f47c7e5
IE
7632015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
764
765 * c-typeck.c (build_conditional_expr): Use boolean vector
766 type for vector comparison.
767 (build_vec_cmp): New.
768 (build_binary_op): Use build_vec_cmp for comparison.
769
fa60eeb9
MP
7702015-10-20 Marek Polacek <polacek@redhat.com>
771
772 * c-parser.c (is_cilkplus_vector_p): Don't define here.
773
2c7020eb
MP
7742015-10-20 Marek Polacek <polacek@redhat.com>
775
776 PR c/67964
777 * c-parser.c (c_parser_attributes): Break out of the loop if the
778 token after an attribute isn't a comma.
779
d9a6bd32
JJ
7802015-10-13 Jakub Jelinek <jakub@redhat.com>
781 Aldy Hernandez <aldyh@redhat.com>
782
783 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
784 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
785 (c_parser_omp_variable_list): Handle structure elements for
786 map, to and from clauses. Handle array sections in reduction
787 clause. Formatting fixes.
788 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
789 if clause modifiers.
790 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
791 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
792 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
793 c_parser_omp_clause_is_device_ptr): New functions.
794 (c_parser_omp_clause_ordered): Parse optional parameter.
795 (c_parser_omp_clause_reduction): Handle array reductions.
796 (c_parser_omp_clause_schedule): Parse optional simd modifier.
797 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
798 functions.
799 (c_parser_omp_clause_linear): Parse linear clause modifiers.
800 (c_parser_omp_clause_depend_sink): New function.
801 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
802 (c_parser_omp_clause_map): Parse release/delete map kinds and
803 optional always modifier.
804 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
805 and c_finish_omp_clauses callers.
806 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
807 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
808 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
809 (OMP_CRITICAL_CLAUSE_MASK): Define.
810 (c_parser_omp_critical): Parse critical clauses.
811 (c_parser_omp_for_loop): Handle doacross loops, adjust
812 c_finish_omp_for and c_finish_omp_clauses callers.
813 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
814 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
815 (OMP_FOR_CLAUSE_MASK): Add linear clause.
816 (c_parser_omp_for): Disallow ordered clause when combined with
817 distribute. Disallow linear clause when combined with distribute
818 and not combined with simd.
819 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
820 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
821 parse clauses and if depend clause is found, don't parse a body.
822 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
823 Allow target parallel without for after it.
824 (OMP_TASK_CLAUSE_MASK): Add priority clause.
825 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
826 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
827 invalid kinds.
828 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
829 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
830 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
831 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
832 functions.
833 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
834 defaultmap and is_device_ptr clauses.
835 (c_parser_omp_target): Parse target parallel and target simd. Set
836 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
837 and target exit data. Diagnose invalid map kinds.
838 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
839 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
840 construct.
841 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
842 &omp_priv.
843 (OMP_TASKLOOP_CLAUSE_MASK): Define.
844 (c_parser_omp_taskloop): New function.
845 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
846 handle PRAGMA_OMP_TASKLOOP.
847 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
848 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
849 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
850 Add IS_OMP argument, handle structure element bases, diagnose
851 bitfields, pass IS_OMP recursively, diagnose known zero length
852 array sections in depend clauses, handle array sections in reduction
853 clause, diagnose negative length even for pointers.
854 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
855 types, pass IS_OMP down to handle_omp_array_sections_1, handle
856 array sections in reduction clause, set
857 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
858 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
859 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
860 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
861
21ba0cea
MP
8622015-10-06 Marek Polacek <polacek@redhat.com>
863
864 * c-parser.c (c_parser_statement_after_labels): Use
865 protected_set_expr_location.
866 (c_parser_omp_clause_num_gangs): Likewise.
867 (c_parser_omp_clause_num_threads): Likewise.
868 (c_parser_omp_clause_num_workers): Likewise.
869 (c_parser_omp_clause_vector_length): Likewise.
870 (c_parser_omp_clause_num_teams): Likewise.
871 (c_parser_omp_clause_thread_limit): Likewise.
872 * c-typeck.c (build_c_cast): Likewise.
873 (c_cast_expr): Likewise.
874
624d31fe
RS
8752015-10-05 Richard Sandiford <richard.sandiford@arm.com>
876
877 * c-typeck.c (c_tree_equal): Use real_equal instead of
878 REAL_VALUES_EQUAL.
879
b8fd7909
JM
8802015-10-04 Jason Merrill <jason@redhat.com>
881
882 * c-parser.c (c_lex_one_token): Handle @synchronized.
883 * c-decl.c (match_builtin_function_types): A declaration of a built-in
884 can change whether the function is transaction_safe.
885
1c7485af
MP
8862015-10-02 Marek Polacek <polacek@redhat.com>
887
888 PR c/67730
889 * c-typeck.c (convert_for_assignment): Use the expansion point
890 location throughout.
891
3e3b8d63
MP
8922015-10-02 Marek Polacek <polacek@redhat.com>
893
894 PR c/64249
895 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
896 and pass it down to c_parser_if_statement.
897 (c_parser_else_body): Add CHAIN parameter and pass it down to
898 c_parser_statement_after_labels.
899 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
900 duplicated if-else-if conditions.
901
aabef2de
MP
9022015-10-01 Marek Polacek <polacek@redhat.com>
903
904 * c-typeck.c (convert_for_assignment): Improve commentary.
905
de8ddd5f
MP
9062015-09-30 Marek Polacek <polacek@redhat.com>
907
908 PR c/67730
909 * c-typeck.c (c_finish_return): Use the expansion point location for
910 certain "return with value" warnings.
911
c4914de6
MLI
9122015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
913
914 * c-parser.c (pragma_lex): Add loc argument.
915
0e36f5c7
MP
9162015-09-15 Marek Polacek <polacek@redhat.com>
917
918 PR c/67580
919 * c-decl.c (tag_exists_p): New function.
920 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
921 struct/union/enum keywords are missing.
922 * c-tree.h (tag_exists_p): Declare.
923
2f3bb934
MP
9242015-09-15 Marek Polacek <polacek@redhat.com>
925
926 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
927 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
928 Return NULL_TREE instead of 0.
929 (lookup_name): Return NULL_TREE instead of 0.
930 (lookup_name_in_scope): Likewise.
931 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
932 (parser_xref_tag): Use false instead of 0.
933 (start_struct): Use true instead of 1.
934 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
935
aa256c4a
MP
9362015-09-14 Marek Polacek <polacek@redhat.com>
937
938 * c-typeck.c (set_nonincremental_init_from_string): Use
939 HOST_WIDE_INT_M1U when shifting a negative value.
940
dbb68221
MW
9412015-09-09 Mark Wielaard <mjw@redhat.com>
942
943 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
944 parm against NULL.
945
a8a098ac
JJ
9462015-09-10 Jakub Jelinek <jakub@redhat.com>
947
948 PR c/67502
949 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
950 into OMP_FOR_PRE_BODY rather than before the loop.
951
f4b189d5
JJ
9522015-09-09 Jakub Jelinek <jakub@redhat.com>
953
0bb99c11
JJ
954 PR c/67501
955 * c-parser.c (c_parser_oacc_all_clauses,
956 c_parser_omp_all_clauses): Remove invalid clause from
957 list of clauses even if parser->error is set.
958
fce5e5e3
JJ
959 PR c/67500
960 * c-parser.c (c_parser_omp_clause_aligned,
961 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
962 test for errors.
963 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
964 error_mark_node.
965
f4b189d5
JJ
966 PR c/67495
967 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
968 instead of c_parser_unary_expression. If the result is !lvalue_p,
969 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
970
b2aaf235
MP
9712015-09-04 Marek Polacek <polacek@redhat.com>
972
973 PR sanitizer/67279
974 * c-typeck.c (build_binary_op): Don't instrument static initializers.
975
1807ffc1
MS
9762015-09-03 Martin Sebor <msebor@redhat.com>
977
978 PR c/66516
8b652e65
JJ
979 * c-typeck.c (convert_arguments, parser_build_unary_op,
980 build_conditional_expr, c_cast_expr, convert_for_assignment,
981 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
982 reject_gcc_builtin.
983 (c_decl_implicit): Define.
984
d04ff417
MP
9852015-09-02 Marek Polacek <polacek@redhat.com>
986
987 PR c/67432
988 * c-parser.c (c_parser_enum_specifier): Give a better error for
989 an empty enum.
990
a79683d5
TS
9912015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
992
993 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
994
191a6b94
MP
9952015-08-12 Marek Polacek <polacek@redhat.com>
996
997 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
998 LOC to it.
999
420a9d9b
MP
10002015-08-03 Marek Polacek <polacek@redhat.com>
1001
1002 PR c/67088
1003 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
1004 Use it.
1005 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
1006
992118a1
PP
10072015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
1008
1009 * c-parser.c (c_parser_if_body): Take token_indent_info
1010 argument. Call warn_for_misleading_indentation even when the
1011 body is a semicolon. Extract token_indent_infos corresponding
1012 to the guard, body and next tokens. Adjust call to
1013 warn_for_misleading_indentation accordingly.
1014 (c_parser_else_body): Likewise.
1015 (c_parser_if_statement): Likewise.
1016 (c_parser_while_statement): Likewise.
1017 (c_parser_for_statement): Likewise.
1018
46308474
LFSM
10192015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
1020 Manuel López-Ibáñez <manu@gcc.gnu.org>
1021
1022 * c-decl.c (get_parm_info): Remove static var. Update warning
1023 message.
1024
05b28fd6
MP
10252015-07-27 Marek Polacek <polacek@redhat.com>
1026
1027 PR c++/66555
1028 PR c/54979
1029 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
1030
451b5e48
MP
10312015-07-20 Marek Polacek <polacek@redhat.com>
1032
1033 PR c++/55095
1034 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
1035 (build_binary_op): Warn about left shift overflows.
1036
1916bcb5
AM
10372015-07-09 Andrew MacLeod <amacleod@redhat.com>
1038
1039 * c-array-notation.c: Adjust includes for flags.h changes.
1040 * c-objc-common.c: Likewise.
1041
c7131fb2
AM
10422015-07-07 Andrew MacLeod <amacleod@redhat.com>
1043
1044 * c-array-notation.c: Adjust includes.
1045 * c-aux-info.c: Likewise.
1046 * c-convert.c: Likewise.
1047 * c-decl.c: Likewise.
1048 * c-errors.c: Likewise.
1049 * c-lang.c: Likewise.
1050 * c-objc-common.c: Likewise.
1051 * c-parser.c: Likewise.
1052 * c-typeck.c: Likewise.
1053
da2e71c9
MLI
10542015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1055
1056 PR fortran/66605
1057 * c-decl.c (finish_function): Call do_warn_unused_parameter.
1058
b155cfd9
MP
10592015-06-29 Marek Polacek <polacek@redhat.com>
1060
1061 PR c/66322
1062 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
1063 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
1064 about -Wswitch-bool here.
1065 (do_case): Update c_add_case_label call.
1066 (c_finish_case): Update c_do_switch_warnings call.
1067
31521951
MP
10682015-06-27 Marek Polacek <polacek@redhat.com>
1069
1070 * c-typeck.c: Use VECTOR_TYPE_P throughout.
1071
22d03525
MP
10722015-06-26 Marek Polacek <polacek@redhat.com>
1073
1074 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1075 INDIRECT_REF_P.
1076 * c-typeck.c (array_to_pointer_conversion): Likewise.
1077 (build_unary_op): Likewise.
1078 (c_finish_return): Likewise.
1079
f0889939
AM
10802015-06-25 Andrew MacLeod <amacleod@redhat.com>
1081
1082 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
1083 * c-parser.c: Likewise.
1084
8d67ee55
RS
10852015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1086
1087 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
1088 instead of pointer_hash.
1089 (detect_field_duplicates): Likewise.
1090
0ae9bd27
MP
10912015-06-25 Marek Polacek <polacek@redhat.com>
1092
1093 * c-array-notation.c: Use VAR_P throughout.
1094 * c-decl.c: Likewise.
1095 * c-objc-common.c: Likewise.
1096 * c-parser.c: Likewise.
1097 * c-typeck.c: Likewise.
1098
62f9079a
MP
10992015-06-25 Marek Polacek <polacek@redhat.com>
1100
1101 * c-decl.c: Use is_global_var throughout.
1102 * c-parser.c: Likewise.
1103 * c-typeck.c: Likewise.
1104
abb226c9
AM
11052015-06-17 Andrew MacLeod <amacleod@redhat.com>
1106
1107 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
1108 * c-aux-info.c: Likewise.
1109 * c-convert.c: Likewise.
1110 * c-decl.c: Likewise.
1111 * c-errors.c: Likewise.
1112 * c-lang.c: Likewise.
1113 * c-objc-common.c: Likewise.
1114 * c-parser.c: Likewise.
1115 * c-typeck.c: Likewise.
1116
8cbababc
JH
11172015-06-11 Jan Hubicka <hubicka@ucw.cz>
1118
1119 PR middle-end/66325
1120 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
1121 variants.
1122
a0349665
PMR
11232015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
1124
1125 * c-decl.c (pop_scope): Register the main translation unit
1126 through the new debug hook.
1127
13fdf2e2
AM
11282015-06-08 Andrew MacLeod <amacleod@redhat.com>
1129
1130 * c-array-notation.c : Adjust include files.
1131 * c-aux-info.c : Likewise.
1132 * c-convert.c : Likewise.
1133 * c-decl.c : Likewise.
1134 * c-errors.c : Likewise.
1135 * c-lang.c : Likewise.
1136 * c-lang.h : Likewise.
1137 * c-objc-common.c : Likewise.
1138 * c-parser.c : Likewise.
1139 * c-typeck.c : Likewise.
1140
d7438551
AH
11412015-06-05 Aldy Hernandez <aldyh@redhat.com>
1142
1143 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
1144 immediately clobber it.
1145 (c_write_global_declarations_1): Remove call to
1146 check_global_declaration_1.
1147 (c_write_global_declarations_2): Remove.
1148 (c_write_final_cleanups): Rename from c_write_global_declarations.
1149 Remove call to finalize_compilation_unit.
1150 Remove calls to debugging hooks.
1151 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
1152 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
1153 * c-tree.h: Remove c_write_global_declarations.
1154
ecb9f223
AM
11552015-06-04 Andrew MacLeod <amacleod@redhat.com>
1156
1157 * c-array-notation.c: Adjust includes for restructured coretypes.h.
1158 * c-aux-info.c: Likewise.
1159 * c-convert.c: Likewise.
1160 * c-decl.c: Likewise.
1161 * c-errors.c: Likewise.
1162 * c-lang.c: Likewise.
1163 * c-objc-common.c: Likewise.
1164 * c-parser.c: Likewise.
1165 * c-typeck.c: Likewise.
1166
9482b620
MP
11672015-06-04 Marek Polacek <polacek@redhat.com>
1168
1169 PR c/66341
1170 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
1171 it is a lvalue.
1172
bc51ace3
PK
11732015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1174
1175 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
1176 Warn for empty struct.
1177 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
1178
ea5b45b6
AT
11792015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
1180
1181 * c-decl.c (start_function): Call plugin before parsing.
1182 (finish_function): Call plugin after parsing.
1183
c2d47482
PK
11842015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1185
1186 PR c/49551
1187 * c-decl.c (merge_decls): Merge DECL_COMMON.
1188
a95492ab
JW
11892015-05-22 Jim Wilson <jim.wilson@linaro.org>
1190
1191 * Make-lang.in (check_gcc_pallelize): Define.
1192
fd5c817a
MP
11932015-05-22 Marek Polacek <polacek@redhat.com>
1194
1195 PR c/47043
1196 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
1197 attributes.
1198
c7b70a3c
MP
11992015-05-21 Marek Polacek <polacek@redhat.com>
1200
1201 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
1202 DECL_BUILT_IN.
1203
21b634ae
MP
12042015-05-20 Marek Polacek <polacek@redhat.com>
1205
1206 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
1207 * c-typeck.c: Likewise.
1208
296a8c2f
MP
12092015-05-19 Marek Polacek <polacek@redhat.com>
1210
1211 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
1212
41b37d5e
JJ
12132015-05-19 Jakub Jelinek <jakub@redhat.com>
1214
1215 PR middle-end/66199
1216 * c-parser.c (c_parser_omp_for_loop): Don't add
1217 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
1218 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
1219 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
1220 constructs.
1221
fab27f52
MM
12222015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
1223
1224 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 1225 swaps.
fab27f52 1226
40de31cf
MLI
12272015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
1228
1229 PR fortran/44054
1230 * c-objc-common.c (c_tree_printer): Replace locus pointer with
1231 accessor function.
1232
3aa3c9fc
MP
12332015-05-14 Marek Polacek <polacek@redhat.com>
1234
1235 PR c/66066
1236 PR c/66127
1237 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
1238 rather than with 0.
1239
c3388e62
DM
12402015-05-12 David Malcolm <dmalcolm@redhat.com>
1241
1242 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
1243 to add a call to warn_for_misleading_indentation.
1244 (c_parser_else_body): Likewise, adding param "else_loc".
1245 (c_parser_if_statement): Check for misleading indentation.
1246 (c_parser_while_statement): Likewise.
1247 (c_parser_for_statement): Likewise.
1248
755e528f
MP
12492015-05-08 Marek Polacek <polacek@redhat.com>
1250
1251 PR c/64918
1252 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
1253 (output_init_element): Likewise.
1254
0173bd2a
MP
12552015-05-07 Marek Polacek <polacek@redhat.com>
1256
1257 PR c/65179
1258 * c-typeck.c (build_binary_op): Warn when left shifting a negative
1259 value.
1260
9babc352
MP
12612015-04-30 Marek Polacek <polacek@redhat.com>
1262
1263 * c-typeck.c (set_init_label): Call error_at instead of error and
1264 pass LOC to it.
1265
ac9f18db
MP
1266 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
1267 the type of a decl.
1268
ec3fba51
MP
1269 * c-typeck.c (c_build_va_arg): Clarify the error message.
1270
b811915d
TS
12712015-04-29 Thomas Schwinge <thomas@codesourcery.com>
1272
1273 * c-parser.c (c_parser_oacc_enter_exit_data): Use
1274 OMP_STANDALONE_CLAUSES.
1275
f3075008
MP
12762015-04-28 Marek Polacek <polacek@redhat.com>
1277
1278 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
1279
4e81b788
MP
12802015-04-28 Marek Polacek <polacek@redhat.com>
1281
1282 PR c/65901
1283 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
1284
6c1db78e
MP
12852015-04-25 Marek Polacek <polacek@redhat.com>
1286
1287 PR c/52085
1288 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
1289 attribute.
1290
5c4abbb8
MP
12912015-04-23 Marek Polacek <polacek@redhat.com>
1292
1293 PR c/65345
1294 * c-decl.c (set_labels_context_r): New function.
1295 (store_parm_decls): Call it via walk_tree_without_duplicates.
1296 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
1297 instead of create_tmp_var. Build TARGET_EXPR instead of
1298 COMPOUND_EXPR.
1299 (build_atomic_assign): Use create_tmp_var_raw instead of
1300 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
1301
06aca1d5
IV
13022015-04-20 Ilya Verbin <ilya.verbin@intel.com>
1303
1304 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
1305 (c_parser_omp_target_update): Add missed %> to error_at ().
1306
8fba1830
BRF
13072015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1308
1309 PR target/55143
1310 * c-decl.c (c_default_pointer_mode): Remove definition.
1311 * c-tree.h (c_default_pointer_mode): Remove declaration.
1312
62021f64
TB
13132015-03-27 Tobias Burnus <burnus@net-b.de>
1314
1315 PR c/65586
1316 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
1317 error out.
1318 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
1319 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
1320 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
1321
9b65e171
JJ
13222015-03-19 Jakub Jelinek <jakub@redhat.com>
1323
1324 * c-decl.c (c_decl_attributes): Also add "omp declare target"
1325 attribute for DECL_EXTERNAL VAR_DECLs.
1326
17958621
JJ
13272015-03-11 Jakub Jelinek <jakub@redhat.com>
1328
1329 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
1330 argument.
1331
7ccb1a11
JJ
13322015-03-10 Jakub Jelinek <jakub@redhat.com>
1333
1334 PR c/65120
1335 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
1336 before preparing arguments to warn_logical_not_parentheses.
1337
01177669
JJ
13382015-03-09 Jakub Jelinek <jakub@redhat.com>
1339
1340 PR c/65120
1341 * c-typeck.c (parser_build_binary_op): Don't warn for
1342 !!x == y or !b == y where b is _Bool.
1343
802ac282
MP
13442015-03-09 Marek Polacek <polacek@redhat.com>
1345
1346 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
1347 * c-decl.c (grokdeclarator): Likewise.
1348 * c-typeck.c (build_binary_op): Likewise.
1349
e5165b60
MP
13502015-02-27 Marek Polacek <polacek@redhat.com>
1351
1352 PR c/65228
1353 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
1354
065d214c
MP
13552015-02-14 Marek Polacek <polacek@redhat.com>
1356
1357 PR c/64768
1358 * c-decl.c (grokdeclarator): Set the range of a flexible array member
1359 declared through a typedef name.
1360
e5d9235b
MP
13612015-02-13 Marek Polacek <polacek@redhat.com>
1362
1363 PR c/65050
1364 * c-decl.c (grokdeclarator): Print also the type when giving
1365 the error message about array's incomplete element type.
1366
fa01ffcc
JJ
13672015-02-11 Jakub Jelinek <jakub@redhat.com>
1368
1369 PR c/64824
1370 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
1371 check in the POP macro.
1372
c3e38a03
MP
13732015-02-09 Marek Polacek <polacek@redhat.com>
1374
1375 PR c/64856
1376 * c-typeck.c (process_init_element): Don't always wrap
1377 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
1378 initializing a range of elements.
1379
4886ec8e
JJ
13802015-02-04 Jakub Jelinek <jakub@redhat.com>
1381
1382 PR c/64824
1383 PR c/64868
1384 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
1385
c3e38a03 13862015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
1387
1388 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
1389 processing enum declaration.
1390
7b33f0c8
MP
13912015-01-29 Marek Polacek <polacek@redhat.com>
1392
1393 PR c/64709
1394 * c-typeck.c (pop_init_level): If constructor_elements has
1395 exactly one element with integer_zerop value, set constructor_zeroinit
1396 to 1. Remove braces around warning_init call.
1397
dea63e49
JJ
13982015-01-27 Jakub Jelinek <jakub@redhat.com>
1399
1400 PR c/64766
1401 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
1402 of FUNCTION_DECLs with error_mark_node.
1403
d38f7dce
JJ
14042015-01-26 Jakub Jelinek <jakub@redhat.com>
1405
1406 PR c/64778
1407 * c-typeck.c (convert_arguments): Return -1 if there are
1408 error_args, even if we've diagnosed too many arguments.
1409
cbf5d0e7
RB
14102015-01-21 Richard Biener <rguenther@suse.de>
1411
1412 PR middle-end/64313
1413 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
1414 for builtins the user declared correctly.
1415
41dbbb37
TS
14162015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1417 Bernd Schmidt <bernds@codesourcery.com>
1418 Cesar Philippidis <cesar@codesourcery.com>
1419 James Norris <jnorris@codesourcery.com>
1420 Jakub Jelinek <jakub@redhat.com>
1421 Ilmir Usmanov <i.usmanov@samsung.com>
1422
1423 * c-parser.c: Include "gomp-constants.h".
1424 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1425 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1426 Use OMP_CLAUSE_SET_MAP_KIND.
1427 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
1428 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
1429 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
1430 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
1431 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
1432 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
1433 "copyout", "create", "delete", "deviceptr", "gang", "host",
1434 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
1435 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1436 "present_or_create", "pcreate", "seq", "self", "vector",
1437 "vector_length", "wait", "worker".
1438 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1439 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
1440 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1441 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1442 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
1443 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
1444 (c_parser_oacc_data_clause_deviceptr)
1445 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
1446 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
1447 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
1448 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
1449 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
1450 (c_parser_oacc_parallel, c_parser_oacc_update)
1451 (c_parser_oacc_wait): New functions.
1452 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
1453 (c_finish_oacc_data): New prototypes.
1454 * c-typeck.c: Include "gomp-constants.h".
1455 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
1456 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
1457 OMP_CLAUSE_SET_MAP_KIND.
1458 (c_finish_oacc_parallel, c_finish_oacc_kernels)
1459 (c_finish_oacc_data): New functions.
1460 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
1461 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
1462 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
1463 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
1464 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
1465 GOMP_MAP_FORCE_DEVICEPTR.
1466
adfac8df
JJ
14672015-01-09 Michael Collison <michael.collison@linaro.org>
1468
1469 * c-array-notation.c: Include hash-set.h, machmode.h,
1470 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1471 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
1472 * c-aux-info.c: Ditto.
1473 * c-convert.c: Ditto.
1474 * c-decl.c: Ditto.
1475 * c-errors.c: Ditto.
1476 * c-lang.c: Dittoxs.
1477 * c-objc-common.c: Ditto.
1478 * c-parser.c: Ditto.
1479 * c-typeck.c: Include hash-set.h, machmode.h,
1480 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1481 fold-const.h, wide-int.h, inchash.h, real.h and
1482 fixed-value.h due to flattening of tree.h.
1483
2cc901dc
MP
14842015-01-07 Marek Polacek <polacek@redhat.com>
1485
1486 PR c/64417
1487 * c-typeck.c (process_init_element): Disallow initialization of
1488 a flexible array member with a string constant if the structure
1489 is in an array.
1490
5624e564
JJ
14912015-01-05 Jakub Jelinek <jakub@redhat.com>
1492
e5341100
JJ
1493 PR sanitizer/64344
1494 * c-typeck.c (convert_for_assignment, c_finish_return): For
1495 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
1496 types also set in_late_binary_op around convert call.
1497 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
1498 to integral type casts, if not in_late_binary_op, pass c_fully_fold
1499 result on expr as last argument to ubsan_instrument_float_cast,
1500 if in_late_binary_op, don't use c_save_expr but save_expr.
1501
5624e564
JJ
1502 Update copyright years.
1503
5bd012f8
MP
15042015-01-05 Marek Polacek <polacek@redhat.com>
1505
1506 PR c/64423
1507 * c-typeck.c (build_array_ref): Pass loc down to
1508 warn_array_subscript_with_type_char.
1509
768952be
MU
15102014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
1511
1512 * c-typeck.c: New behavious for pointers to arrays with qualifiers
1513 (common-pointer-type): For pointers to arrays take qualifiers from
1514 element type.
1515 (build_conditional_expr): Add warnings for lost qualifiers.
1516 (comp-target-types): Allow pointers to arrays with different qualifiers.
1517 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
1518 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
1519 to PEDWARN_FOR_QUALIFIERS.
1520
8f94a8c4
JJ
15212014-12-17 Jakub Jelinek <jakub@redhat.com>
1522
1523 PR sanitizer/64289
1524 * c-convert.c: Include ubsan.h.
1525 (convert): For real -> integral casts and
1526 -fsanitize=float-cast-overflow don't call convert_to_integer, but
1527 instead instrument the float cast directly.
1528
b731b390
JJ
15292014-11-29 Jakub Jelinek <jakub@redhat.com>
1530
1531 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
1532 c_finish_stmt_expr): Remove NULL last argument from
1533 create_tmp_var_raw and create_tmp_var calls.
1534 * c-array-notation.c (fix_builtin_array_notation_fn,
1535 build_array_notation_expr, fix_conditional_array_notations_1,
1536 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
1537
541e35a6
MP
15382014-11-28 Marek Polacek <polacek@redhat.com>
1539
1540 PR c/63862
1541 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
1542 convert the right operand to integer type.
1543
b286be94
MP
15442014-11-25 Marek Polacek <polacek@redhat.com>
1545
1546 PR c/63877
1547 * c-decl.c (start_function): Disable -Wmissing-declarations warning
1548 for inline functions.
1549
aa7da51a
JJ
15502014-11-21 Jakub Jelinek <jakub@redhat.com>
1551
1552 PR target/63764
1553 * c-typeck.c (build_array_ref): Adjust
1554 convert_vector_to_pointer_for_subscript caller. If it returns true,
1555 call non_lvalue_loc on the result.
1556
d876207f
RB
15572014-11-11 Richard Biener <rguenther@suse.de>
1558
1559 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
1560 to true.
1561
e5e44252
AK
15622014-11-10 Andi Kleen <ak@linux.intel.com>
1563
1564 PR c/60804
1565 * c-parser.c (c_parser_statement_after_labels): Call
1566 check_no_cilk.
1567 (c_parser_if_statement): Dito.
1568 (c_parser_switch_statement): Dito.
1569 (c_parser_while_statement): Dito.
1570 (c_parser_do_statement): Dito.
1571 (c_parser_for_statement): Dito.
1572 * c-typeck.c (c_finish_loop): Dito.
1573
13c21655
PC
15742014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
1575
1576 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
1577 OPT_Wshift_count_overflow in the warnings.
1578
2d51fcef
MP
15792014-10-30 Marek Polacek <polacek@redhat.com>
1580
1581 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
1582 print the stripped version as well, if they're not the same.
1583
ef4bddc2
RS
15842014-10-29 Richard Sandiford <richard.sandiford@arm.com>
1585
1586 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
1587 machine_mode.
1588
c582198b
AM
15892014-10-28 Andrew MacLeod <amacleod@redhat.com>
1590
1591 * c-decl.c: Adjust include files.
1592 * c-parser.c: Ditto.
1593
ddc8de03
PM
15942014-10-27 Phil Muldoon <pmuldoon@redhat.com>
1595 Tom Tromey <tromey@redhat.com>
1596
1597 * c-tree.h (enum c_oracle_request): New.
1598 (c_binding_oracle_function): New typedef.
1599 (c_binding_oracle, c_pushtag, c_bind): Declare.
1600 * c-decl.c (c_binding_oracle): New global.
1601 (I_SYMBOL_CHECKED): New macro.
1602 (i_symbol_binding): New function.
1603 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
1604 (I_TAG_CHECKED): New macro.
1605 (i_tag_binding): New function.
1606 (I_TAG_BINDING, I_TAG_DECL): Redefine.
1607 (I_LABEL_CHECKED): New macro.
1608 (i_label_binding): New function.
1609 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
1610 (c_print_identifier): Save and restore c_binding_oracle.
1611 (c_pushtag, c_bind): New functions.
1612
60393bbc
AM
16132014-10-27 Andrew MacLeod <amacleod@redhat.com>
1614
1615 * c-typeck.c: Adjust include files.
1616
d723bb7c
MLI
16172014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
1618
1619 PR c++/53061
1620 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
1621 initialization here...
1622 (c_initialize_diagnostics): ... but here. Set defaults after
1623 building pretty-printer.
1624
1bc5a451
MP
16252014-10-23 Marek Polacek <polacek@redhat.com>
1626
1627 PR c/63626
1628 * c-decl.c (pop_scope): Don't print warning in external_scope.
1629
4435bb92
MP
16302014-10-19 Marek Polacek <polacek@redhat.com>
1631
1632 PR c/63567
1633 * c-typeck.c (output_init_element): Allow initializing objects with
1634 static storage duration with compound literals even in C99 and add
1635 pedwarn for it.
1636
7278465e
MP
16372014-10-17 Marek Polacek <polacek@redhat.com>
1638
1639 PR c/63567
1640 * c-typeck.c (digest_init): Allow initializing objects with static
1641 storage duration with compound literals even in C99 and add pedwarn
1642 for it.
1643
d9b7be2e
MP
16442014-10-17 Marek Polacek <polacek@redhat.com>
1645
1646 PR c/63543
1647 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
1648 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
1649 error multiple times. Print the type.
1650
f406ae1f
MP
16512014-10-17 Marek Polacek <polacek@redhat.com>
1652
1653 PR c/63549
1654 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
1655 type.
1656
92574c7c
MP
16572014-10-17 Marek Polacek <polacek@redhat.com>
1658
1659 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
1660 (start_function): Use OPT_Wimplicit_int instead of 0.
1661 (store_parm_decls_oldstyle): Likewise.
1662
1bc4a978
MT
16632014-10-17 Alan Modra <amodra@gmail.com>
1664
1665 PR middle-end/61848
1666 * c-decl.c (merge_decls): Don't merge section name or tls model
1667 to newdecl symtab node, instead merge to olddecl. Override
1668 existing olddecl section name. Set tls_model for all thread-local
1669 vars, not just OMP thread-private ones. Remove incorrect comment.
1670
83685514
AM
16712014-10-16 Andrew MacLeod <amacleod@redhat.com>
1672
1673 * c-decl.c: Adjust include files.
1674
78a7c317
DD
16752014-10-14 DJ Delorie <dj@redhat.com>
1676
1677 * c-parser.c (c_parse_init): Add RID entries for each __intN.
1678 (c_token_starts_typename): Check all __intN, not just __int128.
1679 (c_token_starts_declspecs): Likewise.
1680 (c_parser_declspecs): Likewise.
1681 (c_parser_attribute_any_word): Likewise.
1682 (c_parser_objc_selector): Likewise.
1683 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
1684 (struct c_declspecs): Add int_n_idx field to record *which* __intN
1685 is specified.
1686 * c-decl.c (declspecs_add_type): Check for all __intN, not just
1687 __int128.
1688 (finish_declspecs): Likewise.
1689
74d98c1e
AB
16902014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
1691
1692 * c-parser.c (c_parser_all_labels): New function to replace
1693 the duplicate code.
1694 (c_parser_statement): Call the new function.
1695
84937de2
MP
16962014-10-09 Marek Polacek <polacek@redhat.com>
1697
1698 PR c/63480
1699 * c-typeck.c (pop_init_level): Don't warn about initializing
1700 with { }.
1701
0382aaa0
MP
17022014-10-07 Marek Polacek <polacek@redhat.com>
1703
1704 PR c/59717
1705 * c-decl.c (header_for_builtin_fn): New function.
1706 (implicitly_declare): Suggest which header to include.
1707
7a0ca710
MP
17082014-10-07 Marek Polacek <polacek@redhat.com>
1709
1710 * c-convert.c (convert): Use error_operand_p.
1711 * c-typeck.c (require_complete_type): Likewise.
1712 (really_atomic_lvalue): Likewise.
1713 (digest_init): Likewise.
1714 (handle_omp_array_sections_1): Likewise.
1715
6bc8a126
MP
17162014-10-03 Marek Polacek <polacek@redhat.com>
1717
1718 PR c/63453
1719 * c-decl.c (pop_scope): Don't warn about "inline function declared
1720 but never defined" for functions marked with gnu_inline attribute.
1721
d90c0a59
JJ
17222014-09-25 Jakub Jelinek <jakub@redhat.com>
1723
1724 PR c++/63249
1725 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
1726 on low_bound and length.
1727
083e891e
MP
17282014-09-24 Marek Polacek <polacek@redhat.com>
1729
1730 PR c/61405
1731 PR c/53874
1732 * c-parser.c: Don't define CPP_KEYWORD.
1733 (c_parser_switch_statement): Pass original type to c_finish_case.
1734 * c-tree.h (c_finish_case): Update declaration.
1735 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
1736 conditionally to c_do_switch_warnings.
1737
8d95fe25
MP
17382014-09-03 Marek Polacek <polacek@redhat.com>
1739
1740 PR c/62024
1741 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
1742 conversions.
1743
9a771876
JJ
17442014-09-02 Jakub Jelinek <jakub@redhat.com>
1745 Balaji V. Iyer <balaji.v.iyer@intel.com>
1746 Igor Zamyatin <igor.zamyatin@intel.com>
1747
1748 * c-parser.c (c_parser_cilk_for): New function.
1749 (c_parser_cilk_grainsize): Likewise.
1750 (c_get_temp_regvar): Likewise.
1751 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
1752 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
1753 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
1754 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
1755 case.
1756
b7679d96
CG
17572014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
1758
1759 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
1760 with using HOST_WIDE_INT without truncation to 'int'
1761
59ea0364
MP
17622014-08-22 Marek Polacek <polacek@redhat.com>
1763
1764 PR c++/62199
1765 * c-typeck.c (parser_build_binary_op): Adjust call to
1766 warn_logical_not_parentheses.
1767
671a475e
IZ
17682014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
1769
1770 PR other/62008
1771 * c-parser.c (c_parser_array_notation): Check for correct
1772 type of an array added.
1773
04159acf
MP
17742014-08-19 Marek Polacek <polacek@redhat.com>
1775
1776 PR c++/62153
1777 * c-typeck.c (build_binary_op): If either operand of a comparison
1778 is a boolean expression, call maybe_warn_bool_compare.
1779
c77935ee
PP
17802014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
1781
1782 PR c/45584
1783 * c-typeck.c (build_c_cast): Do a conversion even when the
1784 TYPE_MAIN_VARIANTs are the same.
1785
35aff4fb
MP
17862014-08-19 Marek Polacek <polacek@redhat.com>
1787
1788 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
1789 pedwarn_c99 instead of pedwarn.
1790 (grokfield): Likewise.
1791 (warn_defaults_to): New function.
1792 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
1793 Unconditionally call pedwarn_c99 instead of pedwarn.
1794 (start_function): Call warn_defaults_to instead of pedwarn_c99.
1795 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
1796 check flag_isoc11 before.
1797 * c-errors.c (pedwarn_c99): Change the return type to bool.
1798 Handle -Wc99-c11-compat.
1799 * c-parser.c (disable_extension_diagnostics): Handle
1800 warn_c99_c11_compat.
1801 (restore_extension_diagnostics): Likewise.
1802 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
1803 instead of pedwarn, don't check flag_isoc11 before.
1804 (c_parser_declspecs): Likewise.
1805 (c_parser_alignas_specifier): Likewise.
1806 (c_parser_alignof_expression): Likewise.
1807 (c_parser_generic_selection): Likewise.
1808 * c-tree.h (pedwarn_c99): Update declaration.
1809 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
1810 of pedwarn_c99.
1811
177cce46
MP
18122014-08-19 Marek Polacek <polacek@redhat.com>
1813
1814 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
1815 to pedwarn_c90.
1816 * c-errors.c: Include "opts.h".
1817 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
1818 * c-parser.c (disable_extension_diagnostics): Handle negative value
1819 of warn_c90_c99_compat, too.
1820 (restore_extension_diagnostics): Likewise.
1821 (c_parser_compound_statement_nostart): Pass
1822 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
1823
6dc99c33
MP
18242014-08-12 Marek Polacek <polacek@redhat.com>
1825
1826 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
1827 Add pedwarn.
1828 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
1829 Likewise.
1830 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
1831
f3bede71
MP
18322014-08-10 Marek Polacek <polacek@redhat.com>
1833
1834 PR c/51849
1835 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
1836 Call pedwarn_c90 instead of pedwarn.
1837 (check_bitfield_type_and_width): Likewise.
1838 (declspecs_add_qual): Likewise.
1839 (declspecs_add_type): Likewise.
1840 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
1841 Adjust to only call pedwarn_c90.
1842 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
1843 pedwarn_c90 instead of pedwarn.
1844 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
1845 * c-parser.c (disable_extension_diagnostics): Handle
1846 warn_c90_c99_compat.
1847 (restore_extension_diagnostics): Likewise.
1848 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
1849 pedwarn_c90 instead of pedwarn.
1850 (c_parser_initelt): Likewise.
1851 (c_parser_postfix_expression): Likewise.
1852 (c_parser_postfix_expression_after_paren_type): Likewise.
1853 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
1854 * c-tree.h: Fix formatting.
1855 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
1856 pedwarn_c90 instead of pedwarn.
1857
9f25a338
TS
18582014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1859
1860 * c-typeck.c: Remove include of pointer-set.h.
1861
044331a8
MP
18622014-08-07 Marek Polacek <polacek@redhat.com>
1863
1864 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
1865
b787e7a2
TS
18662014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1867
1868 * c-typeck.c: Use hash_map instead of pointer_map.
1869
6e2830c3
TS
18702014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1871
1872 * c-decl.c: Use hash_set instead of pointer_set.
1873
a7ee52fb
IZ
18742014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1875
1876 PR middle-end/61455
1877 * c-array-notation.c (expand_array_notations): Handling
1878 of DECL_EXPR added.
1879
b4dfdc11
MG
18802014-07-31 Marc Glisse <marc.glisse@inria.fr>
1881
1882 PR c++/60517
1883 * c-typeck.c (c_finish_return): Return 0 instead of the address of
1884 a local variable.
1885
976d5a22
TT
18862014-07-30 Tom Tromey <tromey@redhat.com>
1887
1888 * c-typeck.c (struct constructor_stack) <designator_depth>: New
1889 field.
1890 (really_start_incremental_init, push_init_level): Initialize
1891 designator_depth.
1892 (pop_init_level): Set global designator_depth.
1893 (process_init_element): Check for designated_init attribute.
1894
30281de2
MP
18952014-07-20 Marek Polacek <polacek@redhat.com>
1896
1897 PR c/61852
1898 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
1899 (implicitly_declare): Pass location to implicit_decl_warning.
1900
b108f48f
JJ
19012014-07-14 Jakub Jelinek <jakub@redhat.com>
1902
1903 PR middle-end/61294
1904 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
1905 If non-NULL, call c_parser_check_literal_zero.
1906 (c_parser_check_literal_zero): New function.
1907 (c_parser_postfix_expression_after_primary): Adjust
1908 c_parser_expr_list caller, handle -Wmemset-transposed-args.
1909
773ec47f
MP
19102014-07-06 Marek Polacek <polacek@redhat.com>
1911
1912 PR c/6940
1913 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
1914 * c-tree.h (C_ARRAY_PARAMETER): Define.
1915 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
1916 function parameter.
1917
22e1cf1c
JH
19182014-07-02 Jan Hubicka <hubicka@ucw.cz>
1919 Chen Gang <gang.chen.5i5j@gmail.com>
1920
1921 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
1922 releasing symbol.
1923
52ec0ea3
MP
19242014-07-01 Marek Polacek <polacek@redhat.com>
1925
1926 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
1927 instead of 0 to WARN_FOR_ASSIGNMENT.
1928
d5c3d343
MP
19292014-07-01 Marek Polacek <polacek@redhat.com>
1930
1931 PR c/58286
1932 * c-typeck.c (convert_for_assignment): Pass
1933 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
1934
6a7253a4
MP
19352014-06-30 Marek Polacek <polacek@redhat.com>
1936
1937 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
1938 has no_sanitize_undefined attribute.
1939
5e88a8f4
IZ
19402014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
1941
1942 PR middle-end/57541
1943 * c-array-notation.c (fix_builtin_array_notation_fn):
1944 Check for 0 arguments in builtin call. Check that bultin argument is
1945 correct.
1946 * c-parser.c (c_parser_array_notation): Check for incorrect initial
1947 index.
1948
9698b078
SH
19492014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
1950
1951 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
1952 qualifiers in __auto_type for atomic types.
1953 (c_parser_typeof_specifier): Discard all type qualifiers in
1954 __typeof__ for atomic types.
1955
6e07c515
MP
19562014-06-25 Marek Polacek <polacek@redhat.com>
1957
1958 PR c/61162
1959 * c-parser.c (c_parser_statement_after_labels): Pass the location of
1960 the return expression to c_finish_return.
1961
da6f124d
JJ
19622014-06-25 Jakub Jelinek <jakub@redhat.com>
1963
1964 * c-typeck.c (c_finish_omp_clauses): Make sure
1965 OMP_CLAUSE_LINEAR_STEP has correct type.
1966
c203e8a7
TS
19672014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1968
1969 * c-decl.c: Adjust.
1970
56ad0e38
JJ
19712014-06-24 Jakub Jelinek <jakub@redhat.com>
1972
1973 * c-parser.c (c_parser_omp_for_loop): For
1974 #pragma omp parallel for simd move lastprivate clause from parallel
1975 to for rather than simd.
1976
47c2554f
MP
19772014-06-23 Marek Polacek <polacek@redhat.com>
1978
1979 * c-typeck.c (parser_build_binary_op): Don't call
1980 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
1981
56363ffd
JH
19822014-06-15 Jan Hubicka <hubicka@ucw.cz>
1983
1984 * c-parser.c (c_parser_omp_threadprivate): Likewise.
1985 * c-decl.c (merge_decls): Likewise.
1986
d7ff7ae5
MP
19872014-06-09 Marek Polacek <polacek@redhat.com>
1988
1989 PR c/36446
1990 * c-typeck.c (error_init): Call inform instead of error_at.
1991 (pedwarn_init): Call inform instead of pedwarn.
1992 (warning_init): Call inform instead of warning_at.
1993
24d047a3
JH
19942014-06-07 Jan Hubicka <hubicka@ucw.cz>
1995
1996 * c-decl.c (merge_decls): Use set_decl_section_name.
1997 (duplicate_decls): Remove node if it exists.
1998
9bac5cbb
G
19992014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
2000
2001 PR c/53119
2002 * c-typeck.c (push_init_level, process_init_element,
2003 pop_init_level): Correct check for zero initialization, move
2004 missing brace warning to respect zero initialization.
2005
8ffcdea8
MP
20062014-06-05 Marek Polacek <polacek@redhat.com>
2007
2008 PR c/56724
2009 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
2010
742938c9
MP
20112014-06-05 Marek Polacek <polacek@redhat.com>
2012
2013 PR c/49706
2014 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
2015 on the left hand side operand of a comparison.
2016
6447c55d
MP
20172014-06-05 Marek Polacek <polacek@redhat.com>
2018
2019 PR c/48062
2020 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
2021 Print note only if the warning was printed.
2022
9dc7743c
IZ
20232014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
2024
2025 PR c/58942
2026 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
2027 with a pointer.
2028
fedfecef
MP
20292014-06-03 Marek Polacek <polacek@redhat.com>
2030
2031 PR c/60439
2032 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
2033 c_start_case.
2034 * c-tree.h (c_start_case): Update.
2035 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
2036 switch condition has boolean value.
2037
9b2b7279
AM
20382014-06-02 Andrew MacLeod <amacleod@redhat.com>
2039
2040 * c-decl.c: Include builtins.h.
2041 * c-parser.c: Likewise.
2042
5c1bc275
MP
20432014-05-27 Marek Polacek <polacek@redhat.com>
2044
2045 PR c/56724
2046 * c-typeck.c (convert_arguments): Get location of a parameter. Change
2047 error and warning calls to error_at and warning_at. Pass location of
2048 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
2049 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
2050 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
2051
97563bc8
IZ
20522014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
2053
2054 PR c/61191
2055 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
2056 function parameters.
2057
aede2c10
JH
20582014-05-23 Jan Hubicka <hubicka@ucw.cz>
2059
2060 * c-decl.c (merge_decls): Preserve symtab node pointers.
2061 (duplicate_decls): Free new decl.
2062
edbba2ce
TS
20632014-05-23 Thomas Schwinge <thomas@codesourcery.com>
2064
f3316c6d
TS
2065 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
2066 initialization.
2067
edbba2ce
TS
2068 * c-parser.c (c_parser_omp_target): Return bool values.
2069
68c81f24
TS
20702014-05-22 Thomas Schwinge <thomas@codesourcery.com>
2071
2072 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
2073 num_teams_loc variable to num_thread_limit_loc.
2074
632f2871
RS
20752014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2076
2077 * c-array-notation.c (expand_array_notations): Use void_node
2078 instead of void_zero_node.
2079
766090c2
TS
20802014-05-17 Trevor Saunders <tsaunders@mozilla.com>
2081
2082 * c-decl.c (finish_struct): Adjust.
2083 (finish_enum): Likewise.
2084 (bind): Adjust.
2085 (record_inline_static): Likewise.
2086 (push_scope): Likewise.
2087 (make_label): Likewise.
2088 (lookup_label_for_goto): Likewise.
2089 (finish_struct): Likewise.
2090 (finish_enum): Likewise.
2091 (store_parm_decls): Likewise.
2092 (c_push_function_context): Likewise.
2093 * c-lang.h: Remove usage of variable_size gty attribute.
2094 * c-parser.c (c_parse_init): Adjust.
2095 (c_parse_file): Likewise.
2096
2b107f6b
MP
20972014-05-13 Marek Polacek <polacek@redhat.com>
2098
2099 PR c/61162
2100 * c-typeck.c (convert_for_assignment): Pass location to
2101 WARN_FOR_ASSIGNMENT instead of input_location.
2102
d033409e
MP
21032014-05-10 Marek Polacek <polacek@redhat.com>
2104
2105 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
2106 maybe_warn_string_init.
2107 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
2108 maybe_warn_string_init.
2109 * c-tree.h (maybe_warn_string_init): Update declaration.
2110 * c-typeck.c (maybe_warn_string_init): Add location parameter.
2111 Call pedwarn_init with loc instead of with input_location.
2112 (digest_init): Pass init_loc to maybe_warn_string_init.
2113 (pop_init_level): Call pedwarn_init with loc instead of with
2114 input_location.
2115 (set_init_index): Likewise.
2116 (process_init_element): Likewise.
2117
ea58ef42
MP
21182014-05-09 Marek Polacek <polacek@redhat.com>
2119
2120 PR c/61096
2121 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
2122 (c_parser_initelt): Pass location to set_init_label. Pass array index
2123 location to set_init_index.
2124 * c-tree.h (push_init_level): Update declaration.
2125 (pop_init_level): Likewise.
2126 (set_init_index): Likewise.
2127 (set_init_label): Likewise.
2128 * c-typeck.c (error_init): Add location parameter. Call error_at
2129 instead of error.
2130 (digest_init): Pass init_loc to error_init.
2131 (really_start_incremental_init):
2132 (push_init_level): Add location parameter. Pass loc to pop_init_level
2133 and error_init.
2134 (pop_init_level): Likewise.
2135 (set_designator): Add location parameter. Pass loc to pop_init_level,
2136 push_init_level, and error_init.
2137 (set_init_index): Add location parameter. Pass loc to error_init and
2138 set_designator.
2139 (set_init_label): Likewise.
2140 (output_init_element): Pass loc to error_init.
2141 (process_init_element): Pass loc to error_init, pop_init_level,
2142 pedwarn_init, and push_init_level.
2143
661a0813
MP
21442014-05-09 Marek Polacek <polacek@redhat.com>
2145
2146 PR c/50459
2147 * c-parser.c (c_parser_attributes): Parse the arguments as an
2148 expression-list if the attribute takes identifier.
2149
2793eeab
MP
21502014-05-08 Marek Polacek <polacek@redhat.com>
2151
2152 PR c/61053
2153 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
2154 TYPE_ALIGN_UNIT.
2155
f827930a
MP
21562014-05-08 Marek Polacek <polacek@redhat.com>
2157
2158 PR c/61077
2159 * c-decl.c (start_function): Warn for _Atomic-qualified return type
2160 of main.
2161
1d60af08
KZ
21622014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2163 Mike Stump <mikestump@comcast.net>
2164 Richard Sandiford <rdsandiford@googlemail.com>
2165
2166 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
2167 (finish_enum): Use wide-int interfaces.
2168 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
2169 * c-typeck.c (build_c_cast): Likewise.
2170 (set_nonincremental_init_from_string): Likewise.
2171 (c_tree_equal): Likewise.
2172
a0e24419
MP
21732014-05-02 Marek Polacek <polacek@redhat.com>
2174
2175 PR c/25801
2176 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
2177 Return size_one_node when the type is not complete.
2178 (pointer_diff): Remove comment.
2179 (build_unary_op): Improve error messages.
2180
19fc9faa
MP
21812014-05-02 Marek Polacek <polacek@redhat.com>
2182
2183 * c-typeck.c (c_finish_return): Separate warning_at calls.
2184
63bc4e87
MP
21852014-05-02 Marek Polacek <polacek@redhat.com>
2186
2187 * c-tree.h (error_init): Remove declaration.
2188 (pedwarn_init): Likewise.
2189 * c-typeck.c (error_init): Make static and move above.
2190 (pedwarn_init): Likewise.
2191 (warning_init): Move above.
2192 (maybe_warn_string_init): Likewise.
2193
4bd2511b
JL
21942014-05-01 Jeff Law <law@redhat.com>
2195
2196 Revert:
2197
2198 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2199 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
2200 avoid goto.
2201
6a358dcb
MP
22022014-05-02 Marek Polacek <polacek@redhat.com>
2203
2204 PR c/60784
2205 * c-typeck.c (push_init_level): Set constructor_designated to
2206 p->designated for structures.
2207
ae5ebda4
MP
22082014-05-01 Marek Polacek <polacek@redhat.com>
2209
2210 PR c/60915
2211 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
2212 function-definition has an attribute after the declarator.
2213
96b40f8d
MP
22142014-05-01 Marek Polacek <polacek@redhat.com>
2215
2216 PR c/60257
2217 * c-typeck.c (warning_init): Add location_t parameter. Call
2218 warning_at instead of warning.
2219 (push_init_level): Pass input_location to warning_init.
2220 (add_pending_init): Add location_t parameter. Pass loc to
2221 warning_init.
2222 (set_nonincremental_init): Pass input_location to add_pending_init.
2223 (set_nonincremental_init_from_string): Likewise.
2224 (output_init_element): Pass loc to warning_init and to
2225 add_pending_init.
2226
32e00768
MP
22272014-05-01 Marek Polacek <polacek@redhat.com>
2228
2229 PR c/43395
2230 * c-typeck.c (c_finish_return): Distinguish between label and variable
2231 when warning about returning local address.
2232
c9379ce2
MP
22332014-05-01 Marek Polacek <polacek@redhat.com>
2234
2235 PR c/29467
2236 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
2237 in C89 mode.
2238
d00887e8
MP
22392014-05-01 Marek Polacek <polacek@redhat.com>
2240
2241 PR c/43245
2242 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
2243 instead of 0 to WARN_FOR_QUALIFIERS.
2244
5436fa2e
MP
22452014-05-01 Marek Polacek <polacek@redhat.com>
2246
2247 PR c/56989
2248 * c-typeck.c (default_conversion): Use better location for
2249 error call.
2250
f8ed5150
MP
22512014-04-30 Marek Polacek <polacek@redhat.com>
2252
2253 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
2254 also when SANITIZE_FLOAT_DIVIDE is on.
2255
8337d1db
MP
22562014-04-30 Marek Polacek <polacek@redhat.com>
2257
2258 PR c/60139
2259 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
2260 and pedwarn_init. Use loc insted of input_location.
2261
c4bdc42f
MP
22622014-04-30 Marek Polacek <polacek@redhat.com>
2263
2264 PR c/60351
2265 * c-typeck.c (build_binary_op): Use location when warning about
2266 shift count.
2267
45484dcf
MP
22682014-04-25 Marek Polacek <polacek@redhat.com>
2269
2270 PR c/18079
2271 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
2272 always_inline/noinline and hot/cold attributes.
2273
34cf811f
MP
22742014-04-25 Marek Polacek <polacek@redhat.com>
2275
2276 PR c/60114
2277 * c-parser.c (c_parser_initelt): Pass input_location to
2278 process_init_element.
2279 (c_parser_initval): Pass loc to process_init_element.
2280 * c-tree.h (process_init_element): Adjust declaration.
2281 * c-typeck.c (push_init_level): Pass input_location to
2282 process_init_element.
2283 (pop_init_level): Likewise.
2284 (set_designator): Likewise.
2285 (output_init_element): Add location_t parameter. Pass loc to
2286 digest_init.
2287 (output_pending_init_elements): Pass input_location to
2288 output_init_element.
2289 (process_init_element): Add location_t parameter. Pass loc to
2290 output_init_element.
2291
42056eac
JJ
22922014-04-24 Jakub Jelinek <jakub@redhat.com>
2293
2294 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
2295 atomic-clause, allow comma in between atomic-clause and
2296 seq_cst.
2297
e162a134
JJ
22982014-04-22 Jakub Jelinek <jakub@redhat.com>
2299
2300 PR c/59073
2301 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
2302 fails, don't set OM_PARALLEL_COMBINED and return NULL.
2303
2f6babac
IZ
23042014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
2305
2306 PR middle-end/60469
2307 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2308 create_tmp_var instead build_decl for creating temps.
2309 (build_array_notation_expr): Likewise.
2310 (fix_conditional_array_notations_1): Likewise.
2311 (fix_array_notation_expr): Likewise.
2312 (fix_array_notation_call_expr): Likewise.
2313
8edbfaa6
JJ
23142014-03-28 Jakub Jelinek <jakub@redhat.com>
2315
2316 PR c++/60689
2317 * c-tree.h (c_build_function_call_vec): New prototype.
2318 * c-typeck.c (build_function_call_vec): Don't call
2319 resolve_overloaded_builtin here.
2320 (c_build_function_call_vec): New wrapper function around
2321 build_function_call_vec. Call resolve_overloaded_builtin here.
2322 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
2323 Call c_build_function_call_vec instead of build_function_call_vec.
2324 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2325 * c-decl.c (finish_decl): Likewise.
2326
7485aeea
MLI
23272014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2328
2329 PR c/55383
2330 * c-typeck.c: Use correct format string in cast-qual warning
2331
b17a8b07
TS
23322014-03-07 Thomas Schwinge <thomas@codesourcery.com>
2333
2334 * c-decl.c (c_decl_attributes): Use
2335 lang_hooks.types.omp_mappable_type.
2336 * c-typeck.c (c_finish_omp_clauses): Likewise.
2337
3af9c5e9
MP
23382014-03-06 Marek Polacek <polacek@redhat.com>
2339
2340 PR c/60197
2341 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
2342 of checking tree code.
2343
1c9f5f33
PK
23442014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2345
2346 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
2347 (c_parser_parameter_declaration): Likewise.
2348
cc28fc7f
MP
23492014-02-19 Marek Polacek <polacek@redhat.com>
2350
2351 PR c/60195
2352 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
2353 Call mark_exp_read on exp.value.
2354 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
2355 TREE_ADDRESSABLE on old instead of val.
2356 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
2357
b581c05c
PK
23582014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2359
2360 * c-parser.c (c_parser_get_builtin_args): Replace calls to
2361 C_EXPR_APPEND by vec_safe_push.
2362 * c-tree.h (C_EXPR_APPEND): Remove.
2363
81e5eca8
MP
23642014-01-31 Marek Polacek <polacek@redhat.com>
2365
2366 PR c/59963
2367 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
2368 build_function_call_vec.
2369 (build_function_call): Likewise.
2370 (build_atomic_assign): Likewise.
2371 (build_function_call_vec): Add arg_loc parameter. Use it.
2372 (convert_arguments): Likewise.
2373 (convert_for_assignment): Rename rhs_loc to expr_loc.
2374 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
2375 (c_parser_objc_keywordexpr): Likewise.
2376 (c_parser_postfix_expression_after_primary): Call
2377 build_function_call_vec with expr_loc rather than op_loc.
2378 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
2379 build_function_call_vec.
2380 (c_parser_expr_list): Add locations parameter. Fill it with locations
2381 of function arguments.
2382 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
2383
68fca595
MP
23842014-01-30 Marek Polacek <polacek@redhat.com>
2385
2386 PR c/59940
2387 * c-typeck.c (build_function_call_vec): Use loc parameter.
2388 (convert_arguments): Add location parameter. Use it.
2389 (ep_convert_and_check): Likewise.
2390 (build_atomic_assign): Adjust convert_for_assignment call.
2391 (build_modify_expr): Likewise.
2392 (digest_init): Likewise.
2393 (c_finish_return): Likewise.
2394 (build_conditional_expr): Adjust ep_convert_and_check calls.
2395 (convert_for_assignment): Add rhs_loc parameter. Use it.
2396 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
2397 calls.
2398
fa337f3a
RB
23992014-01-30 Richard Biener <rguenther@suse.de>
2400
2401 PR c/59905
2402 * c-typeck.c (build_function_call_vec): Do not replace calls
2403 to a function via an incompatible type with a runtime abort.
2404
b72271b9
BI
24052014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
2406
2407 * c-parser.c (c_parser_declaration_or_fndef): Replaced
2408 flag_enable_cilkplus with flag_cilkplus.
2409 (c_parser_direct_declarator_inner): Likewise.
2410 (c_parser_attribute_any_word): Likewise.
2411 (c_parser_attributes): Likewise.
2412 (c_parser_compound_statement): Likewise.
2413 (c_parser_statement_after_labels): Likewise.
2414 (c_parser_if_statement): Likewise.
2415 (c_parser_switch_statement): Likewise.
2416 (c_parser_do_statement): Likewise.
2417 (c_parser_for_statement): Likewise.
2418 (c_parser_unary_expression): Likewise.
2419 (c_parser_postfix_expression): Likewise.
2420 (c_parser_postfix_expression_after_primary): Likewise.
2421 (c_parser_postfix_expression_after_primary): Likewise.
2422 (c_parser_omp_clause_name): Likewise.
2423 (c_finish_omp_declare_simd): Likewise.
2424 (c_parser_cilk_verify_simd): Likewise.
2425 * c-typeck.c (build_array_ref): Likewise.
2426 (build_function_call_vec): Likewise.
2427 (convert_arguments): Likewise.
2428 (build_compound_expr): Likewise.
2429 (c_finish_return): Likewise.
2430 (c_finish_if_stmt): Likewise.
2431 (c_finish_loop): Likewise.
2432 (build_binary_op): Likewise.
2433
393e8e8b
MP
24342014-01-23 Marek Polacek <polacek@redhat.com>
2435
2436 PR c/59846
2437 * c-typeck.c (parser_build_binary_op): Use location instead of
2438 input_location.
2439 (build_binary_op): Pass location to shorten_compare.
2440
f04dda30
MP
24412014-01-23 Marek Polacek <polacek@redhat.com>
2442
2443 PR c/58346
2444 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
2445 an empty aggregate.
2446
789eadcd
MP
24472014-01-23 Marek Polacek <polacek@redhat.com>
2448
2449 PR c/59871
2450 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
2451 of a comma expression.
2452 (emit_side_effect_warnings): Likewise.
2453
40f14e9f
BI
24542014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2455
2456 PR c/59825
2457 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
2458 function to use walk_tree and moved a lot of its functionality to
2459 expand_array_notations.
2460 (expand_array_notations): New function.
2461
74558dd9
BI
24622014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2463
2464 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
2465 attribute an attribute without value.
2466
652fea39
JJ
24672014-01-23 Jakub Jelinek <jakub@redhat.com>
2468
2469 PR middle-end/58809
2470 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
2471 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
2472
f34f1c87
MP
24732014-01-22 Marek Polacek <polacek@redhat.com>
2474
2475 PR c/59891
2476 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
2477 of remove_c_maybe_const_expr on op1 and op2.
2478
241f845a
JJ
24792014-01-15 Jakub Jelinek <jakub@redhat.com>
2480
2481 PR c/58943
2482 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
2483 effects, preevaluate rhs using SAVE_EXPR first.
2484
9a74f20c
BI
24852014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
2486
2487 PR c++/59631
2488 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
2489 statements with if-elseif statements.
2490
96066ce1
MP
24912014-01-06 Marek Polacek <polacek@redhat.com>
2492
2493 PR c/57773
2494 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
2495 defined bit-field types only in ISO C.
2496
23a5b65a
RS
24972014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2498
2499 Update copyright years
2500
f9030485
RS
25012014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2502
2503 * c-array-notation.c: Use the standard form for the copyright notice.
2504
41958c28
BI
25052013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
2506
2507 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
2508 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
2509 field in parser is not empty. If not-empty, call the function
2510 c_parser_finish_omp_declare_simd.
2511 (c_parser_cilk_clause_vectorlength): Modified function to be shared
2512 between SIMD-enabled functions and #pragma simd. Added new parameter.
2513 (c_parser_cilk_all_clauses): Modified the usage of the function
2514 c_parser_cilk_clause_vectorlength as mentioned above.
2515 (c_parser_cilk_simd_fn_vector_attrs): New function.
2516 (c_finish_cilk_simd_fn_tokens): Likewise.
2517 (is_cilkplus_vector_p): Likewise.
2518 (c_parser_omp_clause_name): Added checking for "vectorlength,"
2519 "nomask," and "mask" strings in clause name.
2520 (c_parser_omp_all_clauses): Added 3 new case statements:
2521 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
2522 PRAGMA_CILK_CLAUSE_NOMASK.
2523 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
2524 check for vector attribute and if so call the function
2525 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
2526 called the function c_finish_cilk_simd_fn_tokens.
2527 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
2528 parser field is non-empty. If so, parse them as you would parse
2529 the omp declare simd pragma.
2530 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
2531 Added a check when step is a parameter and flag it as error.
2532 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
2533 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
2534 pragma_omp_clause.
2535
cef0fd0e
TS
25362013-12-17 Thomas Schwinge <thomas@codesourcery.com>
2537
2538 * c-parser.c (c_parser_omp_parallel): Fix description.
2539
12893402
BI
25402013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
2541
2542 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
2543 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2544 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
2545 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
2546
296674db
JM
25472013-12-04 Joseph Myers <joseph@codesourcery.com>
2548
2549 PR c/52023
2550 * c-parser.c (c_parser_alignas_specifier): Use
2551 c_sizeof_or_alignof_type instead of c_alignof.
2552 (c_parser_alignof_expression): Likewise, with min_alignof
2553 parameter depending on alignof spelling used.
2554
edd28054
MP
25552013-12-04 Marek Polacek <polacek@redhat.com>
2556
2557 PR c/54113
2558 * c-decl.c (start_function): Don't warn for missing prototype for
2559 inline functions.
2560
da0fc454
MP
25612013-12-03 Marek Polacek <polacek@redhat.com>
2562
2563 PR c/59351
2564 * c-decl.c (build_compound_literal): Allow compound literals with
2565 empty initial value.
2566
4c2ecab0
JM
25672013-12-02 Joseph Myers <joseph@codesourcery.com>
2568
2569 PR c/58235
2570 * c-typeck.c (build_modify_expr): Diagnose assignment to
2571 expression with array type.
2572
340baef7
JM
25732013-11-29 Joseph Myers <joseph@codesourcery.com>
2574
2575 PR c/42262
2576 * c-typeck.c (process_init_element): Do not treat a string as
2577 initializing a whole array when used with a designator for an
2578 individual element.
2579
6763b9f7
JM
25802013-11-29 Joseph Myers <joseph@codesourcery.com>
2581
2582 PR c/57574
2583 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
2584 an inline function following a static declaration.
2585
e7bd1de1
JJ
25862013-11-28 Jakub Jelinek <jakub@redhat.com>
2587
2588 PR c/59310
2589 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
2590 to p_name before calling c_parser_omp_teams instead of after.
2591 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
2592 argument. Remove unused p_name variable.
2593
0136f8f0
AH
25942013-11-27 Aldy Hernandez <aldyh@redhat.com>
2595 Jakub Jelinek <jakub@redhat.com>
2596
2597 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
2598 external_scope is NULL.
2599
241b71bb
TV
26002013-11-27 Tom de Vries <tom@codesourcery.com>
2601 Marc Glisse <marc.glisse@inria.fr>
2602
2603 PR c++/59032
2604 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
2605
2fb9a547
AM
26062013-11-22 Andrew MacLeod <amacleod@redhat.com>
2607
2608 * c-typeck.c: Add required include files from gimple.h.
2609
8400e75e
DM
26102013-11-22 David Malcolm <dmalcolm@redhat.com>
2611
2612 * c-decl.c (define_label, shadow_tag_warned)
2613 (check_bitfield_type_and_width, grokdeclarator, grokparms,
2614 store_parm_decls_newstyle, store_parm_decls_oldstyle)
2615 (declspecs_add_type): Remove use of in_system_header macro.
2616 * c-parser.c (c_parser_unary_expression): Likewise.
2617 * c-typeck.c (store_init_value, process_init_element)
2618 (c_start_case): Likewise.
2619
2620 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
2621 macro.
2622
2623 * c-parser.c (c_parser_set_source_position_from_token): Remove
2624 reference to in_system_header from comment.
2625
386b1f1f
RS
26262013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2627
2628 * c-decl.c (grokdeclarator): Update comment to refer to
2629 tree_to_[su]hwi rather than tree_low_cst.
2630
ae7e9ddd
RS
26312013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2632
2633 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
2634 tree_to_uhwi throughout.
2635
9439e9a1
RS
26362013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2637
2638 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
2639 throughout.
2640
9541ffee
RS
26412013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2642
2643 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
2644 throughout.
2645
c02065fc
AH
26462013-11-15 Aldy Hernandez <aldyh@redhat.com>
2647
2648 * c-parser.c (c_parser_cilk_simd): New.
2649 (c_parser_cilk_verify_simd): New.
2650 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
2651 (c_parser_omp_for_loop): Add case for NE_EXPR.
2652 Set c_break_label for CILK_SIMD.
2653 (c_parser_cilk_clause_vectorlength): New.
2654 (c_parser_cilk_clause_linear): New.
2655 (c_parser_cilk_clause_name): New.
2656 (c_parser_cilk_all_clauses): New.
2657 * c-typeck.c (build_unary_op): Pass location argument to
2658 readonly_error.
2659 (build_modify_expr): Same.
2660 (build_asm_expr): Same.
2661 (c_finish_bc_stmt): Error on break/continue in loops.
2662
18f429e2
AM
26632013-11-14 Andrew MacLeod <amacleod@redhat.com>
2664
2665 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
2666
d8a2d370
DN
26672013-11-14 Diego Novillo <dnovillo@google.com>
2668
2669 * c-decl.c: Include print-tree.h.
2670 Include stor-layout.h.
2671 Include varasm.h.
2672 Include attribs.h.
2673 Include stringpool.h.
2674 * c-lang.c: Include fold-const.h.
2675 * c-parser.c: Include stringpool.h.
2676 Include attribs.h.
2677 Include stor-layout.h.
2678 Include varasm.h.
2679 Include trans-mem.h.
2680 * c-typeck.c: Include stor-layout.h.
2681 Include trans-mem.h.
2682 Include varasm.h.
2683 Include stmt.h.
2684
38b7bc7f
JM
26852013-11-13 Joseph Myers <joseph@codesourcery.com>
2686
2687 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
2688 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
2689 __auto_type.
2690 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
2691 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
2692 RID_AUTO_TYPE.
2693 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
2694 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
2695 (c_parser_declarator, c_parser_direct_declarator_inner)
2696 (c_parser_parameter_declaration, c_parser_type_name): All callers
2697 changed.
2698 (c_parser_declaration_or_fndef): Handle declarations with type
2699 determined from the initializer.
2700
45b0be94
AM
27012013-11-12 Andrew MacLeod <amacleod@redhat.com>
2702
18f429e2 2703 * c-typeck.c: Include gimplify.h.
45b0be94 2704
582d9b50
JM
27052013-11-12 Joseph Myers <joseph@codesourcery.com>
2706
2707 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
2708 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
2709 comment.
2710 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
2711 or _Thread_local as appropriate in diagnostics.
2712 (build_null_declspecs): Initialize ret->thread_gnu_p.
2713 (declspecs_add_scspec): Handle either __thread or _Thread_local
2714 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
2715 pedantic. Do not disallow _Thread_local extern and _Thread_local
2716 static.
2717
267bac10
JM
27182013-11-07 Joseph Myers <joseph@codesourcery.com>
2719 Andrew MacLeod <amacleod@redhat.com>
2720
2721 * c-aux-info.c (gen_type): Handle atomic qualifier.
2722 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
2723 qualifiers when compating types.
2724 (shadow_tag_warned): Handle atomic_p in declspecs.
2725 (quals_from_declspecs): Likewise.
2726 (start_decl): Use c_type_promotes_to when promoting argument
2727 types.
2728 (grokdeclarator): Handle _Atomic.
2729 (get_parm_info): Diagnose any qualifier on "void" as only
2730 parameter.
2731 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
2732 comparing types. Use c_type_promotes_to when promoting argument
2733 types.
2734 (finish_function): Use c_type_promotes_to when promoting argument
2735 types.
2736 (build_null_declspecs): Handle atomic_p in declspecs.
2737 (declspecs_add_qual): Handle RID_ATOMIC.
2738 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
2739 (c_token_starts_declspecs): Handle RID_ATOMIC.
2740 (c_parser_declspecs): Handle atomic type specifiers and
2741 qualifiers.
2742 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
2743 from types of expressions with atomic type.
2744 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
2745 (c_parser_attribute_any_word): Handle RID_ATOMIC.
2746 (c_parser_initializer, c_parser_initelt, c_parser_initval)
2747 (c_parser_statement_after_labels, c_parser_switch_statement)
2748 (c_parser_for_statement, c_parser_expr_no_commas)
2749 (c_parser_conditional_expression, c_parser_binary_expression)
2750 (c_parser_cast_expression, c_parser_unary_expression)
2751 (c_parser_postfix_expression)
2752 (c_parser_postfix_expression_after_primary, c_parser_expression):
2753 Use convert_lvalue_to_rvalue.
2754 (c_parser_expression_conv, c_parser_expr_list): Document
2755 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
2756 (c_parser_objc_synchronized_statement): Use
2757 convert_lvalue_to_rvalue.
2758 (c_parser_objc_selector): Handle RID_ATOMIC.
2759 (c_parser_objc_receiver, c_parser_array_notation): Use
2760 convert_lvalue_to_rvalue.
2761 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
2762 _Atomic (type-name).
2763 (struct c_declspecs): Add atomic_p field.
2764 (convert_lvalue_to_rvalue): Declare.
2765 * c-typeck.c (c_type_promotes_to): Promote atomic types to
2766 corresponding atomic types.
2767 (qualify_type): Don't add _Atomic qualifiers from second argument.
2768 (comp_target_types): Do not allow _Atomic mismatches.
2769 (type_lists_compatible_p): Do not remove atomic qualifiers when
2770 comparing types.
2771 (really_atomic_lvalue, convert_lvalue_to_rvalue)
2772 (build_atomic_assign): New functions.
2773 (build_unary_op): Use build_atomic_assign for atomic increment and
2774 decrement.
2775 (build_conditional_expr): Do not treat _Atomic void as a qualified
2776 version of void.
2777 (build_modify_expr): Use build_atomic_assign for atomic LHS.
2778 (find_anonymous_field_with_type, convert_to_anonymous_field)
2779 (convert_for_assignment): Do not remove atomic qualifiers when
2780 comparing types.
2781 (digest_init): Do not accept initialization of arrays of atomic
2782 elements by string constants.
2783 (build_asm_expr): Use convert_lvalue_to_rvalue.
2784 (build_binary_op): Do not treat _Atomic void as a qualified
2785 version of void.
2786
0c249d4b
DD
27872013-11-06 DJ Delorie <dj@redhat.com>
2788
2789 * c-decl.c (locate_old_decl): If a previous conflicting decl is
2790 both explicit and builtin, print the location of the explicit one.
2791
6d7f7e0a
TB
27922013-11-05 Tobias Burnus <burnus@net-b.de>
2793
2794 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
2795 c_parser_omp_distribute, c_parser_omp_teams,
2796 c_parser_omp_target, c_parser_omp_declare): Handle
2797 -fopenmp-simd.
2798
b906f4ca
MP
27992013-11-03 Marek Polacek <polacek@redhat.com>
2800
2801 * c-decl.c (grokdeclarator): Add VLA instrumentation.
2802
ee1d5a02
JJ
28032013-11-01 Jakub Jelinek <jakub@redhat.com>
2804
2805 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
2806 check_dup_generic at the end, unless remove is true.
2807 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
2808 remove = true;.
2809 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
2810
5a9785fb
JJ
28112013-10-31 Jakub Jelinek <jakub@redhat.com>
2812
2813 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
2814 with decl that is not pointer nor array.
2815
939b37da
BI
28162013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
2817
2818 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
2819 a spawning function is found.
2820 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
2821 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
2822 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2823 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
2824 case.
2825 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
2826 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
2827 expr.
2828 (c_finish_return): Added a check to reject _Cilk_spawn in return
2829 expression.
2830 (build_cilk_spawn): New function.
2831 (build_cilk_sync): Likewise.
2832 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
2833
d4af74d4
TB
28342013-10-27 Tobias Burnus <burnus@net-b.de>
2835
2836 PR other/33426
2837 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
2838 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
2839 (c_parser_statement_after_labels): Update calls.
2840
d73749df 28412013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
2842
2843 PR other/33426
2844 * c-parser.c (c_parser_pragma, c_parser_for_statement):
2845 Handle PRAGMA_IVDEP.
2846 (c_parser_statement_after_labels): Update call.
2847
f28aa681
MP
28482013-10-24 Marek Polacek <polacek@redhat.com>
2849
2850 * c-parser.c (c_parser_struct_declaration): Add a comment.
2851 (c_parser_declarator): Don't allow _Alignas here.
2852
0645c1a2
AM
28532013-10-17 Andrew MacLeod <amacleod@redhat.com>
2854
2855 * c-parser.c: Include omp-low.h.
2856 * c-typeck.c: Likewise.
2857
568a31f2
MP
28582013-10-17 Marek Polacek <polacek@redhat.com>
2859
2860 PR c/58267
2861 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
2862 Document syntax of the array-declarator.
2863 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
2864 are not permitted.
2865 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
2866 (c_parser_struct_declaration): Likewise.
2867 (c_parser_declarator): Likewise.
2868 (c_parser_direct_declarator_inner): Likewise.
2869 (c_parser_parameter_declaration): Likewise.
2870 (c_parser_type_name): Likewise.
2871
acf0174b
JJ
28722013-10-11 Jakub Jelinek <jakub@redhat.com>
2873
2874 * c-lang.h (current_omp_declare_target_attribute): New extern
2875 decl.
2876 * c-parser.c: Include c-lang.h.
2877 (struct c_parser): Change tokens to c_token *.
2878 Add tokens_buf field. Change tokens_avail type to unsigned int.
2879 (c_parser_consume_token): If parser->tokens isn't
2880 &parser->tokens_buf[0], increment parser->tokens.
2881 (c_parser_consume_pragma): Likewise.
2882 (enum pragma_context): Add pragma_struct and pragma_param.
2883 (c_parser_external_declaration): Adjust
2884 c_parser_declaration_or_fndef caller.
2885 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
2886 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
2887 Adjust recursive call.
2888 (c_parser_struct_or_union_specifier): Use pragma_struct instead
2889 of pragma_external.
2890 (c_parser_parameter_declaration): Use pragma_param instead of
2891 pragma_external.
2892 (c_parser_compound_statement_nostart, c_parser_label,
2893 c_parser_for_statement): Adjust
2894 c_parser_declaration_or_fndef callers.
2895 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
2896 it through to c_parser_conditional_expression.
2897 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
2898 pass it through to c_parser_binary_expression. Adjust recursive
2899 call.
2900 (c_parser_binary_expression): Remove prec argument, add
2901 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
2902 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
2903 binop matches it, use build2 instead of parser_build_binary_op.
2904 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
2905 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
2906 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
2907 Handle pragma_struct and pragma_param the same as pragma_external.
2908 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
2909 (c_parser_omp_variable_list): Parse array sections for
2910 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
2911 (c_parser_omp_clause_collapse): Fully fold collapse expression.
2912 (c_parser_omp_clause_reduction): Handle user defined reductions.
2913 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
2914 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
2915 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
2916 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
2917 c_parser_omp_clause_depend, c_parser_omp_clause_map,
2918 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
2919 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
2920 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
2921 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
2922 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
2923 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
2924 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
2925 (c_parser_omp_for_loop): Add CODE argument, pass it through
2926 to c_finish_omp_for. Change last argument to cclauses,
2927 and adjust uses to grab parallel clauses from the array of all
2928 the split clauses. Adjust c_parser_binary_expression,
2929 c_parser_declaration_or_fndef and c_finish_omp_for callers.
2930 (omp_split_clauses): New function.
2931 (c_parser_omp_simd): New function.
2932 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
2933 Allow the function to be called also when parsing combined constructs,
2934 and call c_parser_omp_simd when parsing for simd.
2935 (c_parser_omp_sections_scope): If section-sequence doesn't start with
2936 #pragma omp section, require exactly one structured-block instead of
2937 sequence of statements.
2938 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
2939 Allow the function to be called also when parsing combined constructs.
2940 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
2941 Allow the function to be called also when parsing combined
2942 constructs.
2943 (c_parser_omp_taskgroup, c_parser_omp_cancel,
2944 c_parser_omp_cancellation_point, c_parser_omp_distribute,
2945 c_parser_omp_teams, c_parser_omp_target_data,
2946 c_parser_omp_target_update, c_parser_omp_target,
2947 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
2948 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
2949 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
2950 (c_parser_omp_construct): Add p_name and mask vars. Handle
2951 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
2952 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
2953 and c_parser_omp_sections callers.
2954 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
2955 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
2956 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
2957 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
2958 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
2959 OMP_CLAUSE_DEPEND.
2960 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
2961 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
2962 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
2963 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
2964 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
2965 * c-typeck.c: Include tree-inline.h.
2966 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
2967 handle_omp_array_sections_1, handle_omp_array_sections,
2968 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
2969 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
2970 user defined reductions.
2971 (c_tree_equal): New function.
2972 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
2973 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
2974 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
2975 c_check_omp_declare_reduction_r): New prototypes.
2976 * c-decl.c (current_omp_declare_target_attribute): New variable.
2977 (c_decl_attributes): New function.
2978 (start_decl, start_function): Use it instead of decl_attributes.
2979 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
2980 c_omp_reduction_decl, c_omp_reduction_lookup,
2981 c_check_omp_declare_reduction_r): New functions.
2982
0a6c2227
TT
29832013-09-25 Tom Tromey <tromey@redhat.com>
2984
2985 * Make-lang.in (c/gccspec.o): Remove.
2986 (CFLAGS-c/gccspec.o): New variable.
2987 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
2988 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
2989 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
2990
f3bc55f0
TT
29912013-09-25 Tom Tromey <tromey@redhat.com>
2992
2993 * Make-lang.in (c/gccspec.o): Don't use subshell.
2994
a24d975c
MP
29952013-09-18 Marek Polacek <polacek@redhat.com>
2996
2997 PR sanitize/58443
2998 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
2999 Remove unnecessary check.
3000
ce6923c5
MP
30012013-09-18 Marek Polacek <polacek@redhat.com>
3002
3003 PR sanitizer/58411
3004 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
3005 no_sanitize_undefined attribute.
3006
a1e51df9
KT
30072013-09-13 Kai Tietz <ktietz@redhat.com>
3008
3009 PR target/57848
3010 * c-decl.c (c_builtin_function_ext_scope): Remove
3011 wrong assumption that it is never called on prexisting
3012 symbol.
3013
0af94e6f
JR
30142013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
3015
3016 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
3017
20059c8b
GDR
30182013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3019
3020 * c-objc-common.c (c_tree_printer): Tidy.
3021
de5a5fa1
MP
30222013-08-30 Marek Polacek <polacek@redhat.com>
3023
3024 * c-typeck.c (build_binary_op): Add division by zero and shift
3025 instrumentation.
3026
2531a1d9 30272013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 3028 Joseph Myers <joseph@codesourcery.com>
2531a1d9 3029
6e2bcc98 3030 PR c/35649
2531a1d9
JR
3031 * c-typeck.c (c_common_type): Prefer double_type_node over
3032 other REAL_TYPE types with the same precision.
3033 (convert_arguments): Likewise.
3034
025311c4
GDR
30352013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
3036
3037 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
3038 (c_initialize_diagnostics): Call a destructor for the early printer.
3039
da6ca2b5
GDR
30402013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3041
3042 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
3043 printer initialization.
3044
318cda85 30452013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 3046
318cda85
BI
3047 PR c/57490
3048 * c-array-notation.c (fix_conditional_array_notations_1): Added a
3049 check for truth values.
3050 (expand_array_notation_exprs): Added truth values case. Removed an
3051 unwanted else. Added for-loop to walk through subtrees in default
3052 case.
3053
b066401f
GDR
30542013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3055
3056 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
3057
fb48aadc
JM
30582013-07-23 Joseph Myers <joseph@codesourcery.com>
3059
3060 * c-parser.c (struct c_generic_association): Fix typo.
3061
433cc7b0
TT
30622013-07-23 Tom Tromey <tromey@redhat.com>
3063 Joseph Myers <joseph@codesourcery.com>
3064
3065 * c-parser.c (struct c_generic_association): New.
3066 (c_generic_association_d): New typedef.
3067 (c_parser_generic_selection): New function.
3068 (c_parser_postfix_expression): Handle RID_GENERIC.
3069
26d40c3d
JM
30702013-07-13 Jason Merrill <jason@redhat.com>
3071
3072 PR c++/57793
3073 * c-decl.c (finish_struct): Check for too-large class.
3074
ecdbd01a 30752013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
3076
3077 PR c/57821
3078 * c-typeck.c (set_init_index): When folding, check for index overflow.
3079
1141ed3f
BI
30802013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3081
3082 * c-parser.c (c_parser_array_notation): Removed rejection of array
3083 notations in an array of function pointers.
3084
713b46fa
BI
30852013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
3086
3087 * c-array-notation.c (make_triplet_val_inv): New function.
3088 (create_cmp_incr): Likewise.
3089 (create_array_refs): Likewise.
3090 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
3091 Also modularized common parts between functions and called the function.
3092 (build_array_notation_expr): Likewise.
3093 (fix_conditional_array_notations_1): Likewise.
3094 (fix_array_notation_expr): Likewise.
3095 (fix_array_notation_call_expr): Likewise.
3096
92f20202
MP
30972013-06-18 Marek Polacek <polacek@redhat.com>
3098
3099 PR c/57630
3100 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
3101
73a23b06
BI
31022013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
3103
3104 * c-array-notation.c (build_array_notation_expr): Reject array notation
3105 mismatch between LHS and RHS even inside a call_expr. Also, removed
3106 a couple while statements that were dead code.
3107
00b8517d
BI
31082013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
3109
3110 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
3111 excessive precision expressions in function parameters. Also removed
3112 couple unwanted while statements.
3113
1509bdda
BI
31142013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3115
3116 * c-array-notation.c (expand_array_notation_exprs): Added
3117 ARRAY_NOTATION_REF case.
3118
d60f1706
BI
31192013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3120
3121 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
3122 function to c-family/array-notation-common.c.
3123 (is_cilkplus_reduce_builtin): Likewise.
3124 (find_rank): Likewise.
3125 (extract_array_notation_exprs): Likewise.
3126 (replace_array_notations): Likewise.
3127 (find_inv_trees): Likewise.
3128 (replace_inv_trees): Likewise.
3129 (contains_array_notation_expr): Likewise.
3130 (find_correct_array_notation_type): Likewise.
3131 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
3132 (struct inv_list): Moved this to c-family/array-notation-common.c.
3133 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
3134
6d6efbb3
BI
31352013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
3136
3137 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
3138 reduction functions outside the for-loop. Added a check if the fundecl
3139 is non-NULL. Finally, removed an unwanted if-statement, and made the
3140 body unconditional.
3141
25c22937
BI
31422013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3143
3144 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
3145 condition of the if-statement matches the rank of else-block and then-
3146 block when array notations are used.
3147 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
3148 expression after the entire function body is parsed.
3149 (c_parser_expr_no_commas): Delayed creating array notation expressions
3150 to the end of function parsing.
3151 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
3152 whole if-statement instead of just the condition.
3153 (expand_array_notation_exprs): Added MODIFY_EXPR case.
3154
edd25645
BI
31552013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3156
3157 PR c/57474
3158 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
3159 array to NULL_TREE if they are unused. Also added a check for the
3160 field to be NULL before its fields are used in future.
3161
065ce7f1
RO
31622013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3163
3164 PR bootstrap/57450
3165 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
3166 (build_array_notation_expr): Likewise.
3167
36536d79
BI
31682013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3169
3170 * c-typeck.c (build_array_ref): Added a check to see if array's
3171 index is greater than one. If true, then emit an error.
3172 (build_function_call_vec): Exclude error reporting and checking
3173 for builtin array-notation functions.
3174 (convert_arguments): Likewise.
3175 (c_finish_return): Added a check for array notations as a return
3176 expression. If true, then emit an error.
3177 (c_finish_loop): Added a check for array notations in a loop
3178 condition. If true then emit an error.
3179 (lvalue_p): Added a ARRAY_NOTATION_REF case.
3180 (build_binary_op): Added a check for array notation expr inside
3181 op1 and op0. If present, we call another function to find correct
3182 type.
3183 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
3184 * c-parser.c (c_parser_compound_statement): Check if array
3185 notation code is used in tree, if so, then transform them into
3186 appropriate C code.
3187 (c_parser_expr_no_commas): Check if array notation is used in LHS
3188 or RHS, if so, then build array notation expression instead of
3189 regular modify.
3190 (c_parser_postfix_expression_after_primary): Added a check for
3191 colon(s) after square braces, if so then handle it like an array
3192 notation. Also, break up array notations in unary op if found.
3193 (c_parser_direct_declarator_inner): Added a check for array
3194 notation.
3195 (c_parser_compound_statement): Added a check for array notation in
3196 a stmt. If one is present, then expand array notation expr.
3197 (c_parser_if_statement): Likewise.
3198 (c_parser_switch_statement): Added a check for array notations in
3199 a switch statement's condition. If true, then output an error.
3200 (c_parser_while_statement): Similarly, but for a while.
3201 (c_parser_do_statement): Similarly, but for a do-while.
3202 (c_parser_for_statement): Similarly, but for a for-loop.
3203 (c_parser_unary_expression): Check if array notation is used in a
3204 pre-increment or pre-decrement expression. If true, then expand
3205 them.
3206 (c_parser_array_notation): New function.
3207 * c-array-notation.c: New file.
3208 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
3209
cd192ccc
MS
32102013-05-23 Mike Stump <mikestump@comcast.net>
3211
3212 * c-typeck.c (convert_for_assignment): Handle references to memory
3213 spaces better.
3214
427b248d
JM
32152013-05-16 Jason Merrill <jason@redhat.com>
3216
3217 * Make-lang.in (cc1$(exeext)): Use link mutex.
3218
44d90fe1
PC
32192013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
3220
3221 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
3222 to simply use OPT_Wpointer_arith.
3223 (build_unary_op): Likewise.
3224
4e7d7b3d
JJ
32252013-04-03 Jakub Jelinek <jakub@redhat.com>
3226
3227 PR c/19449
3228 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
3229 argument. If set, or it temporarily for parsing of the first
3230 argument into force_folding_builtin_constant_p.
3231 (c_parser_postfix_expression): Adjust callers.
3232
839b422f
RB
32332013-03-21 Richard Biener <rguenther@suse.de>
3234
3235 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
3236 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
3237
2ee028f1
MP
32382013-02-12 Marek Polacek <polacek@redhat.com>
3239
3240 PR c/44938
3241 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
3242 origtypes to NULL.
3243
8824edff
JJ
32442013-01-24 Jakub Jelinek <jakub@redhat.com>
3245
3246 PR c/56078
3247 * c-typeck.c (set_nonincremental_init_from_string): If
3248 constructor_max_index is NULL, treat it as if tree_int_cst_lt
3249 returned false.
3250 (process_init_element): Likewise.
3251
eadd3d0d
JJ
32522012-12-20 Jakub Jelinek <jakub@redhat.com>
3253
3254 PR c++/55619
3255 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
3256 argument, don't call default_function_array_conversion
3257 nor c_fully_fold here.
3258 (c_parser_asm_statement): Adjust callers.
3259 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
3260 and outputs here, and call default_function_array_conversion
3261 on inputs that don't need to be addressable.
3262
f8a93a2e
JJ
32632012-12-18 Jakub Jelinek <jakub@redhat.com>
3264
3265 PR c/39464
3266 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
3267 warning require that both c_common_unsigned_type as well as
3268 c_common_signed_type is the same for both mvl and mvr types.
3269
9771b263
DN
32702012-11-16 Diego Novillo <dnovillo@google.com>
3271
3272 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
3273
3274 * c-common.c: Use new vec API in vec.h.
3275 * c-common.h: Likewise.
3276 * c-gimplify.c: Likewise.
3277 * c-pragma.c: Likewise.
3278 * c-pretty-print.c: Likewise.
3279 * c-pretty-print.h: Likewise.
3280 * c-semantics.c: Likewise.
3281 * c-decl.c: Likewise.
3282 * c-parser.c: Likewise.
3283 * c-tree.h: Likewise.
3284 * c-typeck.c: Likewise.
3285
880661a4
JW
32862012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
3287
3288 PR c++/54930
3289 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
3290
077d1abe
MLI
32912012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3292
3293 PR c/53066
3294 * c-decl.c (warn_if_shadowing): Do not warn if a variable
3295 shadows a function, unless the variable is a function or a
3296 pointer-to-function.
3297
3a785c97
JJ
32982012-10-12 Jakub Jelinek <jakub@redhat.com>
3299
3300 PR c/54381
3301 * c-parser.c (struct c_tree_loc_pair): Removed.
3302 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
3303 add location_t * and tree * arguments, fill in array of 3
3304 sizeof_arg trees and corresponding locs.
3305 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
3306 c_parser_expr_list callers.
3307 (c_parser_postfix_expression_after_primary): Likewise. Pass
3308 array of 3 sizeof_arg trees and locs (corresponding to first
3309 3 arguments) to sizeof_pointer_memaccess_warning.
3310
703c8606
LC
33112012-10-09 Lawrence Crowl <crowl@google.com>
3312
3313 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
3314 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
3315 hash table.
3316
5d9de0d0
PC
33172012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
3318
3319 PR c++/54194
3320 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
3321 call.
3322
a212e43f
MG
33232012-10-09 Marc Glisse <marc.glisse@inria.fr>
3324
3325 PR c++/54427
3326 * c-typeck.c: Include c-common.h.
3327 (enum stv_conv): Moved to c-common.h.
3328 (scalar_to_vector): Moved to c-common.c.
3329 (build_binary_op): Adapt to scalar_to_vector's new prototype.
3330 * Make-lang.in: c-typeck.c depends on c-common.h.
3331
3b78de56
AC
33322012-10-04 Arnaud Charlet <charlet@adacore.com>
3333
3334 * c-decl.c (c_write_global_declarations): Fix handling of
3335 -fdump-ada-spec*.
3336
78c60e3d
SS
33372012-09-30 Sharad Singhai <singhai@google.com>
3338
3339 * c-decl.c (c_write_global_declarations): Use a different method
3340 to determine if the dump has ben initialized.
3341
9f33203d
JM
33422012-09-14 Joseph Myers <joseph@codesourcery.com>
3343
3344 PR c/54552
3345 * c-typeck.c (c_cast_expr): When casting to a type requiring
3346 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
3347 c_fully_fold first.
3348
a27d595d
JM
33492012-09-14 Joseph Myers <joseph@codesourcery.com>
3350
3351 PR c/54103
3352 * c-typeck.c (build_unary_op): Pass original argument of
3353 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
3354 any C_MAYBE_CONST_EXPR, if it has integer operands.
3355 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
3356 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
3357 to c_objc_common_truthvalue_conversion, then remove any
3358 C_MAYBE_CONST_EXPR, if they have integer operands. Use
3359 c_objc_common_truthvalue_conversion not
3360 c_common_truthvalue_conversion.
3361 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
3362 call note_integer_operands for arguments with integer operands
3363 that are not integer constants.
3364
9feb29df
JJ
33652012-09-13 Jakub Jelinek <jakub@redhat.com>
3366
3367 PR c/54559
3368 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
3369 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
3370
d409320c
JJ
33712012-08-31 Jakub Jelinek <jakub@redhat.com>
3372
3373 PR c/54428
3374 * c-convert.c (convert): Don't call fold_convert_loc if
3375 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
3376 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
3377 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
3378
6265d07c
JJ
33792012-08-24 Jakub Jelinek <jakub@redhat.com>
3380
3381 PR c/54355
3382 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
3383 for nested and empty_ok arguments in the call to
3384 c_parser_declaration_or_fndef.
3385
1a4049e7
JJ
33862012-08-17 Jakub Jelinek <jakub@redhat.com>
3387
3388 * c-tree.h (c_last_sizeof_arg): Declare.
3389 * c-parser.c (struct c_tree_loc_pair): New type.
3390 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
3391 non-NULL.
3392 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
3393 (c_parser_postfix_expression_after_primary): Likewise. Call
3394 sizeof_pointer_memaccess_warning if needed.
3395 (sizeof_ptr_memacc_comptypes): New function.
3396 * c-typeck.c (c_last_sizeof_arg): New global variable.
3397 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
3398
0229aee9
UB
33992012-07-24 Uros Bizjak <ubizjak@gmail.com>
3400
3401 * c-lang.h (lang_decl): Add variable_size GTY option.
3402
7ee2468b
SB
34032012-07-16 Steven Bosscher <steven@gcc.gnu.org>
3404
3405 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
3406 * Make-lang.in: Fix dependencies.
3407
d4a10d0a
SB
34082012-06-29 Steven Bosscher <steven@gcc.gnu.org>
3409
3410 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
3411 and add language Makefile hooks.
3412 * config-lang.in: New file.
3413 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
3414 add the required "normal" config-lang.in rules.
3415 * c-lang.h: Moved from gcc/ to here.
3416 * c-tree.h: Likewise.
3417 * c-objc-common.c: Likewise.
3418 * c-objc-common.h: Likewise.
3419 * c-typeck.c: Likewise.
3420 * c-convert.c: Likewise.
3421 * c-lang.c: Likewise.
3422 * c-aux-info.c: Likewise.
3423 * c-errors.c: Likewise.
3424 * gccspec.c: Likewise.
3425 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
3426 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
3427\f
818ab71a 3428Copyright (C) 2012-2016 Free Software Foundation, Inc.
d4a10d0a
SB
3429
3430Copying and distribution of this file, with or without modification,
3431are permitted in any medium without royalty provided the copyright
3432notice and this notice are preserved.