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