[Geany-Devel] Miscellaneous Ideas

Colomban Wendling lists.ban at xxxxx
Tue Nov 10 14:50:39 UTC 2015

On 10/11/2015 02:32, Lex Trotman wrote:
> On 10 November 2015 at 03:08, Devyn Collier Johnson
>> To improve the highlighting used by C source-code, could "bool" be added to
>> "primary=" in ./data/filetypes.c? "bool" existed since C99 (
>> http://pubs.opengroup.org/onlinepubs/9699919799/ &&
>> https://en.wikipedia.org/wiki/C_data_types#stdbool.h ). Also, what about
>> "true" and "false" (lowercase) as seen in the <stdbool.h>? Currently, in
>> Geany, "bool" looks like a variable (no highlighting) while other data-types
>> use highlighting. True, "bool" is not in the "core" C-language without
>> libraries, but it seems to me that "bool" should be added.
> It is defined by the tags made from parsing the system headers into
> C99.tags.  Perhaps its not defined as a type in stdbool.h?

`bool` is not really a type in C, it's a macro expanding to _Bool -- and
even, applications are explicitly allowed to undefine `bool`, `false`
and `true` at their convenience.

This said, we could probably indeed have `bool`, `false` and `true` in
filetypes.c's `primary=` list (especially as we do have `FALSE` and
`TRUE` which aren't even defined in standard C).  Technically those
aren't keywords [1], but I guess it'd be convenient to have them -- yet
one has to remember those are library extensions only available through


[1] see i.e. section 6.4.1§1 in the ISO/IEC 9899:201x n1570 draft

More information about the Devel mailing list