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

            Bug ID: 126207
           Summary: [Coverity] Possible missing return value check on
                    resolves_to_fixed_type_p in rtti.cc:386
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

Source code is

      resolves_to_fixed_type_p (exp, &nonnull);

All other calls to resolves_to_fixed_type_p check
the return value, but this call doesn't.

cp $ grep resolves_to_fixed_type_p call.cc class.cc rtti.cc typeck.cc
call.cc:          && resolves_to_fixed_type_p (arg))
class.cc:    fixed_type_p = resolves_to_fixed_type_p (expr, &nonnull);
class.cc:resolves_to_fixed_type_p (tree instance, int* nonnull)
rtti.cc:      && ! resolves_to_fixed_type_p (exp, 0))
rtti.cc:          && !resolves_to_fixed_type_p (exp, &nonnull)
rtti.cc:             resolves_to_fixed_type_p does not handle all
rtti.cc:      resolves_to_fixed_type_p (exp, &nonnull);
typeck.cc:                  && resolves_to_fixed_type_p (instance_ptr, 0));
cp $ 

git blame says:

621661f7d2e9 gcc/cp/rtti.cc (Vladislav Semykin  2026-07-07 12:52:08 -0400  386)
      resolves_to_fixed_type_p (exp, &nonnull); 


Coverity issue # 1696558. CHECKED_RETURN

Reply via email to