https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83425
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |diagnostic Status|UNCONFIRMED |RESOLVED Resolution|--- |WORKSFORME --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- You can use -Wsign-conversion: > g++-7 t.C -S -Wsign-conversion t.C: In function ‘int main()’: t.C:4:30: warning: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion] unsigned foo = ret_int(); ~~~~~~~^~ it was probably deemed too noisy to be enabled at any -W level.