Menu

#194 xfig: incompatible with GCC 15 C23 standard

xfig
open
nobody
None
2025-03-02
2025-02-21
No

Debian bug report #1098137 reports that current xfig does not compile with GCC 15, which uses to C23 standard.
According to the bug report http://gcc.gnu.org/gcc-15/porting_to.html should give some hints for porting to GCC 15 / C23.
The build log at http://qa-logs.debian.net/2025/02/16/amd64exp/xfig_3.2.9a-2_unstable_gccexp.log.gz shows the following errors:

d_arcbox.c:48:25: error: assignment to void (*)(void) from incompatible pointer type void (*)(int,  int) [-Wincompatible-pointer-types]
   48 |     canvas_leftbut_proc = init_arc_box_drawing;
      |                         ^
d_arcbox.c:38:17: note: init_arc_box_drawing declared here
   38 | static void     init_arc_box_drawing(int x, int y);
      |                 ^~~~~~~~~~~~~~~~~~~~
d_arcbox.c: In function init_arc_box_drawing:
d_arcbox.c:62:25: error: assignment to void (*)(void) from incompatible pointer type void (*)(int,  int) [-Wincompatible-pointer-types]
   62 |     canvas_locmove_proc = resizing_box;
      |                         ^
In file included from d_arcbox.c:25:
u_elastic.h:55:17: note: resizing_box declared here
   55 | extern void     resizing_box(int x, int y);
      |                 ^~~~~~~~~~~~
d_arcbox.c:63:25: error: assignment to void (*)(void) from incompatible pointer type void (*)(int,  int) [-Wincompatible-pointer-types]
   63 |     canvas_leftbut_proc = create_arc_boxobject;
      |                         ^
d_arcbox.c:36:17: note: create_arc_boxobject declared here
   36 | static void     create_arc_boxobject(int x, int y);
      |                 ^~~~~~~~~~~~~~~~~~~~
d_spline.c: In function spline_drawing_selected:
d_spline.c:56:25: error: assignment to void (*)(void) from incompatible pointer type void (*)(int,  int) [-Wincompatible-pointer-types]
   56 |     canvas_leftbut_proc = init_spline_drawing;
      |                         ^
d_spline.c:43:17: note: init_spline_drawing declared here
   43 | static void     init_spline_drawing(int x, int y);
      |                 ^~~~~~~~~~~~~~~~~~~
d_spline.c:57:27: error: assignment to void (*)(void) from incompatible pointer type void (*)(int,  int) [-Wincompatible-pointer-types]
   57 |     canvas_middlebut_proc = init_spline_freehand_drawing;
      |                           ^
d_spline.c:45:17: note: init_spline_freehand_drawing declared here
   45 | static void     init_spline_freehand_drawing(int x, int y);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
d_spline.c: In function init_spline_drawing2:
d_spline.c:83:31: error: assignment to void (*)(void) from incompatible pointer type void (*)(int,  int) [-Wincompatible-pointer-types]
   83 |         canvas_middlebut_proc = create_splineobject;
      |                               ^
d_spline.c:44:17: note: create_splineobject declared here
   44 | static void     create_splineobject(int x, int y);
      |                 ^~~~~~~~~~~~~~~~~~~
d_spline.c:87:31: error: assignment to void (*)(void) from incompatible pointer type void (*)(int,  int) [-Wincompatible-pointer-types]
   87 |         canvas_middlebut_save = create_splineobject;
      |                               ^
d_spline.c:44:17: note: create_splineobject declared here
   44 | static void     create_splineobject(int x, int y);
      |                 ^~~~~~~~~~~~~~~~~~~
d_picobj.c: In function picobj_drawing_selected:
d_box.c: In function box_drawing_selected:
d_box.c:48:25: error: assignment to void (*)(void) from incompatible pointer type void (*)(int,  int) [-Wincompatible-pointer-types]
   48 |     canvas_leftbut_proc = init_box_drawing;
      |                         ^
In file included from d_box.c:18:
d_box.h:19:17: note: init_box_drawing declared here
   19 | extern void     init_box_drawing(int x, int y);
      |                 ^~~~~~~~~~~~~~~~
