mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-28 16:36:14 +01:00
b8ac6e146a
Note that it's not reported with gcc. It's only reported with g++. C++ code to reproduce this warning: #include <glib-object.h> G_BEGIN_DECLS #define GARROW_TYPE_FILE (garrow_file_get_type()) G_DECLARE_INTERFACE(GArrowFile, garrow_file, GARROW, FILE, GObject) struct _GArrowFileInterface { GTypeInterface g_iface; }; G_DEFINE_INTERFACE(GArrowFile, garrow_file, G_TYPE_OBJECT) static void garrow_file_default_init(GArrowFileInterface *iface) { } G_END_DECLS Build command line: % g++ -Wall -shared -o liba.so a.cpp $(pkg-config --cflags --libs gobject-2.0) Message: In file included from /tmp/local.glib/include/glib-2.0/gobject/gobject.h:24, from /tmp/local.glib/include/glib-2.0/gobject/gbinding.h:29, from /tmp/local.glib/include/glib-2.0/glib-object.h:23, from a.cpp:1: a.cpp: In function 'GType garrow_file_get_type()': /tmp/local.glib/include/glib-2.0/gobject/gtype.h:219:50: warning: '<<' in boolean context, did you mean '<' ? [-Wint-in-bool-context] #define G_TYPE_MAKE_FUNDAMENTAL(x) ((GType) ((x) << G_TYPE_FUNDAMENTAL_SHIFT)) ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /tmp/local.glib/include/glib-2.0/gobject/gtype.h:2026:11: note: in definition of macro '_G_DEFINE_INTERFACE_EXTENDED_BEGIN' if (TYPE_PREREQ) \ ^~~~~~~~~~~ /tmp/local.glib/include/glib-2.0/gobject/gtype.h:1758:47: note: in expansion of macro 'G_DEFINE_INTERFACE_WITH_CODE' #define G_DEFINE_INTERFACE(TN, t_n, T_P) G_DEFINE_INTERFACE_WITH_CODE(TN, t_n, T_P, ;) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cpp:16:1: note: in expansion of macro 'G_DEFINE_INTERFACE' G_DEFINE_INTERFACE(GArrowFile, ^~~~~~~~~~~~~~~~~~ /tmp/local.glib/include/glib-2.0/gobject/gtype.h:178:25: note: in expansion of macro 'G_TYPE_MAKE_FUNDAMENTAL' #define G_TYPE_OBJECT G_TYPE_MAKE_FUNDAMENTAL (20) ^~~~~~~~~~~~~~~~~~~~~~~ a.cpp:18:20: note: in expansion of macro 'G_TYPE_OBJECT' G_TYPE_OBJECT) ^~~~~~~~~~~~~ |
||
---|---|---|
.. | ||
tests | ||
.gitignore | ||
gatomicarray.c | ||
gatomicarray.h | ||
gbinding.c | ||
gbinding.h | ||
gboxed.c | ||
gboxed.h | ||
gclosure.c | ||
gclosure.h | ||
genums.c | ||
genums.h | ||
glib-genmarshal.in | ||
glib-mkenums.in | ||
glib-types.h | ||
gmarshal.c | ||
gmarshal.h | ||
gobject_gdb.py | ||
gobject_probes.d | ||
gobject_trace.h | ||
gobject-autocleanups.h | ||
gobject-query.c | ||
gobject.c | ||
gobject.h | ||
gobject.rc.in | ||
gobject.stp.in | ||
gobjectnotifyqueue.c | ||
gparam.c | ||
gparam.h | ||
gparamspecs.c | ||
gparamspecs.h | ||
gsignal.c | ||
gsignal.h | ||
gsourceclosure.c | ||
gsourceclosure.h | ||
gtype-private.h | ||
gtype.c | ||
gtype.h | ||
gtypemodule.c | ||
gtypemodule.h | ||
gtypeplugin.c | ||
gtypeplugin.h | ||
gvalue.c | ||
gvalue.h | ||
gvaluearray.c | ||
gvaluearray.h | ||
gvaluecollector.h | ||
gvaluetransform.c | ||
gvaluetypes.c | ||
gvaluetypes.h | ||
libgobject-gdb.py.in | ||
Makefile.am | ||
meson.build |