c++: ICE with alias in pack expansion [PR103769]
[official-gcc.git] / gcc / gimple-ssa-warn-access.h
blob79ff0ffcf469aba9f583d14eb6965e288931bb01
1 /* Pass to detect and issue warnings for invalid accesses, including
2 invalid or mismatched allocation/deallocation calls.
4 Copyright (C) 2020-2022 Free Software Foundation, Inc.
5 Contributed by Martin Sebor <msebor@redhat.com>.
7 This file is part of GCC.
9 GCC is free software; you can redistribute it and/or modify it under
10 the terms of the GNU General Public License as published by the Free
11 Software Foundation; either version 3, or (at your option) any later
12 version.
14 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
15 WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 for more details.
19 You should have received a copy of the GNU General Public License
20 along with GCC; see the file COPYING3. If not see
21 <http://www.gnu.org/licenses/>. */
23 #ifndef GCC_GIMPLE_SSA_WARN_ACCESS_H
24 #define GCC_GIMPLE_SSA_WARN_ACCESS_H
26 extern bool check_nul_terminated_array (tree, tree, tree = NULL_TREE);
27 extern void warn_string_no_nul (location_t, gimple *, const char *, tree,
28 tree, tree = NULL_TREE, bool = false,
29 const wide_int[2] = NULL);
30 extern void warn_string_no_nul (location_t, tree, const char *, tree,
31 tree, tree = NULL_TREE, bool = false,
32 const wide_int[2] = NULL);
33 extern tree unterminated_array (tree, tree * = NULL, bool * = NULL);
35 extern bool maybe_warn_nonstring_arg (tree, gimple *);
36 extern bool maybe_warn_nonstring_arg (tree, tree);
38 class access_data;
39 extern bool maybe_warn_for_bound (opt_code, location_t, gimple *, tree,
40 tree[2], tree, const access_data * = NULL);
41 extern bool maybe_warn_for_bound (opt_code, location_t, tree, tree,
42 tree[2], tree, const access_data * = NULL);
44 class access_data;
45 extern bool check_access (tree, tree, tree, tree, tree, access_mode,
46 const access_data * = NULL);
48 #endif // GCC_GIMPLE_SSA_WARN_ACCESS_H