https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114529

--- Comment #4 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Created attachment 58307
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58307&action=edit
Work in progress patch

This is only partially complete and it is being saved here to show the
direction of the fix.  The patch changes the bootstrap tool mc to track the
opaque types and treat an imported opaque type as (void *) and an opaque type
declared in an implementation module as typedef struct foo *bar etc.

Any exported procedure/variable/array/proctype using an opaque will use the
(void *) version and any local procedure/variable/array/proctype in the
implementation module uses the full struct * opaque declaration.   The patch
tracks opaque usage and casts appropriately.

The new .h files look correct and the .cc (or .c) files track variable,
parameter, proctype opaque usage - casting when necessary.

Record fields remain to be tracked.

Reply via email to