|
Bugzilla – Full Text Bug Listing |
| Summary: | GCC 14: gle package fails | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE Tumbleweed | Reporter: | Michal Jireš <michal.jires> |
| Component: | Development | Assignee: | Jan Engelhardt <jengelh> |
| Status: | RESOLVED FIXED | QA Contact: | E-mail List <qa-bugs> |
| Severity: | Normal | ||
| Priority: | P3 - Medium | CC: | jengelh |
| Version: | Current | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Other | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Bug Depends on: | |||
| Bug Blocks: | 1220571 | ||
|
Description
Michal Jireš
2024-03-19 11:38:26 UTC
Iff my interpreatation of *Microsoft* and *IBM* documentation on GLU (not GLE) is right, then gluTessCallback was originally defined as:
void gluTessCallback(GLUtesselator *tess, GLenum which, void (*fn)());
i.e. a function pointer with _unspecified_ arguments. However, as C evolved:
C11(ISO/IEC 9899:201x) §6.11.6 Function declarators
The use of function declarators with empty parentheses (not prototype-format parameter type declarators) is an obsolescent feature.
And now somone made a modification to the glu source code, cf. commit 03ac87fa675e753aa2ff698c526c8f146f6c6490. This change is questionable, because now, it explicitly makes the callback be a 0-argument function rather than an unspecified-argument function.
The practical solution, in my opinion, is for gluTessCallback to take a hint from dlsym, which returns function pointers as object pointers actually.
In other words, glu should use
void gluTessCallback(GLUtesselator *tess, GLenum which, void *fn);
Here now means 13 years ago. ;-) Just as reference. commit 03ac87fa675e753aa2ff698c526c8f146f6c6490 Author: zhigang gong <zhigang.gong@gmail.com> Date: Thu May 12 11:36:59 2011 +0100 glu: Fix _GLUfuncptr typedef. typedef void (GLAPIENTRYP _GLUfuncptr)(); causes the following warning: function declaration isn't a prototype. Signed-off-by: José Fonseca <jfonseca@vmware.com> diff --git a/include/GL/glu.h b/include/GL/glu.h index cd967ac..ba2228d 100644 --- a/include/GL/glu.h +++ b/include/GL/glu.h @@ -284,7 +284,7 @@ typedef GLUtesselator GLUtriangulatorObj; #define GLU_TESS_MAX_COORD 1.0e150 /* Internal convenience typedefs */ -typedef void (GLAPIENTRYP _GLUfuncptr)(); +typedef void (GLAPIENTRYP _GLUfuncptr)(void); GLAPI void GLAPIENTRY gluBeginCurve (GLUnurbs* nurb); GLAPI void GLAPIENTRY gluBeginPolygon (GLUtesselator* tess); Ok. Could you make a submitrequest for glu package, please? Best would be to discuss this also upstream. https://gitlab.freedesktop.org/mesa/glu/-/issues gle-3.1.2, released last year, addresses this already rq1163394 to factory |