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