Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* lint on Alpha
@ 1993-11-02 23:32 John F Carr
  0 siblings, 0 replies; only message in thread
From: John F Carr @ 1993-11-02 23:32 UTC (permalink / 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)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1993-11-02 23:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1993-11-02 23:32 lint on Alpha John F Carr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox