warning: Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE"

20 views
Skip to first unread message

Nenad

unread,
Jun 19, 2026, 3:41:03 AM (7 days ago) Jun 19
to scite-interest
How to solve this warning appears in
../scintilla/gtk/ScintillaGTKAccessible.cxx

/usr/include/glib-2.0/glib/gmacros.h:1337:33: warning: Deprecated pre-processor symbol: replace
with "G_ADD_PRIVATE"

-I/usr/include/sysprof-6 -pthread -fPIC -Wpedantic -Wall  -w -c scintilla-marshal.c
In file included from /usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h:9,
                 from /usr/include/glib-2.0/glib/gtypes.h:34,
                 from /usr/include/glib-2.0/glib/galloca.h:34,
                 from /usr/include/glib-2.0/glib.h:32,
                 from ScintillaGTKAccessible.cxx:70:
/usr/include/glib-2.0/glib/gmacros.h:1337:33: warning: Deprecated pre-processor symbol: replace
with "G_ADD_PRIVATE"
 1337 | #define _GLIB_GNUC_DO_PRAGMA(x) _Pragma(G_STRINGIFY (x))
      |                                 ^~~~~~~
/usr/include/glib-2.0/glib/gmacros.h:1340:3: note: in expansion of macro
‘_GLIB_GNUC_DO_PRAGMA’
 1340 |   _GLIB_GNUC_DO_PRAGMA(GCC warning G_STRINGIFY (Deprecated pre-processor symbol:
replace with #f))
      |   ^~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/gobject/gobject-visibility.h:584:49: note: in expansion of macro
‘GLIB_DEPRECATED_MACRO_FOR’
  584 | #define GOBJECT_DEPRECATED_MACRO_IN_2_58_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f)
      |                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/gobject/gtype.h:688:145: note: in expansion of macro
‘GOBJECT_DEPRECATED_MACRO_IN_2_58_FOR’
  688 | #define G_TYPE_INSTANCE_GET_PRIVATE(instance, g_type, c_type)   ((c_type*)
g_type_instance_get_private ((GTypeInstance*) (instance), (g_type)))
GOBJECT_DEPRECATED_MACRO_IN_2_58_FOR(G_ADD_PRIVATE)
     
|                                                                                                
                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ScintillaGTKAccessible.cxx:154:2: note: in expansion of macro
‘G_TYPE_INSTANCE_GET_PRIVATE’
  154 | (G_TYPE_INSTANCE_GET_PRIVATE((inst), SCINTILLA_TYPE_OBJECT_ACCESSIBLE,
ScintillaObjectAccessiblePrivate))
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
ScintillaGTKAccessible.cxx:177:16: note: in expansion of macro
‘SCINTILLA_OBJECT_ACCESSIBLE_GET_PRIVATE’
  177 |         return SCINTILLA_OBJECT_ACCESSIBLE_GET_PRIVATE(accessible)->pscin;
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gmacros.h:1337:33: warning: Deprecated pre-processor symbol: replace
with "G_ADD_PRIVATE"
 1337 | #define _GLIB_GNUC_DO_PRAGMA(x) _Pragma(G_STRINGIFY (x))
      |                                 ^~~~~~~
/usr/include/glib-2.0/glib/gmacros.h:1340:3: note: in expansion of macro
‘_GLIB_GNUC_DO_PRAGMA’
 1340 |   _GLIB_GNUC_DO_PRAGMA(GCC warning G_STRINGIFY (Deprecated pre-processor symbol:
replace with #f))
      |   ^~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/gobject/gobject-visibility.h:584:49: note: in expansion of macro
‘GLIB_DEPRECATED_MACRO_FOR’
  584 | #define GOBJECT_DEPRECATED_MACRO_IN_2_58_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f)
      |                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/gobject/gtype.h:688:145: note: in expansion of macro
‘GOBJECT_DEPRECATED_MACRO_IN_2_58_FOR’
  688 | #define G_TYPE_INSTANCE_GET_PRIVATE(instance, g_type, c_type)   ((c_type*)
g_type_instance_get_private ((GTypeInstance*) (instance), (g_type)))
GOBJECT_DEPRECATED_MACRO_IN_2_58_FOR(G_ADD_PRIVATE)
     
|                                                                                                
                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ScintillaGTKAccessible.cxx:154:2: note: in expansion of macro
‘G_TYPE_INSTANCE_GET_PRIVATE’
  154 | (G_TYPE_INSTANCE_GET_PRIVATE((inst), SCINTILLA_TYPE_OBJECT_ACCESSIBLE,
ScintillaObjectAccessiblePrivate))
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
ScintillaGTKAccessible.cxx:1191:50: note: in expansion of macro
‘SCINTILLA_OBJECT_ACCESSIBLE_GET_PRIVATE’
 1191 |         ScintillaObjectAccessiblePrivate *priv =
SCINTILLA_OBJECT_ACCESSIBLE_GET_PRIVATE(accessible);
      |                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gmacros.h:1337:33: warning: Deprecated pre-processor symbol: replace
with "G_ADD_PRIVATE"
 1337 | #define _GLIB_GNUC_DO_PRAGMA(x) _Pragma(G_STRINGIFY (x))
      |                                 ^~~~~~~
/usr/include/glib-2.0/glib/gmacros.h:1340:3: note: in expansion of macro
‘_GLIB_GNUC_DO_PRAGMA’
 1340 |   _GLIB_GNUC_DO_PRAGMA(GCC warning G_STRINGIFY (Deprecated pre-processor symbol:
replace with #f))
      |   ^~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/gobject/gobject-visibility.h:584:49: note: in expansion of macro
‘GLIB_DEPRECATED_MACRO_FOR’
  584 | #define GOBJECT_DEPRECATED_MACRO_IN_2_58_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f)
      |                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/gobject/gtype.h:688:145: note: in expansion of macro
‘GOBJECT_DEPRECATED_MACRO_IN_2_58_FOR’
  688 | #define G_TYPE_INSTANCE_GET_PRIVATE(instance, g_type, c_type)   ((c_type*)
g_type_instance_get_private ((GTypeInstance*) (instance), (g_type)))
GOBJECT_DEPRECATED_MACRO_IN_2_58_FOR(G_ADD_PRIVATE)
     
|                                                                                                
                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ScintillaGTKAccessible.cxx:154:2: note: in expansion of macro
‘G_TYPE_INSTANCE_GET_PRIVATE’
  154 | (G_TYPE_INSTANCE_GET_PRIVATE((inst), SCINTILLA_TYPE_OBJECT_ACCESSIBLE,
ScintillaObjectAccessiblePrivate))
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
ScintillaGTKAccessible.cxx:1203:50: note: in expansion of macro
‘SCINTILLA_OBJECT_ACCESSIBLE_GET_PRIVATE’
 1203 |         ScintillaObjectAccessiblePrivate *priv =
SCINTILLA_OBJECT_ACCESSIBLE_GET_PRIVATE(accessible);
      |                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gmacros.h:1337:33: warning: Deprecated pre-processor symbol: replace
with "G_ADD_PRIVATE"
 1337 | #define _GLIB_GNUC_DO_PRAGMA(x) _Pragma(G_STRINGIFY (x))
      |                                 ^~~~~~~
/usr/include/glib-2.0/glib/gmacros.h:1340:3: note: in expansion of macro
‘_GLIB_GNUC_DO_PRAGMA’
 1340 |   _GLIB_GNUC_DO_PRAGMA(GCC warning G_STRINGIFY (Deprecated pre-processor symbol:
replace with #f))
      |   ^~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/gobject/gobject-visibility.h:584:49: note: in expansion of macro
‘GLIB_DEPRECATED_MACRO_FOR’
  584 | #define GOBJECT_DEPRECATED_MACRO_IN_2_58_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f)
      |                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/gobject/gtype.h:688:145: note: in expansion of macro
‘GOBJECT_DEPRECATED_MACRO_IN_2_58_FOR’
  688 | #define G_TYPE_INSTANCE_GET_PRIVATE(instance, g_type, c_type)   ((c_type*)
g_type_instance_get_private ((GTypeInstance*) (instance), (g_type)))
GOBJECT_DEPRECATED_MACRO_IN_2_58_FOR(G_ADD_PRIVATE)
     
|                                                                                                
                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ScintillaGTKAccessible.cxx:154:2: note: in expansion of macro
‘G_TYPE_INSTANCE_GET_PRIVATE’
  154 | (G_TYPE_INSTANCE_GET_PRIVATE((inst), SCINTILLA_TYPE_OBJECT_ACCESSIBLE,
ScintillaObjectAccessiblePrivate))
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
ScintillaGTKAccessible.cxx:1220:50: note: in expansion of macro
‘SCINTILLA_OBJECT_ACCESSIBLE_GET_PRIVATE’
 1220 |         ScintillaObjectAccessiblePrivate *priv =
SCINTILLA_OBJECT_ACCESSIBLE_GET_PRIVATE(object);
      |                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gmacros.h:1337:33: warning: Deprecated pre-processor symbol: replace
with "G_ADD_PRIVATE"
 1337 | #define _GLIB_GNUC_DO_PRAGMA(x) _Pragma(G_STRINGIFY (x))
      |                                 ^~~~~~~
/usr/include/glib-2.0/glib/gmacros.h:1340:3: note: in expansion of macro
‘_GLIB_GNUC_DO_PRAGMA’
 1340 |   _GLIB_GNUC_DO_PRAGMA(GCC warning G_STRINGIFY (Deprecated pre-processor symbol:
replace with #f))
      |   ^~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/gobject/gobject-visibility.h:584:49: note: in expansion of macro
‘GLIB_DEPRECATED_MACRO_FOR’
  584 | #define GOBJECT_DEPRECATED_MACRO_IN_2_58_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f)
      |                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/gobject/gtype.h:688:145: note: in expansion of macro
‘GOBJECT_DEPRECATED_MACRO_IN_2_58_FOR’
  688 | #define G_TYPE_INSTANCE_GET_PRIVATE(instance, g_type, c_type)   ((c_type*)
g_type_instance_get_private ((GTypeInstance*) (instance), (g_type)))
GOBJECT_DEPRECATED_MACRO_IN_2_58_FOR(G_ADD_PRIVATE)
     
|                                                                                                
                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ScintillaGTKAccessible.cxx:154:2: note: in expansion of macro
‘G_TYPE_INSTANCE_GET_PRIVATE’
  154 | (G_TYPE_INSTANCE_GET_PRIVATE((inst), SCINTILLA_TYPE_OBJECT_ACCESSIBLE,
ScintillaObjectAccessiblePrivate))
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
ScintillaGTKAccessible.cxx:1251:50: note: in expansion of macro
‘SCINTILLA_OBJECT_ACCESSIBLE_GET_PRIVATE’
 1251 |         ScintillaObjectAccessiblePrivate *priv =
SCINTILLA_OBJECT_ACCESSIBLE_GET_PRIVATE(accessible);
      |                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ar rc ../bin/scintilla.a AutoComplete.o CallTip.o CaseConvert.o CaseFolder.o CellBuffer.o

scintillaDotOrg

unread,
Jun 19, 2026, 6:42:39 PM (6 days ago) Jun 19
to scite-interest
Nenad:

How to solve this warning appears in
../scintilla/gtk/ScintillaGTKAccessible.cxx

/usr/include/glib-2.0/glib/gmacros.h:1337:33: warning: Deprecated pre-processor symbol: replace
with "G_ADD_PRIVATE"

These are just deprecations so can be turned off by defining GLIB_DISABLE_DEPRECATION_WARNINGS.

Something like:
export CPPFLAGS="-D GLIB_DISABLE_DEPRECATION_WARNINGS"
make

You could also look through the code and work out how to use the newer glib APIs but that looks complicated.

Neil
Reply all
Reply to author
Forward
0 new messages