Boost logo

Boost :

From: Christopher Currie (codemonkey_at_[hidden])
Date: 2004-07-13 10:17:43


Can anyone lend assistance in debugging the Sun regressions for Boost
Preprocessor? The early access edition of the Studio 9 compiler is
failing on BOOST_PP code that compiles just fine under earlier versions.

The code that's failing appears to relate to the expansion (or lack
thereof) of the macros that implement BOOST_PP_WHILE. I'm continuing to
investigate, but since I'm unfamiliar with what the macros are
*supposed* to do, I'm hoping someone can spot the trouble more quickly
than I can.

I've attached the preprocessed code from libs/preprocessor/test/control.cpp.

Thanks in advance,
Christopher

-- 
Christopher Currie <codemonkey_at_[hidden]>

#1 "/home/ccurrie/src/boost/libs/preprocessor/test/control.cpp"
#1 "/home/ccurrie/src/boost/boost/preprocessor/arithmetic/add.hpp"
#1 "/home/ccurrie/src/boost/boost/preprocessor/arithmetic/dec.hpp"
#1 "/home/ccurrie/src/boost/boost/preprocessor/config/config.hpp"
#1 "/home/ccurrie/src/boost/boost/preprocessor/arithmetic/inc.hpp"
#1 "/home/ccurrie/src/boost/boost/preprocessor/control/while.hpp"
#1 "/home/ccurrie/src/boost/boost/preprocessor/cat.hpp"
#1 "/home/ccurrie/src/boost/boost/preprocessor/debug/error.hpp"
#1 "/home/ccurrie/src/boost/boost/preprocessor/detail/auto_rec.hpp"
#1 "/home/ccurrie/src/boost/boost/preprocessor/control/iif.hpp"
#1 "/home/ccurrie/src/boost/boost/preprocessor/list/fold_left.hpp"
#1 "/home/ccurrie/src/boost/boost/preprocessor/control/while.hpp"
#1 "/home/ccurrie/src/boost/boost/preprocessor/list/detail/fold_left.hpp"
#1 "/home/ccurrie/src/boost/boost/preprocessor/control/expr_iif.hpp"
#1 "/home/ccurrie/src/boost/boost/preprocessor/list/adt.hpp"
#1 "/home/ccurrie/src/boost/boost/preprocessor/detail/is_binary.hpp"
#1 "/home/ccurrie/src/boost/boost/preprocessor/detail/check.hpp"
#1 "/home/ccurrie/src/boost/boost/preprocessor/logical/compl.hpp"
#1 "/home/ccurrie/src/boost/boost/preprocessor/tuple/eat.hpp"
#1 "/home/ccurrie/src/boost/boost/preprocessor/list/fold_right.hpp"
#1 "/home/ccurrie/src/boost/boost/preprocessor/control/while.hpp"
#1 "/home/ccurrie/src/boost/boost/preprocessor/list/detail/fold_right.hpp"
#1 "/home/ccurrie/src/boost/boost/preprocessor/list/reverse.hpp"
#1 "/home/ccurrie/src/boost/boost/preprocessor/logical/bitand.hpp"
#1 "/home/ccurrie/src/boost/boost/preprocessor/control/detail/while.hpp"
#1 "/home/ccurrie/src/boost/boost/preprocessor/logical/bool.hpp"
#1 "/home/ccurrie/src/boost/boost/preprocessor/tuple/elem.hpp"
#1 "/home/ccurrie/src/boost/boost/preprocessor/control.hpp"
#1 "/home/ccurrie/src/boost/boost/preprocessor/control/deduce_d.hpp"
#1 "/home/ccurrie/src/boost/boost/preprocessor/control/expr_if.hpp"
#1 "/home/ccurrie/src/boost/boost/preprocessor/control/if.hpp"
#1 "/home/ccurrie/src/boost/libs/preprocessor/test/test.h"
#1 "/opt/SUNWspro/prod/include/CC/std/cstdio"
#1 "/usr/include/sys/feature_tests.h"
#13 "/usr/include/sys/feature_tests.h"
#pragma ident "@(#)feature_tests.h 1.18 99/07/26 SMI"
#1 "/usr/include/sys/isa_defs.h"
#9 "/usr/include/sys/isa_defs.h"
#pragma ident "@(#)isa_defs.h 1.20 99/05/04 SMI"
#158
extern "C" {
#380
}
#18 "/usr/include/sys/feature_tests.h"
extern "C" {
#181
}
#1 "/usr/include/iso/stdio_iso.h"
#32 "/usr/include/iso/stdio_iso.h"
#pragma ident "@(#)stdio_iso.h 1.2 99/10/25 SMI"
#1 "/usr/include/sys/va_list.h"
#9 "/usr/include/sys/va_list.h"
#pragma ident "@(#)va_list.h 1.12 99/05/04 SMI"
#22
extern "C" {



typedef void * __va_list ;





}
#1 "/usr/include/stdio_tag.h"
#9 "/usr/include/stdio_tag.h"
#pragma ident "@(#)stdio_tag.h 1.3 98/04/20 SMI"


