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