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