This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH] Consistently use sizeof() in __builtin_alloca
- From: Paolo Carlini <pcarlini at unitus dot it>
- Cc: libstdc++ at gcc dot gnu dot org, Benjamin Kosnik <bkoz at redhat dot com>
- Date: Sun, 31 Mar 2002 19:15:50 +0200
- Subject: Re: [PATCH] Consistently use sizeof() in __builtin_alloca
- References: <3CA6EA72.5050605@unitus.it>
Paolo Carlini wrote:
> 2002-03-31 Paolo Carlini <pcarlini@unitus.it>
>
> * include/bits/locale_facets.tcc (num_put::_M_convert_float ,
> num_put::_M_convert_int): Consistently use sizeof() in alloca.
> * include/bits/fstream.tcc (basic_filebuf::underflow,
> basic_filebuf::_M_convert_to_external): Ditto.
> * include/bits/ostream.tcc (operator<<(char __c),
> operator<<(const char* __s)): Ditto.
Please disregard this one :-(
By definition sizeof(char) is /identical/ to one (even if a char may
have more than 8 bits!) so there is no reason to add all those redundant
sizeof() calls.
Quite to the contrary, maybe the few instances already present of
sizeof(char) should be removed?
Ciao, Paolo.