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