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