This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: -Wextra and unsigned template parameters


On 10/05/06, Aliesha Finkel <agfinkel@yahoo.com> wrote:

template <typename T> struct foo { foo(T bar) { if (bar >= 0) bar = 1; } };

If foo<signed type> is instantiated elsewhere then
this check could still be useful.


My opinion is that since it may be instantiated as an signed type, then warning is pointless there. Is this a bug?

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]