While working on [reproducible builds](https://reproducible-builds.org/) for [openSUSE](https://en.opensuse.org/openSUSE:Reproducible_Builds), I found that our `glfw` package varies in every build since the upgrade to geany-2.0
I extracted this minimal reproducer:
```bash cat > test2.c <<EOF typedef struct { struct { } __value32; } __atomic_wide_counter; EOF for i in 1 2 ; do geany -g glfw.c.tags test2.c ; md5sum glfw.c.tags ; done | sort -u | wc -l 2 ```
The output differs thusly: ```diff -__value32�64�__atomic_wide_counter�0�__anonceed23430108::anon_struct_1 +__value32�64�__atomic_wide_counter�0�__anone35807a60108::anon_struct_1 ```
I think, there is the same problem with anon unions.
Please make output deterministic.
This generated name is created by the ctags CXX parser [here](https://github.com/geany/geany/blob/512e88df8d97284c191459450bce4dd7877b9c2b...).
The value of `parser -> anonymousIdentiferId` is incremented a few lines above, so I suspect its intended to count anon structs and give them incrementing names, but probably it isn't being properly initialised to zero at startup. @techee?
This generated name is created by the ctags CXX parser [here](https://github.com/geany/geany/blob/512e88df8d97284c191459450bce4dd7877b9c2b...).
And then we rename these in this nice function:
https://github.com/geany/geany/blob/512e88df8d97284c191459450bce4dd7877b9c2b...
It seems nested anonymous tags aren't handled correctly - I'll have a look at it.
@bmwiedemann I believe I fixed it in #3785. Can you confirm it fixes all the problems with glfw sources?
Closed #3717 as completed via #3785.
github-comments@lists.geany.org