GCC Middle and Back End API Reference
nowarn_spec_t Class Reference

#include <diagnostic-spec.h>

Public Types

enum  {
  NW_ACCESS = 1 << 0 , NW_LEXICAL = 1 << 1 , NW_NONNULL = 1 << 2 , NW_UNINIT = 1 << 3 ,
  NW_VFLOW = 1 << 4 , NW_DANGLING = 1 << 5 , NW_OTHER = 1 << 6 , NW_REDUNDANT = 1 << 7 ,
  NW_ALL
}
 

Public Member Functions

 nowarn_spec_t ()
 
 nowarn_spec_t (opt_code)
 
 operator unsigned () const
 
bool operator! () const
 
nowarn_spec_t operator~ () const
 
nowarn_spec_toperator|= (const nowarn_spec_t &rhs)
 
nowarn_spec_toperator&= (const nowarn_spec_t &rhs)
 
nowarn_spec_toperator^= (const nowarn_spec_t &rhs)
 

Static Public Member Functions

static nowarn_spec_t from_bits (unsigned bits)
 

Private Attributes

unsigned m_bits
 

Detailed Description

Language-independent APIs to enable/disable per-location warnings. Copyright (C) 2021-2025 Free Software Foundation, Inc. Contributed by Martin Sebor <msebor@redhat.com> 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/>.
A "bitset" of warning groups.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
NW_ACCESS 
NW_LEXICAL 
NW_NONNULL 
NW_UNINIT 
NW_VFLOW 
NW_DANGLING 
NW_OTHER 
NW_REDUNDANT 
NW_ALL 

Constructor & Destructor Documentation

◆ nowarn_spec_t() [1/2]

nowarn_spec_t::nowarn_spec_t ( )
inline

◆ nowarn_spec_t() [2/2]

nowarn_spec_t::nowarn_spec_t ( opt_code opt)
Functions to enable and disable individual warnings on an expression and statement basis. Copyright (C) 2021-2025 Free Software Foundation, Inc. Contributed by Martin Sebor <msebor@redhat.com> 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/>.
Initialize *THIS from warning option OPT.

References all_warnings, m_bits, no_warning, NW_ACCESS, NW_DANGLING, NW_LEXICAL, NW_NONNULL, NW_OTHER, NW_REDUNDANT, NW_UNINIT, and NW_VFLOW.

Member Function Documentation

◆ from_bits()

static nowarn_spec_t nowarn_spec_t::from_bits ( unsigned bits)
inlinestatic

References m_bits, and nowarn_spec_t().

Referenced by put_warning_spec_at().

◆ operator unsigned()

nowarn_spec_t::operator unsigned ( ) const
inline

References m_bits.

◆ operator!()

bool nowarn_spec_t::operator! ( ) const
inline

References m_bits.

◆ operator&=()

nowarn_spec_t & nowarn_spec_t::operator&= ( const nowarn_spec_t & rhs)
inline

References m_bits, and nowarn_spec_t().

◆ operator^=()

nowarn_spec_t & nowarn_spec_t::operator^= ( const nowarn_spec_t & rhs)
inline

References m_bits, and nowarn_spec_t().

◆ operator|=()

nowarn_spec_t & nowarn_spec_t::operator|= ( const nowarn_spec_t & rhs)
inline

References m_bits, and nowarn_spec_t().

◆ operator~()

nowarn_spec_t nowarn_spec_t::operator~ ( ) const
inline

References m_bits, nowarn_spec_t(), and NW_ALL.

Field Documentation

◆ m_bits


The documentation for this class was generated from the following files: