Re: strstr.c:105:3: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode

Orlando Arias <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
Greetings,

On 8/13/19 4:00 AM, Corinna Vinschen wrote:
> I don't see any such patch in there fixing the undefined behaviour
> you're talking about:

Apologies for not making it clear. In my eyes the patch submitted still
had UB [using int instead of size_t with a potential integer overflow].

> These two hunks are just the pre-C99 drop-in replacement.
> Also:
> 
>     if (__builtin_expect (ne_len < 255, 1))
>       [...]
> 
> So ne_len is guaranteed to be < 255 in this code snippet.  Am I missing
> something?

And this is what I get for not reading the entire source file and only
looking into the patch... Sorry.

Cheers,
Orlando.
signature.asc (application/pgp-signature, 195 B)
-----BEGIN PGP SIGNATURE-----

iF0EARECAB0WIQQNWDJzd34+k5noE3NTFb9QFn4uoQUCXVLUCAAKCRBTFb9QFn4u
oa3tAKCY1UcrAZNjjzipWCmUAsRN5O5sHACeIYoXFBF6jrpkaFAt5oJ90Fj0TH0=
=wP9d
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.