]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
re PR lto/61886 (LTO breaks fread with _FORTIFY_SOURCE=2)
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
f187980b
EB
12015-12-04 Eric Botcazou <ebotcazou@adacore.com>
2
3 * c-tree.h (c_build_va_arg): Adjust prototype.
4 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
5 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
6 parameter, adjust throughout and issue an error if EXPR is a component
7 with reverse storage order.
8
4250754e
JM
92015-12-02 Jason Merrill <jason@redhat.com>
10
11 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
12 (c_fully_fold_internal, decl_constant_value_for_optimization):
13 Move from c-common.c.
14 * c-tree.h: Declare decl_constant_value_for_optimization.
15 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
16
e9e32ee6
JM
172015-12-02 Joseph Myers <joseph@codesourcery.com>
18
19 PR c/68162
20 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
21 following link from declarator to next declarator. Track original
22 qualified type and pass it to c_build_qualified_type.
23 * c-typeck.c (c_build_qualified_type): Add arguments
24 orig_qual_type and orig_qual_indirect.
25
ff7a55bf
TS
262015-12-02 Thomas Schwinge <thomas@codesourcery.com>
27
28 * c-parser.c (c_parser_omp_clause_name)
29 (c_parser_oacc_all_clauses): Alphabetical sorting.
30
657e4e47
JJ
312015-12-02 Jakub Jelinek <jakub@redhat.com>
32
33 PR c/68533
34 * c-decl.c (get_parm_info): Use b->locus instead of input_location
35 for diagnostics.
36
37d5ad46
JB
372015-12-01 Julian Brown <julian@codesourcery.com>
38 Cesar Philippidis <cesar@codesourcery.com>
39 James Norris <James_Norris@mentor.com>
40
41 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
42 (c_parser_oacc_clause_use_device): New function.
43 (c_parser_oacc_all_clauses): Add use_device support.
44 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
45 (c_parser_oacc_host_data): New function.
46 (c_parser_omp_construct): Add host_data support.
47 * c-tree.h (c_finish_oacc_host_data): Add prototype.
48 * c-typeck.c (c_finish_oacc_host_data): New function.
49 (c_finish_omp_clauses): Add use_device support.
50
a4850ce9
JH
512015-11-29 Jan Hubicka <hubicka@ucw.cz>
52
53 PR c/67106
54 * c-decl.c: Set TYPE_PACKED in variants.
55
b58d3df2
ML
562015-11-27 Martin Liska <mliska@suse.cz>
57
58 PR c++/68312
59 * c-array-notation.c (fix_builtin_array_notation_fn):
60 Use release_vec_vec instead of vec::release.
61 (build_array_notation_expr): Likewise.
62 (fix_conditional_array_notations_1): Likewise.
63 (fix_array_notation_expr): Likewise.
64 (fix_array_notation_call_expr): Likewise.
65
aec17bfe
JJ
662015-11-27 Jakub Jelinek <jakub@redhat.com>
67
68 PR c/63326
69 * c-parser.c (c_parser_compound_statement_nostart): If
70 last_label is true, use pragma_stmt instead of pragma_compound
71 as second c_parser_pragma argument.
72 (c_parser_omp_ordered, c_parser_omp_target_update,
73 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
74 false as second argument to c_parser_skip_to_pragma_eol after
75 diagnosing standalone directives used in pragma_stmt context.
76
688c4de0
IV
772015-11-24 Ilya Verbin <ilya.verbin@intel.com>
78
79 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
80 with "if (ENABLE_OFFLOADING)".
81
cbd03aee
DM
822015-11-23 David Malcolm <dmalcolm@redhat.com>
83
84 PR objc/68438
85 * c-parser.c (c_parser_postfix_expression): Set up source ranges
86 for various Objective-C constructs: Class.name syntax,
87 @selector(), @protocol(), @encode(), and [] message syntax.
88
a87a86e1
DM
892015-11-20 David Malcolm <dmalcolm@redhat.com>
90
91 PR 62314
92 * c-typeck.c (should_suggest_deref_p): New function.
93 (build_component_ref): Special-case POINTER_TYPE when
94 generating a "not a structure of union" error message, and
95 suggest a "->" rather than a ".", providing a fix-it hint.
96
8ece8dfb
DM
972015-11-19 David Malcolm <dmalcolm@redhat.com>
98
99 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
100 candidate into a new function, find_closest_identifier.
101
433068cc
MP
1022015-11-19 Marek Polacek <polacek@redhat.com>
103
104 PR c/68412
105 * c-typeck.c (parser_build_binary_op): Properly handle
106 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
107
bef08b71
DM
1082015-11-17 David Malcolm <dmalcolm@redhat.com>
109
110 * c-parser.c (set_c_expr_source_range): Bulletproof both
111 overloaded implementations against NULL expr->value.
112 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
113 values.
114 (c_parser_unary_expression): Likewise when handling addresses of
115 labels.
116 (c_parser_postfix_expression): Likewise for statement expressions,
117 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
118 __builtin_va_arg, and for __builtin_offset_of.
119 (c_parser_postfix_expression_after_paren_type): Initialize expr's
120 src_range using the range of the braced initializer.
121 (c_parser_transaction_expression): Set src_range for "ret" to a
122 sane pair of values.
123
fff77217
KY
1242015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
125
126 * c-parser.c (c_finish_omp_declare_simd): Look for
127 "simd" attribute as well. Update error message.
128
1d899da2
TS
1292015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
130
131 * c-parser.c (c_parser_omp_declare_target): Adjust.
132
e4606348
JJ
1332015-11-14 Jakub Jelinek <jakub@redhat.com>
134
135 * c-typeck.c (c_finish_omp_clauses): Don't mark
136 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
137
3e636daf
MP
1382015-11-14 Marek Polacek <polacek@redhat.com>
139
140 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
141 * c-typeck.c: Likewise.
142
ebedc9a3
DM
1432015-11-13 David Malcolm <dmalcolm@redhat.com>
144
145 * c-decl.c (warn_defaults_to): Pass line_table to
146 rich_location ctor.
147 * c-errors.c (pedwarn_c99): Likewise.
148 (pedwarn_c90): Likewise.
149 * c-parser.c (set_c_expr_source_range): New functions.
150 (c_token::get_range): New method.
151 (c_token::get_finish): New method.
152 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
153 based on the range from the start of the LHS to the end of the
154 RHS.
155 (c_parser_conditional_expression): Likewise, based on the range
156 from the start of the cond.value to the end of exp2.value.
157 (c_parser_binary_expression): Call set_c_expr_source_range on
158 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
159 (c_parser_cast_expression): Call set_c_expr_source_range on ret
160 based on the cast_loc through to the end of the expr.
161 (c_parser_unary_expression): Likewise, based on the
162 op_loc through to the end of op.
163 (c_parser_sizeof_expression) Likewise, based on the start of the
164 sizeof token through to either the closing paren or the end of
165 expr.
166 (c_parser_postfix_expression): Likewise, using the token range,
167 or from the open paren through to the close paren for
168 parenthesized expressions.
169 (c_parser_postfix_expression_after_primary): Likewise, for
170 various kinds of expression.
171 * c-tree.h (struct c_expr): Add field "src_range".
172 (c_expr::get_start): New method.
173 (c_expr::get_finish): New method.
174 (set_c_expr_source_range): New decls.
175 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
176 on ret for prefix unary ops.
177 (parser_build_binary_op): Likewise, running from the start of
178 arg1.value through to the end of arg2.value.
179
ec8b536f
MP
1802015-11-13 Marek Polacek <polacek@redhat.com>
181
182 PR c/68320
183 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
184
277fe616
DM
1852015-11-13 David Malcolm <dmalcolm@redhat.com>
186
187 * c-typeck.c: Include spellcheck.h.
188 (lookup_field_fuzzy_find_candidates): New function.
189 (lookup_field_fuzzy): New function.
190 (build_component_ref): If the field was not found, try using
191 lookup_field_fuzzy and potentially offer a suggestion.
192
6e232ba4
JN
1932015-11-12 James Norris <jnorris@codesourcery.com>
194 Joseph Myers <joseph@codesourcery.com>
195
196 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
197 (c_parser_omp_clause_name): Handle 'device_resident' clause.
198 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
199 and PRAGMA_OMP_CLAUSE_LINK.
200 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
201 and PRAGMA_OACC_CLAUSE_LINK.
202 (OACC_DECLARE_CLAUSE_MASK): New definition.
203 (c_parser_oacc_declare): New function.
204
9be4f715
MP
2052015-11-12 Marek Polacek <polacek@redhat.com>
206
207 PR c/67784
208 * c-parser.c (c_parser_for_statement): Reclassify the token in
209 a correct scope.
210
e78bede6
MP
2112015-11-11 Marek Polacek <polacek@redhat.com>
212
213 PR c/68107
214 PR c++/68266
215 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
216 checking the size of an array.
217
69f293c9
AM
2182015-11-11 Andrew MacLeod <amacleod@redhat.com>
219
220 * c-array-notation.c: Remove unused header files.
221 * c-aux-info.c: Likewise.
222 * c-convert.c: Likewise.
223 * c-decl.c: Likewise.
224 * c-errors.c: Likewise.
225 * c-lang.c: Likewise.
226 * c-objc-common.c: Likewise.
227 * c-parser.c: Likewise.
228 * c-typeck.c: Likewise.
229 * gccspec.c: Likewise.
230
3a40d81d
NS
2312015-11-09 Thomas Schwinge <thomas@codesourcery.com>
232 Cesar Philippidis <cesar@codesourcery.com>
233 James Norris <jnorris@codesourcery.com>
234 Julian Brown <julian@codesourcery.com>
235 Nathan Sidwell <nathan@codesourcery.com>
236
237 c/
238 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
239 routine arg.
240 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
241 (c_parser_pragma): Parse 'acc routine'.
242 (OACC_ROUTINE_CLAUSE_MARK): Define.
243 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
244
fc402eec
AA
2452015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
246
247 PR debug/67192
248 * c-typeck.c (c_finish_loop): For unconditional loops, set the
249 location of the backward-goto to the start of the loop body.
250
f6b0b3db
AA
2512015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
252
253 PR debug/67192
254 * c-parser.c (c_parser_while_statement): Finish the loop before
255 parsing ahead for misleading indentation.
256 (c_parser_for_statement): Likewise.
257
ee45a32d
EB
2582015-11-08 Eric Botcazou <ebotcazou@adacore.com>
259
260 * c-decl.c (finish_struct): If the structure has reverse storage
261 order, rewrite the type of array fields with scalar component. Call
262 maybe_apply_pragma_scalar_storage_order on entry.
263 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
264 errors on bit-fields and reverse SSO here and not...
265 (c_mark_addressable): ...here.
266 (output_init_element): Adjust call to initializer_constant_valid_p.
267 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
268
8a645150
DM
2692015-11-06 David Malcolm <dmalcolm@redhat.com>
270
271 * c-decl.c (warn_defaults_to): Update for change in signature
272 of diagnostic_set_info.
273 * c-errors.c (pedwarn_c99): Likewise.
274 (pedwarn_c90): Likewise.
275 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
276 for textinfo::set_location.
277
7a5e4956
CP
2782015-11-05 Cesar Philippidis <cesar@codesourcery.com>
279 Thomas Schwinge <thomas@codesourcery.com>
280 James Norris <jnorris@codesourcery.com>
281
282 * c-parser.c (c_parser_omp_clause_name): Add support for
283 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
284 (c_parser_omp_clause_default): Add is_oacc argument. Handle
285 default(none) in OpenACC.
286 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
287 arguments.
288 (c_parser_oacc_clause_tile): New function.
289 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
290 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
291 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
292 TILE}.
293 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
294 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
295 FIRSTPRIVATE}.
296 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
297 (c_parser_oacc_update): Update the error message for missing clauses.
298 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
299 and OMP_CLAUSE_INDEPENDENT.
300
bfcfbfa0
MP
3012015-11-05 Marek Polacek <polacek@redhat.com>
302
303 PR c/68090
304 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
305 deal with pre-evaluation on invalid types.
306
e01d41e5
JJ
3072015-11-05 Jakub Jelinek <jakub@redhat.com>
308 Ilya Verbin <ilya.verbin@intel.com>
309
310 * c-parser.c: Include context.h and gimple-expr.h.
311 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
312 monotonic together with nonmonotonic.
313 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
314 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
315 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
316 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
317 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
318 expressions on combined target teams before the target.
319 (c_parser_omp_declare_target): If decl has "omp declare target" or
320 "omp declare target link" attribute, and cgraph or varpool node already
321 exists, then set corresponding flags. Call c_finish_omp_clauses
322 in the parenthesized extended-list syntax case.
323 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
324 declare target.
325 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
326 on OMP_CLAUSE_REDUCTION array sections.
327 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
328 into the constant offset, or for variable low-bound using
329 POINTER_PLUS_EXPR. For structure element based array sections use
330 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
331 (c_finish_omp_clauses): Drop generic_field_head, structure
332 elements are now always mapped even as array section bases,
333 diagnose same var in data sharing and mapping clauses. Diagnose if
334 linear step on declare simd is neither a constant nor a uniform
335 parameter. Look through POINTER_PLUS_EXPR for array section
336 reductions. Diagnose the same var or function appearing multiple
337 times on the same directive. Fix up wording for the to clause if t
338 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
339 modifier on kinds other than dynamic or guided or nonmonotonic
340 modifier together with ordered clause.
341
4bf9e5a8
TS
3422015-11-03 Thomas Schwinge <thomas@codesourcery.com>
343 Chung-Lin Tang <cltang@codesourcery.com>
344
345 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
346
2adfab87
AM
3472015-10-29 Andrew MacLeod <amacleod@redhat.com>
348
349 * c-array-notation.c: Reorder #include's and remove duplicates.
350 * c-aux-info.c: Likewise.
351 * c-convert.c: Likewise.
352 * c-decl.c: Likewise.
353 * c-errors.c: Likewise.
354 * c-lang.c: Likewise.
355 * c-objc-common.c: Likewise.
356 * c-parser.c: Likewise.
357 * c-typeck.c: Likewise.
358
e922069e
JW
3592015-10-26 Jim Wilson <jim.wilson@linaro.org>
360
361 PR debug/66068
362 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
363 after calling build_qualified_type.
364
765dd391
CP
3652015-10-27 Cesar Philippidis <cesar@codesourcery.com>
366 Thomas Schwinge <thomas@codesourcery.com>
367 James Norris <jnorris@codesourcery.com>
368 Joseph Myers <joseph@codesourcery.com>
369 Julian Brown <julian@codesourcery.com>
370 Bernd Schmidt <bschmidt@redhat.com>
371
372 * c-parser.c (c_parser_oacc_shape_clause): New.
373 (c_parser_oacc_simple_clause): New.
374 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
375 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
376
88bae6f4
TS
3772015-10-27 Thomas Schwinge <thomas@codesourcery.com>
378 James Norris <jnorris@codesourcery.com>
379 Cesar Philippidis <cesar@codesourcery.com>
380
381 PR c/64765
382 PR c/64880
383 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
384 parameters, and handle these. Adjust all users.
385 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
386 into...
387 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
388 all users.
389 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
390 declare functions.
391 (c_finish_omp_construct): Declare function.
392 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
393 Merge functions into...
394 (c_finish_omp_construct): ... this new function.
395
a8fc2579
RB
3962015-10-22 Richard Biener <rguenther@suse.de>
397
398 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
399 before folding a MINUS_EXPR.
400
e9122ef6
MP
4012015-10-21 Marek Polacek <polacek@redhat.com>
402
403 PR c/68024
404 * c-decl.c (start_function): Warn about vararg functions without
405 a prototype.
406
9f47c7e5
IE
4072015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
408
409 * c-typeck.c (build_conditional_expr): Use boolean vector
410 type for vector comparison.
411 (build_vec_cmp): New.
412 (build_binary_op): Use build_vec_cmp for comparison.
413
fa60eeb9
MP
4142015-10-20 Marek Polacek <polacek@redhat.com>
415
416 * c-parser.c (is_cilkplus_vector_p): Don't define here.
417
2c7020eb
MP
4182015-10-20 Marek Polacek <polacek@redhat.com>
419
420 PR c/67964
421 * c-parser.c (c_parser_attributes): Break out of the loop if the
422 token after an attribute isn't a comma.
423
d9a6bd32
JJ
4242015-10-13 Jakub Jelinek <jakub@redhat.com>
425 Aldy Hernandez <aldyh@redhat.com>
426
427 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
428 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
429 (c_parser_omp_variable_list): Handle structure elements for
430 map, to and from clauses. Handle array sections in reduction
431 clause. Formatting fixes.
432 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
433 if clause modifiers.
434 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
435 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
436 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
437 c_parser_omp_clause_is_device_ptr): New functions.
438 (c_parser_omp_clause_ordered): Parse optional parameter.
439 (c_parser_omp_clause_reduction): Handle array reductions.
440 (c_parser_omp_clause_schedule): Parse optional simd modifier.
441 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
442 functions.
443 (c_parser_omp_clause_linear): Parse linear clause modifiers.
444 (c_parser_omp_clause_depend_sink): New function.
445 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
446 (c_parser_omp_clause_map): Parse release/delete map kinds and
447 optional always modifier.
448 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
449 and c_finish_omp_clauses callers.
450 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
451 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
452 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
453 (OMP_CRITICAL_CLAUSE_MASK): Define.
454 (c_parser_omp_critical): Parse critical clauses.
455 (c_parser_omp_for_loop): Handle doacross loops, adjust
456 c_finish_omp_for and c_finish_omp_clauses callers.
457 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
458 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
459 (OMP_FOR_CLAUSE_MASK): Add linear clause.
460 (c_parser_omp_for): Disallow ordered clause when combined with
461 distribute. Disallow linear clause when combined with distribute
462 and not combined with simd.
463 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
464 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
465 parse clauses and if depend clause is found, don't parse a body.
466 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
467 Allow target parallel without for after it.
468 (OMP_TASK_CLAUSE_MASK): Add priority clause.
469 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
470 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
471 invalid kinds.
472 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
473 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
474 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
475 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
476 functions.
477 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
478 defaultmap and is_device_ptr clauses.
479 (c_parser_omp_target): Parse target parallel and target simd. Set
480 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
481 and target exit data. Diagnose invalid map kinds.
482 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
483 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
484 construct.
485 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
486 &omp_priv.
487 (OMP_TASKLOOP_CLAUSE_MASK): Define.
488 (c_parser_omp_taskloop): New function.
489 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
490 handle PRAGMA_OMP_TASKLOOP.
491 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
492 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
493 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
494 Add IS_OMP argument, handle structure element bases, diagnose
495 bitfields, pass IS_OMP recursively, diagnose known zero length
496 array sections in depend clauses, handle array sections in reduction
497 clause, diagnose negative length even for pointers.
498 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
499 types, pass IS_OMP down to handle_omp_array_sections_1, handle
500 array sections in reduction clause, set
501 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
502 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
503 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
504 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
505
21ba0cea
MP
5062015-10-06 Marek Polacek <polacek@redhat.com>
507
508 * c-parser.c (c_parser_statement_after_labels): Use
509 protected_set_expr_location.
510 (c_parser_omp_clause_num_gangs): Likewise.
511 (c_parser_omp_clause_num_threads): Likewise.
512 (c_parser_omp_clause_num_workers): Likewise.
513 (c_parser_omp_clause_vector_length): Likewise.
514 (c_parser_omp_clause_num_teams): Likewise.
515 (c_parser_omp_clause_thread_limit): Likewise.
516 * c-typeck.c (build_c_cast): Likewise.
517 (c_cast_expr): Likewise.
518
624d31fe
RS
5192015-10-05 Richard Sandiford <richard.sandiford@arm.com>
520
521 * c-typeck.c (c_tree_equal): Use real_equal instead of
522 REAL_VALUES_EQUAL.
523
b8fd7909
JM
5242015-10-04 Jason Merrill <jason@redhat.com>
525
526 * c-parser.c (c_lex_one_token): Handle @synchronized.
527 * c-decl.c (match_builtin_function_types): A declaration of a built-in
528 can change whether the function is transaction_safe.
529
1c7485af
MP
5302015-10-02 Marek Polacek <polacek@redhat.com>
531
532 PR c/67730
533 * c-typeck.c (convert_for_assignment): Use the expansion point
534 location throughout.
535
3e3b8d63
MP
5362015-10-02 Marek Polacek <polacek@redhat.com>
537
538 PR c/64249
539 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
540 and pass it down to c_parser_if_statement.
541 (c_parser_else_body): Add CHAIN parameter and pass it down to
542 c_parser_statement_after_labels.
543 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
544 duplicated if-else-if conditions.
545
aabef2de
MP
5462015-10-01 Marek Polacek <polacek@redhat.com>
547
548 * c-typeck.c (convert_for_assignment): Improve commentary.
549
de8ddd5f
MP
5502015-09-30 Marek Polacek <polacek@redhat.com>
551
552 PR c/67730
553 * c-typeck.c (c_finish_return): Use the expansion point location for
554 certain "return with value" warnings.
555
c4914de6
MLI
5562015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
557
558 * c-parser.c (pragma_lex): Add loc argument.
559
0e36f5c7
MP
5602015-09-15 Marek Polacek <polacek@redhat.com>
561
562 PR c/67580
563 * c-decl.c (tag_exists_p): New function.
564 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
565 struct/union/enum keywords are missing.
566 * c-tree.h (tag_exists_p): Declare.
567
2f3bb934
MP
5682015-09-15 Marek Polacek <polacek@redhat.com>
569
570 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
571 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
572 Return NULL_TREE instead of 0.
573 (lookup_name): Return NULL_TREE instead of 0.
574 (lookup_name_in_scope): Likewise.
575 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
576 (parser_xref_tag): Use false instead of 0.
577 (start_struct): Use true instead of 1.
578 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
579
aa256c4a
MP
5802015-09-14 Marek Polacek <polacek@redhat.com>
581
582 * c-typeck.c (set_nonincremental_init_from_string): Use
583 HOST_WIDE_INT_M1U when shifting a negative value.
584
dbb68221
MW
5852015-09-09 Mark Wielaard <mjw@redhat.com>
586
587 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
588 parm against NULL.
589
a8a098ac
JJ
5902015-09-10 Jakub Jelinek <jakub@redhat.com>
591
592 PR c/67502
593 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
594 into OMP_FOR_PRE_BODY rather than before the loop.
595
f4b189d5
JJ
5962015-09-09 Jakub Jelinek <jakub@redhat.com>
597
0bb99c11
JJ
598 PR c/67501
599 * c-parser.c (c_parser_oacc_all_clauses,
600 c_parser_omp_all_clauses): Remove invalid clause from
601 list of clauses even if parser->error is set.
602
fce5e5e3
JJ
603 PR c/67500
604 * c-parser.c (c_parser_omp_clause_aligned,
605 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
606 test for errors.
607 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
608 error_mark_node.
609
f4b189d5
JJ
610 PR c/67495
611 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
612 instead of c_parser_unary_expression. If the result is !lvalue_p,
613 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
614
b2aaf235
MP
6152015-09-04 Marek Polacek <polacek@redhat.com>
616
617 PR sanitizer/67279
618 * c-typeck.c (build_binary_op): Don't instrument static initializers.
619
1807ffc1
MS
6202015-09-03 Martin Sebor <msebor@redhat.com>
621
622 PR c/66516
8b652e65
JJ
623 * c-typeck.c (convert_arguments, parser_build_unary_op,
624 build_conditional_expr, c_cast_expr, convert_for_assignment,
625 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
626 reject_gcc_builtin.
627 (c_decl_implicit): Define.
628
d04ff417
MP
6292015-09-02 Marek Polacek <polacek@redhat.com>
630
631 PR c/67432
632 * c-parser.c (c_parser_enum_specifier): Give a better error for
633 an empty enum.
634
a79683d5
TS
6352015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
636
637 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
638
191a6b94
MP
6392015-08-12 Marek Polacek <polacek@redhat.com>
640
641 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
642 LOC to it.
643
420a9d9b
MP
6442015-08-03 Marek Polacek <polacek@redhat.com>
645
646 PR c/67088
647 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
648 Use it.
649 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
650
992118a1
PP
6512015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
652
653 * c-parser.c (c_parser_if_body): Take token_indent_info
654 argument. Call warn_for_misleading_indentation even when the
655 body is a semicolon. Extract token_indent_infos corresponding
656 to the guard, body and next tokens. Adjust call to
657 warn_for_misleading_indentation accordingly.
658 (c_parser_else_body): Likewise.
659 (c_parser_if_statement): Likewise.
660 (c_parser_while_statement): Likewise.
661 (c_parser_for_statement): Likewise.
662
46308474
LFSM
6632015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
664 Manuel López-Ibáñez <manu@gcc.gnu.org>
665
666 * c-decl.c (get_parm_info): Remove static var. Update warning
667 message.
668
05b28fd6
MP
6692015-07-27 Marek Polacek <polacek@redhat.com>
670
671 PR c++/66555
672 PR c/54979
673 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
674
451b5e48
MP
6752015-07-20 Marek Polacek <polacek@redhat.com>
676
677 PR c++/55095
678 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
679 (build_binary_op): Warn about left shift overflows.
680
1916bcb5
AM
6812015-07-09 Andrew MacLeod <amacleod@redhat.com>
682
683 * c-array-notation.c: Adjust includes for flags.h changes.
684 * c-objc-common.c: Likewise.
685
c7131fb2
AM
6862015-07-07 Andrew MacLeod <amacleod@redhat.com>
687
688 * c-array-notation.c: Adjust includes.
689 * c-aux-info.c: Likewise.
690 * c-convert.c: Likewise.
691 * c-decl.c: Likewise.
692 * c-errors.c: Likewise.
693 * c-lang.c: Likewise.
694 * c-objc-common.c: Likewise.
695 * c-parser.c: Likewise.
696 * c-typeck.c: Likewise.
697
da2e71c9
MLI
6982015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
699
700 PR fortran/66605
701 * c-decl.c (finish_function): Call do_warn_unused_parameter.
702
b155cfd9
MP
7032015-06-29 Marek Polacek <polacek@redhat.com>
704
705 PR c/66322
706 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
707 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
708 about -Wswitch-bool here.
709 (do_case): Update c_add_case_label call.
710 (c_finish_case): Update c_do_switch_warnings call.
711
31521951
MP
7122015-06-27 Marek Polacek <polacek@redhat.com>
713
714 * c-typeck.c: Use VECTOR_TYPE_P throughout.
715
22d03525
MP
7162015-06-26 Marek Polacek <polacek@redhat.com>
717
718 * c-array-notation.c (fix_builtin_array_notation_fn): Use
719 INDIRECT_REF_P.
720 * c-typeck.c (array_to_pointer_conversion): Likewise.
721 (build_unary_op): Likewise.
722 (c_finish_return): Likewise.
723
f0889939
AM
7242015-06-25 Andrew MacLeod <amacleod@redhat.com>
725
726 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
727 * c-parser.c: Likewise.
728
8d67ee55
RS
7292015-06-25 Richard Sandiford <richard.sandiford@arm.com>
730
731 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
732 instead of pointer_hash.
733 (detect_field_duplicates): Likewise.
734
0ae9bd27
MP
7352015-06-25 Marek Polacek <polacek@redhat.com>
736
737 * c-array-notation.c: Use VAR_P throughout.
738 * c-decl.c: Likewise.
739 * c-objc-common.c: Likewise.
740 * c-parser.c: Likewise.
741 * c-typeck.c: Likewise.
742
62f9079a
MP
7432015-06-25 Marek Polacek <polacek@redhat.com>
744
745 * c-decl.c: Use is_global_var throughout.
746 * c-parser.c: Likewise.
747 * c-typeck.c: Likewise.
748
abb226c9
AM
7492015-06-17 Andrew MacLeod <amacleod@redhat.com>
750
751 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
752 * c-aux-info.c: Likewise.
753 * c-convert.c: Likewise.
754 * c-decl.c: Likewise.
755 * c-errors.c: Likewise.
756 * c-lang.c: Likewise.
757 * c-objc-common.c: Likewise.
758 * c-parser.c: Likewise.
759 * c-typeck.c: Likewise.
760
8cbababc
JH
7612015-06-11 Jan Hubicka <hubicka@ucw.cz>
762
763 PR middle-end/66325
764 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
765 variants.
766
a0349665
PMR
7672015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
768
769 * c-decl.c (pop_scope): Register the main translation unit
770 through the new debug hook.
771
13fdf2e2
AM
7722015-06-08 Andrew MacLeod <amacleod@redhat.com>
773
774 * c-array-notation.c : Adjust include files.
775 * c-aux-info.c : Likewise.
776 * c-convert.c : Likewise.
777 * c-decl.c : Likewise.
778 * c-errors.c : Likewise.
779 * c-lang.c : Likewise.
780 * c-lang.h : Likewise.
781 * c-objc-common.c : Likewise.
782 * c-parser.c : Likewise.
783 * c-typeck.c : Likewise.
784
d7438551
AH
7852015-06-05 Aldy Hernandez <aldyh@redhat.com>
786
787 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
788 immediately clobber it.
789 (c_write_global_declarations_1): Remove call to
790 check_global_declaration_1.
791 (c_write_global_declarations_2): Remove.
792 (c_write_final_cleanups): Rename from c_write_global_declarations.
793 Remove call to finalize_compilation_unit.
794 Remove calls to debugging hooks.
795 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
796 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
797 * c-tree.h: Remove c_write_global_declarations.
798
ecb9f223
AM
7992015-06-04 Andrew MacLeod <amacleod@redhat.com>
800
801 * c-array-notation.c: Adjust includes for restructured coretypes.h.
802 * c-aux-info.c: Likewise.
803 * c-convert.c: Likewise.
804 * c-decl.c: Likewise.
805 * c-errors.c: Likewise.
806 * c-lang.c: Likewise.
807 * c-objc-common.c: Likewise.
808 * c-parser.c: Likewise.
809 * c-typeck.c: Likewise.
810
9482b620
MP
8112015-06-04 Marek Polacek <polacek@redhat.com>
812
813 PR c/66341
814 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
815 it is a lvalue.
816
bc51ace3
PK
8172015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
818
819 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
820 Warn for empty struct.
821 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
822
ea5b45b6
AT
8232015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
824
825 * c-decl.c (start_function): Call plugin before parsing.
826 (finish_function): Call plugin after parsing.
827
c2d47482
PK
8282015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
829
830 PR c/49551
831 * c-decl.c (merge_decls): Merge DECL_COMMON.
832
a95492ab
JW
8332015-05-22 Jim Wilson <jim.wilson@linaro.org>
834
835 * Make-lang.in (check_gcc_pallelize): Define.
836
fd5c817a
MP
8372015-05-22 Marek Polacek <polacek@redhat.com>
838
839 PR c/47043
840 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
841 attributes.
842
c7b70a3c
MP
8432015-05-21 Marek Polacek <polacek@redhat.com>
844
845 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
846 DECL_BUILT_IN.
847
21b634ae
MP
8482015-05-20 Marek Polacek <polacek@redhat.com>
849
850 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
851 * c-typeck.c: Likewise.
852
296a8c2f
MP
8532015-05-19 Marek Polacek <polacek@redhat.com>
854
855 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
856
41b37d5e
JJ
8572015-05-19 Jakub Jelinek <jakub@redhat.com>
858
859 PR middle-end/66199
860 * c-parser.c (c_parser_omp_for_loop): Don't add
861 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
862 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
863 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
864 constructs.
865
fab27f52
MM
8662015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
867
868 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 869 swaps.
fab27f52 870
40de31cf
MLI
8712015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
872
873 PR fortran/44054
874 * c-objc-common.c (c_tree_printer): Replace locus pointer with
875 accessor function.
876
3aa3c9fc
MP
8772015-05-14 Marek Polacek <polacek@redhat.com>
878
879 PR c/66066
880 PR c/66127
881 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
882 rather than with 0.
883
c3388e62
DM
8842015-05-12 David Malcolm <dmalcolm@redhat.com>
885
886 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
887 to add a call to warn_for_misleading_indentation.
888 (c_parser_else_body): Likewise, adding param "else_loc".
889 (c_parser_if_statement): Check for misleading indentation.
890 (c_parser_while_statement): Likewise.
891 (c_parser_for_statement): Likewise.
892
755e528f
MP
8932015-05-08 Marek Polacek <polacek@redhat.com>
894
895 PR c/64918
896 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
897 (output_init_element): Likewise.
898
0173bd2a
MP
8992015-05-07 Marek Polacek <polacek@redhat.com>
900
901 PR c/65179
902 * c-typeck.c (build_binary_op): Warn when left shifting a negative
903 value.
904
9babc352
MP
9052015-04-30 Marek Polacek <polacek@redhat.com>
906
907 * c-typeck.c (set_init_label): Call error_at instead of error and
908 pass LOC to it.
909
ac9f18db
MP
910 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
911 the type of a decl.
912
ec3fba51
MP
913 * c-typeck.c (c_build_va_arg): Clarify the error message.
914
b811915d
TS
9152015-04-29 Thomas Schwinge <thomas@codesourcery.com>
916
917 * c-parser.c (c_parser_oacc_enter_exit_data): Use
918 OMP_STANDALONE_CLAUSES.
919
f3075008
MP
9202015-04-28 Marek Polacek <polacek@redhat.com>
921
922 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
923
4e81b788
MP
9242015-04-28 Marek Polacek <polacek@redhat.com>
925
926 PR c/65901
927 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
928
6c1db78e
MP
9292015-04-25 Marek Polacek <polacek@redhat.com>
930
931 PR c/52085
932 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
933 attribute.
934
5c4abbb8
MP
9352015-04-23 Marek Polacek <polacek@redhat.com>
936
937 PR c/65345
938 * c-decl.c (set_labels_context_r): New function.
939 (store_parm_decls): Call it via walk_tree_without_duplicates.
940 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
941 instead of create_tmp_var. Build TARGET_EXPR instead of
942 COMPOUND_EXPR.
943 (build_atomic_assign): Use create_tmp_var_raw instead of
944 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
945
06aca1d5
IV
9462015-04-20 Ilya Verbin <ilya.verbin@intel.com>
947
948 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
949 (c_parser_omp_target_update): Add missed %> to error_at ().
950
8fba1830
BRF
9512015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
952
953 PR target/55143
954 * c-decl.c (c_default_pointer_mode): Remove definition.
955 * c-tree.h (c_default_pointer_mode): Remove declaration.
956
62021f64
TB
9572015-03-27 Tobias Burnus <burnus@net-b.de>
958
959 PR c/65586
960 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
961 error out.
962 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
963 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
964 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
965
9b65e171
JJ
9662015-03-19 Jakub Jelinek <jakub@redhat.com>
967
968 * c-decl.c (c_decl_attributes): Also add "omp declare target"
969 attribute for DECL_EXTERNAL VAR_DECLs.
970
17958621
JJ
9712015-03-11 Jakub Jelinek <jakub@redhat.com>
972
973 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
974 argument.
975
7ccb1a11
JJ
9762015-03-10 Jakub Jelinek <jakub@redhat.com>
977
978 PR c/65120
979 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
980 before preparing arguments to warn_logical_not_parentheses.
981
01177669
JJ
9822015-03-09 Jakub Jelinek <jakub@redhat.com>
983
984 PR c/65120
985 * c-typeck.c (parser_build_binary_op): Don't warn for
986 !!x == y or !b == y where b is _Bool.
987
802ac282
MP
9882015-03-09 Marek Polacek <polacek@redhat.com>
989
990 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
991 * c-decl.c (grokdeclarator): Likewise.
992 * c-typeck.c (build_binary_op): Likewise.
993
e5165b60
MP
9942015-02-27 Marek Polacek <polacek@redhat.com>
995
996 PR c/65228
997 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
998
065d214c
MP
9992015-02-14 Marek Polacek <polacek@redhat.com>
1000
1001 PR c/64768
1002 * c-decl.c (grokdeclarator): Set the range of a flexible array member
1003 declared through a typedef name.
1004
e5d9235b
MP
10052015-02-13 Marek Polacek <polacek@redhat.com>
1006
1007 PR c/65050
1008 * c-decl.c (grokdeclarator): Print also the type when giving
1009 the error message about array's incomplete element type.
1010
fa01ffcc
JJ
10112015-02-11 Jakub Jelinek <jakub@redhat.com>
1012
1013 PR c/64824
1014 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
1015 check in the POP macro.
1016
c3e38a03
MP
10172015-02-09 Marek Polacek <polacek@redhat.com>
1018
1019 PR c/64856
1020 * c-typeck.c (process_init_element): Don't always wrap
1021 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
1022 initializing a range of elements.
1023
4886ec8e
JJ
10242015-02-04 Jakub Jelinek <jakub@redhat.com>
1025
1026 PR c/64824
1027 PR c/64868
1028 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
1029
c3e38a03 10302015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
1031
1032 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
1033 processing enum declaration.
1034
7b33f0c8
MP
10352015-01-29 Marek Polacek <polacek@redhat.com>
1036
1037 PR c/64709
1038 * c-typeck.c (pop_init_level): If constructor_elements has
1039 exactly one element with integer_zerop value, set constructor_zeroinit
1040 to 1. Remove braces around warning_init call.
1041
dea63e49
JJ
10422015-01-27 Jakub Jelinek <jakub@redhat.com>
1043
1044 PR c/64766
1045 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
1046 of FUNCTION_DECLs with error_mark_node.
1047
d38f7dce
JJ
10482015-01-26 Jakub Jelinek <jakub@redhat.com>
1049
1050 PR c/64778
1051 * c-typeck.c (convert_arguments): Return -1 if there are
1052 error_args, even if we've diagnosed too many arguments.
1053
cbf5d0e7
RB
10542015-01-21 Richard Biener <rguenther@suse.de>
1055
1056 PR middle-end/64313
1057 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
1058 for builtins the user declared correctly.
1059
41dbbb37
TS
10602015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1061 Bernd Schmidt <bernds@codesourcery.com>
1062 Cesar Philippidis <cesar@codesourcery.com>
1063 James Norris <jnorris@codesourcery.com>
1064 Jakub Jelinek <jakub@redhat.com>
1065 Ilmir Usmanov <i.usmanov@samsung.com>
1066
1067 * c-parser.c: Include "gomp-constants.h".
1068 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1069 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1070 Use OMP_CLAUSE_SET_MAP_KIND.
1071 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
1072 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
1073 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
1074 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
1075 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
1076 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
1077 "copyout", "create", "delete", "deviceptr", "gang", "host",
1078 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
1079 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1080 "present_or_create", "pcreate", "seq", "self", "vector",
1081 "vector_length", "wait", "worker".
1082 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1083 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
1084 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1085 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1086 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
1087 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
1088 (c_parser_oacc_data_clause_deviceptr)
1089 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
1090 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
1091 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
1092 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
1093 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
1094 (c_parser_oacc_parallel, c_parser_oacc_update)
1095 (c_parser_oacc_wait): New functions.
1096 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
1097 (c_finish_oacc_data): New prototypes.
1098 * c-typeck.c: Include "gomp-constants.h".
1099 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
1100 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
1101 OMP_CLAUSE_SET_MAP_KIND.
1102 (c_finish_oacc_parallel, c_finish_oacc_kernels)
1103 (c_finish_oacc_data): New functions.
1104 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
1105 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
1106 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
1107 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
1108 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
1109 GOMP_MAP_FORCE_DEVICEPTR.
1110
adfac8df
JJ
11112015-01-09 Michael Collison <michael.collison@linaro.org>
1112
1113 * c-array-notation.c: Include hash-set.h, machmode.h,
1114 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1115 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
1116 * c-aux-info.c: Ditto.
1117 * c-convert.c: Ditto.
1118 * c-decl.c: Ditto.
1119 * c-errors.c: Ditto.
1120 * c-lang.c: Dittoxs.
1121 * c-objc-common.c: Ditto.
1122 * c-parser.c: Ditto.
1123 * c-typeck.c: Include hash-set.h, machmode.h,
1124 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1125 fold-const.h, wide-int.h, inchash.h, real.h and
1126 fixed-value.h due to flattening of tree.h.
1127
2cc901dc
MP
11282015-01-07 Marek Polacek <polacek@redhat.com>
1129
1130 PR c/64417
1131 * c-typeck.c (process_init_element): Disallow initialization of
1132 a flexible array member with a string constant if the structure
1133 is in an array.
1134
5624e564
JJ
11352015-01-05 Jakub Jelinek <jakub@redhat.com>
1136
e5341100
JJ
1137 PR sanitizer/64344
1138 * c-typeck.c (convert_for_assignment, c_finish_return): For
1139 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
1140 types also set in_late_binary_op around convert call.
1141 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
1142 to integral type casts, if not in_late_binary_op, pass c_fully_fold
1143 result on expr as last argument to ubsan_instrument_float_cast,
1144 if in_late_binary_op, don't use c_save_expr but save_expr.
1145
5624e564
JJ
1146 Update copyright years.
1147
5bd012f8
MP
11482015-01-05 Marek Polacek <polacek@redhat.com>
1149
1150 PR c/64423
1151 * c-typeck.c (build_array_ref): Pass loc down to
1152 warn_array_subscript_with_type_char.
1153
768952be
MU
11542014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
1155
1156 * c-typeck.c: New behavious for pointers to arrays with qualifiers
1157 (common-pointer-type): For pointers to arrays take qualifiers from
1158 element type.
1159 (build_conditional_expr): Add warnings for lost qualifiers.
1160 (comp-target-types): Allow pointers to arrays with different qualifiers.
1161 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
1162 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
1163 to PEDWARN_FOR_QUALIFIERS.
1164
8f94a8c4
JJ
11652014-12-17 Jakub Jelinek <jakub@redhat.com>
1166
1167 PR sanitizer/64289
1168 * c-convert.c: Include ubsan.h.
1169 (convert): For real -> integral casts and
1170 -fsanitize=float-cast-overflow don't call convert_to_integer, but
1171 instead instrument the float cast directly.
1172
b731b390
JJ
11732014-11-29 Jakub Jelinek <jakub@redhat.com>
1174
1175 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
1176 c_finish_stmt_expr): Remove NULL last argument from
1177 create_tmp_var_raw and create_tmp_var calls.
1178 * c-array-notation.c (fix_builtin_array_notation_fn,
1179 build_array_notation_expr, fix_conditional_array_notations_1,
1180 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
1181
541e35a6
MP
11822014-11-28 Marek Polacek <polacek@redhat.com>
1183
1184 PR c/63862
1185 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
1186 convert the right operand to integer type.
1187
b286be94
MP
11882014-11-25 Marek Polacek <polacek@redhat.com>
1189
1190 PR c/63877
1191 * c-decl.c (start_function): Disable -Wmissing-declarations warning
1192 for inline functions.
1193
aa7da51a
JJ
11942014-11-21 Jakub Jelinek <jakub@redhat.com>
1195
1196 PR target/63764
1197 * c-typeck.c (build_array_ref): Adjust
1198 convert_vector_to_pointer_for_subscript caller. If it returns true,
1199 call non_lvalue_loc on the result.
1200
d876207f
RB
12012014-11-11 Richard Biener <rguenther@suse.de>
1202
1203 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
1204 to true.
1205
e5e44252
AK
12062014-11-10 Andi Kleen <ak@linux.intel.com>
1207
1208 PR c/60804
1209 * c-parser.c (c_parser_statement_after_labels): Call
1210 check_no_cilk.
1211 (c_parser_if_statement): Dito.
1212 (c_parser_switch_statement): Dito.
1213 (c_parser_while_statement): Dito.
1214 (c_parser_do_statement): Dito.
1215 (c_parser_for_statement): Dito.
1216 * c-typeck.c (c_finish_loop): Dito.
1217
13c21655
PC
12182014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
1219
1220 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
1221 OPT_Wshift_count_overflow in the warnings.
1222
2d51fcef
MP
12232014-10-30 Marek Polacek <polacek@redhat.com>
1224
1225 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
1226 print the stripped version as well, if they're not the same.
1227
ef4bddc2
RS
12282014-10-29 Richard Sandiford <richard.sandiford@arm.com>
1229
1230 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
1231 machine_mode.
1232
c582198b
AM
12332014-10-28 Andrew MacLeod <amacleod@redhat.com>
1234
1235 * c-decl.c: Adjust include files.
1236 * c-parser.c: Ditto.
1237
ddc8de03
PM
12382014-10-27 Phil Muldoon <pmuldoon@redhat.com>
1239 Tom Tromey <tromey@redhat.com>
1240
1241 * c-tree.h (enum c_oracle_request): New.
1242 (c_binding_oracle_function): New typedef.
1243 (c_binding_oracle, c_pushtag, c_bind): Declare.
1244 * c-decl.c (c_binding_oracle): New global.
1245 (I_SYMBOL_CHECKED): New macro.
1246 (i_symbol_binding): New function.
1247 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
1248 (I_TAG_CHECKED): New macro.
1249 (i_tag_binding): New function.
1250 (I_TAG_BINDING, I_TAG_DECL): Redefine.
1251 (I_LABEL_CHECKED): New macro.
1252 (i_label_binding): New function.
1253 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
1254 (c_print_identifier): Save and restore c_binding_oracle.
1255 (c_pushtag, c_bind): New functions.
1256
60393bbc
AM
12572014-10-27 Andrew MacLeod <amacleod@redhat.com>
1258
1259 * c-typeck.c: Adjust include files.
1260
d723bb7c
MLI
12612014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
1262
1263 PR c++/53061
1264 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
1265 initialization here...
1266 (c_initialize_diagnostics): ... but here. Set defaults after
1267 building pretty-printer.
1268
1bc5a451
MP
12692014-10-23 Marek Polacek <polacek@redhat.com>
1270
1271 PR c/63626
1272 * c-decl.c (pop_scope): Don't print warning in external_scope.
1273
4435bb92
MP
12742014-10-19 Marek Polacek <polacek@redhat.com>
1275
1276 PR c/63567
1277 * c-typeck.c (output_init_element): Allow initializing objects with
1278 static storage duration with compound literals even in C99 and add
1279 pedwarn for it.
1280
7278465e
MP
12812014-10-17 Marek Polacek <polacek@redhat.com>
1282
1283 PR c/63567
1284 * c-typeck.c (digest_init): Allow initializing objects with static
1285 storage duration with compound literals even in C99 and add pedwarn
1286 for it.
1287
d9b7be2e
MP
12882014-10-17 Marek Polacek <polacek@redhat.com>
1289
1290 PR c/63543
1291 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
1292 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
1293 error multiple times. Print the type.
1294
f406ae1f
MP
12952014-10-17 Marek Polacek <polacek@redhat.com>
1296
1297 PR c/63549
1298 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
1299 type.
1300
92574c7c
MP
13012014-10-17 Marek Polacek <polacek@redhat.com>
1302
1303 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
1304 (start_function): Use OPT_Wimplicit_int instead of 0.
1305 (store_parm_decls_oldstyle): Likewise.
1306
1bc4a978
MT
13072014-10-17 Alan Modra <amodra@gmail.com>
1308
1309 PR middle-end/61848
1310 * c-decl.c (merge_decls): Don't merge section name or tls model
1311 to newdecl symtab node, instead merge to olddecl. Override
1312 existing olddecl section name. Set tls_model for all thread-local
1313 vars, not just OMP thread-private ones. Remove incorrect comment.
1314
83685514
AM
13152014-10-16 Andrew MacLeod <amacleod@redhat.com>
1316
1317 * c-decl.c: Adjust include files.
1318
78a7c317
DD
13192014-10-14 DJ Delorie <dj@redhat.com>
1320
1321 * c-parser.c (c_parse_init): Add RID entries for each __intN.
1322 (c_token_starts_typename): Check all __intN, not just __int128.
1323 (c_token_starts_declspecs): Likewise.
1324 (c_parser_declspecs): Likewise.
1325 (c_parser_attribute_any_word): Likewise.
1326 (c_parser_objc_selector): Likewise.
1327 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
1328 (struct c_declspecs): Add int_n_idx field to record *which* __intN
1329 is specified.
1330 * c-decl.c (declspecs_add_type): Check for all __intN, not just
1331 __int128.
1332 (finish_declspecs): Likewise.
1333
74d98c1e
AB
13342014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
1335
1336 * c-parser.c (c_parser_all_labels): New function to replace
1337 the duplicate code.
1338 (c_parser_statement): Call the new function.
1339
84937de2
MP
13402014-10-09 Marek Polacek <polacek@redhat.com>
1341
1342 PR c/63480
1343 * c-typeck.c (pop_init_level): Don't warn about initializing
1344 with { }.
1345
0382aaa0
MP
13462014-10-07 Marek Polacek <polacek@redhat.com>
1347
1348 PR c/59717
1349 * c-decl.c (header_for_builtin_fn): New function.
1350 (implicitly_declare): Suggest which header to include.
1351
7a0ca710
MP
13522014-10-07 Marek Polacek <polacek@redhat.com>
1353
1354 * c-convert.c (convert): Use error_operand_p.
1355 * c-typeck.c (require_complete_type): Likewise.
1356 (really_atomic_lvalue): Likewise.
1357 (digest_init): Likewise.
1358 (handle_omp_array_sections_1): Likewise.
1359
6bc8a126
MP
13602014-10-03 Marek Polacek <polacek@redhat.com>
1361
1362 PR c/63453
1363 * c-decl.c (pop_scope): Don't warn about "inline function declared
1364 but never defined" for functions marked with gnu_inline attribute.
1365
d90c0a59
JJ
13662014-09-25 Jakub Jelinek <jakub@redhat.com>
1367
1368 PR c++/63249
1369 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
1370 on low_bound and length.
1371
083e891e
MP
13722014-09-24 Marek Polacek <polacek@redhat.com>
1373
1374 PR c/61405
1375 PR c/53874
1376 * c-parser.c: Don't define CPP_KEYWORD.
1377 (c_parser_switch_statement): Pass original type to c_finish_case.
1378 * c-tree.h (c_finish_case): Update declaration.
1379 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
1380 conditionally to c_do_switch_warnings.
1381
8d95fe25
MP
13822014-09-03 Marek Polacek <polacek@redhat.com>
1383
1384 PR c/62024
1385 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
1386 conversions.
1387
9a771876
JJ
13882014-09-02 Jakub Jelinek <jakub@redhat.com>
1389 Balaji V. Iyer <balaji.v.iyer@intel.com>
1390 Igor Zamyatin <igor.zamyatin@intel.com>
1391
1392 * c-parser.c (c_parser_cilk_for): New function.
1393 (c_parser_cilk_grainsize): Likewise.
1394 (c_get_temp_regvar): Likewise.
1395 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
1396 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
1397 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
1398 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
1399 case.
1400
b7679d96
CG
14012014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
1402
1403 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
1404 with using HOST_WIDE_INT without truncation to 'int'
1405
59ea0364
MP
14062014-08-22 Marek Polacek <polacek@redhat.com>
1407
1408 PR c++/62199
1409 * c-typeck.c (parser_build_binary_op): Adjust call to
1410 warn_logical_not_parentheses.
1411
671a475e
IZ
14122014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
1413
1414 PR other/62008
1415 * c-parser.c (c_parser_array_notation): Check for correct
1416 type of an array added.
1417
04159acf
MP
14182014-08-19 Marek Polacek <polacek@redhat.com>
1419
1420 PR c++/62153
1421 * c-typeck.c (build_binary_op): If either operand of a comparison
1422 is a boolean expression, call maybe_warn_bool_compare.
1423
c77935ee
PP
14242014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
1425
1426 PR c/45584
1427 * c-typeck.c (build_c_cast): Do a conversion even when the
1428 TYPE_MAIN_VARIANTs are the same.
1429
35aff4fb
MP
14302014-08-19 Marek Polacek <polacek@redhat.com>
1431
1432 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
1433 pedwarn_c99 instead of pedwarn.
1434 (grokfield): Likewise.
1435 (warn_defaults_to): New function.
1436 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
1437 Unconditionally call pedwarn_c99 instead of pedwarn.
1438 (start_function): Call warn_defaults_to instead of pedwarn_c99.
1439 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
1440 check flag_isoc11 before.
1441 * c-errors.c (pedwarn_c99): Change the return type to bool.
1442 Handle -Wc99-c11-compat.
1443 * c-parser.c (disable_extension_diagnostics): Handle
1444 warn_c99_c11_compat.
1445 (restore_extension_diagnostics): Likewise.
1446 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
1447 instead of pedwarn, don't check flag_isoc11 before.
1448 (c_parser_declspecs): Likewise.
1449 (c_parser_alignas_specifier): Likewise.
1450 (c_parser_alignof_expression): Likewise.
1451 (c_parser_generic_selection): Likewise.
1452 * c-tree.h (pedwarn_c99): Update declaration.
1453 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
1454 of pedwarn_c99.
1455
177cce46
MP
14562014-08-19 Marek Polacek <polacek@redhat.com>
1457
1458 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
1459 to pedwarn_c90.
1460 * c-errors.c: Include "opts.h".
1461 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
1462 * c-parser.c (disable_extension_diagnostics): Handle negative value
1463 of warn_c90_c99_compat, too.
1464 (restore_extension_diagnostics): Likewise.
1465 (c_parser_compound_statement_nostart): Pass
1466 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
1467
6dc99c33
MP
14682014-08-12 Marek Polacek <polacek@redhat.com>
1469
1470 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
1471 Add pedwarn.
1472 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
1473 Likewise.
1474 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
1475
f3bede71
MP
14762014-08-10 Marek Polacek <polacek@redhat.com>
1477
1478 PR c/51849
1479 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
1480 Call pedwarn_c90 instead of pedwarn.
1481 (check_bitfield_type_and_width): Likewise.
1482 (declspecs_add_qual): Likewise.
1483 (declspecs_add_type): Likewise.
1484 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
1485 Adjust to only call pedwarn_c90.
1486 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
1487 pedwarn_c90 instead of pedwarn.
1488 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
1489 * c-parser.c (disable_extension_diagnostics): Handle
1490 warn_c90_c99_compat.
1491 (restore_extension_diagnostics): Likewise.
1492 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
1493 pedwarn_c90 instead of pedwarn.
1494 (c_parser_initelt): Likewise.
1495 (c_parser_postfix_expression): Likewise.
1496 (c_parser_postfix_expression_after_paren_type): Likewise.
1497 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
1498 * c-tree.h: Fix formatting.
1499 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
1500 pedwarn_c90 instead of pedwarn.
1501
9f25a338
TS
15022014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1503
1504 * c-typeck.c: Remove include of pointer-set.h.
1505
044331a8
MP
15062014-08-07 Marek Polacek <polacek@redhat.com>
1507
1508 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
1509
b787e7a2
TS
15102014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1511
1512 * c-typeck.c: Use hash_map instead of pointer_map.
1513
6e2830c3
TS
15142014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1515
1516 * c-decl.c: Use hash_set instead of pointer_set.
1517
a7ee52fb
IZ
15182014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1519
1520 PR middle-end/61455
1521 * c-array-notation.c (expand_array_notations): Handling
1522 of DECL_EXPR added.
1523
b4dfdc11
MG
15242014-07-31 Marc Glisse <marc.glisse@inria.fr>
1525
1526 PR c++/60517
1527 * c-typeck.c (c_finish_return): Return 0 instead of the address of
1528 a local variable.
1529
976d5a22
TT
15302014-07-30 Tom Tromey <tromey@redhat.com>
1531
1532 * c-typeck.c (struct constructor_stack) <designator_depth>: New
1533 field.
1534 (really_start_incremental_init, push_init_level): Initialize
1535 designator_depth.
1536 (pop_init_level): Set global designator_depth.
1537 (process_init_element): Check for designated_init attribute.
1538
30281de2
MP
15392014-07-20 Marek Polacek <polacek@redhat.com>
1540
1541 PR c/61852
1542 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
1543 (implicitly_declare): Pass location to implicit_decl_warning.
1544
b108f48f
JJ
15452014-07-14 Jakub Jelinek <jakub@redhat.com>
1546
1547 PR middle-end/61294
1548 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
1549 If non-NULL, call c_parser_check_literal_zero.
1550 (c_parser_check_literal_zero): New function.
1551 (c_parser_postfix_expression_after_primary): Adjust
1552 c_parser_expr_list caller, handle -Wmemset-transposed-args.
1553
773ec47f
MP
15542014-07-06 Marek Polacek <polacek@redhat.com>
1555
1556 PR c/6940
1557 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
1558 * c-tree.h (C_ARRAY_PARAMETER): Define.
1559 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
1560 function parameter.
1561
22e1cf1c
JH
15622014-07-02 Jan Hubicka <hubicka@ucw.cz>
1563 Chen Gang <gang.chen.5i5j@gmail.com>
1564
1565 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
1566 releasing symbol.
1567
52ec0ea3
MP
15682014-07-01 Marek Polacek <polacek@redhat.com>
1569
1570 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
1571 instead of 0 to WARN_FOR_ASSIGNMENT.
1572
d5c3d343
MP
15732014-07-01 Marek Polacek <polacek@redhat.com>
1574
1575 PR c/58286
1576 * c-typeck.c (convert_for_assignment): Pass
1577 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
1578
6a7253a4
MP
15792014-06-30 Marek Polacek <polacek@redhat.com>
1580
1581 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
1582 has no_sanitize_undefined attribute.
1583
5e88a8f4
IZ
15842014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
1585
1586 PR middle-end/57541
1587 * c-array-notation.c (fix_builtin_array_notation_fn):
1588 Check for 0 arguments in builtin call. Check that bultin argument is
1589 correct.
1590 * c-parser.c (c_parser_array_notation): Check for incorrect initial
1591 index.
1592
9698b078
SH
15932014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
1594
1595 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
1596 qualifiers in __auto_type for atomic types.
1597 (c_parser_typeof_specifier): Discard all type qualifiers in
1598 __typeof__ for atomic types.
1599
6e07c515
MP
16002014-06-25 Marek Polacek <polacek@redhat.com>
1601
1602 PR c/61162
1603 * c-parser.c (c_parser_statement_after_labels): Pass the location of
1604 the return expression to c_finish_return.
1605
da6f124d
JJ
16062014-06-25 Jakub Jelinek <jakub@redhat.com>
1607
1608 * c-typeck.c (c_finish_omp_clauses): Make sure
1609 OMP_CLAUSE_LINEAR_STEP has correct type.
1610
c203e8a7
TS
16112014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1612
1613 * c-decl.c: Adjust.
1614
56ad0e38
JJ
16152014-06-24 Jakub Jelinek <jakub@redhat.com>
1616
1617 * c-parser.c (c_parser_omp_for_loop): For
1618 #pragma omp parallel for simd move lastprivate clause from parallel
1619 to for rather than simd.
1620
47c2554f
MP
16212014-06-23 Marek Polacek <polacek@redhat.com>
1622
1623 * c-typeck.c (parser_build_binary_op): Don't call
1624 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
1625
56363ffd
JH
16262014-06-15 Jan Hubicka <hubicka@ucw.cz>
1627
1628 * c-parser.c (c_parser_omp_threadprivate): Likewise.
1629 * c-decl.c (merge_decls): Likewise.
1630
d7ff7ae5
MP
16312014-06-09 Marek Polacek <polacek@redhat.com>
1632
1633 PR c/36446
1634 * c-typeck.c (error_init): Call inform instead of error_at.
1635 (pedwarn_init): Call inform instead of pedwarn.
1636 (warning_init): Call inform instead of warning_at.
1637
24d047a3
JH
16382014-06-07 Jan Hubicka <hubicka@ucw.cz>
1639
1640 * c-decl.c (merge_decls): Use set_decl_section_name.
1641 (duplicate_decls): Remove node if it exists.
1642
9bac5cbb
G
16432014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
1644
1645 PR c/53119
1646 * c-typeck.c (push_init_level, process_init_element,
1647 pop_init_level): Correct check for zero initialization, move
1648 missing brace warning to respect zero initialization.
1649
8ffcdea8
MP
16502014-06-05 Marek Polacek <polacek@redhat.com>
1651
1652 PR c/56724
1653 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
1654
742938c9
MP
16552014-06-05 Marek Polacek <polacek@redhat.com>
1656
1657 PR c/49706
1658 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
1659 on the left hand side operand of a comparison.
1660
6447c55d
MP
16612014-06-05 Marek Polacek <polacek@redhat.com>
1662
1663 PR c/48062
1664 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
1665 Print note only if the warning was printed.
1666
9dc7743c
IZ
16672014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
1668
1669 PR c/58942
1670 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
1671 with a pointer.
1672
fedfecef
MP
16732014-06-03 Marek Polacek <polacek@redhat.com>
1674
1675 PR c/60439
1676 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
1677 c_start_case.
1678 * c-tree.h (c_start_case): Update.
1679 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
1680 switch condition has boolean value.
1681
9b2b7279
AM
16822014-06-02 Andrew MacLeod <amacleod@redhat.com>
1683
1684 * c-decl.c: Include builtins.h.
1685 * c-parser.c: Likewise.
1686
5c1bc275
MP
16872014-05-27 Marek Polacek <polacek@redhat.com>
1688
1689 PR c/56724
1690 * c-typeck.c (convert_arguments): Get location of a parameter. Change
1691 error and warning calls to error_at and warning_at. Pass location of
1692 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
1693 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
1694 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
1695
97563bc8
IZ
16962014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
1697
1698 PR c/61191
1699 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
1700 function parameters.
1701
aede2c10
JH
17022014-05-23 Jan Hubicka <hubicka@ucw.cz>
1703
1704 * c-decl.c (merge_decls): Preserve symtab node pointers.
1705 (duplicate_decls): Free new decl.
1706
edbba2ce
TS
17072014-05-23 Thomas Schwinge <thomas@codesourcery.com>
1708
f3316c6d
TS
1709 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
1710 initialization.
1711
edbba2ce
TS
1712 * c-parser.c (c_parser_omp_target): Return bool values.
1713
68c81f24
TS
17142014-05-22 Thomas Schwinge <thomas@codesourcery.com>
1715
1716 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
1717 num_teams_loc variable to num_thread_limit_loc.
1718
632f2871
RS
17192014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
1720
1721 * c-array-notation.c (expand_array_notations): Use void_node
1722 instead of void_zero_node.
1723
766090c2
TS
17242014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1725
1726 * c-decl.c (finish_struct): Adjust.
1727 (finish_enum): Likewise.
1728 (bind): Adjust.
1729 (record_inline_static): Likewise.
1730 (push_scope): Likewise.
1731 (make_label): Likewise.
1732 (lookup_label_for_goto): Likewise.
1733 (finish_struct): Likewise.
1734 (finish_enum): Likewise.
1735 (store_parm_decls): Likewise.
1736 (c_push_function_context): Likewise.
1737 * c-lang.h: Remove usage of variable_size gty attribute.
1738 * c-parser.c (c_parse_init): Adjust.
1739 (c_parse_file): Likewise.
1740
2b107f6b
MP
17412014-05-13 Marek Polacek <polacek@redhat.com>
1742
1743 PR c/61162
1744 * c-typeck.c (convert_for_assignment): Pass location to
1745 WARN_FOR_ASSIGNMENT instead of input_location.
1746
d033409e
MP
17472014-05-10 Marek Polacek <polacek@redhat.com>
1748
1749 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
1750 maybe_warn_string_init.
1751 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
1752 maybe_warn_string_init.
1753 * c-tree.h (maybe_warn_string_init): Update declaration.
1754 * c-typeck.c (maybe_warn_string_init): Add location parameter.
1755 Call pedwarn_init with loc instead of with input_location.
1756 (digest_init): Pass init_loc to maybe_warn_string_init.
1757 (pop_init_level): Call pedwarn_init with loc instead of with
1758 input_location.
1759 (set_init_index): Likewise.
1760 (process_init_element): Likewise.
1761
ea58ef42
MP
17622014-05-09 Marek Polacek <polacek@redhat.com>
1763
1764 PR c/61096
1765 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
1766 (c_parser_initelt): Pass location to set_init_label. Pass array index
1767 location to set_init_index.
1768 * c-tree.h (push_init_level): Update declaration.
1769 (pop_init_level): Likewise.
1770 (set_init_index): Likewise.
1771 (set_init_label): Likewise.
1772 * c-typeck.c (error_init): Add location parameter. Call error_at
1773 instead of error.
1774 (digest_init): Pass init_loc to error_init.
1775 (really_start_incremental_init):
1776 (push_init_level): Add location parameter. Pass loc to pop_init_level
1777 and error_init.
1778 (pop_init_level): Likewise.
1779 (set_designator): Add location parameter. Pass loc to pop_init_level,
1780 push_init_level, and error_init.
1781 (set_init_index): Add location parameter. Pass loc to error_init and
1782 set_designator.
1783 (set_init_label): Likewise.
1784 (output_init_element): Pass loc to error_init.
1785 (process_init_element): Pass loc to error_init, pop_init_level,
1786 pedwarn_init, and push_init_level.
1787
661a0813
MP
17882014-05-09 Marek Polacek <polacek@redhat.com>
1789
1790 PR c/50459
1791 * c-parser.c (c_parser_attributes): Parse the arguments as an
1792 expression-list if the attribute takes identifier.
1793
2793eeab
MP
17942014-05-08 Marek Polacek <polacek@redhat.com>
1795
1796 PR c/61053
1797 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
1798 TYPE_ALIGN_UNIT.
1799
f827930a
MP
18002014-05-08 Marek Polacek <polacek@redhat.com>
1801
1802 PR c/61077
1803 * c-decl.c (start_function): Warn for _Atomic-qualified return type
1804 of main.
1805
1d60af08
KZ
18062014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1807 Mike Stump <mikestump@comcast.net>
1808 Richard Sandiford <rdsandiford@googlemail.com>
1809
1810 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
1811 (finish_enum): Use wide-int interfaces.
1812 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
1813 * c-typeck.c (build_c_cast): Likewise.
1814 (set_nonincremental_init_from_string): Likewise.
1815 (c_tree_equal): Likewise.
1816
a0e24419
MP
18172014-05-02 Marek Polacek <polacek@redhat.com>
1818
1819 PR c/25801
1820 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
1821 Return size_one_node when the type is not complete.
1822 (pointer_diff): Remove comment.
1823 (build_unary_op): Improve error messages.
1824
19fc9faa
MP
18252014-05-02 Marek Polacek <polacek@redhat.com>
1826
1827 * c-typeck.c (c_finish_return): Separate warning_at calls.
1828
63bc4e87
MP
18292014-05-02 Marek Polacek <polacek@redhat.com>
1830
1831 * c-tree.h (error_init): Remove declaration.
1832 (pedwarn_init): Likewise.
1833 * c-typeck.c (error_init): Make static and move above.
1834 (pedwarn_init): Likewise.
1835 (warning_init): Move above.
1836 (maybe_warn_string_init): Likewise.
1837
4bd2511b
JL
18382014-05-01 Jeff Law <law@redhat.com>
1839
1840 Revert:
1841
1842 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1843 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
1844 avoid goto.
1845
6a358dcb
MP
18462014-05-02 Marek Polacek <polacek@redhat.com>
1847
1848 PR c/60784
1849 * c-typeck.c (push_init_level): Set constructor_designated to
1850 p->designated for structures.
1851
ae5ebda4
MP
18522014-05-01 Marek Polacek <polacek@redhat.com>
1853
1854 PR c/60915
1855 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
1856 function-definition has an attribute after the declarator.
1857
96b40f8d
MP
18582014-05-01 Marek Polacek <polacek@redhat.com>
1859
1860 PR c/60257
1861 * c-typeck.c (warning_init): Add location_t parameter. Call
1862 warning_at instead of warning.
1863 (push_init_level): Pass input_location to warning_init.
1864 (add_pending_init): Add location_t parameter. Pass loc to
1865 warning_init.
1866 (set_nonincremental_init): Pass input_location to add_pending_init.
1867 (set_nonincremental_init_from_string): Likewise.
1868 (output_init_element): Pass loc to warning_init and to
1869 add_pending_init.
1870
32e00768
MP
18712014-05-01 Marek Polacek <polacek@redhat.com>
1872
1873 PR c/43395
1874 * c-typeck.c (c_finish_return): Distinguish between label and variable
1875 when warning about returning local address.
1876
c9379ce2
MP
18772014-05-01 Marek Polacek <polacek@redhat.com>
1878
1879 PR c/29467
1880 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
1881 in C89 mode.
1882
d00887e8
MP
18832014-05-01 Marek Polacek <polacek@redhat.com>
1884
1885 PR c/43245
1886 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
1887 instead of 0 to WARN_FOR_QUALIFIERS.
1888
5436fa2e
MP
18892014-05-01 Marek Polacek <polacek@redhat.com>
1890
1891 PR c/56989
1892 * c-typeck.c (default_conversion): Use better location for
1893 error call.
1894
f8ed5150
MP
18952014-04-30 Marek Polacek <polacek@redhat.com>
1896
1897 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
1898 also when SANITIZE_FLOAT_DIVIDE is on.
1899
8337d1db
MP
19002014-04-30 Marek Polacek <polacek@redhat.com>
1901
1902 PR c/60139
1903 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
1904 and pedwarn_init. Use loc insted of input_location.
1905
c4bdc42f
MP
19062014-04-30 Marek Polacek <polacek@redhat.com>
1907
1908 PR c/60351
1909 * c-typeck.c (build_binary_op): Use location when warning about
1910 shift count.
1911
45484dcf
MP
19122014-04-25 Marek Polacek <polacek@redhat.com>
1913
1914 PR c/18079
1915 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
1916 always_inline/noinline and hot/cold attributes.
1917
34cf811f
MP
19182014-04-25 Marek Polacek <polacek@redhat.com>
1919
1920 PR c/60114
1921 * c-parser.c (c_parser_initelt): Pass input_location to
1922 process_init_element.
1923 (c_parser_initval): Pass loc to process_init_element.
1924 * c-tree.h (process_init_element): Adjust declaration.
1925 * c-typeck.c (push_init_level): Pass input_location to
1926 process_init_element.
1927 (pop_init_level): Likewise.
1928 (set_designator): Likewise.
1929 (output_init_element): Add location_t parameter. Pass loc to
1930 digest_init.
1931 (output_pending_init_elements): Pass input_location to
1932 output_init_element.
1933 (process_init_element): Add location_t parameter. Pass loc to
1934 output_init_element.
1935
42056eac
JJ
19362014-04-24 Jakub Jelinek <jakub@redhat.com>
1937
1938 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
1939 atomic-clause, allow comma in between atomic-clause and
1940 seq_cst.
1941
e162a134
JJ
19422014-04-22 Jakub Jelinek <jakub@redhat.com>
1943
1944 PR c/59073
1945 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
1946 fails, don't set OM_PARALLEL_COMBINED and return NULL.
1947
2f6babac
IZ
19482014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
1949
1950 PR middle-end/60469
1951 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1952 create_tmp_var instead build_decl for creating temps.
1953 (build_array_notation_expr): Likewise.
1954 (fix_conditional_array_notations_1): Likewise.
1955 (fix_array_notation_expr): Likewise.
1956 (fix_array_notation_call_expr): Likewise.
1957
8edbfaa6
JJ
19582014-03-28 Jakub Jelinek <jakub@redhat.com>
1959
1960 PR c++/60689
1961 * c-tree.h (c_build_function_call_vec): New prototype.
1962 * c-typeck.c (build_function_call_vec): Don't call
1963 resolve_overloaded_builtin here.
1964 (c_build_function_call_vec): New wrapper function around
1965 build_function_call_vec. Call resolve_overloaded_builtin here.
1966 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
1967 Call c_build_function_call_vec instead of build_function_call_vec.
1968 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1969 * c-decl.c (finish_decl): Likewise.
1970
7485aeea
MLI
19712014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1972
1973 PR c/55383
1974 * c-typeck.c: Use correct format string in cast-qual warning
1975
b17a8b07
TS
19762014-03-07 Thomas Schwinge <thomas@codesourcery.com>
1977
1978 * c-decl.c (c_decl_attributes): Use
1979 lang_hooks.types.omp_mappable_type.
1980 * c-typeck.c (c_finish_omp_clauses): Likewise.
1981
3af9c5e9
MP
19822014-03-06 Marek Polacek <polacek@redhat.com>
1983
1984 PR c/60197
1985 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
1986 of checking tree code.
1987
1c9f5f33
PK
19882014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1989
1990 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
1991 (c_parser_parameter_declaration): Likewise.
1992
cc28fc7f
MP
19932014-02-19 Marek Polacek <polacek@redhat.com>
1994
1995 PR c/60195
1996 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
1997 Call mark_exp_read on exp.value.
1998 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
1999 TREE_ADDRESSABLE on old instead of val.
2000 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
2001
b581c05c
PK
20022014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2003
2004 * c-parser.c (c_parser_get_builtin_args): Replace calls to
2005 C_EXPR_APPEND by vec_safe_push.
2006 * c-tree.h (C_EXPR_APPEND): Remove.
2007
81e5eca8
MP
20082014-01-31 Marek Polacek <polacek@redhat.com>
2009
2010 PR c/59963
2011 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
2012 build_function_call_vec.
2013 (build_function_call): Likewise.
2014 (build_atomic_assign): Likewise.
2015 (build_function_call_vec): Add arg_loc parameter. Use it.
2016 (convert_arguments): Likewise.
2017 (convert_for_assignment): Rename rhs_loc to expr_loc.
2018 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
2019 (c_parser_objc_keywordexpr): Likewise.
2020 (c_parser_postfix_expression_after_primary): Call
2021 build_function_call_vec with expr_loc rather than op_loc.
2022 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
2023 build_function_call_vec.
2024 (c_parser_expr_list): Add locations parameter. Fill it with locations
2025 of function arguments.
2026 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
2027
68fca595
MP
20282014-01-30 Marek Polacek <polacek@redhat.com>
2029
2030 PR c/59940
2031 * c-typeck.c (build_function_call_vec): Use loc parameter.
2032 (convert_arguments): Add location parameter. Use it.
2033 (ep_convert_and_check): Likewise.
2034 (build_atomic_assign): Adjust convert_for_assignment call.
2035 (build_modify_expr): Likewise.
2036 (digest_init): Likewise.
2037 (c_finish_return): Likewise.
2038 (build_conditional_expr): Adjust ep_convert_and_check calls.
2039 (convert_for_assignment): Add rhs_loc parameter. Use it.
2040 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
2041 calls.
2042
fa337f3a
RB
20432014-01-30 Richard Biener <rguenther@suse.de>
2044
2045 PR c/59905
2046 * c-typeck.c (build_function_call_vec): Do not replace calls
2047 to a function via an incompatible type with a runtime abort.
2048
b72271b9
BI
20492014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
2050
2051 * c-parser.c (c_parser_declaration_or_fndef): Replaced
2052 flag_enable_cilkplus with flag_cilkplus.
2053 (c_parser_direct_declarator_inner): Likewise.
2054 (c_parser_attribute_any_word): Likewise.
2055 (c_parser_attributes): Likewise.
2056 (c_parser_compound_statement): Likewise.
2057 (c_parser_statement_after_labels): Likewise.
2058 (c_parser_if_statement): Likewise.
2059 (c_parser_switch_statement): Likewise.
2060 (c_parser_do_statement): Likewise.
2061 (c_parser_for_statement): Likewise.
2062 (c_parser_unary_expression): Likewise.
2063 (c_parser_postfix_expression): Likewise.
2064 (c_parser_postfix_expression_after_primary): Likewise.
2065 (c_parser_postfix_expression_after_primary): Likewise.
2066 (c_parser_omp_clause_name): Likewise.
2067 (c_finish_omp_declare_simd): Likewise.
2068 (c_parser_cilk_verify_simd): Likewise.
2069 * c-typeck.c (build_array_ref): Likewise.
2070 (build_function_call_vec): Likewise.
2071 (convert_arguments): Likewise.
2072 (build_compound_expr): Likewise.
2073 (c_finish_return): Likewise.
2074 (c_finish_if_stmt): Likewise.
2075 (c_finish_loop): Likewise.
2076 (build_binary_op): Likewise.
2077
393e8e8b
MP
20782014-01-23 Marek Polacek <polacek@redhat.com>
2079
2080 PR c/59846
2081 * c-typeck.c (parser_build_binary_op): Use location instead of
2082 input_location.
2083 (build_binary_op): Pass location to shorten_compare.
2084
f04dda30
MP
20852014-01-23 Marek Polacek <polacek@redhat.com>
2086
2087 PR c/58346
2088 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
2089 an empty aggregate.
2090
789eadcd
MP
20912014-01-23 Marek Polacek <polacek@redhat.com>
2092
2093 PR c/59871
2094 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
2095 of a comma expression.
2096 (emit_side_effect_warnings): Likewise.
2097
40f14e9f
BI
20982014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2099
2100 PR c/59825
2101 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
2102 function to use walk_tree and moved a lot of its functionality to
2103 expand_array_notations.
2104 (expand_array_notations): New function.
2105
74558dd9
BI
21062014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2107
2108 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
2109 attribute an attribute without value.
2110
652fea39
JJ
21112014-01-23 Jakub Jelinek <jakub@redhat.com>
2112
2113 PR middle-end/58809
2114 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
2115 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
2116
f34f1c87
MP
21172014-01-22 Marek Polacek <polacek@redhat.com>
2118
2119 PR c/59891
2120 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
2121 of remove_c_maybe_const_expr on op1 and op2.
2122
241f845a
JJ
21232014-01-15 Jakub Jelinek <jakub@redhat.com>
2124
2125 PR c/58943
2126 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
2127 effects, preevaluate rhs using SAVE_EXPR first.
2128
9a74f20c
BI
21292014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
2130
2131 PR c++/59631
2132 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
2133 statements with if-elseif statements.
2134
96066ce1
MP
21352014-01-06 Marek Polacek <polacek@redhat.com>
2136
2137 PR c/57773
2138 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
2139 defined bit-field types only in ISO C.
2140
23a5b65a
RS
21412014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2142
2143 Update copyright years
2144
f9030485
RS
21452014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2146
2147 * c-array-notation.c: Use the standard form for the copyright notice.
2148
41958c28
BI
21492013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
2150
2151 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
2152 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
2153 field in parser is not empty. If not-empty, call the function
2154 c_parser_finish_omp_declare_simd.
2155 (c_parser_cilk_clause_vectorlength): Modified function to be shared
2156 between SIMD-enabled functions and #pragma simd. Added new parameter.
2157 (c_parser_cilk_all_clauses): Modified the usage of the function
2158 c_parser_cilk_clause_vectorlength as mentioned above.
2159 (c_parser_cilk_simd_fn_vector_attrs): New function.
2160 (c_finish_cilk_simd_fn_tokens): Likewise.
2161 (is_cilkplus_vector_p): Likewise.
2162 (c_parser_omp_clause_name): Added checking for "vectorlength,"
2163 "nomask," and "mask" strings in clause name.
2164 (c_parser_omp_all_clauses): Added 3 new case statements:
2165 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
2166 PRAGMA_CILK_CLAUSE_NOMASK.
2167 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
2168 check for vector attribute and if so call the function
2169 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
2170 called the function c_finish_cilk_simd_fn_tokens.
2171 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
2172 parser field is non-empty. If so, parse them as you would parse
2173 the omp declare simd pragma.
2174 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
2175 Added a check when step is a parameter and flag it as error.
2176 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
2177 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
2178 pragma_omp_clause.
2179
cef0fd0e
TS
21802013-12-17 Thomas Schwinge <thomas@codesourcery.com>
2181
2182 * c-parser.c (c_parser_omp_parallel): Fix description.
2183
12893402
BI
21842013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
2185
2186 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
2187 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2188 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
2189 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
2190
296674db
JM
21912013-12-04 Joseph Myers <joseph@codesourcery.com>
2192
2193 PR c/52023
2194 * c-parser.c (c_parser_alignas_specifier): Use
2195 c_sizeof_or_alignof_type instead of c_alignof.
2196 (c_parser_alignof_expression): Likewise, with min_alignof
2197 parameter depending on alignof spelling used.
2198
edd28054
MP
21992013-12-04 Marek Polacek <polacek@redhat.com>
2200
2201 PR c/54113
2202 * c-decl.c (start_function): Don't warn for missing prototype for
2203 inline functions.
2204
da0fc454
MP
22052013-12-03 Marek Polacek <polacek@redhat.com>
2206
2207 PR c/59351
2208 * c-decl.c (build_compound_literal): Allow compound literals with
2209 empty initial value.
2210
4c2ecab0
JM
22112013-12-02 Joseph Myers <joseph@codesourcery.com>
2212
2213 PR c/58235
2214 * c-typeck.c (build_modify_expr): Diagnose assignment to
2215 expression with array type.
2216
340baef7
JM
22172013-11-29 Joseph Myers <joseph@codesourcery.com>
2218
2219 PR c/42262
2220 * c-typeck.c (process_init_element): Do not treat a string as
2221 initializing a whole array when used with a designator for an
2222 individual element.
2223
6763b9f7
JM
22242013-11-29 Joseph Myers <joseph@codesourcery.com>
2225
2226 PR c/57574
2227 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
2228 an inline function following a static declaration.
2229
e7bd1de1
JJ
22302013-11-28 Jakub Jelinek <jakub@redhat.com>
2231
2232 PR c/59310
2233 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
2234 to p_name before calling c_parser_omp_teams instead of after.
2235 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
2236 argument. Remove unused p_name variable.
2237
0136f8f0
AH
22382013-11-27 Aldy Hernandez <aldyh@redhat.com>
2239 Jakub Jelinek <jakub@redhat.com>
2240
2241 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
2242 external_scope is NULL.
2243
241b71bb
TV
22442013-11-27 Tom de Vries <tom@codesourcery.com>
2245 Marc Glisse <marc.glisse@inria.fr>
2246
2247 PR c++/59032
2248 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
2249
2fb9a547
AM
22502013-11-22 Andrew MacLeod <amacleod@redhat.com>
2251
2252 * c-typeck.c: Add required include files from gimple.h.
2253
8400e75e
DM
22542013-11-22 David Malcolm <dmalcolm@redhat.com>
2255
2256 * c-decl.c (define_label, shadow_tag_warned)
2257 (check_bitfield_type_and_width, grokdeclarator, grokparms,
2258 store_parm_decls_newstyle, store_parm_decls_oldstyle)
2259 (declspecs_add_type): Remove use of in_system_header macro.
2260 * c-parser.c (c_parser_unary_expression): Likewise.
2261 * c-typeck.c (store_init_value, process_init_element)
2262 (c_start_case): Likewise.
2263
2264 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
2265 macro.
2266
2267 * c-parser.c (c_parser_set_source_position_from_token): Remove
2268 reference to in_system_header from comment.
2269
386b1f1f
RS
22702013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2271
2272 * c-decl.c (grokdeclarator): Update comment to refer to
2273 tree_to_[su]hwi rather than tree_low_cst.
2274
ae7e9ddd
RS
22752013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2276
2277 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
2278 tree_to_uhwi throughout.
2279
9439e9a1
RS
22802013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2281
2282 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
2283 throughout.
2284
9541ffee
RS
22852013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2286
2287 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
2288 throughout.
2289
c02065fc
AH
22902013-11-15 Aldy Hernandez <aldyh@redhat.com>
2291
2292 * c-parser.c (c_parser_cilk_simd): New.
2293 (c_parser_cilk_verify_simd): New.
2294 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
2295 (c_parser_omp_for_loop): Add case for NE_EXPR.
2296 Set c_break_label for CILK_SIMD.
2297 (c_parser_cilk_clause_vectorlength): New.
2298 (c_parser_cilk_clause_linear): New.
2299 (c_parser_cilk_clause_name): New.
2300 (c_parser_cilk_all_clauses): New.
2301 * c-typeck.c (build_unary_op): Pass location argument to
2302 readonly_error.
2303 (build_modify_expr): Same.
2304 (build_asm_expr): Same.
2305 (c_finish_bc_stmt): Error on break/continue in loops.
2306
18f429e2
AM
23072013-11-14 Andrew MacLeod <amacleod@redhat.com>
2308
2309 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
2310
d8a2d370
DN
23112013-11-14 Diego Novillo <dnovillo@google.com>
2312
2313 * c-decl.c: Include print-tree.h.
2314 Include stor-layout.h.
2315 Include varasm.h.
2316 Include attribs.h.
2317 Include stringpool.h.
2318 * c-lang.c: Include fold-const.h.
2319 * c-parser.c: Include stringpool.h.
2320 Include attribs.h.
2321 Include stor-layout.h.
2322 Include varasm.h.
2323 Include trans-mem.h.
2324 * c-typeck.c: Include stor-layout.h.
2325 Include trans-mem.h.
2326 Include varasm.h.
2327 Include stmt.h.
2328
38b7bc7f
JM
23292013-11-13 Joseph Myers <joseph@codesourcery.com>
2330
2331 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
2332 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
2333 __auto_type.
2334 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
2335 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
2336 RID_AUTO_TYPE.
2337 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
2338 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
2339 (c_parser_declarator, c_parser_direct_declarator_inner)
2340 (c_parser_parameter_declaration, c_parser_type_name): All callers
2341 changed.
2342 (c_parser_declaration_or_fndef): Handle declarations with type
2343 determined from the initializer.
2344
45b0be94
AM
23452013-11-12 Andrew MacLeod <amacleod@redhat.com>
2346
18f429e2 2347 * c-typeck.c: Include gimplify.h.
45b0be94 2348
582d9b50
JM
23492013-11-12 Joseph Myers <joseph@codesourcery.com>
2350
2351 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
2352 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
2353 comment.
2354 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
2355 or _Thread_local as appropriate in diagnostics.
2356 (build_null_declspecs): Initialize ret->thread_gnu_p.
2357 (declspecs_add_scspec): Handle either __thread or _Thread_local
2358 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
2359 pedantic. Do not disallow _Thread_local extern and _Thread_local
2360 static.
2361
267bac10
JM
23622013-11-07 Joseph Myers <joseph@codesourcery.com>
2363 Andrew MacLeod <amacleod@redhat.com>
2364
2365 * c-aux-info.c (gen_type): Handle atomic qualifier.
2366 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
2367 qualifiers when compating types.
2368 (shadow_tag_warned): Handle atomic_p in declspecs.
2369 (quals_from_declspecs): Likewise.
2370 (start_decl): Use c_type_promotes_to when promoting argument
2371 types.
2372 (grokdeclarator): Handle _Atomic.
2373 (get_parm_info): Diagnose any qualifier on "void" as only
2374 parameter.
2375 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
2376 comparing types. Use c_type_promotes_to when promoting argument
2377 types.
2378 (finish_function): Use c_type_promotes_to when promoting argument
2379 types.
2380 (build_null_declspecs): Handle atomic_p in declspecs.
2381 (declspecs_add_qual): Handle RID_ATOMIC.
2382 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
2383 (c_token_starts_declspecs): Handle RID_ATOMIC.
2384 (c_parser_declspecs): Handle atomic type specifiers and
2385 qualifiers.
2386 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
2387 from types of expressions with atomic type.
2388 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
2389 (c_parser_attribute_any_word): Handle RID_ATOMIC.
2390 (c_parser_initializer, c_parser_initelt, c_parser_initval)
2391 (c_parser_statement_after_labels, c_parser_switch_statement)
2392 (c_parser_for_statement, c_parser_expr_no_commas)
2393 (c_parser_conditional_expression, c_parser_binary_expression)
2394 (c_parser_cast_expression, c_parser_unary_expression)
2395 (c_parser_postfix_expression)
2396 (c_parser_postfix_expression_after_primary, c_parser_expression):
2397 Use convert_lvalue_to_rvalue.
2398 (c_parser_expression_conv, c_parser_expr_list): Document
2399 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
2400 (c_parser_objc_synchronized_statement): Use
2401 convert_lvalue_to_rvalue.
2402 (c_parser_objc_selector): Handle RID_ATOMIC.
2403 (c_parser_objc_receiver, c_parser_array_notation): Use
2404 convert_lvalue_to_rvalue.
2405 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
2406 _Atomic (type-name).
2407 (struct c_declspecs): Add atomic_p field.
2408 (convert_lvalue_to_rvalue): Declare.
2409 * c-typeck.c (c_type_promotes_to): Promote atomic types to
2410 corresponding atomic types.
2411 (qualify_type): Don't add _Atomic qualifiers from second argument.
2412 (comp_target_types): Do not allow _Atomic mismatches.
2413 (type_lists_compatible_p): Do not remove atomic qualifiers when
2414 comparing types.
2415 (really_atomic_lvalue, convert_lvalue_to_rvalue)
2416 (build_atomic_assign): New functions.
2417 (build_unary_op): Use build_atomic_assign for atomic increment and
2418 decrement.
2419 (build_conditional_expr): Do not treat _Atomic void as a qualified
2420 version of void.
2421 (build_modify_expr): Use build_atomic_assign for atomic LHS.
2422 (find_anonymous_field_with_type, convert_to_anonymous_field)
2423 (convert_for_assignment): Do not remove atomic qualifiers when
2424 comparing types.
2425 (digest_init): Do not accept initialization of arrays of atomic
2426 elements by string constants.
2427 (build_asm_expr): Use convert_lvalue_to_rvalue.
2428 (build_binary_op): Do not treat _Atomic void as a qualified
2429 version of void.
2430
0c249d4b
DD
24312013-11-06 DJ Delorie <dj@redhat.com>
2432
2433 * c-decl.c (locate_old_decl): If a previous conflicting decl is
2434 both explicit and builtin, print the location of the explicit one.
2435
6d7f7e0a
TB
24362013-11-05 Tobias Burnus <burnus@net-b.de>
2437
2438 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
2439 c_parser_omp_distribute, c_parser_omp_teams,
2440 c_parser_omp_target, c_parser_omp_declare): Handle
2441 -fopenmp-simd.
2442
b906f4ca
MP
24432013-11-03 Marek Polacek <polacek@redhat.com>
2444
2445 * c-decl.c (grokdeclarator): Add VLA instrumentation.
2446
ee1d5a02
JJ
24472013-11-01 Jakub Jelinek <jakub@redhat.com>
2448
2449 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
2450 check_dup_generic at the end, unless remove is true.
2451 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
2452 remove = true;.
2453 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
2454
5a9785fb
JJ
24552013-10-31 Jakub Jelinek <jakub@redhat.com>
2456
2457 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
2458 with decl that is not pointer nor array.
2459
939b37da
BI
24602013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
2461
2462 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
2463 a spawning function is found.
2464 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
2465 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
2466 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2467 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
2468 case.
2469 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
2470 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
2471 expr.
2472 (c_finish_return): Added a check to reject _Cilk_spawn in return
2473 expression.
2474 (build_cilk_spawn): New function.
2475 (build_cilk_sync): Likewise.
2476 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
2477
d4af74d4
TB
24782013-10-27 Tobias Burnus <burnus@net-b.de>
2479
2480 PR other/33426
2481 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
2482 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
2483 (c_parser_statement_after_labels): Update calls.
2484
d73749df 24852013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
2486
2487 PR other/33426
2488 * c-parser.c (c_parser_pragma, c_parser_for_statement):
2489 Handle PRAGMA_IVDEP.
2490 (c_parser_statement_after_labels): Update call.
2491
f28aa681
MP
24922013-10-24 Marek Polacek <polacek@redhat.com>
2493
2494 * c-parser.c (c_parser_struct_declaration): Add a comment.
2495 (c_parser_declarator): Don't allow _Alignas here.
2496
0645c1a2
AM
24972013-10-17 Andrew MacLeod <amacleod@redhat.com>
2498
2499 * c-parser.c: Include omp-low.h.
2500 * c-typeck.c: Likewise.
2501
568a31f2
MP
25022013-10-17 Marek Polacek <polacek@redhat.com>
2503
2504 PR c/58267
2505 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
2506 Document syntax of the array-declarator.
2507 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
2508 are not permitted.
2509 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
2510 (c_parser_struct_declaration): Likewise.
2511 (c_parser_declarator): Likewise.
2512 (c_parser_direct_declarator_inner): Likewise.
2513 (c_parser_parameter_declaration): Likewise.
2514 (c_parser_type_name): Likewise.
2515
acf0174b
JJ
25162013-10-11 Jakub Jelinek <jakub@redhat.com>
2517
2518 * c-lang.h (current_omp_declare_target_attribute): New extern
2519 decl.
2520 * c-parser.c: Include c-lang.h.
2521 (struct c_parser): Change tokens to c_token *.
2522 Add tokens_buf field. Change tokens_avail type to unsigned int.
2523 (c_parser_consume_token): If parser->tokens isn't
2524 &parser->tokens_buf[0], increment parser->tokens.
2525 (c_parser_consume_pragma): Likewise.
2526 (enum pragma_context): Add pragma_struct and pragma_param.
2527 (c_parser_external_declaration): Adjust
2528 c_parser_declaration_or_fndef caller.
2529 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
2530 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
2531 Adjust recursive call.
2532 (c_parser_struct_or_union_specifier): Use pragma_struct instead
2533 of pragma_external.
2534 (c_parser_parameter_declaration): Use pragma_param instead of
2535 pragma_external.
2536 (c_parser_compound_statement_nostart, c_parser_label,
2537 c_parser_for_statement): Adjust
2538 c_parser_declaration_or_fndef callers.
2539 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
2540 it through to c_parser_conditional_expression.
2541 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
2542 pass it through to c_parser_binary_expression. Adjust recursive
2543 call.
2544 (c_parser_binary_expression): Remove prec argument, add
2545 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
2546 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
2547 binop matches it, use build2 instead of parser_build_binary_op.
2548 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
2549 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
2550 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
2551 Handle pragma_struct and pragma_param the same as pragma_external.
2552 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
2553 (c_parser_omp_variable_list): Parse array sections for
2554 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
2555 (c_parser_omp_clause_collapse): Fully fold collapse expression.
2556 (c_parser_omp_clause_reduction): Handle user defined reductions.
2557 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
2558 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
2559 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
2560 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
2561 c_parser_omp_clause_depend, c_parser_omp_clause_map,
2562 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
2563 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
2564 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
2565 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
2566 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
2567 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
2568 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
2569 (c_parser_omp_for_loop): Add CODE argument, pass it through
2570 to c_finish_omp_for. Change last argument to cclauses,
2571 and adjust uses to grab parallel clauses from the array of all
2572 the split clauses. Adjust c_parser_binary_expression,
2573 c_parser_declaration_or_fndef and c_finish_omp_for callers.
2574 (omp_split_clauses): New function.
2575 (c_parser_omp_simd): New function.
2576 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
2577 Allow the function to be called also when parsing combined constructs,
2578 and call c_parser_omp_simd when parsing for simd.
2579 (c_parser_omp_sections_scope): If section-sequence doesn't start with
2580 #pragma omp section, require exactly one structured-block instead of
2581 sequence of statements.
2582 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
2583 Allow the function to be called also when parsing combined constructs.
2584 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
2585 Allow the function to be called also when parsing combined
2586 constructs.
2587 (c_parser_omp_taskgroup, c_parser_omp_cancel,
2588 c_parser_omp_cancellation_point, c_parser_omp_distribute,
2589 c_parser_omp_teams, c_parser_omp_target_data,
2590 c_parser_omp_target_update, c_parser_omp_target,
2591 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
2592 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
2593 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
2594 (c_parser_omp_construct): Add p_name and mask vars. Handle
2595 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
2596 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
2597 and c_parser_omp_sections callers.
2598 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
2599 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
2600 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
2601 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
2602 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
2603 OMP_CLAUSE_DEPEND.
2604 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
2605 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
2606 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
2607 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
2608 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
2609 * c-typeck.c: Include tree-inline.h.
2610 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
2611 handle_omp_array_sections_1, handle_omp_array_sections,
2612 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
2613 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
2614 user defined reductions.
2615 (c_tree_equal): New function.
2616 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
2617 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
2618 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
2619 c_check_omp_declare_reduction_r): New prototypes.
2620 * c-decl.c (current_omp_declare_target_attribute): New variable.
2621 (c_decl_attributes): New function.
2622 (start_decl, start_function): Use it instead of decl_attributes.
2623 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
2624 c_omp_reduction_decl, c_omp_reduction_lookup,
2625 c_check_omp_declare_reduction_r): New functions.
2626
0a6c2227
TT
26272013-09-25 Tom Tromey <tromey@redhat.com>
2628
2629 * Make-lang.in (c/gccspec.o): Remove.
2630 (CFLAGS-c/gccspec.o): New variable.
2631 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
2632 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
2633 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
2634
f3bc55f0
TT
26352013-09-25 Tom Tromey <tromey@redhat.com>
2636
2637 * Make-lang.in (c/gccspec.o): Don't use subshell.
2638
a24d975c
MP
26392013-09-18 Marek Polacek <polacek@redhat.com>
2640
2641 PR sanitize/58443
2642 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
2643 Remove unnecessary check.
2644
ce6923c5
MP
26452013-09-18 Marek Polacek <polacek@redhat.com>
2646
2647 PR sanitizer/58411
2648 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
2649 no_sanitize_undefined attribute.
2650
a1e51df9
KT
26512013-09-13 Kai Tietz <ktietz@redhat.com>
2652
2653 PR target/57848
2654 * c-decl.c (c_builtin_function_ext_scope): Remove
2655 wrong assumption that it is never called on prexisting
2656 symbol.
2657
0af94e6f
JR
26582013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
2659
2660 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
2661
20059c8b
GDR
26622013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2663
2664 * c-objc-common.c (c_tree_printer): Tidy.
2665
de5a5fa1
MP
26662013-08-30 Marek Polacek <polacek@redhat.com>
2667
2668 * c-typeck.c (build_binary_op): Add division by zero and shift
2669 instrumentation.
2670
2531a1d9 26712013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 2672 Joseph Myers <joseph@codesourcery.com>
2531a1d9 2673
6e2bcc98 2674 PR c/35649
2531a1d9
JR
2675 * c-typeck.c (c_common_type): Prefer double_type_node over
2676 other REAL_TYPE types with the same precision.
2677 (convert_arguments): Likewise.
2678
025311c4
GDR
26792013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
2680
2681 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
2682 (c_initialize_diagnostics): Call a destructor for the early printer.
2683
da6ca2b5
GDR
26842013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2685
2686 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
2687 printer initialization.
2688
318cda85 26892013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 2690
318cda85
BI
2691 PR c/57490
2692 * c-array-notation.c (fix_conditional_array_notations_1): Added a
2693 check for truth values.
2694 (expand_array_notation_exprs): Added truth values case. Removed an
2695 unwanted else. Added for-loop to walk through subtrees in default
2696 case.
2697
b066401f
GDR
26982013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
2699
2700 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
2701
fb48aadc
JM
27022013-07-23 Joseph Myers <joseph@codesourcery.com>
2703
2704 * c-parser.c (struct c_generic_association): Fix typo.
2705
433cc7b0
TT
27062013-07-23 Tom Tromey <tromey@redhat.com>
2707 Joseph Myers <joseph@codesourcery.com>
2708
2709 * c-parser.c (struct c_generic_association): New.
2710 (c_generic_association_d): New typedef.
2711 (c_parser_generic_selection): New function.
2712 (c_parser_postfix_expression): Handle RID_GENERIC.
2713
26d40c3d
JM
27142013-07-13 Jason Merrill <jason@redhat.com>
2715
2716 PR c++/57793
2717 * c-decl.c (finish_struct): Check for too-large class.
2718
ecdbd01a 27192013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
2720
2721 PR c/57821
2722 * c-typeck.c (set_init_index): When folding, check for index overflow.
2723
1141ed3f
BI
27242013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2725
2726 * c-parser.c (c_parser_array_notation): Removed rejection of array
2727 notations in an array of function pointers.
2728
713b46fa
BI
27292013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
2730
2731 * c-array-notation.c (make_triplet_val_inv): New function.
2732 (create_cmp_incr): Likewise.
2733 (create_array_refs): Likewise.
2734 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
2735 Also modularized common parts between functions and called the function.
2736 (build_array_notation_expr): Likewise.
2737 (fix_conditional_array_notations_1): Likewise.
2738 (fix_array_notation_expr): Likewise.
2739 (fix_array_notation_call_expr): Likewise.
2740
92f20202
MP
27412013-06-18 Marek Polacek <polacek@redhat.com>
2742
2743 PR c/57630
2744 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
2745
73a23b06
BI
27462013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
2747
2748 * c-array-notation.c (build_array_notation_expr): Reject array notation
2749 mismatch between LHS and RHS even inside a call_expr. Also, removed
2750 a couple while statements that were dead code.
2751
00b8517d
BI
27522013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
2753
2754 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
2755 excessive precision expressions in function parameters. Also removed
2756 couple unwanted while statements.
2757
1509bdda
BI
27582013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2759
2760 * c-array-notation.c (expand_array_notation_exprs): Added
2761 ARRAY_NOTATION_REF case.
2762
d60f1706
BI
27632013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2764
2765 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
2766 function to c-family/array-notation-common.c.
2767 (is_cilkplus_reduce_builtin): Likewise.
2768 (find_rank): Likewise.
2769 (extract_array_notation_exprs): Likewise.
2770 (replace_array_notations): Likewise.
2771 (find_inv_trees): Likewise.
2772 (replace_inv_trees): Likewise.
2773 (contains_array_notation_expr): Likewise.
2774 (find_correct_array_notation_type): Likewise.
2775 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
2776 (struct inv_list): Moved this to c-family/array-notation-common.c.
2777 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
2778
6d6efbb3
BI
27792013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
2780
2781 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
2782 reduction functions outside the for-loop. Added a check if the fundecl
2783 is non-NULL. Finally, removed an unwanted if-statement, and made the
2784 body unconditional.
2785
25c22937
BI
27862013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2787
2788 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
2789 condition of the if-statement matches the rank of else-block and then-
2790 block when array notations are used.
2791 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
2792 expression after the entire function body is parsed.
2793 (c_parser_expr_no_commas): Delayed creating array notation expressions
2794 to the end of function parsing.
2795 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
2796 whole if-statement instead of just the condition.
2797 (expand_array_notation_exprs): Added MODIFY_EXPR case.
2798
edd25645
BI
27992013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2800
2801 PR c/57474
2802 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
2803 array to NULL_TREE if they are unused. Also added a check for the
2804 field to be NULL before its fields are used in future.
2805
065ce7f1
RO
28062013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2807
2808 PR bootstrap/57450
2809 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
2810 (build_array_notation_expr): Likewise.
2811
36536d79
BI
28122013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2813
2814 * c-typeck.c (build_array_ref): Added a check to see if array's
2815 index is greater than one. If true, then emit an error.
2816 (build_function_call_vec): Exclude error reporting and checking
2817 for builtin array-notation functions.
2818 (convert_arguments): Likewise.
2819 (c_finish_return): Added a check for array notations as a return
2820 expression. If true, then emit an error.
2821 (c_finish_loop): Added a check for array notations in a loop
2822 condition. If true then emit an error.
2823 (lvalue_p): Added a ARRAY_NOTATION_REF case.
2824 (build_binary_op): Added a check for array notation expr inside
2825 op1 and op0. If present, we call another function to find correct
2826 type.
2827 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
2828 * c-parser.c (c_parser_compound_statement): Check if array
2829 notation code is used in tree, if so, then transform them into
2830 appropriate C code.
2831 (c_parser_expr_no_commas): Check if array notation is used in LHS
2832 or RHS, if so, then build array notation expression instead of
2833 regular modify.
2834 (c_parser_postfix_expression_after_primary): Added a check for
2835 colon(s) after square braces, if so then handle it like an array
2836 notation. Also, break up array notations in unary op if found.
2837 (c_parser_direct_declarator_inner): Added a check for array
2838 notation.
2839 (c_parser_compound_statement): Added a check for array notation in
2840 a stmt. If one is present, then expand array notation expr.
2841 (c_parser_if_statement): Likewise.
2842 (c_parser_switch_statement): Added a check for array notations in
2843 a switch statement's condition. If true, then output an error.
2844 (c_parser_while_statement): Similarly, but for a while.
2845 (c_parser_do_statement): Similarly, but for a do-while.
2846 (c_parser_for_statement): Similarly, but for a for-loop.
2847 (c_parser_unary_expression): Check if array notation is used in a
2848 pre-increment or pre-decrement expression. If true, then expand
2849 them.
2850 (c_parser_array_notation): New function.
2851 * c-array-notation.c: New file.
2852 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
2853
cd192ccc
MS
28542013-05-23 Mike Stump <mikestump@comcast.net>
2855
2856 * c-typeck.c (convert_for_assignment): Handle references to memory
2857 spaces better.
2858
427b248d
JM
28592013-05-16 Jason Merrill <jason@redhat.com>
2860
2861 * Make-lang.in (cc1$(exeext)): Use link mutex.
2862
44d90fe1
PC
28632013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
2864
2865 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
2866 to simply use OPT_Wpointer_arith.
2867 (build_unary_op): Likewise.
2868
4e7d7b3d
JJ
28692013-04-03 Jakub Jelinek <jakub@redhat.com>
2870
2871 PR c/19449
2872 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
2873 argument. If set, or it temporarily for parsing of the first
2874 argument into force_folding_builtin_constant_p.
2875 (c_parser_postfix_expression): Adjust callers.
2876
839b422f
RB
28772013-03-21 Richard Biener <rguenther@suse.de>
2878
2879 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
2880 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
2881
2ee028f1
MP
28822013-02-12 Marek Polacek <polacek@redhat.com>
2883
2884 PR c/44938
2885 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
2886 origtypes to NULL.
2887
8824edff
JJ
28882013-01-24 Jakub Jelinek <jakub@redhat.com>
2889
2890 PR c/56078
2891 * c-typeck.c (set_nonincremental_init_from_string): If
2892 constructor_max_index is NULL, treat it as if tree_int_cst_lt
2893 returned false.
2894 (process_init_element): Likewise.
2895
eadd3d0d
JJ
28962012-12-20 Jakub Jelinek <jakub@redhat.com>
2897
2898 PR c++/55619
2899 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
2900 argument, don't call default_function_array_conversion
2901 nor c_fully_fold here.
2902 (c_parser_asm_statement): Adjust callers.
2903 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
2904 and outputs here, and call default_function_array_conversion
2905 on inputs that don't need to be addressable.
2906
f8a93a2e
JJ
29072012-12-18 Jakub Jelinek <jakub@redhat.com>
2908
2909 PR c/39464
2910 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
2911 warning require that both c_common_unsigned_type as well as
2912 c_common_signed_type is the same for both mvl and mvr types.
2913
9771b263
DN
29142012-11-16 Diego Novillo <dnovillo@google.com>
2915
2916 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
2917
2918 * c-common.c: Use new vec API in vec.h.
2919 * c-common.h: Likewise.
2920 * c-gimplify.c: Likewise.
2921 * c-pragma.c: Likewise.
2922 * c-pretty-print.c: Likewise.
2923 * c-pretty-print.h: Likewise.
2924 * c-semantics.c: Likewise.
2925 * c-decl.c: Likewise.
2926 * c-parser.c: Likewise.
2927 * c-tree.h: Likewise.
2928 * c-typeck.c: Likewise.
2929
880661a4
JW
29302012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
2931
2932 PR c++/54930
2933 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
2934
077d1abe
MLI
29352012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2936
2937 PR c/53066
2938 * c-decl.c (warn_if_shadowing): Do not warn if a variable
2939 shadows a function, unless the variable is a function or a
2940 pointer-to-function.
2941
3a785c97
JJ
29422012-10-12 Jakub Jelinek <jakub@redhat.com>
2943
2944 PR c/54381
2945 * c-parser.c (struct c_tree_loc_pair): Removed.
2946 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
2947 add location_t * and tree * arguments, fill in array of 3
2948 sizeof_arg trees and corresponding locs.
2949 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
2950 c_parser_expr_list callers.
2951 (c_parser_postfix_expression_after_primary): Likewise. Pass
2952 array of 3 sizeof_arg trees and locs (corresponding to first
2953 3 arguments) to sizeof_pointer_memaccess_warning.
2954
703c8606
LC
29552012-10-09 Lawrence Crowl <crowl@google.com>
2956
2957 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
2958 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
2959 hash table.
2960
5d9de0d0
PC
29612012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
2962
2963 PR c++/54194
2964 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
2965 call.
2966
a212e43f
MG
29672012-10-09 Marc Glisse <marc.glisse@inria.fr>
2968
2969 PR c++/54427
2970 * c-typeck.c: Include c-common.h.
2971 (enum stv_conv): Moved to c-common.h.
2972 (scalar_to_vector): Moved to c-common.c.
2973 (build_binary_op): Adapt to scalar_to_vector's new prototype.
2974 * Make-lang.in: c-typeck.c depends on c-common.h.
2975
3b78de56
AC
29762012-10-04 Arnaud Charlet <charlet@adacore.com>
2977
2978 * c-decl.c (c_write_global_declarations): Fix handling of
2979 -fdump-ada-spec*.
2980
78c60e3d
SS
29812012-09-30 Sharad Singhai <singhai@google.com>
2982
2983 * c-decl.c (c_write_global_declarations): Use a different method
2984 to determine if the dump has ben initialized.
2985
9f33203d
JM
29862012-09-14 Joseph Myers <joseph@codesourcery.com>
2987
2988 PR c/54552
2989 * c-typeck.c (c_cast_expr): When casting to a type requiring
2990 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
2991 c_fully_fold first.
2992
a27d595d
JM
29932012-09-14 Joseph Myers <joseph@codesourcery.com>
2994
2995 PR c/54103
2996 * c-typeck.c (build_unary_op): Pass original argument of
2997 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
2998 any C_MAYBE_CONST_EXPR, if it has integer operands.
2999 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
3000 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
3001 to c_objc_common_truthvalue_conversion, then remove any
3002 C_MAYBE_CONST_EXPR, if they have integer operands. Use
3003 c_objc_common_truthvalue_conversion not
3004 c_common_truthvalue_conversion.
3005 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
3006 call note_integer_operands for arguments with integer operands
3007 that are not integer constants.
3008
9feb29df
JJ
30092012-09-13 Jakub Jelinek <jakub@redhat.com>
3010
3011 PR c/54559
3012 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
3013 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
3014
d409320c
JJ
30152012-08-31 Jakub Jelinek <jakub@redhat.com>
3016
3017 PR c/54428
3018 * c-convert.c (convert): Don't call fold_convert_loc if
3019 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
3020 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
3021 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
3022
6265d07c
JJ
30232012-08-24 Jakub Jelinek <jakub@redhat.com>
3024
3025 PR c/54355
3026 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
3027 for nested and empty_ok arguments in the call to
3028 c_parser_declaration_or_fndef.
3029
1a4049e7
JJ
30302012-08-17 Jakub Jelinek <jakub@redhat.com>
3031
3032 * c-tree.h (c_last_sizeof_arg): Declare.
3033 * c-parser.c (struct c_tree_loc_pair): New type.
3034 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
3035 non-NULL.
3036 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
3037 (c_parser_postfix_expression_after_primary): Likewise. Call
3038 sizeof_pointer_memaccess_warning if needed.
3039 (sizeof_ptr_memacc_comptypes): New function.
3040 * c-typeck.c (c_last_sizeof_arg): New global variable.
3041 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
3042
0229aee9
UB
30432012-07-24 Uros Bizjak <ubizjak@gmail.com>
3044
3045 * c-lang.h (lang_decl): Add variable_size GTY option.
3046
7ee2468b
SB
30472012-07-16 Steven Bosscher <steven@gcc.gnu.org>
3048
3049 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
3050 * Make-lang.in: Fix dependencies.
3051
d4a10d0a
SB
30522012-06-29 Steven Bosscher <steven@gcc.gnu.org>
3053
3054 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
3055 and add language Makefile hooks.
3056 * config-lang.in: New file.
3057 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
3058 add the required "normal" config-lang.in rules.
3059 * c-lang.h: Moved from gcc/ to here.
3060 * c-tree.h: Likewise.
3061 * c-objc-common.c: Likewise.
3062 * c-objc-common.h: Likewise.
3063 * c-typeck.c: Likewise.
3064 * c-convert.c: Likewise.
3065 * c-lang.c: Likewise.
3066 * c-aux-info.c: Likewise.
3067 * c-errors.c: Likewise.
3068 * gccspec.c: Likewise.
3069 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
3070 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
3071\f
5624e564 3072Copyright (C) 2012-2015 Free Software Foundation, Inc.
d4a10d0a
SB
3073
3074Copying and distribution of this file, with or without modification,
3075are permitted in any medium without royalty provided the copyright
3076notice and this notice are preserved.