From: jfc@athena.mit.edu (John F Carr)
Subject: lint on Alpha
Date: 2 Nov 1993 23:32:03 GMT [thread overview]
Message-ID: <2b6qlj$o1o@senator-bedfellow.MIT.EDU> (raw)
lint on Alpha OSF/1 1.3 complains about this function:
f(unsigned int x, unsigned int y){return x + 32U > y;}
It says:
"atest.c", line 1: warning: conversion to long may sign-extend incorrectly
"atest.c", line 1: warning: conversion to long may sign-extend incorrectly
I don't think anything in this function uses long. Both operands to + are
unsigned int and both operands to > are unsigned int so there should be no
type conversions. The ">" operator result is type int, which is the same
as the return type of the function, so the return causes no conversion.
Is this a bug?
--
John Carr (jfc@mit.edu)
reply other threads:[~1993-11-02 23:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox