GCC Middle and Back End API Reference
|
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "backend.h"
#include "bitmap.h"
#include "tree.h"
#include "gimple.h"
#include "cgraph.h"
#include "hash-map.h"
#include "diagnostic-spec.h"
Copy the warning disposition mapping from one statement to another.
References copy_warning().
Referenced by gimple_set_location().
void copy_warning | ( | gimple * | to, |
const_tree | from ) |
Copy the warning disposition mapping from an expression to a statement.
References copy_warning().
void copy_warning | ( | ToType | to, |
FromType | from ) |
Copy the warning disposition mapping between an expression and/or a statement.
References gcc_assert, gcc_checking_assert, get_location(), get_no_warning_bit(), get_nowarn_spec(), nowarn_map, hash_map< KeyId, Value, Traits >::put(), hash_map< KeyId, Value, Traits >::remove(), RESERVED_LOCATION_P, and set_no_warning_bit().
Referenced by copy_warning(), copy_warning(), copy_warning(), and copy_warning().
Copy the warning disposition mapping from a statement to an expression.
References copy_warning().
void copy_warning | ( | tree | to, |
const_tree | from ) |
Copy the warning disposition mapping from one expression to another.
References copy_warning().
|
inlinestatic |
Return STMT location (may be 'UNKNOWN_LOCATION').
References gimple_location().
|
inlinestatic |
Return EXPR location or 'UNKNOWN_LOCATION'.
References DECL_P, DECL_SOURCE_LOCATION, EXPR_LOCATION, EXPR_P, and UNKNOWN_LOCATION.
Referenced by copy_warning(), get_nowarn_spec(), get_nowarn_spec(), has_warning_spec(), put_warning_spec(), suppress_warning(), and suppress_warning().
Return the no-warning bit for statement STMT.
References gimple::no_warning.
|
inlinestatic |
Functions to enable and disable individual warnings on an expression and statement basis. Copyright (C) 2021-2024 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>.
Return the no-warning bit for EXPR.
Referenced by copy_warning(), get_nowarn_spec(), get_nowarn_spec(), has_warning_spec(), warning_suppressed_p(), and warning_suppressed_p().
|
static |
Return the no-warning bitmap for statement STMT.
References hash_map< KeyId, Value, Traits >::get(), get_location(), get_no_warning_bit(), nowarn_map, NULL, and RESERVED_LOCATION_P.
|
static |
Return the no-warning bitmap for decl/expression EXPR.
References hash_map< KeyId, Value, Traits >::get(), get_location(), get_no_warning_bit(), nowarn_map, NULL, and RESERVED_LOCATION_P.
Referenced by copy_warning(), get_warning_spec(), warning_suppressed_p(), and warning_suppressed_p().
unsigned get_warning_spec | ( | const_tree | t | ) |
Retrieve warning dispostion bitmap for tree streaming.
References get_nowarn_spec().
bool has_warning_spec | ( | const_tree | t | ) |
Whether the tree might have a warning spec.
References get_location(), get_no_warning_bit(), and RESERVED_LOCATION_P.
void put_warning_spec | ( | tree | t, |
unsigned | bits ) |
Write warning disposition bitmap for streamed-in tree.
References get_location(), and put_warning_spec_at().
Set the no-warning bit for statement STMT to VALUE.
References gimple::no_warning.
Set the no-warning bit for EXPR to VALUE.
Referenced by copy_warning(), suppress_warning(), and suppress_warning().
Enable, or by default disable, a warning for the statement STMT. The wildcard OPT of -1 controls all warnings.
References get_location(), no_warning, RESERVED_LOCATION_P, set_no_warning_bit(), and suppress_warning_at().
Referenced by c_strlen(), check_access(), array_bounds_checker::check_addr_expr(), array_bounds_checker::check_array_bounds(), array_bounds_checker::check_array_ref(), check_bounds_or_overlap(), array_bounds_checker::check_mem_ref(), clear_padding_flush(), cond_store_replacement(), create_access_replacement(), create_one_component_var(), declare_return_variable(), do_mpfr_remquo(), execute_sm(), execute_update_addresses_taken(), expand_call_inline(), expand_omp_for_generic(), expand_omp_taskloop_for_outer(), fold_builtin_frexp(), fold_builtin_modf(), fold_builtin_varargs(), fold_unary_loc(), generate_subtree_copies(), gimple_fold_builtin_stpcpy(), gimple_fold_builtin_strcpy(), gimple_fold_builtin_strncat(), gimple_lower_bitint(), gimple_push_cleanup(), gimplify_modify_expr_complex_part(), gimplify_return_expr(), strlen_pass::handle_builtin_strcat(), strlen_pass::handle_builtin_strcpy(), strlen_pass::handle_builtin_stxncpy_strncat(), handle_printf_call(), lower_lastprivate_clauses(), lower_omp_target(), lower_rec_input_clauses(), lower_send_clauses(), maybe_warn_for_bound(), maybe_warn_nonstring_arg(), strlen_pass::maybe_warn_overflow(), maybe_warn_read_write_only(), set_no_uninit_warning(), test_for_singularity(), vectorizable_operation(), warn_for_access(), warn_string_no_nul(), and warn_uninit().
Enable, or by default disable, a warning for the expression. The wildcard OPT of -1 controls all warnings.
References get_location(), no_warning, RESERVED_LOCATION_P, set_no_warning_bit(), and suppress_warning_at().
Return true if warning OPT is suppressed for statement STMT. By default tests the disposition for any warning.
References gcc_assert, get_no_warning_bit(), and get_nowarn_spec().
Referenced by c_strlen(), check_access(), array_bounds_checker::check_addr_expr(), array_bounds_checker::check_array_ref(), check_bounds_or_overlap(), check_global_declaration(), array_bounds_checker::check_mem_ref(), combine_cond_expr_cond(), compare_values_warnv(), do_warn_nonnull_compare(), expand_vector_comparison(), expand_vector_condition(), expand_vector_conversion(), expand_vector_parallel(), expand_vector_piecewise(), fold_stmt_1(), fold_undefer_overflow_warnings(), get_no_uninit_warning(), gimple_fold_builtin_stpcpy(), gimple_fold_builtin_strcpy(), gimple_fold_builtin_strncat(), gimple_fold_builtin_stxcpy_chk(), lower_vec_perm(), maybe_diag_stxncpy_trunc(), maybe_warn_for_bound(), maybe_warn_nonstring_arg(), strlen_pass::maybe_warn_overflow(), warn_string_no_nul(), and warn_uninit().
bool warning_suppressed_p | ( | const_tree | expr, |
opt_code | opt ) |
Return true if warning OPT is suppressed for decl/expression EXPR. By default tests the disposition for any warning.
References gcc_assert, get_no_warning_bit(), and get_nowarn_spec().