extern "C" {
#21
typedef struct __FILE __FILE ;



}
#1 "/usr/include/stdio_impl.h"
#9 "/usr/include/stdio_impl.h"
#pragma ident "@(#)stdio_impl.h 1.8 99/06/10 SMI"
#14
extern "C" {
#22
typedef int ssize_t ;
#38
struct __FILE
{




ssize_t _cnt ;
unsigned char * _ptr ;

unsigned char * _base ;
unsigned char _flag ;
unsigned char _file ;
unsigned __orientation : 2 ;
unsigned __ionolock : 1 ;
unsigned __filler : 5 ;
} ;




}
#49 "/usr/include/iso/stdio_iso.h"
extern "C" {
#59
typedef long long __longlong_t ;
#70
namespace std {




typedef __FILE FILE ;
#83
typedef unsigned int size_t ;




typedef long fpos_t ;





}
#147
extern __FILE __iob [ 20 ] ;
#159
namespace std {




extern int remove ( const char * ) ;
extern int rename ( const char * , const char * ) ;
extern FILE * tmpfile ( void ) ;
extern char * tmpnam ( char * ) ;
extern int fclose ( FILE * ) ;
extern int fflush ( FILE * ) ;
extern FILE * fopen ( const char * , const char * ) ;
extern FILE * freopen ( const char * , const char * , FILE * ) ;
extern void setbuf ( FILE * , char * ) ;
extern int setvbuf ( FILE * , char * , int , size_t ) ;

extern int fprintf ( FILE * , const char * , ... ) ;

extern int fscanf ( FILE * , const char * , ... ) ;

extern int printf ( const char * , ... ) ;

extern int scanf ( const char * , ... ) ;

extern int sprintf ( char * , const char * , ... ) ;

extern int sscanf ( const char * , const char * , ... ) ;
extern int vfprintf ( FILE * , const char * , __va_list ) ;
extern int vprintf ( const char * , __va_list ) ;
extern int vsprintf ( char * , const char * , __va_list ) ;
extern int fgetc ( FILE * ) ;
extern char * fgets ( char * , int , FILE * ) ;
extern int fputc ( int , FILE * ) ;
extern int fputs ( const char * , FILE * ) ;
#203
extern char * gets ( char * ) ;
extern int puts ( const char * ) ;
extern int ungetc ( int , FILE * ) ;
extern size_t fread ( void * , size_t , size_t , FILE * ) ;
extern size_t fwrite ( const void * , size_t , size_t , FILE * ) ;
extern int fgetpos ( FILE * , fpos_t * ) ;
extern int fseek ( FILE * , long , int ) ;
extern int fsetpos ( FILE * , const fpos_t * ) ;
extern long ftell ( FILE * ) ;
extern void rewind ( FILE * ) ;
#219
extern void perror ( const char * ) ;


extern int __filbuf ( FILE * ) ;
extern int __flsbuf ( int , FILE * ) ;
#278
}
#288
namespace std {
inline int getc ( FILE * _p ) {
return ( -- _p -> _cnt < 0 ? __filbuf ( _p ) : ( int ) * _p -> _ptr ++ ) ; }
inline int putc ( int _x , FILE * _p ) {
return ( -- _p -> _cnt < 0 ? __flsbuf ( _x , _p )
: ( int ) ( * _p -> _ptr ++ = ( unsigned char ) _x ) ) ; }
}
#308
namespace std {
inline int getchar ( ) { return getc ( ( & __iob [ 0 ] ) ) ; }
inline int putchar ( int _x ) { return putc ( _x , ( & __iob [ 1 ] ) ) ; }
}
#319
namespace std {
inline void clearerr ( FILE * _p ) { _p -> _flag &= ~ ( 0040 | 0020 ) ; }
inline int feof ( FILE * _p ) { return _p -> _flag & 0020 ; }
inline int ferror ( FILE * _p ) { return _p -> _flag & 0040 ; }
}
#336
}
#25 "/home/ccurrie/src/boost/libs/preprocessor/test/test.h"
namespace std { }
using namespace std ;

