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