Package: brutalchess
Version: 0.5+dfsg-1
Tags: patch

This package fails to build with with GCC 4.2.  Version 4.2 has not
been released yet but I'm building with a snapshot in order to find
errors and give people an advance warning.  As of version 4.2, GCC
will no longer accept a typedef void as a function argument in
C++.  In order words, the following code will be accepted as C but
rejected as C++:

(sid)1003:[EMAIL PROTECTED]: ~/src] cat t.c
typedef void ALCvoid;
void test(ALCvoid) {}
(sid)1004:[EMAIL PROTECTED]: ~/src] /usr/lib/gcc-snapshot/bin/gcc -c t.c
(sid)1005:[EMAIL PROTECTED]: ~/src] /usr/lib/gcc-snapshot/bin/g++ -c t.c
t.c:2: error: '<anonymous>' has incomplete type
t.c:2: error: invalid use of 'ALCvoid'

Some background information about why this code is no longer accepted
can be found at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9278

You make use of such code through the use of GLvoid.  A patch is
below.

> Automatic build of brutalchess_0.5+dfsg-1 on coconut0 by sbuild/ia64 0.49
...
> if ia64-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I.     -Wall -g -O2  
> -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/freetype2 -MT 
> md3view.o -MD -MP -MF ".deps/md3view.Tpo" -c -o md3view.o md3view.cpp; \
>       then mv -f ".deps/md3view.Tpo" ".deps/md3view.Po"; else rm -f 
> ".deps/md3view.Tpo"; exit 1; fi
> In file included from md3view.cpp:30:
> q3charmodel.h: In constructor 'Q3CharModel::Q3CharModel()':
> q3charmodel.h:69: warning: 'Q3CharModel::m_lowerframe' will be initialized 
> after
> q3charmodel.h:69: warning:   'int Q3CharModel::m_upperframe'
> q3charmodel.h:28: warning:   when initialized here
> q3charmodel.h: In constructor 'Q3CharModel::Q3CharModel(const std::string&, 
> std::string)':
> q3charmodel.h:69: warning: 'Q3CharModel::m_lowerframe' will be initialized 
> after
> q3charmodel.h:69: warning:   'int Q3CharModel::m_upperframe'
> q3charmodel.h:30: warning:   when initialized here
> md3view.cpp: At global scope:
> md3view.cpp:75: error: '<anonymous>' has incomplete type
> md3view.cpp:75: error: invalid use of 'GLvoid'
> md3view.cpp: In function 'int resizeWindow(int, int)':
> md3view.cpp:75: error: too few arguments to function 'int initGL(<type 
> error>)'
> md3view.cpp:105: error: at this point in file
> md3view.cpp: At global scope:
> md3view.cpp:111: error: '<anonymous>' has incomplete type
> md3view.cpp:111: error: invalid use of 'GLvoid'

--- ./src/md3view.cpp~  2007-02-03 15:18:26.000000000 +0000
+++ ./src/md3view.cpp   2007-02-03 15:18:38.000000000 +0000
@@ -72,7 +72,7 @@
        exit( returnCode );
 }
 
-int initGL( GLvoid );
+int initGL( void );
 // function to reset our viewport after a window resize
 int resizeWindow( int width, int height )
 {
@@ -108,7 +108,7 @@
 
 
 // general OpenGL initialization function
-int initGL( GLvoid )
+int initGL( void )
 {
        cout << "Initializing OpenGL" << endl;
        // Enable smooth shading
--- ./src/objview.cpp~  2007-02-03 15:18:52.000000000 +0000
+++ ./src/objview.cpp   2007-02-03 15:19:06.000000000 +0000
@@ -73,7 +73,7 @@
        exit( returnCode );
 }
 
-int initGL( GLvoid );
+int initGL( void );
 // function to reset our viewport after a window resize
 int resizeWindow( int width, int height )
 {
@@ -109,7 +109,7 @@
 
 
 // general OpenGL initialization function
-int initGL( GLvoid )
+int initGL( void )
 {
        cout << "Initializing OpenGL" << endl;
        // Enable smooth shading
@@ -158,7 +158,7 @@
 }
 
 // Here goes our drawing code
-int drawGLScene( GLvoid )
+int drawGLScene( void )
 {
        // These are to calculate our fps
        static GLint T0     = 0;

-- 
Martin Michlmayr
http://www.cyrius.com/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to