d_picobj.c:53:25: error: assignment to void (*)(void) from incompatible pointer type void (*)(int,  int) [-Wincompatible-pointer-types]
   53 |     canvas_leftbut_proc = init_picobj_drawing;
      |                         ^
d_picobj.c:41:17: note: init_picobj_drawing declared here
   41 | static void     init_picobj_drawing(int x, int y);
      |                 ^~~~~~~~~~~~~~~~~~~
d_box.c: In function init_box_drawing:
d_picobj.c: In function init_picobj_drawing:
d_picobj.c:64:25: error: assignment to void (*)(void) from incompatible pointer type void (*)(int,  int) [-Wincompatible-pointer-types]
   64 |     canvas_leftbut_proc = create_picobj;
      |                         ^
d_picobj.c:42:17: note: create_picobj declared here
   42 | static void     create_picobj(int x, int y);
      |                 ^~~~~~~~~~~~~
d_box.c:62:25: error: assignment to void (*)(void) from incompatible pointer type void (*)(int,  int) [-Wincompatible-pointer-types]
   62 |     canvas_locmove_proc = resizing_box;
      |                         ^
In file included from d_box.c:27:
u_elastic.h:55:17: note: resizing_box declared here
   55 | extern void     resizing_box(int x, int y);
      |                 ^~~~~~~~~~~~
d_box.c:63:25: error: assignment to void (*)(void) from incompatible pointer type void (*)(int,  int) [-Wincompatible-pointer-types]
   63 |     canvas_leftbut_proc = create_boxobject;
      |                         ^
d_box.c:37:17: note: create_boxobject declared here
   37 | static void     create_boxobject(int x, int y);
      |                 ^~~~~~~~~~~~~~~~
