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