Copiling warning, C4058 of MSC V5.1 - DS != SS
David Bolen
db3l at ibm.com
Fri Feb 8 03:42:57 AEST 1991
In article <1991Feb6.180813.12005 at unixg.ubc.ca> ballard at cheddar.ucs.ubc.ca (Alan Ballard) writes:
>In article <1991Feb6.091030.27891 at hellgate.utah.edu> h-lee%hogum.utah.edu at cs.utah.edu (LEE Hyo Jong) writes:
>>I got the warning of 'address of frame variable taken, DS!=SS'.
>>It usually happens when I calls the math lib functions such as
>>pow() or sin() or when I manipulate three dimensional arrays.
>>Since I am using multithread, one of my compile options(MSC V5.1) is
>>-Aluf.
>
>Hm, this should only happen if you're passing a near pointer, which
>shouldn't occur with -Aluf. Is it possible the functions involved
>have explicit "near" attributes for parameters etc.?
Unfortunately, one of the bugs in MSC 5.1 (not sure about 6.0, but it's
got enough of its own to worry about), was that when using -Alfu that
particular warning is displayed when it really isn't true. Apparently
the compiler should print the warning except in cases when -Alfu is being
used, but Microsoft missed a check for those options and displays the
warning anyway.
This generally happens when creating multithread programs, but it can
also happen with basic PM programs (where the window procedures also
need -Alfu since they run with SS != DS).
Unfortunately, this makes this warning difficult to trust. The best
thing I can suggest is to verify your use of local variables, but for
the most part, if using -Alfu, ignore the warning, since you know you've
told the compiler not to assume SS == DS for your functions.
--
-- David
--
/-----------------------------------------------------------------------\
\ David Bolen /
| Laboratory Automation, IBM Thomas J. Watson Research Center |
/ P.O. Box 218, Yorktown Heights, NY 10598 \
| - - - - - - - - - - - - M i t h r a n d i r - - - - - - - - - - - - |
| Internet : db3l at ibm.com | Bitnet : db3l at yktvmv |
| Usenet : uunet!bywater!arnor!larios!db3l | Phone : (914) 945-1940 |
| /---------------------------------------------------------------\ |
\-( All comments/opinions are mine and don't represent those of IBM )-/
\---------------------------------------------------------------/
More information about the Comp.lang.c
mailing list