Re: [boost] Re: [test][comeau] problem with va_list

----- Mensaje original ----- De: Edward Diener <eddielee@tropicsoft.com> Fecha: Miércoles, Abril 27, 2005 10:25 pm Asunto: [boost] Re: [test][comeau] problem with va_list
JOAQUIN LOPEZ MU?Z wrote:
Current tests for Comeau 4.3 show this problem:
"G:\boost\boost/test/impl/test_tools.ipp", line 136: error #135: namespace "std" has no member "va_list" std::va_list args;
Looks like va_list is not properly injected into std:: (yet BOOST_NO_STDC_NAMESPACE is *not* defined for this platform, and I guess for a good reason.) I've googled for this and found some discussions at the Boost list on the very same problem, with no definitive answer :(
1. Could anyone take a look at Comeau stdlib <cstdargs> and see what's going on?
It is <cstdarg>, and in libcomo for Comeau 4.3.3 I see:
#include <stdarg.h>
namespace std {
using ::va_list;
}
Comeau uses the back end compiler for the C headers, such as stdarg.h, although it provides a few of its own for various compilers evidently to make up for some compiler deficiences. I do not see any stdarg.h among the latter. What is the back end compiler being used for the failing test ?
VC 7.1. The offending file seems pretty straightfoward (http://tinyurl.com/e27be), so I don't really have a clue what's going on... Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

JOAQUIN LOPEZ MU?Z wrote:
----- Mensaje original ----- De: Edward Diener <eddielee@tropicsoft.com> Fecha: Miércoles, Abril 27, 2005 10:25 pm Asunto: [boost] Re: [test][comeau] problem with va_list
JOAQUIN LOPEZ MU?Z wrote:
Current tests for Comeau 4.3 show this problem:
"G:\boost\boost/test/impl/test_tools.ipp", line 136: error #135: namespace "std" has no member "va_list" std::va_list args;
Looks like va_list is not properly injected into std:: (yet BOOST_NO_STDC_NAMESPACE is *not* defined for this platform, and I guess for a good reason.) I've googled for this and found some discussions at the Boost list on the very same problem, with no definitive answer :(
1. Could anyone take a look at Comeau stdlib <cstdargs> and see what's going on?
It is <cstdarg>, and in libcomo for Comeau 4.3.3 I see:
#include <stdarg.h>
namespace std {
using ::va_list;
}
Comeau uses the back end compiler for the C headers, such as stdarg.h, although it provides a few of its own for various compilers evidently to make up for some compiler deficiences. I do not see any stdarg.h among the latter. What is the back end compiler being used for the failing test ?
VC 7.1.
The offending file seems pretty straightfoward (http://tinyurl.com/e27be), so I don't really have a clue what's going on...
I tried compiling that source file manually against the latest Boost from CVS and Comeau 4.3.3 pointing to the Boost directory but I get a slew of wchar_t errors. In strict mode, --A --a, I get: H:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\wchar.h(96): error: the type "long long" is nonstandard typedef __int64 __time64_t; /* 64-bit time value */ and many others along the same line. In non-strict mode I get: H:\Utilities\Comeau\libcomo\cnames\cstddef(14): error: the global scope has no "wchar_t" using ::wchar_t; and many others along the same line. I have never tried to use Boost Testing and bjam is another planet to me. If you have some Comeau command line options for me to use I will try again. I am setup to use vc7.1 as the backend and have all my Comeau environment variables and vc7.1 environment variables setup properly.

Edward Diener <eddielee <at> tropicsoft.com> writes:
I tried compiling that source file manually against the latest Boost from CVS and Comeau 4.3.3 pointing to the Boost directory but I get a slew of wchar_t errors. In strict mode, --A --a, I get:
H:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\wchar.h(96): error: the type "long long" is nonstandard typedef __int64 __time64_t; /* 64-bit time value */
and many others along the same line.
In non-strict mode I get:
H:\Utilities\Comeau\libcomo\cnames\cstddef(14): error: the global scope has no "wchar_t" using ::wchar_t;
and many others along the same line.
I have never tried to use Boost Testing and bjam is another planet to me. If you have some Comeau command line options for me to use I will try again. I am setup to use vc7.1 as the backend and have all my Comeau environment variables and vc7.1 environment variables setup properly.
Never used Comeau, but the regression logs show the following commandline: "como" --vc71 -c -e5 --no_version --no_prelink_verbose --display_error_number --long_long --diag_suppress=9,21,161,748,940,962 -D__STL_LONG_LONG --a -DBOOST_COMO_STRICT=1 --no_inlining /Zi /Od -D_WIN32 -DBOOST_SP_DISABLE_THREADS --exceptions -DBOOST_DISABLE_WIN32 --wchar_t -I"G:\boost" -I"G:\boost" -I"G:\boost" so this might work for you. Check the regression tests for more examples of Comeau commandlines: http://www.meta-comm.com/engineering/boost-regression/cvs- head/developer/index.html HTH Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

Joaquin M Lopez Munoz wrote:
Edward Diener <eddielee <at> tropicsoft.com> writes:
Never used Comeau, but the regression logs show the following commandline:
"como" --vc71 -c -e5 --no_version --no_prelink_verbose --display_error_number --long_long --diag_suppress=9,21,161,748,940,962 -D__STL_LONG_LONG --a -DBOOST_COMO_STRICT=1 --no_inlining /Zi /Od -D_WIN32 -DBOOST_SP_DISABLE_THREADS --exceptions -DBOOST_DISABLE_WIN32 --wchar_t -I"G:\boost" -I"G:\boost" -I"G:\boost"
With the command line from above with modifications for my own paths: For whatever reason, although #include <cstdarg> is in the source file, when the Comeau compiler is executed it never actually includes the file. This must be a bug in the Comeau compiler but perhaps Greg Comeau has a fix for it. Also even if one does an #include<stdarg.h> it never gets included. I know this sounds preposterous but I have tested this out on my system extensively to determine that this is what is happening. I have no idea what the compiler is doing in this regard. Of course this would explain the va_list error but I have no idea where va_list is coming from in the first place if neither of these files are ever included.

Quoting Edward Diener <eddielee@tropicsoft.com>:
For whatever reason, although #include <cstdarg> is in the source file, when the Comeau compiler is executed it never actually includes the file. This must be a bug in the Comeau compiler but perhaps Greg Comeau has a fix for it.
Do you have libcomo31 properly installed and built? Did you try "Hello world" using iostreams? B.

Bronek Kozicki wrote:
Quoting Edward Diener <eddielee@tropicsoft.com>:
For whatever reason, although #include <cstdarg> is in the source file, when the Comeau compiler is executed it never actually includes the file. This must be a bug in the Comeau compiler but perhaps Greg Comeau has a fix for it.
Do you have libcomo31 properly installed and built? Did you try "Hello world" using iostreams?
Yes it is properly installed and "Hello World" works fine.

Edward Diener wrote:
Joaquin M Lopez Munoz wrote:
With the command line from above with modifications for my own paths:
For whatever reason, although #include <cstdarg> is in the source file, when the Comeau compiler is executed it never actually includes the file. This must be a bug in the Comeau compiler but perhaps Greg Comeau has a fix for it.
Also even if one does an #include<stdarg.h> it never gets included.
I know this sounds preposterous but I have tested this out on my system extensively to determine that this is what is happening. I have no idea what the compiler is doing in this regard.
Of course this would explain the va_list error but I have no idea where va_list is coming from in the first place if neither of these files are ever included.
Did you read my post? The compiler is free to implement the standard includes in any way it wants and this is what comeau does. And yes it seems to be buggy. Thomas -- Thomas Witt witt@acm.org

Thomas Witt wrote:
Edward Diener wrote:
Joaquin M Lopez Munoz wrote:
With the command line from above with modifications for my own paths:
For whatever reason, although #include <cstdarg> is in the source file, when the Comeau compiler is executed it never actually includes the file. This must be a bug in the Comeau compiler but perhaps Greg Comeau has a fix for it.
Also even if one does an #include<stdarg.h> it never gets included.
I know this sounds preposterous but I have tested this out on my system extensively to determine that this is what is happening. I have no idea what the compiler is doing in this regard.
Of course this would explain the va_list error but I have no idea where va_list is coming from in the first place if neither of these files are ever included.
Did you read my post? The compiler is free to implement the standard includes in any way it wants and this is what comeau does. And yes it seems to be buggy.
I have notified Comeau of the bug. It can be seen just by: #include <cstdarg> void test() { std::va_list avar; } ATEST.CPP(3): error #276: name followed by "::" must be a class or namespace name std::va_list args; ^ ATEST.CPP(3): error #65: expected a ";" std::va_list args; ^ and just compiling, option -c, with no other options ( vc71 default is set ). I have notified Comeau of the problem and am awaiting another response from them. Their first response was to say what you did, about "compiler magic", but since I did not have a simple test case, I replied with the example above.

Edward Diener wrote:
void test() { std::va_list avar; }
isn't "va_list" a C macro? If it is, then it does not belong to any namespace. Following compiles for me (como 4.3.3 strict mode + vc7.1): #include <cstdarg> void test(...) {va_list avar;} int main() {test(1);} Regards B.

Edward Diener wrote:
Bronek Kozicki wrote:
Edward Diener wrote:
void test() { std::va_list avar; } isn't "va_list" a C macro? No, it is a standard type.
it's not a shame not to use it in C++ programs, thus I'm not ashamed not knowing this detail ;) Anyway, I think that my program demonstrates workaround. B.

Bronek Kozicki wrote:
Edward Diener wrote:
Bronek Kozicki wrote:
Edward Diener wrote:
void test() { std::va_list avar; }
isn't "va_list" a C macro?
No, it is a standard type.
it's not a shame not to use it in C++ programs, thus I'm not ashamed not knowing this detail ;)
"Shame" is for acting in a way one knows is wrong, not for not knowing some area of knowledge. If it were the latter, there is so much I still do not know about C++ that I would be ashamed all the time when using it. <g> I have used varargs very little myself.
Anyway, I think that my program demonstrates workaround.
Yes, it was suggested before on this thread, and will probably be the workaround used. The test programs which use va_list will need to be changed for Comeau. I still have not received acknowledgment from Comeau that this bug exists after reporting it, but maybe they think it is unnecessary and are just happy to know about it, or already know about it and have a fix for their next release.

Edward Diener wrote:
Bronek Kozicki wrote:
Edward Diener wrote:
Bronek Kozicki wrote:
Edward Diener wrote:
void test() { std::va_list avar; }
isn't "va_list" a C macro?
No, it is a standard type.
it's not a shame not to use it in C++ programs, thus I'm not ashamed not knowing this detail ;)
"Shame" is for acting in a way one knows is wrong, not for not knowing some area of knowledge. If it were the latter, there is so much I still do not know about C++ that I would be ashamed all the time when using it. <g>
I have used varargs very little myself.
Anyway, I think that my program demonstrates workaround.
Yes, it was suggested before on this thread, and will probably be the workaround used. The test programs which use va_list will need to be changed for Comeau.
I still have not received acknowledgment from Comeau that this bug exists after reporting it, but maybe they think it is unnecessary and are just happy to know about it, or already know about it and have a fix for their next release.
Just a quick note that I did hear from Comeau and they are aware of this bug in Comeau 4.3.3.
participants (5)
-
Bronek Kozicki
-
Edward Diener
-
JOAQUIN LOPEZ MU?Z
-
Joaquin M Lopez Munoz
-
Thomas Witt