]> gcc.gnu.org Git - gcc.git/blame - gcc/c/ChangeLog
task.c (gomp_create_target_task): Set firstprivate_copies to NULL.
[gcc.git] / gcc / c / ChangeLog
CommitLineData
e6d6ec9e
TV
12016-01-14 Tom de Vries <tom@codesourcery.com>
2
3 PR tree-optimization/68773
4 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
5 set force_output.
6
00083992
MP
72016-01-14 Marek Polacek <polacek@redhat.com>
8
9 PR c/69262
10 * c-decl.c (grokdeclarator): Provide more information for invalid
11 array declarations.
12
7443cf13
DM
132016-01-06 David Malcolm <dmalcolm@redhat.com>
14
15 * c-parser.c (c_parser_unary_expression): For dereferences, build
16 a combined location before calling build_indirect_ref, so that
17 error reports cover the full range, manually updating the c_expr
18 src_range.
19
6b131d5b
MP
202016-01-06 Marek Polacek <polacek@redhat.com>
21
22 PR sanitizer/69099
23 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
24 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
25 NULL.
26
818ab71a
JJ
272016-01-04 Jakub Jelinek <jakub@redhat.com>
28
29 Update copyright years.
30
2fe0a208
MP
312016-01-04 Marek Polacek <polacek@redhat.com>
32
33 PR c/68908
34 * c-typeck.c (build_atomic_assign): Improve commentary. Add
35 optimization to use __atomic_fetch_* built-in if possible.
36
c7b48c8a
TS
372015-12-23 Thomas Schwinge <thomas@codesourcery.com>
38
39 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
40 into...
41 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
42 all users.
43
fda5652f
MP
442015-12-22 Marek Polacek <polacek@redhat.com>
45
46 PR c/69002
47 * c-typeck.c (build_component_ref): Warn when acessing elements of
48 atomic structures or unions.
49
745e411d
DM
502015-12-21 David Malcolm <dmalcolm@redhat.com>
51
52 * c-typeck.c: Include "gcc-rich-location.h".
53 (build_binary_op): In the two places that call binary_op_error,
54 create a gcc_rich_location and populate it with the location of
55 the binary op and its two operands.
56
94c40e19
DM
572015-12-16 David Malcolm <dmalcolm@redhat.com>
58
59 * c-parser.c (c_parser_statement_after_labels): When calling
60 c_finish_return, Use the return expression's location if it has
61 one, falling back to the location of the first token within it.
62 * c-typeck.c (c_finish_return): When issuing warnings about
63 the incorrect presence/absence of a return value, issue a note
64 showing the declaration of the function.
65
de67c4c3
DM
662015-12-16 David Malcolm <dmalcolm@redhat.com>
67
68 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
69 to 4.
70 (c_parser_peek_nth_token): New function.
71 (c_parser_peek_conflict_marker): New function.
72 (c_parser_error): Detect conflict markers and report them as such.
73
a10704e1
DM
742015-12-16 David Malcolm <dmalcolm@redhat.com>
75
76 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
77 to preserve range information for the primary expression
78 in the call to c_parser_postfix_expression_after_primary.
79
8062bca6
DM
802015-12-16 David Malcolm <dmalcolm@redhat.com>
81
82 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
83 expression location, falling back on the first token location,
84 rather than always using the latter.
85
d06f8b75
MP
862015-12-16 Marek Polacek <polacek@redhat.com>
87
88 PR c/64637
89 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
90 available.
91
2994fb91
MP
922015-12-15 Marek Polacek <polacek@redhat.com>
93
94 PR c/68907
95 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
96 artificial decl.
97
a1b93f8d
DM
982015-12-08 David Malcolm <dmalcolm@redhat.com>
99
100 * c-parser.c (c_parser_alignof_expression): Capture location of
101 closing parenthesis (if any), or of end of unary expression, and
102 use it to build a src_range for the expression.
103
46c6e1e2
DM
1042015-12-08 David Malcolm <dmalcolm@redhat.com>
105
106 PR c/68757
107 * c-parser.c (c_parser_get_builtin_args): Add
108 "out_close_paren_loc" param, and write back to it.
109 (c_parser_postfix_expression): Capture the closing
110 parenthesis location for RID_CHOOSE_EXPR,
111 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
112 RID_BUILTIN_SHUFFLE and use it to set the source range
113 for such expressions; within RID_BUILTIN_COMPLEX set
114 the underlying location.
115
66189108
MP
1162015-12-07 Marek Polacek <polacek@redhat.com>
117
118 PR c/68668
119 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
120 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
121
f187980b
EB
1222015-12-04 Eric Botcazou <ebotcazou@adacore.com>
123
124 * c-tree.h (c_build_va_arg): Adjust prototype.
125 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
126 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
127 parameter, adjust throughout and issue an error if EXPR is a component
128 with reverse storage order.
129
4250754e
JM
1302015-12-02 Jason Merrill <jason@redhat.com>
131
132 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
133 (c_fully_fold_internal, decl_constant_value_for_optimization):
134 Move from c-common.c.
135 * c-tree.h: Declare decl_constant_value_for_optimization.
136 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
137
e9e32ee6
JM
1382015-12-02 Joseph Myers <joseph@codesourcery.com>
139
140 PR c/68162
141 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
142 following link from declarator to next declarator. Track original
143 qualified type and pass it to c_build_qualified_type.
144 * c-typeck.c (c_build_qualified_type): Add arguments
145 orig_qual_type and orig_qual_indirect.
146
ff7a55bf
TS
1472015-12-02 Thomas Schwinge <thomas@codesourcery.com>
148
149 * c-parser.c (c_parser_omp_clause_name)
150 (c_parser_oacc_all_clauses): Alphabetical sorting.
151
657e4e47
JJ
1522015-12-02 Jakub Jelinek <jakub@redhat.com>
153
154 PR c/68533
155 * c-decl.c (get_parm_info): Use b->locus instead of input_location
156 for diagnostics.
157
37d5ad46
JB
1582015-12-01 Julian Brown <julian@codesourcery.com>
159 Cesar Philippidis <cesar@codesourcery.com>
160 James Norris <James_Norris@mentor.com>
161
162 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
163 (c_parser_oacc_clause_use_device): New function.
164 (c_parser_oacc_all_clauses): Add use_device support.
165 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
166 (c_parser_oacc_host_data): New function.
167 (c_parser_omp_construct): Add host_data support.
168 * c-tree.h (c_finish_oacc_host_data): Add prototype.
169 * c-typeck.c (c_finish_oacc_host_data): New function.
170 (c_finish_omp_clauses): Add use_device support.
171
a4850ce9
JH
1722015-11-29 Jan Hubicka <hubicka@ucw.cz>
173
174 PR c/67106
175 * c-decl.c: Set TYPE_PACKED in variants.
176
b58d3df2
ML
1772015-11-27 Martin Liska <mliska@suse.cz>
178
179 PR c++/68312
180 * c-array-notation.c (fix_builtin_array_notation_fn):
181 Use release_vec_vec instead of vec::release.
182 (build_array_notation_expr): Likewise.
183 (fix_conditional_array_notations_1): Likewise.
184 (fix_array_notation_expr): Likewise.
185 (fix_array_notation_call_expr): Likewise.
186
aec17bfe
JJ
1872015-11-27 Jakub Jelinek <jakub@redhat.com>
188
189 PR c/63326
190 * c-parser.c (c_parser_compound_statement_nostart): If
191 last_label is true, use pragma_stmt instead of pragma_compound
192 as second c_parser_pragma argument.
193 (c_parser_omp_ordered, c_parser_omp_target_update,
194 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
195 false as second argument to c_parser_skip_to_pragma_eol after
196 diagnosing standalone directives used in pragma_stmt context.
197
688c4de0
IV
1982015-11-24 Ilya Verbin <ilya.verbin@intel.com>
199
200 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
201 with "if (ENABLE_OFFLOADING)".
202
cbd03aee
DM
2032015-11-23 David Malcolm <dmalcolm@redhat.com>
204
205 PR objc/68438
206 * c-parser.c (c_parser_postfix_expression): Set up source ranges
207 for various Objective-C constructs: Class.name syntax,
208 @selector(), @protocol(), @encode(), and [] message syntax.
209
a87a86e1
DM
2102015-11-20 David Malcolm <dmalcolm@redhat.com>
211
212 PR 62314
213 * c-typeck.c (should_suggest_deref_p): New function.
214 (build_component_ref): Special-case POINTER_TYPE when
215 generating a "not a structure of union" error message, and
216 suggest a "->" rather than a ".", providing a fix-it hint.
217
8ece8dfb
DM
2182015-11-19 David Malcolm <dmalcolm@redhat.com>
219
220 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
221 candidate into a new function, find_closest_identifier.
222
433068cc
MP
2232015-11-19 Marek Polacek <polacek@redhat.com>
224
225 PR c/68412
226 * c-typeck.c (parser_build_binary_op): Properly handle
227 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
228
bef08b71
DM
2292015-11-17 David Malcolm <dmalcolm@redhat.com>
230
231 * c-parser.c (set_c_expr_source_range): Bulletproof both
232 overloaded implementations against NULL expr->value.
233 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
234 values.
235 (c_parser_unary_expression): Likewise when handling addresses of
236 labels.
237 (c_parser_postfix_expression): Likewise for statement expressions,
238 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
239 __builtin_va_arg, and for __builtin_offset_of.
240 (c_parser_postfix_expression_after_paren_type): Initialize expr's
241 src_range using the range of the braced initializer.
242 (c_parser_transaction_expression): Set src_range for "ret" to a
243 sane pair of values.
244
fff77217
KY
2452015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
246
247 * c-parser.c (c_finish_omp_declare_simd): Look for
248 "simd" attribute as well. Update error message.
249
1d899da2
TS
2502015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
251
252 * c-parser.c (c_parser_omp_declare_target): Adjust.
253
e4606348
JJ
2542015-11-14 Jakub Jelinek <jakub@redhat.com>
255
256 * c-typeck.c (c_finish_omp_clauses): Don't mark
257 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
258
3e636daf
MP
2592015-11-14 Marek Polacek <polacek@redhat.com>
260
261 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
262 * c-typeck.c: Likewise.
263
ebedc9a3
DM
2642015-11-13 David Malcolm <dmalcolm@redhat.com>
265
266 * c-decl.c (warn_defaults_to): Pass line_table to
267 rich_location ctor.
268 * c-errors.c (pedwarn_c99): Likewise.
269 (pedwarn_c90): Likewise.
270 * c-parser.c (set_c_expr_source_range): New functions.
271 (c_token::get_range): New method.
272 (c_token::get_finish): New method.
273 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
274 based on the range from the start of the LHS to the end of the
275 RHS.
276 (c_parser_conditional_expression): Likewise, based on the range
277 from the start of the cond.value to the end of exp2.value.
278 (c_parser_binary_expression): Call set_c_expr_source_range on
279 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
280 (c_parser_cast_expression): Call set_c_expr_source_range on ret
281 based on the cast_loc through to the end of the expr.
282 (c_parser_unary_expression): Likewise, based on the
283 op_loc through to the end of op.
284 (c_parser_sizeof_expression) Likewise, based on the start of the
285 sizeof token through to either the closing paren or the end of
286 expr.
287 (c_parser_postfix_expression): Likewise, using the token range,
288 or from the open paren through to the close paren for
289 parenthesized expressions.
290 (c_parser_postfix_expression_after_primary): Likewise, for
291 various kinds of expression.
292 * c-tree.h (struct c_expr): Add field "src_range".
293 (c_expr::get_start): New method.
294 (c_expr::get_finish): New method.
295 (set_c_expr_source_range): New decls.
296 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
297 on ret for prefix unary ops.
298 (parser_build_binary_op): Likewise, running from the start of
299 arg1.value through to the end of arg2.value.
300
ec8b536f
MP
3012015-11-13 Marek Polacek <polacek@redhat.com>
302
303 PR c/68320
304 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
305
277fe616
DM
3062015-11-13 David Malcolm <dmalcolm@redhat.com>
307
308 * c-typeck.c: Include spellcheck.h.
309 (lookup_field_fuzzy_find_candidates): New function.
310 (lookup_field_fuzzy): New function.
311 (build_component_ref): If the field was not found, try using
312 lookup_field_fuzzy and potentially offer a suggestion.
313
6e232ba4
JN
3142015-11-12 James Norris <jnorris@codesourcery.com>
315 Joseph Myers <joseph@codesourcery.com>
316
317 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
318 (c_parser_omp_clause_name): Handle 'device_resident' clause.
319 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
320 and PRAGMA_OMP_CLAUSE_LINK.
321 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
322 and PRAGMA_OACC_CLAUSE_LINK.
323 (OACC_DECLARE_CLAUSE_MASK): New definition.
324 (c_parser_oacc_declare): New function.
325
9be4f715
MP
3262015-11-12 Marek Polacek <polacek@redhat.com>
327
328 PR c/67784
329 * c-parser.c (c_parser_for_statement): Reclassify the token in
330 a correct scope.
331
e78bede6
MP
3322015-11-11 Marek Polacek <polacek@redhat.com>
333
334 PR c/68107
335 PR c++/68266
336 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
337 checking the size of an array.
338
69f293c9
AM
3392015-11-11 Andrew MacLeod <amacleod@redhat.com>
340
341 * c-array-notation.c: Remove unused header files.
342 * c-aux-info.c: Likewise.
343 * c-convert.c: Likewise.
344 * c-decl.c: Likewise.
345 * c-errors.c: Likewise.
346 * c-lang.c: Likewise.
347 * c-objc-common.c: Likewise.
348 * c-parser.c: Likewise.
349 * c-typeck.c: Likewise.
350 * gccspec.c: Likewise.
351
3a40d81d
NS
3522015-11-09 Thomas Schwinge <thomas@codesourcery.com>
353 Cesar Philippidis <cesar@codesourcery.com>
354 James Norris <jnorris@codesourcery.com>
355 Julian Brown <julian@codesourcery.com>
356 Nathan Sidwell <nathan@codesourcery.com>
357
358 c/
359 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
360 routine arg.
361 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
362 (c_parser_pragma): Parse 'acc routine'.
363 (OACC_ROUTINE_CLAUSE_MARK): Define.
364 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
365
fc402eec
AA
3662015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
367
368 PR debug/67192
369 * c-typeck.c (c_finish_loop): For unconditional loops, set the
370 location of the backward-goto to the start of the loop body.
371
f6b0b3db
AA
3722015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
373
374 PR debug/67192
375 * c-parser.c (c_parser_while_statement): Finish the loop before
376 parsing ahead for misleading indentation.
377 (c_parser_for_statement): Likewise.
378
ee45a32d
EB
3792015-11-08 Eric Botcazou <ebotcazou@adacore.com>
380
381 * c-decl.c (finish_struct): If the structure has reverse storage
382 order, rewrite the type of array fields with scalar component. Call
383 maybe_apply_pragma_scalar_storage_order on entry.
384 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
385 errors on bit-fields and reverse SSO here and not...
386 (c_mark_addressable): ...here.
387 (output_init_element): Adjust call to initializer_constant_valid_p.
388 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
389
8a645150
DM
3902015-11-06 David Malcolm <dmalcolm@redhat.com>
391
392 * c-decl.c (warn_defaults_to): Update for change in signature
393 of diagnostic_set_info.
394 * c-errors.c (pedwarn_c99): Likewise.
395 (pedwarn_c90): Likewise.
396 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
397 for textinfo::set_location.
398
7a5e4956
CP
3992015-11-05 Cesar Philippidis <cesar@codesourcery.com>
400 Thomas Schwinge <thomas@codesourcery.com>
401 James Norris <jnorris@codesourcery.com>
402
403 * c-parser.c (c_parser_omp_clause_name): Add support for
404 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
405 (c_parser_omp_clause_default): Add is_oacc argument. Handle
406 default(none) in OpenACC.
407 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
408 arguments.
409 (c_parser_oacc_clause_tile): New function.
410 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
411 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
412 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
413 TILE}.
414 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
415 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
416 FIRSTPRIVATE}.
417 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
418 (c_parser_oacc_update): Update the error message for missing clauses.
419 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
420 and OMP_CLAUSE_INDEPENDENT.
421
bfcfbfa0
MP
4222015-11-05 Marek Polacek <polacek@redhat.com>
423
424 PR c/68090
425 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
426 deal with pre-evaluation on invalid types.
427
e01d41e5
JJ
4282015-11-05 Jakub Jelinek <jakub@redhat.com>
429 Ilya Verbin <ilya.verbin@intel.com>
430
431 * c-parser.c: Include context.h and gimple-expr.h.
432 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
433 monotonic together with nonmonotonic.
434 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
435 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
436 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
437 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
438 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
439 expressions on combined target teams before the target.
440 (c_parser_omp_declare_target): If decl has "omp declare target" or
441 "omp declare target link" attribute, and cgraph or varpool node already
442 exists, then set corresponding flags. Call c_finish_omp_clauses
443 in the parenthesized extended-list syntax case.
444 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
445 declare target.
446 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
447 on OMP_CLAUSE_REDUCTION array sections.
448 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
449 into the constant offset, or for variable low-bound using
450 POINTER_PLUS_EXPR. For structure element based array sections use
451 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
452 (c_finish_omp_clauses): Drop generic_field_head, structure
453 elements are now always mapped even as array section bases,
454 diagnose same var in data sharing and mapping clauses. Diagnose if
455 linear step on declare simd is neither a constant nor a uniform
456 parameter. Look through POINTER_PLUS_EXPR for array section
457 reductions. Diagnose the same var or function appearing multiple
458 times on the same directive. Fix up wording for the to clause if t
459 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
460 modifier on kinds other than dynamic or guided or nonmonotonic
461 modifier together with ordered clause.
462
4bf9e5a8
TS
4632015-11-03 Thomas Schwinge <thomas@codesourcery.com>
464 Chung-Lin Tang <cltang@codesourcery.com>
465
466 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
467
2adfab87
AM
4682015-10-29 Andrew MacLeod <amacleod@redhat.com>
469
470 * c-array-notation.c: Reorder #include's and remove duplicates.
471 * c-aux-info.c: Likewise.
472 * c-convert.c: Likewise.
473 * c-decl.c: Likewise.
474 * c-errors.c: Likewise.
475 * c-lang.c: Likewise.
476 * c-objc-common.c: Likewise.
477 * c-parser.c: Likewise.
478 * c-typeck.c: Likewise.
479
e922069e
JW
4802015-10-26 Jim Wilson <jim.wilson@linaro.org>
481
482 PR debug/66068
483 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
484 after calling build_qualified_type.
485
765dd391
CP
4862015-10-27 Cesar Philippidis <cesar@codesourcery.com>
487 Thomas Schwinge <thomas@codesourcery.com>
488 James Norris <jnorris@codesourcery.com>
489 Joseph Myers <joseph@codesourcery.com>
490 Julian Brown <julian@codesourcery.com>
491 Bernd Schmidt <bschmidt@redhat.com>
492
493 * c-parser.c (c_parser_oacc_shape_clause): New.
494 (c_parser_oacc_simple_clause): New.
495 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
496 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
497
88bae6f4
TS
4982015-10-27 Thomas Schwinge <thomas@codesourcery.com>
499 James Norris <jnorris@codesourcery.com>
500 Cesar Philippidis <cesar@codesourcery.com>
501
502 PR c/64765
503 PR c/64880
504 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
505 parameters, and handle these. Adjust all users.
506 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
507 into...
508 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
509 all users.
510 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
511 declare functions.
512 (c_finish_omp_construct): Declare function.
513 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
514 Merge functions into...
515 (c_finish_omp_construct): ... this new function.
516
a8fc2579
RB
5172015-10-22 Richard Biener <rguenther@suse.de>
518
519 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
520 before folding a MINUS_EXPR.
521
e9122ef6
MP
5222015-10-21 Marek Polacek <polacek@redhat.com>
523
524 PR c/68024
525 * c-decl.c (start_function): Warn about vararg functions without
526 a prototype.
527
9f47c7e5
IE
5282015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
529
530 * c-typeck.c (build_conditional_expr): Use boolean vector
531 type for vector comparison.
532 (build_vec_cmp): New.
533 (build_binary_op): Use build_vec_cmp for comparison.
534
fa60eeb9
MP
5352015-10-20 Marek Polacek <polacek@redhat.com>
536
537 * c-parser.c (is_cilkplus_vector_p): Don't define here.
538
2c7020eb
MP
5392015-10-20 Marek Polacek <polacek@redhat.com>
540
541 PR c/67964
542 * c-parser.c (c_parser_attributes): Break out of the loop if the
543 token after an attribute isn't a comma.
544
d9a6bd32
JJ
5452015-10-13 Jakub Jelinek <jakub@redhat.com>
546 Aldy Hernandez <aldyh@redhat.com>
547
548 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
549 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
550 (c_parser_omp_variable_list): Handle structure elements for
551 map, to and from clauses. Handle array sections in reduction
552 clause. Formatting fixes.
553 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
554 if clause modifiers.
555 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
556 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
557 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
558 c_parser_omp_clause_is_device_ptr): New functions.
559 (c_parser_omp_clause_ordered): Parse optional parameter.
560 (c_parser_omp_clause_reduction): Handle array reductions.
561 (c_parser_omp_clause_schedule): Parse optional simd modifier.
562 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
563 functions.
564 (c_parser_omp_clause_linear): Parse linear clause modifiers.
565 (c_parser_omp_clause_depend_sink): New function.
566 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
567 (c_parser_omp_clause_map): Parse release/delete map kinds and
568 optional always modifier.
569 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
570 and c_finish_omp_clauses callers.
571 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
572 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
573 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
574 (OMP_CRITICAL_CLAUSE_MASK): Define.
575 (c_parser_omp_critical): Parse critical clauses.
576 (c_parser_omp_for_loop): Handle doacross loops, adjust
577 c_finish_omp_for and c_finish_omp_clauses callers.
578 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
579 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
580 (OMP_FOR_CLAUSE_MASK): Add linear clause.
581 (c_parser_omp_for): Disallow ordered clause when combined with
582 distribute. Disallow linear clause when combined with distribute
583 and not combined with simd.
584 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
585 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
586 parse clauses and if depend clause is found, don't parse a body.
587 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
588 Allow target parallel without for after it.
589 (OMP_TASK_CLAUSE_MASK): Add priority clause.
590 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
591 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
592 invalid kinds.
593 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
594 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
595 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
596 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
597 functions.
598 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
599 defaultmap and is_device_ptr clauses.
600 (c_parser_omp_target): Parse target parallel and target simd. Set
601 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
602 and target exit data. Diagnose invalid map kinds.
603 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
604 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
605 construct.
606 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
607 &omp_priv.
608 (OMP_TASKLOOP_CLAUSE_MASK): Define.
609 (c_parser_omp_taskloop): New function.
610 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
611 handle PRAGMA_OMP_TASKLOOP.
612 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
613 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
614 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
615 Add IS_OMP argument, handle structure element bases, diagnose
616 bitfields, pass IS_OMP recursively, diagnose known zero length
617 array sections in depend clauses, handle array sections in reduction
618 clause, diagnose negative length even for pointers.
619 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
620 types, pass IS_OMP down to handle_omp_array_sections_1, handle
621 array sections in reduction clause, set
622 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
623 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
624 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
625 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
626
21ba0cea
MP
6272015-10-06 Marek Polacek <polacek@redhat.com>
628
629 * c-parser.c (c_parser_statement_after_labels): Use
630 protected_set_expr_location.
631 (c_parser_omp_clause_num_gangs): Likewise.
632 (c_parser_omp_clause_num_threads): Likewise.
633 (c_parser_omp_clause_num_workers): Likewise.
634 (c_parser_omp_clause_vector_length): Likewise.
635 (c_parser_omp_clause_num_teams): Likewise.
636 (c_parser_omp_clause_thread_limit): Likewise.
637 * c-typeck.c (build_c_cast): Likewise.
638 (c_cast_expr): Likewise.
639
624d31fe
RS
6402015-10-05 Richard Sandiford <richard.sandiford@arm.com>
641
642 * c-typeck.c (c_tree_equal): Use real_equal instead of
643 REAL_VALUES_EQUAL.
644
b8fd7909
JM
6452015-10-04 Jason Merrill <jason@redhat.com>
646
647 * c-parser.c (c_lex_one_token): Handle @synchronized.
648 * c-decl.c (match_builtin_function_types): A declaration of a built-in
649 can change whether the function is transaction_safe.
650
1c7485af
MP
6512015-10-02 Marek Polacek <polacek@redhat.com>
652
653 PR c/67730
654 * c-typeck.c (convert_for_assignment): Use the expansion point
655 location throughout.
656
3e3b8d63
MP
6572015-10-02 Marek Polacek <polacek@redhat.com>
658
659 PR c/64249
660 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
661 and pass it down to c_parser_if_statement.
662 (c_parser_else_body): Add CHAIN parameter and pass it down to
663 c_parser_statement_after_labels.
664 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
665 duplicated if-else-if conditions.
666
aabef2de
MP
6672015-10-01 Marek Polacek <polacek@redhat.com>
668
669 * c-typeck.c (convert_for_assignment): Improve commentary.
670
de8ddd5f
MP
6712015-09-30 Marek Polacek <polacek@redhat.com>
672
673 PR c/67730
674 * c-typeck.c (c_finish_return): Use the expansion point location for
675 certain "return with value" warnings.
676
c4914de6
MLI
6772015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
678
679 * c-parser.c (pragma_lex): Add loc argument.
680
0e36f5c7
MP
6812015-09-15 Marek Polacek <polacek@redhat.com>
682
683 PR c/67580
684 * c-decl.c (tag_exists_p): New function.
685 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
686 struct/union/enum keywords are missing.
687 * c-tree.h (tag_exists_p): Declare.
688
2f3bb934
MP
6892015-09-15 Marek Polacek <polacek@redhat.com>
690
691 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
692 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
693 Return NULL_TREE instead of 0.
694 (lookup_name): Return NULL_TREE instead of 0.
695 (lookup_name_in_scope): Likewise.
696 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
697 (parser_xref_tag): Use false instead of 0.
698 (start_struct): Use true instead of 1.
699 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
700
aa256c4a
MP
7012015-09-14 Marek Polacek <polacek@redhat.com>
702
703 * c-typeck.c (set_nonincremental_init_from_string): Use
704 HOST_WIDE_INT_M1U when shifting a negative value.
705
dbb68221
MW
7062015-09-09 Mark Wielaard <mjw@redhat.com>
707
708 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
709 parm against NULL.
710
a8a098ac
JJ
7112015-09-10 Jakub Jelinek <jakub@redhat.com>
712
713 PR c/67502
714 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
715 into OMP_FOR_PRE_BODY rather than before the loop.
716
f4b189d5
JJ
7172015-09-09 Jakub Jelinek <jakub@redhat.com>
718
0bb99c11
JJ
719 PR c/67501
720 * c-parser.c (c_parser_oacc_all_clauses,
721 c_parser_omp_all_clauses): Remove invalid clause from
722 list of clauses even if parser->error is set.
723
fce5e5e3
JJ
724 PR c/67500
725 * c-parser.c (c_parser_omp_clause_aligned,
726 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
727 test for errors.
728 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
729 error_mark_node.
730
f4b189d5
JJ
731 PR c/67495
732 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
733 instead of c_parser_unary_expression. If the result is !lvalue_p,
734 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
735
b2aaf235
MP
7362015-09-04 Marek Polacek <polacek@redhat.com>
737
738 PR sanitizer/67279
739 * c-typeck.c (build_binary_op): Don't instrument static initializers.
740
1807ffc1
MS
7412015-09-03 Martin Sebor <msebor@redhat.com>
742
743 PR c/66516
8b652e65
JJ
744 * c-typeck.c (convert_arguments, parser_build_unary_op,
745 build_conditional_expr, c_cast_expr, convert_for_assignment,
746 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
747 reject_gcc_builtin.
748 (c_decl_implicit): Define.
749
d04ff417
MP
7502015-09-02 Marek Polacek <polacek@redhat.com>
751
752 PR c/67432
753 * c-parser.c (c_parser_enum_specifier): Give a better error for
754 an empty enum.
755
a79683d5
TS
7562015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
757
758 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
759
191a6b94
MP
7602015-08-12 Marek Polacek <polacek@redhat.com>
761
762 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
763 LOC to it.
764
420a9d9b
MP
7652015-08-03 Marek Polacek <polacek@redhat.com>
766
767 PR c/67088
768 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
769 Use it.
770 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
771
992118a1
PP
7722015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
773
774 * c-parser.c (c_parser_if_body): Take token_indent_info
775 argument. Call warn_for_misleading_indentation even when the
776 body is a semicolon. Extract token_indent_infos corresponding
777 to the guard, body and next tokens. Adjust call to
778 warn_for_misleading_indentation accordingly.
779 (c_parser_else_body): Likewise.
780 (c_parser_if_statement): Likewise.
781 (c_parser_while_statement): Likewise.
782 (c_parser_for_statement): Likewise.
783
46308474
LFSM
7842015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
785 Manuel López-Ibáñez <manu@gcc.gnu.org>
786
787 * c-decl.c (get_parm_info): Remove static var. Update warning
788 message.
789
05b28fd6
MP
7902015-07-27 Marek Polacek <polacek@redhat.com>
791
792 PR c++/66555
793 PR c/54979
794 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
795
451b5e48
MP
7962015-07-20 Marek Polacek <polacek@redhat.com>
797
798 PR c++/55095
799 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
800 (build_binary_op): Warn about left shift overflows.
801
1916bcb5
AM
8022015-07-09 Andrew MacLeod <amacleod@redhat.com>
803
804 * c-array-notation.c: Adjust includes for flags.h changes.
805 * c-objc-common.c: Likewise.
806
c7131fb2
AM
8072015-07-07 Andrew MacLeod <amacleod@redhat.com>
808
809 * c-array-notation.c: Adjust includes.
810 * c-aux-info.c: Likewise.
811 * c-convert.c: Likewise.
812 * c-decl.c: Likewise.
813 * c-errors.c: Likewise.
814 * c-lang.c: Likewise.
815 * c-objc-common.c: Likewise.
816 * c-parser.c: Likewise.
817 * c-typeck.c: Likewise.
818
da2e71c9
MLI
8192015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
820
821 PR fortran/66605
822 * c-decl.c (finish_function): Call do_warn_unused_parameter.
823
b155cfd9
MP
8242015-06-29 Marek Polacek <polacek@redhat.com>
825
826 PR c/66322
827 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
828 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
829 about -Wswitch-bool here.
830 (do_case): Update c_add_case_label call.
831 (c_finish_case): Update c_do_switch_warnings call.
832
31521951
MP
8332015-06-27 Marek Polacek <polacek@redhat.com>
834
835 * c-typeck.c: Use VECTOR_TYPE_P throughout.
836
22d03525
MP
8372015-06-26 Marek Polacek <polacek@redhat.com>
838
839 * c-array-notation.c (fix_builtin_array_notation_fn): Use
840 INDIRECT_REF_P.
841 * c-typeck.c (array_to_pointer_conversion): Likewise.
842 (build_unary_op): Likewise.
843 (c_finish_return): Likewise.
844
f0889939
AM
8452015-06-25 Andrew MacLeod <amacleod@redhat.com>
846
847 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
848 * c-parser.c: Likewise.
849
8d67ee55
RS
8502015-06-25 Richard Sandiford <richard.sandiford@arm.com>
851
852 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
853 instead of pointer_hash.
854 (detect_field_duplicates): Likewise.
855
0ae9bd27
MP
8562015-06-25 Marek Polacek <polacek@redhat.com>
857
858 * c-array-notation.c: Use VAR_P throughout.
859 * c-decl.c: Likewise.
860 * c-objc-common.c: Likewise.
861 * c-parser.c: Likewise.
862 * c-typeck.c: Likewise.
863
62f9079a
MP
8642015-06-25 Marek Polacek <polacek@redhat.com>
865
866 * c-decl.c: Use is_global_var throughout.
867 * c-parser.c: Likewise.
868 * c-typeck.c: Likewise.
869
abb226c9
AM
8702015-06-17 Andrew MacLeod <amacleod@redhat.com>
871
872 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
873 * c-aux-info.c: Likewise.
874 * c-convert.c: Likewise.
875 * c-decl.c: Likewise.
876 * c-errors.c: Likewise.
877 * c-lang.c: Likewise.
878 * c-objc-common.c: Likewise.
879 * c-parser.c: Likewise.
880 * c-typeck.c: Likewise.
881
8cbababc
JH
8822015-06-11 Jan Hubicka <hubicka@ucw.cz>
883
884 PR middle-end/66325
885 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
886 variants.
887
a0349665
PMR
8882015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
889
890 * c-decl.c (pop_scope): Register the main translation unit
891 through the new debug hook.
892
13fdf2e2
AM
8932015-06-08 Andrew MacLeod <amacleod@redhat.com>
894
895 * c-array-notation.c : Adjust include files.
896 * c-aux-info.c : Likewise.
897 * c-convert.c : Likewise.
898 * c-decl.c : Likewise.
899 * c-errors.c : Likewise.
900 * c-lang.c : Likewise.
901 * c-lang.h : Likewise.
902 * c-objc-common.c : Likewise.
903 * c-parser.c : Likewise.
904 * c-typeck.c : Likewise.
905
d7438551
AH
9062015-06-05 Aldy Hernandez <aldyh@redhat.com>
907
908 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
909 immediately clobber it.
910 (c_write_global_declarations_1): Remove call to
911 check_global_declaration_1.
912 (c_write_global_declarations_2): Remove.
913 (c_write_final_cleanups): Rename from c_write_global_declarations.
914 Remove call to finalize_compilation_unit.
915 Remove calls to debugging hooks.
916 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
917 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
918 * c-tree.h: Remove c_write_global_declarations.
919
ecb9f223
AM
9202015-06-04 Andrew MacLeod <amacleod@redhat.com>
921
922 * c-array-notation.c: Adjust includes for restructured coretypes.h.
923 * c-aux-info.c: Likewise.
924 * c-convert.c: Likewise.
925 * c-decl.c: Likewise.
926 * c-errors.c: Likewise.
927 * c-lang.c: Likewise.
928 * c-objc-common.c: Likewise.
929 * c-parser.c: Likewise.
930 * c-typeck.c: Likewise.
931
9482b620
MP
9322015-06-04 Marek Polacek <polacek@redhat.com>
933
934 PR c/66341
935 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
936 it is a lvalue.
937
bc51ace3
PK
9382015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
939
940 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
941 Warn for empty struct.
942 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
943
ea5b45b6
AT
9442015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
945
946 * c-decl.c (start_function): Call plugin before parsing.
947 (finish_function): Call plugin after parsing.
948
c2d47482
PK
9492015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
950
951 PR c/49551
952 * c-decl.c (merge_decls): Merge DECL_COMMON.
953
a95492ab
JW
9542015-05-22 Jim Wilson <jim.wilson@linaro.org>
955
956 * Make-lang.in (check_gcc_pallelize): Define.
957
fd5c817a
MP
9582015-05-22 Marek Polacek <polacek@redhat.com>
959
960 PR c/47043
961 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
962 attributes.
963
c7b70a3c
MP
9642015-05-21 Marek Polacek <polacek@redhat.com>
965
966 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
967 DECL_BUILT_IN.
968
21b634ae
MP
9692015-05-20 Marek Polacek <polacek@redhat.com>
970
971 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
972 * c-typeck.c: Likewise.
973
296a8c2f
MP
9742015-05-19 Marek Polacek <polacek@redhat.com>
975
976 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
977
41b37d5e
JJ
9782015-05-19 Jakub Jelinek <jakub@redhat.com>
979
980 PR middle-end/66199
981 * c-parser.c (c_parser_omp_for_loop): Don't add
982 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
983 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
984 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
985 constructs.
986
fab27f52
MM
9872015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
988
989 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 990 swaps.
fab27f52 991
40de31cf
MLI
9922015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
993
994 PR fortran/44054
995 * c-objc-common.c (c_tree_printer): Replace locus pointer with
996 accessor function.
997
3aa3c9fc
MP
9982015-05-14 Marek Polacek <polacek@redhat.com>
999
1000 PR c/66066
1001 PR c/66127
1002 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
1003 rather than with 0.
1004
c3388e62
DM
10052015-05-12 David Malcolm <dmalcolm@redhat.com>
1006
1007 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
1008 to add a call to warn_for_misleading_indentation.
1009 (c_parser_else_body): Likewise, adding param "else_loc".
1010 (c_parser_if_statement): Check for misleading indentation.
1011 (c_parser_while_statement): Likewise.
1012 (c_parser_for_statement): Likewise.
1013
755e528f
MP
10142015-05-08 Marek Polacek <polacek@redhat.com>
1015
1016 PR c/64918
1017 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
1018 (output_init_element): Likewise.
1019
0173bd2a
MP
10202015-05-07 Marek Polacek <polacek@redhat.com>
1021
1022 PR c/65179
1023 * c-typeck.c (build_binary_op): Warn when left shifting a negative
1024 value.
1025
9babc352
MP
10262015-04-30 Marek Polacek <polacek@redhat.com>
1027
1028 * c-typeck.c (set_init_label): Call error_at instead of error and
1029 pass LOC to it.
1030
ac9f18db
MP
1031 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
1032 the type of a decl.
1033
ec3fba51
MP
1034 * c-typeck.c (c_build_va_arg): Clarify the error message.
1035
b811915d
TS
10362015-04-29 Thomas Schwinge <thomas@codesourcery.com>
1037
1038 * c-parser.c (c_parser_oacc_enter_exit_data): Use
1039 OMP_STANDALONE_CLAUSES.
1040
f3075008
MP
10412015-04-28 Marek Polacek <polacek@redhat.com>
1042
1043 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
1044
4e81b788
MP
10452015-04-28 Marek Polacek <polacek@redhat.com>
1046
1047 PR c/65901
1048 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
1049
6c1db78e
MP
10502015-04-25 Marek Polacek <polacek@redhat.com>
1051
1052 PR c/52085
1053 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
1054 attribute.
1055
5c4abbb8
MP
10562015-04-23 Marek Polacek <polacek@redhat.com>
1057
1058 PR c/65345
1059 * c-decl.c (set_labels_context_r): New function.
1060 (store_parm_decls): Call it via walk_tree_without_duplicates.
1061 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
1062 instead of create_tmp_var. Build TARGET_EXPR instead of
1063 COMPOUND_EXPR.
1064 (build_atomic_assign): Use create_tmp_var_raw instead of
1065 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
1066
06aca1d5
IV
10672015-04-20 Ilya Verbin <ilya.verbin@intel.com>
1068
1069 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
1070 (c_parser_omp_target_update): Add missed %> to error_at ().
1071
8fba1830
BRF
10722015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1073
1074 PR target/55143
1075 * c-decl.c (c_default_pointer_mode): Remove definition.
1076 * c-tree.h (c_default_pointer_mode): Remove declaration.
1077
62021f64
TB
10782015-03-27 Tobias Burnus <burnus@net-b.de>
1079
1080 PR c/65586
1081 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
1082 error out.
1083 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
1084 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
1085 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
1086
9b65e171
JJ
10872015-03-19 Jakub Jelinek <jakub@redhat.com>
1088
1089 * c-decl.c (c_decl_attributes): Also add "omp declare target"
1090 attribute for DECL_EXTERNAL VAR_DECLs.
1091
17958621
JJ
10922015-03-11 Jakub Jelinek <jakub@redhat.com>
1093
1094 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
1095 argument.
1096
7ccb1a11
JJ
10972015-03-10 Jakub Jelinek <jakub@redhat.com>
1098
1099 PR c/65120
1100 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
1101 before preparing arguments to warn_logical_not_parentheses.
1102
01177669
JJ
11032015-03-09 Jakub Jelinek <jakub@redhat.com>
1104
1105 PR c/65120
1106 * c-typeck.c (parser_build_binary_op): Don't warn for
1107 !!x == y or !b == y where b is _Bool.
1108
802ac282
MP
11092015-03-09 Marek Polacek <polacek@redhat.com>
1110
1111 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
1112 * c-decl.c (grokdeclarator): Likewise.
1113 * c-typeck.c (build_binary_op): Likewise.
1114
e5165b60
MP
11152015-02-27 Marek Polacek <polacek@redhat.com>
1116
1117 PR c/65228
1118 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
1119
065d214c
MP
11202015-02-14 Marek Polacek <polacek@redhat.com>
1121
1122 PR c/64768
1123 * c-decl.c (grokdeclarator): Set the range of a flexible array member
1124 declared through a typedef name.
1125
e5d9235b
MP
11262015-02-13 Marek Polacek <polacek@redhat.com>
1127
1128 PR c/65050
1129 * c-decl.c (grokdeclarator): Print also the type when giving
1130 the error message about array's incomplete element type.
1131
fa01ffcc
JJ
11322015-02-11 Jakub Jelinek <jakub@redhat.com>
1133
1134 PR c/64824
1135 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
1136 check in the POP macro.
1137
c3e38a03
MP
11382015-02-09 Marek Polacek <polacek@redhat.com>
1139
1140 PR c/64856
1141 * c-typeck.c (process_init_element): Don't always wrap
1142 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
1143 initializing a range of elements.
1144
4886ec8e
JJ
11452015-02-04 Jakub Jelinek <jakub@redhat.com>
1146
1147 PR c/64824
1148 PR c/64868
1149 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
1150
c3e38a03 11512015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
1152
1153 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
1154 processing enum declaration.
1155
7b33f0c8
MP
11562015-01-29 Marek Polacek <polacek@redhat.com>
1157
1158 PR c/64709
1159 * c-typeck.c (pop_init_level): If constructor_elements has
1160 exactly one element with integer_zerop value, set constructor_zeroinit
1161 to 1. Remove braces around warning_init call.
1162
dea63e49
JJ
11632015-01-27 Jakub Jelinek <jakub@redhat.com>
1164
1165 PR c/64766
1166 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
1167 of FUNCTION_DECLs with error_mark_node.
1168
d38f7dce
JJ
11692015-01-26 Jakub Jelinek <jakub@redhat.com>
1170
1171 PR c/64778
1172 * c-typeck.c (convert_arguments): Return -1 if there are
1173 error_args, even if we've diagnosed too many arguments.
1174
cbf5d0e7
RB
11752015-01-21 Richard Biener <rguenther@suse.de>
1176
1177 PR middle-end/64313
1178 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
1179 for builtins the user declared correctly.
1180
41dbbb37
TS
11812015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1182 Bernd Schmidt <bernds@codesourcery.com>
1183 Cesar Philippidis <cesar@codesourcery.com>
1184 James Norris <jnorris@codesourcery.com>
1185 Jakub Jelinek <jakub@redhat.com>
1186 Ilmir Usmanov <i.usmanov@samsung.com>
1187
1188 * c-parser.c: Include "gomp-constants.h".
1189 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1190 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1191 Use OMP_CLAUSE_SET_MAP_KIND.
1192 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
1193 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
1194 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
1195 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
1196 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
1197 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
1198 "copyout", "create", "delete", "deviceptr", "gang", "host",
1199 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
1200 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1201 "present_or_create", "pcreate", "seq", "self", "vector",
1202 "vector_length", "wait", "worker".
1203 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1204 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
1205 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1206 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1207 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
1208 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
1209 (c_parser_oacc_data_clause_deviceptr)
1210 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
1211 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
1212 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
1213 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
1214 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
1215 (c_parser_oacc_parallel, c_parser_oacc_update)
1216 (c_parser_oacc_wait): New functions.
1217 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
1218 (c_finish_oacc_data): New prototypes.
1219 * c-typeck.c: Include "gomp-constants.h".
1220 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
1221 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
1222 OMP_CLAUSE_SET_MAP_KIND.
1223 (c_finish_oacc_parallel, c_finish_oacc_kernels)
1224 (c_finish_oacc_data): New functions.
1225 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
1226 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
1227 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
1228 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
1229 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
1230 GOMP_MAP_FORCE_DEVICEPTR.
1231
adfac8df
JJ
12322015-01-09 Michael Collison <michael.collison@linaro.org>
1233
1234 * c-array-notation.c: Include hash-set.h, machmode.h,
1235 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1236 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
1237 * c-aux-info.c: Ditto.
1238 * c-convert.c: Ditto.
1239 * c-decl.c: Ditto.
1240 * c-errors.c: Ditto.
1241 * c-lang.c: Dittoxs.
1242 * c-objc-common.c: Ditto.
1243 * c-parser.c: Ditto.
1244 * c-typeck.c: Include hash-set.h, machmode.h,
1245 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1246 fold-const.h, wide-int.h, inchash.h, real.h and
1247 fixed-value.h due to flattening of tree.h.
1248
2cc901dc
MP
12492015-01-07 Marek Polacek <polacek@redhat.com>
1250
1251 PR c/64417
1252 * c-typeck.c (process_init_element): Disallow initialization of
1253 a flexible array member with a string constant if the structure
1254 is in an array.
1255
5624e564
JJ
12562015-01-05 Jakub Jelinek <jakub@redhat.com>
1257
e5341100
JJ
1258 PR sanitizer/64344
1259 * c-typeck.c (convert_for_assignment, c_finish_return): For
1260 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
1261 types also set in_late_binary_op around convert call.
1262 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
1263 to integral type casts, if not in_late_binary_op, pass c_fully_fold
1264 result on expr as last argument to ubsan_instrument_float_cast,
1265 if in_late_binary_op, don't use c_save_expr but save_expr.
1266
5624e564
JJ
1267 Update copyright years.
1268
5bd012f8
MP
12692015-01-05 Marek Polacek <polacek@redhat.com>
1270
1271 PR c/64423
1272 * c-typeck.c (build_array_ref): Pass loc down to
1273 warn_array_subscript_with_type_char.
1274
768952be
MU
12752014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
1276
1277 * c-typeck.c: New behavious for pointers to arrays with qualifiers
1278 (common-pointer-type): For pointers to arrays take qualifiers from
1279 element type.
1280 (build_conditional_expr): Add warnings for lost qualifiers.
1281 (comp-target-types): Allow pointers to arrays with different qualifiers.
1282 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
1283 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
1284 to PEDWARN_FOR_QUALIFIERS.
1285
8f94a8c4
JJ
12862014-12-17 Jakub Jelinek <jakub@redhat.com>
1287
1288 PR sanitizer/64289
1289 * c-convert.c: Include ubsan.h.
1290 (convert): For real -> integral casts and
1291 -fsanitize=float-cast-overflow don't call convert_to_integer, but
1292 instead instrument the float cast directly.
1293
b731b390
JJ
12942014-11-29 Jakub Jelinek <jakub@redhat.com>
1295
1296 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
1297 c_finish_stmt_expr): Remove NULL last argument from
1298 create_tmp_var_raw and create_tmp_var calls.
1299 * c-array-notation.c (fix_builtin_array_notation_fn,
1300 build_array_notation_expr, fix_conditional_array_notations_1,
1301 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
1302
541e35a6
MP
13032014-11-28 Marek Polacek <polacek@redhat.com>
1304
1305 PR c/63862
1306 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
1307 convert the right operand to integer type.
1308
b286be94
MP
13092014-11-25 Marek Polacek <polacek@redhat.com>
1310
1311 PR c/63877
1312 * c-decl.c (start_function): Disable -Wmissing-declarations warning
1313 for inline functions.
1314
aa7da51a
JJ
13152014-11-21 Jakub Jelinek <jakub@redhat.com>
1316
1317 PR target/63764
1318 * c-typeck.c (build_array_ref): Adjust
1319 convert_vector_to_pointer_for_subscript caller. If it returns true,
1320 call non_lvalue_loc on the result.
1321
d876207f
RB
13222014-11-11 Richard Biener <rguenther@suse.de>
1323
1324 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
1325 to true.
1326
e5e44252
AK
13272014-11-10 Andi Kleen <ak@linux.intel.com>
1328
1329 PR c/60804
1330 * c-parser.c (c_parser_statement_after_labels): Call
1331 check_no_cilk.
1332 (c_parser_if_statement): Dito.
1333 (c_parser_switch_statement): Dito.
1334 (c_parser_while_statement): Dito.
1335 (c_parser_do_statement): Dito.
1336 (c_parser_for_statement): Dito.
1337 * c-typeck.c (c_finish_loop): Dito.
1338
13c21655
PC
13392014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
1340
1341 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
1342 OPT_Wshift_count_overflow in the warnings.
1343
2d51fcef
MP
13442014-10-30 Marek Polacek <polacek@redhat.com>
1345
1346 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
1347 print the stripped version as well, if they're not the same.
1348
ef4bddc2
RS
13492014-10-29 Richard Sandiford <richard.sandiford@arm.com>
1350
1351 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
1352 machine_mode.
1353
c582198b
AM
13542014-10-28 Andrew MacLeod <amacleod@redhat.com>
1355
1356 * c-decl.c: Adjust include files.
1357 * c-parser.c: Ditto.
1358
ddc8de03
PM
13592014-10-27 Phil Muldoon <pmuldoon@redhat.com>
1360 Tom Tromey <tromey@redhat.com>
1361
1362 * c-tree.h (enum c_oracle_request): New.
1363 (c_binding_oracle_function): New typedef.
1364 (c_binding_oracle, c_pushtag, c_bind): Declare.
1365 * c-decl.c (c_binding_oracle): New global.
1366 (I_SYMBOL_CHECKED): New macro.
1367 (i_symbol_binding): New function.
1368 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
1369 (I_TAG_CHECKED): New macro.
1370 (i_tag_binding): New function.
1371 (I_TAG_BINDING, I_TAG_DECL): Redefine.
1372 (I_LABEL_CHECKED): New macro.
1373 (i_label_binding): New function.
1374 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
1375 (c_print_identifier): Save and restore c_binding_oracle.
1376 (c_pushtag, c_bind): New functions.
1377
60393bbc
AM
13782014-10-27 Andrew MacLeod <amacleod@redhat.com>
1379
1380 * c-typeck.c: Adjust include files.
1381
d723bb7c
MLI
13822014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
1383
1384 PR c++/53061
1385 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
1386 initialization here...
1387 (c_initialize_diagnostics): ... but here. Set defaults after
1388 building pretty-printer.
1389
1bc5a451
MP
13902014-10-23 Marek Polacek <polacek@redhat.com>
1391
1392 PR c/63626
1393 * c-decl.c (pop_scope): Don't print warning in external_scope.
1394
4435bb92
MP
13952014-10-19 Marek Polacek <polacek@redhat.com>
1396
1397 PR c/63567
1398 * c-typeck.c (output_init_element): Allow initializing objects with
1399 static storage duration with compound literals even in C99 and add
1400 pedwarn for it.
1401
7278465e
MP
14022014-10-17 Marek Polacek <polacek@redhat.com>
1403
1404 PR c/63567
1405 * c-typeck.c (digest_init): Allow initializing objects with static
1406 storage duration with compound literals even in C99 and add pedwarn
1407 for it.
1408
d9b7be2e
MP
14092014-10-17 Marek Polacek <polacek@redhat.com>
1410
1411 PR c/63543
1412 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
1413 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
1414 error multiple times. Print the type.
1415
f406ae1f
MP
14162014-10-17 Marek Polacek <polacek@redhat.com>
1417
1418 PR c/63549
1419 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
1420 type.
1421
92574c7c
MP
14222014-10-17 Marek Polacek <polacek@redhat.com>
1423
1424 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
1425 (start_function): Use OPT_Wimplicit_int instead of 0.
1426 (store_parm_decls_oldstyle): Likewise.
1427
1bc4a978
MT
14282014-10-17 Alan Modra <amodra@gmail.com>
1429
1430 PR middle-end/61848
1431 * c-decl.c (merge_decls): Don't merge section name or tls model
1432 to newdecl symtab node, instead merge to olddecl. Override
1433 existing olddecl section name. Set tls_model for all thread-local
1434 vars, not just OMP thread-private ones. Remove incorrect comment.
1435
83685514
AM
14362014-10-16 Andrew MacLeod <amacleod@redhat.com>
1437
1438 * c-decl.c: Adjust include files.
1439
78a7c317
DD
14402014-10-14 DJ Delorie <dj@redhat.com>
1441
1442 * c-parser.c (c_parse_init): Add RID entries for each __intN.
1443 (c_token_starts_typename): Check all __intN, not just __int128.
1444 (c_token_starts_declspecs): Likewise.
1445 (c_parser_declspecs): Likewise.
1446 (c_parser_attribute_any_word): Likewise.
1447 (c_parser_objc_selector): Likewise.
1448 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
1449 (struct c_declspecs): Add int_n_idx field to record *which* __intN
1450 is specified.
1451 * c-decl.c (declspecs_add_type): Check for all __intN, not just
1452 __int128.
1453 (finish_declspecs): Likewise.
1454
74d98c1e
AB
14552014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
1456
1457 * c-parser.c (c_parser_all_labels): New function to replace
1458 the duplicate code.
1459 (c_parser_statement): Call the new function.
1460
84937de2
MP
14612014-10-09 Marek Polacek <polacek@redhat.com>
1462
1463 PR c/63480
1464 * c-typeck.c (pop_init_level): Don't warn about initializing
1465 with { }.
1466
0382aaa0
MP
14672014-10-07 Marek Polacek <polacek@redhat.com>
1468
1469 PR c/59717
1470 * c-decl.c (header_for_builtin_fn): New function.
1471 (implicitly_declare): Suggest which header to include.
1472
7a0ca710
MP
14732014-10-07 Marek Polacek <polacek@redhat.com>
1474
1475 * c-convert.c (convert): Use error_operand_p.
1476 * c-typeck.c (require_complete_type): Likewise.
1477 (really_atomic_lvalue): Likewise.
1478 (digest_init): Likewise.
1479 (handle_omp_array_sections_1): Likewise.
1480
6bc8a126
MP
14812014-10-03 Marek Polacek <polacek@redhat.com>
1482
1483 PR c/63453
1484 * c-decl.c (pop_scope): Don't warn about "inline function declared
1485 but never defined" for functions marked with gnu_inline attribute.
1486
d90c0a59
JJ
14872014-09-25 Jakub Jelinek <jakub@redhat.com>
1488
1489 PR c++/63249
1490 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
1491 on low_bound and length.
1492
083e891e
MP
14932014-09-24 Marek Polacek <polacek@redhat.com>
1494
1495 PR c/61405
1496 PR c/53874
1497 * c-parser.c: Don't define CPP_KEYWORD.
1498 (c_parser_switch_statement): Pass original type to c_finish_case.
1499 * c-tree.h (c_finish_case): Update declaration.
1500 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
1501 conditionally to c_do_switch_warnings.
1502
8d95fe25
MP
15032014-09-03 Marek Polacek <polacek@redhat.com>
1504
1505 PR c/62024
1506 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
1507 conversions.
1508
9a771876
JJ
15092014-09-02 Jakub Jelinek <jakub@redhat.com>
1510 Balaji V. Iyer <balaji.v.iyer@intel.com>
1511 Igor Zamyatin <igor.zamyatin@intel.com>
1512
1513 * c-parser.c (c_parser_cilk_for): New function.
1514 (c_parser_cilk_grainsize): Likewise.
1515 (c_get_temp_regvar): Likewise.
1516 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
1517 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
1518 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
1519 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
1520 case.
1521
b7679d96
CG
15222014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
1523
1524 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
1525 with using HOST_WIDE_INT without truncation to 'int'
1526
59ea0364
MP
15272014-08-22 Marek Polacek <polacek@redhat.com>
1528
1529 PR c++/62199
1530 * c-typeck.c (parser_build_binary_op): Adjust call to
1531 warn_logical_not_parentheses.
1532
671a475e
IZ
15332014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
1534
1535 PR other/62008
1536 * c-parser.c (c_parser_array_notation): Check for correct
1537 type of an array added.
1538
04159acf
MP
15392014-08-19 Marek Polacek <polacek@redhat.com>
1540
1541 PR c++/62153
1542 * c-typeck.c (build_binary_op): If either operand of a comparison
1543 is a boolean expression, call maybe_warn_bool_compare.
1544
c77935ee
PP
15452014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
1546
1547 PR c/45584
1548 * c-typeck.c (build_c_cast): Do a conversion even when the
1549 TYPE_MAIN_VARIANTs are the same.
1550
35aff4fb
MP
15512014-08-19 Marek Polacek <polacek@redhat.com>
1552
1553 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
1554 pedwarn_c99 instead of pedwarn.
1555 (grokfield): Likewise.
1556 (warn_defaults_to): New function.
1557 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
1558 Unconditionally call pedwarn_c99 instead of pedwarn.
1559 (start_function): Call warn_defaults_to instead of pedwarn_c99.
1560 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
1561 check flag_isoc11 before.
1562 * c-errors.c (pedwarn_c99): Change the return type to bool.
1563 Handle -Wc99-c11-compat.
1564 * c-parser.c (disable_extension_diagnostics): Handle
1565 warn_c99_c11_compat.
1566 (restore_extension_diagnostics): Likewise.
1567 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
1568 instead of pedwarn, don't check flag_isoc11 before.
1569 (c_parser_declspecs): Likewise.
1570 (c_parser_alignas_specifier): Likewise.
1571 (c_parser_alignof_expression): Likewise.
1572 (c_parser_generic_selection): Likewise.
1573 * c-tree.h (pedwarn_c99): Update declaration.
1574 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
1575 of pedwarn_c99.
1576
177cce46
MP
15772014-08-19 Marek Polacek <polacek@redhat.com>
1578
1579 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
1580 to pedwarn_c90.
1581 * c-errors.c: Include "opts.h".
1582 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
1583 * c-parser.c (disable_extension_diagnostics): Handle negative value
1584 of warn_c90_c99_compat, too.
1585 (restore_extension_diagnostics): Likewise.
1586 (c_parser_compound_statement_nostart): Pass
1587 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
1588
6dc99c33
MP
15892014-08-12 Marek Polacek <polacek@redhat.com>
1590
1591 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
1592 Add pedwarn.
1593 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
1594 Likewise.
1595 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
1596
f3bede71
MP
15972014-08-10 Marek Polacek <polacek@redhat.com>
1598
1599 PR c/51849
1600 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
1601 Call pedwarn_c90 instead of pedwarn.
1602 (check_bitfield_type_and_width): Likewise.
1603 (declspecs_add_qual): Likewise.
1604 (declspecs_add_type): Likewise.
1605 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
1606 Adjust to only call pedwarn_c90.
1607 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
1608 pedwarn_c90 instead of pedwarn.
1609 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
1610 * c-parser.c (disable_extension_diagnostics): Handle
1611 warn_c90_c99_compat.
1612 (restore_extension_diagnostics): Likewise.
1613 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
1614 pedwarn_c90 instead of pedwarn.
1615 (c_parser_initelt): Likewise.
1616 (c_parser_postfix_expression): Likewise.
1617 (c_parser_postfix_expression_after_paren_type): Likewise.
1618 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
1619 * c-tree.h: Fix formatting.
1620 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
1621 pedwarn_c90 instead of pedwarn.
1622
9f25a338
TS
16232014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1624
1625 * c-typeck.c: Remove include of pointer-set.h.
1626
044331a8
MP
16272014-08-07 Marek Polacek <polacek@redhat.com>
1628
1629 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
1630
b787e7a2
TS
16312014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1632
1633 * c-typeck.c: Use hash_map instead of pointer_map.
1634
6e2830c3
TS
16352014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1636
1637 * c-decl.c: Use hash_set instead of pointer_set.
1638
a7ee52fb
IZ
16392014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1640
1641 PR middle-end/61455
1642 * c-array-notation.c (expand_array_notations): Handling
1643 of DECL_EXPR added.
1644
b4dfdc11
MG
16452014-07-31 Marc Glisse <marc.glisse@inria.fr>
1646
1647 PR c++/60517
1648 * c-typeck.c (c_finish_return): Return 0 instead of the address of
1649 a local variable.
1650
976d5a22
TT
16512014-07-30 Tom Tromey <tromey@redhat.com>
1652
1653 * c-typeck.c (struct constructor_stack) <designator_depth>: New
1654 field.
1655 (really_start_incremental_init, push_init_level): Initialize
1656 designator_depth.
1657 (pop_init_level): Set global designator_depth.
1658 (process_init_element): Check for designated_init attribute.
1659
30281de2
MP
16602014-07-20 Marek Polacek <polacek@redhat.com>
1661
1662 PR c/61852
1663 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
1664 (implicitly_declare): Pass location to implicit_decl_warning.
1665
b108f48f
JJ
16662014-07-14 Jakub Jelinek <jakub@redhat.com>
1667
1668 PR middle-end/61294
1669 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
1670 If non-NULL, call c_parser_check_literal_zero.
1671 (c_parser_check_literal_zero): New function.
1672 (c_parser_postfix_expression_after_primary): Adjust
1673 c_parser_expr_list caller, handle -Wmemset-transposed-args.
1674
773ec47f
MP
16752014-07-06 Marek Polacek <polacek@redhat.com>
1676
1677 PR c/6940
1678 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
1679 * c-tree.h (C_ARRAY_PARAMETER): Define.
1680 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
1681 function parameter.
1682
22e1cf1c
JH
16832014-07-02 Jan Hubicka <hubicka@ucw.cz>
1684 Chen Gang <gang.chen.5i5j@gmail.com>
1685
1686 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
1687 releasing symbol.
1688
52ec0ea3
MP
16892014-07-01 Marek Polacek <polacek@redhat.com>
1690
1691 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
1692 instead of 0 to WARN_FOR_ASSIGNMENT.
1693
d5c3d343
MP
16942014-07-01 Marek Polacek <polacek@redhat.com>
1695
1696 PR c/58286
1697 * c-typeck.c (convert_for_assignment): Pass
1698 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
1699
6a7253a4
MP
17002014-06-30 Marek Polacek <polacek@redhat.com>
1701
1702 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
1703 has no_sanitize_undefined attribute.
1704
5e88a8f4
IZ
17052014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
1706
1707 PR middle-end/57541
1708 * c-array-notation.c (fix_builtin_array_notation_fn):
1709 Check for 0 arguments in builtin call. Check that bultin argument is
1710 correct.
1711 * c-parser.c (c_parser_array_notation): Check for incorrect initial
1712 index.
1713
9698b078
SH
17142014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
1715
1716 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
1717 qualifiers in __auto_type for atomic types.
1718 (c_parser_typeof_specifier): Discard all type qualifiers in
1719 __typeof__ for atomic types.
1720
6e07c515
MP
17212014-06-25 Marek Polacek <polacek@redhat.com>
1722
1723 PR c/61162
1724 * c-parser.c (c_parser_statement_after_labels): Pass the location of
1725 the return expression to c_finish_return.
1726
da6f124d
JJ
17272014-06-25 Jakub Jelinek <jakub@redhat.com>
1728
1729 * c-typeck.c (c_finish_omp_clauses): Make sure
1730 OMP_CLAUSE_LINEAR_STEP has correct type.
1731
c203e8a7
TS
17322014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1733
1734 * c-decl.c: Adjust.
1735
56ad0e38
JJ
17362014-06-24 Jakub Jelinek <jakub@redhat.com>
1737
1738 * c-parser.c (c_parser_omp_for_loop): For
1739 #pragma omp parallel for simd move lastprivate clause from parallel
1740 to for rather than simd.
1741
47c2554f
MP
17422014-06-23 Marek Polacek <polacek@redhat.com>
1743
1744 * c-typeck.c (parser_build_binary_op): Don't call
1745 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
1746
56363ffd
JH
17472014-06-15 Jan Hubicka <hubicka@ucw.cz>
1748
1749 * c-parser.c (c_parser_omp_threadprivate): Likewise.
1750 * c-decl.c (merge_decls): Likewise.
1751
d7ff7ae5
MP
17522014-06-09 Marek Polacek <polacek@redhat.com>
1753
1754 PR c/36446
1755 * c-typeck.c (error_init): Call inform instead of error_at.
1756 (pedwarn_init): Call inform instead of pedwarn.
1757 (warning_init): Call inform instead of warning_at.
1758
24d047a3
JH
17592014-06-07 Jan Hubicka <hubicka@ucw.cz>
1760
1761 * c-decl.c (merge_decls): Use set_decl_section_name.
1762 (duplicate_decls): Remove node if it exists.
1763
9bac5cbb
G
17642014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
1765
1766 PR c/53119
1767 * c-typeck.c (push_init_level, process_init_element,
1768 pop_init_level): Correct check for zero initialization, move
1769 missing brace warning to respect zero initialization.
1770
8ffcdea8
MP
17712014-06-05 Marek Polacek <polacek@redhat.com>
1772
1773 PR c/56724
1774 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
1775
742938c9
MP
17762014-06-05 Marek Polacek <polacek@redhat.com>
1777
1778 PR c/49706
1779 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
1780 on the left hand side operand of a comparison.
1781
6447c55d
MP
17822014-06-05 Marek Polacek <polacek@redhat.com>
1783
1784 PR c/48062
1785 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
1786 Print note only if the warning was printed.
1787
9dc7743c
IZ
17882014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
1789
1790 PR c/58942
1791 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
1792 with a pointer.
1793
fedfecef
MP
17942014-06-03 Marek Polacek <polacek@redhat.com>
1795
1796 PR c/60439
1797 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
1798 c_start_case.
1799 * c-tree.h (c_start_case): Update.
1800 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
1801 switch condition has boolean value.
1802
9b2b7279
AM
18032014-06-02 Andrew MacLeod <amacleod@redhat.com>
1804
1805 * c-decl.c: Include builtins.h.
1806 * c-parser.c: Likewise.
1807
5c1bc275
MP
18082014-05-27 Marek Polacek <polacek@redhat.com>
1809
1810 PR c/56724
1811 * c-typeck.c (convert_arguments): Get location of a parameter. Change
1812 error and warning calls to error_at and warning_at. Pass location of
1813 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
1814 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
1815 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
1816
97563bc8
IZ
18172014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
1818
1819 PR c/61191
1820 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
1821 function parameters.
1822
aede2c10
JH
18232014-05-23 Jan Hubicka <hubicka@ucw.cz>
1824
1825 * c-decl.c (merge_decls): Preserve symtab node pointers.
1826 (duplicate_decls): Free new decl.
1827
edbba2ce
TS
18282014-05-23 Thomas Schwinge <thomas@codesourcery.com>
1829
f3316c6d
TS
1830 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
1831 initialization.
1832
edbba2ce
TS
1833 * c-parser.c (c_parser_omp_target): Return bool values.
1834
68c81f24
TS
18352014-05-22 Thomas Schwinge <thomas@codesourcery.com>
1836
1837 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
1838 num_teams_loc variable to num_thread_limit_loc.
1839
632f2871
RS
18402014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
1841
1842 * c-array-notation.c (expand_array_notations): Use void_node
1843 instead of void_zero_node.
1844
766090c2
TS
18452014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1846
1847 * c-decl.c (finish_struct): Adjust.
1848 (finish_enum): Likewise.
1849 (bind): Adjust.
1850 (record_inline_static): Likewise.
1851 (push_scope): Likewise.
1852 (make_label): Likewise.
1853 (lookup_label_for_goto): Likewise.
1854 (finish_struct): Likewise.
1855 (finish_enum): Likewise.
1856 (store_parm_decls): Likewise.
1857 (c_push_function_context): Likewise.
1858 * c-lang.h: Remove usage of variable_size gty attribute.
1859 * c-parser.c (c_parse_init): Adjust.
1860 (c_parse_file): Likewise.
1861
2b107f6b
MP
18622014-05-13 Marek Polacek <polacek@redhat.com>
1863
1864 PR c/61162
1865 * c-typeck.c (convert_for_assignment): Pass location to
1866 WARN_FOR_ASSIGNMENT instead of input_location.
1867
d033409e
MP
18682014-05-10 Marek Polacek <polacek@redhat.com>
1869
1870 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
1871 maybe_warn_string_init.
1872 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
1873 maybe_warn_string_init.
1874 * c-tree.h (maybe_warn_string_init): Update declaration.
1875 * c-typeck.c (maybe_warn_string_init): Add location parameter.
1876 Call pedwarn_init with loc instead of with input_location.
1877 (digest_init): Pass init_loc to maybe_warn_string_init.
1878 (pop_init_level): Call pedwarn_init with loc instead of with
1879 input_location.
1880 (set_init_index): Likewise.
1881 (process_init_element): Likewise.
1882
ea58ef42
MP
18832014-05-09 Marek Polacek <polacek@redhat.com>
1884
1885 PR c/61096
1886 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
1887 (c_parser_initelt): Pass location to set_init_label. Pass array index
1888 location to set_init_index.
1889 * c-tree.h (push_init_level): Update declaration.
1890 (pop_init_level): Likewise.
1891 (set_init_index): Likewise.
1892 (set_init_label): Likewise.
1893 * c-typeck.c (error_init): Add location parameter. Call error_at
1894 instead of error.
1895 (digest_init): Pass init_loc to error_init.
1896 (really_start_incremental_init):
1897 (push_init_level): Add location parameter. Pass loc to pop_init_level
1898 and error_init.
1899 (pop_init_level): Likewise.
1900 (set_designator): Add location parameter. Pass loc to pop_init_level,
1901 push_init_level, and error_init.
1902 (set_init_index): Add location parameter. Pass loc to error_init and
1903 set_designator.
1904 (set_init_label): Likewise.
1905 (output_init_element): Pass loc to error_init.
1906 (process_init_element): Pass loc to error_init, pop_init_level,
1907 pedwarn_init, and push_init_level.
1908
661a0813
MP
19092014-05-09 Marek Polacek <polacek@redhat.com>
1910
1911 PR c/50459
1912 * c-parser.c (c_parser_attributes): Parse the arguments as an
1913 expression-list if the attribute takes identifier.
1914
2793eeab
MP
19152014-05-08 Marek Polacek <polacek@redhat.com>
1916
1917 PR c/61053
1918 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
1919 TYPE_ALIGN_UNIT.
1920
f827930a
MP
19212014-05-08 Marek Polacek <polacek@redhat.com>
1922
1923 PR c/61077
1924 * c-decl.c (start_function): Warn for _Atomic-qualified return type
1925 of main.
1926
1d60af08
KZ
19272014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1928 Mike Stump <mikestump@comcast.net>
1929 Richard Sandiford <rdsandiford@googlemail.com>
1930
1931 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
1932 (finish_enum): Use wide-int interfaces.
1933 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
1934 * c-typeck.c (build_c_cast): Likewise.
1935 (set_nonincremental_init_from_string): Likewise.
1936 (c_tree_equal): Likewise.
1937
a0e24419
MP
19382014-05-02 Marek Polacek <polacek@redhat.com>
1939
1940 PR c/25801
1941 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
1942 Return size_one_node when the type is not complete.
1943 (pointer_diff): Remove comment.
1944 (build_unary_op): Improve error messages.
1945
19fc9faa
MP
19462014-05-02 Marek Polacek <polacek@redhat.com>
1947
1948 * c-typeck.c (c_finish_return): Separate warning_at calls.
1949
63bc4e87
MP
19502014-05-02 Marek Polacek <polacek@redhat.com>
1951
1952 * c-tree.h (error_init): Remove declaration.
1953 (pedwarn_init): Likewise.
1954 * c-typeck.c (error_init): Make static and move above.
1955 (pedwarn_init): Likewise.
1956 (warning_init): Move above.
1957 (maybe_warn_string_init): Likewise.
1958
4bd2511b
JL
19592014-05-01 Jeff Law <law@redhat.com>
1960
1961 Revert:
1962
1963 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1964 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
1965 avoid goto.
1966
6a358dcb
MP
19672014-05-02 Marek Polacek <polacek@redhat.com>
1968
1969 PR c/60784
1970 * c-typeck.c (push_init_level): Set constructor_designated to
1971 p->designated for structures.
1972
ae5ebda4
MP
19732014-05-01 Marek Polacek <polacek@redhat.com>
1974
1975 PR c/60915
1976 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
1977 function-definition has an attribute after the declarator.
1978
96b40f8d
MP
19792014-05-01 Marek Polacek <polacek@redhat.com>
1980
1981 PR c/60257
1982 * c-typeck.c (warning_init): Add location_t parameter. Call
1983 warning_at instead of warning.
1984 (push_init_level): Pass input_location to warning_init.
1985 (add_pending_init): Add location_t parameter. Pass loc to
1986 warning_init.
1987 (set_nonincremental_init): Pass input_location to add_pending_init.
1988 (set_nonincremental_init_from_string): Likewise.
1989 (output_init_element): Pass loc to warning_init and to
1990 add_pending_init.
1991
32e00768
MP
19922014-05-01 Marek Polacek <polacek@redhat.com>
1993
1994 PR c/43395
1995 * c-typeck.c (c_finish_return): Distinguish between label and variable
1996 when warning about returning local address.
1997
c9379ce2
MP
19982014-05-01 Marek Polacek <polacek@redhat.com>
1999
2000 PR c/29467
2001 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
2002 in C89 mode.
2003
d00887e8
MP
20042014-05-01 Marek Polacek <polacek@redhat.com>
2005
2006 PR c/43245
2007 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
2008 instead of 0 to WARN_FOR_QUALIFIERS.
2009
5436fa2e
MP
20102014-05-01 Marek Polacek <polacek@redhat.com>
2011
2012 PR c/56989
2013 * c-typeck.c (default_conversion): Use better location for
2014 error call.
2015
f8ed5150
MP
20162014-04-30 Marek Polacek <polacek@redhat.com>
2017
2018 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
2019 also when SANITIZE_FLOAT_DIVIDE is on.
2020
8337d1db
MP
20212014-04-30 Marek Polacek <polacek@redhat.com>
2022
2023 PR c/60139
2024 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
2025 and pedwarn_init. Use loc insted of input_location.
2026
c4bdc42f
MP
20272014-04-30 Marek Polacek <polacek@redhat.com>
2028
2029 PR c/60351
2030 * c-typeck.c (build_binary_op): Use location when warning about
2031 shift count.
2032
45484dcf
MP
20332014-04-25 Marek Polacek <polacek@redhat.com>
2034
2035 PR c/18079
2036 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
2037 always_inline/noinline and hot/cold attributes.
2038
34cf811f
MP
20392014-04-25 Marek Polacek <polacek@redhat.com>
2040
2041 PR c/60114
2042 * c-parser.c (c_parser_initelt): Pass input_location to
2043 process_init_element.
2044 (c_parser_initval): Pass loc to process_init_element.
2045 * c-tree.h (process_init_element): Adjust declaration.
2046 * c-typeck.c (push_init_level): Pass input_location to
2047 process_init_element.
2048 (pop_init_level): Likewise.
2049 (set_designator): Likewise.
2050 (output_init_element): Add location_t parameter. Pass loc to
2051 digest_init.
2052 (output_pending_init_elements): Pass input_location to
2053 output_init_element.
2054 (process_init_element): Add location_t parameter. Pass loc to
2055 output_init_element.
2056
42056eac
JJ
20572014-04-24 Jakub Jelinek <jakub@redhat.com>
2058
2059 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
2060 atomic-clause, allow comma in between atomic-clause and
2061 seq_cst.
2062
e162a134
JJ
20632014-04-22 Jakub Jelinek <jakub@redhat.com>
2064
2065 PR c/59073
2066 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
2067 fails, don't set OM_PARALLEL_COMBINED and return NULL.
2068
2f6babac
IZ
20692014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
2070
2071 PR middle-end/60469
2072 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2073 create_tmp_var instead build_decl for creating temps.
2074 (build_array_notation_expr): Likewise.
2075 (fix_conditional_array_notations_1): Likewise.
2076 (fix_array_notation_expr): Likewise.
2077 (fix_array_notation_call_expr): Likewise.
2078
8edbfaa6
JJ
20792014-03-28 Jakub Jelinek <jakub@redhat.com>
2080
2081 PR c++/60689
2082 * c-tree.h (c_build_function_call_vec): New prototype.
2083 * c-typeck.c (build_function_call_vec): Don't call
2084 resolve_overloaded_builtin here.
2085 (c_build_function_call_vec): New wrapper function around
2086 build_function_call_vec. Call resolve_overloaded_builtin here.
2087 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
2088 Call c_build_function_call_vec instead of build_function_call_vec.
2089 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2090 * c-decl.c (finish_decl): Likewise.
2091
7485aeea
MLI
20922014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2093
2094 PR c/55383
2095 * c-typeck.c: Use correct format string in cast-qual warning
2096
b17a8b07
TS
20972014-03-07 Thomas Schwinge <thomas@codesourcery.com>
2098
2099 * c-decl.c (c_decl_attributes): Use
2100 lang_hooks.types.omp_mappable_type.
2101 * c-typeck.c (c_finish_omp_clauses): Likewise.
2102
3af9c5e9
MP
21032014-03-06 Marek Polacek <polacek@redhat.com>
2104
2105 PR c/60197
2106 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
2107 of checking tree code.
2108
1c9f5f33
PK
21092014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2110
2111 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
2112 (c_parser_parameter_declaration): Likewise.
2113
cc28fc7f
MP
21142014-02-19 Marek Polacek <polacek@redhat.com>
2115
2116 PR c/60195
2117 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
2118 Call mark_exp_read on exp.value.
2119 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
2120 TREE_ADDRESSABLE on old instead of val.
2121 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
2122
b581c05c
PK
21232014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2124
2125 * c-parser.c (c_parser_get_builtin_args): Replace calls to
2126 C_EXPR_APPEND by vec_safe_push.
2127 * c-tree.h (C_EXPR_APPEND): Remove.
2128
81e5eca8
MP
21292014-01-31 Marek Polacek <polacek@redhat.com>
2130
2131 PR c/59963
2132 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
2133 build_function_call_vec.
2134 (build_function_call): Likewise.
2135 (build_atomic_assign): Likewise.
2136 (build_function_call_vec): Add arg_loc parameter. Use it.
2137 (convert_arguments): Likewise.
2138 (convert_for_assignment): Rename rhs_loc to expr_loc.
2139 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
2140 (c_parser_objc_keywordexpr): Likewise.
2141 (c_parser_postfix_expression_after_primary): Call
2142 build_function_call_vec with expr_loc rather than op_loc.
2143 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
2144 build_function_call_vec.
2145 (c_parser_expr_list): Add locations parameter. Fill it with locations
2146 of function arguments.
2147 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
2148
68fca595
MP
21492014-01-30 Marek Polacek <polacek@redhat.com>
2150
2151 PR c/59940
2152 * c-typeck.c (build_function_call_vec): Use loc parameter.
2153 (convert_arguments): Add location parameter. Use it.
2154 (ep_convert_and_check): Likewise.
2155 (build_atomic_assign): Adjust convert_for_assignment call.
2156 (build_modify_expr): Likewise.
2157 (digest_init): Likewise.
2158 (c_finish_return): Likewise.
2159 (build_conditional_expr): Adjust ep_convert_and_check calls.
2160 (convert_for_assignment): Add rhs_loc parameter. Use it.
2161 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
2162 calls.
2163
fa337f3a
RB
21642014-01-30 Richard Biener <rguenther@suse.de>
2165
2166 PR c/59905
2167 * c-typeck.c (build_function_call_vec): Do not replace calls
2168 to a function via an incompatible type with a runtime abort.
2169
b72271b9
BI
21702014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
2171
2172 * c-parser.c (c_parser_declaration_or_fndef): Replaced
2173 flag_enable_cilkplus with flag_cilkplus.
2174 (c_parser_direct_declarator_inner): Likewise.
2175 (c_parser_attribute_any_word): Likewise.
2176 (c_parser_attributes): Likewise.
2177 (c_parser_compound_statement): Likewise.
2178 (c_parser_statement_after_labels): Likewise.
2179 (c_parser_if_statement): Likewise.
2180 (c_parser_switch_statement): Likewise.
2181 (c_parser_do_statement): Likewise.
2182 (c_parser_for_statement): Likewise.
2183 (c_parser_unary_expression): Likewise.
2184 (c_parser_postfix_expression): Likewise.
2185 (c_parser_postfix_expression_after_primary): Likewise.
2186 (c_parser_postfix_expression_after_primary): Likewise.
2187 (c_parser_omp_clause_name): Likewise.
2188 (c_finish_omp_declare_simd): Likewise.
2189 (c_parser_cilk_verify_simd): Likewise.
2190 * c-typeck.c (build_array_ref): Likewise.
2191 (build_function_call_vec): Likewise.
2192 (convert_arguments): Likewise.
2193 (build_compound_expr): Likewise.
2194 (c_finish_return): Likewise.
2195 (c_finish_if_stmt): Likewise.
2196 (c_finish_loop): Likewise.
2197 (build_binary_op): Likewise.
2198
393e8e8b
MP
21992014-01-23 Marek Polacek <polacek@redhat.com>
2200
2201 PR c/59846
2202 * c-typeck.c (parser_build_binary_op): Use location instead of
2203 input_location.
2204 (build_binary_op): Pass location to shorten_compare.
2205
f04dda30
MP
22062014-01-23 Marek Polacek <polacek@redhat.com>
2207
2208 PR c/58346
2209 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
2210 an empty aggregate.
2211
789eadcd
MP
22122014-01-23 Marek Polacek <polacek@redhat.com>
2213
2214 PR c/59871
2215 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
2216 of a comma expression.
2217 (emit_side_effect_warnings): Likewise.
2218
40f14e9f
BI
22192014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2220
2221 PR c/59825
2222 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
2223 function to use walk_tree and moved a lot of its functionality to
2224 expand_array_notations.
2225 (expand_array_notations): New function.
2226
74558dd9
BI
22272014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2228
2229 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
2230 attribute an attribute without value.
2231
652fea39
JJ
22322014-01-23 Jakub Jelinek <jakub@redhat.com>
2233
2234 PR middle-end/58809
2235 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
2236 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
2237
f34f1c87
MP
22382014-01-22 Marek Polacek <polacek@redhat.com>
2239
2240 PR c/59891
2241 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
2242 of remove_c_maybe_const_expr on op1 and op2.
2243
241f845a
JJ
22442014-01-15 Jakub Jelinek <jakub@redhat.com>
2245
2246 PR c/58943
2247 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
2248 effects, preevaluate rhs using SAVE_EXPR first.
2249
9a74f20c
BI
22502014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
2251
2252 PR c++/59631
2253 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
2254 statements with if-elseif statements.
2255
96066ce1
MP
22562014-01-06 Marek Polacek <polacek@redhat.com>
2257
2258 PR c/57773
2259 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
2260 defined bit-field types only in ISO C.
2261
23a5b65a
RS
22622014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2263
2264 Update copyright years
2265
f9030485
RS
22662014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2267
2268 * c-array-notation.c: Use the standard form for the copyright notice.
2269
41958c28
BI
22702013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
2271
2272 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
2273 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
2274 field in parser is not empty. If not-empty, call the function
2275 c_parser_finish_omp_declare_simd.
2276 (c_parser_cilk_clause_vectorlength): Modified function to be shared
2277 between SIMD-enabled functions and #pragma simd. Added new parameter.
2278 (c_parser_cilk_all_clauses): Modified the usage of the function
2279 c_parser_cilk_clause_vectorlength as mentioned above.
2280 (c_parser_cilk_simd_fn_vector_attrs): New function.
2281 (c_finish_cilk_simd_fn_tokens): Likewise.
2282 (is_cilkplus_vector_p): Likewise.
2283 (c_parser_omp_clause_name): Added checking for "vectorlength,"
2284 "nomask," and "mask" strings in clause name.
2285 (c_parser_omp_all_clauses): Added 3 new case statements:
2286 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
2287 PRAGMA_CILK_CLAUSE_NOMASK.
2288 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
2289 check for vector attribute and if so call the function
2290 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
2291 called the function c_finish_cilk_simd_fn_tokens.
2292 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
2293 parser field is non-empty. If so, parse them as you would parse
2294 the omp declare simd pragma.
2295 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
2296 Added a check when step is a parameter and flag it as error.
2297 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
2298 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
2299 pragma_omp_clause.
2300
cef0fd0e
TS
23012013-12-17 Thomas Schwinge <thomas@codesourcery.com>
2302
2303 * c-parser.c (c_parser_omp_parallel): Fix description.
2304
12893402
BI
23052013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
2306
2307 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
2308 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2309 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
2310 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
2311
296674db
JM
23122013-12-04 Joseph Myers <joseph@codesourcery.com>
2313
2314 PR c/52023
2315 * c-parser.c (c_parser_alignas_specifier): Use
2316 c_sizeof_or_alignof_type instead of c_alignof.
2317 (c_parser_alignof_expression): Likewise, with min_alignof
2318 parameter depending on alignof spelling used.
2319
edd28054
MP
23202013-12-04 Marek Polacek <polacek@redhat.com>
2321
2322 PR c/54113
2323 * c-decl.c (start_function): Don't warn for missing prototype for
2324 inline functions.
2325
da0fc454
MP
23262013-12-03 Marek Polacek <polacek@redhat.com>
2327
2328 PR c/59351
2329 * c-decl.c (build_compound_literal): Allow compound literals with
2330 empty initial value.
2331
4c2ecab0
JM
23322013-12-02 Joseph Myers <joseph@codesourcery.com>
2333
2334 PR c/58235
2335 * c-typeck.c (build_modify_expr): Diagnose assignment to
2336 expression with array type.
2337
340baef7
JM
23382013-11-29 Joseph Myers <joseph@codesourcery.com>
2339
2340 PR c/42262
2341 * c-typeck.c (process_init_element): Do not treat a string as
2342 initializing a whole array when used with a designator for an
2343 individual element.
2344
6763b9f7
JM
23452013-11-29 Joseph Myers <joseph@codesourcery.com>
2346
2347 PR c/57574
2348 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
2349 an inline function following a static declaration.
2350
e7bd1de1
JJ
23512013-11-28 Jakub Jelinek <jakub@redhat.com>
2352
2353 PR c/59310
2354 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
2355 to p_name before calling c_parser_omp_teams instead of after.
2356 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
2357 argument. Remove unused p_name variable.
2358
0136f8f0
AH
23592013-11-27 Aldy Hernandez <aldyh@redhat.com>
2360 Jakub Jelinek <jakub@redhat.com>
2361
2362 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
2363 external_scope is NULL.
2364
241b71bb
TV
23652013-11-27 Tom de Vries <tom@codesourcery.com>
2366 Marc Glisse <marc.glisse@inria.fr>
2367
2368 PR c++/59032
2369 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
2370
2fb9a547
AM
23712013-11-22 Andrew MacLeod <amacleod@redhat.com>
2372
2373 * c-typeck.c: Add required include files from gimple.h.
2374
8400e75e
DM
23752013-11-22 David Malcolm <dmalcolm@redhat.com>
2376
2377 * c-decl.c (define_label, shadow_tag_warned)
2378 (check_bitfield_type_and_width, grokdeclarator, grokparms,
2379 store_parm_decls_newstyle, store_parm_decls_oldstyle)
2380 (declspecs_add_type): Remove use of in_system_header macro.
2381 * c-parser.c (c_parser_unary_expression): Likewise.
2382 * c-typeck.c (store_init_value, process_init_element)
2383 (c_start_case): Likewise.
2384
2385 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
2386 macro.
2387
2388 * c-parser.c (c_parser_set_source_position_from_token): Remove
2389 reference to in_system_header from comment.
2390
386b1f1f
RS
23912013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2392
2393 * c-decl.c (grokdeclarator): Update comment to refer to
2394 tree_to_[su]hwi rather than tree_low_cst.
2395
ae7e9ddd
RS
23962013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2397
2398 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
2399 tree_to_uhwi throughout.
2400
9439e9a1
RS
24012013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2402
2403 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
2404 throughout.
2405
9541ffee
RS
24062013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2407
2408 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
2409 throughout.
2410
c02065fc
AH
24112013-11-15 Aldy Hernandez <aldyh@redhat.com>
2412
2413 * c-parser.c (c_parser_cilk_simd): New.
2414 (c_parser_cilk_verify_simd): New.
2415 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
2416 (c_parser_omp_for_loop): Add case for NE_EXPR.
2417 Set c_break_label for CILK_SIMD.
2418 (c_parser_cilk_clause_vectorlength): New.
2419 (c_parser_cilk_clause_linear): New.
2420 (c_parser_cilk_clause_name): New.
2421 (c_parser_cilk_all_clauses): New.
2422 * c-typeck.c (build_unary_op): Pass location argument to
2423 readonly_error.
2424 (build_modify_expr): Same.
2425 (build_asm_expr): Same.
2426 (c_finish_bc_stmt): Error on break/continue in loops.
2427
18f429e2
AM
24282013-11-14 Andrew MacLeod <amacleod@redhat.com>
2429
2430 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
2431
d8a2d370
DN
24322013-11-14 Diego Novillo <dnovillo@google.com>
2433
2434 * c-decl.c: Include print-tree.h.
2435 Include stor-layout.h.
2436 Include varasm.h.
2437 Include attribs.h.
2438 Include stringpool.h.
2439 * c-lang.c: Include fold-const.h.
2440 * c-parser.c: Include stringpool.h.
2441 Include attribs.h.
2442 Include stor-layout.h.
2443 Include varasm.h.
2444 Include trans-mem.h.
2445 * c-typeck.c: Include stor-layout.h.
2446 Include trans-mem.h.
2447 Include varasm.h.
2448 Include stmt.h.
2449
38b7bc7f
JM
24502013-11-13 Joseph Myers <joseph@codesourcery.com>
2451
2452 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
2453 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
2454 __auto_type.
2455 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
2456 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
2457 RID_AUTO_TYPE.
2458 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
2459 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
2460 (c_parser_declarator, c_parser_direct_declarator_inner)
2461 (c_parser_parameter_declaration, c_parser_type_name): All callers
2462 changed.
2463 (c_parser_declaration_or_fndef): Handle declarations with type
2464 determined from the initializer.
2465
45b0be94
AM
24662013-11-12 Andrew MacLeod <amacleod@redhat.com>
2467
18f429e2 2468 * c-typeck.c: Include gimplify.h.
45b0be94 2469
582d9b50
JM
24702013-11-12 Joseph Myers <joseph@codesourcery.com>
2471
2472 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
2473 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
2474 comment.
2475 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
2476 or _Thread_local as appropriate in diagnostics.
2477 (build_null_declspecs): Initialize ret->thread_gnu_p.
2478 (declspecs_add_scspec): Handle either __thread or _Thread_local
2479 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
2480 pedantic. Do not disallow _Thread_local extern and _Thread_local
2481 static.
2482
267bac10
JM
24832013-11-07 Joseph Myers <joseph@codesourcery.com>
2484 Andrew MacLeod <amacleod@redhat.com>
2485
2486 * c-aux-info.c (gen_type): Handle atomic qualifier.
2487 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
2488 qualifiers when compating types.
2489 (shadow_tag_warned): Handle atomic_p in declspecs.
2490 (quals_from_declspecs): Likewise.
2491 (start_decl): Use c_type_promotes_to when promoting argument
2492 types.
2493 (grokdeclarator): Handle _Atomic.
2494 (get_parm_info): Diagnose any qualifier on "void" as only
2495 parameter.
2496 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
2497 comparing types. Use c_type_promotes_to when promoting argument
2498 types.
2499 (finish_function): Use c_type_promotes_to when promoting argument
2500 types.
2501 (build_null_declspecs): Handle atomic_p in declspecs.
2502 (declspecs_add_qual): Handle RID_ATOMIC.
2503 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
2504 (c_token_starts_declspecs): Handle RID_ATOMIC.
2505 (c_parser_declspecs): Handle atomic type specifiers and
2506 qualifiers.
2507 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
2508 from types of expressions with atomic type.
2509 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
2510 (c_parser_attribute_any_word): Handle RID_ATOMIC.
2511 (c_parser_initializer, c_parser_initelt, c_parser_initval)
2512 (c_parser_statement_after_labels, c_parser_switch_statement)
2513 (c_parser_for_statement, c_parser_expr_no_commas)
2514 (c_parser_conditional_expression, c_parser_binary_expression)
2515 (c_parser_cast_expression, c_parser_unary_expression)
2516 (c_parser_postfix_expression)
2517 (c_parser_postfix_expression_after_primary, c_parser_expression):
2518 Use convert_lvalue_to_rvalue.
2519 (c_parser_expression_conv, c_parser_expr_list): Document
2520 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
2521 (c_parser_objc_synchronized_statement): Use
2522 convert_lvalue_to_rvalue.
2523 (c_parser_objc_selector): Handle RID_ATOMIC.
2524 (c_parser_objc_receiver, c_parser_array_notation): Use
2525 convert_lvalue_to_rvalue.
2526 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
2527 _Atomic (type-name).
2528 (struct c_declspecs): Add atomic_p field.
2529 (convert_lvalue_to_rvalue): Declare.
2530 * c-typeck.c (c_type_promotes_to): Promote atomic types to
2531 corresponding atomic types.
2532 (qualify_type): Don't add _Atomic qualifiers from second argument.
2533 (comp_target_types): Do not allow _Atomic mismatches.
2534 (type_lists_compatible_p): Do not remove atomic qualifiers when
2535 comparing types.
2536 (really_atomic_lvalue, convert_lvalue_to_rvalue)
2537 (build_atomic_assign): New functions.
2538 (build_unary_op): Use build_atomic_assign for atomic increment and
2539 decrement.
2540 (build_conditional_expr): Do not treat _Atomic void as a qualified
2541 version of void.
2542 (build_modify_expr): Use build_atomic_assign for atomic LHS.
2543 (find_anonymous_field_with_type, convert_to_anonymous_field)
2544 (convert_for_assignment): Do not remove atomic qualifiers when
2545 comparing types.
2546 (digest_init): Do not accept initialization of arrays of atomic
2547 elements by string constants.
2548 (build_asm_expr): Use convert_lvalue_to_rvalue.
2549 (build_binary_op): Do not treat _Atomic void as a qualified
2550 version of void.
2551
0c249d4b
DD
25522013-11-06 DJ Delorie <dj@redhat.com>
2553
2554 * c-decl.c (locate_old_decl): If a previous conflicting decl is
2555 both explicit and builtin, print the location of the explicit one.
2556
6d7f7e0a
TB
25572013-11-05 Tobias Burnus <burnus@net-b.de>
2558
2559 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
2560 c_parser_omp_distribute, c_parser_omp_teams,
2561 c_parser_omp_target, c_parser_omp_declare): Handle
2562 -fopenmp-simd.
2563
b906f4ca
MP
25642013-11-03 Marek Polacek <polacek@redhat.com>
2565
2566 * c-decl.c (grokdeclarator): Add VLA instrumentation.
2567
ee1d5a02
JJ
25682013-11-01 Jakub Jelinek <jakub@redhat.com>
2569
2570 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
2571 check_dup_generic at the end, unless remove is true.
2572 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
2573 remove = true;.
2574 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
2575
5a9785fb
JJ
25762013-10-31 Jakub Jelinek <jakub@redhat.com>
2577
2578 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
2579 with decl that is not pointer nor array.
2580
939b37da
BI
25812013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
2582
2583 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
2584 a spawning function is found.
2585 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
2586 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
2587 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2588 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
2589 case.
2590 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
2591 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
2592 expr.
2593 (c_finish_return): Added a check to reject _Cilk_spawn in return
2594 expression.
2595 (build_cilk_spawn): New function.
2596 (build_cilk_sync): Likewise.
2597 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
2598
d4af74d4
TB
25992013-10-27 Tobias Burnus <burnus@net-b.de>
2600
2601 PR other/33426
2602 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
2603 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
2604 (c_parser_statement_after_labels): Update calls.
2605
d73749df 26062013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
2607
2608 PR other/33426
2609 * c-parser.c (c_parser_pragma, c_parser_for_statement):
2610 Handle PRAGMA_IVDEP.
2611 (c_parser_statement_after_labels): Update call.
2612
f28aa681
MP
26132013-10-24 Marek Polacek <polacek@redhat.com>
2614
2615 * c-parser.c (c_parser_struct_declaration): Add a comment.
2616 (c_parser_declarator): Don't allow _Alignas here.
2617
0645c1a2
AM
26182013-10-17 Andrew MacLeod <amacleod@redhat.com>
2619
2620 * c-parser.c: Include omp-low.h.
2621 * c-typeck.c: Likewise.
2622
568a31f2
MP
26232013-10-17 Marek Polacek <polacek@redhat.com>
2624
2625 PR c/58267
2626 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
2627 Document syntax of the array-declarator.
2628 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
2629 are not permitted.
2630 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
2631 (c_parser_struct_declaration): Likewise.
2632 (c_parser_declarator): Likewise.
2633 (c_parser_direct_declarator_inner): Likewise.
2634 (c_parser_parameter_declaration): Likewise.
2635 (c_parser_type_name): Likewise.
2636
acf0174b
JJ
26372013-10-11 Jakub Jelinek <jakub@redhat.com>
2638
2639 * c-lang.h (current_omp_declare_target_attribute): New extern
2640 decl.
2641 * c-parser.c: Include c-lang.h.
2642 (struct c_parser): Change tokens to c_token *.
2643 Add tokens_buf field. Change tokens_avail type to unsigned int.
2644 (c_parser_consume_token): If parser->tokens isn't
2645 &parser->tokens_buf[0], increment parser->tokens.
2646 (c_parser_consume_pragma): Likewise.
2647 (enum pragma_context): Add pragma_struct and pragma_param.
2648 (c_parser_external_declaration): Adjust
2649 c_parser_declaration_or_fndef caller.
2650 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
2651 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
2652 Adjust recursive call.
2653 (c_parser_struct_or_union_specifier): Use pragma_struct instead
2654 of pragma_external.
2655 (c_parser_parameter_declaration): Use pragma_param instead of
2656 pragma_external.
2657 (c_parser_compound_statement_nostart, c_parser_label,
2658 c_parser_for_statement): Adjust
2659 c_parser_declaration_or_fndef callers.
2660 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
2661 it through to c_parser_conditional_expression.
2662 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
2663 pass it through to c_parser_binary_expression. Adjust recursive
2664 call.
2665 (c_parser_binary_expression): Remove prec argument, add
2666 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
2667 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
2668 binop matches it, use build2 instead of parser_build_binary_op.
2669 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
2670 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
2671 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
2672 Handle pragma_struct and pragma_param the same as pragma_external.
2673 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
2674 (c_parser_omp_variable_list): Parse array sections for
2675 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
2676 (c_parser_omp_clause_collapse): Fully fold collapse expression.
2677 (c_parser_omp_clause_reduction): Handle user defined reductions.
2678 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
2679 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
2680 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
2681 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
2682 c_parser_omp_clause_depend, c_parser_omp_clause_map,
2683 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
2684 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
2685 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
2686 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
2687 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
2688 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
2689 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
2690 (c_parser_omp_for_loop): Add CODE argument, pass it through
2691 to c_finish_omp_for. Change last argument to cclauses,
2692 and adjust uses to grab parallel clauses from the array of all
2693 the split clauses. Adjust c_parser_binary_expression,
2694 c_parser_declaration_or_fndef and c_finish_omp_for callers.
2695 (omp_split_clauses): New function.
2696 (c_parser_omp_simd): New function.
2697 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
2698 Allow the function to be called also when parsing combined constructs,
2699 and call c_parser_omp_simd when parsing for simd.
2700 (c_parser_omp_sections_scope): If section-sequence doesn't start with
2701 #pragma omp section, require exactly one structured-block instead of
2702 sequence of statements.
2703 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
2704 Allow the function to be called also when parsing combined constructs.
2705 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
2706 Allow the function to be called also when parsing combined
2707 constructs.
2708 (c_parser_omp_taskgroup, c_parser_omp_cancel,
2709 c_parser_omp_cancellation_point, c_parser_omp_distribute,
2710 c_parser_omp_teams, c_parser_omp_target_data,
2711 c_parser_omp_target_update, c_parser_omp_target,
2712 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
2713 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
2714 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
2715 (c_parser_omp_construct): Add p_name and mask vars. Handle
2716 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
2717 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
2718 and c_parser_omp_sections callers.
2719 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
2720 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
2721 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
2722 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
2723 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
2724 OMP_CLAUSE_DEPEND.
2725 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
2726 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
2727 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
2728 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
2729 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
2730 * c-typeck.c: Include tree-inline.h.
2731 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
2732 handle_omp_array_sections_1, handle_omp_array_sections,
2733 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
2734 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
2735 user defined reductions.
2736 (c_tree_equal): New function.
2737 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
2738 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
2739 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
2740 c_check_omp_declare_reduction_r): New prototypes.
2741 * c-decl.c (current_omp_declare_target_attribute): New variable.
2742 (c_decl_attributes): New function.
2743 (start_decl, start_function): Use it instead of decl_attributes.
2744 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
2745 c_omp_reduction_decl, c_omp_reduction_lookup,
2746 c_check_omp_declare_reduction_r): New functions.
2747
0a6c2227
TT
27482013-09-25 Tom Tromey <tromey@redhat.com>
2749
2750 * Make-lang.in (c/gccspec.o): Remove.
2751 (CFLAGS-c/gccspec.o): New variable.
2752 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
2753 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
2754 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
2755
f3bc55f0
TT
27562013-09-25 Tom Tromey <tromey@redhat.com>
2757
2758 * Make-lang.in (c/gccspec.o): Don't use subshell.
2759
a24d975c
MP
27602013-09-18 Marek Polacek <polacek@redhat.com>
2761
2762 PR sanitize/58443
2763 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
2764 Remove unnecessary check.
2765
ce6923c5
MP
27662013-09-18 Marek Polacek <polacek@redhat.com>
2767
2768 PR sanitizer/58411
2769 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
2770 no_sanitize_undefined attribute.
2771
a1e51df9
KT
27722013-09-13 Kai Tietz <ktietz@redhat.com>
2773
2774 PR target/57848
2775 * c-decl.c (c_builtin_function_ext_scope): Remove
2776 wrong assumption that it is never called on prexisting
2777 symbol.
2778
0af94e6f
JR
27792013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
2780
2781 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
2782
20059c8b
GDR
27832013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2784
2785 * c-objc-common.c (c_tree_printer): Tidy.
2786
de5a5fa1
MP
27872013-08-30 Marek Polacek <polacek@redhat.com>
2788
2789 * c-typeck.c (build_binary_op): Add division by zero and shift
2790 instrumentation.
2791
2531a1d9 27922013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 2793 Joseph Myers <joseph@codesourcery.com>
2531a1d9 2794
6e2bcc98 2795 PR c/35649
2531a1d9
JR
2796 * c-typeck.c (c_common_type): Prefer double_type_node over
2797 other REAL_TYPE types with the same precision.
2798 (convert_arguments): Likewise.
2799
025311c4
GDR
28002013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
2801
2802 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
2803 (c_initialize_diagnostics): Call a destructor for the early printer.
2804
da6ca2b5
GDR
28052013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2806
2807 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
2808 printer initialization.
2809
318cda85 28102013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 2811
318cda85
BI
2812 PR c/57490
2813 * c-array-notation.c (fix_conditional_array_notations_1): Added a
2814 check for truth values.
2815 (expand_array_notation_exprs): Added truth values case. Removed an
2816 unwanted else. Added for-loop to walk through subtrees in default
2817 case.
2818
b066401f
GDR
28192013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
2820
2821 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
2822
fb48aadc
JM
28232013-07-23 Joseph Myers <joseph@codesourcery.com>
2824
2825 * c-parser.c (struct c_generic_association): Fix typo.
2826
433cc7b0
TT
28272013-07-23 Tom Tromey <tromey@redhat.com>
2828 Joseph Myers <joseph@codesourcery.com>
2829
2830 * c-parser.c (struct c_generic_association): New.
2831 (c_generic_association_d): New typedef.
2832 (c_parser_generic_selection): New function.
2833 (c_parser_postfix_expression): Handle RID_GENERIC.
2834
26d40c3d
JM
28352013-07-13 Jason Merrill <jason@redhat.com>
2836
2837 PR c++/57793
2838 * c-decl.c (finish_struct): Check for too-large class.
2839
ecdbd01a 28402013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
2841
2842 PR c/57821
2843 * c-typeck.c (set_init_index): When folding, check for index overflow.
2844
1141ed3f
BI
28452013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2846
2847 * c-parser.c (c_parser_array_notation): Removed rejection of array
2848 notations in an array of function pointers.
2849
713b46fa
BI
28502013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
2851
2852 * c-array-notation.c (make_triplet_val_inv): New function.
2853 (create_cmp_incr): Likewise.
2854 (create_array_refs): Likewise.
2855 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
2856 Also modularized common parts between functions and called the function.
2857 (build_array_notation_expr): Likewise.
2858 (fix_conditional_array_notations_1): Likewise.
2859 (fix_array_notation_expr): Likewise.
2860 (fix_array_notation_call_expr): Likewise.
2861
92f20202
MP
28622013-06-18 Marek Polacek <polacek@redhat.com>
2863
2864 PR c/57630
2865 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
2866
73a23b06
BI
28672013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
2868
2869 * c-array-notation.c (build_array_notation_expr): Reject array notation
2870 mismatch between LHS and RHS even inside a call_expr. Also, removed
2871 a couple while statements that were dead code.
2872
00b8517d
BI
28732013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
2874
2875 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
2876 excessive precision expressions in function parameters. Also removed
2877 couple unwanted while statements.
2878
1509bdda
BI
28792013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2880
2881 * c-array-notation.c (expand_array_notation_exprs): Added
2882 ARRAY_NOTATION_REF case.
2883
d60f1706
BI
28842013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2885
2886 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
2887 function to c-family/array-notation-common.c.
2888 (is_cilkplus_reduce_builtin): Likewise.
2889 (find_rank): Likewise.
2890 (extract_array_notation_exprs): Likewise.
2891 (replace_array_notations): Likewise.
2892 (find_inv_trees): Likewise.
2893 (replace_inv_trees): Likewise.
2894 (contains_array_notation_expr): Likewise.
2895 (find_correct_array_notation_type): Likewise.
2896 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
2897 (struct inv_list): Moved this to c-family/array-notation-common.c.
2898 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
2899
6d6efbb3
BI
29002013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
2901
2902 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
2903 reduction functions outside the for-loop. Added a check if the fundecl
2904 is non-NULL. Finally, removed an unwanted if-statement, and made the
2905 body unconditional.
2906
25c22937
BI
29072013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2908
2909 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
2910 condition of the if-statement matches the rank of else-block and then-
2911 block when array notations are used.
2912 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
2913 expression after the entire function body is parsed.
2914 (c_parser_expr_no_commas): Delayed creating array notation expressions
2915 to the end of function parsing.
2916 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
2917 whole if-statement instead of just the condition.
2918 (expand_array_notation_exprs): Added MODIFY_EXPR case.
2919
edd25645
BI
29202013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2921
2922 PR c/57474
2923 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
2924 array to NULL_TREE if they are unused. Also added a check for the
2925 field to be NULL before its fields are used in future.
2926
065ce7f1
RO
29272013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2928
2929 PR bootstrap/57450
2930 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
2931 (build_array_notation_expr): Likewise.
2932
36536d79
BI
29332013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2934
2935 * c-typeck.c (build_array_ref): Added a check to see if array's
2936 index is greater than one. If true, then emit an error.
2937 (build_function_call_vec): Exclude error reporting and checking
2938 for builtin array-notation functions.
2939 (convert_arguments): Likewise.
2940 (c_finish_return): Added a check for array notations as a return
2941 expression. If true, then emit an error.
2942 (c_finish_loop): Added a check for array notations in a loop
2943 condition. If true then emit an error.
2944 (lvalue_p): Added a ARRAY_NOTATION_REF case.
2945 (build_binary_op): Added a check for array notation expr inside
2946 op1 and op0. If present, we call another function to find correct
2947 type.
2948 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
2949 * c-parser.c (c_parser_compound_statement): Check if array
2950 notation code is used in tree, if so, then transform them into
2951 appropriate C code.
2952 (c_parser_expr_no_commas): Check if array notation is used in LHS
2953 or RHS, if so, then build array notation expression instead of
2954 regular modify.
2955 (c_parser_postfix_expression_after_primary): Added a check for
2956 colon(s) after square braces, if so then handle it like an array
2957 notation. Also, break up array notations in unary op if found.
2958 (c_parser_direct_declarator_inner): Added a check for array
2959 notation.
2960 (c_parser_compound_statement): Added a check for array notation in
2961 a stmt. If one is present, then expand array notation expr.
2962 (c_parser_if_statement): Likewise.
2963 (c_parser_switch_statement): Added a check for array notations in
2964 a switch statement's condition. If true, then output an error.
2965 (c_parser_while_statement): Similarly, but for a while.
2966 (c_parser_do_statement): Similarly, but for a do-while.
2967 (c_parser_for_statement): Similarly, but for a for-loop.
2968 (c_parser_unary_expression): Check if array notation is used in a
2969 pre-increment or pre-decrement expression. If true, then expand
2970 them.
2971 (c_parser_array_notation): New function.
2972 * c-array-notation.c: New file.
2973 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
2974
cd192ccc
MS
29752013-05-23 Mike Stump <mikestump@comcast.net>
2976
2977 * c-typeck.c (convert_for_assignment): Handle references to memory
2978 spaces better.
2979
427b248d
JM
29802013-05-16 Jason Merrill <jason@redhat.com>
2981
2982 * Make-lang.in (cc1$(exeext)): Use link mutex.
2983
44d90fe1
PC
29842013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
2985
2986 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
2987 to simply use OPT_Wpointer_arith.
2988 (build_unary_op): Likewise.
2989
4e7d7b3d
JJ
29902013-04-03 Jakub Jelinek <jakub@redhat.com>
2991
2992 PR c/19449
2993 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
2994 argument. If set, or it temporarily for parsing of the first
2995 argument into force_folding_builtin_constant_p.
2996 (c_parser_postfix_expression): Adjust callers.
2997
839b422f
RB
29982013-03-21 Richard Biener <rguenther@suse.de>
2999
3000 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
3001 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
3002
2ee028f1
MP
30032013-02-12 Marek Polacek <polacek@redhat.com>
3004
3005 PR c/44938
3006 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
3007 origtypes to NULL.
3008
8824edff
JJ
30092013-01-24 Jakub Jelinek <jakub@redhat.com>
3010
3011 PR c/56078
3012 * c-typeck.c (set_nonincremental_init_from_string): If
3013 constructor_max_index is NULL, treat it as if tree_int_cst_lt
3014 returned false.
3015 (process_init_element): Likewise.
3016
eadd3d0d
JJ
30172012-12-20 Jakub Jelinek <jakub@redhat.com>
3018
3019 PR c++/55619
3020 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
3021 argument, don't call default_function_array_conversion
3022 nor c_fully_fold here.
3023 (c_parser_asm_statement): Adjust callers.
3024 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
3025 and outputs here, and call default_function_array_conversion
3026 on inputs that don't need to be addressable.
3027
f8a93a2e
JJ
30282012-12-18 Jakub Jelinek <jakub@redhat.com>
3029
3030 PR c/39464
3031 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
3032 warning require that both c_common_unsigned_type as well as
3033 c_common_signed_type is the same for both mvl and mvr types.
3034
9771b263
DN
30352012-11-16 Diego Novillo <dnovillo@google.com>
3036
3037 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
3038
3039 * c-common.c: Use new vec API in vec.h.
3040 * c-common.h: Likewise.
3041 * c-gimplify.c: Likewise.
3042 * c-pragma.c: Likewise.
3043 * c-pretty-print.c: Likewise.
3044 * c-pretty-print.h: Likewise.
3045 * c-semantics.c: Likewise.
3046 * c-decl.c: Likewise.
3047 * c-parser.c: Likewise.
3048 * c-tree.h: Likewise.
3049 * c-typeck.c: Likewise.
3050
880661a4
JW
30512012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
3052
3053 PR c++/54930
3054 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
3055
077d1abe
MLI
30562012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3057
3058 PR c/53066
3059 * c-decl.c (warn_if_shadowing): Do not warn if a variable
3060 shadows a function, unless the variable is a function or a
3061 pointer-to-function.
3062
3a785c97
JJ
30632012-10-12 Jakub Jelinek <jakub@redhat.com>
3064
3065 PR c/54381
3066 * c-parser.c (struct c_tree_loc_pair): Removed.
3067 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
3068 add location_t * and tree * arguments, fill in array of 3
3069 sizeof_arg trees and corresponding locs.
3070 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
3071 c_parser_expr_list callers.
3072 (c_parser_postfix_expression_after_primary): Likewise. Pass
3073 array of 3 sizeof_arg trees and locs (corresponding to first
3074 3 arguments) to sizeof_pointer_memaccess_warning.
3075
703c8606
LC
30762012-10-09 Lawrence Crowl <crowl@google.com>
3077
3078 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
3079 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
3080 hash table.
3081
5d9de0d0
PC
30822012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
3083
3084 PR c++/54194
3085 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
3086 call.
3087
a212e43f
MG
30882012-10-09 Marc Glisse <marc.glisse@inria.fr>
3089
3090 PR c++/54427
3091 * c-typeck.c: Include c-common.h.
3092 (enum stv_conv): Moved to c-common.h.
3093 (scalar_to_vector): Moved to c-common.c.
3094 (build_binary_op): Adapt to scalar_to_vector's new prototype.
3095 * Make-lang.in: c-typeck.c depends on c-common.h.
3096
3b78de56
AC
30972012-10-04 Arnaud Charlet <charlet@adacore.com>
3098
3099 * c-decl.c (c_write_global_declarations): Fix handling of
3100 -fdump-ada-spec*.
3101
78c60e3d
SS
31022012-09-30 Sharad Singhai <singhai@google.com>
3103
3104 * c-decl.c (c_write_global_declarations): Use a different method
3105 to determine if the dump has ben initialized.
3106
9f33203d
JM
31072012-09-14 Joseph Myers <joseph@codesourcery.com>
3108
3109 PR c/54552
3110 * c-typeck.c (c_cast_expr): When casting to a type requiring
3111 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
3112 c_fully_fold first.
3113
a27d595d
JM
31142012-09-14 Joseph Myers <joseph@codesourcery.com>
3115
3116 PR c/54103
3117 * c-typeck.c (build_unary_op): Pass original argument of
3118 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
3119 any C_MAYBE_CONST_EXPR, if it has integer operands.
3120 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
3121 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
3122 to c_objc_common_truthvalue_conversion, then remove any
3123 C_MAYBE_CONST_EXPR, if they have integer operands. Use
3124 c_objc_common_truthvalue_conversion not
3125 c_common_truthvalue_conversion.
3126 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
3127 call note_integer_operands for arguments with integer operands
3128 that are not integer constants.
3129
9feb29df
JJ
31302012-09-13 Jakub Jelinek <jakub@redhat.com>
3131
3132 PR c/54559
3133 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
3134 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
3135
d409320c
JJ
31362012-08-31 Jakub Jelinek <jakub@redhat.com>
3137
3138 PR c/54428
3139 * c-convert.c (convert): Don't call fold_convert_loc if
3140 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
3141 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
3142 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
3143
6265d07c
JJ
31442012-08-24 Jakub Jelinek <jakub@redhat.com>
3145
3146 PR c/54355
3147 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
3148 for nested and empty_ok arguments in the call to
3149 c_parser_declaration_or_fndef.
3150
1a4049e7
JJ
31512012-08-17 Jakub Jelinek <jakub@redhat.com>
3152
3153 * c-tree.h (c_last_sizeof_arg): Declare.
3154 * c-parser.c (struct c_tree_loc_pair): New type.
3155 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
3156 non-NULL.
3157 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
3158 (c_parser_postfix_expression_after_primary): Likewise. Call
3159 sizeof_pointer_memaccess_warning if needed.
3160 (sizeof_ptr_memacc_comptypes): New function.
3161 * c-typeck.c (c_last_sizeof_arg): New global variable.
3162 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
3163
0229aee9
UB
31642012-07-24 Uros Bizjak <ubizjak@gmail.com>
3165
3166 * c-lang.h (lang_decl): Add variable_size GTY option.
3167
7ee2468b
SB
31682012-07-16 Steven Bosscher <steven@gcc.gnu.org>
3169
3170 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
3171 * Make-lang.in: Fix dependencies.
3172
d4a10d0a
SB
31732012-06-29 Steven Bosscher <steven@gcc.gnu.org>
3174
3175 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
3176 and add language Makefile hooks.
3177 * config-lang.in: New file.
3178 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
3179 add the required "normal" config-lang.in rules.
3180 * c-lang.h: Moved from gcc/ to here.
3181 * c-tree.h: Likewise.
3182 * c-objc-common.c: Likewise.
3183 * c-objc-common.h: Likewise.
3184 * c-typeck.c: Likewise.
3185 * c-convert.c: Likewise.
3186 * c-lang.c: Likewise.
3187 * c-aux-info.c: Likewise.
3188 * c-errors.c: Likewise.
3189 * gccspec.c: Likewise.
3190 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
3191 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
3192\f
818ab71a 3193Copyright (C) 2012-2016 Free Software Foundation, Inc.
d4a10d0a
SB
3194
3195Copying and distribution of this file, with or without modification,
3196are permitted in any medium without royalty provided the copyright
3197notice and this notice are preserved.
This page took 1.332579 seconds and 5 git commands to generate.