Subject: Re: Win32 Build Issues
From: David Given (dg@tao-group.com)
Date: Wed Aug 08 2001 - 05:50:44 CDT
[...]
> Apparently I wasn't explicit enough. If you compile with /Za (disable MS
> extensions & "ANSI compatibility"), you get errors in
> ap_Dialog_Paragraph.cpp on line 85 and others:
>
> const id_val_pair rgPairs[] =
> {
> {id_MENU_ALIGNMENT, (void*)align_LEFT},
> ...
>
> align_LEFT is of type tAlignState, which is an enum. AFAIK, this is
> perfectly valid C++. "A value of integral type or enumeration type can
> be explicitly converted to a pointer." from
> http://www.csci.csusb.edu/dick/c++std/cd2/expr.html. gcc gets it right.
Oh yes --- sorry. I thought you were talking about implicit casting.
> MSVC deviates from the standard whichever switch you use. The code
> doesn't need fixing, it needs a workaround.
So MSVC is broken... gosh, now there's a surprise.
> /Za - Can't cast an enum to ptr-to-void
> /Ze - Loop header vars have scope of containing block
What version of MSVC are you using? And what happens if you don't supply either
switch?
-- +- David Given --------McQ-+ | Work: dg@tao-group.com | "You might think there's an explanation for this. | Play: dg@cowlark.com | You would be wrong." --- Ally MacBeal +- http://www.cowlark.com -+
This archive was generated by hypermail 2b25 : Wed Aug 08 2001 - 05:50:46 CDT