[C++-sig] const_argument test failures

Aleksey Gurtovoy agurtovoy at meta-comm.com
Wed Oct 20 01:01:34 CEST 2004


Jonathan Brandmeyer writes:
> On Mon, 2004-10-18 at 17:51, Aleksey Gurtovoy wrote:
> > The comment in the test says:
> > 
> >  * The purpose of this test is to determine if a function can be called from
> >  * Python with a const value type as an argument, and whether or not the 
> >  * presence of a prototype without the cv-qualifier will work around the
> >  * compiler's bug.
> > 
> > So, OK, the first part of it fails on MSVC < 7.1, naturally, due to the same 
> > bug that makes the following to fail:
> > 
> >     template< typename T > void f(void (*)(T));
> >     void g(int const);
> > 
> >     int main()
> >     {
> >         f(g);   // error C2664: 'f' : cannot convert parameter 1 from 
> >                 // 'void (const int)' to 'void (__cdecl *)(int)'
> > 
> >         return 0;
> >     }
> > 
> > The second part of the test "passes", but of course we'll never see it in
> > the reports.
> > 
> > So, the question is: what exactly was the original plan for this in terms 
> > of its presence in the regression reports? 
> 
> The "plan" was to see which compilers were affected by this bug.  It was
> motivated by the thread "Slice test fails on Intel 8.1 at runtime" which
> ran from 9/25 to 9/27.  When this test was originally added all versions
> of MSVC and some (all?) versions of intel-win32 were affected.  MSVC 7.0
> and newer would fail at runtime in the same way that vc7 is failing now,

Could you explain how something like this turns into a run-time failure?

> and < 7.0 would fail at compile time.  

OK.

> At least one platform (icc 8.1 on
> win32) had no source-level workaround at all that I knew of.  Apparently
> something has changed since then since these toolchains are passing now.

May be some toolset options has been changed, but I doubt it.


> Are the older regression reports still available somewhere?  

Unfortunately, no. We used to keep reports history, but the setup was
never restored after a move to another machine. It's on our TODO list (not
that it helps right now).

> If so, I
> can search through them to find out when these tests started passing.
> 
> > Right now the failures represented by yellow cells, and I'd like to see 
> > them cleared up, whether it's done through "explicit-failures-markup.xml"
> > or through appropriate #ifdef-s in the file itself.
> 
> I can add an #ifdef for MSVC < 7.0, since that is a known source-level
> workaround.  After I figure out what changed to let the newer toolkits
> pass, maybe that can be applied to the vc7 toolkit.  Otherwise, I think
> the only option for vc7 is to add it to explicit-failures-markup.xml.

David, would you be OK with this?

--
Aleksey Gurtovoy
MetaCommunications Engineering




More information about the Cplusplus-sig mailing list