make[4]: *** [Makefile:884: d_arcbox.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[4]: *** [Makefile:884: d_spline.o] Error 1
make[4]: *** [Makefile:884: d_box.o] Error 1
make[4]: *** [Makefile:884: d_picobj.o] Error 1
d_line.c: In function line_drawing_selected:
d_line.c:58:25: error: assignment to void (*)(void) from incompatible pointer type void (*)(int,  int,  int) [-Wincompatible-pointer-types]
   58 |     canvas_leftbut_proc = init_line_drawing;
      |                         ^
d_line.c:47:21: note: init_line_drawing declared here
   47 | static void         init_line_drawing(int x, int y, int shift);
      |                     ^~~~~~~~~~~~~~~~~
d_line.c:59:27: error: assignment to void (*)(void) from incompatible pointer type void (*)(int,  int) [-Wincompatible-pointer-types]
   59 |     canvas_middlebut_proc = init_line_freehand_drawing;
      |                           ^
d_line.c:48:21: note: init_line_freehand_drawing declared here
   48 | static void         init_line_freehand_drawing(int x, int y);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~
d_line.c:71:30: error: assignment to void (*)(void) from incompatible pointer type void (*)(int,  int) [-Wincompatible-pointer-types]
   71 |         canvas_rightbut_proc = create_lineobject;
      |                              ^
In file included from d_line.c:19:
d_line.h:25:17: note: create_lineobject declared here
   25 | extern void     create_lineobject(int x, int y);
      |                 ^~~~~~~~~~~~~~~~~
d_line.c: In function init_trace_drawing:
d_line.c:124:25: error: assignment to void (*)(void) from incompatible pointer type void (*)(int,  int,  int) [-Wincompatible-pointer-types]
  124 |     canvas_leftbut_proc = get_intermediatepoint;
      |                         ^
d_line.h:26:17: note: get_intermediatepoint declared here
   26 | extern void     get_intermediatepoint(int x, int y, int shift);
      |                 ^~~~~~~~~~~~~~~~~~~~~
d_line.c:126:29: error: assignment to void (*)(void) from incompatible pointer type void (*)(int,  int) [-Wincompatible-pointer-types]
  126 |         canvas_locmove_proc = freehand_get_intermediatepoint;
      |                             ^
d_line.h:27:17: note: freehand_get_intermediatepoint declared here
   27 | extern void     freehand_get_intermediatepoint(int x, int y);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
d_line.c:130:33: error: assignment to void (*)(void) from incompatible pointer type void (*)(int,  int) [-Wincompatible-pointer-types]
  130 |             canvas_leftbut_proc = create_lineobject;
      |                                 ^
d_line.h:25:17: note: create_lineobject declared here
   25 | extern void     create_lineobject(int x, int y);
      |                 ^~~~~~~~~~~~~~~~~
d_line.c:132:33: error: assignment to void (*)(void) from incompatible pointer type void (*)(int,  int) [-Wincompatible-pointer-types]
  132 |             canvas_locmove_proc = latex_line;
      |                                 ^
In file included from d_line.c:30:
u_elastic.h:78:17: note: latex_line declared here
   78 | extern void     latex_line(int x, int y);
      |                 ^~~~~~~~~~
d_line.c:134:33: error: assignment to void (*)(void) from incompatible pointer type void (*)(int,  int) [-Wincompatible-pointer-types]
  134 |             canvas_locmove_proc = constrainedangle_line;
      |                                 ^
u_elastic.h:79:17: note: constrainedangle_line declared here
   79 | extern void     constrainedangle_line(int x, int y);
      |                 ^~~~~~~~~~~~~~~~~~~~~
d_line.c:136:33: error: assignment to void (*)(void) from incompatible pointer type void (*)(int,  int) [-Wincompatible-pointer-types]
  136 |             canvas_locmove_proc = unconstrained_line;
      |                                 ^
u_elastic.h:77:17: note: unconstrained_line declared here
   77 | extern void     unconstrained_line(int x, int y);
      |                 ^~~~~~~~~~~~~~~~~~
d_line.c:139:27: error: assignment to void (*)(void) from incompatible pointer type void (*)(int,  int) [-Wincompatible-pointer-types]
  139 |     canvas_middlebut_save = create_lineobject;
      |                           ^
d_line.h:25:17: note: create_lineobject declared here
   25 | extern void     create_lineobject(int x, int y);
      |                 ^~~~~~~~~~~~~~~~~
d_line.c: In function get_intermediatepoint:
d_line.c:186:10: error: too many arguments to function canvas_locmove_proc; expected 0, have 2
  186 |         (*canvas_locmove_proc) (x, y);
      |         ~^~~~~~~~~~~~~~~~~~~~~  ~
d_arc.c: In function arc_drawing_selected:
d_arc.c:79:25: error: assignment to void (*)(void) from incompatible pointer type void (*)(int,  int) [-Wincompatible-pointer-types]
   79 |     canvas_leftbut_proc = init_arc_drawing;
      |                         ^
d_arc.c:60:17: note: init_arc_drawing declared here
   60 | static void     init_arc_drawing(int x, int y);
      |                 ^~~~~~~~~~~~~~~~
d_arc.c:80:27: error: assignment to void (*)(void) from incompatible pointer type void (*)(int,  int) [-Wincompatible-pointer-types]
   80 |     canvas_middlebut_proc = init_arc_c_drawing;
      |                           ^
d_arc.c:62:17: note: init_arc_c_drawing declared here
   62 | static void     init_arc_c_drawing(int x, int y);
      |                 ^~~~~~~~~~~~~~~~~~
d_arc.c: In function init_arc_drawing:
d_arc.c:108:29: error: assignment to void (*)(void) from incompatible pointer type void (*)(int,  int) [-Wincompatible-pointer-types]
  108 |         canvas_locmove_proc = resizing_arc;
      |                             ^
d_arc.c:63:17: note: resizing_arc declared here
   63 | static void     resizing_arc(int x, int y);
      |                 ^~~~~~~~~~~~
d_arc.c:118:29: error: assignment to void (*)(void) from incompatible pointer type void (*)(int,  int) [-Wincompatible-pointer-types]
  118 |         canvas_locmove_proc = unconstrained_line;
      |                             ^
In file included from d_arc.c:36:
u_elastic.h:77:17: note: unconstrained_line declared here
   77 | extern void     unconstrained_line(int x, int y);
      |                 ^~~~~~~~~~~~~~~~~~
d_arc.c:121:25: error: assignment to void (*)(void) from incompatible pointer type void (*)(int,  int) [-Wincompatible-pointer-types]
  121 |     canvas_leftbut_proc = get_arcpoint;
      |                         ^
d_arc.c:59:17: note: get_arcpoint declared here
   59 | static void     get_arcpoint(int x, int y);
      |                 ^~~~~~~~~~~~
d_arc.c: In function init_arc_c_drawing:
d_arc.c:132:25: error: assignment to void (*)(void) from incompatible pointer type void (*)(int,  int) [-Wincompatible-pointer-types]
  132 |     canvas_locmove_proc = resizing_cbr;
      |                         ^
u_elastic.h:67:17: note: resizing_cbr declared here
   67 | extern void     resizing_cbr(int x, int y), elastic_cbr(void), resizing_cbd(int x, int y), elastic_cbd(void);
      |                 ^~~~~~~~~~~~
d_arc.c: In function get_arcpoint:
d_arc.c:189:29: error: assignment to void (*)(void) from incompatible pointer type void (*)(int,  int) [-Wincompatible-pointer-types]
  189 |         canvas_leftbut_proc = create_arcobject;
      |                             ^
d_arc.c:58:17: note: create_arcobject declared here
   58 | static void     create_arcobject(int lx, int ly);
      |                 ^~~~~~~~~~~~~~~~
d_ellipse.c: In function circle_ellipse_byradius_drawing_selected:
d_ellipse.c:59:25: error: assignment to void (*)(void) from incompatible pointer type void (*)(int,  int) [-Wincompatible-pointer-types]
   59 |     canvas_leftbut_proc = init_circlebyradius_drawing;
      |                         ^
d_ellipse.c:41:17: note: init_circlebyradius_drawing declared here
   41 | static void     init_circlebyradius_drawing(int x, int y);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
d_ellipse.c:60:27: error: assignment to void (*)(void) from incompatible pointer type void (*)(int,  int) [-Wincompatible-pointer-types]
   60 |     canvas_middlebut_proc = init_ellipsebyradius_drawing;
      |                           ^
d_ellipse.c:39:17: note: init_ellipsebyradius_drawing declared here
   39 | static void     init_ellipsebyradius_drawing(int x, int y);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
d_regpoly.c: In function regpoly_drawing_selected:
d_regpoly.c:52:25: error: assignment to void (*)(void) from incompatible pointer type void (*)(int,  int) [-Wincompatible-pointer-types]
   52 |     canvas_leftbut_proc = init_regpoly_drawing;
      |                         ^
d_regpoly.c:40:17: note: init_regpoly_drawing declared here
   40 | static void     init_regpoly_drawing(int x, int y);
      |                 ^~~~~~~~~~~~~~~~~~~~
d_ellipse.c: In function init_ellipsebyradius_drawing:
d_ellipse.c:77:25: error: assignment to void (*)(void) from incompatible pointer type void (*)(int,  int) [-Wincompatible-pointer-types]
   77 |     canvas_locmove_proc = resizing_ebr;
      |                         ^
In file included from d_ellipse.c:28:
u_elastic.h:68:17: note: resizing_ebr declared here
   68 | extern void     resizing_ebr(int x, int y), elastic_ebr(void), resizing_ebd(int x, int y), elastic_ebd(void);
      |                 ^~~~~~~~~~~~
d_regpoly.c: In function init_regpoly_drawing:
d_ellipse.c:78:25: error: assignment to void (*)(void) from incompatible pointer type void (*)(int,  int) [-Wincompatible-pointer-types]
   78 |     canvas_leftbut_proc = create_ellipsebyrad;
      |                         ^
d_regpoly.c:67:25: error: assignment to void (*)(void) from incompatible pointer type void (*)(int,  int) [-Wincompatible-pointer-types]
   67 |     canvas_locmove_proc = resizing_poly;
      |                         ^
d_ellipse.c:44:17: note: create_ellipsebyrad declared here
   44 | static void     create_ellipsebyrad(int x, int y);
      |                 ^~~~~~~~~~~~~~~~~~~
In file included from d_regpoly.c:28:
u_elastic.h:62:17: note: resizing_poly declared here
   62 | extern void     resizing_poly(int x, int y);
      |                 ^~~~~~~~~~~~~
d_ellipse.c:79:27: error: assignment to void (*)(void) from incompatible pointer type void (*)(int,  int) [-Wincompatible-pointer-types]
   79 |     canvas_middlebut_proc = create_ellipsebyrad;
      |                           ^
d_regpoly.c:68:25: error: assignment to void (*)(void) from incompatible pointer type void (*)(int,  int) [-Wincompatible-pointer-types]
   68 |     canvas_leftbut_proc = create_regpoly;
      |                         ^
d_ellipse.c:44:17: note: create_ellipsebyrad declared here
   44 | static void     create_ellipsebyrad(int x, int y);
      |                 ^~~~~~~~~~~~~~~~~~~
d_regpoly.c:41:17: note: create_regpoly declared here
   41 | static void     create_regpoly(int x, int y);
      |                 ^~~~~~~~~~~~~~
d_ellipse.c: In function circle_ellipse_bydiameter_drawing_selected:
d_ellipse.c:138:25: error: assignment to void (*)(void) from incompatible pointer type void (*)(int,  int) [-Wincompatible-pointer-types]
  138 |     canvas_leftbut_proc = init_circlebydiameter_drawing;
      |                         ^
d_ellipse.c:42:17: note: init_circlebydiameter_drawing declared here
   42 | static void     init_circlebydiameter_drawing(int x, int y);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
d_ellipse.c:139:27: error: assignment to void (*)(void) from incompatible pointer type void (*)(int,  int) [-Wincompatible-pointer-types]
  139 |     canvas_middlebut_proc = init_ellipsebydiameter_drawing;
      |                           ^
d_ellipse.c:40:17: note: init_ellipsebydiameter_drawing declared here
   40 | static void     init_ellipsebydiameter_drawing(int x, int y);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
d_ellipse.c: In function init_ellipsebydiameter_drawing:
d_ellipse.c:155:25: error: assignment to void (*)(void) from incompatible pointer type void (*)(int,  int) [-Wincompatible-pointer-types]
  155 |     canvas_locmove_proc = resizing_ebd;
      |                         ^
u_elastic.h:68:64: note: resizing_ebd declared here
   68 | extern void     resizing_ebr(int x, int y), elastic_ebr(void), resizing_ebd(int x, int y), elastic_ebd(void);
      |                                                                ^~~~~~~~~~~~
d_ellipse.c:156:25: error: assignment to void (*)(void) from incompatible pointer type void (*)(int,  int) [-Wincompatible-pointer-types]
  156 |     canvas_leftbut_proc = create_ellipsebydia;
      |                         ^
d_ellipse.c:43:17: note: create_ellipsebydia declared here
   43 | static void     create_ellipsebydia(int x, int y);
      |                 ^~~~~~~~~~~~~~~~~~~
d_ellipse.c:157:27: error: assignment to void (*)(void) from incompatible pointer type void (*)(int,  int) [-Wincompatible-pointer-types]
  157 |     canvas_middlebut_proc = create_ellipsebydia;
      |                           ^
d_ellipse.c:43:17: note: create_ellipsebydia declared here
   43 | static void     create_ellipsebydia(int x, int y);
      |                 ^~~~~~~~~~~~~~~~~~~
d_ellipse.c: In function init_circlebyradius_drawing:
d_ellipse.c:222:25: error: assignment to void (*)(void) from incompatible pointer type void (*)(int,  int) [-Wincompatible-pointer-types]
  222 |     canvas_locmove_proc = resizing_cbr;
      |                         ^
u_elastic.h:67:17: note: resizing_cbr declared here
   67 | extern void     resizing_cbr(int x, int y), elastic_cbr(void), resizing_cbd(int x, int y), elastic_cbd(void);
      |                 ^~~~~~~~~~~~
d_ellipse.c:223:25: error: assignment to void (*)(void) from incompatible pointer type void (*)(int,  int) [-Wincompatible-pointer-types]
  223 |     canvas_leftbut_proc = create_circlebyrad;
      |                         ^
d_ellipse.c:45:17: note: create_circlebyrad declared here
   45 | static void     create_circlebyrad(int x, int y);
      |                 ^~~~~~~~~~~~~~~~~~
make[4]: *** [Makefile:884: d_line.o] Error 1
d_ellipse.c: In function init_circlebydiameter_drawing:
d_ellipse.c:289:25: error: assignment to void (*)(void) from incompatible pointer type void (*)(int,  int) [-Wincompatible-pointer-types]
  289 |     canvas_locmove_proc = resizing_cbd;
      |                         ^
u_elastic.h:67:64: note: resizing_cbd declared here
   67 | extern void     resizing_cbr(int x, int y), elastic_cbr(void), resizing_cbd(int x, int y), elastic_cbd(void);
      |                                                                ^~~~~~~~~~~~
d_ellipse.c:290:25: error: assignment to void (*)(void) from incompatible pointer type void (*)(int,  int) [-Wincompatible-pointer-types]
  290 |     canvas_leftbut_proc = create_circlebydia;
      |                         ^
d_ellipse.c:46:17: note: create_circlebydia declared here
   46 | static void     create_circlebydia(int x, int y);
      |                 ^~~~~~~~~~~~~~~~~~

Related

Tickets: #202

Discussion

  • Roland Rosenfeld

    I just noticed, that Mario Haustein already fixed the prototypes in GIT.
    But when I try to build the GIT version with GCC-15, I still run into the following error:

    main.c:123:17: error: expected identifier or '(' before 'true'
      123 | static Boolean  true = True;
          |                 ^~~~
    main.c:124:17: error: expected identifier or '(' before 'false'
      124 | static Boolean  false = False;
          |                 ^~~~~
    main.c:198:66: error: lvalue required as unary '&' operand
      198 |       XtOffset(appresPtr, allownegcoords), XtRBoolean, (caddr_t) & true},
          |                                                                  ^
    main.c:200:65: error: lvalue required as unary '&' operand
      200 |       XtOffset(appresPtr, showaxislines), XtRBoolean, (caddr_t) & true},
          |                                                                 ^
    main.c:202:62: error: lvalue required as unary '&' operand
      202 |       XtOffset(appresPtr, smallicons), XtRBoolean, (caddr_t) & false},
          |                                                              ^
    main.c:210:66: error: lvalue required as unary '&' operand
      210 |       XtOffset(appresPtr, showallbuttons), XtRBoolean, (caddr_t) & false},
          |                                                                  ^
    main.c:212:61: error: lvalue required as unary '&' operand
      212 |       XtOffset(appresPtr, RHS_PANEL), XtRBoolean, (caddr_t) & false},
          |                                                             ^
    main.c:214:61: error: lvalue required as unary '&' operand
      214 |       XtOffset(appresPtr, landscape), XtRBoolean, (caddr_t) & true},
          |                                                             ^
    main.c:220:60: error: lvalue required as unary '&' operand
      220 |       XtOffset(appresPtr, tracking), XtRBoolean, (caddr_t) & true},
          |                                                            ^
    main.c:222:58: error: lvalue required as unary '&' operand
      222 |       XtOffset(appresPtr, INCHES), XtRBoolean, (caddr_t) & true},
          |                                                          ^
    main.c:260:62: error: lvalue required as unary '&' operand
      260 |       XtOffset(appresPtr, latexfonts), XtRBoolean, (caddr_t) & false},
          |                                                              ^
    main.c:262:62: error: lvalue required as unary '&' operand
      262 |       XtOffset(appresPtr, hiddentext), XtRBoolean, (caddr_t) & false},
          |                                                              ^
    main.c:264:61: error: lvalue required as unary '&' operand
      264 |       XtOffset(appresPtr, rigidtext), XtRBoolean, (caddr_t) & false},
          |                                                             ^
    main.c:266:63: error: lvalue required as unary '&' operand
      266 |       XtOffset(appresPtr, specialtext), XtRBoolean, (caddr_t) & false},
          |                                                               ^
    main.c:268:62: error: lvalue required as unary '&' operand
      268 |       XtOffset(appresPtr, monochrome), XtRBoolean, (caddr_t) & false},
          |                                                              ^
    main.c:270:62: error: lvalue required as unary '&' operand
      270 |       XtOffset(appresPtr, latexfonts), XtRBoolean, (caddr_t) & false},
          |                                                              ^
    main.c:276:61: error: lvalue required as unary '&' operand
      276 |       XtOffset(appresPtr, flushleft), XtRBoolean, (caddr_t) & false},
          |                                                             ^
    main.c:286:66: error: lvalue required as unary '&' operand
      286 |       XtOffset(appresPtr, installowncmap), XtRBoolean, (caddr_t) & false},
          |                                                                  ^
    main.c:288:66: error: lvalue required as unary '&' operand
      288 |       XtOffset(appresPtr, dontswitchcmap), XtRBoolean, (caddr_t) & false},
          |                                                                  ^
    main.c:290:58: error: lvalue required as unary '&' operand
      290 |       XtOffset(appresPtr, tablet), XtRBoolean, (caddr_t) & false},
          |                                                          ^
    main.c:300:60: error: lvalue required as unary '&' operand
      300 |       XtOffset(appresPtr, multiple), XtRBoolean, (caddr_t) & false},
          |                                                            ^
    main.c:302:59: error: lvalue required as unary '&' operand
      302 |       XtOffset(appresPtr, overlap), XtRBoolean, (caddr_t) & false},
          |                                                           ^
    main.c:304:64: error: lvalue required as unary '&' operand
      304 |       XtOffset(appresPtr, showballoons), XtRBoolean, (caddr_t) & true},
          |                                                                ^
    main.c:316:57: error: lvalue required as unary '&' operand
      316 |       XtOffset(appresPtr, DEBUG), XtRBoolean, (caddr_t) & false},
          |                                                         ^
    main.c:318:63: error: lvalue required as unary '&' operand
      318 |       XtOffset(appresPtr, showlengths), XtRBoolean, (caddr_t) & false},
          |                                                               ^
    main.c:320:60: error: lvalue required as unary '&' operand
      320 |       XtOffset(appresPtr, shownums), XtRBoolean, (caddr_t) & false},
          |                                                            ^
    main.c:322:67: error: lvalue required as unary '&' operand
      322 |       XtOffset(appresPtr, show_pageborder), XtRBoolean, (caddr_t) & true},
          |                                                                   ^
    main.c:336:68: error: lvalue required as unary '&' operand
      336 |       XtOffset(appresPtr, showdepthmanager), XtRBoolean, (caddr_t) & true},
          |                                                                    ^
    main.c:338:67: error: lvalue required as unary '&' operand
      338 |       XtOffset(appresPtr, flipvisualhints), XtRBoolean, (caddr_t) & false},
          |                                                                   ^
    main.c:342:61: error: lvalue required as unary '&' operand
      342 |       XtOffset(appresPtr, icon_view), XtRBoolean, (caddr_t) & true},
          |                                                             ^
    main.c:346:58: error: lvalue required as unary '&' operand
      346 |       XtOffset(appresPtr, splash), XtRBoolean, (caddr_t) & true},
          |                                                          ^
    main.c:354:69: error: lvalue required as unary '&' operand
      354 |       XtOffset(appresPtr, correct_font_size), XtRBoolean, (caddr_t) & true},
          |                                                                     ^
    main.c:356:61: error: lvalue required as unary '&' operand
      356 |       XtOffset(appresPtr, crosshair), XtRBoolean, (caddr_t) & false},
          |                                                             ^
    main.c:358:63: error: lvalue required as unary '&' operand
      358 |       XtOffset(appresPtr, autorefresh), XtRBoolean, (caddr_t) & false},
          |                                                               ^
    main.c:360:61: error: lvalue required as unary '&' operand
      360 |       XtOffset(appresPtr, write_bak), XtRBoolean, (caddr_t) & true},
          |                                                             ^
    main.c:362:66: error: lvalue required as unary '&' operand
      362 |        XtOffset(appresPtr, international), XtRBoolean, (caddr_t) & true},
          |                                                                  ^
    
     
  • Roland Rosenfeld

    The attached patch should fix the above mentioned problem with true/false variable names.
    Using this with in combination with current GIT tree allows to compile xfig with GCC 15.

     
  • tkl

    tkl - 2025-03-02

    Above patch is applied with commit [d9f210]. However, if I compile with gcc -std=c23, compilation still fails with errors, e.g., error: unknown type name 'caddr_t'. Hence, I will keep this ticket open and see, whether all issues regarding c23 can be resolved.

     

    Related

    Commit: [d9f210]


Log in to post a comment.

MongoDB Logo MongoDB