int main ( void ) {
printf ( "pass " "11:06:52" ) ;
return 0 ;
}
#20 "/home/ccurrie/src/boost/libs/preprocessor/test/control.cpp"
typedef int test_20 [ ( ( ( 0 ) == 0 ) == 1 ) ? 1 : - 1 ] ;
typedef int test_21 [ ( ( 1 == 1 ) == 1 ) ? 1 : - 1 ] ;

typedef int test_23 [ ( ( 1 == 1 ) == 1 ) ? 1 : - 1 ] ;
typedef int test_24 [ ( ( ( 0 ) == 0 ) == 1 ) ? 1 : - 1 ] ;

typedef int test_26 [ ( ( 0 == 0 ) == 1 ) ? 1 : - 1 ] ;
typedef int test_27 [ ( ( 1 == 1 ) == 1 ) ? 1 : - 1 ] ;

typedef int test_29 [ ( ( 0 == 0 ) == 1 ) ? 1 : - 1 ] ;
typedef int test_30 [ ( ( 1 == 1 ) == 1 ) ? 1 : - 1 ] ;




typedef int test_35 [ ( ( BOOST_PP_WHILE_BOOST_PP_IIF_BOOST_PP_BITAND_1 1 ( BOOST_PP_NODE_64 , BOOST_PP_NODE_192 ) ( BOOST_PP_WHILE_P
#35
) ( BOOST_PP_WHILE_P ) ( BOOST_PP_WHILE_P ) ( BOOST_PP_WHILE_P ) ( BOOST_PP_WHILE_P ) ( BOOST_PP_WHILE_P ) ( BOOST_PP_WHILE_P
#35
) ( PRED , OP_1 , 50 ) == 0 ) == 1 ) ? 1 : - 1 ] ;




typedef int test_40 [ ( ( BOOST_PP_WHILE_BOOST_PP_IIF_BOOST_PP_BITAND_1 1 ( BOOST_PP_NODE_64 , BOOST_PP_NODE_192 ) ( BOOST_PP_WHILE_P
#40
) ( BOOST_PP_WHILE_P ) ( BOOST_PP_WHILE_P ) ( BOOST_PP_WHILE_P ) ( BOOST_PP_WHILE_P ) ( BOOST_PP_WHILE_P ) ( BOOST_PP_WHILE_P
#40
) ( PRED , OP_3 , 10 ) == 0 ) == 1 ) ? 1 : - 1 ] ;
typedef int test_41 [ ( ( BOOST_PP_WHILE_BOOST_PP_IIF_BOOST_PP_BITAND_1 1 ( BOOST_PP_NODE_64 , BOOST_PP_NODE_192 ) ( BOOST_PP_WHILE_P
#41
) ( BOOST_PP_WHILE_P ) ( BOOST_PP_WHILE_P ) ( BOOST_PP_WHILE_P ) ( BOOST_PP_WHILE_P ) ( BOOST_PP_WHILE_P ) ( BOOST_PP_WHILE_P
#41
) ( PRED , OP_3 , 10 ) == 0 ) == 1 ) ? 1 : - 1 ] ;


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk