This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/77700] New: suspicios code in cp/parser.c


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77700

            Bug ID: 77700
           Summary: suspicios code in cp/parser.c
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bernd.edlinger at hotmail dot de
  Target Milestone: ---

Hi,

this is the next one, the line info is off by one, but it is nevertheless
a real bug:

../../gcc-trunk/gcc/cp/parser.c: In function 'tree_node*
cp_parser_base_specifier(cp_parser*)':
../../gcc-trunk/gcc/cp/parser.c:23137:35: error: using integer constants in
boolean context [-Werror=int-in-bool-context]
            /*is_declaration=*/true);


cp/parser.c
  cp_parser_nested_name_specifier_opt (parser,
                                       /*typename_keyword_p=*/true,
                                       /*check_dependency_p=*/true,
                                       typename_type,
                                       /*is_declaration=*/true);

static tree cp_parser_nested_name_specifier_opt
  (cp_parser *, bool, bool, bool, bool);

cp/cp-tree.h:
enum tag_types {
  none_type = 0, /* Not a tag type.  */
  record_type,   /* "struct" types.  */
  class_type,    /* "class" types.  */
  union_type,    /* "union" types.  */
  enum_type,     /* "enum" types.  */
  typename_type, /* "typename" types.  */
  scope_type     /* namespace or tagged type name followed by :: */
};

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]