From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,16a508b396a1efdf,start X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1993-11-02 20:00:33 PST Path: gmd.de!xlink.net!rz.uni-karlsruhe.de!news.uni-stuttgart.de!news.belwue.de!math.fu-berlin.de!sunmbx.netmbx.de!Germany.EU.net!mcsun!uknet!pipex!howland.reston.ans.net!spool.mu.edu!bloom-beacon.mit.edu!senator-bedfellow.mit.edu!jfc From: jfc@athena.mit.edu (John F Carr) Newsgroups: comp.sys.dec Subject: lint on Alpha Date: 2 Nov 1993 23:32:03 GMT Organization: Massachvsetts Institvte of Technology Distribution: world Message-ID: <2b6qlj$o1o@senator-bedfellow.MIT.EDU> NNTP-Posting-Host: porter.mit.edu 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)