Re: allow benign typedef redefinitions (C11)
Peter Eisentraut <peter@eisentraut.org>
On 19.09.25 12:52, Álvaro Herrera wrote: > Here's a few more forward struct declarations turned into typedefs, for > cleanliness sake. Two comments; the rest looks okay to me. * src/include/access/heapam.h You are removing the declaration of struct TupleTableSlot and then go on to use just TupleTableSlot; apparently that works, but that creates an implicit dependency on typedef TupleTableSlot from somewhere else. It might be better to change the existing struct TupleTableSlot declaration into a typedef and keep it. * src/include/nodes/execnodes.h In this file, you are changing several times struct ScanKeyData to just ScanKeyData, but there is no typedef of ScanKeyData in this file. The struct ScanKeyData can exist by itself (it becomes declared as soon as you use it), but the typedef needs to come from somewhere. So this change introduces a new dependency between this header and some other header that provides that typedef. I suggest you fix that by adding a typedef in this file.
Commits
-
Move instrumentation-related structs to instrument_node.h
- 2defd0006255 19 (unreleased) landed
-
Don't include access/htup_details.h in executor/tuptable.h
- 1a8b5b11e48a 19 (unreleased) landed
-
Don't include execnodes.h in brin.h or gin.h
- 1b6f61bd8988 19 (unreleased) landed
-
Do a tiny bit of header file maintenance
- 3bf31dd24314 19 (unreleased) landed
-
Don't include execnodes.h in replication/conflict.h
- 7e638d7f5093 19 (unreleased) landed
- 47da1745244b 18.1 landed
-
Update some more forward declarations to use typedef
- 81fc3e28e383 19 (unreleased) landed
-
Change fmgr.h typedefs to use original names
- 4bd91912987d 19 (unreleased) landed
-
Improve ExplainState type handling in header files
- 70407d39b7ea 19 (unreleased) landed
-
Remove hbaPort type
- dc41d7415fc6 19 (unreleased) landed
-
Remove workarounds against repeat typedefs
- 1e3b5edb8eb2 19 (unreleased) landed
-
Update various forward declarations to use typedef
- d4d1fc527bdb 19 (unreleased) landed
-
Allow redeclaration of typedef yyscan_t
- ae0e1be9f2a2 19 (unreleased) landed
-
Improve pgbench definition of yyscan_t
- 675ddc4d704f 19 (unreleased) landed
-
Delay extraction of TIDBitmap per page offsets
- bfe56cdf9a4e 18.0 cited
-
Remove pgrminclude and associated scripts
- 5af699066f81 18.0 cited
-
Allow to use HeapTupleData embedded in [Buffer]HeapTupleTableSlot.
- 5408e233f066 12.0 cited