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