Split omp-low into multiple files
[gcc.git] / gcc / c / ChangeLog
1 2016-12-14 Martin Jambor <mjambor@suse.cz>
2
3 * c-parser.c: Include omp-general.h and omp-offload.h instead of
4 omp-low.h.
5 (c_finish_oacc_routine): Adjusted call to
6 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
7 to use their new names.
8 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
9 use its new name.
10 (c_parser_oacc_update): Likewise.
11 (c_parser_omp_simd): Likewise.
12 (c_parser_omp_target_update): Likewise.
13 * c-typeck.c: Include omp-general.h instead of omp-low.h.
14 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
15 name.
16 (c_finish_omp_cancellation_point): Likewise.
17 * gimple-parser.c: Do not include omp-low.h
18
19 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
20 James Norris <jnorris@codesourcery.com>
21
22 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
23 EXIT_DATA,WAIT} are not used in compound statements.
24 (c_parser_oacc_enter_exit_data): Update diagnostics.
25
26 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
27
28 PR c++/71973
29 * c-decl.c (diagnose_mismatched_decls): Use
30 OPT_Wbuiltin_declaration_mismatch here too.
31
32 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
33 Alan Hayward <alan.hayward@arm.com>
34 David Sherwood <david.sherwood@arm.com>
35
36 * c-decl.c (merge_decls): Use SET_DECL_MODE.
37 (make_label, finish_struct): Likewise.
38
39 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
40 Richard Biener <rguenther@suse.de>
41
42 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
43 * config-lang.in (gtfiles): Add c/c-parser.h.
44 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
45 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
46 * c-parser.c (enum c_id_kind, struct c_token,
47 c_parser_next_token_is, c_parser_next_token_is_not,
48 c_parser_next_token_is_keyword,
49 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
50 Split out to ...
51 * c-parser.h: ... new header.
52 * c-parser.c: Include c-parser.h and gimple-parser.h.
53 (c_parser_peek_token, c_parser_peek_2nd_token,
54 c_token_starts_typename, c_parser_next_token_starts_declspecs,
55 c_parser_next_tokens_start_declaration, c_parser_consume_token,
56 c_parser_error, c_parser_require, c_parser_skip_until_found,
57 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
58 c_parser_type_name): Export.
59 (c_parser_tokens_buf): New function.
60 (c_parser_error): Likewise.
61 (c_parser_set_error): Likewise.
62 (c_parser_declspecs): Handle RID_GIMPLE.
63 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
64 via c_parser_parse_gimple_body.
65 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
66 c_token_starts_typename, c_parser_next_token_starts_declspecs,
67 c_parser_next_tokens_start_declaration, c_parser_consume_token,
68 c_parser_error, c_parser_require, c_parser_skip_until_found,
69 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
70 c_parser_type_name): Declare.
71 (struct c_parser): Declare forward.
72 (c_parser_tokens_buf): Declare.
73 (c_parser_error): Likewise.
74 (c_parser_set_error): Likewise.
75 * gimple-parser.c: New file.
76 * gimple-parser.h: Likewise.
77
78 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
79
80 PR c/35503
81 * c-parser.c (c_parser_postfix_expression_after_primary): Call
82 warn_for_restrict.
83
84 2016-09-11 Le-Chun Wu <lcwu@google.com>
85 Mark Wielaard <mjw@redhat.com>
86
87 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
88 to the given -Wshadow= variant.
89
90 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
91
92 * c-typeck.c: Include memmodel.h.
93
94 2016-10-13 Jakub Jelinek <jakub@redhat.com>
95
96 PR target/77957
97 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
98 instead of lhd_return_null_tree_v.
99
100 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
101
102 PR c++/69733
103 * c-decl.c (smallest_type_quals_location): New static function.
104 (grokdeclarator): Try to find the correct location for an ignored
105 qualifier.
106
107 2016-09-26 Marek Polacek <polacek@redhat.com>
108
109 PR c/7652
110 * c-decl.c (pop_scope): Add gcc_fallthrough.
111
112 2016-09-26 Marek Polacek <polacek@redhat.com>
113
114 PR c/7652
115 * c-parser.c (struct c_token): Add flags field.
116 (c_lex_one_token): Pass it to c_lex_with_flags.
117 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
118 into IFN_FALLTHROUGH.
119 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
120 attribute fallthrough after a case label or default label.
121 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
122
123 2016-09-24 Marek Polacek <polacek@redhat.com>
124
125 PR c/77490
126 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
127 have boolean value. Warn about ++/-- on booleans.
128
129 2016-09-23 Jakub Jelinek <jakub@redhat.com>
130
131 * c-parser.c (incomplete_record_decls): Remove unnecessary
132 = vNULL initialization of file scope vec.
133
134 2016-09-16 Marek Polacek <polacek@redhat.com>
135
136 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
137
138 2016-09-14 Marek Polacek <polacek@redhat.com>
139
140 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
141 (fix_array_notation_expr): Likewise.
142 * c-decl.c (finish_decl): Likewise.
143 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
144 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
145 (function_to_pointer_conversion): Use false instead of 0.
146 (convert_lvalue_to_rvalue): Likewise.
147 (parser_build_unary_op): Likewise.
148 (build_atomic_assign): Likewise.
149 (build_unary_op): Change nonconvert parameter type to bool, use
150 true/false instead of 1/0.
151 (build_binary_op): Use true instead of 1.
152
153 2016-09-13 David Malcolm <dmalcolm@redhat.com>
154
155 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
156 of add_fixit_insert to add_fixit_insert_before.
157
158 2016-09-13 Marek Polacek <polacek@redhat.com>
159
160 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
161 it.
162
163 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
164
165 PR c++/77496
166 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
167 COMPOUND_EXPR to warn_for_omitted_condop.
168
169 2016-09-07 David Malcolm <dmalcolm@redhat.com>
170
171 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
172 c_get_substring_location for this new langhook.
173
174 2016-09-02 Jakub Jelinek <jakub@redhat.com>
175
176 PR c/65467
177 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
178 flag_openmp.
179 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
180 instead of mark_exp_read on low_bound/length expression.
181 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
182 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
183 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
184 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
185 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
186 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
187 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
188 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
189 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
190 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
191 instead of mark_expr_read.
192 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
193 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
194 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
195 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
196 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
197 array section bases outside of depend clause, for depend clause
198 use convert_lvalue_to_rvalue on the base.
199 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
200 linear, aligned, map, to and from clauses.
201 (c_omp_clause_copy_ctor): New function.
202
203 2016-09-01 Marek Polacek <polacek@redhat.com>
204
205 PR c/7652
206 * c-typeck.c (composite_type): Add FALLTHRU comment.
207
208 2016-08-31 David Malcolm <dmalcolm@redhat.com>
209
210 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
211 to the insertion fixits for "struct", "union", and "enum".
212
213 2016-08-30 David Malcolm <dmalcolm@redhat.com>
214
215 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
216 rather than add_fixit_misspelled_id.
217 (undeclared_variable): Likewise.
218 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
219 now-redundant "here" params from add_fixit_insert method calls.
220 (c_parser_parameter_declaration): Likewise.
221 * c-typeck.c (build_component_ref): Remove now-redundant range
222 param from add_fixit_replace method calls.
223
224 2016-08-25 Marek Polacek <polacek@redhat.com>
225
226 * c-typeck.c (parser_build_binary_op): Pass LHS to
227 warn_logical_not_parentheses.
228
229 2016-08-25 Marek Polacek <polacek@redhat.com>
230
231 PR c/77323
232 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
233 or _FloatN or _FloatNx is not supported.
234 (finish_declspecs): Set type to integer_type_node when _FloatN or
235 _FloatNx is not supported.
236
237 2016-08-19 Joseph Myers <joseph@codesourcery.com>
238
239 PR c/32187
240 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
241 (struct c_declspecs): Add field floatn_nx_idx.
242 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
243 and _FloatNx type specifiers.
244 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
245 (c_parser_declspecs, c_parser_attribute_any_word)
246 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
247 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
248 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
249 narrower than double.
250
251 2016-08-12 Jakub Jelinek <jakub@redhat.com>
252 Martin Liska <mliska@suse.cz>
253
254 PR c/67410
255 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
256 % to determine val element to change. Assert that
257 wchar_bytes * charwidth fits into val array.
258
259 2016-08-12 Marek Polacek <polacek@redhat.com>
260
261 PR c/7652
262 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
263 (c_parser_postfix_expression): Likewise.
264 * c-typeck.c (build_unary_op): Adjust fall through comment.
265 (c_mark_addressable): Likewise.
266
267 2016-08-11 Jakub Jelinek <jakub@redhat.com>
268
269 PR c/72816
270 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
271 array member through typedef, for orig_qual_indirect == 0 clear
272 orig_qual_type.
273
274 2016-08-08 David Malcolm <dmalcolm@redhat.com>
275
276 PR c/64955
277 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
278 this up to selftest::run_c_tests.
279 (selftest::run_c_tests): New function.
280
281 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
282
283 * c-parser.c (struct oacc_routine_data): Add error_seen and
284 fndecl_seen members.
285 (c_finish_oacc_routine): Use these.
286 (c_parser_declaration_or_fndef): Adjust.
287 (c_parser_oacc_routine): Likewise. Support more C language
288 constructs, and improve diagnostics. Move pragma context
289 checking...
290 (c_parser_pragma): ... here.
291
292 * c-parser.c (struct oacc_routine_data): New.
293 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
294 Simplify code.
295 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
296 declare target" attribute.
297
298 2016-08-01 Jan Beulich <jbeulich@suse.com>
299
300 * c-fold.c (c_fully_fold_internal): Also emit shift count
301 warnings for vector types.
302 * c-typeck.c (build_binary_op): Likewise.
303
304 2016-07-29 Marek Polacek <polacek@redhat.com>
305
306 PR c/71742
307 * c-decl.c (finish_struct): Rephrase an error message.
308
309 PR c/71853
310 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
311 to error node for invalid code.
312
313 PR c/71573
314 * c-decl.c (implicitly_declare): Return decl early not only for
315 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
316
317 2016-07-29 Jakub Jelinek <jakub@redhat.com>
318
319 PR c/71969
320 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
321 on GNU extern inline functions.
322
323 2016-07-29 Marek Polacek <polacek@redhat.com>
324
325 PR c/71583
326 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
327 check expr.value.
328
329 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
330
331 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
332
333 2016-07-20 David Malcolm <dmalcolm@redhat.com>
334
335 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
336 spellcheck-tree.h
337 (best_macro_match): Likewise, converting from a typedef to a
338 subclass.
339 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
340 (lookup_name_fuzzy): Update for change of best_macro_match to a
341 subclass with a ctor that calls cpp_forall_identifiers.
342
343 2016-07-20 David Malcolm <dmalcolm@redhat.com>
344
345 * c-decl.c (implicit_decl_warning): Update for conversion of
346 return type of lookup_name_fuzzy to const char *.
347 (undeclared_variable): Likewise.
348 (lookup_name_fuzzy): Convert return type from tree to
349 const char *.
350 * c-parser.c (c_parser_declaration_or_fndef): Update for
351 conversion of return type of lookup_name_fuzzy to const char *.
352 (c_parser_parameter_declaration): Likewise.
353
354 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
355
356 * c-parser.c (c_parser_oacc_declare): Don't scan for
357 GOMP_MAP_POINTER.
358 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
359 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
360 zero-length subarrays.
361
362 2016-07-15 Jakub Jelinek <jakub@redhat.com>
363
364 PR c/71858
365 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
366 instead of FUZZY_LOOKUP_NAME.
367 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
368 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
369
370 2016-07-14 Jakub Jelinek <jakub@redhat.com>
371
372 PR c/71858
373 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
374
375 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
376
377 * c-parser.c (c_parser_generic_selection): Make type of variable
378 auto_vec.
379 (c_parser_omp_declare_simd): Likewise.
380
381 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
382
383 * c-decl.c (struct c_struct_parse_info): Change member types
384 from vec to auto_vec.
385 (start_struct): Adjust.
386 (finish_struct): Likewise.
387
388 2016-07-02 Jakub Jelinek <jakub@redhat.com>
389
390 PR c/71719
391 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
392
393 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
394
395 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
396 Move pragma context checking into...
397 (c_parser_omp_cancellation_point): ... here, and improve
398 diagnostic messages.
399 * c-typeck.c (c_finish_omp_cancel)
400 (c_finish_omp_cancellation_point): Improve diagnostic messages.
401
402 2016-06-29 Jakub Jelinek <jakub@redhat.com>
403
404 PR c/71685
405 * c-typeck.c (c_build_qualified_type): Don't clear
406 C_TYPE_INCOMPLETE_VARS for the main variant.
407
408 2016-06-28 Martin Sebor <msebor@redhat.com>
409
410 PR c/71552
411 * c-typeck.c (output_init_element): Diagnose incompatible types
412 before non-constant initializers.
413
414 2016-06-28 Jakub Jelinek <jakub@redhat.com>
415
416 * Make-lang.in: Don't cat ../stage_current if it does not exist.
417
418 2016-06-23 Andi Kleen <ak@linux.intel.com>
419
420 * Make-lang.in: Add support for autofdo.
421
422 2016-06-22 David Malcolm <dmalcolm@redhat.com>
423
424 PR c/70339
425 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
426 (implicit_decl_warning): When issuing warnings for implicit
427 declarations, attempt to provide a suggestion via
428 lookup_name_fuzzy.
429 (undeclared_variable): Likewise when issuing errors.
430 (lookup_name_in_scope): Likewise.
431 (struct edit_distance_traits<cpp_hashnode *>): New struct.
432 (best_macro_match): New typedef.
433 (find_closest_macro_cpp_cb): New function.
434 (lookup_name_fuzzy): New function.
435 * c-parser.c: Include gcc-rich-location.h.
436 (c_token_starts_typename): Split out case CPP_KEYWORD into...
437 (c_keyword_starts_typename): ...this new function.
438 (c_parser_declaration_or_fndef): When issuing errors about
439 missing "struct" etc, add a fixit. For other kinds of errors,
440 attempt to provide a suggestion via lookup_name_fuzzy.
441 (c_parser_parms_declarator): When looking ahead to detect typos in
442 type names, also reject CPP_KEYWORD.
443 (c_parser_parameter_declaration): When issuing errors about
444 unknown type names, attempt to provide a suggestion via
445 lookup_name_fuzzy.
446 * c-tree.h (c_keyword_starts_typename): New prototype.
447
448 2016-06-20 Joseph Myers <joseph@codesourcery.com>
449
450 PR c/71601
451 * c-typeck.c (build_conditional_expr): Return error_mark_node if
452 c_common_type returns error_mark_node.
453
454 2016-06-19 Martin Sebor <msebor@redhat.com>
455
456 PR c/69507
457 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
458 __alignof__ (expression).
459
460 2016-06-14 David Malcolm <dmalcolm@redhat.com>
461
462 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
463
464 2016-06-14 David Malcolm <dmalcolm@redhat.com>
465
466 * c-typeck.c (build_component_ref): Simplify fixit code by
467 using gcc_rich_location::add_fixit_misspelled_id.
468 (set_init_label): Likewise.
469
470 2016-06-13 David Malcolm <dmalcolm@redhat.com>
471
472 * c-parser.c (c_parser_initelt): Provide location of name for new
473 location_t param of set_init_label.
474 * c-tree.h (set_init_label): Add location_t param.
475 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
476 param and use it when issuing error messages about unrecognized
477 field names. Attempt to provide a fixit hint if appropriate,
478 otherwise update the error message to provide the type name.
479
480 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
481
482 PR c/71381
483 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
484 Loosen checking.
485
486 2016-06-08 Martin Sebor <msebor@redhat.com>
487 Jakub Jelinek <jakub@redhat.com>
488
489 PR c++/70507
490 PR c/68120
491 * c-typeck.c (convert_arguments): Don't promote last argument
492 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
493
494 2016-06-08 Marek Polacek <polacek@redhat.com>
495
496 PR c/71418
497 * c-decl.c (grokdeclarator): Check TYPE_P.
498
499 PR c/71426
500 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
501 code.
502
503 2016-06-07 David Malcolm <dmalcolm@redhat.com>
504
505 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
506 and structure element reference, capture the location of the
507 element name token and pass it to build_component_ref.
508 (c_parser_postfix_expression_after_primary): Likewise for
509 structure element dereference.
510 (c_parser_omp_variable_list): Likewise for
511 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
512 * c-tree.h (build_component_ref): Add location_t param.
513 * c-typeck.c (build_component_ref): Add location_t param
514 COMPONENT_LOC. Use it, if available, when issuing hints about
515 mispelled member names to provide a fixit replacement hint.
516
517 2016-06-06 Marek Polacek <polacek@redhat.com>
518
519 PR c/71362
520 * c-parser.c (c_parser_direct_declarator): Set location.
521
522 2016-06-06 Marek Polacek <polacek@redhat.com>
523
524 * c-typeck.c (comptypes_internal): Handle comparisons of
525 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
526 TYPE_REF_CAN_ALIAS_ALL.
527
528 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
529
530 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
531 arguments as addressable when async clause exists.
532
533 2016-05-30 Jakub Jelinek <jakub@redhat.com>
534
535 PR c++/71349
536 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
537 when combined with target construct.
538
539 2016-05-26 Jakub Jelinek <jakub@redhat.com>
540
541 * c-parser.c (c_parser_omp_clause_schedule): Warn if
542 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
543
544 2016-05-25 Marek Polacek <polacek@redhat.com>
545
546 PR c/71265
547 * c-decl.c (c_make_fname_decl): Don't check seen_error.
548
549 PR c/71266
550 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
551
552 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
553
554 * c-parser.c (c_parser_oacc_declare): Add support for
555 GOMP_MAP_FIRSTPRIVATE_POINTER.
556 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
557 argument with enum c_omp_region_type ort.
558 (handle_omp_array_sections): Likewise. Update call to
559 handle_omp_array_sections_1.
560 (c_finish_omp_clauses): Add specific errors and warning messages for
561 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
562 call to handle_omp_array_sections.
563
564 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
565
566 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
567
568 2016-05-24 Richard Biener <rguenther@suse.de>
569
570 PR middle-end/70434
571 PR c/69504
572 * c-typeck.c (build_array_ref): Do not complain about indexing
573 non-lvalue vectors. Adjust for function name change.
574
575 2016-05-20 Martin Sebor <msebor@redhat.com>
576
577 PR c/71115
578 * c-typeck.c (error_init): Use
579 expansion_point_location_if_in_system_header.
580 (warning_init): Same.
581
582 2016-05-19 David Malcolm <dmalcolm@redhat.com>
583
584 PR c/71171
585 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
586 in error-handling.
587 (c_parser_postfix_expression): Likewise.
588 * c-tree.h (c_expr::set_error): New method.
589 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
590 that result's range is initialized.
591
592 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
593
594 * c-typeck.c (parser_build_unary_op): Fix formatting.
595
596 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
597
598 * c-decl.c (grokdeclarator): Remove errmsg and use of
599 targetm.invalid_return_type.
600 (grokparms): Remove errmsg and use of
601 targetm.invalid_parameter_type.
602
603 2016-05-13 Joseph Myers <joseph@codesourcery.com>
604
605 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
606 function return type.
607
608 2016-05-12 Marek Polacek <polacek@redhat.com>
609
610 PR c/70756
611 * c-decl.c (build_compound_literal): Pass LOC down to
612 c_incomplete_type_error.
613 * c-tree.h (require_complete_type): Adjust declaration.
614 (c_incomplete_type_error): Likewise.
615 * c-typeck.c (require_complete_type): Add location parameter, pass it
616 down to c_incomplete_type_error.
617 (c_incomplete_type_error): Add location parameter, pass it down to
618 error_at.
619 (build_component_ref): Pass location down to c_incomplete_type_error.
620 (default_conversion): Pass location down to require_complete_type.
621 (build_array_ref): Likewise.
622 (build_function_call_vec): Likewise.
623 (convert_arguments): Likewise.
624 (build_unary_op): Likewise.
625 (build_c_cast): Likewise.
626 (build_modify_expr): Likewise.
627 (convert_for_assignment): Likewise.
628 (c_finish_omp_clauses): Likewise.
629
630 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
631
632 PR c/43651
633 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
634 is enabled.
635 * c-errors.c (pedwarn_c90): Return true if warned.
636 * c-tree.h (pedwarn_c90): Change return type to bool.
637 (enum c_declspec_word): Add new enumerator cdw_atomic.
638
639 2016-05-11 Marek Polacek <polacek@redhat.com>
640
641 PR c++/71024
642 * c-decl.c (diagnose_mismatched_decls): Factor out code to
643 diagnose_mismatched_attributes and call it.
644
645 2016-05-10 Marek Polacek <polacek@redhat.com>
646
647 PR c/70255
648 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
649 on a declaration following the definition.
650
651 2016-05-05 Jakub Jelinek <jakub@redhat.com>
652
653 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
654 parse it through to c_parser_c99_block_statement.
655 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
656 caller.
657
658 2016-05-04 Marek Polacek <polacek@redhat.com>
659
660 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
661 OPT_Wdangling_else.
662
663 2016-05-04 Marek Polacek <polacek@redhat.com>
664
665 PR c/48778
666 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
667 for macro expansions.
668
669 2016-05-03 Marek Polacek <polacek@redhat.com>
670
671 PR c/70859
672 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
673 check_builtin_function_arguments.
674
675 2016-05-03 Richard Biener <rguenther@suse.de>
676
677 * Make-lang.in (cc1-checksum.c): For stage-final re-use
678 the checksum from the previous stage.
679
680 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
681
682 * c-parser.c (c_parser_oacc_all_clauses): Update call to
683 c_finish_omp_clauses.
684 (c_parser_omp_all_clauses): Likewise.
685 (c_parser_oacc_cache): Likewise.
686 (c_parser_oacc_loop): Likewise.
687 (omp_split_clauses): Likewise.
688 (c_parser_omp_declare_target): Likewise.
689 (c_parser_cilk_all_clauses): Likewise.
690 (c_parser_cilk_for): Likewise.
691 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
692 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
693
694 2016-05-02 Marek Polacek <polacek@redhat.com>
695
696 PR c/70851
697 * c-decl.c (grokdeclarator): Diagnose when array's size has an
698 incomplete type.
699
700 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
701
702 PR middle-end/70626
703 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
704 OACC_LOOP_CLAUSE_MASK.
705 (c_parser_oacc_kernels_parallel): Update call to
706 c_oacc_split_loop_clauses.
707
708 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
709
710 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
711 argument to build_modify_expr in two cases.
712
713 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
714
715 * c-parser.c (c_parser_postfix_expression_after_primary): Call
716 warn_for_memset instead of warning directly here.
717
718 2016-04-26 Marek Polacek <polacek@redhat.com>
719
720 PR c/67784
721 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
722 out of ...
723 (c_parser_for_statement): ... here.
724 (c_parser_if_statement): Use it.
725 (c_parser_switch_statement): Use it.
726 (c_parser_while_statement): Use it.
727
728 PR c/70791
729 * c-decl.c (pushdecl): Pass LOCUS down to warning.
730
731 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
732
733 PR c++/69363
734 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
735 instead of c_finish_cilk_clauses.
736 * c-tree.h (c_finish_omp_clauses): Add new default argument.
737 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
738 floating-point variables in the linear clause for Cilk Plus.
739
740 2016-04-18 Michael Matz <matz@suse.de>
741
742 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
743 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
744
745 2016-04-15 Marek Polacek <polacek@redhat.com>
746
747 PR c/70671
748 * c-typeck.c (build_unary_op): Pass location down to error and
749 warning call.
750
751 2016-04-15 Jakub Jelinek <jakub@redhat.com>
752
753 PR c/70436
754 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
755 where needed.
756 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
757 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
758 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
759 Adjust c_parser_pragma callers.
760 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
761 caller.
762 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
763 c_parser_statement.
764 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
765 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
766 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
767 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
768 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
769 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
770 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
771 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
772 down where needed.
773 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
774 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
775 calls.
776
777 2016-04-13 Marek Polacek <polacek@redhat.com>
778
779 PR c/70436
780 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
781 adjust callers.
782 (c_parser_statement): Likewise.
783 (c_parser_c99_block_statement): Likewise.
784 (c_parser_while_statement): Likewise.
785 (c_parser_for_statement): Likewise.
786 (c_parser_if_body): Don't set IF_P here.
787 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
788 about dangling else here.
789 * c-tree.h (c_finish_if_stmt): Adjust declaration.
790 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
791 warn about dangling else here.
792
793 2016-04-04 Marek Polacek <polacek@redhat.com>
794
795 PR c/70307
796 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
797
798 2016-03-31 Marek Polacek <polacek@redhat.com>
799
800 PR c/70297
801 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
802
803 2016-03-18 David Malcolm <dmalcolm@redhat.com>
804
805 PR c/70281
806 * c-parser.c (c_parser_postfix_expression): Set the source range
807 for uses of "__builtin_types_compatible_p".
808
809 2016-03-17 Jakub Jelinek <jakub@redhat.com>
810
811 PR c/70280
812 * c-typeck.c (composite_type): Don't count void_list_node
813 into len, if the list is terminated by void_list_node, start
814 with void_list_node instead of NULL for newargs. Stop
815 at void_list_node.
816
817 2016-03-16 Marek Polacek <polacek@redhat.com>
818
819 PR c/70093
820 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
821 nested functions returning VM types.
822
823 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
824
825 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
826 when calling c_finish_omp_clauses.
827
828 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
829
830 PR c/69824
831 * c-decl.c (get_parm_info): Don't queue implicit function declarations
832 for later.
833
834 2016-03-04 Marek Polacek <polacek@redhat.com>
835
836 PR c/69798
837 * c-parser.c (c_parser_postfix_expression): Call
838 c_parser_cast_expression rather than c_parser_postfix_expression.
839
840 2016-03-01 Jakub Jelinek <jakub@redhat.com>
841
842 PR c/69796
843 PR c/69974
844 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
845 of incomplete decls to error_mark_node.
846
847 2016-02-24 Marek Polacek <polacek@redhat.com>
848
849 PR c/69819
850 * c-decl.c (finish_decl): Don't update the copy of the type of a
851 different decl type.
852
853 2016-02-23 Jakub Jelinek <jakub@redhat.com>
854
855 PR objc/69844
856 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
857 in id_kind reclassification.
858
859 2016-02-16 Jakub Jelinek <jakub@redhat.com>
860
861 PR c/69835
862 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
863
864 2016-02-16 James Norris <jnorris@codesourcery.com>
865
866 PR c/64748
867 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
868
869 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
870
871 * c-decl.c (build_null_declspecs): Zero the entire struct.
872
873 PR c/69522
874 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
875 callers changed. If nested_p is true, use it to call
876 finish_implicit_inits.
877 * c-tree.h (finish_implicit_inits): Declare.
878 * c-typeck.c (finish_implicit_inits): New function. Move code
879 from ...
880 (push_init_level): ... here.
881 (set_designator, process_init_element): Call finish_implicit_inits.
882
883 2016-02-11 Jakub Jelinek <jakub@redhat.com>
884
885 PR c/69768
886 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
887 arguments for -Waddress warning.
888
889 2016-02-04 Jakub Jelinek <jakub@redhat.com>
890
891 PR c/69669
892 * c-decl.c (finish_enum): When honoring mode attribute,
893 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
894
895 2016-01-29 Jakub Jelinek <jakub@redhat.com>
896
897 PR debug/69518
898 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
899 all type variants, not just TYPE_MAIN_VARIANT.
900
901 2016-01-27 Jakub Jelinek <jakub@redhat.com>
902
903 PR debug/66869
904 * c-decl.c (c_write_global_declarations_1): Warn with
905 warn_unused_function if static prototype without definition
906 is not C_DECL_USED.
907
908 2016-01-27 Marek Polacek <polacek@redhat.com>
909
910 PR c/68062
911 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
912 to unsigned, if needed. Add -Wsign-compare warning.
913
914 2016-01-26 Jakub Jelinek <jakub@redhat.com>
915
916 PR tree-optimization/69483
917 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
918
919 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
920
921 PR c/24293
922 * c-tree.h (incomplete_record_decls): Declare.
923 * c-parser.c (incomplete_record_decls): Define.
924 (c_parser_translation_unit): Iterate through incomplete_record_decls and
925 report error if any decl has zero size.
926 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
927 or enum type to incomplete_record_decls.
928
929 2016-01-14 Tom de Vries <tom@codesourcery.com>
930
931 PR tree-optimization/68773
932 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
933 set force_output.
934
935 2016-01-14 Marek Polacek <polacek@redhat.com>
936
937 PR c/69262
938 * c-decl.c (grokdeclarator): Provide more information for invalid
939 array declarations.
940
941 2016-01-06 David Malcolm <dmalcolm@redhat.com>
942
943 * c-parser.c (c_parser_unary_expression): For dereferences, build
944 a combined location before calling build_indirect_ref, so that
945 error reports cover the full range, manually updating the c_expr
946 src_range.
947
948 2016-01-06 Marek Polacek <polacek@redhat.com>
949
950 PR sanitizer/69099
951 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
952 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
953 NULL.
954
955 2016-01-04 Jakub Jelinek <jakub@redhat.com>
956
957 Update copyright years.
958
959 2016-01-04 Marek Polacek <polacek@redhat.com>
960
961 PR c/68908
962 * c-typeck.c (build_atomic_assign): Improve commentary. Add
963 optimization to use __atomic_fetch_* built-in if possible.
964
965 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
966
967 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
968 into...
969 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
970 all users.
971
972 2015-12-22 Marek Polacek <polacek@redhat.com>
973
974 PR c/69002
975 * c-typeck.c (build_component_ref): Warn when acessing elements of
976 atomic structures or unions.
977
978 2015-12-21 David Malcolm <dmalcolm@redhat.com>
979
980 * c-typeck.c: Include "gcc-rich-location.h".
981 (build_binary_op): In the two places that call binary_op_error,
982 create a gcc_rich_location and populate it with the location of
983 the binary op and its two operands.
984
985 2015-12-16 David Malcolm <dmalcolm@redhat.com>
986
987 * c-parser.c (c_parser_statement_after_labels): When calling
988 c_finish_return, Use the return expression's location if it has
989 one, falling back to the location of the first token within it.
990 * c-typeck.c (c_finish_return): When issuing warnings about
991 the incorrect presence/absence of a return value, issue a note
992 showing the declaration of the function.
993
994 2015-12-16 David Malcolm <dmalcolm@redhat.com>
995
996 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
997 to 4.
998 (c_parser_peek_nth_token): New function.
999 (c_parser_peek_conflict_marker): New function.
1000 (c_parser_error): Detect conflict markers and report them as such.
1001
1002 2015-12-16 David Malcolm <dmalcolm@redhat.com>
1003
1004 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
1005 to preserve range information for the primary expression
1006 in the call to c_parser_postfix_expression_after_primary.
1007
1008 2015-12-16 David Malcolm <dmalcolm@redhat.com>
1009
1010 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
1011 expression location, falling back on the first token location,
1012 rather than always using the latter.
1013
1014 2015-12-16 Marek Polacek <polacek@redhat.com>
1015
1016 PR c/64637
1017 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
1018 available.
1019
1020 2015-12-15 Marek Polacek <polacek@redhat.com>
1021
1022 PR c/68907
1023 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
1024 artificial decl.
1025
1026 2015-12-08 David Malcolm <dmalcolm@redhat.com>
1027
1028 * c-parser.c (c_parser_alignof_expression): Capture location of
1029 closing parenthesis (if any), or of end of unary expression, and
1030 use it to build a src_range for the expression.
1031
1032 2015-12-08 David Malcolm <dmalcolm@redhat.com>
1033
1034 PR c/68757
1035 * c-parser.c (c_parser_get_builtin_args): Add
1036 "out_close_paren_loc" param, and write back to it.
1037 (c_parser_postfix_expression): Capture the closing
1038 parenthesis location for RID_CHOOSE_EXPR,
1039 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
1040 RID_BUILTIN_SHUFFLE and use it to set the source range
1041 for such expressions; within RID_BUILTIN_COMPLEX set
1042 the underlying location.
1043
1044 2015-12-07 Marek Polacek <polacek@redhat.com>
1045
1046 PR c/68668
1047 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
1048 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
1049
1050 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
1051
1052 * c-tree.h (c_build_va_arg): Adjust prototype.
1053 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
1054 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
1055 parameter, adjust throughout and issue an error if EXPR is a component
1056 with reverse storage order.
1057
1058 2015-12-02 Jason Merrill <jason@redhat.com>
1059
1060 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
1061 (c_fully_fold_internal, decl_constant_value_for_optimization):
1062 Move from c-common.c.
1063 * c-tree.h: Declare decl_constant_value_for_optimization.
1064 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
1065
1066 2015-12-02 Joseph Myers <joseph@codesourcery.com>
1067
1068 PR c/68162
1069 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
1070 following link from declarator to next declarator. Track original
1071 qualified type and pass it to c_build_qualified_type.
1072 * c-typeck.c (c_build_qualified_type): Add arguments
1073 orig_qual_type and orig_qual_indirect.
1074
1075 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
1076
1077 * c-parser.c (c_parser_omp_clause_name)
1078 (c_parser_oacc_all_clauses): Alphabetical sorting.
1079
1080 2015-12-02 Jakub Jelinek <jakub@redhat.com>
1081
1082 PR c/68533
1083 * c-decl.c (get_parm_info): Use b->locus instead of input_location
1084 for diagnostics.
1085
1086 2015-12-01 Julian Brown <julian@codesourcery.com>
1087 Cesar Philippidis <cesar@codesourcery.com>
1088 James Norris <James_Norris@mentor.com>
1089
1090 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
1091 (c_parser_oacc_clause_use_device): New function.
1092 (c_parser_oacc_all_clauses): Add use_device support.
1093 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
1094 (c_parser_oacc_host_data): New function.
1095 (c_parser_omp_construct): Add host_data support.
1096 * c-tree.h (c_finish_oacc_host_data): Add prototype.
1097 * c-typeck.c (c_finish_oacc_host_data): New function.
1098 (c_finish_omp_clauses): Add use_device support.
1099
1100 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
1101
1102 PR c/67106
1103 * c-decl.c: Set TYPE_PACKED in variants.
1104
1105 2015-11-27 Martin Liska <mliska@suse.cz>
1106
1107 PR c++/68312
1108 * c-array-notation.c (fix_builtin_array_notation_fn):
1109 Use release_vec_vec instead of vec::release.
1110 (build_array_notation_expr): Likewise.
1111 (fix_conditional_array_notations_1): Likewise.
1112 (fix_array_notation_expr): Likewise.
1113 (fix_array_notation_call_expr): Likewise.
1114
1115 2015-11-27 Jakub Jelinek <jakub@redhat.com>
1116
1117 PR c/63326
1118 * c-parser.c (c_parser_compound_statement_nostart): If
1119 last_label is true, use pragma_stmt instead of pragma_compound
1120 as second c_parser_pragma argument.
1121 (c_parser_omp_ordered, c_parser_omp_target_update,
1122 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
1123 false as second argument to c_parser_skip_to_pragma_eol after
1124 diagnosing standalone directives used in pragma_stmt context.
1125
1126 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
1127
1128 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
1129 with "if (ENABLE_OFFLOADING)".
1130
1131 2015-11-23 David Malcolm <dmalcolm@redhat.com>
1132
1133 PR objc/68438
1134 * c-parser.c (c_parser_postfix_expression): Set up source ranges
1135 for various Objective-C constructs: Class.name syntax,
1136 @selector(), @protocol(), @encode(), and [] message syntax.
1137
1138 2015-11-20 David Malcolm <dmalcolm@redhat.com>
1139
1140 PR 62314
1141 * c-typeck.c (should_suggest_deref_p): New function.
1142 (build_component_ref): Special-case POINTER_TYPE when
1143 generating a "not a structure of union" error message, and
1144 suggest a "->" rather than a ".", providing a fix-it hint.
1145
1146 2015-11-19 David Malcolm <dmalcolm@redhat.com>
1147
1148 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
1149 candidate into a new function, find_closest_identifier.
1150
1151 2015-11-19 Marek Polacek <polacek@redhat.com>
1152
1153 PR c/68412
1154 * c-typeck.c (parser_build_binary_op): Properly handle
1155 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
1156
1157 2015-11-17 David Malcolm <dmalcolm@redhat.com>
1158
1159 * c-parser.c (set_c_expr_source_range): Bulletproof both
1160 overloaded implementations against NULL expr->value.
1161 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
1162 values.
1163 (c_parser_unary_expression): Likewise when handling addresses of
1164 labels.
1165 (c_parser_postfix_expression): Likewise for statement expressions,
1166 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
1167 __builtin_va_arg, and for __builtin_offset_of.
1168 (c_parser_postfix_expression_after_paren_type): Initialize expr's
1169 src_range using the range of the braced initializer.
1170 (c_parser_transaction_expression): Set src_range for "ret" to a
1171 sane pair of values.
1172
1173 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
1174
1175 * c-parser.c (c_finish_omp_declare_simd): Look for
1176 "simd" attribute as well. Update error message.
1177
1178 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1179
1180 * c-parser.c (c_parser_omp_declare_target): Adjust.
1181
1182 2015-11-14 Jakub Jelinek <jakub@redhat.com>
1183
1184 * c-typeck.c (c_finish_omp_clauses): Don't mark
1185 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
1186
1187 2015-11-14 Marek Polacek <polacek@redhat.com>
1188
1189 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
1190 * c-typeck.c: Likewise.
1191
1192 2015-11-13 David Malcolm <dmalcolm@redhat.com>
1193
1194 * c-decl.c (warn_defaults_to): Pass line_table to
1195 rich_location ctor.
1196 * c-errors.c (pedwarn_c99): Likewise.
1197 (pedwarn_c90): Likewise.
1198 * c-parser.c (set_c_expr_source_range): New functions.
1199 (c_token::get_range): New method.
1200 (c_token::get_finish): New method.
1201 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
1202 based on the range from the start of the LHS to the end of the
1203 RHS.
1204 (c_parser_conditional_expression): Likewise, based on the range
1205 from the start of the cond.value to the end of exp2.value.
1206 (c_parser_binary_expression): Call set_c_expr_source_range on
1207 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
1208 (c_parser_cast_expression): Call set_c_expr_source_range on ret
1209 based on the cast_loc through to the end of the expr.
1210 (c_parser_unary_expression): Likewise, based on the
1211 op_loc through to the end of op.
1212 (c_parser_sizeof_expression) Likewise, based on the start of the
1213 sizeof token through to either the closing paren or the end of
1214 expr.
1215 (c_parser_postfix_expression): Likewise, using the token range,
1216 or from the open paren through to the close paren for
1217 parenthesized expressions.
1218 (c_parser_postfix_expression_after_primary): Likewise, for
1219 various kinds of expression.
1220 * c-tree.h (struct c_expr): Add field "src_range".
1221 (c_expr::get_start): New method.
1222 (c_expr::get_finish): New method.
1223 (set_c_expr_source_range): New decls.
1224 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
1225 on ret for prefix unary ops.
1226 (parser_build_binary_op): Likewise, running from the start of
1227 arg1.value through to the end of arg2.value.
1228
1229 2015-11-13 Marek Polacek <polacek@redhat.com>
1230
1231 PR c/68320
1232 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
1233
1234 2015-11-13 David Malcolm <dmalcolm@redhat.com>
1235
1236 * c-typeck.c: Include spellcheck.h.
1237 (lookup_field_fuzzy_find_candidates): New function.
1238 (lookup_field_fuzzy): New function.
1239 (build_component_ref): If the field was not found, try using
1240 lookup_field_fuzzy and potentially offer a suggestion.
1241
1242 2015-11-12 James Norris <jnorris@codesourcery.com>
1243 Joseph Myers <joseph@codesourcery.com>
1244
1245 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
1246 (c_parser_omp_clause_name): Handle 'device_resident' clause.
1247 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1248 and PRAGMA_OMP_CLAUSE_LINK.
1249 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1250 and PRAGMA_OACC_CLAUSE_LINK.
1251 (OACC_DECLARE_CLAUSE_MASK): New definition.
1252 (c_parser_oacc_declare): New function.
1253
1254 2015-11-12 Marek Polacek <polacek@redhat.com>
1255
1256 PR c/67784
1257 * c-parser.c (c_parser_for_statement): Reclassify the token in
1258 a correct scope.
1259
1260 2015-11-11 Marek Polacek <polacek@redhat.com>
1261
1262 PR c/68107
1263 PR c++/68266
1264 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
1265 checking the size of an array.
1266
1267 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
1268
1269 * c-array-notation.c: Remove unused header files.
1270 * c-aux-info.c: Likewise.
1271 * c-convert.c: Likewise.
1272 * c-decl.c: Likewise.
1273 * c-errors.c: Likewise.
1274 * c-lang.c: Likewise.
1275 * c-objc-common.c: Likewise.
1276 * c-parser.c: Likewise.
1277 * c-typeck.c: Likewise.
1278 * gccspec.c: Likewise.
1279
1280 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
1281 Cesar Philippidis <cesar@codesourcery.com>
1282 James Norris <jnorris@codesourcery.com>
1283 Julian Brown <julian@codesourcery.com>
1284 Nathan Sidwell <nathan@codesourcery.com>
1285
1286 c/
1287 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
1288 routine arg.
1289 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
1290 (c_parser_pragma): Parse 'acc routine'.
1291 (OACC_ROUTINE_CLAUSE_MARK): Define.
1292 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
1293
1294 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1295
1296 PR debug/67192
1297 * c-typeck.c (c_finish_loop): For unconditional loops, set the
1298 location of the backward-goto to the start of the loop body.
1299
1300 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1301
1302 PR debug/67192
1303 * c-parser.c (c_parser_while_statement): Finish the loop before
1304 parsing ahead for misleading indentation.
1305 (c_parser_for_statement): Likewise.
1306
1307 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
1308
1309 * c-decl.c (finish_struct): If the structure has reverse storage
1310 order, rewrite the type of array fields with scalar component. Call
1311 maybe_apply_pragma_scalar_storage_order on entry.
1312 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
1313 errors on bit-fields and reverse SSO here and not...
1314 (c_mark_addressable): ...here.
1315 (output_init_element): Adjust call to initializer_constant_valid_p.
1316 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
1317
1318 2015-11-06 David Malcolm <dmalcolm@redhat.com>
1319
1320 * c-decl.c (warn_defaults_to): Update for change in signature
1321 of diagnostic_set_info.
1322 * c-errors.c (pedwarn_c99): Likewise.
1323 (pedwarn_c90): Likewise.
1324 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
1325 for textinfo::set_location.
1326
1327 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
1328 Thomas Schwinge <thomas@codesourcery.com>
1329 James Norris <jnorris@codesourcery.com>
1330
1331 * c-parser.c (c_parser_omp_clause_name): Add support for
1332 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
1333 (c_parser_omp_clause_default): Add is_oacc argument. Handle
1334 default(none) in OpenACC.
1335 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
1336 arguments.
1337 (c_parser_oacc_clause_tile): New function.
1338 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
1339 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
1340 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
1341 TILE}.
1342 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
1343 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
1344 FIRSTPRIVATE}.
1345 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
1346 (c_parser_oacc_update): Update the error message for missing clauses.
1347 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
1348 and OMP_CLAUSE_INDEPENDENT.
1349
1350 2015-11-05 Marek Polacek <polacek@redhat.com>
1351
1352 PR c/68090
1353 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
1354 deal with pre-evaluation on invalid types.
1355
1356 2015-11-05 Jakub Jelinek <jakub@redhat.com>
1357 Ilya Verbin <ilya.verbin@intel.com>
1358
1359 * c-parser.c: Include context.h and gimple-expr.h.
1360 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
1361 monotonic together with nonmonotonic.
1362 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
1363 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
1364 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
1365 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
1366 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
1367 expressions on combined target teams before the target.
1368 (c_parser_omp_declare_target): If decl has "omp declare target" or
1369 "omp declare target link" attribute, and cgraph or varpool node already
1370 exists, then set corresponding flags. Call c_finish_omp_clauses
1371 in the parenthesized extended-list syntax case.
1372 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
1373 declare target.
1374 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
1375 on OMP_CLAUSE_REDUCTION array sections.
1376 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
1377 into the constant offset, or for variable low-bound using
1378 POINTER_PLUS_EXPR. For structure element based array sections use
1379 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
1380 (c_finish_omp_clauses): Drop generic_field_head, structure
1381 elements are now always mapped even as array section bases,
1382 diagnose same var in data sharing and mapping clauses. Diagnose if
1383 linear step on declare simd is neither a constant nor a uniform
1384 parameter. Look through POINTER_PLUS_EXPR for array section
1385 reductions. Diagnose the same var or function appearing multiple
1386 times on the same directive. Fix up wording for the to clause if t
1387 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
1388 modifier on kinds other than dynamic or guided or nonmonotonic
1389 modifier together with ordered clause.
1390
1391 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
1392 Chung-Lin Tang <cltang@codesourcery.com>
1393
1394 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
1395
1396 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
1397
1398 * c-array-notation.c: Reorder #include's and remove duplicates.
1399 * c-aux-info.c: Likewise.
1400 * c-convert.c: Likewise.
1401 * c-decl.c: Likewise.
1402 * c-errors.c: Likewise.
1403 * c-lang.c: Likewise.
1404 * c-objc-common.c: Likewise.
1405 * c-parser.c: Likewise.
1406 * c-typeck.c: Likewise.
1407
1408 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
1409
1410 PR debug/66068
1411 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1412 after calling build_qualified_type.
1413
1414 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
1415 Thomas Schwinge <thomas@codesourcery.com>
1416 James Norris <jnorris@codesourcery.com>
1417 Joseph Myers <joseph@codesourcery.com>
1418 Julian Brown <julian@codesourcery.com>
1419 Bernd Schmidt <bschmidt@redhat.com>
1420
1421 * c-parser.c (c_parser_oacc_shape_clause): New.
1422 (c_parser_oacc_simple_clause): New.
1423 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
1424 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
1425
1426 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
1427 James Norris <jnorris@codesourcery.com>
1428 Cesar Philippidis <cesar@codesourcery.com>
1429
1430 PR c/64765
1431 PR c/64880
1432 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
1433 parameters, and handle these. Adjust all users.
1434 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
1435 into...
1436 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
1437 all users.
1438 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
1439 declare functions.
1440 (c_finish_omp_construct): Declare function.
1441 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
1442 Merge functions into...
1443 (c_finish_omp_construct): ... this new function.
1444
1445 2015-10-22 Richard Biener <rguenther@suse.de>
1446
1447 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
1448 before folding a MINUS_EXPR.
1449
1450 2015-10-21 Marek Polacek <polacek@redhat.com>
1451
1452 PR c/68024
1453 * c-decl.c (start_function): Warn about vararg functions without
1454 a prototype.
1455
1456 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
1457
1458 * c-typeck.c (build_conditional_expr): Use boolean vector
1459 type for vector comparison.
1460 (build_vec_cmp): New.
1461 (build_binary_op): Use build_vec_cmp for comparison.
1462
1463 2015-10-20 Marek Polacek <polacek@redhat.com>
1464
1465 * c-parser.c (is_cilkplus_vector_p): Don't define here.
1466
1467 2015-10-20 Marek Polacek <polacek@redhat.com>
1468
1469 PR c/67964
1470 * c-parser.c (c_parser_attributes): Break out of the loop if the
1471 token after an attribute isn't a comma.
1472
1473 2015-10-13 Jakub Jelinek <jakub@redhat.com>
1474 Aldy Hernandez <aldyh@redhat.com>
1475
1476 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
1477 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
1478 (c_parser_omp_variable_list): Handle structure elements for
1479 map, to and from clauses. Handle array sections in reduction
1480 clause. Formatting fixes.
1481 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
1482 if clause modifiers.
1483 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1484 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1485 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
1486 c_parser_omp_clause_is_device_ptr): New functions.
1487 (c_parser_omp_clause_ordered): Parse optional parameter.
1488 (c_parser_omp_clause_reduction): Handle array reductions.
1489 (c_parser_omp_clause_schedule): Parse optional simd modifier.
1490 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
1491 functions.
1492 (c_parser_omp_clause_linear): Parse linear clause modifiers.
1493 (c_parser_omp_clause_depend_sink): New function.
1494 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
1495 (c_parser_omp_clause_map): Parse release/delete map kinds and
1496 optional always modifier.
1497 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
1498 and c_finish_omp_clauses callers.
1499 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
1500 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
1501 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
1502 (OMP_CRITICAL_CLAUSE_MASK): Define.
1503 (c_parser_omp_critical): Parse critical clauses.
1504 (c_parser_omp_for_loop): Handle doacross loops, adjust
1505 c_finish_omp_for and c_finish_omp_clauses callers.
1506 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
1507 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
1508 (OMP_FOR_CLAUSE_MASK): Add linear clause.
1509 (c_parser_omp_for): Disallow ordered clause when combined with
1510 distribute. Disallow linear clause when combined with distribute
1511 and not combined with simd.
1512 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
1513 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
1514 parse clauses and if depend clause is found, don't parse a body.
1515 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
1516 Allow target parallel without for after it.
1517 (OMP_TASK_CLAUSE_MASK): Add priority clause.
1518 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
1519 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
1520 invalid kinds.
1521 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
1522 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
1523 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
1524 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
1525 functions.
1526 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
1527 defaultmap and is_device_ptr clauses.
1528 (c_parser_omp_target): Parse target parallel and target simd. Set
1529 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
1530 and target exit data. Diagnose invalid map kinds.
1531 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
1532 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
1533 construct.
1534 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
1535 &omp_priv.
1536 (OMP_TASKLOOP_CLAUSE_MASK): Define.
1537 (c_parser_omp_taskloop): New function.
1538 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
1539 handle PRAGMA_OMP_TASKLOOP.
1540 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
1541 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
1542 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
1543 Add IS_OMP argument, handle structure element bases, diagnose
1544 bitfields, pass IS_OMP recursively, diagnose known zero length
1545 array sections in depend clauses, handle array sections in reduction
1546 clause, diagnose negative length even for pointers.
1547 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
1548 types, pass IS_OMP down to handle_omp_array_sections_1, handle
1549 array sections in reduction clause, set
1550 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
1551 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
1552 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
1553 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
1554
1555 2015-10-06 Marek Polacek <polacek@redhat.com>
1556
1557 * c-parser.c (c_parser_statement_after_labels): Use
1558 protected_set_expr_location.
1559 (c_parser_omp_clause_num_gangs): Likewise.
1560 (c_parser_omp_clause_num_threads): Likewise.
1561 (c_parser_omp_clause_num_workers): Likewise.
1562 (c_parser_omp_clause_vector_length): Likewise.
1563 (c_parser_omp_clause_num_teams): Likewise.
1564 (c_parser_omp_clause_thread_limit): Likewise.
1565 * c-typeck.c (build_c_cast): Likewise.
1566 (c_cast_expr): Likewise.
1567
1568 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
1569
1570 * c-typeck.c (c_tree_equal): Use real_equal instead of
1571 REAL_VALUES_EQUAL.
1572
1573 2015-10-04 Jason Merrill <jason@redhat.com>
1574
1575 * c-parser.c (c_lex_one_token): Handle @synchronized.
1576 * c-decl.c (match_builtin_function_types): A declaration of a built-in
1577 can change whether the function is transaction_safe.
1578
1579 2015-10-02 Marek Polacek <polacek@redhat.com>
1580
1581 PR c/67730
1582 * c-typeck.c (convert_for_assignment): Use the expansion point
1583 location throughout.
1584
1585 2015-10-02 Marek Polacek <polacek@redhat.com>
1586
1587 PR c/64249
1588 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
1589 and pass it down to c_parser_if_statement.
1590 (c_parser_else_body): Add CHAIN parameter and pass it down to
1591 c_parser_statement_after_labels.
1592 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
1593 duplicated if-else-if conditions.
1594
1595 2015-10-01 Marek Polacek <polacek@redhat.com>
1596
1597 * c-typeck.c (convert_for_assignment): Improve commentary.
1598
1599 2015-09-30 Marek Polacek <polacek@redhat.com>
1600
1601 PR c/67730
1602 * c-typeck.c (c_finish_return): Use the expansion point location for
1603 certain "return with value" warnings.
1604
1605 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1606
1607 * c-parser.c (pragma_lex): Add loc argument.
1608
1609 2015-09-15 Marek Polacek <polacek@redhat.com>
1610
1611 PR c/67580
1612 * c-decl.c (tag_exists_p): New function.
1613 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
1614 struct/union/enum keywords are missing.
1615 * c-tree.h (tag_exists_p): Declare.
1616
1617 2015-09-15 Marek Polacek <polacek@redhat.com>
1618
1619 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
1620 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
1621 Return NULL_TREE instead of 0.
1622 (lookup_name): Return NULL_TREE instead of 0.
1623 (lookup_name_in_scope): Likewise.
1624 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
1625 (parser_xref_tag): Use false instead of 0.
1626 (start_struct): Use true instead of 1.
1627 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
1628
1629 2015-09-14 Marek Polacek <polacek@redhat.com>
1630
1631 * c-typeck.c (set_nonincremental_init_from_string): Use
1632 HOST_WIDE_INT_M1U when shifting a negative value.
1633
1634 2015-09-09 Mark Wielaard <mjw@redhat.com>
1635
1636 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
1637 parm against NULL.
1638
1639 2015-09-10 Jakub Jelinek <jakub@redhat.com>
1640
1641 PR c/67502
1642 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
1643 into OMP_FOR_PRE_BODY rather than before the loop.
1644
1645 2015-09-09 Jakub Jelinek <jakub@redhat.com>
1646
1647 PR c/67501
1648 * c-parser.c (c_parser_oacc_all_clauses,
1649 c_parser_omp_all_clauses): Remove invalid clause from
1650 list of clauses even if parser->error is set.
1651
1652 PR c/67500
1653 * c-parser.c (c_parser_omp_clause_aligned,
1654 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
1655 test for errors.
1656 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
1657 error_mark_node.
1658
1659 PR c/67495
1660 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
1661 instead of c_parser_unary_expression. If the result is !lvalue_p,
1662 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
1663
1664 2015-09-04 Marek Polacek <polacek@redhat.com>
1665
1666 PR sanitizer/67279
1667 * c-typeck.c (build_binary_op): Don't instrument static initializers.
1668
1669 2015-09-03 Martin Sebor <msebor@redhat.com>
1670
1671 PR c/66516
1672 * c-typeck.c (convert_arguments, parser_build_unary_op,
1673 build_conditional_expr, c_cast_expr, convert_for_assignment,
1674 build_binary_op, _objc_common_truthvalue_conversion): Call
1675 reject_gcc_builtin.
1676 (c_decl_implicit): Define.
1677
1678 2015-09-02 Marek Polacek <polacek@redhat.com>
1679
1680 PR c/67432
1681 * c-parser.c (c_parser_enum_specifier): Give a better error for
1682 an empty enum.
1683
1684 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
1685
1686 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
1687
1688 2015-08-12 Marek Polacek <polacek@redhat.com>
1689
1690 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
1691 LOC to it.
1692
1693 2015-08-03 Marek Polacek <polacek@redhat.com>
1694
1695 PR c/67088
1696 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
1697 Use it.
1698 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
1699
1700 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
1701
1702 * c-parser.c (c_parser_if_body): Take token_indent_info
1703 argument. Call warn_for_misleading_indentation even when the
1704 body is a semicolon. Extract token_indent_infos corresponding
1705 to the guard, body and next tokens. Adjust call to
1706 warn_for_misleading_indentation accordingly.
1707 (c_parser_else_body): Likewise.
1708 (c_parser_if_statement): Likewise.
1709 (c_parser_while_statement): Likewise.
1710 (c_parser_for_statement): Likewise.
1711
1712 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
1713 Manuel López-Ibáñez <manu@gcc.gnu.org>
1714
1715 * c-decl.c (get_parm_info): Remove static var. Update warning
1716 message.
1717
1718 2015-07-27 Marek Polacek <polacek@redhat.com>
1719
1720 PR c++/66555
1721 PR c/54979
1722 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
1723
1724 2015-07-20 Marek Polacek <polacek@redhat.com>
1725
1726 PR c++/55095
1727 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
1728 (build_binary_op): Warn about left shift overflows.
1729
1730 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
1731
1732 * c-array-notation.c: Adjust includes for flags.h changes.
1733 * c-objc-common.c: Likewise.
1734
1735 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
1736
1737 * c-array-notation.c: Adjust includes.
1738 * c-aux-info.c: Likewise.
1739 * c-convert.c: Likewise.
1740 * c-decl.c: Likewise.
1741 * c-errors.c: Likewise.
1742 * c-lang.c: Likewise.
1743 * c-objc-common.c: Likewise.
1744 * c-parser.c: Likewise.
1745 * c-typeck.c: Likewise.
1746
1747 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1748
1749 PR fortran/66605
1750 * c-decl.c (finish_function): Call do_warn_unused_parameter.
1751
1752 2015-06-29 Marek Polacek <polacek@redhat.com>
1753
1754 PR c/66322
1755 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
1756 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
1757 about -Wswitch-bool here.
1758 (do_case): Update c_add_case_label call.
1759 (c_finish_case): Update c_do_switch_warnings call.
1760
1761 2015-06-27 Marek Polacek <polacek@redhat.com>
1762
1763 * c-typeck.c: Use VECTOR_TYPE_P throughout.
1764
1765 2015-06-26 Marek Polacek <polacek@redhat.com>
1766
1767 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1768 INDIRECT_REF_P.
1769 * c-typeck.c (array_to_pointer_conversion): Likewise.
1770 (build_unary_op): Likewise.
1771 (c_finish_return): Likewise.
1772
1773 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
1774
1775 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
1776 * c-parser.c: Likewise.
1777
1778 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1779
1780 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
1781 instead of pointer_hash.
1782 (detect_field_duplicates): Likewise.
1783
1784 2015-06-25 Marek Polacek <polacek@redhat.com>
1785
1786 * c-array-notation.c: Use VAR_P throughout.
1787 * c-decl.c: Likewise.
1788 * c-objc-common.c: Likewise.
1789 * c-parser.c: Likewise.
1790 * c-typeck.c: Likewise.
1791
1792 2015-06-25 Marek Polacek <polacek@redhat.com>
1793
1794 * c-decl.c: Use is_global_var throughout.
1795 * c-parser.c: Likewise.
1796 * c-typeck.c: Likewise.
1797
1798 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
1799
1800 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
1801 * c-aux-info.c: Likewise.
1802 * c-convert.c: Likewise.
1803 * c-decl.c: Likewise.
1804 * c-errors.c: Likewise.
1805 * c-lang.c: Likewise.
1806 * c-objc-common.c: Likewise.
1807 * c-parser.c: Likewise.
1808 * c-typeck.c: Likewise.
1809
1810 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
1811
1812 PR middle-end/66325
1813 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
1814 variants.
1815
1816 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
1817
1818 * c-decl.c (pop_scope): Register the main translation unit
1819 through the new debug hook.
1820
1821 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
1822
1823 * c-array-notation.c : Adjust include files.
1824 * c-aux-info.c : Likewise.
1825 * c-convert.c : Likewise.
1826 * c-decl.c : Likewise.
1827 * c-errors.c : Likewise.
1828 * c-lang.c : Likewise.
1829 * c-lang.h : Likewise.
1830 * c-objc-common.c : Likewise.
1831 * c-parser.c : Likewise.
1832 * c-typeck.c : Likewise.
1833
1834 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
1835
1836 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
1837 immediately clobber it.
1838 (c_write_global_declarations_1): Remove call to
1839 check_global_declaration_1.
1840 (c_write_global_declarations_2): Remove.
1841 (c_write_final_cleanups): Rename from c_write_global_declarations.
1842 Remove call to finalize_compilation_unit.
1843 Remove calls to debugging hooks.
1844 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
1845 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
1846 * c-tree.h: Remove c_write_global_declarations.
1847
1848 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
1849
1850 * c-array-notation.c: Adjust includes for restructured coretypes.h.
1851 * c-aux-info.c: Likewise.
1852 * c-convert.c: Likewise.
1853 * c-decl.c: Likewise.
1854 * c-errors.c: Likewise.
1855 * c-lang.c: Likewise.
1856 * c-objc-common.c: Likewise.
1857 * c-parser.c: Likewise.
1858 * c-typeck.c: Likewise.
1859
1860 2015-06-04 Marek Polacek <polacek@redhat.com>
1861
1862 PR c/66341
1863 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
1864 it is a lvalue.
1865
1866 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1867
1868 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
1869 Warn for empty struct.
1870 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
1871
1872 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
1873
1874 * c-decl.c (start_function): Call plugin before parsing.
1875 (finish_function): Call plugin after parsing.
1876
1877 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1878
1879 PR c/49551
1880 * c-decl.c (merge_decls): Merge DECL_COMMON.
1881
1882 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
1883
1884 * Make-lang.in (check_gcc_pallelize): Define.
1885
1886 2015-05-22 Marek Polacek <polacek@redhat.com>
1887
1888 PR c/47043
1889 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
1890 attributes.
1891
1892 2015-05-21 Marek Polacek <polacek@redhat.com>
1893
1894 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
1895 DECL_BUILT_IN.
1896
1897 2015-05-20 Marek Polacek <polacek@redhat.com>
1898
1899 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
1900 * c-typeck.c: Likewise.
1901
1902 2015-05-19 Marek Polacek <polacek@redhat.com>
1903
1904 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
1905
1906 2015-05-19 Jakub Jelinek <jakub@redhat.com>
1907
1908 PR middle-end/66199
1909 * c-parser.c (c_parser_omp_for_loop): Don't add
1910 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
1911 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
1912 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
1913 constructs.
1914
1915 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
1916
1917 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
1918 swaps.
1919
1920 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
1921
1922 PR fortran/44054
1923 * c-objc-common.c (c_tree_printer): Replace locus pointer with
1924 accessor function.
1925
1926 2015-05-14 Marek Polacek <polacek@redhat.com>
1927
1928 PR c/66066
1929 PR c/66127
1930 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
1931 rather than with 0.
1932
1933 2015-05-12 David Malcolm <dmalcolm@redhat.com>
1934
1935 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
1936 to add a call to warn_for_misleading_indentation.
1937 (c_parser_else_body): Likewise, adding param "else_loc".
1938 (c_parser_if_statement): Check for misleading indentation.
1939 (c_parser_while_statement): Likewise.
1940 (c_parser_for_statement): Likewise.
1941
1942 2015-05-08 Marek Polacek <polacek@redhat.com>
1943
1944 PR c/64918
1945 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
1946 (output_init_element): Likewise.
1947
1948 2015-05-07 Marek Polacek <polacek@redhat.com>
1949
1950 PR c/65179
1951 * c-typeck.c (build_binary_op): Warn when left shifting a negative
1952 value.
1953
1954 2015-04-30 Marek Polacek <polacek@redhat.com>
1955
1956 * c-typeck.c (set_init_label): Call error_at instead of error and
1957 pass LOC to it.
1958
1959 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
1960 the type of a decl.
1961
1962 * c-typeck.c (c_build_va_arg): Clarify the error message.
1963
1964 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
1965
1966 * c-parser.c (c_parser_oacc_enter_exit_data): Use
1967 OMP_STANDALONE_CLAUSES.
1968
1969 2015-04-28 Marek Polacek <polacek@redhat.com>
1970
1971 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
1972
1973 2015-04-28 Marek Polacek <polacek@redhat.com>
1974
1975 PR c/65901
1976 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
1977
1978 2015-04-25 Marek Polacek <polacek@redhat.com>
1979
1980 PR c/52085
1981 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
1982 attribute.
1983
1984 2015-04-23 Marek Polacek <polacek@redhat.com>
1985
1986 PR c/65345
1987 * c-decl.c (set_labels_context_r): New function.
1988 (store_parm_decls): Call it via walk_tree_without_duplicates.
1989 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
1990 instead of create_tmp_var. Build TARGET_EXPR instead of
1991 COMPOUND_EXPR.
1992 (build_atomic_assign): Use create_tmp_var_raw instead of
1993 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
1994
1995 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
1996
1997 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
1998 (c_parser_omp_target_update): Add missed %> to error_at ().
1999
2000 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
2001
2002 PR target/55143
2003 * c-decl.c (c_default_pointer_mode): Remove definition.
2004 * c-tree.h (c_default_pointer_mode): Remove declaration.
2005
2006 2015-03-27 Tobias Burnus <burnus@net-b.de>
2007
2008 PR c/65586
2009 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
2010 error out.
2011 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
2012 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
2013 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
2014
2015 2015-03-19 Jakub Jelinek <jakub@redhat.com>
2016
2017 * c-decl.c (c_decl_attributes): Also add "omp declare target"
2018 attribute for DECL_EXTERNAL VAR_DECLs.
2019
2020 2015-03-11 Jakub Jelinek <jakub@redhat.com>
2021
2022 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
2023 argument.
2024
2025 2015-03-10 Jakub Jelinek <jakub@redhat.com>
2026
2027 PR c/65120
2028 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
2029 before preparing arguments to warn_logical_not_parentheses.
2030
2031 2015-03-09 Jakub Jelinek <jakub@redhat.com>
2032
2033 PR c/65120
2034 * c-typeck.c (parser_build_binary_op): Don't warn for
2035 !!x == y or !b == y where b is _Bool.
2036
2037 2015-03-09 Marek Polacek <polacek@redhat.com>
2038
2039 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
2040 * c-decl.c (grokdeclarator): Likewise.
2041 * c-typeck.c (build_binary_op): Likewise.
2042
2043 2015-02-27 Marek Polacek <polacek@redhat.com>
2044
2045 PR c/65228
2046 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
2047
2048 2015-02-14 Marek Polacek <polacek@redhat.com>
2049
2050 PR c/64768
2051 * c-decl.c (grokdeclarator): Set the range of a flexible array member
2052 declared through a typedef name.
2053
2054 2015-02-13 Marek Polacek <polacek@redhat.com>
2055
2056 PR c/65050
2057 * c-decl.c (grokdeclarator): Print also the type when giving
2058 the error message about array's incomplete element type.
2059
2060 2015-02-11 Jakub Jelinek <jakub@redhat.com>
2061
2062 PR c/64824
2063 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
2064 check in the POP macro.
2065
2066 2015-02-09 Marek Polacek <polacek@redhat.com>
2067
2068 PR c/64856
2069 * c-typeck.c (process_init_element): Don't always wrap
2070 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
2071 initializing a range of elements.
2072
2073 2015-02-04 Jakub Jelinek <jakub@redhat.com>
2074
2075 PR c/64824
2076 PR c/64868
2077 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
2078
2079 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
2080
2081 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
2082 processing enum declaration.
2083
2084 2015-01-29 Marek Polacek <polacek@redhat.com>
2085
2086 PR c/64709
2087 * c-typeck.c (pop_init_level): If constructor_elements has
2088 exactly one element with integer_zerop value, set constructor_zeroinit
2089 to 1. Remove braces around warning_init call.
2090
2091 2015-01-27 Jakub Jelinek <jakub@redhat.com>
2092
2093 PR c/64766
2094 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
2095 of FUNCTION_DECLs with error_mark_node.
2096
2097 2015-01-26 Jakub Jelinek <jakub@redhat.com>
2098
2099 PR c/64778
2100 * c-typeck.c (convert_arguments): Return -1 if there are
2101 error_args, even if we've diagnosed too many arguments.
2102
2103 2015-01-21 Richard Biener <rguenther@suse.de>
2104
2105 PR middle-end/64313
2106 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
2107 for builtins the user declared correctly.
2108
2109 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
2110 Bernd Schmidt <bernds@codesourcery.com>
2111 Cesar Philippidis <cesar@codesourcery.com>
2112 James Norris <jnorris@codesourcery.com>
2113 Jakub Jelinek <jakub@redhat.com>
2114 Ilmir Usmanov <i.usmanov@samsung.com>
2115
2116 * c-parser.c: Include "gomp-constants.h".
2117 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
2118 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
2119 Use OMP_CLAUSE_SET_MAP_KIND.
2120 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
2121 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
2122 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
2123 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
2124 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
2125 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
2126 "copyout", "create", "delete", "deviceptr", "gang", "host",
2127 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
2128 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
2129 "present_or_create", "pcreate", "seq", "self", "vector",
2130 "vector_length", "wait", "worker".
2131 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2132 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
2133 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
2134 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
2135 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
2136 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
2137 (c_parser_oacc_data_clause_deviceptr)
2138 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
2139 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
2140 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
2141 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
2142 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
2143 (c_parser_oacc_parallel, c_parser_oacc_update)
2144 (c_parser_oacc_wait): New functions.
2145 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
2146 (c_finish_oacc_data): New prototypes.
2147 * c-typeck.c: Include "gomp-constants.h".
2148 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
2149 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
2150 OMP_CLAUSE_SET_MAP_KIND.
2151 (c_finish_oacc_parallel, c_finish_oacc_kernels)
2152 (c_finish_oacc_data): New functions.
2153 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
2154 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
2155 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
2156 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
2157 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
2158 GOMP_MAP_FORCE_DEVICEPTR.
2159
2160 2015-01-09 Michael Collison <michael.collison@linaro.org>
2161
2162 * c-array-notation.c: Include hash-set.h, machmode.h,
2163 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2164 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
2165 * c-aux-info.c: Ditto.
2166 * c-convert.c: Ditto.
2167 * c-decl.c: Ditto.
2168 * c-errors.c: Ditto.
2169 * c-lang.c: Dittoxs.
2170 * c-objc-common.c: Ditto.
2171 * c-parser.c: Ditto.
2172 * c-typeck.c: Include hash-set.h, machmode.h,
2173 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2174 fold-const.h, wide-int.h, inchash.h, real.h and
2175 fixed-value.h due to flattening of tree.h.
2176
2177 2015-01-07 Marek Polacek <polacek@redhat.com>
2178
2179 PR c/64417
2180 * c-typeck.c (process_init_element): Disallow initialization of
2181 a flexible array member with a string constant if the structure
2182 is in an array.
2183
2184 2015-01-05 Jakub Jelinek <jakub@redhat.com>
2185
2186 PR sanitizer/64344
2187 * c-typeck.c (convert_for_assignment, c_finish_return): For
2188 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
2189 types also set in_late_binary_op around convert call.
2190 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
2191 to integral type casts, if not in_late_binary_op, pass c_fully_fold
2192 result on expr as last argument to ubsan_instrument_float_cast,
2193 if in_late_binary_op, don't use c_save_expr but save_expr.
2194
2195 Update copyright years.
2196
2197 2015-01-05 Marek Polacek <polacek@redhat.com>
2198
2199 PR c/64423
2200 * c-typeck.c (build_array_ref): Pass loc down to
2201 warn_array_subscript_with_type_char.
2202
2203 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
2204
2205 * c-typeck.c: New behavious for pointers to arrays with qualifiers
2206 (common-pointer-type): For pointers to arrays take qualifiers from
2207 element type.
2208 (build_conditional_expr): Add warnings for lost qualifiers.
2209 (comp-target-types): Allow pointers to arrays with different qualifiers.
2210 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
2211 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
2212 to PEDWARN_FOR_QUALIFIERS.
2213
2214 2014-12-17 Jakub Jelinek <jakub@redhat.com>
2215
2216 PR sanitizer/64289
2217 * c-convert.c: Include ubsan.h.
2218 (convert): For real -> integral casts and
2219 -fsanitize=float-cast-overflow don't call convert_to_integer, but
2220 instead instrument the float cast directly.
2221
2222 2014-11-29 Jakub Jelinek <jakub@redhat.com>
2223
2224 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
2225 c_finish_stmt_expr): Remove NULL last argument from
2226 create_tmp_var_raw and create_tmp_var calls.
2227 * c-array-notation.c (fix_builtin_array_notation_fn,
2228 build_array_notation_expr, fix_conditional_array_notations_1,
2229 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
2230
2231 2014-11-28 Marek Polacek <polacek@redhat.com>
2232
2233 PR c/63862
2234 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
2235 convert the right operand to integer type.
2236
2237 2014-11-25 Marek Polacek <polacek@redhat.com>
2238
2239 PR c/63877
2240 * c-decl.c (start_function): Disable -Wmissing-declarations warning
2241 for inline functions.
2242
2243 2014-11-21 Jakub Jelinek <jakub@redhat.com>
2244
2245 PR target/63764
2246 * c-typeck.c (build_array_ref): Adjust
2247 convert_vector_to_pointer_for_subscript caller. If it returns true,
2248 call non_lvalue_loc on the result.
2249
2250 2014-11-11 Richard Biener <rguenther@suse.de>
2251
2252 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
2253 to true.
2254
2255 2014-11-10 Andi Kleen <ak@linux.intel.com>
2256
2257 PR c/60804
2258 * c-parser.c (c_parser_statement_after_labels): Call
2259 check_no_cilk.
2260 (c_parser_if_statement): Dito.
2261 (c_parser_switch_statement): Dito.
2262 (c_parser_while_statement): Dito.
2263 (c_parser_do_statement): Dito.
2264 (c_parser_for_statement): Dito.
2265 * c-typeck.c (c_finish_loop): Dito.
2266
2267 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
2268
2269 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
2270 OPT_Wshift_count_overflow in the warnings.
2271
2272 2014-10-30 Marek Polacek <polacek@redhat.com>
2273
2274 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
2275 print the stripped version as well, if they're not the same.
2276
2277 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
2278
2279 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
2280 machine_mode.
2281
2282 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
2283
2284 * c-decl.c: Adjust include files.
2285 * c-parser.c: Ditto.
2286
2287 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
2288 Tom Tromey <tromey@redhat.com>
2289
2290 * c-tree.h (enum c_oracle_request): New.
2291 (c_binding_oracle_function): New typedef.
2292 (c_binding_oracle, c_pushtag, c_bind): Declare.
2293 * c-decl.c (c_binding_oracle): New global.
2294 (I_SYMBOL_CHECKED): New macro.
2295 (i_symbol_binding): New function.
2296 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
2297 (I_TAG_CHECKED): New macro.
2298 (i_tag_binding): New function.
2299 (I_TAG_BINDING, I_TAG_DECL): Redefine.
2300 (I_LABEL_CHECKED): New macro.
2301 (i_label_binding): New function.
2302 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
2303 (c_print_identifier): Save and restore c_binding_oracle.
2304 (c_pushtag, c_bind): New functions.
2305
2306 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
2307
2308 * c-typeck.c: Adjust include files.
2309
2310 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
2311
2312 PR c++/53061
2313 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
2314 initialization here...
2315 (c_initialize_diagnostics): ... but here. Set defaults after
2316 building pretty-printer.
2317
2318 2014-10-23 Marek Polacek <polacek@redhat.com>
2319
2320 PR c/63626
2321 * c-decl.c (pop_scope): Don't print warning in external_scope.
2322
2323 2014-10-19 Marek Polacek <polacek@redhat.com>
2324
2325 PR c/63567
2326 * c-typeck.c (output_init_element): Allow initializing objects with
2327 static storage duration with compound literals even in C99 and add
2328 pedwarn for it.
2329
2330 2014-10-17 Marek Polacek <polacek@redhat.com>
2331
2332 PR c/63567
2333 * c-typeck.c (digest_init): Allow initializing objects with static
2334 storage duration with compound literals even in C99 and add pedwarn
2335 for it.
2336
2337 2014-10-17 Marek Polacek <polacek@redhat.com>
2338
2339 PR c/63543
2340 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
2341 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
2342 error multiple times. Print the type.
2343
2344 2014-10-17 Marek Polacek <polacek@redhat.com>
2345
2346 PR c/63549
2347 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
2348 type.
2349
2350 2014-10-17 Marek Polacek <polacek@redhat.com>
2351
2352 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
2353 (start_function): Use OPT_Wimplicit_int instead of 0.
2354 (store_parm_decls_oldstyle): Likewise.
2355
2356 2014-10-17 Alan Modra <amodra@gmail.com>
2357
2358 PR middle-end/61848
2359 * c-decl.c (merge_decls): Don't merge section name or tls model
2360 to newdecl symtab node, instead merge to olddecl. Override
2361 existing olddecl section name. Set tls_model for all thread-local
2362 vars, not just OMP thread-private ones. Remove incorrect comment.
2363
2364 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
2365
2366 * c-decl.c: Adjust include files.
2367
2368 2014-10-14 DJ Delorie <dj@redhat.com>
2369
2370 * c-parser.c (c_parse_init): Add RID entries for each __intN.
2371 (c_token_starts_typename): Check all __intN, not just __int128.
2372 (c_token_starts_declspecs): Likewise.
2373 (c_parser_declspecs): Likewise.
2374 (c_parser_attribute_any_word): Likewise.
2375 (c_parser_objc_selector): Likewise.
2376 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
2377 (struct c_declspecs): Add int_n_idx field to record *which* __intN
2378 is specified.
2379 * c-decl.c (declspecs_add_type): Check for all __intN, not just
2380 __int128.
2381 (finish_declspecs): Likewise.
2382
2383 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
2384
2385 * c-parser.c (c_parser_all_labels): New function to replace
2386 the duplicate code.
2387 (c_parser_statement): Call the new function.
2388
2389 2014-10-09 Marek Polacek <polacek@redhat.com>
2390
2391 PR c/63480
2392 * c-typeck.c (pop_init_level): Don't warn about initializing
2393 with { }.
2394
2395 2014-10-07 Marek Polacek <polacek@redhat.com>
2396
2397 PR c/59717
2398 * c-decl.c (header_for_builtin_fn): New function.
2399 (implicitly_declare): Suggest which header to include.
2400
2401 2014-10-07 Marek Polacek <polacek@redhat.com>
2402
2403 * c-convert.c (convert): Use error_operand_p.
2404 * c-typeck.c (require_complete_type): Likewise.
2405 (really_atomic_lvalue): Likewise.
2406 (digest_init): Likewise.
2407 (handle_omp_array_sections_1): Likewise.
2408
2409 2014-10-03 Marek Polacek <polacek@redhat.com>
2410
2411 PR c/63453
2412 * c-decl.c (pop_scope): Don't warn about "inline function declared
2413 but never defined" for functions marked with gnu_inline attribute.
2414
2415 2014-09-25 Jakub Jelinek <jakub@redhat.com>
2416
2417 PR c++/63249
2418 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
2419 on low_bound and length.
2420
2421 2014-09-24 Marek Polacek <polacek@redhat.com>
2422
2423 PR c/61405
2424 PR c/53874
2425 * c-parser.c: Don't define CPP_KEYWORD.
2426 (c_parser_switch_statement): Pass original type to c_finish_case.
2427 * c-tree.h (c_finish_case): Update declaration.
2428 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
2429 conditionally to c_do_switch_warnings.
2430
2431 2014-09-03 Marek Polacek <polacek@redhat.com>
2432
2433 PR c/62024
2434 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
2435 conversions.
2436
2437 2014-09-02 Jakub Jelinek <jakub@redhat.com>
2438 Balaji V. Iyer <balaji.v.iyer@intel.com>
2439 Igor Zamyatin <igor.zamyatin@intel.com>
2440
2441 * c-parser.c (c_parser_cilk_for): New function.
2442 (c_parser_cilk_grainsize): Likewise.
2443 (c_get_temp_regvar): Likewise.
2444 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
2445 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
2446 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
2447 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
2448 case.
2449
2450 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
2451
2452 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
2453 with using HOST_WIDE_INT without truncation to 'int'
2454
2455 2014-08-22 Marek Polacek <polacek@redhat.com>
2456
2457 PR c++/62199
2458 * c-typeck.c (parser_build_binary_op): Adjust call to
2459 warn_logical_not_parentheses.
2460
2461 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
2462
2463 PR other/62008
2464 * c-parser.c (c_parser_array_notation): Check for correct
2465 type of an array added.
2466
2467 2014-08-19 Marek Polacek <polacek@redhat.com>
2468
2469 PR c++/62153
2470 * c-typeck.c (build_binary_op): If either operand of a comparison
2471 is a boolean expression, call maybe_warn_bool_compare.
2472
2473 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
2474
2475 PR c/45584
2476 * c-typeck.c (build_c_cast): Do a conversion even when the
2477 TYPE_MAIN_VARIANTs are the same.
2478
2479 2014-08-19 Marek Polacek <polacek@redhat.com>
2480
2481 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
2482 pedwarn_c99 instead of pedwarn.
2483 (grokfield): Likewise.
2484 (warn_defaults_to): New function.
2485 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
2486 Unconditionally call pedwarn_c99 instead of pedwarn.
2487 (start_function): Call warn_defaults_to instead of pedwarn_c99.
2488 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
2489 check flag_isoc11 before.
2490 * c-errors.c (pedwarn_c99): Change the return type to bool.
2491 Handle -Wc99-c11-compat.
2492 * c-parser.c (disable_extension_diagnostics): Handle
2493 warn_c99_c11_compat.
2494 (restore_extension_diagnostics): Likewise.
2495 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
2496 instead of pedwarn, don't check flag_isoc11 before.
2497 (c_parser_declspecs): Likewise.
2498 (c_parser_alignas_specifier): Likewise.
2499 (c_parser_alignof_expression): Likewise.
2500 (c_parser_generic_selection): Likewise.
2501 * c-tree.h (pedwarn_c99): Update declaration.
2502 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
2503 of pedwarn_c99.
2504
2505 2014-08-19 Marek Polacek <polacek@redhat.com>
2506
2507 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
2508 to pedwarn_c90.
2509 * c-errors.c: Include "opts.h".
2510 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
2511 * c-parser.c (disable_extension_diagnostics): Handle negative value
2512 of warn_c90_c99_compat, too.
2513 (restore_extension_diagnostics): Likewise.
2514 (c_parser_compound_statement_nostart): Pass
2515 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
2516
2517 2014-08-12 Marek Polacek <polacek@redhat.com>
2518
2519 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
2520 Add pedwarn.
2521 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
2522 Likewise.
2523 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
2524
2525 2014-08-10 Marek Polacek <polacek@redhat.com>
2526
2527 PR c/51849
2528 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
2529 Call pedwarn_c90 instead of pedwarn.
2530 (check_bitfield_type_and_width): Likewise.
2531 (declspecs_add_qual): Likewise.
2532 (declspecs_add_type): Likewise.
2533 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
2534 Adjust to only call pedwarn_c90.
2535 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
2536 pedwarn_c90 instead of pedwarn.
2537 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
2538 * c-parser.c (disable_extension_diagnostics): Handle
2539 warn_c90_c99_compat.
2540 (restore_extension_diagnostics): Likewise.
2541 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
2542 pedwarn_c90 instead of pedwarn.
2543 (c_parser_initelt): Likewise.
2544 (c_parser_postfix_expression): Likewise.
2545 (c_parser_postfix_expression_after_paren_type): Likewise.
2546 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
2547 * c-tree.h: Fix formatting.
2548 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
2549 pedwarn_c90 instead of pedwarn.
2550
2551 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
2552
2553 * c-typeck.c: Remove include of pointer-set.h.
2554
2555 2014-08-07 Marek Polacek <polacek@redhat.com>
2556
2557 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
2558
2559 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2560
2561 * c-typeck.c: Use hash_map instead of pointer_map.
2562
2563 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2564
2565 * c-decl.c: Use hash_set instead of pointer_set.
2566
2567 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
2568
2569 PR middle-end/61455
2570 * c-array-notation.c (expand_array_notations): Handling
2571 of DECL_EXPR added.
2572
2573 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
2574
2575 PR c++/60517
2576 * c-typeck.c (c_finish_return): Return 0 instead of the address of
2577 a local variable.
2578
2579 2014-07-30 Tom Tromey <tromey@redhat.com>
2580
2581 * c-typeck.c (struct constructor_stack) <designator_depth>: New
2582 field.
2583 (really_start_incremental_init, push_init_level): Initialize
2584 designator_depth.
2585 (pop_init_level): Set global designator_depth.
2586 (process_init_element): Check for designated_init attribute.
2587
2588 2014-07-20 Marek Polacek <polacek@redhat.com>
2589
2590 PR c/61852
2591 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
2592 (implicitly_declare): Pass location to implicit_decl_warning.
2593
2594 2014-07-14 Jakub Jelinek <jakub@redhat.com>
2595
2596 PR middle-end/61294
2597 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
2598 If non-NULL, call c_parser_check_literal_zero.
2599 (c_parser_check_literal_zero): New function.
2600 (c_parser_postfix_expression_after_primary): Adjust
2601 c_parser_expr_list caller, handle -Wmemset-transposed-args.
2602
2603 2014-07-06 Marek Polacek <polacek@redhat.com>
2604
2605 PR c/6940
2606 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
2607 * c-tree.h (C_ARRAY_PARAMETER): Define.
2608 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
2609 function parameter.
2610
2611 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
2612 Chen Gang <gang.chen.5i5j@gmail.com>
2613
2614 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
2615 releasing symbol.
2616
2617 2014-07-01 Marek Polacek <polacek@redhat.com>
2618
2619 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
2620 instead of 0 to WARN_FOR_ASSIGNMENT.
2621
2622 2014-07-01 Marek Polacek <polacek@redhat.com>
2623
2624 PR c/58286
2625 * c-typeck.c (convert_for_assignment): Pass
2626 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
2627
2628 2014-06-30 Marek Polacek <polacek@redhat.com>
2629
2630 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
2631 has no_sanitize_undefined attribute.
2632
2633 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
2634
2635 PR middle-end/57541
2636 * c-array-notation.c (fix_builtin_array_notation_fn):
2637 Check for 0 arguments in builtin call. Check that bultin argument is
2638 correct.
2639 * c-parser.c (c_parser_array_notation): Check for incorrect initial
2640 index.
2641
2642 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
2643
2644 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
2645 qualifiers in __auto_type for atomic types.
2646 (c_parser_typeof_specifier): Discard all type qualifiers in
2647 __typeof__ for atomic types.
2648
2649 2014-06-25 Marek Polacek <polacek@redhat.com>
2650
2651 PR c/61162
2652 * c-parser.c (c_parser_statement_after_labels): Pass the location of
2653 the return expression to c_finish_return.
2654
2655 2014-06-25 Jakub Jelinek <jakub@redhat.com>
2656
2657 * c-typeck.c (c_finish_omp_clauses): Make sure
2658 OMP_CLAUSE_LINEAR_STEP has correct type.
2659
2660 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
2661
2662 * c-decl.c: Adjust.
2663
2664 2014-06-24 Jakub Jelinek <jakub@redhat.com>
2665
2666 * c-parser.c (c_parser_omp_for_loop): For
2667 #pragma omp parallel for simd move lastprivate clause from parallel
2668 to for rather than simd.
2669
2670 2014-06-23 Marek Polacek <polacek@redhat.com>
2671
2672 * c-typeck.c (parser_build_binary_op): Don't call
2673 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
2674
2675 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
2676
2677 * c-parser.c (c_parser_omp_threadprivate): Likewise.
2678 * c-decl.c (merge_decls): Likewise.
2679
2680 2014-06-09 Marek Polacek <polacek@redhat.com>
2681
2682 PR c/36446
2683 * c-typeck.c (error_init): Call inform instead of error_at.
2684 (pedwarn_init): Call inform instead of pedwarn.
2685 (warning_init): Call inform instead of warning_at.
2686
2687 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
2688
2689 * c-decl.c (merge_decls): Use set_decl_section_name.
2690 (duplicate_decls): Remove node if it exists.
2691
2692 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
2693
2694 PR c/53119
2695 * c-typeck.c (push_init_level, process_init_element,
2696 pop_init_level): Correct check for zero initialization, move
2697 missing brace warning to respect zero initialization.
2698
2699 2014-06-05 Marek Polacek <polacek@redhat.com>
2700
2701 PR c/56724
2702 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
2703
2704 2014-06-05 Marek Polacek <polacek@redhat.com>
2705
2706 PR c/49706
2707 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
2708 on the left hand side operand of a comparison.
2709
2710 2014-06-05 Marek Polacek <polacek@redhat.com>
2711
2712 PR c/48062
2713 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
2714 Print note only if the warning was printed.
2715
2716 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
2717
2718 PR c/58942
2719 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
2720 with a pointer.
2721
2722 2014-06-03 Marek Polacek <polacek@redhat.com>
2723
2724 PR c/60439
2725 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
2726 c_start_case.
2727 * c-tree.h (c_start_case): Update.
2728 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
2729 switch condition has boolean value.
2730
2731 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
2732
2733 * c-decl.c: Include builtins.h.
2734 * c-parser.c: Likewise.
2735
2736 2014-05-27 Marek Polacek <polacek@redhat.com>
2737
2738 PR c/56724
2739 * c-typeck.c (convert_arguments): Get location of a parameter. Change
2740 error and warning calls to error_at and warning_at. Pass location of
2741 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
2742 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
2743 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
2744
2745 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
2746
2747 PR c/61191
2748 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
2749 function parameters.
2750
2751 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
2752
2753 * c-decl.c (merge_decls): Preserve symtab node pointers.
2754 (duplicate_decls): Free new decl.
2755
2756 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
2757
2758 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
2759 initialization.
2760
2761 * c-parser.c (c_parser_omp_target): Return bool values.
2762
2763 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
2764
2765 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
2766 num_teams_loc variable to num_thread_limit_loc.
2767
2768 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2769
2770 * c-array-notation.c (expand_array_notations): Use void_node
2771 instead of void_zero_node.
2772
2773 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
2774
2775 * c-decl.c (finish_struct): Adjust.
2776 (finish_enum): Likewise.
2777 (bind): Adjust.
2778 (record_inline_static): Likewise.
2779 (push_scope): Likewise.
2780 (make_label): Likewise.
2781 (lookup_label_for_goto): Likewise.
2782 (finish_struct): Likewise.
2783 (finish_enum): Likewise.
2784 (store_parm_decls): Likewise.
2785 (c_push_function_context): Likewise.
2786 * c-lang.h: Remove usage of variable_size gty attribute.
2787 * c-parser.c (c_parse_init): Adjust.
2788 (c_parse_file): Likewise.
2789
2790 2014-05-13 Marek Polacek <polacek@redhat.com>
2791
2792 PR c/61162
2793 * c-typeck.c (convert_for_assignment): Pass location to
2794 WARN_FOR_ASSIGNMENT instead of input_location.
2795
2796 2014-05-10 Marek Polacek <polacek@redhat.com>
2797
2798 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
2799 maybe_warn_string_init.
2800 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
2801 maybe_warn_string_init.
2802 * c-tree.h (maybe_warn_string_init): Update declaration.
2803 * c-typeck.c (maybe_warn_string_init): Add location parameter.
2804 Call pedwarn_init with loc instead of with input_location.
2805 (digest_init): Pass init_loc to maybe_warn_string_init.
2806 (pop_init_level): Call pedwarn_init with loc instead of with
2807 input_location.
2808 (set_init_index): Likewise.
2809 (process_init_element): Likewise.
2810
2811 2014-05-09 Marek Polacek <polacek@redhat.com>
2812
2813 PR c/61096
2814 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
2815 (c_parser_initelt): Pass location to set_init_label. Pass array index
2816 location to set_init_index.
2817 * c-tree.h (push_init_level): Update declaration.
2818 (pop_init_level): Likewise.
2819 (set_init_index): Likewise.
2820 (set_init_label): Likewise.
2821 * c-typeck.c (error_init): Add location parameter. Call error_at
2822 instead of error.
2823 (digest_init): Pass init_loc to error_init.
2824 (really_start_incremental_init):
2825 (push_init_level): Add location parameter. Pass loc to pop_init_level
2826 and error_init.
2827 (pop_init_level): Likewise.
2828 (set_designator): Add location parameter. Pass loc to pop_init_level,
2829 push_init_level, and error_init.
2830 (set_init_index): Add location parameter. Pass loc to error_init and
2831 set_designator.
2832 (set_init_label): Likewise.
2833 (output_init_element): Pass loc to error_init.
2834 (process_init_element): Pass loc to error_init, pop_init_level,
2835 pedwarn_init, and push_init_level.
2836
2837 2014-05-09 Marek Polacek <polacek@redhat.com>
2838
2839 PR c/50459
2840 * c-parser.c (c_parser_attributes): Parse the arguments as an
2841 expression-list if the attribute takes identifier.
2842
2843 2014-05-08 Marek Polacek <polacek@redhat.com>
2844
2845 PR c/61053
2846 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
2847 TYPE_ALIGN_UNIT.
2848
2849 2014-05-08 Marek Polacek <polacek@redhat.com>
2850
2851 PR c/61077
2852 * c-decl.c (start_function): Warn for _Atomic-qualified return type
2853 of main.
2854
2855 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2856 Mike Stump <mikestump@comcast.net>
2857 Richard Sandiford <rdsandiford@googlemail.com>
2858
2859 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
2860 (finish_enum): Use wide-int interfaces.
2861 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
2862 * c-typeck.c (build_c_cast): Likewise.
2863 (set_nonincremental_init_from_string): Likewise.
2864 (c_tree_equal): Likewise.
2865
2866 2014-05-02 Marek Polacek <polacek@redhat.com>
2867
2868 PR c/25801
2869 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
2870 Return size_one_node when the type is not complete.
2871 (pointer_diff): Remove comment.
2872 (build_unary_op): Improve error messages.
2873
2874 2014-05-02 Marek Polacek <polacek@redhat.com>
2875
2876 * c-typeck.c (c_finish_return): Separate warning_at calls.
2877
2878 2014-05-02 Marek Polacek <polacek@redhat.com>
2879
2880 * c-tree.h (error_init): Remove declaration.
2881 (pedwarn_init): Likewise.
2882 * c-typeck.c (error_init): Make static and move above.
2883 (pedwarn_init): Likewise.
2884 (warning_init): Move above.
2885 (maybe_warn_string_init): Likewise.
2886
2887 2014-05-01 Jeff Law <law@redhat.com>
2888
2889 Revert:
2890
2891 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2892 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
2893 avoid goto.
2894
2895 2014-05-02 Marek Polacek <polacek@redhat.com>
2896
2897 PR c/60784
2898 * c-typeck.c (push_init_level): Set constructor_designated to
2899 p->designated for structures.
2900
2901 2014-05-01 Marek Polacek <polacek@redhat.com>
2902
2903 PR c/60915
2904 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
2905 function-definition has an attribute after the declarator.
2906
2907 2014-05-01 Marek Polacek <polacek@redhat.com>
2908
2909 PR c/60257
2910 * c-typeck.c (warning_init): Add location_t parameter. Call
2911 warning_at instead of warning.
2912 (push_init_level): Pass input_location to warning_init.
2913 (add_pending_init): Add location_t parameter. Pass loc to
2914 warning_init.
2915 (set_nonincremental_init): Pass input_location to add_pending_init.
2916 (set_nonincremental_init_from_string): Likewise.
2917 (output_init_element): Pass loc to warning_init and to
2918 add_pending_init.
2919
2920 2014-05-01 Marek Polacek <polacek@redhat.com>
2921
2922 PR c/43395
2923 * c-typeck.c (c_finish_return): Distinguish between label and variable
2924 when warning about returning local address.
2925
2926 2014-05-01 Marek Polacek <polacek@redhat.com>
2927
2928 PR c/29467
2929 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
2930 in C89 mode.
2931
2932 2014-05-01 Marek Polacek <polacek@redhat.com>
2933
2934 PR c/43245
2935 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
2936 instead of 0 to WARN_FOR_QUALIFIERS.
2937
2938 2014-05-01 Marek Polacek <polacek@redhat.com>
2939
2940 PR c/56989
2941 * c-typeck.c (default_conversion): Use better location for
2942 error call.
2943
2944 2014-04-30 Marek Polacek <polacek@redhat.com>
2945
2946 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
2947 also when SANITIZE_FLOAT_DIVIDE is on.
2948
2949 2014-04-30 Marek Polacek <polacek@redhat.com>
2950
2951 PR c/60139
2952 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
2953 and pedwarn_init. Use loc insted of input_location.
2954
2955 2014-04-30 Marek Polacek <polacek@redhat.com>
2956
2957 PR c/60351
2958 * c-typeck.c (build_binary_op): Use location when warning about
2959 shift count.
2960
2961 2014-04-25 Marek Polacek <polacek@redhat.com>
2962
2963 PR c/18079
2964 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
2965 always_inline/noinline and hot/cold attributes.
2966
2967 2014-04-25 Marek Polacek <polacek@redhat.com>
2968
2969 PR c/60114
2970 * c-parser.c (c_parser_initelt): Pass input_location to
2971 process_init_element.
2972 (c_parser_initval): Pass loc to process_init_element.
2973 * c-tree.h (process_init_element): Adjust declaration.
2974 * c-typeck.c (push_init_level): Pass input_location to
2975 process_init_element.
2976 (pop_init_level): Likewise.
2977 (set_designator): Likewise.
2978 (output_init_element): Add location_t parameter. Pass loc to
2979 digest_init.
2980 (output_pending_init_elements): Pass input_location to
2981 output_init_element.
2982 (process_init_element): Add location_t parameter. Pass loc to
2983 output_init_element.
2984
2985 2014-04-24 Jakub Jelinek <jakub@redhat.com>
2986
2987 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
2988 atomic-clause, allow comma in between atomic-clause and
2989 seq_cst.
2990
2991 2014-04-22 Jakub Jelinek <jakub@redhat.com>
2992
2993 PR c/59073
2994 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
2995 fails, don't set OM_PARALLEL_COMBINED and return NULL.
2996
2997 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
2998
2999 PR middle-end/60469
3000 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3001 create_tmp_var instead build_decl for creating temps.
3002 (build_array_notation_expr): Likewise.
3003 (fix_conditional_array_notations_1): Likewise.
3004 (fix_array_notation_expr): Likewise.
3005 (fix_array_notation_call_expr): Likewise.
3006
3007 2014-03-28 Jakub Jelinek <jakub@redhat.com>
3008
3009 PR c++/60689
3010 * c-tree.h (c_build_function_call_vec): New prototype.
3011 * c-typeck.c (build_function_call_vec): Don't call
3012 resolve_overloaded_builtin here.
3013 (c_build_function_call_vec): New wrapper function around
3014 build_function_call_vec. Call resolve_overloaded_builtin here.
3015 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
3016 Call c_build_function_call_vec instead of build_function_call_vec.
3017 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3018 * c-decl.c (finish_decl): Likewise.
3019
3020 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3021
3022 PR c/55383
3023 * c-typeck.c: Use correct format string in cast-qual warning
3024
3025 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
3026
3027 * c-decl.c (c_decl_attributes): Use
3028 lang_hooks.types.omp_mappable_type.
3029 * c-typeck.c (c_finish_omp_clauses): Likewise.
3030
3031 2014-03-06 Marek Polacek <polacek@redhat.com>
3032
3033 PR c/60197
3034 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
3035 of checking tree code.
3036
3037 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3038
3039 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
3040 (c_parser_parameter_declaration): Likewise.
3041
3042 2014-02-19 Marek Polacek <polacek@redhat.com>
3043
3044 PR c/60195
3045 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
3046 Call mark_exp_read on exp.value.
3047 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
3048 TREE_ADDRESSABLE on old instead of val.
3049 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
3050
3051 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3052
3053 * c-parser.c (c_parser_get_builtin_args): Replace calls to
3054 C_EXPR_APPEND by vec_safe_push.
3055 * c-tree.h (C_EXPR_APPEND): Remove.
3056
3057 2014-01-31 Marek Polacek <polacek@redhat.com>
3058
3059 PR c/59963
3060 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
3061 build_function_call_vec.
3062 (build_function_call): Likewise.
3063 (build_atomic_assign): Likewise.
3064 (build_function_call_vec): Add arg_loc parameter. Use it.
3065 (convert_arguments): Likewise.
3066 (convert_for_assignment): Rename rhs_loc to expr_loc.
3067 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
3068 (c_parser_objc_keywordexpr): Likewise.
3069 (c_parser_postfix_expression_after_primary): Call
3070 build_function_call_vec with expr_loc rather than op_loc.
3071 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
3072 build_function_call_vec.
3073 (c_parser_expr_list): Add locations parameter. Fill it with locations
3074 of function arguments.
3075 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
3076
3077 2014-01-30 Marek Polacek <polacek@redhat.com>
3078
3079 PR c/59940
3080 * c-typeck.c (build_function_call_vec): Use loc parameter.
3081 (convert_arguments): Add location parameter. Use it.
3082 (ep_convert_and_check): Likewise.
3083 (build_atomic_assign): Adjust convert_for_assignment call.
3084 (build_modify_expr): Likewise.
3085 (digest_init): Likewise.
3086 (c_finish_return): Likewise.
3087 (build_conditional_expr): Adjust ep_convert_and_check calls.
3088 (convert_for_assignment): Add rhs_loc parameter. Use it.
3089 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
3090 calls.
3091
3092 2014-01-30 Richard Biener <rguenther@suse.de>
3093
3094 PR c/59905
3095 * c-typeck.c (build_function_call_vec): Do not replace calls
3096 to a function via an incompatible type with a runtime abort.
3097
3098 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
3099
3100 * c-parser.c (c_parser_declaration_or_fndef): Replaced
3101 flag_enable_cilkplus with flag_cilkplus.
3102 (c_parser_direct_declarator_inner): Likewise.
3103 (c_parser_attribute_any_word): Likewise.
3104 (c_parser_attributes): Likewise.
3105 (c_parser_compound_statement): Likewise.
3106 (c_parser_statement_after_labels): Likewise.
3107 (c_parser_if_statement): Likewise.
3108 (c_parser_switch_statement): Likewise.
3109 (c_parser_do_statement): Likewise.
3110 (c_parser_for_statement): Likewise.
3111 (c_parser_unary_expression): Likewise.
3112 (c_parser_postfix_expression): Likewise.
3113 (c_parser_postfix_expression_after_primary): Likewise.
3114 (c_parser_postfix_expression_after_primary): Likewise.
3115 (c_parser_omp_clause_name): Likewise.
3116 (c_finish_omp_declare_simd): Likewise.
3117 (c_parser_cilk_verify_simd): Likewise.
3118 * c-typeck.c (build_array_ref): Likewise.
3119 (build_function_call_vec): Likewise.
3120 (convert_arguments): Likewise.
3121 (build_compound_expr): Likewise.
3122 (c_finish_return): Likewise.
3123 (c_finish_if_stmt): Likewise.
3124 (c_finish_loop): Likewise.
3125 (build_binary_op): Likewise.
3126
3127 2014-01-23 Marek Polacek <polacek@redhat.com>
3128
3129 PR c/59846
3130 * c-typeck.c (parser_build_binary_op): Use location instead of
3131 input_location.
3132 (build_binary_op): Pass location to shorten_compare.
3133
3134 2014-01-23 Marek Polacek <polacek@redhat.com>
3135
3136 PR c/58346
3137 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3138 an empty aggregate.
3139
3140 2014-01-23 Marek Polacek <polacek@redhat.com>
3141
3142 PR c/59871
3143 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
3144 of a comma expression.
3145 (emit_side_effect_warnings): Likewise.
3146
3147 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3148
3149 PR c/59825
3150 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
3151 function to use walk_tree and moved a lot of its functionality to
3152 expand_array_notations.
3153 (expand_array_notations): New function.
3154
3155 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3156
3157 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
3158 attribute an attribute without value.
3159
3160 2014-01-23 Jakub Jelinek <jakub@redhat.com>
3161
3162 PR middle-end/58809
3163 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
3164 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3165
3166 2014-01-22 Marek Polacek <polacek@redhat.com>
3167
3168 PR c/59891
3169 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
3170 of remove_c_maybe_const_expr on op1 and op2.
3171
3172 2014-01-15 Jakub Jelinek <jakub@redhat.com>
3173
3174 PR c/58943
3175 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
3176 effects, preevaluate rhs using SAVE_EXPR first.
3177
3178 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
3179
3180 PR c++/59631
3181 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
3182 statements with if-elseif statements.
3183
3184 2014-01-06 Marek Polacek <polacek@redhat.com>
3185
3186 PR c/57773
3187 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
3188 defined bit-field types only in ISO C.
3189
3190 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3191
3192 Update copyright years
3193
3194 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3195
3196 * c-array-notation.c: Use the standard form for the copyright notice.
3197
3198 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
3199
3200 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
3201 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
3202 field in parser is not empty. If not-empty, call the function
3203 c_parser_finish_omp_declare_simd.
3204 (c_parser_cilk_clause_vectorlength): Modified function to be shared
3205 between SIMD-enabled functions and #pragma simd. Added new parameter.
3206 (c_parser_cilk_all_clauses): Modified the usage of the function
3207 c_parser_cilk_clause_vectorlength as mentioned above.
3208 (c_parser_cilk_simd_fn_vector_attrs): New function.
3209 (c_finish_cilk_simd_fn_tokens): Likewise.
3210 (is_cilkplus_vector_p): Likewise.
3211 (c_parser_omp_clause_name): Added checking for "vectorlength,"
3212 "nomask," and "mask" strings in clause name.
3213 (c_parser_omp_all_clauses): Added 3 new case statements:
3214 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
3215 PRAGMA_CILK_CLAUSE_NOMASK.
3216 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
3217 check for vector attribute and if so call the function
3218 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
3219 called the function c_finish_cilk_simd_fn_tokens.
3220 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
3221 parser field is non-empty. If so, parse them as you would parse
3222 the omp declare simd pragma.
3223 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
3224 Added a check when step is a parameter and flag it as error.
3225 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
3226 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
3227 pragma_omp_clause.
3228
3229 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
3230
3231 * c-parser.c (c_parser_omp_parallel): Fix description.
3232
3233 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
3234
3235 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
3236 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3237 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
3238 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
3239
3240 2013-12-04 Joseph Myers <joseph@codesourcery.com>
3241
3242 PR c/52023
3243 * c-parser.c (c_parser_alignas_specifier): Use
3244 c_sizeof_or_alignof_type instead of c_alignof.
3245 (c_parser_alignof_expression): Likewise, with min_alignof
3246 parameter depending on alignof spelling used.
3247
3248 2013-12-04 Marek Polacek <polacek@redhat.com>
3249
3250 PR c/54113
3251 * c-decl.c (start_function): Don't warn for missing prototype for
3252 inline functions.
3253
3254 2013-12-03 Marek Polacek <polacek@redhat.com>
3255
3256 PR c/59351
3257 * c-decl.c (build_compound_literal): Allow compound literals with
3258 empty initial value.
3259
3260 2013-12-02 Joseph Myers <joseph@codesourcery.com>
3261
3262 PR c/58235
3263 * c-typeck.c (build_modify_expr): Diagnose assignment to
3264 expression with array type.
3265
3266 2013-11-29 Joseph Myers <joseph@codesourcery.com>
3267
3268 PR c/42262
3269 * c-typeck.c (process_init_element): Do not treat a string as
3270 initializing a whole array when used with a designator for an
3271 individual element.
3272
3273 2013-11-29 Joseph Myers <joseph@codesourcery.com>
3274
3275 PR c/57574
3276 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
3277 an inline function following a static declaration.
3278
3279 2013-11-28 Jakub Jelinek <jakub@redhat.com>
3280
3281 PR c/59310
3282 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
3283 to p_name before calling c_parser_omp_teams instead of after.
3284 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
3285 argument. Remove unused p_name variable.
3286
3287 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
3288 Jakub Jelinek <jakub@redhat.com>
3289
3290 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
3291 external_scope is NULL.
3292
3293 2013-11-27 Tom de Vries <tom@codesourcery.com>
3294 Marc Glisse <marc.glisse@inria.fr>
3295
3296 PR c++/59032
3297 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
3298
3299 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
3300
3301 * c-typeck.c: Add required include files from gimple.h.
3302
3303 2013-11-22 David Malcolm <dmalcolm@redhat.com>
3304
3305 * c-decl.c (define_label, shadow_tag_warned)
3306 (check_bitfield_type_and_width, grokdeclarator, grokparms,
3307 store_parm_decls_newstyle, store_parm_decls_oldstyle)
3308 (declspecs_add_type): Remove use of in_system_header macro.
3309 * c-parser.c (c_parser_unary_expression): Likewise.
3310 * c-typeck.c (store_init_value, process_init_element)
3311 (c_start_case): Likewise.
3312
3313 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
3314 macro.
3315
3316 * c-parser.c (c_parser_set_source_position_from_token): Remove
3317 reference to in_system_header from comment.
3318
3319 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3320
3321 * c-decl.c (grokdeclarator): Update comment to refer to
3322 tree_to_[su]hwi rather than tree_low_cst.
3323
3324 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3325
3326 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
3327 tree_to_uhwi throughout.
3328
3329 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3330
3331 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
3332 throughout.
3333
3334 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3335
3336 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
3337 throughout.
3338
3339 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
3340
3341 * c-parser.c (c_parser_cilk_simd): New.
3342 (c_parser_cilk_verify_simd): New.
3343 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
3344 (c_parser_omp_for_loop): Add case for NE_EXPR.
3345 Set c_break_label for CILK_SIMD.
3346 (c_parser_cilk_clause_vectorlength): New.
3347 (c_parser_cilk_clause_linear): New.
3348 (c_parser_cilk_clause_name): New.
3349 (c_parser_cilk_all_clauses): New.
3350 * c-typeck.c (build_unary_op): Pass location argument to
3351 readonly_error.
3352 (build_modify_expr): Same.
3353 (build_asm_expr): Same.
3354 (c_finish_bc_stmt): Error on break/continue in loops.
3355
3356 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
3357
3358 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
3359
3360 2013-11-14 Diego Novillo <dnovillo@google.com>
3361
3362 * c-decl.c: Include print-tree.h.
3363 Include stor-layout.h.
3364 Include varasm.h.
3365 Include attribs.h.
3366 Include stringpool.h.
3367 * c-lang.c: Include fold-const.h.
3368 * c-parser.c: Include stringpool.h.
3369 Include attribs.h.
3370 Include stor-layout.h.
3371 Include varasm.h.
3372 Include trans-mem.h.
3373 * c-typeck.c: Include stor-layout.h.
3374 Include trans-mem.h.
3375 Include varasm.h.
3376 Include stmt.h.
3377
3378 2013-11-13 Joseph Myers <joseph@codesourcery.com>
3379
3380 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
3381 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
3382 __auto_type.
3383 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
3384 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
3385 RID_AUTO_TYPE.
3386 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
3387 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
3388 (c_parser_declarator, c_parser_direct_declarator_inner)
3389 (c_parser_parameter_declaration, c_parser_type_name): All callers
3390 changed.
3391 (c_parser_declaration_or_fndef): Handle declarations with type
3392 determined from the initializer.
3393
3394 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
3395
3396 * c-typeck.c: Include gimplify.h.
3397
3398 2013-11-12 Joseph Myers <joseph@codesourcery.com>
3399
3400 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
3401 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
3402 comment.
3403 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
3404 or _Thread_local as appropriate in diagnostics.
3405 (build_null_declspecs): Initialize ret->thread_gnu_p.
3406 (declspecs_add_scspec): Handle either __thread or _Thread_local
3407 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
3408 pedantic. Do not disallow _Thread_local extern and _Thread_local
3409 static.
3410
3411 2013-11-07 Joseph Myers <joseph@codesourcery.com>
3412 Andrew MacLeod <amacleod@redhat.com>
3413
3414 * c-aux-info.c (gen_type): Handle atomic qualifier.
3415 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
3416 qualifiers when compating types.
3417 (shadow_tag_warned): Handle atomic_p in declspecs.
3418 (quals_from_declspecs): Likewise.
3419 (start_decl): Use c_type_promotes_to when promoting argument
3420 types.
3421 (grokdeclarator): Handle _Atomic.
3422 (get_parm_info): Diagnose any qualifier on "void" as only
3423 parameter.
3424 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
3425 comparing types. Use c_type_promotes_to when promoting argument
3426 types.
3427 (finish_function): Use c_type_promotes_to when promoting argument
3428 types.
3429 (build_null_declspecs): Handle atomic_p in declspecs.
3430 (declspecs_add_qual): Handle RID_ATOMIC.
3431 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
3432 (c_token_starts_declspecs): Handle RID_ATOMIC.
3433 (c_parser_declspecs): Handle atomic type specifiers and
3434 qualifiers.
3435 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
3436 from types of expressions with atomic type.
3437 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
3438 (c_parser_attribute_any_word): Handle RID_ATOMIC.
3439 (c_parser_initializer, c_parser_initelt, c_parser_initval)
3440 (c_parser_statement_after_labels, c_parser_switch_statement)
3441 (c_parser_for_statement, c_parser_expr_no_commas)
3442 (c_parser_conditional_expression, c_parser_binary_expression)
3443 (c_parser_cast_expression, c_parser_unary_expression)
3444 (c_parser_postfix_expression)
3445 (c_parser_postfix_expression_after_primary, c_parser_expression):
3446 Use convert_lvalue_to_rvalue.
3447 (c_parser_expression_conv, c_parser_expr_list): Document
3448 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
3449 (c_parser_objc_synchronized_statement): Use
3450 convert_lvalue_to_rvalue.
3451 (c_parser_objc_selector): Handle RID_ATOMIC.
3452 (c_parser_objc_receiver, c_parser_array_notation): Use
3453 convert_lvalue_to_rvalue.
3454 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
3455 _Atomic (type-name).
3456 (struct c_declspecs): Add atomic_p field.
3457 (convert_lvalue_to_rvalue): Declare.
3458 * c-typeck.c (c_type_promotes_to): Promote atomic types to
3459 corresponding atomic types.
3460 (qualify_type): Don't add _Atomic qualifiers from second argument.
3461 (comp_target_types): Do not allow _Atomic mismatches.
3462 (type_lists_compatible_p): Do not remove atomic qualifiers when
3463 comparing types.
3464 (really_atomic_lvalue, convert_lvalue_to_rvalue)
3465 (build_atomic_assign): New functions.
3466 (build_unary_op): Use build_atomic_assign for atomic increment and
3467 decrement.
3468 (build_conditional_expr): Do not treat _Atomic void as a qualified
3469 version of void.
3470 (build_modify_expr): Use build_atomic_assign for atomic LHS.
3471 (find_anonymous_field_with_type, convert_to_anonymous_field)
3472 (convert_for_assignment): Do not remove atomic qualifiers when
3473 comparing types.
3474 (digest_init): Do not accept initialization of arrays of atomic
3475 elements by string constants.
3476 (build_asm_expr): Use convert_lvalue_to_rvalue.
3477 (build_binary_op): Do not treat _Atomic void as a qualified
3478 version of void.
3479
3480 2013-11-06 DJ Delorie <dj@redhat.com>
3481
3482 * c-decl.c (locate_old_decl): If a previous conflicting decl is
3483 both explicit and builtin, print the location of the explicit one.
3484
3485 2013-11-05 Tobias Burnus <burnus@net-b.de>
3486
3487 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
3488 c_parser_omp_distribute, c_parser_omp_teams,
3489 c_parser_omp_target, c_parser_omp_declare): Handle
3490 -fopenmp-simd.
3491
3492 2013-11-03 Marek Polacek <polacek@redhat.com>
3493
3494 * c-decl.c (grokdeclarator): Add VLA instrumentation.
3495
3496 2013-11-01 Jakub Jelinek <jakub@redhat.com>
3497
3498 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
3499 check_dup_generic at the end, unless remove is true.
3500 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
3501 remove = true;.
3502 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
3503
3504 2013-10-31 Jakub Jelinek <jakub@redhat.com>
3505
3506 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
3507 with decl that is not pointer nor array.
3508
3509 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
3510
3511 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
3512 a spawning function is found.
3513 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
3514 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
3515 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3516 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
3517 case.
3518 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
3519 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
3520 expr.
3521 (c_finish_return): Added a check to reject _Cilk_spawn in return
3522 expression.
3523 (build_cilk_spawn): New function.
3524 (build_cilk_sync): Likewise.
3525 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
3526
3527 2013-10-27 Tobias Burnus <burnus@net-b.de>
3528
3529 PR other/33426
3530 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
3531 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
3532 (c_parser_statement_after_labels): Update calls.
3533
3534 2013-10-24 Tobias Burnus <burnus@net-b.de>
3535
3536 PR other/33426
3537 * c-parser.c (c_parser_pragma, c_parser_for_statement):
3538 Handle PRAGMA_IVDEP.
3539 (c_parser_statement_after_labels): Update call.
3540
3541 2013-10-24 Marek Polacek <polacek@redhat.com>
3542
3543 * c-parser.c (c_parser_struct_declaration): Add a comment.
3544 (c_parser_declarator): Don't allow _Alignas here.
3545
3546 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
3547
3548 * c-parser.c: Include omp-low.h.
3549 * c-typeck.c: Likewise.
3550
3551 2013-10-17 Marek Polacek <polacek@redhat.com>
3552
3553 PR c/58267
3554 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
3555 Document syntax of the array-declarator.
3556 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
3557 are not permitted.
3558 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
3559 (c_parser_struct_declaration): Likewise.
3560 (c_parser_declarator): Likewise.
3561 (c_parser_direct_declarator_inner): Likewise.
3562 (c_parser_parameter_declaration): Likewise.
3563 (c_parser_type_name): Likewise.
3564
3565 2013-10-11 Jakub Jelinek <jakub@redhat.com>
3566
3567 * c-lang.h (current_omp_declare_target_attribute): New extern
3568 decl.
3569 * c-parser.c: Include c-lang.h.
3570 (struct c_parser): Change tokens to c_token *.
3571 Add tokens_buf field. Change tokens_avail type to unsigned int.
3572 (c_parser_consume_token): If parser->tokens isn't
3573 &parser->tokens_buf[0], increment parser->tokens.
3574 (c_parser_consume_pragma): Likewise.
3575 (enum pragma_context): Add pragma_struct and pragma_param.
3576 (c_parser_external_declaration): Adjust
3577 c_parser_declaration_or_fndef caller.
3578 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
3579 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
3580 Adjust recursive call.
3581 (c_parser_struct_or_union_specifier): Use pragma_struct instead
3582 of pragma_external.
3583 (c_parser_parameter_declaration): Use pragma_param instead of
3584 pragma_external.
3585 (c_parser_compound_statement_nostart, c_parser_label,
3586 c_parser_for_statement): Adjust
3587 c_parser_declaration_or_fndef callers.
3588 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
3589 it through to c_parser_conditional_expression.
3590 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
3591 pass it through to c_parser_binary_expression. Adjust recursive
3592 call.
3593 (c_parser_binary_expression): Remove prec argument, add
3594 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
3595 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
3596 binop matches it, use build2 instead of parser_build_binary_op.
3597 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
3598 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
3599 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
3600 Handle pragma_struct and pragma_param the same as pragma_external.
3601 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
3602 (c_parser_omp_variable_list): Parse array sections for
3603 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
3604 (c_parser_omp_clause_collapse): Fully fold collapse expression.
3605 (c_parser_omp_clause_reduction): Handle user defined reductions.
3606 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
3607 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
3608 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
3609 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
3610 c_parser_omp_clause_depend, c_parser_omp_clause_map,
3611 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
3612 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
3613 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
3614 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
3615 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
3616 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
3617 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
3618 (c_parser_omp_for_loop): Add CODE argument, pass it through
3619 to c_finish_omp_for. Change last argument to cclauses,
3620 and adjust uses to grab parallel clauses from the array of all
3621 the split clauses. Adjust c_parser_binary_expression,
3622 c_parser_declaration_or_fndef and c_finish_omp_for callers.
3623 (omp_split_clauses): New function.
3624 (c_parser_omp_simd): New function.
3625 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
3626 Allow the function to be called also when parsing combined constructs,
3627 and call c_parser_omp_simd when parsing for simd.
3628 (c_parser_omp_sections_scope): If section-sequence doesn't start with
3629 #pragma omp section, require exactly one structured-block instead of
3630 sequence of statements.
3631 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
3632 Allow the function to be called also when parsing combined constructs.
3633 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
3634 Allow the function to be called also when parsing combined
3635 constructs.
3636 (c_parser_omp_taskgroup, c_parser_omp_cancel,
3637 c_parser_omp_cancellation_point, c_parser_omp_distribute,
3638 c_parser_omp_teams, c_parser_omp_target_data,
3639 c_parser_omp_target_update, c_parser_omp_target,
3640 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
3641 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
3642 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
3643 (c_parser_omp_construct): Add p_name and mask vars. Handle
3644 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
3645 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
3646 and c_parser_omp_sections callers.
3647 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
3648 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
3649 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
3650 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
3651 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
3652 OMP_CLAUSE_DEPEND.
3653 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
3654 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
3655 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
3656 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
3657 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
3658 * c-typeck.c: Include tree-inline.h.
3659 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
3660 handle_omp_array_sections_1, handle_omp_array_sections,
3661 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
3662 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
3663 user defined reductions.
3664 (c_tree_equal): New function.
3665 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
3666 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
3667 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
3668 c_check_omp_declare_reduction_r): New prototypes.
3669 * c-decl.c (current_omp_declare_target_attribute): New variable.
3670 (c_decl_attributes): New function.
3671 (start_decl, start_function): Use it instead of decl_attributes.
3672 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
3673 c_omp_reduction_decl, c_omp_reduction_lookup,
3674 c_check_omp_declare_reduction_r): New functions.
3675
3676 2013-09-25 Tom Tromey <tromey@redhat.com>
3677
3678 * Make-lang.in (c/gccspec.o): Remove.
3679 (CFLAGS-c/gccspec.o): New variable.
3680 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
3681 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
3682 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
3683
3684 2013-09-25 Tom Tromey <tromey@redhat.com>
3685
3686 * Make-lang.in (c/gccspec.o): Don't use subshell.
3687
3688 2013-09-18 Marek Polacek <polacek@redhat.com>
3689
3690 PR sanitize/58443
3691 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
3692 Remove unnecessary check.
3693
3694 2013-09-18 Marek Polacek <polacek@redhat.com>
3695
3696 PR sanitizer/58411
3697 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
3698 no_sanitize_undefined attribute.
3699
3700 2013-09-13 Kai Tietz <ktietz@redhat.com>
3701
3702 PR target/57848
3703 * c-decl.c (c_builtin_function_ext_scope): Remove
3704 wrong assumption that it is never called on prexisting
3705 symbol.
3706
3707 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
3708
3709 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
3710
3711 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3712
3713 * c-objc-common.c (c_tree_printer): Tidy.
3714
3715 2013-08-30 Marek Polacek <polacek@redhat.com>
3716
3717 * c-typeck.c (build_binary_op): Add division by zero and shift
3718 instrumentation.
3719
3720 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
3721 Joseph Myers <joseph@codesourcery.com>
3722
3723 PR c/35649
3724 * c-typeck.c (c_common_type): Prefer double_type_node over
3725 other REAL_TYPE types with the same precision.
3726 (convert_arguments): Likewise.
3727
3728 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
3729
3730 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
3731 (c_initialize_diagnostics): Call a destructor for the early printer.
3732
3733 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3734
3735 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
3736 printer initialization.
3737
3738 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
3739
3740 PR c/57490
3741 * c-array-notation.c (fix_conditional_array_notations_1): Added a
3742 check for truth values.
3743 (expand_array_notation_exprs): Added truth values case. Removed an
3744 unwanted else. Added for-loop to walk through subtrees in default
3745 case.
3746
3747 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3748
3749 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
3750
3751 2013-07-23 Joseph Myers <joseph@codesourcery.com>
3752
3753 * c-parser.c (struct c_generic_association): Fix typo.
3754
3755 2013-07-23 Tom Tromey <tromey@redhat.com>
3756 Joseph Myers <joseph@codesourcery.com>
3757
3758 * c-parser.c (struct c_generic_association): New.
3759 (c_generic_association_d): New typedef.
3760 (c_parser_generic_selection): New function.
3761 (c_parser_postfix_expression): Handle RID_GENERIC.
3762
3763 2013-07-13 Jason Merrill <jason@redhat.com>
3764
3765 PR c++/57793
3766 * c-decl.c (finish_struct): Check for too-large class.
3767
3768 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
3769
3770 PR c/57821
3771 * c-typeck.c (set_init_index): When folding, check for index overflow.
3772
3773 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3774
3775 * c-parser.c (c_parser_array_notation): Removed rejection of array
3776 notations in an array of function pointers.
3777
3778 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
3779
3780 * c-array-notation.c (make_triplet_val_inv): New function.
3781 (create_cmp_incr): Likewise.
3782 (create_array_refs): Likewise.
3783 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
3784 Also modularized common parts between functions and called the function.
3785 (build_array_notation_expr): Likewise.
3786 (fix_conditional_array_notations_1): Likewise.
3787 (fix_array_notation_expr): Likewise.
3788 (fix_array_notation_call_expr): Likewise.
3789
3790 2013-06-18 Marek Polacek <polacek@redhat.com>
3791
3792 PR c/57630
3793 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
3794
3795 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
3796
3797 * c-array-notation.c (build_array_notation_expr): Reject array notation
3798 mismatch between LHS and RHS even inside a call_expr. Also, removed
3799 a couple while statements that were dead code.
3800
3801 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
3802
3803 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
3804 excessive precision expressions in function parameters. Also removed
3805 couple unwanted while statements.
3806
3807 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3808
3809 * c-array-notation.c (expand_array_notation_exprs): Added
3810 ARRAY_NOTATION_REF case.
3811
3812 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3813
3814 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
3815 function to c-family/array-notation-common.c.
3816 (is_cilkplus_reduce_builtin): Likewise.
3817 (find_rank): Likewise.
3818 (extract_array_notation_exprs): Likewise.
3819 (replace_array_notations): Likewise.
3820 (find_inv_trees): Likewise.
3821 (replace_inv_trees): Likewise.
3822 (contains_array_notation_expr): Likewise.
3823 (find_correct_array_notation_type): Likewise.
3824 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
3825 (struct inv_list): Moved this to c-family/array-notation-common.c.
3826 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
3827
3828 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
3829
3830 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
3831 reduction functions outside the for-loop. Added a check if the fundecl
3832 is non-NULL. Finally, removed an unwanted if-statement, and made the
3833 body unconditional.
3834
3835 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3836
3837 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
3838 condition of the if-statement matches the rank of else-block and then-
3839 block when array notations are used.
3840 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
3841 expression after the entire function body is parsed.
3842 (c_parser_expr_no_commas): Delayed creating array notation expressions
3843 to the end of function parsing.
3844 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
3845 whole if-statement instead of just the condition.
3846 (expand_array_notation_exprs): Added MODIFY_EXPR case.
3847
3848 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3849
3850 PR c/57474
3851 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
3852 array to NULL_TREE if they are unused. Also added a check for the
3853 field to be NULL before its fields are used in future.
3854
3855 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3856
3857 PR bootstrap/57450
3858 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
3859 (build_array_notation_expr): Likewise.
3860
3861 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3862
3863 * c-typeck.c (build_array_ref): Added a check to see if array's
3864 index is greater than one. If true, then emit an error.
3865 (build_function_call_vec): Exclude error reporting and checking
3866 for builtin array-notation functions.
3867 (convert_arguments): Likewise.
3868 (c_finish_return): Added a check for array notations as a return
3869 expression. If true, then emit an error.
3870 (c_finish_loop): Added a check for array notations in a loop
3871 condition. If true then emit an error.
3872 (lvalue_p): Added a ARRAY_NOTATION_REF case.
3873 (build_binary_op): Added a check for array notation expr inside
3874 op1 and op0. If present, we call another function to find correct
3875 type.
3876 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
3877 * c-parser.c (c_parser_compound_statement): Check if array
3878 notation code is used in tree, if so, then transform them into
3879 appropriate C code.
3880 (c_parser_expr_no_commas): Check if array notation is used in LHS
3881 or RHS, if so, then build array notation expression instead of
3882 regular modify.
3883 (c_parser_postfix_expression_after_primary): Added a check for
3884 colon(s) after square braces, if so then handle it like an array
3885 notation. Also, break up array notations in unary op if found.
3886 (c_parser_direct_declarator_inner): Added a check for array
3887 notation.
3888 (c_parser_compound_statement): Added a check for array notation in
3889 a stmt. If one is present, then expand array notation expr.
3890 (c_parser_if_statement): Likewise.
3891 (c_parser_switch_statement): Added a check for array notations in
3892 a switch statement's condition. If true, then output an error.
3893 (c_parser_while_statement): Similarly, but for a while.
3894 (c_parser_do_statement): Similarly, but for a do-while.
3895 (c_parser_for_statement): Similarly, but for a for-loop.
3896 (c_parser_unary_expression): Check if array notation is used in a
3897 pre-increment or pre-decrement expression. If true, then expand
3898 them.
3899 (c_parser_array_notation): New function.
3900 * c-array-notation.c: New file.
3901 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
3902
3903 2013-05-23 Mike Stump <mikestump@comcast.net>
3904
3905 * c-typeck.c (convert_for_assignment): Handle references to memory
3906 spaces better.
3907
3908 2013-05-16 Jason Merrill <jason@redhat.com>
3909
3910 * Make-lang.in (cc1$(exeext)): Use link mutex.
3911
3912 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
3913
3914 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
3915 to simply use OPT_Wpointer_arith.
3916 (build_unary_op): Likewise.
3917
3918 2013-04-03 Jakub Jelinek <jakub@redhat.com>
3919
3920 PR c/19449
3921 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
3922 argument. If set, or it temporarily for parsing of the first
3923 argument into force_folding_builtin_constant_p.
3924 (c_parser_postfix_expression): Adjust callers.
3925
3926 2013-03-21 Richard Biener <rguenther@suse.de>
3927
3928 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
3929 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
3930
3931 2013-02-12 Marek Polacek <polacek@redhat.com>
3932
3933 PR c/44938
3934 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
3935 origtypes to NULL.
3936
3937 2013-01-24 Jakub Jelinek <jakub@redhat.com>
3938
3939 PR c/56078
3940 * c-typeck.c (set_nonincremental_init_from_string): If
3941 constructor_max_index is NULL, treat it as if tree_int_cst_lt
3942 returned false.
3943 (process_init_element): Likewise.
3944
3945 2012-12-20 Jakub Jelinek <jakub@redhat.com>
3946
3947 PR c++/55619
3948 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
3949 argument, don't call default_function_array_conversion
3950 nor c_fully_fold here.
3951 (c_parser_asm_statement): Adjust callers.
3952 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
3953 and outputs here, and call default_function_array_conversion
3954 on inputs that don't need to be addressable.
3955
3956 2012-12-18 Jakub Jelinek <jakub@redhat.com>
3957
3958 PR c/39464
3959 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
3960 warning require that both c_common_unsigned_type as well as
3961 c_common_signed_type is the same for both mvl and mvr types.
3962
3963 2012-11-16 Diego Novillo <dnovillo@google.com>
3964
3965 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
3966
3967 * c-common.c: Use new vec API in vec.h.
3968 * c-common.h: Likewise.
3969 * c-gimplify.c: Likewise.
3970 * c-pragma.c: Likewise.
3971 * c-pretty-print.c: Likewise.
3972 * c-pretty-print.h: Likewise.
3973 * c-semantics.c: Likewise.
3974 * c-decl.c: Likewise.
3975 * c-parser.c: Likewise.
3976 * c-tree.h: Likewise.
3977 * c-typeck.c: Likewise.
3978
3979 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
3980
3981 PR c++/54930
3982 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
3983
3984 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3985
3986 PR c/53066
3987 * c-decl.c (warn_if_shadowing): Do not warn if a variable
3988 shadows a function, unless the variable is a function or a
3989 pointer-to-function.
3990
3991 2012-10-12 Jakub Jelinek <jakub@redhat.com>
3992
3993 PR c/54381
3994 * c-parser.c (struct c_tree_loc_pair): Removed.
3995 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
3996 add location_t * and tree * arguments, fill in array of 3
3997 sizeof_arg trees and corresponding locs.
3998 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
3999 c_parser_expr_list callers.
4000 (c_parser_postfix_expression_after_primary): Likewise. Pass
4001 array of 3 sizeof_arg trees and locs (corresponding to first
4002 3 arguments) to sizeof_pointer_memaccess_warning.
4003
4004 2012-10-09 Lawrence Crowl <crowl@google.com>
4005
4006 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
4007 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
4008 hash table.
4009
4010 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
4011
4012 PR c++/54194
4013 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
4014 call.
4015
4016 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
4017
4018 PR c++/54427
4019 * c-typeck.c: Include c-common.h.
4020 (enum stv_conv): Moved to c-common.h.
4021 (scalar_to_vector): Moved to c-common.c.
4022 (build_binary_op): Adapt to scalar_to_vector's new prototype.
4023 * Make-lang.in: c-typeck.c depends on c-common.h.
4024
4025 2012-10-04 Arnaud Charlet <charlet@adacore.com>
4026
4027 * c-decl.c (c_write_global_declarations): Fix handling of
4028 -fdump-ada-spec*.
4029
4030 2012-09-30 Sharad Singhai <singhai@google.com>
4031
4032 * c-decl.c (c_write_global_declarations): Use a different method
4033 to determine if the dump has ben initialized.
4034
4035 2012-09-14 Joseph Myers <joseph@codesourcery.com>
4036
4037 PR c/54552
4038 * c-typeck.c (c_cast_expr): When casting to a type requiring
4039 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
4040 c_fully_fold first.
4041
4042 2012-09-14 Joseph Myers <joseph@codesourcery.com>
4043
4044 PR c/54103
4045 * c-typeck.c (build_unary_op): Pass original argument of
4046 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
4047 any C_MAYBE_CONST_EXPR, if it has integer operands.
4048 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
4049 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
4050 to c_objc_common_truthvalue_conversion, then remove any
4051 C_MAYBE_CONST_EXPR, if they have integer operands. Use
4052 c_objc_common_truthvalue_conversion not
4053 c_common_truthvalue_conversion.
4054 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
4055 call note_integer_operands for arguments with integer operands
4056 that are not integer constants.
4057
4058 2012-09-13 Jakub Jelinek <jakub@redhat.com>
4059
4060 PR c/54559
4061 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
4062 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
4063
4064 2012-08-31 Jakub Jelinek <jakub@redhat.com>
4065
4066 PR c/54428
4067 * c-convert.c (convert): Don't call fold_convert_loc if
4068 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
4069 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
4070 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
4071
4072 2012-08-24 Jakub Jelinek <jakub@redhat.com>
4073
4074 PR c/54355
4075 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
4076 for nested and empty_ok arguments in the call to
4077 c_parser_declaration_or_fndef.
4078
4079 2012-08-17 Jakub Jelinek <jakub@redhat.com>
4080
4081 * c-tree.h (c_last_sizeof_arg): Declare.
4082 * c-parser.c (struct c_tree_loc_pair): New type.
4083 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
4084 non-NULL.
4085 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
4086 (c_parser_postfix_expression_after_primary): Likewise. Call
4087 sizeof_pointer_memaccess_warning if needed.
4088 (sizeof_ptr_memacc_comptypes): New function.
4089 * c-typeck.c (c_last_sizeof_arg): New global variable.
4090 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
4091
4092 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
4093
4094 * c-lang.h (lang_decl): Add variable_size GTY option.
4095
4096 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
4097
4098 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
4099 * Make-lang.in: Fix dependencies.
4100
4101 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
4102
4103 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
4104 and add language Makefile hooks.
4105 * config-lang.in: New file.
4106 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
4107 add the required "normal" config-lang.in rules.
4108 * c-lang.h: Moved from gcc/ to here.
4109 * c-tree.h: Likewise.
4110 * c-objc-common.c: Likewise.
4111 * c-objc-common.h: Likewise.
4112 * c-typeck.c: Likewise.
4113 * c-convert.c: Likewise.
4114 * c-lang.c: Likewise.
4115 * c-aux-info.c: Likewise.
4116 * c-errors.c: Likewise.
4117 * gccspec.c: Likewise.
4118 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
4119 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
4120 \f
4121 Copyright (C) 2012-2016 Free Software Foundation, Inc.
4122
4123 Copying and distribution of this file, with or without modification,
4124 are permitted in any medium without royalty provided the copyright
4125 notice and this notice are preserved.