Liste des Groupes | Revenir à cl c |
On 2024-10-28, Thiago Adams <thiago.adams@gmail.com> wrote:
>I believe warnings in code should be treated as alarms that require>
acknowledgment.
>
For instance,
>
const unsigned char ch = 1234;
>
GCC:
warning: unsigned conversion from 'int' to 'unsigned char' changes value
from '1234' to '210' [-Woverflow]
>
The programmer might intend this behavior; in that case, the "alarm"
should be acknowledged.
>
I would like a portable (standardized) way to achieve this.
For conversion warnings, that portable way should ideally be a cast.
Les messages affichés proviennent d'usenet.