[PATCH] Consistently use sizeof() in __builtin_alloca

Paolo Carlini pcarlini@unitus.it
Sun Mar 31 09:16:00 GMT 2002


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.





More information about the Libstdc++ mailing list