2.8.3 not compiling on IRIX... strtoull issue?

defreitas at gmail.com defreitas at gmail.com
Tue May 8 11:56:36 PDT 2007


On May 4, 5:58 pm, v... at wxwindows.org (Vadim Zeitlin) wrote:

> It would be also nice to fix this one presumably.
> Unfortunately the compiler I used the last time I
> could test under IRIX (7.4.4m) gave this warning
> for wxPtrToUInt() and, as the comment in
> configure.in says, I couldn't find any way to silence
> it except for this switch. If you know how
> to do it otherwise, by chance, with this compiler,
> please let us know. Also, I wonder if this warning
> wouldn't be 64 bit specific by chance: does the compiler
> still warn about it in 64 bit build?

I finally got access to an IRIX machine with the 7.4.4m compiler. It
is a pretty bare bones machine (no GTK, etc), so rather than compiling
the wxWidgets distribution, I just wrote a test program that simulated
the issue with wxPtrToUInt():
______

unsigned long ul;
void *p;
int main() {
   ul = reinterpret_cast<unsigned long>(p);
   return 0;
}
______

I tried compiling and indeed gave me warning #3970 (in both 32 and 64
bit modes), complaining about a conversion from a pointer to an
unsigned int of the same size. It seems odd that it would issue the
warning, since it is the same size and you are doing an "explicit"
cast. This warning does not exist on my 7.4 compiler.

As an alternative to supressing warning #3970, can you do something
like the following test program does:

______

unsigned long ul;
void *p;
int main() {
   union {
      unsigned long ul;
      void *p;
   } u;
   u.p = p;
   ul = u.ul;
   return 0;
}

______

The above code does not induce warning #3970 (in either 32 or 64 bit
modes).

Hope this helps.

PS: I am still trying to get around my firewall issue.

--Marco







More information about the wx-users mailing list