#3 compile fails for strict ANSI


The current POGL code is not ANSI clean. I would like to see it modified
to meet stricter compile options (such as -std=c89 -pedantic for gcc).
Some current output from gcc -std=c89 -pedantic that need to be

(1) /usr/lib/perl5/5.10/i686-cygwin/CORE/perl.h:1625:40: warning: anonymous variadic macros were introduced in C99

This comes from perl itself. The fix here is to configure and build
perl with the same strict compiler options.

(2) /usr/lib/perl5/5.10/i686-cygwin/CORE/perl.h:1672: warning: ISO C90 does not support 'long long'


(3) OpenGL.xs:53: warning: ISO C forbids braced-groups within expressions

Some of the macros used in the XS boot process have
this usage. Need to investigate where that happens and
what the corrected code would be.

(4) gl_exclude.h:5: error: expected identifier or '(' before '/' token

// are not ANSI standard comments for C.
Need to replace with /* ... */ instead.

(5) pogl_gl_top.xs:111: warning: ISO C forbids conversion of function pointer to object pointer type
pogl_gl_top.xs:111: warning: ISO C forbids assignment between function pointer and 'void *'

This is from incorrect constructs in creating the function
pointers for OpenGL extensions at runtime. The problem
could be fixed by replacing (void *) by the actual function
pointer typecasts. Instead, the problem will be deferred
until the GLEW re-implementation which already does
this correctly.


  • Chris Marshall

    Chris Marshall - 2011-08-04
    • summary: compile fails under strict standard compliance --> compile fails for strict ANSI
  • Chris Marshall

    Chris Marshall - 2011-08-05
    • priority: 3 --> 1
  • Chris Marshall

    Chris Marshall - 2011-08-05

    Following some additional investigation, problems
    #1-3 appear that they would be fixed if perl were built
    using gcc with -ansi options so that the correct variant
    of STMT_START and STMT_END would be generated.

    Problem #5 will be fixed by the switch to GLEW for
    the bindings which would use the correct typedefs
    for the function pointers.

    Problem #4, use of C++ style comments is the only
    one that appears to require change. As such, I
    am lowering the priority of this ticket to Lowest.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks