[Bug preprocessor/106778] libcpp/makeuname2c.cc:454: sanity check in wrong place ?

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Aug 31 08:25:29 GMT 2022


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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:b3048b6ffb126a4624f66bad713fe6d1dc6dc13d

commit r13-2301-gb3048b6ffb126a4624f66bad713fe6d1dc6dc13d
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Wed Aug 31 10:22:36 2022 +0200

    libcpp: Make static checkers happy about makeuname2c [PR106778]

    The assertion ensures that we point within the image and at a byte
    we haven't touched yet (or at least that it isn't the first byte
    of an already stored tree), some static checker was unhappy about
    first checking that it is zero and only afterwards checking that it
    is within bounds.

    2022-08-31  Jakub Jelinek  <jakub@redhat.com>

            PR preprocessor/106778
            * makeuname2c.cc (write_nodes): Reverse order of && operands in
            assert.


More information about the Gcc-bugs mailing list