Skip to content

Conversation

@06393993
Copy link

... otherwise, the compilation of pkgconfig may fail with the following error when compiling glib:

  CC       libglib_2_0_la-goption.lo
goption.c:169:14: error: two or more data types in declaration specifiers
  169 |     gboolean bool;
      |              ^~~~

... otherwise, the compilation of pkgconfig may fail with the following
error when compiling glib:

  CC       libglib_2_0_la-goption.lo
goption.c:169:14: error: two or more data types in declaration specifiers
  169 |     gboolean bool;
      |              ^~~~
@cerisier
Copy link
Collaborator

cerisier commented Feb 3, 2026

Hey there, what is the impact of adding this flag when using newer compilers ? Do you mean that glib is still fully gnu90 ?

@06393993
Copy link
Author

06393993 commented Feb 4, 2026

Hey there, what is the impact of adding this flag when using newer compilers ?

I think this issue only happens with newer compilers, because bool becomes a keyword in C231, and is a macro defined in <stdbool.h> since C99 until C232, so it can't be used as a field name.

I will check with some new compilers I can use recently and update.

Do you mean that glib is still fully gnu90 ?

I don't know the exact C standard they use, but the glib 2.38.2 bundled with pkg-config is checked in 12 years ago3, so we do expect it uses a rather old C standard. Is that what you are asking? Or I can dig into several package manager to see how they compile and report, do you want me to do that?

Footnotes

  1. https://en.cppreference.com/w/c/keyword/bool.html

  2. https://en.cppreference.com/w/c/types.html

  3. https://gitlab.freedesktop.org/pkg-config/pkg-config/-/tree/master/glib?ref_type=heads

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants