Bug 654 - Compiler warning when compiling Log_Msg_Test.cpp
Summary: Compiler warning when compiling Log_Msg_Test.cpp
Status: RESOLVED
Alias: None
Product: ACE
Classification: Unclassified
Component: ACE Tests (show other bugs)
Version: 5.1.8
Hardware: x86 Windows NT
: P3 normal
Assignee: DOC Center Support List (internal)
URL:
Depends on:
Blocks:
 
Reported: 2000-08-30 01:56 CDT by Albert Wijnja
Modified: 2000-09-08 12:35 CDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Albert Wijnja 2000-08-30 01:56:56 CDT
Compiling the file Log_Msg_Test.cpp gives the following warning:

cc386 -DCPU=PENTIUM -DACE_VXWORKS=0x540 -Wno-uninitialized -D_REENTRANT -ansi -f
no-builtin -fno-defer-pop -fvolatile -nostdinc -nostdlib  -W -Wall -g -fno-rtti
-DACE_LACKS_RTTI  -fno-exceptions -fcheck-new  -ID:/Tornado/target/h -ID:/ace_ta
o_518/ACE_wrappers  -c  -o .obj/Log_Msg_Test.o Log_Msg_Test.cpp
In file included from D:/Tornado/target/h/private/aioPxLibP.h:38,
                 from D:/Tornado/target/h/aio.h:27,
                 from D:/ace_tao_518/ACE_wrappers/ace/OS.h:3668,
                 from D:/ace_tao_518/ACE_wrappers/ace/ACE.h:21,
                 from D:/ace_tao_518/ACE_wrappers/ace/IO_SAP.h:21,
                 from D:/ace_tao_518/ACE_wrappers/ace/FILE.h:21,
                 from D:/ace_tao_518/ACE_wrappers/ace/FILE_IO.h:21,
                 from D:/ace_tao_518/ACE_wrappers/ace/FILE_Connector.h:21,
                 from Log_Msg_Test.cpp:24:
D:/Tornado/target/h/private/mutexPxLibP.h:30: warning: `__P' redefined
D:/Tornado/target/h/libio.h:58: warning: this is the location of the previous de
finition

The contents of my config.h is as follows:

#if defined (_MSC_VER)  ||  defined (__BORLANDC__)
#include <ace/config-win32.h>
#undef ACE_HAS_EXCEPTIONS
#else
#include <ace/config-vxworks5.x.h>
#define ACE_HAS_IP_MULTICAST 		1
#define ACE_HAS_VERBOSE_NOTSUP	1
#define ACE_HAS_AIO_CALLS		1
#endif

The test program is _NOT_ executed via the script run_tests.vxworks though !!!
Comment 1 Albert Wijnja 2000-08-30 02:12:24 CDT
Compiler version info added
Comment 2 Albert Wijnja 2000-08-30 02:20:35 CDT
The compiler version field gets truncated somehow. The complete information is:
gcc driver version cygnus-2.7.2-960126 egcs-971225 tornado 2.0 executing gcc 
version cygnus-2.7.2-960126
Comment 3 levine 2000-08-31 08:21:04 CDT
Can you track down the problem for us, please, Albert?  It
looks like it's in the VxWorks system headers.
Comment 4 levine 2000-08-31 08:21:30 CDT
To tao-support
Comment 5 Albert Wijnja 2000-09-08 07:34:50 CDT
Indeed it is a mistake in the VxWorks header files.

Solution: replace line 30 in ${WIND_BASE}/target/h/private/mutexPxLibP.h with:

#ifndef __P
#ifdef __STDC__
#define __P(x)	x
#else /* !__STDC__ */
#define __P(x)  ()
#endif /* __STDC__ */
#endif /* !__P */
Comment 6 levine 2000-09-08 12:35:09 CDT
Thanks, Albert!