]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
[AArch64] Fix gcc.target/aarch64/vclz.c
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
1d899da2
TS
12015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2
3 * c-parser.c (c_parser_omp_declare_target): Adjust.
4
e4606348
JJ
52015-11-14 Jakub Jelinek <jakub@redhat.com>
6
7 * c-typeck.c (c_finish_omp_clauses): Don't mark
8 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
9
3e636daf
MP
102015-11-14 Marek Polacek <polacek@redhat.com>
11
12 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
13 * c-typeck.c: Likewise.
14
ebedc9a3
DM
152015-11-13 David Malcolm <dmalcolm@redhat.com>
16
17 * c-decl.c (warn_defaults_to): Pass line_table to
18 rich_location ctor.
19 * c-errors.c (pedwarn_c99): Likewise.
20 (pedwarn_c90): Likewise.
21 * c-parser.c (set_c_expr_source_range): New functions.
22 (c_token::get_range): New method.
23 (c_token::get_finish): New method.
24 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
25 based on the range from the start of the LHS to the end of the
26 RHS.
27 (c_parser_conditional_expression): Likewise, based on the range
28 from the start of the cond.value to the end of exp2.value.
29 (c_parser_binary_expression): Call set_c_expr_source_range on
30 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
31 (c_parser_cast_expression): Call set_c_expr_source_range on ret
32 based on the cast_loc through to the end of the expr.
33 (c_parser_unary_expression): Likewise, based on the
34 op_loc through to the end of op.
35 (c_parser_sizeof_expression) Likewise, based on the start of the
36 sizeof token through to either the closing paren or the end of
37 expr.
38 (c_parser_postfix_expression): Likewise, using the token range,
39 or from the open paren through to the close paren for
40 parenthesized expressions.
41 (c_parser_postfix_expression_after_primary): Likewise, for
42 various kinds of expression.
43 * c-tree.h (struct c_expr): Add field "src_range".
44 (c_expr::get_start): New method.
45 (c_expr::get_finish): New method.
46 (set_c_expr_source_range): New decls.
47 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
48 on ret for prefix unary ops.
49 (parser_build_binary_op): Likewise, running from the start of
50 arg1.value through to the end of arg2.value.
51
ec8b536f
MP
522015-11-13 Marek Polacek <polacek@redhat.com>
53
54 PR c/68320
55 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
56
277fe616
DM
572015-11-13 David Malcolm <dmalcolm@redhat.com>
58
59 * c-typeck.c: Include spellcheck.h.
60 (lookup_field_fuzzy_find_candidates): New function.
61 (lookup_field_fuzzy): New function.
62 (build_component_ref): If the field was not found, try using
63 lookup_field_fuzzy and potentially offer a suggestion.
64
6e232ba4
JN
652015-11-12 James Norris <jnorris@codesourcery.com>
66 Joseph Myers <joseph@codesourcery.com>
67
68 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
69 (c_parser_omp_clause_name): Handle 'device_resident' clause.
70 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
71 and PRAGMA_OMP_CLAUSE_LINK.
72 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
73 and PRAGMA_OACC_CLAUSE_LINK.
74 (OACC_DECLARE_CLAUSE_MASK): New definition.
75 (c_parser_oacc_declare): New function.
76
9be4f715
MP
772015-11-12 Marek Polacek <polacek@redhat.com>
78
79 PR c/67784
80 * c-parser.c (c_parser_for_statement): Reclassify the token in
81 a correct scope.
82
e78bede6
MP
832015-11-11 Marek Polacek <polacek@redhat.com>
84
85 PR c/68107
86 PR c++/68266
87 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
88 checking the size of an array.
89
69f293c9
AM
902015-11-11 Andrew MacLeod <amacleod@redhat.com>
91
92 * c-array-notation.c: Remove unused header files.
93 * c-aux-info.c: Likewise.
94 * c-convert.c: Likewise.
95 * c-decl.c: Likewise.
96 * c-errors.c: Likewise.
97 * c-lang.c: Likewise.
98 * c-objc-common.c: Likewise.
99 * c-parser.c: Likewise.
100 * c-typeck.c: Likewise.
101 * gccspec.c: Likewise.
102
3a40d81d
NS
1032015-11-09 Thomas Schwinge <thomas@codesourcery.com>
104 Cesar Philippidis <cesar@codesourcery.com>
105 James Norris <jnorris@codesourcery.com>
106 Julian Brown <julian@codesourcery.com>
107 Nathan Sidwell <nathan@codesourcery.com>
108
109 c/
110 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
111 routine arg.
112 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
113 (c_parser_pragma): Parse 'acc routine'.
114 (OACC_ROUTINE_CLAUSE_MARK): Define.
115 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
116
fc402eec
AA
1172015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
118
119 PR debug/67192
120 * c-typeck.c (c_finish_loop): For unconditional loops, set the
121 location of the backward-goto to the start of the loop body.
122
f6b0b3db
AA
1232015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
124
125 PR debug/67192
126 * c-parser.c (c_parser_while_statement): Finish the loop before
127 parsing ahead for misleading indentation.
128 (c_parser_for_statement): Likewise.
129
ee45a32d
EB
1302015-11-08 Eric Botcazou <ebotcazou@adacore.com>
131
132 * c-decl.c (finish_struct): If the structure has reverse storage
133 order, rewrite the type of array fields with scalar component. Call
134 maybe_apply_pragma_scalar_storage_order on entry.
135 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
136 errors on bit-fields and reverse SSO here and not...
137 (c_mark_addressable): ...here.
138 (output_init_element): Adjust call to initializer_constant_valid_p.
139 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
140
8a645150
DM
1412015-11-06 David Malcolm <dmalcolm@redhat.com>
142
143 * c-decl.c (warn_defaults_to): Update for change in signature
144 of diagnostic_set_info.
145 * c-errors.c (pedwarn_c99): Likewise.
146 (pedwarn_c90): Likewise.
147 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
148 for textinfo::set_location.
149
7a5e4956
CP
1502015-11-05 Cesar Philippidis <cesar@codesourcery.com>
151 Thomas Schwinge <thomas@codesourcery.com>
152 James Norris <jnorris@codesourcery.com>
153
154 * c-parser.c (c_parser_omp_clause_name): Add support for
155 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
156 (c_parser_omp_clause_default): Add is_oacc argument. Handle
157 default(none) in OpenACC.
158 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
159 arguments.
160 (c_parser_oacc_clause_tile): New function.
161 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
162 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
163 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
164 TILE}.
165 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
166 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
167 FIRSTPRIVATE}.
168 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
169 (c_parser_oacc_update): Update the error message for missing clauses.
170 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
171 and OMP_CLAUSE_INDEPENDENT.
172
bfcfbfa0
MP
1732015-11-05 Marek Polacek <polacek@redhat.com>
174
175 PR c/68090
176 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
177 deal with pre-evaluation on invalid types.
178
e01d41e5
JJ
1792015-11-05 Jakub Jelinek <jakub@redhat.com>
180 Ilya Verbin <ilya.verbin@intel.com>
181
182 * c-parser.c: Include context.h and gimple-expr.h.
183 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
184 monotonic together with nonmonotonic.
185 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
186 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
187 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
188 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
189 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
190 expressions on combined target teams before the target.
191 (c_parser_omp_declare_target): If decl has "omp declare target" or
192 "omp declare target link" attribute, and cgraph or varpool node already
193 exists, then set corresponding flags. Call c_finish_omp_clauses
194 in the parenthesized extended-list syntax case.
195 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
196 declare target.
197 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
198 on OMP_CLAUSE_REDUCTION array sections.
199 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
200 into the constant offset, or for variable low-bound using
201 POINTER_PLUS_EXPR. For structure element based array sections use
202 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
203 (c_finish_omp_clauses): Drop generic_field_head, structure
204 elements are now always mapped even as array section bases,
205 diagnose same var in data sharing and mapping clauses. Diagnose if
206 linear step on declare simd is neither a constant nor a uniform
207 parameter. Look through POINTER_PLUS_EXPR for array section
208 reductions. Diagnose the same var or function appearing multiple
209 times on the same directive. Fix up wording for the to clause if t
210 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
211 modifier on kinds other than dynamic or guided or nonmonotonic
212 modifier together with ordered clause.
213
4bf9e5a8
TS
2142015-11-03 Thomas Schwinge <thomas@codesourcery.com>
215 Chung-Lin Tang <cltang@codesourcery.com>
216
217 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
218
2adfab87
AM
2192015-10-29 Andrew MacLeod <amacleod@redhat.com>
220
221 * c-array-notation.c: Reorder #include's and remove duplicates.
222 * c-aux-info.c: Likewise.
223 * c-convert.c: Likewise.
224 * c-decl.c: Likewise.
225 * c-errors.c: Likewise.
226 * c-lang.c: Likewise.
227 * c-objc-common.c: Likewise.
228 * c-parser.c: Likewise.
229 * c-typeck.c: Likewise.
230
e922069e
JW
2312015-10-26 Jim Wilson <jim.wilson@linaro.org>
232
233 PR debug/66068
234 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
235 after calling build_qualified_type.
236
765dd391
CP
2372015-10-27 Cesar Philippidis <cesar@codesourcery.com>
238 Thomas Schwinge <thomas@codesourcery.com>
239 James Norris <jnorris@codesourcery.com>
240 Joseph Myers <joseph@codesourcery.com>
241 Julian Brown <julian@codesourcery.com>
242 Bernd Schmidt <bschmidt@redhat.com>
243
244 * c-parser.c (c_parser_oacc_shape_clause): New.
245 (c_parser_oacc_simple_clause): New.
246 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
247 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
248
88bae6f4
TS
2492015-10-27 Thomas Schwinge <thomas@codesourcery.com>
250 James Norris <jnorris@codesourcery.com>
251 Cesar Philippidis <cesar@codesourcery.com>
252
253 PR c/64765
254 PR c/64880
255 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
256 parameters, and handle these. Adjust all users.
257 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
258 into...
259 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
260 all users.
261 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
262 declare functions.
263 (c_finish_omp_construct): Declare function.
264 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
265 Merge functions into...
266 (c_finish_omp_construct): ... this new function.
267
a8fc2579
RB
2682015-10-22 Richard Biener <rguenther@suse.de>
269
270 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
271 before folding a MINUS_EXPR.
272
e9122ef6
MP
2732015-10-21 Marek Polacek <polacek@redhat.com>
274
275 PR c/68024
276 * c-decl.c (start_function): Warn about vararg functions without
277 a prototype.
278
9f47c7e5
IE
2792015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
280
281 * c-typeck.c (build_conditional_expr): Use boolean vector
282 type for vector comparison.
283 (build_vec_cmp): New.
284 (build_binary_op): Use build_vec_cmp for comparison.
285
fa60eeb9
MP
2862015-10-20 Marek Polacek <polacek@redhat.com>
287
288 * c-parser.c (is_cilkplus_vector_p): Don't define here.
289
2c7020eb
MP
2902015-10-20 Marek Polacek <polacek@redhat.com>
291
292 PR c/67964
293 * c-parser.c (c_parser_attributes): Break out of the loop if the
294 token after an attribute isn't a comma.
295
d9a6bd32
JJ
2962015-10-13 Jakub Jelinek <jakub@redhat.com>
297 Aldy Hernandez <aldyh@redhat.com>
298
299 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
300 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
301 (c_parser_omp_variable_list): Handle structure elements for
302 map, to and from clauses. Handle array sections in reduction
303 clause. Formatting fixes.
304 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
305 if clause modifiers.
306 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
307 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
308 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
309 c_parser_omp_clause_is_device_ptr): New functions.
310 (c_parser_omp_clause_ordered): Parse optional parameter.
311 (c_parser_omp_clause_reduction): Handle array reductions.
312 (c_parser_omp_clause_schedule): Parse optional simd modifier.
313 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
314 functions.
315 (c_parser_omp_clause_linear): Parse linear clause modifiers.
316 (c_parser_omp_clause_depend_sink): New function.
317 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
318 (c_parser_omp_clause_map): Parse release/delete map kinds and
319 optional always modifier.
320 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
321 and c_finish_omp_clauses callers.
322 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
323 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
324 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
325 (OMP_CRITICAL_CLAUSE_MASK): Define.
326 (c_parser_omp_critical): Parse critical clauses.
327 (c_parser_omp_for_loop): Handle doacross loops, adjust
328 c_finish_omp_for and c_finish_omp_clauses callers.
329 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
330 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
331 (OMP_FOR_CLAUSE_MASK): Add linear clause.
332 (c_parser_omp_for): Disallow ordered clause when combined with
333 distribute. Disallow linear clause when combined with distribute
334 and not combined with simd.
335 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
336 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
337 parse clauses and if depend clause is found, don't parse a body.
338 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
339 Allow target parallel without for after it.
340 (OMP_TASK_CLAUSE_MASK): Add priority clause.
341 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
342 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
343 invalid kinds.
344 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
345 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
346 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
347 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
348 functions.
349 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
350 defaultmap and is_device_ptr clauses.
351 (c_parser_omp_target): Parse target parallel and target simd. Set
352 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
353 and target exit data. Diagnose invalid map kinds.
354 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
355 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
356 construct.
357 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
358 &omp_priv.
359 (OMP_TASKLOOP_CLAUSE_MASK): Define.
360 (c_parser_omp_taskloop): New function.
361 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
362 handle PRAGMA_OMP_TASKLOOP.
363 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
364 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
365 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
366 Add IS_OMP argument, handle structure element bases, diagnose
367 bitfields, pass IS_OMP recursively, diagnose known zero length
368 array sections in depend clauses, handle array sections in reduction
369 clause, diagnose negative length even for pointers.
370 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
371 types, pass IS_OMP down to handle_omp_array_sections_1, handle
372 array sections in reduction clause, set
373 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
374 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
375 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
376 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
377
21ba0cea
MP
3782015-10-06 Marek Polacek <polacek@redhat.com>
379
380 * c-parser.c (c_parser_statement_after_labels): Use
381 protected_set_expr_location.
382 (c_parser_omp_clause_num_gangs): Likewise.
383 (c_parser_omp_clause_num_threads): Likewise.
384 (c_parser_omp_clause_num_workers): Likewise.
385 (c_parser_omp_clause_vector_length): Likewise.
386 (c_parser_omp_clause_num_teams): Likewise.
387 (c_parser_omp_clause_thread_limit): Likewise.
388 * c-typeck.c (build_c_cast): Likewise.
389 (c_cast_expr): Likewise.
390
624d31fe
RS
3912015-10-05 Richard Sandiford <richard.sandiford@arm.com>
392
393 * c-typeck.c (c_tree_equal): Use real_equal instead of
394 REAL_VALUES_EQUAL.
395
b8fd7909
JM
3962015-10-04 Jason Merrill <jason@redhat.com>
397
398 * c-parser.c (c_lex_one_token): Handle @synchronized.
399 * c-decl.c (match_builtin_function_types): A declaration of a built-in
400 can change whether the function is transaction_safe.
401
1c7485af
MP
4022015-10-02 Marek Polacek <polacek@redhat.com>
403
404 PR c/67730
405 * c-typeck.c (convert_for_assignment): Use the expansion point
406 location throughout.
407
3e3b8d63
MP
4082015-10-02 Marek Polacek <polacek@redhat.com>
409
410 PR c/64249
411 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
412 and pass it down to c_parser_if_statement.
413 (c_parser_else_body): Add CHAIN parameter and pass it down to
414 c_parser_statement_after_labels.
415 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
416 duplicated if-else-if conditions.
417
aabef2de
MP
4182015-10-01 Marek Polacek <polacek@redhat.com>
419
420 * c-typeck.c (convert_for_assignment): Improve commentary.
421
de8ddd5f
MP
4222015-09-30 Marek Polacek <polacek@redhat.com>
423
424 PR c/67730
425 * c-typeck.c (c_finish_return): Use the expansion point location for
426 certain "return with value" warnings.
427
c4914de6
MLI
4282015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
429
430 * c-parser.c (pragma_lex): Add loc argument.
431
0e36f5c7
MP
4322015-09-15 Marek Polacek <polacek@redhat.com>
433
434 PR c/67580
435 * c-decl.c (tag_exists_p): New function.
436 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
437 struct/union/enum keywords are missing.
438 * c-tree.h (tag_exists_p): Declare.
439
2f3bb934
MP
4402015-09-15 Marek Polacek <polacek@redhat.com>
441
442 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
443 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
444 Return NULL_TREE instead of 0.
445 (lookup_name): Return NULL_TREE instead of 0.
446 (lookup_name_in_scope): Likewise.
447 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
448 (parser_xref_tag): Use false instead of 0.
449 (start_struct): Use true instead of 1.
450 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
451
aa256c4a
MP
4522015-09-14 Marek Polacek <polacek@redhat.com>
453
454 * c-typeck.c (set_nonincremental_init_from_string): Use
455 HOST_WIDE_INT_M1U when shifting a negative value.
456
dbb68221
MW
4572015-09-09 Mark Wielaard <mjw@redhat.com>
458
459 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
460 parm against NULL.
461
a8a098ac
JJ
4622015-09-10 Jakub Jelinek <jakub@redhat.com>
463
464 PR c/67502
465 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
466 into OMP_FOR_PRE_BODY rather than before the loop.
467
f4b189d5
JJ
4682015-09-09 Jakub Jelinek <jakub@redhat.com>
469
0bb99c11
JJ
470 PR c/67501
471 * c-parser.c (c_parser_oacc_all_clauses,
472 c_parser_omp_all_clauses): Remove invalid clause from
473 list of clauses even if parser->error is set.
474
fce5e5e3
JJ
475 PR c/67500
476 * c-parser.c (c_parser_omp_clause_aligned,
477 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
478 test for errors.
479 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
480 error_mark_node.
481
f4b189d5
JJ
482 PR c/67495
483 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
484 instead of c_parser_unary_expression. If the result is !lvalue_p,
485 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
486
b2aaf235
MP
4872015-09-04 Marek Polacek <polacek@redhat.com>
488
489 PR sanitizer/67279
490 * c-typeck.c (build_binary_op): Don't instrument static initializers.
491
1807ffc1
MS
4922015-09-03 Martin Sebor <msebor@redhat.com>
493
494 PR c/66516
8b652e65
JJ
495 * c-typeck.c (convert_arguments, parser_build_unary_op,
496 build_conditional_expr, c_cast_expr, convert_for_assignment,
497 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
498 reject_gcc_builtin.
499 (c_decl_implicit): Define.
500
d04ff417
MP
5012015-09-02 Marek Polacek <polacek@redhat.com>
502
503 PR c/67432
504 * c-parser.c (c_parser_enum_specifier): Give a better error for
505 an empty enum.
506
a79683d5
TS
5072015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
508
509 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
510
191a6b94
MP
5112015-08-12 Marek Polacek <polacek@redhat.com>
512
513 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
514 LOC to it.
515
420a9d9b
MP
5162015-08-03 Marek Polacek <polacek@redhat.com>
517
518 PR c/67088
519 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
520 Use it.
521 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
522
992118a1
PP
5232015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
524
525 * c-parser.c (c_parser_if_body): Take token_indent_info
526 argument. Call warn_for_misleading_indentation even when the
527 body is a semicolon. Extract token_indent_infos corresponding
528 to the guard, body and next tokens. Adjust call to
529 warn_for_misleading_indentation accordingly.
530 (c_parser_else_body): Likewise.
531 (c_parser_if_statement): Likewise.
532 (c_parser_while_statement): Likewise.
533 (c_parser_for_statement): Likewise.
534
46308474
LFSM
5352015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
536 Manuel López-Ibáñez <manu@gcc.gnu.org>
537
538 * c-decl.c (get_parm_info): Remove static var. Update warning
539 message.
540
05b28fd6
MP
5412015-07-27 Marek Polacek <polacek@redhat.com>
542
543 PR c++/66555
544 PR c/54979
545 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
546
451b5e48
MP
5472015-07-20 Marek Polacek <polacek@redhat.com>
548
549 PR c++/55095
550 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
551 (build_binary_op): Warn about left shift overflows.
552
1916bcb5
AM
5532015-07-09 Andrew MacLeod <amacleod@redhat.com>
554
555 * c-array-notation.c: Adjust includes for flags.h changes.
556 * c-objc-common.c: Likewise.
557
c7131fb2
AM
5582015-07-07 Andrew MacLeod <amacleod@redhat.com>
559
560 * c-array-notation.c: Adjust includes.
561 * c-aux-info.c: Likewise.
562 * c-convert.c: Likewise.
563 * c-decl.c: Likewise.
564 * c-errors.c: Likewise.
565 * c-lang.c: Likewise.
566 * c-objc-common.c: Likewise.
567 * c-parser.c: Likewise.
568 * c-typeck.c: Likewise.
569
da2e71c9
MLI
5702015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
571
572 PR fortran/66605
573 * c-decl.c (finish_function): Call do_warn_unused_parameter.
574
b155cfd9
MP
5752015-06-29 Marek Polacek <polacek@redhat.com>
576
577 PR c/66322
578 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
579 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
580 about -Wswitch-bool here.
581 (do_case): Update c_add_case_label call.
582 (c_finish_case): Update c_do_switch_warnings call.
583
31521951
MP
5842015-06-27 Marek Polacek <polacek@redhat.com>
585
586 * c-typeck.c: Use VECTOR_TYPE_P throughout.
587
22d03525
MP
5882015-06-26 Marek Polacek <polacek@redhat.com>
589
590 * c-array-notation.c (fix_builtin_array_notation_fn): Use
591 INDIRECT_REF_P.
592 * c-typeck.c (array_to_pointer_conversion): Likewise.
593 (build_unary_op): Likewise.
594 (c_finish_return): Likewise.
595
f0889939
AM
5962015-06-25 Andrew MacLeod <amacleod@redhat.com>
597
598 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
599 * c-parser.c: Likewise.
600
8d67ee55
RS
6012015-06-25 Richard Sandiford <richard.sandiford@arm.com>
602
603 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
604 instead of pointer_hash.
605 (detect_field_duplicates): Likewise.
606
0ae9bd27
MP
6072015-06-25 Marek Polacek <polacek@redhat.com>
608
609 * c-array-notation.c: Use VAR_P throughout.
610 * c-decl.c: Likewise.
611 * c-objc-common.c: Likewise.
612 * c-parser.c: Likewise.
613 * c-typeck.c: Likewise.
614
62f9079a
MP
6152015-06-25 Marek Polacek <polacek@redhat.com>
616
617 * c-decl.c: Use is_global_var throughout.
618 * c-parser.c: Likewise.
619 * c-typeck.c: Likewise.
620
abb226c9
AM
6212015-06-17 Andrew MacLeod <amacleod@redhat.com>
622
623 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
624 * c-aux-info.c: Likewise.
625 * c-convert.c: Likewise.
626 * c-decl.c: Likewise.
627 * c-errors.c: Likewise.
628 * c-lang.c: Likewise.
629 * c-objc-common.c: Likewise.
630 * c-parser.c: Likewise.
631 * c-typeck.c: Likewise.
632
8cbababc
JH
6332015-06-11 Jan Hubicka <hubicka@ucw.cz>
634
635 PR middle-end/66325
636 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
637 variants.
638
a0349665
PMR
6392015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
640
641 * c-decl.c (pop_scope): Register the main translation unit
642 through the new debug hook.
643
13fdf2e2
AM
6442015-06-08 Andrew MacLeod <amacleod@redhat.com>
645
646 * c-array-notation.c : Adjust include files.
647 * c-aux-info.c : Likewise.
648 * c-convert.c : Likewise.
649 * c-decl.c : Likewise.
650 * c-errors.c : Likewise.
651 * c-lang.c : Likewise.
652 * c-lang.h : Likewise.
653 * c-objc-common.c : Likewise.
654 * c-parser.c : Likewise.
655 * c-typeck.c : Likewise.
656
d7438551
AH
6572015-06-05 Aldy Hernandez <aldyh@redhat.com>
658
659 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
660 immediately clobber it.
661 (c_write_global_declarations_1): Remove call to
662 check_global_declaration_1.
663 (c_write_global_declarations_2): Remove.
664 (c_write_final_cleanups): Rename from c_write_global_declarations.
665 Remove call to finalize_compilation_unit.
666 Remove calls to debugging hooks.
667 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
668 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
669 * c-tree.h: Remove c_write_global_declarations.
670
ecb9f223
AM
6712015-06-04 Andrew MacLeod <amacleod@redhat.com>
672
673 * c-array-notation.c: Adjust includes for restructured coretypes.h.
674 * c-aux-info.c: Likewise.
675 * c-convert.c: Likewise.
676 * c-decl.c: Likewise.
677 * c-errors.c: Likewise.
678 * c-lang.c: Likewise.
679 * c-objc-common.c: Likewise.
680 * c-parser.c: Likewise.
681 * c-typeck.c: Likewise.
682
9482b620
MP
6832015-06-04 Marek Polacek <polacek@redhat.com>
684
685 PR c/66341
686 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
687 it is a lvalue.
688
bc51ace3
PK
6892015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
690
691 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
692 Warn for empty struct.
693 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
694
ea5b45b6
AT
6952015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
696
697 * c-decl.c (start_function): Call plugin before parsing.
698 (finish_function): Call plugin after parsing.
699
c2d47482
PK
7002015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
701
702 PR c/49551
703 * c-decl.c (merge_decls): Merge DECL_COMMON.
704
a95492ab
JW
7052015-05-22 Jim Wilson <jim.wilson@linaro.org>
706
707 * Make-lang.in (check_gcc_pallelize): Define.
708
fd5c817a
MP
7092015-05-22 Marek Polacek <polacek@redhat.com>
710
711 PR c/47043
712 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
713 attributes.
714
c7b70a3c
MP
7152015-05-21 Marek Polacek <polacek@redhat.com>
716
717 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
718 DECL_BUILT_IN.
719
21b634ae
MP
7202015-05-20 Marek Polacek <polacek@redhat.com>
721
722 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
723 * c-typeck.c: Likewise.
724
296a8c2f
MP
7252015-05-19 Marek Polacek <polacek@redhat.com>
726
727 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
728
41b37d5e
JJ
7292015-05-19 Jakub Jelinek <jakub@redhat.com>
730
731 PR middle-end/66199
732 * c-parser.c (c_parser_omp_for_loop): Don't add
733 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
734 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
735 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
736 constructs.
737
fab27f52
MM
7382015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
739
740 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 741 swaps.
fab27f52 742
40de31cf
MLI
7432015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
744
745 PR fortran/44054
746 * c-objc-common.c (c_tree_printer): Replace locus pointer with
747 accessor function.
748
3aa3c9fc
MP
7492015-05-14 Marek Polacek <polacek@redhat.com>
750
751 PR c/66066
752 PR c/66127
753 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
754 rather than with 0.
755
c3388e62
DM
7562015-05-12 David Malcolm <dmalcolm@redhat.com>
757
758 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
759 to add a call to warn_for_misleading_indentation.
760 (c_parser_else_body): Likewise, adding param "else_loc".
761 (c_parser_if_statement): Check for misleading indentation.
762 (c_parser_while_statement): Likewise.
763 (c_parser_for_statement): Likewise.
764
755e528f
MP
7652015-05-08 Marek Polacek <polacek@redhat.com>
766
767 PR c/64918
768 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
769 (output_init_element): Likewise.
770
0173bd2a
MP
7712015-05-07 Marek Polacek <polacek@redhat.com>
772
773 PR c/65179
774 * c-typeck.c (build_binary_op): Warn when left shifting a negative
775 value.
776
9babc352
MP
7772015-04-30 Marek Polacek <polacek@redhat.com>
778
779 * c-typeck.c (set_init_label): Call error_at instead of error and
780 pass LOC to it.
781
ac9f18db
MP
782 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
783 the type of a decl.
784
ec3fba51
MP
785 * c-typeck.c (c_build_va_arg): Clarify the error message.
786
b811915d
TS
7872015-04-29 Thomas Schwinge <thomas@codesourcery.com>
788
789 * c-parser.c (c_parser_oacc_enter_exit_data): Use
790 OMP_STANDALONE_CLAUSES.
791
f3075008
MP
7922015-04-28 Marek Polacek <polacek@redhat.com>
793
794 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
795
4e81b788
MP
7962015-04-28 Marek Polacek <polacek@redhat.com>
797
798 PR c/65901
799 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
800
6c1db78e
MP
8012015-04-25 Marek Polacek <polacek@redhat.com>
802
803 PR c/52085
804 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
805 attribute.
806
5c4abbb8
MP
8072015-04-23 Marek Polacek <polacek@redhat.com>
808
809 PR c/65345
810 * c-decl.c (set_labels_context_r): New function.
811 (store_parm_decls): Call it via walk_tree_without_duplicates.
812 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
813 instead of create_tmp_var. Build TARGET_EXPR instead of
814 COMPOUND_EXPR.
815 (build_atomic_assign): Use create_tmp_var_raw instead of
816 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
817
06aca1d5
IV
8182015-04-20 Ilya Verbin <ilya.verbin@intel.com>
819
820 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
821 (c_parser_omp_target_update): Add missed %> to error_at ().
822
8fba1830
BRF
8232015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
824
825 PR target/55143
826 * c-decl.c (c_default_pointer_mode): Remove definition.
827 * c-tree.h (c_default_pointer_mode): Remove declaration.
828
62021f64
TB
8292015-03-27 Tobias Burnus <burnus@net-b.de>
830
831 PR c/65586
832 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
833 error out.
834 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
835 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
836 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
837
9b65e171
JJ
8382015-03-19 Jakub Jelinek <jakub@redhat.com>
839
840 * c-decl.c (c_decl_attributes): Also add "omp declare target"
841 attribute for DECL_EXTERNAL VAR_DECLs.
842
17958621
JJ
8432015-03-11 Jakub Jelinek <jakub@redhat.com>
844
845 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
846 argument.
847
7ccb1a11
JJ
8482015-03-10 Jakub Jelinek <jakub@redhat.com>
849
850 PR c/65120
851 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
852 before preparing arguments to warn_logical_not_parentheses.
853
01177669
JJ
8542015-03-09 Jakub Jelinek <jakub@redhat.com>
855
856 PR c/65120
857 * c-typeck.c (parser_build_binary_op): Don't warn for
858 !!x == y or !b == y where b is _Bool.
859
802ac282
MP
8602015-03-09 Marek Polacek <polacek@redhat.com>
861
862 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
863 * c-decl.c (grokdeclarator): Likewise.
864 * c-typeck.c (build_binary_op): Likewise.
865
e5165b60
MP
8662015-02-27 Marek Polacek <polacek@redhat.com>
867
868 PR c/65228
869 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
870
065d214c
MP
8712015-02-14 Marek Polacek <polacek@redhat.com>
872
873 PR c/64768
874 * c-decl.c (grokdeclarator): Set the range of a flexible array member
875 declared through a typedef name.
876
e5d9235b
MP
8772015-02-13 Marek Polacek <polacek@redhat.com>
878
879 PR c/65050
880 * c-decl.c (grokdeclarator): Print also the type when giving
881 the error message about array's incomplete element type.
882
fa01ffcc
JJ
8832015-02-11 Jakub Jelinek <jakub@redhat.com>
884
885 PR c/64824
886 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
887 check in the POP macro.
888
c3e38a03
MP
8892015-02-09 Marek Polacek <polacek@redhat.com>
890
891 PR c/64856
892 * c-typeck.c (process_init_element): Don't always wrap
893 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
894 initializing a range of elements.
895
4886ec8e
JJ
8962015-02-04 Jakub Jelinek <jakub@redhat.com>
897
898 PR c/64824
899 PR c/64868
900 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
901
c3e38a03 9022015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
903
904 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
905 processing enum declaration.
906
7b33f0c8
MP
9072015-01-29 Marek Polacek <polacek@redhat.com>
908
909 PR c/64709
910 * c-typeck.c (pop_init_level): If constructor_elements has
911 exactly one element with integer_zerop value, set constructor_zeroinit
912 to 1. Remove braces around warning_init call.
913
dea63e49
JJ
9142015-01-27 Jakub Jelinek <jakub@redhat.com>
915
916 PR c/64766
917 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
918 of FUNCTION_DECLs with error_mark_node.
919
d38f7dce
JJ
9202015-01-26 Jakub Jelinek <jakub@redhat.com>
921
922 PR c/64778
923 * c-typeck.c (convert_arguments): Return -1 if there are
924 error_args, even if we've diagnosed too many arguments.
925
cbf5d0e7
RB
9262015-01-21 Richard Biener <rguenther@suse.de>
927
928 PR middle-end/64313
929 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
930 for builtins the user declared correctly.
931
41dbbb37
TS
9322015-01-15 Thomas Schwinge <thomas@codesourcery.com>
933 Bernd Schmidt <bernds@codesourcery.com>
934 Cesar Philippidis <cesar@codesourcery.com>
935 James Norris <jnorris@codesourcery.com>
936 Jakub Jelinek <jakub@redhat.com>
937 Ilmir Usmanov <i.usmanov@samsung.com>
938
939 * c-parser.c: Include "gomp-constants.h".
940 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
941 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
942 Use OMP_CLAUSE_SET_MAP_KIND.
943 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
944 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
945 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
946 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
947 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
948 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
949 "copyout", "create", "delete", "deviceptr", "gang", "host",
950 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
951 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
952 "present_or_create", "pcreate", "seq", "self", "vector",
953 "vector_length", "wait", "worker".
954 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
955 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
956 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
957 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
958 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
959 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
960 (c_parser_oacc_data_clause_deviceptr)
961 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
962 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
963 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
964 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
965 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
966 (c_parser_oacc_parallel, c_parser_oacc_update)
967 (c_parser_oacc_wait): New functions.
968 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
969 (c_finish_oacc_data): New prototypes.
970 * c-typeck.c: Include "gomp-constants.h".
971 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
972 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
973 OMP_CLAUSE_SET_MAP_KIND.
974 (c_finish_oacc_parallel, c_finish_oacc_kernels)
975 (c_finish_oacc_data): New functions.
976 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
977 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
978 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
979 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
980 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
981 GOMP_MAP_FORCE_DEVICEPTR.
982
adfac8df
JJ
9832015-01-09 Michael Collison <michael.collison@linaro.org>
984
985 * c-array-notation.c: Include hash-set.h, machmode.h,
986 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
987 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
988 * c-aux-info.c: Ditto.
989 * c-convert.c: Ditto.
990 * c-decl.c: Ditto.
991 * c-errors.c: Ditto.
992 * c-lang.c: Dittoxs.
993 * c-objc-common.c: Ditto.
994 * c-parser.c: Ditto.
995 * c-typeck.c: Include hash-set.h, machmode.h,
996 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
997 fold-const.h, wide-int.h, inchash.h, real.h and
998 fixed-value.h due to flattening of tree.h.
999
2cc901dc
MP
10002015-01-07 Marek Polacek <polacek@redhat.com>
1001
1002 PR c/64417
1003 * c-typeck.c (process_init_element): Disallow initialization of
1004 a flexible array member with a string constant if the structure
1005 is in an array.
1006
5624e564
JJ
10072015-01-05 Jakub Jelinek <jakub@redhat.com>
1008
e5341100
JJ
1009 PR sanitizer/64344
1010 * c-typeck.c (convert_for_assignment, c_finish_return): For
1011 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
1012 types also set in_late_binary_op around convert call.
1013 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
1014 to integral type casts, if not in_late_binary_op, pass c_fully_fold
1015 result on expr as last argument to ubsan_instrument_float_cast,
1016 if in_late_binary_op, don't use c_save_expr but save_expr.
1017
5624e564
JJ
1018 Update copyright years.
1019
5bd012f8
MP
10202015-01-05 Marek Polacek <polacek@redhat.com>
1021
1022 PR c/64423
1023 * c-typeck.c (build_array_ref): Pass loc down to
1024 warn_array_subscript_with_type_char.
1025
768952be
MU
10262014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
1027
1028 * c-typeck.c: New behavious for pointers to arrays with qualifiers
1029 (common-pointer-type): For pointers to arrays take qualifiers from
1030 element type.
1031 (build_conditional_expr): Add warnings for lost qualifiers.
1032 (comp-target-types): Allow pointers to arrays with different qualifiers.
1033 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
1034 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
1035 to PEDWARN_FOR_QUALIFIERS.
1036
8f94a8c4
JJ
10372014-12-17 Jakub Jelinek <jakub@redhat.com>
1038
1039 PR sanitizer/64289
1040 * c-convert.c: Include ubsan.h.
1041 (convert): For real -> integral casts and
1042 -fsanitize=float-cast-overflow don't call convert_to_integer, but
1043 instead instrument the float cast directly.
1044
b731b390
JJ
10452014-11-29 Jakub Jelinek <jakub@redhat.com>
1046
1047 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
1048 c_finish_stmt_expr): Remove NULL last argument from
1049 create_tmp_var_raw and create_tmp_var calls.
1050 * c-array-notation.c (fix_builtin_array_notation_fn,
1051 build_array_notation_expr, fix_conditional_array_notations_1,
1052 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
1053
541e35a6
MP
10542014-11-28 Marek Polacek <polacek@redhat.com>
1055
1056 PR c/63862
1057 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
1058 convert the right operand to integer type.
1059
b286be94
MP
10602014-11-25 Marek Polacek <polacek@redhat.com>
1061
1062 PR c/63877
1063 * c-decl.c (start_function): Disable -Wmissing-declarations warning
1064 for inline functions.
1065
aa7da51a
JJ
10662014-11-21 Jakub Jelinek <jakub@redhat.com>
1067
1068 PR target/63764
1069 * c-typeck.c (build_array_ref): Adjust
1070 convert_vector_to_pointer_for_subscript caller. If it returns true,
1071 call non_lvalue_loc on the result.
1072
d876207f
RB
10732014-11-11 Richard Biener <rguenther@suse.de>
1074
1075 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
1076 to true.
1077
e5e44252
AK
10782014-11-10 Andi Kleen <ak@linux.intel.com>
1079
1080 PR c/60804
1081 * c-parser.c (c_parser_statement_after_labels): Call
1082 check_no_cilk.
1083 (c_parser_if_statement): Dito.
1084 (c_parser_switch_statement): Dito.
1085 (c_parser_while_statement): Dito.
1086 (c_parser_do_statement): Dito.
1087 (c_parser_for_statement): Dito.
1088 * c-typeck.c (c_finish_loop): Dito.
1089
13c21655
PC
10902014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
1091
1092 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
1093 OPT_Wshift_count_overflow in the warnings.
1094
2d51fcef
MP
10952014-10-30 Marek Polacek <polacek@redhat.com>
1096
1097 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
1098 print the stripped version as well, if they're not the same.
1099
ef4bddc2
RS
11002014-10-29 Richard Sandiford <richard.sandiford@arm.com>
1101
1102 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
1103 machine_mode.
1104
c582198b
AM
11052014-10-28 Andrew MacLeod <amacleod@redhat.com>
1106
1107 * c-decl.c: Adjust include files.
1108 * c-parser.c: Ditto.
1109
ddc8de03
PM
11102014-10-27 Phil Muldoon <pmuldoon@redhat.com>
1111 Tom Tromey <tromey@redhat.com>
1112
1113 * c-tree.h (enum c_oracle_request): New.
1114 (c_binding_oracle_function): New typedef.
1115 (c_binding_oracle, c_pushtag, c_bind): Declare.
1116 * c-decl.c (c_binding_oracle): New global.
1117 (I_SYMBOL_CHECKED): New macro.
1118 (i_symbol_binding): New function.
1119 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
1120 (I_TAG_CHECKED): New macro.
1121 (i_tag_binding): New function.
1122 (I_TAG_BINDING, I_TAG_DECL): Redefine.
1123 (I_LABEL_CHECKED): New macro.
1124 (i_label_binding): New function.
1125 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
1126 (c_print_identifier): Save and restore c_binding_oracle.
1127 (c_pushtag, c_bind): New functions.
1128
60393bbc
AM
11292014-10-27 Andrew MacLeod <amacleod@redhat.com>
1130
1131 * c-typeck.c: Adjust include files.
1132
d723bb7c
MLI
11332014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
1134
1135 PR c++/53061
1136 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
1137 initialization here...
1138 (c_initialize_diagnostics): ... but here. Set defaults after
1139 building pretty-printer.
1140
1bc5a451
MP
11412014-10-23 Marek Polacek <polacek@redhat.com>
1142
1143 PR c/63626
1144 * c-decl.c (pop_scope): Don't print warning in external_scope.
1145
4435bb92
MP
11462014-10-19 Marek Polacek <polacek@redhat.com>
1147
1148 PR c/63567
1149 * c-typeck.c (output_init_element): Allow initializing objects with
1150 static storage duration with compound literals even in C99 and add
1151 pedwarn for it.
1152
7278465e
MP
11532014-10-17 Marek Polacek <polacek@redhat.com>
1154
1155 PR c/63567
1156 * c-typeck.c (digest_init): Allow initializing objects with static
1157 storage duration with compound literals even in C99 and add pedwarn
1158 for it.
1159
d9b7be2e
MP
11602014-10-17 Marek Polacek <polacek@redhat.com>
1161
1162 PR c/63543
1163 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
1164 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
1165 error multiple times. Print the type.
1166
f406ae1f
MP
11672014-10-17 Marek Polacek <polacek@redhat.com>
1168
1169 PR c/63549
1170 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
1171 type.
1172
92574c7c
MP
11732014-10-17 Marek Polacek <polacek@redhat.com>
1174
1175 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
1176 (start_function): Use OPT_Wimplicit_int instead of 0.
1177 (store_parm_decls_oldstyle): Likewise.
1178
1bc4a978
MT
11792014-10-17 Alan Modra <amodra@gmail.com>
1180
1181 PR middle-end/61848
1182 * c-decl.c (merge_decls): Don't merge section name or tls model
1183 to newdecl symtab node, instead merge to olddecl. Override
1184 existing olddecl section name. Set tls_model for all thread-local
1185 vars, not just OMP thread-private ones. Remove incorrect comment.
1186
83685514
AM
11872014-10-16 Andrew MacLeod <amacleod@redhat.com>
1188
1189 * c-decl.c: Adjust include files.
1190
78a7c317
DD
11912014-10-14 DJ Delorie <dj@redhat.com>
1192
1193 * c-parser.c (c_parse_init): Add RID entries for each __intN.
1194 (c_token_starts_typename): Check all __intN, not just __int128.
1195 (c_token_starts_declspecs): Likewise.
1196 (c_parser_declspecs): Likewise.
1197 (c_parser_attribute_any_word): Likewise.
1198 (c_parser_objc_selector): Likewise.
1199 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
1200 (struct c_declspecs): Add int_n_idx field to record *which* __intN
1201 is specified.
1202 * c-decl.c (declspecs_add_type): Check for all __intN, not just
1203 __int128.
1204 (finish_declspecs): Likewise.
1205
74d98c1e
AB
12062014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
1207
1208 * c-parser.c (c_parser_all_labels): New function to replace
1209 the duplicate code.
1210 (c_parser_statement): Call the new function.
1211
84937de2
MP
12122014-10-09 Marek Polacek <polacek@redhat.com>
1213
1214 PR c/63480
1215 * c-typeck.c (pop_init_level): Don't warn about initializing
1216 with { }.
1217
0382aaa0
MP
12182014-10-07 Marek Polacek <polacek@redhat.com>
1219
1220 PR c/59717
1221 * c-decl.c (header_for_builtin_fn): New function.
1222 (implicitly_declare): Suggest which header to include.
1223
7a0ca710
MP
12242014-10-07 Marek Polacek <polacek@redhat.com>
1225
1226 * c-convert.c (convert): Use error_operand_p.
1227 * c-typeck.c (require_complete_type): Likewise.
1228 (really_atomic_lvalue): Likewise.
1229 (digest_init): Likewise.
1230 (handle_omp_array_sections_1): Likewise.
1231
6bc8a126
MP
12322014-10-03 Marek Polacek <polacek@redhat.com>
1233
1234 PR c/63453
1235 * c-decl.c (pop_scope): Don't warn about "inline function declared
1236 but never defined" for functions marked with gnu_inline attribute.
1237
d90c0a59
JJ
12382014-09-25 Jakub Jelinek <jakub@redhat.com>
1239
1240 PR c++/63249
1241 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
1242 on low_bound and length.
1243
083e891e
MP
12442014-09-24 Marek Polacek <polacek@redhat.com>
1245
1246 PR c/61405
1247 PR c/53874
1248 * c-parser.c: Don't define CPP_KEYWORD.
1249 (c_parser_switch_statement): Pass original type to c_finish_case.
1250 * c-tree.h (c_finish_case): Update declaration.
1251 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
1252 conditionally to c_do_switch_warnings.
1253
8d95fe25
MP
12542014-09-03 Marek Polacek <polacek@redhat.com>
1255
1256 PR c/62024
1257 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
1258 conversions.
1259
9a771876
JJ
12602014-09-02 Jakub Jelinek <jakub@redhat.com>
1261 Balaji V. Iyer <balaji.v.iyer@intel.com>
1262 Igor Zamyatin <igor.zamyatin@intel.com>
1263
1264 * c-parser.c (c_parser_cilk_for): New function.
1265 (c_parser_cilk_grainsize): Likewise.
1266 (c_get_temp_regvar): Likewise.
1267 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
1268 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
1269 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
1270 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
1271 case.
1272
b7679d96
CG
12732014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
1274
1275 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
1276 with using HOST_WIDE_INT without truncation to 'int'
1277
59ea0364
MP
12782014-08-22 Marek Polacek <polacek@redhat.com>
1279
1280 PR c++/62199
1281 * c-typeck.c (parser_build_binary_op): Adjust call to
1282 warn_logical_not_parentheses.
1283
671a475e
IZ
12842014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
1285
1286 PR other/62008
1287 * c-parser.c (c_parser_array_notation): Check for correct
1288 type of an array added.
1289
04159acf
MP
12902014-08-19 Marek Polacek <polacek@redhat.com>
1291
1292 PR c++/62153
1293 * c-typeck.c (build_binary_op): If either operand of a comparison
1294 is a boolean expression, call maybe_warn_bool_compare.
1295
c77935ee
PP
12962014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
1297
1298 PR c/45584
1299 * c-typeck.c (build_c_cast): Do a conversion even when the
1300 TYPE_MAIN_VARIANTs are the same.
1301
35aff4fb
MP
13022014-08-19 Marek Polacek <polacek@redhat.com>
1303
1304 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
1305 pedwarn_c99 instead of pedwarn.
1306 (grokfield): Likewise.
1307 (warn_defaults_to): New function.
1308 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
1309 Unconditionally call pedwarn_c99 instead of pedwarn.
1310 (start_function): Call warn_defaults_to instead of pedwarn_c99.
1311 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
1312 check flag_isoc11 before.
1313 * c-errors.c (pedwarn_c99): Change the return type to bool.
1314 Handle -Wc99-c11-compat.
1315 * c-parser.c (disable_extension_diagnostics): Handle
1316 warn_c99_c11_compat.
1317 (restore_extension_diagnostics): Likewise.
1318 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
1319 instead of pedwarn, don't check flag_isoc11 before.
1320 (c_parser_declspecs): Likewise.
1321 (c_parser_alignas_specifier): Likewise.
1322 (c_parser_alignof_expression): Likewise.
1323 (c_parser_generic_selection): Likewise.
1324 * c-tree.h (pedwarn_c99): Update declaration.
1325 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
1326 of pedwarn_c99.
1327
177cce46
MP
13282014-08-19 Marek Polacek <polacek@redhat.com>
1329
1330 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
1331 to pedwarn_c90.
1332 * c-errors.c: Include "opts.h".
1333 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
1334 * c-parser.c (disable_extension_diagnostics): Handle negative value
1335 of warn_c90_c99_compat, too.
1336 (restore_extension_diagnostics): Likewise.
1337 (c_parser_compound_statement_nostart): Pass
1338 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
1339
6dc99c33
MP
13402014-08-12 Marek Polacek <polacek@redhat.com>
1341
1342 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
1343 Add pedwarn.
1344 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
1345 Likewise.
1346 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
1347
f3bede71
MP
13482014-08-10 Marek Polacek <polacek@redhat.com>
1349
1350 PR c/51849
1351 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
1352 Call pedwarn_c90 instead of pedwarn.
1353 (check_bitfield_type_and_width): Likewise.
1354 (declspecs_add_qual): Likewise.
1355 (declspecs_add_type): Likewise.
1356 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
1357 Adjust to only call pedwarn_c90.
1358 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
1359 pedwarn_c90 instead of pedwarn.
1360 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
1361 * c-parser.c (disable_extension_diagnostics): Handle
1362 warn_c90_c99_compat.
1363 (restore_extension_diagnostics): Likewise.
1364 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
1365 pedwarn_c90 instead of pedwarn.
1366 (c_parser_initelt): Likewise.
1367 (c_parser_postfix_expression): Likewise.
1368 (c_parser_postfix_expression_after_paren_type): Likewise.
1369 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
1370 * c-tree.h: Fix formatting.
1371 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
1372 pedwarn_c90 instead of pedwarn.
1373
9f25a338
TS
13742014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1375
1376 * c-typeck.c: Remove include of pointer-set.h.
1377
044331a8
MP
13782014-08-07 Marek Polacek <polacek@redhat.com>
1379
1380 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
1381
b787e7a2
TS
13822014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1383
1384 * c-typeck.c: Use hash_map instead of pointer_map.
1385
6e2830c3
TS
13862014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1387
1388 * c-decl.c: Use hash_set instead of pointer_set.
1389
a7ee52fb
IZ
13902014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1391
1392 PR middle-end/61455
1393 * c-array-notation.c (expand_array_notations): Handling
1394 of DECL_EXPR added.
1395
b4dfdc11
MG
13962014-07-31 Marc Glisse <marc.glisse@inria.fr>
1397
1398 PR c++/60517
1399 * c-typeck.c (c_finish_return): Return 0 instead of the address of
1400 a local variable.
1401
976d5a22
TT
14022014-07-30 Tom Tromey <tromey@redhat.com>
1403
1404 * c-typeck.c (struct constructor_stack) <designator_depth>: New
1405 field.
1406 (really_start_incremental_init, push_init_level): Initialize
1407 designator_depth.
1408 (pop_init_level): Set global designator_depth.
1409 (process_init_element): Check for designated_init attribute.
1410
30281de2
MP
14112014-07-20 Marek Polacek <polacek@redhat.com>
1412
1413 PR c/61852
1414 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
1415 (implicitly_declare): Pass location to implicit_decl_warning.
1416
b108f48f
JJ
14172014-07-14 Jakub Jelinek <jakub@redhat.com>
1418
1419 PR middle-end/61294
1420 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
1421 If non-NULL, call c_parser_check_literal_zero.
1422 (c_parser_check_literal_zero): New function.
1423 (c_parser_postfix_expression_after_primary): Adjust
1424 c_parser_expr_list caller, handle -Wmemset-transposed-args.
1425
773ec47f
MP
14262014-07-06 Marek Polacek <polacek@redhat.com>
1427
1428 PR c/6940
1429 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
1430 * c-tree.h (C_ARRAY_PARAMETER): Define.
1431 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
1432 function parameter.
1433
22e1cf1c
JH
14342014-07-02 Jan Hubicka <hubicka@ucw.cz>
1435 Chen Gang <gang.chen.5i5j@gmail.com>
1436
1437 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
1438 releasing symbol.
1439
52ec0ea3
MP
14402014-07-01 Marek Polacek <polacek@redhat.com>
1441
1442 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
1443 instead of 0 to WARN_FOR_ASSIGNMENT.
1444
d5c3d343
MP
14452014-07-01 Marek Polacek <polacek@redhat.com>
1446
1447 PR c/58286
1448 * c-typeck.c (convert_for_assignment): Pass
1449 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
1450
6a7253a4
MP
14512014-06-30 Marek Polacek <polacek@redhat.com>
1452
1453 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
1454 has no_sanitize_undefined attribute.
1455
5e88a8f4
IZ
14562014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
1457
1458 PR middle-end/57541
1459 * c-array-notation.c (fix_builtin_array_notation_fn):
1460 Check for 0 arguments in builtin call. Check that bultin argument is
1461 correct.
1462 * c-parser.c (c_parser_array_notation): Check for incorrect initial
1463 index.
1464
9698b078
SH
14652014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
1466
1467 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
1468 qualifiers in __auto_type for atomic types.
1469 (c_parser_typeof_specifier): Discard all type qualifiers in
1470 __typeof__ for atomic types.
1471
6e07c515
MP
14722014-06-25 Marek Polacek <polacek@redhat.com>
1473
1474 PR c/61162
1475 * c-parser.c (c_parser_statement_after_labels): Pass the location of
1476 the return expression to c_finish_return.
1477
da6f124d
JJ
14782014-06-25 Jakub Jelinek <jakub@redhat.com>
1479
1480 * c-typeck.c (c_finish_omp_clauses): Make sure
1481 OMP_CLAUSE_LINEAR_STEP has correct type.
1482
c203e8a7
TS
14832014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1484
1485 * c-decl.c: Adjust.
1486
56ad0e38
JJ
14872014-06-24 Jakub Jelinek <jakub@redhat.com>
1488
1489 * c-parser.c (c_parser_omp_for_loop): For
1490 #pragma omp parallel for simd move lastprivate clause from parallel
1491 to for rather than simd.
1492
47c2554f
MP
14932014-06-23 Marek Polacek <polacek@redhat.com>
1494
1495 * c-typeck.c (parser_build_binary_op): Don't call
1496 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
1497
56363ffd
JH
14982014-06-15 Jan Hubicka <hubicka@ucw.cz>
1499
1500 * c-parser.c (c_parser_omp_threadprivate): Likewise.
1501 * c-decl.c (merge_decls): Likewise.
1502
d7ff7ae5
MP
15032014-06-09 Marek Polacek <polacek@redhat.com>
1504
1505 PR c/36446
1506 * c-typeck.c (error_init): Call inform instead of error_at.
1507 (pedwarn_init): Call inform instead of pedwarn.
1508 (warning_init): Call inform instead of warning_at.
1509
24d047a3
JH
15102014-06-07 Jan Hubicka <hubicka@ucw.cz>
1511
1512 * c-decl.c (merge_decls): Use set_decl_section_name.
1513 (duplicate_decls): Remove node if it exists.
1514
9bac5cbb
G
15152014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
1516
1517 PR c/53119
1518 * c-typeck.c (push_init_level, process_init_element,
1519 pop_init_level): Correct check for zero initialization, move
1520 missing brace warning to respect zero initialization.
1521
8ffcdea8
MP
15222014-06-05 Marek Polacek <polacek@redhat.com>
1523
1524 PR c/56724
1525 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
1526
742938c9
MP
15272014-06-05 Marek Polacek <polacek@redhat.com>
1528
1529 PR c/49706
1530 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
1531 on the left hand side operand of a comparison.
1532
6447c55d
MP
15332014-06-05 Marek Polacek <polacek@redhat.com>
1534
1535 PR c/48062
1536 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
1537 Print note only if the warning was printed.
1538
9dc7743c
IZ
15392014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
1540
1541 PR c/58942
1542 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
1543 with a pointer.
1544
fedfecef
MP
15452014-06-03 Marek Polacek <polacek@redhat.com>
1546
1547 PR c/60439
1548 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
1549 c_start_case.
1550 * c-tree.h (c_start_case): Update.
1551 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
1552 switch condition has boolean value.
1553
9b2b7279
AM
15542014-06-02 Andrew MacLeod <amacleod@redhat.com>
1555
1556 * c-decl.c: Include builtins.h.
1557 * c-parser.c: Likewise.
1558
5c1bc275
MP
15592014-05-27 Marek Polacek <polacek@redhat.com>
1560
1561 PR c/56724
1562 * c-typeck.c (convert_arguments): Get location of a parameter. Change
1563 error and warning calls to error_at and warning_at. Pass location of
1564 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
1565 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
1566 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
1567
97563bc8
IZ
15682014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
1569
1570 PR c/61191
1571 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
1572 function parameters.
1573
aede2c10
JH
15742014-05-23 Jan Hubicka <hubicka@ucw.cz>
1575
1576 * c-decl.c (merge_decls): Preserve symtab node pointers.
1577 (duplicate_decls): Free new decl.
1578
edbba2ce
TS
15792014-05-23 Thomas Schwinge <thomas@codesourcery.com>
1580
f3316c6d
TS
1581 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
1582 initialization.
1583
edbba2ce
TS
1584 * c-parser.c (c_parser_omp_target): Return bool values.
1585
68c81f24
TS
15862014-05-22 Thomas Schwinge <thomas@codesourcery.com>
1587
1588 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
1589 num_teams_loc variable to num_thread_limit_loc.
1590
632f2871
RS
15912014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
1592
1593 * c-array-notation.c (expand_array_notations): Use void_node
1594 instead of void_zero_node.
1595
766090c2
TS
15962014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1597
1598 * c-decl.c (finish_struct): Adjust.
1599 (finish_enum): Likewise.
1600 (bind): Adjust.
1601 (record_inline_static): Likewise.
1602 (push_scope): Likewise.
1603 (make_label): Likewise.
1604 (lookup_label_for_goto): Likewise.
1605 (finish_struct): Likewise.
1606 (finish_enum): Likewise.
1607 (store_parm_decls): Likewise.
1608 (c_push_function_context): Likewise.
1609 * c-lang.h: Remove usage of variable_size gty attribute.
1610 * c-parser.c (c_parse_init): Adjust.
1611 (c_parse_file): Likewise.
1612
2b107f6b
MP
16132014-05-13 Marek Polacek <polacek@redhat.com>
1614
1615 PR c/61162
1616 * c-typeck.c (convert_for_assignment): Pass location to
1617 WARN_FOR_ASSIGNMENT instead of input_location.
1618
d033409e
MP
16192014-05-10 Marek Polacek <polacek@redhat.com>
1620
1621 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
1622 maybe_warn_string_init.
1623 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
1624 maybe_warn_string_init.
1625 * c-tree.h (maybe_warn_string_init): Update declaration.
1626 * c-typeck.c (maybe_warn_string_init): Add location parameter.
1627 Call pedwarn_init with loc instead of with input_location.
1628 (digest_init): Pass init_loc to maybe_warn_string_init.
1629 (pop_init_level): Call pedwarn_init with loc instead of with
1630 input_location.
1631 (set_init_index): Likewise.
1632 (process_init_element): Likewise.
1633
ea58ef42
MP
16342014-05-09 Marek Polacek <polacek@redhat.com>
1635
1636 PR c/61096
1637 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
1638 (c_parser_initelt): Pass location to set_init_label. Pass array index
1639 location to set_init_index.
1640 * c-tree.h (push_init_level): Update declaration.
1641 (pop_init_level): Likewise.
1642 (set_init_index): Likewise.
1643 (set_init_label): Likewise.
1644 * c-typeck.c (error_init): Add location parameter. Call error_at
1645 instead of error.
1646 (digest_init): Pass init_loc to error_init.
1647 (really_start_incremental_init):
1648 (push_init_level): Add location parameter. Pass loc to pop_init_level
1649 and error_init.
1650 (pop_init_level): Likewise.
1651 (set_designator): Add location parameter. Pass loc to pop_init_level,
1652 push_init_level, and error_init.
1653 (set_init_index): Add location parameter. Pass loc to error_init and
1654 set_designator.
1655 (set_init_label): Likewise.
1656 (output_init_element): Pass loc to error_init.
1657 (process_init_element): Pass loc to error_init, pop_init_level,
1658 pedwarn_init, and push_init_level.
1659
661a0813
MP
16602014-05-09 Marek Polacek <polacek@redhat.com>
1661
1662 PR c/50459
1663 * c-parser.c (c_parser_attributes): Parse the arguments as an
1664 expression-list if the attribute takes identifier.
1665
2793eeab
MP
16662014-05-08 Marek Polacek <polacek@redhat.com>
1667
1668 PR c/61053
1669 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
1670 TYPE_ALIGN_UNIT.
1671
f827930a
MP
16722014-05-08 Marek Polacek <polacek@redhat.com>
1673
1674 PR c/61077
1675 * c-decl.c (start_function): Warn for _Atomic-qualified return type
1676 of main.
1677
1d60af08
KZ
16782014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1679 Mike Stump <mikestump@comcast.net>
1680 Richard Sandiford <rdsandiford@googlemail.com>
1681
1682 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
1683 (finish_enum): Use wide-int interfaces.
1684 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
1685 * c-typeck.c (build_c_cast): Likewise.
1686 (set_nonincremental_init_from_string): Likewise.
1687 (c_tree_equal): Likewise.
1688
a0e24419
MP
16892014-05-02 Marek Polacek <polacek@redhat.com>
1690
1691 PR c/25801
1692 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
1693 Return size_one_node when the type is not complete.
1694 (pointer_diff): Remove comment.
1695 (build_unary_op): Improve error messages.
1696
19fc9faa
MP
16972014-05-02 Marek Polacek <polacek@redhat.com>
1698
1699 * c-typeck.c (c_finish_return): Separate warning_at calls.
1700
63bc4e87
MP
17012014-05-02 Marek Polacek <polacek@redhat.com>
1702
1703 * c-tree.h (error_init): Remove declaration.
1704 (pedwarn_init): Likewise.
1705 * c-typeck.c (error_init): Make static and move above.
1706 (pedwarn_init): Likewise.
1707 (warning_init): Move above.
1708 (maybe_warn_string_init): Likewise.
1709
4bd2511b
JL
17102014-05-01 Jeff Law <law@redhat.com>
1711
1712 Revert:
1713
1714 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1715 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
1716 avoid goto.
1717
6a358dcb
MP
17182014-05-02 Marek Polacek <polacek@redhat.com>
1719
1720 PR c/60784
1721 * c-typeck.c (push_init_level): Set constructor_designated to
1722 p->designated for structures.
1723
ae5ebda4
MP
17242014-05-01 Marek Polacek <polacek@redhat.com>
1725
1726 PR c/60915
1727 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
1728 function-definition has an attribute after the declarator.
1729
96b40f8d
MP
17302014-05-01 Marek Polacek <polacek@redhat.com>
1731
1732 PR c/60257
1733 * c-typeck.c (warning_init): Add location_t parameter. Call
1734 warning_at instead of warning.
1735 (push_init_level): Pass input_location to warning_init.
1736 (add_pending_init): Add location_t parameter. Pass loc to
1737 warning_init.
1738 (set_nonincremental_init): Pass input_location to add_pending_init.
1739 (set_nonincremental_init_from_string): Likewise.
1740 (output_init_element): Pass loc to warning_init and to
1741 add_pending_init.
1742
32e00768
MP
17432014-05-01 Marek Polacek <polacek@redhat.com>
1744
1745 PR c/43395
1746 * c-typeck.c (c_finish_return): Distinguish between label and variable
1747 when warning about returning local address.
1748
c9379ce2
MP
17492014-05-01 Marek Polacek <polacek@redhat.com>
1750
1751 PR c/29467
1752 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
1753 in C89 mode.
1754
d00887e8
MP
17552014-05-01 Marek Polacek <polacek@redhat.com>
1756
1757 PR c/43245
1758 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
1759 instead of 0 to WARN_FOR_QUALIFIERS.
1760
5436fa2e
MP
17612014-05-01 Marek Polacek <polacek@redhat.com>
1762
1763 PR c/56989
1764 * c-typeck.c (default_conversion): Use better location for
1765 error call.
1766
f8ed5150
MP
17672014-04-30 Marek Polacek <polacek@redhat.com>
1768
1769 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
1770 also when SANITIZE_FLOAT_DIVIDE is on.
1771
8337d1db
MP
17722014-04-30 Marek Polacek <polacek@redhat.com>
1773
1774 PR c/60139
1775 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
1776 and pedwarn_init. Use loc insted of input_location.
1777
c4bdc42f
MP
17782014-04-30 Marek Polacek <polacek@redhat.com>
1779
1780 PR c/60351
1781 * c-typeck.c (build_binary_op): Use location when warning about
1782 shift count.
1783
45484dcf
MP
17842014-04-25 Marek Polacek <polacek@redhat.com>
1785
1786 PR c/18079
1787 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
1788 always_inline/noinline and hot/cold attributes.
1789
34cf811f
MP
17902014-04-25 Marek Polacek <polacek@redhat.com>
1791
1792 PR c/60114
1793 * c-parser.c (c_parser_initelt): Pass input_location to
1794 process_init_element.
1795 (c_parser_initval): Pass loc to process_init_element.
1796 * c-tree.h (process_init_element): Adjust declaration.
1797 * c-typeck.c (push_init_level): Pass input_location to
1798 process_init_element.
1799 (pop_init_level): Likewise.
1800 (set_designator): Likewise.
1801 (output_init_element): Add location_t parameter. Pass loc to
1802 digest_init.
1803 (output_pending_init_elements): Pass input_location to
1804 output_init_element.
1805 (process_init_element): Add location_t parameter. Pass loc to
1806 output_init_element.
1807
42056eac
JJ
18082014-04-24 Jakub Jelinek <jakub@redhat.com>
1809
1810 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
1811 atomic-clause, allow comma in between atomic-clause and
1812 seq_cst.
1813
e162a134
JJ
18142014-04-22 Jakub Jelinek <jakub@redhat.com>
1815
1816 PR c/59073
1817 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
1818 fails, don't set OM_PARALLEL_COMBINED and return NULL.
1819
2f6babac
IZ
18202014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
1821
1822 PR middle-end/60469
1823 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1824 create_tmp_var instead build_decl for creating temps.
1825 (build_array_notation_expr): Likewise.
1826 (fix_conditional_array_notations_1): Likewise.
1827 (fix_array_notation_expr): Likewise.
1828 (fix_array_notation_call_expr): Likewise.
1829
8edbfaa6
JJ
18302014-03-28 Jakub Jelinek <jakub@redhat.com>
1831
1832 PR c++/60689
1833 * c-tree.h (c_build_function_call_vec): New prototype.
1834 * c-typeck.c (build_function_call_vec): Don't call
1835 resolve_overloaded_builtin here.
1836 (c_build_function_call_vec): New wrapper function around
1837 build_function_call_vec. Call resolve_overloaded_builtin here.
1838 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
1839 Call c_build_function_call_vec instead of build_function_call_vec.
1840 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1841 * c-decl.c (finish_decl): Likewise.
1842
7485aeea
MLI
18432014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1844
1845 PR c/55383
1846 * c-typeck.c: Use correct format string in cast-qual warning
1847
b17a8b07
TS
18482014-03-07 Thomas Schwinge <thomas@codesourcery.com>
1849
1850 * c-decl.c (c_decl_attributes): Use
1851 lang_hooks.types.omp_mappable_type.
1852 * c-typeck.c (c_finish_omp_clauses): Likewise.
1853
3af9c5e9
MP
18542014-03-06 Marek Polacek <polacek@redhat.com>
1855
1856 PR c/60197
1857 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
1858 of checking tree code.
1859
1c9f5f33
PK
18602014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1861
1862 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
1863 (c_parser_parameter_declaration): Likewise.
1864
cc28fc7f
MP
18652014-02-19 Marek Polacek <polacek@redhat.com>
1866
1867 PR c/60195
1868 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
1869 Call mark_exp_read on exp.value.
1870 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
1871 TREE_ADDRESSABLE on old instead of val.
1872 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
1873
b581c05c
PK
18742014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1875
1876 * c-parser.c (c_parser_get_builtin_args): Replace calls to
1877 C_EXPR_APPEND by vec_safe_push.
1878 * c-tree.h (C_EXPR_APPEND): Remove.
1879
81e5eca8
MP
18802014-01-31 Marek Polacek <polacek@redhat.com>
1881
1882 PR c/59963
1883 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
1884 build_function_call_vec.
1885 (build_function_call): Likewise.
1886 (build_atomic_assign): Likewise.
1887 (build_function_call_vec): Add arg_loc parameter. Use it.
1888 (convert_arguments): Likewise.
1889 (convert_for_assignment): Rename rhs_loc to expr_loc.
1890 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
1891 (c_parser_objc_keywordexpr): Likewise.
1892 (c_parser_postfix_expression_after_primary): Call
1893 build_function_call_vec with expr_loc rather than op_loc.
1894 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
1895 build_function_call_vec.
1896 (c_parser_expr_list): Add locations parameter. Fill it with locations
1897 of function arguments.
1898 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
1899
68fca595
MP
19002014-01-30 Marek Polacek <polacek@redhat.com>
1901
1902 PR c/59940
1903 * c-typeck.c (build_function_call_vec): Use loc parameter.
1904 (convert_arguments): Add location parameter. Use it.
1905 (ep_convert_and_check): Likewise.
1906 (build_atomic_assign): Adjust convert_for_assignment call.
1907 (build_modify_expr): Likewise.
1908 (digest_init): Likewise.
1909 (c_finish_return): Likewise.
1910 (build_conditional_expr): Adjust ep_convert_and_check calls.
1911 (convert_for_assignment): Add rhs_loc parameter. Use it.
1912 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
1913 calls.
1914
fa337f3a
RB
19152014-01-30 Richard Biener <rguenther@suse.de>
1916
1917 PR c/59905
1918 * c-typeck.c (build_function_call_vec): Do not replace calls
1919 to a function via an incompatible type with a runtime abort.
1920
b72271b9
BI
19212014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1922
1923 * c-parser.c (c_parser_declaration_or_fndef): Replaced
1924 flag_enable_cilkplus with flag_cilkplus.
1925 (c_parser_direct_declarator_inner): Likewise.
1926 (c_parser_attribute_any_word): Likewise.
1927 (c_parser_attributes): Likewise.
1928 (c_parser_compound_statement): Likewise.
1929 (c_parser_statement_after_labels): Likewise.
1930 (c_parser_if_statement): Likewise.
1931 (c_parser_switch_statement): Likewise.
1932 (c_parser_do_statement): Likewise.
1933 (c_parser_for_statement): Likewise.
1934 (c_parser_unary_expression): Likewise.
1935 (c_parser_postfix_expression): Likewise.
1936 (c_parser_postfix_expression_after_primary): Likewise.
1937 (c_parser_postfix_expression_after_primary): Likewise.
1938 (c_parser_omp_clause_name): Likewise.
1939 (c_finish_omp_declare_simd): Likewise.
1940 (c_parser_cilk_verify_simd): Likewise.
1941 * c-typeck.c (build_array_ref): Likewise.
1942 (build_function_call_vec): Likewise.
1943 (convert_arguments): Likewise.
1944 (build_compound_expr): Likewise.
1945 (c_finish_return): Likewise.
1946 (c_finish_if_stmt): Likewise.
1947 (c_finish_loop): Likewise.
1948 (build_binary_op): Likewise.
1949
393e8e8b
MP
19502014-01-23 Marek Polacek <polacek@redhat.com>
1951
1952 PR c/59846
1953 * c-typeck.c (parser_build_binary_op): Use location instead of
1954 input_location.
1955 (build_binary_op): Pass location to shorten_compare.
1956
f04dda30
MP
19572014-01-23 Marek Polacek <polacek@redhat.com>
1958
1959 PR c/58346
1960 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
1961 an empty aggregate.
1962
789eadcd
MP
19632014-01-23 Marek Polacek <polacek@redhat.com>
1964
1965 PR c/59871
1966 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
1967 of a comma expression.
1968 (emit_side_effect_warnings): Likewise.
1969
40f14e9f
BI
19702014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1971
1972 PR c/59825
1973 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
1974 function to use walk_tree and moved a lot of its functionality to
1975 expand_array_notations.
1976 (expand_array_notations): New function.
1977
74558dd9
BI
19782014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1979
1980 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
1981 attribute an attribute without value.
1982
652fea39
JJ
19832014-01-23 Jakub Jelinek <jakub@redhat.com>
1984
1985 PR middle-end/58809
1986 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
1987 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
1988
f34f1c87
MP
19892014-01-22 Marek Polacek <polacek@redhat.com>
1990
1991 PR c/59891
1992 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
1993 of remove_c_maybe_const_expr on op1 and op2.
1994
241f845a
JJ
19952014-01-15 Jakub Jelinek <jakub@redhat.com>
1996
1997 PR c/58943
1998 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
1999 effects, preevaluate rhs using SAVE_EXPR first.
2000
9a74f20c
BI
20012014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
2002
2003 PR c++/59631
2004 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
2005 statements with if-elseif statements.
2006
96066ce1
MP
20072014-01-06 Marek Polacek <polacek@redhat.com>
2008
2009 PR c/57773
2010 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
2011 defined bit-field types only in ISO C.
2012
23a5b65a
RS
20132014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2014
2015 Update copyright years
2016
f9030485
RS
20172014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2018
2019 * c-array-notation.c: Use the standard form for the copyright notice.
2020
41958c28
BI
20212013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
2022
2023 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
2024 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
2025 field in parser is not empty. If not-empty, call the function
2026 c_parser_finish_omp_declare_simd.
2027 (c_parser_cilk_clause_vectorlength): Modified function to be shared
2028 between SIMD-enabled functions and #pragma simd. Added new parameter.
2029 (c_parser_cilk_all_clauses): Modified the usage of the function
2030 c_parser_cilk_clause_vectorlength as mentioned above.
2031 (c_parser_cilk_simd_fn_vector_attrs): New function.
2032 (c_finish_cilk_simd_fn_tokens): Likewise.
2033 (is_cilkplus_vector_p): Likewise.
2034 (c_parser_omp_clause_name): Added checking for "vectorlength,"
2035 "nomask," and "mask" strings in clause name.
2036 (c_parser_omp_all_clauses): Added 3 new case statements:
2037 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
2038 PRAGMA_CILK_CLAUSE_NOMASK.
2039 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
2040 check for vector attribute and if so call the function
2041 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
2042 called the function c_finish_cilk_simd_fn_tokens.
2043 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
2044 parser field is non-empty. If so, parse them as you would parse
2045 the omp declare simd pragma.
2046 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
2047 Added a check when step is a parameter and flag it as error.
2048 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
2049 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
2050 pragma_omp_clause.
2051
cef0fd0e
TS
20522013-12-17 Thomas Schwinge <thomas@codesourcery.com>
2053
2054 * c-parser.c (c_parser_omp_parallel): Fix description.
2055
12893402
BI
20562013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
2057
2058 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
2059 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2060 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
2061 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
2062
296674db
JM
20632013-12-04 Joseph Myers <joseph@codesourcery.com>
2064
2065 PR c/52023
2066 * c-parser.c (c_parser_alignas_specifier): Use
2067 c_sizeof_or_alignof_type instead of c_alignof.
2068 (c_parser_alignof_expression): Likewise, with min_alignof
2069 parameter depending on alignof spelling used.
2070
edd28054
MP
20712013-12-04 Marek Polacek <polacek@redhat.com>
2072
2073 PR c/54113
2074 * c-decl.c (start_function): Don't warn for missing prototype for
2075 inline functions.
2076
da0fc454
MP
20772013-12-03 Marek Polacek <polacek@redhat.com>
2078
2079 PR c/59351
2080 * c-decl.c (build_compound_literal): Allow compound literals with
2081 empty initial value.
2082
4c2ecab0
JM
20832013-12-02 Joseph Myers <joseph@codesourcery.com>
2084
2085 PR c/58235
2086 * c-typeck.c (build_modify_expr): Diagnose assignment to
2087 expression with array type.
2088
340baef7
JM
20892013-11-29 Joseph Myers <joseph@codesourcery.com>
2090
2091 PR c/42262
2092 * c-typeck.c (process_init_element): Do not treat a string as
2093 initializing a whole array when used with a designator for an
2094 individual element.
2095
6763b9f7
JM
20962013-11-29 Joseph Myers <joseph@codesourcery.com>
2097
2098 PR c/57574
2099 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
2100 an inline function following a static declaration.
2101
e7bd1de1
JJ
21022013-11-28 Jakub Jelinek <jakub@redhat.com>
2103
2104 PR c/59310
2105 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
2106 to p_name before calling c_parser_omp_teams instead of after.
2107 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
2108 argument. Remove unused p_name variable.
2109
0136f8f0
AH
21102013-11-27 Aldy Hernandez <aldyh@redhat.com>
2111 Jakub Jelinek <jakub@redhat.com>
2112
2113 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
2114 external_scope is NULL.
2115
241b71bb
TV
21162013-11-27 Tom de Vries <tom@codesourcery.com>
2117 Marc Glisse <marc.glisse@inria.fr>
2118
2119 PR c++/59032
2120 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
2121
2fb9a547
AM
21222013-11-22 Andrew MacLeod <amacleod@redhat.com>
2123
2124 * c-typeck.c: Add required include files from gimple.h.
2125
8400e75e
DM
21262013-11-22 David Malcolm <dmalcolm@redhat.com>
2127
2128 * c-decl.c (define_label, shadow_tag_warned)
2129 (check_bitfield_type_and_width, grokdeclarator, grokparms,
2130 store_parm_decls_newstyle, store_parm_decls_oldstyle)
2131 (declspecs_add_type): Remove use of in_system_header macro.
2132 * c-parser.c (c_parser_unary_expression): Likewise.
2133 * c-typeck.c (store_init_value, process_init_element)
2134 (c_start_case): Likewise.
2135
2136 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
2137 macro.
2138
2139 * c-parser.c (c_parser_set_source_position_from_token): Remove
2140 reference to in_system_header from comment.
2141
386b1f1f
RS
21422013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2143
2144 * c-decl.c (grokdeclarator): Update comment to refer to
2145 tree_to_[su]hwi rather than tree_low_cst.
2146
ae7e9ddd
RS
21472013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2148
2149 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
2150 tree_to_uhwi throughout.
2151
9439e9a1
RS
21522013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2153
2154 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
2155 throughout.
2156
9541ffee
RS
21572013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2158
2159 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
2160 throughout.
2161
c02065fc
AH
21622013-11-15 Aldy Hernandez <aldyh@redhat.com>
2163
2164 * c-parser.c (c_parser_cilk_simd): New.
2165 (c_parser_cilk_verify_simd): New.
2166 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
2167 (c_parser_omp_for_loop): Add case for NE_EXPR.
2168 Set c_break_label for CILK_SIMD.
2169 (c_parser_cilk_clause_vectorlength): New.
2170 (c_parser_cilk_clause_linear): New.
2171 (c_parser_cilk_clause_name): New.
2172 (c_parser_cilk_all_clauses): New.
2173 * c-typeck.c (build_unary_op): Pass location argument to
2174 readonly_error.
2175 (build_modify_expr): Same.
2176 (build_asm_expr): Same.
2177 (c_finish_bc_stmt): Error on break/continue in loops.
2178
18f429e2
AM
21792013-11-14 Andrew MacLeod <amacleod@redhat.com>
2180
2181 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
2182
d8a2d370
DN
21832013-11-14 Diego Novillo <dnovillo@google.com>
2184
2185 * c-decl.c: Include print-tree.h.
2186 Include stor-layout.h.
2187 Include varasm.h.
2188 Include attribs.h.
2189 Include stringpool.h.
2190 * c-lang.c: Include fold-const.h.
2191 * c-parser.c: Include stringpool.h.
2192 Include attribs.h.
2193 Include stor-layout.h.
2194 Include varasm.h.
2195 Include trans-mem.h.
2196 * c-typeck.c: Include stor-layout.h.
2197 Include trans-mem.h.
2198 Include varasm.h.
2199 Include stmt.h.
2200
38b7bc7f
JM
22012013-11-13 Joseph Myers <joseph@codesourcery.com>
2202
2203 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
2204 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
2205 __auto_type.
2206 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
2207 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
2208 RID_AUTO_TYPE.
2209 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
2210 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
2211 (c_parser_declarator, c_parser_direct_declarator_inner)
2212 (c_parser_parameter_declaration, c_parser_type_name): All callers
2213 changed.
2214 (c_parser_declaration_or_fndef): Handle declarations with type
2215 determined from the initializer.
2216
45b0be94
AM
22172013-11-12 Andrew MacLeod <amacleod@redhat.com>
2218
18f429e2 2219 * c-typeck.c: Include gimplify.h.
45b0be94 2220
582d9b50
JM
22212013-11-12 Joseph Myers <joseph@codesourcery.com>
2222
2223 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
2224 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
2225 comment.
2226 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
2227 or _Thread_local as appropriate in diagnostics.
2228 (build_null_declspecs): Initialize ret->thread_gnu_p.
2229 (declspecs_add_scspec): Handle either __thread or _Thread_local
2230 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
2231 pedantic. Do not disallow _Thread_local extern and _Thread_local
2232 static.
2233
267bac10
JM
22342013-11-07 Joseph Myers <joseph@codesourcery.com>
2235 Andrew MacLeod <amacleod@redhat.com>
2236
2237 * c-aux-info.c (gen_type): Handle atomic qualifier.
2238 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
2239 qualifiers when compating types.
2240 (shadow_tag_warned): Handle atomic_p in declspecs.
2241 (quals_from_declspecs): Likewise.
2242 (start_decl): Use c_type_promotes_to when promoting argument
2243 types.
2244 (grokdeclarator): Handle _Atomic.
2245 (get_parm_info): Diagnose any qualifier on "void" as only
2246 parameter.
2247 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
2248 comparing types. Use c_type_promotes_to when promoting argument
2249 types.
2250 (finish_function): Use c_type_promotes_to when promoting argument
2251 types.
2252 (build_null_declspecs): Handle atomic_p in declspecs.
2253 (declspecs_add_qual): Handle RID_ATOMIC.
2254 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
2255 (c_token_starts_declspecs): Handle RID_ATOMIC.
2256 (c_parser_declspecs): Handle atomic type specifiers and
2257 qualifiers.
2258 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
2259 from types of expressions with atomic type.
2260 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
2261 (c_parser_attribute_any_word): Handle RID_ATOMIC.
2262 (c_parser_initializer, c_parser_initelt, c_parser_initval)
2263 (c_parser_statement_after_labels, c_parser_switch_statement)
2264 (c_parser_for_statement, c_parser_expr_no_commas)
2265 (c_parser_conditional_expression, c_parser_binary_expression)
2266 (c_parser_cast_expression, c_parser_unary_expression)
2267 (c_parser_postfix_expression)
2268 (c_parser_postfix_expression_after_primary, c_parser_expression):
2269 Use convert_lvalue_to_rvalue.
2270 (c_parser_expression_conv, c_parser_expr_list): Document
2271 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
2272 (c_parser_objc_synchronized_statement): Use
2273 convert_lvalue_to_rvalue.
2274 (c_parser_objc_selector): Handle RID_ATOMIC.
2275 (c_parser_objc_receiver, c_parser_array_notation): Use
2276 convert_lvalue_to_rvalue.
2277 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
2278 _Atomic (type-name).
2279 (struct c_declspecs): Add atomic_p field.
2280 (convert_lvalue_to_rvalue): Declare.
2281 * c-typeck.c (c_type_promotes_to): Promote atomic types to
2282 corresponding atomic types.
2283 (qualify_type): Don't add _Atomic qualifiers from second argument.
2284 (comp_target_types): Do not allow _Atomic mismatches.
2285 (type_lists_compatible_p): Do not remove atomic qualifiers when
2286 comparing types.
2287 (really_atomic_lvalue, convert_lvalue_to_rvalue)
2288 (build_atomic_assign): New functions.
2289 (build_unary_op): Use build_atomic_assign for atomic increment and
2290 decrement.
2291 (build_conditional_expr): Do not treat _Atomic void as a qualified
2292 version of void.
2293 (build_modify_expr): Use build_atomic_assign for atomic LHS.
2294 (find_anonymous_field_with_type, convert_to_anonymous_field)
2295 (convert_for_assignment): Do not remove atomic qualifiers when
2296 comparing types.
2297 (digest_init): Do not accept initialization of arrays of atomic
2298 elements by string constants.
2299 (build_asm_expr): Use convert_lvalue_to_rvalue.
2300 (build_binary_op): Do not treat _Atomic void as a qualified
2301 version of void.
2302
0c249d4b
DD
23032013-11-06 DJ Delorie <dj@redhat.com>
2304
2305 * c-decl.c (locate_old_decl): If a previous conflicting decl is
2306 both explicit and builtin, print the location of the explicit one.
2307
6d7f7e0a
TB
23082013-11-05 Tobias Burnus <burnus@net-b.de>
2309
2310 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
2311 c_parser_omp_distribute, c_parser_omp_teams,
2312 c_parser_omp_target, c_parser_omp_declare): Handle
2313 -fopenmp-simd.
2314
b906f4ca
MP
23152013-11-03 Marek Polacek <polacek@redhat.com>
2316
2317 * c-decl.c (grokdeclarator): Add VLA instrumentation.
2318
ee1d5a02
JJ
23192013-11-01 Jakub Jelinek <jakub@redhat.com>
2320
2321 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
2322 check_dup_generic at the end, unless remove is true.
2323 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
2324 remove = true;.
2325 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
2326
5a9785fb
JJ
23272013-10-31 Jakub Jelinek <jakub@redhat.com>
2328
2329 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
2330 with decl that is not pointer nor array.
2331
939b37da
BI
23322013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
2333
2334 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
2335 a spawning function is found.
2336 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
2337 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
2338 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2339 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
2340 case.
2341 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
2342 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
2343 expr.
2344 (c_finish_return): Added a check to reject _Cilk_spawn in return
2345 expression.
2346 (build_cilk_spawn): New function.
2347 (build_cilk_sync): Likewise.
2348 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
2349
d4af74d4
TB
23502013-10-27 Tobias Burnus <burnus@net-b.de>
2351
2352 PR other/33426
2353 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
2354 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
2355 (c_parser_statement_after_labels): Update calls.
2356
d73749df 23572013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
2358
2359 PR other/33426
2360 * c-parser.c (c_parser_pragma, c_parser_for_statement):
2361 Handle PRAGMA_IVDEP.
2362 (c_parser_statement_after_labels): Update call.
2363
f28aa681
MP
23642013-10-24 Marek Polacek <polacek@redhat.com>
2365
2366 * c-parser.c (c_parser_struct_declaration): Add a comment.
2367 (c_parser_declarator): Don't allow _Alignas here.
2368
0645c1a2
AM
23692013-10-17 Andrew MacLeod <amacleod@redhat.com>
2370
2371 * c-parser.c: Include omp-low.h.
2372 * c-typeck.c: Likewise.
2373
568a31f2
MP
23742013-10-17 Marek Polacek <polacek@redhat.com>
2375
2376 PR c/58267
2377 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
2378 Document syntax of the array-declarator.
2379 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
2380 are not permitted.
2381 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
2382 (c_parser_struct_declaration): Likewise.
2383 (c_parser_declarator): Likewise.
2384 (c_parser_direct_declarator_inner): Likewise.
2385 (c_parser_parameter_declaration): Likewise.
2386 (c_parser_type_name): Likewise.
2387
acf0174b
JJ
23882013-10-11 Jakub Jelinek <jakub@redhat.com>
2389
2390 * c-lang.h (current_omp_declare_target_attribute): New extern
2391 decl.
2392 * c-parser.c: Include c-lang.h.
2393 (struct c_parser): Change tokens to c_token *.
2394 Add tokens_buf field. Change tokens_avail type to unsigned int.
2395 (c_parser_consume_token): If parser->tokens isn't
2396 &parser->tokens_buf[0], increment parser->tokens.
2397 (c_parser_consume_pragma): Likewise.
2398 (enum pragma_context): Add pragma_struct and pragma_param.
2399 (c_parser_external_declaration): Adjust
2400 c_parser_declaration_or_fndef caller.
2401 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
2402 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
2403 Adjust recursive call.
2404 (c_parser_struct_or_union_specifier): Use pragma_struct instead
2405 of pragma_external.
2406 (c_parser_parameter_declaration): Use pragma_param instead of
2407 pragma_external.
2408 (c_parser_compound_statement_nostart, c_parser_label,
2409 c_parser_for_statement): Adjust
2410 c_parser_declaration_or_fndef callers.
2411 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
2412 it through to c_parser_conditional_expression.
2413 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
2414 pass it through to c_parser_binary_expression. Adjust recursive
2415 call.
2416 (c_parser_binary_expression): Remove prec argument, add
2417 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
2418 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
2419 binop matches it, use build2 instead of parser_build_binary_op.
2420 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
2421 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
2422 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
2423 Handle pragma_struct and pragma_param the same as pragma_external.
2424 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
2425 (c_parser_omp_variable_list): Parse array sections for
2426 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
2427 (c_parser_omp_clause_collapse): Fully fold collapse expression.
2428 (c_parser_omp_clause_reduction): Handle user defined reductions.
2429 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
2430 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
2431 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
2432 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
2433 c_parser_omp_clause_depend, c_parser_omp_clause_map,
2434 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
2435 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
2436 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
2437 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
2438 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
2439 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
2440 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
2441 (c_parser_omp_for_loop): Add CODE argument, pass it through
2442 to c_finish_omp_for. Change last argument to cclauses,
2443 and adjust uses to grab parallel clauses from the array of all
2444 the split clauses. Adjust c_parser_binary_expression,
2445 c_parser_declaration_or_fndef and c_finish_omp_for callers.
2446 (omp_split_clauses): New function.
2447 (c_parser_omp_simd): New function.
2448 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
2449 Allow the function to be called also when parsing combined constructs,
2450 and call c_parser_omp_simd when parsing for simd.
2451 (c_parser_omp_sections_scope): If section-sequence doesn't start with
2452 #pragma omp section, require exactly one structured-block instead of
2453 sequence of statements.
2454 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
2455 Allow the function to be called also when parsing combined constructs.
2456 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
2457 Allow the function to be called also when parsing combined
2458 constructs.
2459 (c_parser_omp_taskgroup, c_parser_omp_cancel,
2460 c_parser_omp_cancellation_point, c_parser_omp_distribute,
2461 c_parser_omp_teams, c_parser_omp_target_data,
2462 c_parser_omp_target_update, c_parser_omp_target,
2463 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
2464 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
2465 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
2466 (c_parser_omp_construct): Add p_name and mask vars. Handle
2467 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
2468 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
2469 and c_parser_omp_sections callers.
2470 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
2471 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
2472 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
2473 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
2474 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
2475 OMP_CLAUSE_DEPEND.
2476 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
2477 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
2478 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
2479 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
2480 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
2481 * c-typeck.c: Include tree-inline.h.
2482 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
2483 handle_omp_array_sections_1, handle_omp_array_sections,
2484 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
2485 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
2486 user defined reductions.
2487 (c_tree_equal): New function.
2488 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
2489 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
2490 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
2491 c_check_omp_declare_reduction_r): New prototypes.
2492 * c-decl.c (current_omp_declare_target_attribute): New variable.
2493 (c_decl_attributes): New function.
2494 (start_decl, start_function): Use it instead of decl_attributes.
2495 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
2496 c_omp_reduction_decl, c_omp_reduction_lookup,
2497 c_check_omp_declare_reduction_r): New functions.
2498
0a6c2227
TT
24992013-09-25 Tom Tromey <tromey@redhat.com>
2500
2501 * Make-lang.in (c/gccspec.o): Remove.
2502 (CFLAGS-c/gccspec.o): New variable.
2503 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
2504 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
2505 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
2506
f3bc55f0
TT
25072013-09-25 Tom Tromey <tromey@redhat.com>
2508
2509 * Make-lang.in (c/gccspec.o): Don't use subshell.
2510
a24d975c
MP
25112013-09-18 Marek Polacek <polacek@redhat.com>
2512
2513 PR sanitize/58443
2514 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
2515 Remove unnecessary check.
2516
ce6923c5
MP
25172013-09-18 Marek Polacek <polacek@redhat.com>
2518
2519 PR sanitizer/58411
2520 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
2521 no_sanitize_undefined attribute.
2522
a1e51df9
KT
25232013-09-13 Kai Tietz <ktietz@redhat.com>
2524
2525 PR target/57848
2526 * c-decl.c (c_builtin_function_ext_scope): Remove
2527 wrong assumption that it is never called on prexisting
2528 symbol.
2529
0af94e6f
JR
25302013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
2531
2532 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
2533
20059c8b
GDR
25342013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2535
2536 * c-objc-common.c (c_tree_printer): Tidy.
2537
de5a5fa1
MP
25382013-08-30 Marek Polacek <polacek@redhat.com>
2539
2540 * c-typeck.c (build_binary_op): Add division by zero and shift
2541 instrumentation.
2542
2531a1d9 25432013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 2544 Joseph Myers <joseph@codesourcery.com>
2531a1d9 2545
6e2bcc98 2546 PR c/35649
2531a1d9
JR
2547 * c-typeck.c (c_common_type): Prefer double_type_node over
2548 other REAL_TYPE types with the same precision.
2549 (convert_arguments): Likewise.
2550
025311c4
GDR
25512013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
2552
2553 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
2554 (c_initialize_diagnostics): Call a destructor for the early printer.
2555
da6ca2b5
GDR
25562013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2557
2558 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
2559 printer initialization.
2560
318cda85 25612013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 2562
318cda85
BI
2563 PR c/57490
2564 * c-array-notation.c (fix_conditional_array_notations_1): Added a
2565 check for truth values.
2566 (expand_array_notation_exprs): Added truth values case. Removed an
2567 unwanted else. Added for-loop to walk through subtrees in default
2568 case.
2569
b066401f
GDR
25702013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
2571
2572 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
2573
fb48aadc
JM
25742013-07-23 Joseph Myers <joseph@codesourcery.com>
2575
2576 * c-parser.c (struct c_generic_association): Fix typo.
2577
433cc7b0
TT
25782013-07-23 Tom Tromey <tromey@redhat.com>
2579 Joseph Myers <joseph@codesourcery.com>
2580
2581 * c-parser.c (struct c_generic_association): New.
2582 (c_generic_association_d): New typedef.
2583 (c_parser_generic_selection): New function.
2584 (c_parser_postfix_expression): Handle RID_GENERIC.
2585
26d40c3d
JM
25862013-07-13 Jason Merrill <jason@redhat.com>
2587
2588 PR c++/57793
2589 * c-decl.c (finish_struct): Check for too-large class.
2590
ecdbd01a 25912013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
2592
2593 PR c/57821
2594 * c-typeck.c (set_init_index): When folding, check for index overflow.
2595
1141ed3f
BI
25962013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2597
2598 * c-parser.c (c_parser_array_notation): Removed rejection of array
2599 notations in an array of function pointers.
2600
713b46fa
BI
26012013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
2602
2603 * c-array-notation.c (make_triplet_val_inv): New function.
2604 (create_cmp_incr): Likewise.
2605 (create_array_refs): Likewise.
2606 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
2607 Also modularized common parts between functions and called the function.
2608 (build_array_notation_expr): Likewise.
2609 (fix_conditional_array_notations_1): Likewise.
2610 (fix_array_notation_expr): Likewise.
2611 (fix_array_notation_call_expr): Likewise.
2612
92f20202
MP
26132013-06-18 Marek Polacek <polacek@redhat.com>
2614
2615 PR c/57630
2616 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
2617
73a23b06
BI
26182013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
2619
2620 * c-array-notation.c (build_array_notation_expr): Reject array notation
2621 mismatch between LHS and RHS even inside a call_expr. Also, removed
2622 a couple while statements that were dead code.
2623
00b8517d
BI
26242013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
2625
2626 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
2627 excessive precision expressions in function parameters. Also removed
2628 couple unwanted while statements.
2629
1509bdda
BI
26302013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2631
2632 * c-array-notation.c (expand_array_notation_exprs): Added
2633 ARRAY_NOTATION_REF case.
2634
d60f1706
BI
26352013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2636
2637 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
2638 function to c-family/array-notation-common.c.
2639 (is_cilkplus_reduce_builtin): Likewise.
2640 (find_rank): Likewise.
2641 (extract_array_notation_exprs): Likewise.
2642 (replace_array_notations): Likewise.
2643 (find_inv_trees): Likewise.
2644 (replace_inv_trees): Likewise.
2645 (contains_array_notation_expr): Likewise.
2646 (find_correct_array_notation_type): Likewise.
2647 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
2648 (struct inv_list): Moved this to c-family/array-notation-common.c.
2649 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
2650
6d6efbb3
BI
26512013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
2652
2653 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
2654 reduction functions outside the for-loop. Added a check if the fundecl
2655 is non-NULL. Finally, removed an unwanted if-statement, and made the
2656 body unconditional.
2657
25c22937
BI
26582013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2659
2660 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
2661 condition of the if-statement matches the rank of else-block and then-
2662 block when array notations are used.
2663 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
2664 expression after the entire function body is parsed.
2665 (c_parser_expr_no_commas): Delayed creating array notation expressions
2666 to the end of function parsing.
2667 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
2668 whole if-statement instead of just the condition.
2669 (expand_array_notation_exprs): Added MODIFY_EXPR case.
2670
edd25645
BI
26712013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2672
2673 PR c/57474
2674 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
2675 array to NULL_TREE if they are unused. Also added a check for the
2676 field to be NULL before its fields are used in future.
2677
065ce7f1
RO
26782013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2679
2680 PR bootstrap/57450
2681 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
2682 (build_array_notation_expr): Likewise.
2683
36536d79
BI
26842013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2685
2686 * c-typeck.c (build_array_ref): Added a check to see if array's
2687 index is greater than one. If true, then emit an error.
2688 (build_function_call_vec): Exclude error reporting and checking
2689 for builtin array-notation functions.
2690 (convert_arguments): Likewise.
2691 (c_finish_return): Added a check for array notations as a return
2692 expression. If true, then emit an error.
2693 (c_finish_loop): Added a check for array notations in a loop
2694 condition. If true then emit an error.
2695 (lvalue_p): Added a ARRAY_NOTATION_REF case.
2696 (build_binary_op): Added a check for array notation expr inside
2697 op1 and op0. If present, we call another function to find correct
2698 type.
2699 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
2700 * c-parser.c (c_parser_compound_statement): Check if array
2701 notation code is used in tree, if so, then transform them into
2702 appropriate C code.
2703 (c_parser_expr_no_commas): Check if array notation is used in LHS
2704 or RHS, if so, then build array notation expression instead of
2705 regular modify.
2706 (c_parser_postfix_expression_after_primary): Added a check for
2707 colon(s) after square braces, if so then handle it like an array
2708 notation. Also, break up array notations in unary op if found.
2709 (c_parser_direct_declarator_inner): Added a check for array
2710 notation.
2711 (c_parser_compound_statement): Added a check for array notation in
2712 a stmt. If one is present, then expand array notation expr.
2713 (c_parser_if_statement): Likewise.
2714 (c_parser_switch_statement): Added a check for array notations in
2715 a switch statement's condition. If true, then output an error.
2716 (c_parser_while_statement): Similarly, but for a while.
2717 (c_parser_do_statement): Similarly, but for a do-while.
2718 (c_parser_for_statement): Similarly, but for a for-loop.
2719 (c_parser_unary_expression): Check if array notation is used in a
2720 pre-increment or pre-decrement expression. If true, then expand
2721 them.
2722 (c_parser_array_notation): New function.
2723 * c-array-notation.c: New file.
2724 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
2725
cd192ccc
MS
27262013-05-23 Mike Stump <mikestump@comcast.net>
2727
2728 * c-typeck.c (convert_for_assignment): Handle references to memory
2729 spaces better.
2730
427b248d
JM
27312013-05-16 Jason Merrill <jason@redhat.com>
2732
2733 * Make-lang.in (cc1$(exeext)): Use link mutex.
2734
44d90fe1
PC
27352013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
2736
2737 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
2738 to simply use OPT_Wpointer_arith.
2739 (build_unary_op): Likewise.
2740
4e7d7b3d
JJ
27412013-04-03 Jakub Jelinek <jakub@redhat.com>
2742
2743 PR c/19449
2744 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
2745 argument. If set, or it temporarily for parsing of the first
2746 argument into force_folding_builtin_constant_p.
2747 (c_parser_postfix_expression): Adjust callers.
2748
839b422f
RB
27492013-03-21 Richard Biener <rguenther@suse.de>
2750
2751 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
2752 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
2753
2ee028f1
MP
27542013-02-12 Marek Polacek <polacek@redhat.com>
2755
2756 PR c/44938
2757 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
2758 origtypes to NULL.
2759
8824edff
JJ
27602013-01-24 Jakub Jelinek <jakub@redhat.com>
2761
2762 PR c/56078
2763 * c-typeck.c (set_nonincremental_init_from_string): If
2764 constructor_max_index is NULL, treat it as if tree_int_cst_lt
2765 returned false.
2766 (process_init_element): Likewise.
2767
eadd3d0d
JJ
27682012-12-20 Jakub Jelinek <jakub@redhat.com>
2769
2770 PR c++/55619
2771 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
2772 argument, don't call default_function_array_conversion
2773 nor c_fully_fold here.
2774 (c_parser_asm_statement): Adjust callers.
2775 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
2776 and outputs here, and call default_function_array_conversion
2777 on inputs that don't need to be addressable.
2778
f8a93a2e
JJ
27792012-12-18 Jakub Jelinek <jakub@redhat.com>
2780
2781 PR c/39464
2782 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
2783 warning require that both c_common_unsigned_type as well as
2784 c_common_signed_type is the same for both mvl and mvr types.
2785
9771b263
DN
27862012-11-16 Diego Novillo <dnovillo@google.com>
2787
2788 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
2789
2790 * c-common.c: Use new vec API in vec.h.
2791 * c-common.h: Likewise.
2792 * c-gimplify.c: Likewise.
2793 * c-pragma.c: Likewise.
2794 * c-pretty-print.c: Likewise.
2795 * c-pretty-print.h: Likewise.
2796 * c-semantics.c: Likewise.
2797 * c-decl.c: Likewise.
2798 * c-parser.c: Likewise.
2799 * c-tree.h: Likewise.
2800 * c-typeck.c: Likewise.
2801
880661a4
JW
28022012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
2803
2804 PR c++/54930
2805 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
2806
077d1abe
MLI
28072012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2808
2809 PR c/53066
2810 * c-decl.c (warn_if_shadowing): Do not warn if a variable
2811 shadows a function, unless the variable is a function or a
2812 pointer-to-function.
2813
3a785c97
JJ
28142012-10-12 Jakub Jelinek <jakub@redhat.com>
2815
2816 PR c/54381
2817 * c-parser.c (struct c_tree_loc_pair): Removed.
2818 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
2819 add location_t * and tree * arguments, fill in array of 3
2820 sizeof_arg trees and corresponding locs.
2821 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
2822 c_parser_expr_list callers.
2823 (c_parser_postfix_expression_after_primary): Likewise. Pass
2824 array of 3 sizeof_arg trees and locs (corresponding to first
2825 3 arguments) to sizeof_pointer_memaccess_warning.
2826
703c8606
LC
28272012-10-09 Lawrence Crowl <crowl@google.com>
2828
2829 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
2830 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
2831 hash table.
2832
5d9de0d0
PC
28332012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
2834
2835 PR c++/54194
2836 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
2837 call.
2838
a212e43f
MG
28392012-10-09 Marc Glisse <marc.glisse@inria.fr>
2840
2841 PR c++/54427
2842 * c-typeck.c: Include c-common.h.
2843 (enum stv_conv): Moved to c-common.h.
2844 (scalar_to_vector): Moved to c-common.c.
2845 (build_binary_op): Adapt to scalar_to_vector's new prototype.
2846 * Make-lang.in: c-typeck.c depends on c-common.h.
2847
3b78de56
AC
28482012-10-04 Arnaud Charlet <charlet@adacore.com>
2849
2850 * c-decl.c (c_write_global_declarations): Fix handling of
2851 -fdump-ada-spec*.
2852
78c60e3d
SS
28532012-09-30 Sharad Singhai <singhai@google.com>
2854
2855 * c-decl.c (c_write_global_declarations): Use a different method
2856 to determine if the dump has ben initialized.
2857
9f33203d
JM
28582012-09-14 Joseph Myers <joseph@codesourcery.com>
2859
2860 PR c/54552
2861 * c-typeck.c (c_cast_expr): When casting to a type requiring
2862 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
2863 c_fully_fold first.
2864
a27d595d
JM
28652012-09-14 Joseph Myers <joseph@codesourcery.com>
2866
2867 PR c/54103
2868 * c-typeck.c (build_unary_op): Pass original argument of
2869 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
2870 any C_MAYBE_CONST_EXPR, if it has integer operands.
2871 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
2872 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
2873 to c_objc_common_truthvalue_conversion, then remove any
2874 C_MAYBE_CONST_EXPR, if they have integer operands. Use
2875 c_objc_common_truthvalue_conversion not
2876 c_common_truthvalue_conversion.
2877 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
2878 call note_integer_operands for arguments with integer operands
2879 that are not integer constants.
2880
9feb29df
JJ
28812012-09-13 Jakub Jelinek <jakub@redhat.com>
2882
2883 PR c/54559
2884 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
2885 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
2886
d409320c
JJ
28872012-08-31 Jakub Jelinek <jakub@redhat.com>
2888
2889 PR c/54428
2890 * c-convert.c (convert): Don't call fold_convert_loc if
2891 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
2892 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
2893 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
2894
6265d07c
JJ
28952012-08-24 Jakub Jelinek <jakub@redhat.com>
2896
2897 PR c/54355
2898 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
2899 for nested and empty_ok arguments in the call to
2900 c_parser_declaration_or_fndef.
2901
1a4049e7
JJ
29022012-08-17 Jakub Jelinek <jakub@redhat.com>
2903
2904 * c-tree.h (c_last_sizeof_arg): Declare.
2905 * c-parser.c (struct c_tree_loc_pair): New type.
2906 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
2907 non-NULL.
2908 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
2909 (c_parser_postfix_expression_after_primary): Likewise. Call
2910 sizeof_pointer_memaccess_warning if needed.
2911 (sizeof_ptr_memacc_comptypes): New function.
2912 * c-typeck.c (c_last_sizeof_arg): New global variable.
2913 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
2914
0229aee9
UB
29152012-07-24 Uros Bizjak <ubizjak@gmail.com>
2916
2917 * c-lang.h (lang_decl): Add variable_size GTY option.
2918
7ee2468b
SB
29192012-07-16 Steven Bosscher <steven@gcc.gnu.org>
2920
2921 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
2922 * Make-lang.in: Fix dependencies.
2923
d4a10d0a
SB
29242012-06-29 Steven Bosscher <steven@gcc.gnu.org>
2925
2926 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
2927 and add language Makefile hooks.
2928 * config-lang.in: New file.
2929 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
2930 add the required "normal" config-lang.in rules.
2931 * c-lang.h: Moved from gcc/ to here.
2932 * c-tree.h: Likewise.
2933 * c-objc-common.c: Likewise.
2934 * c-objc-common.h: Likewise.
2935 * c-typeck.c: Likewise.
2936 * c-convert.c: Likewise.
2937 * c-lang.c: Likewise.
2938 * c-aux-info.c: Likewise.
2939 * c-errors.c: Likewise.
2940 * gccspec.c: Likewise.
2941 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
2942 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
2943\f
5624e564 2944Copyright (C) 2012-2015 Free Software Foundation, Inc.
d4a10d0a
SB
2945
2946Copying and distribution of this file, with or without modification,
2947are permitted in any medium without royalty provided the copyright
2948notice and this notice are preserved.