diff options
author | Gaius Mulley <gaiusmod2@gmail.com> | 2024-08-30 14:22:01 +0100 |
---|---|---|
committer | Gaius Mulley <gaiusmod2@gmail.com> | 2024-08-30 14:22:01 +0100 |
commit | 87ce8172f0bf649a8a79ef7481fb3bf35882083f (patch) | |
tree | e45557510ac3ae16689a35524ec540f206a00875 /gcc/m2 | |
parent | d48273f06fee3886b05ce4d10b4db3d52f1991dc (diff) | |
download | gcc-87ce8172f0bf649a8a79ef7481fb3bf35882083f.zip gcc-87ce8172f0bf649a8a79ef7481fb3bf35882083f.tar.gz gcc-87ce8172f0bf649a8a79ef7481fb3bf35882083f.tar.bz2 |
PR modula2/116181: m2rts fix -Wodr warning
This patch fixes the -Wodr warning seen in pge-boot/m2rts.h
when building pge.
gcc/m2/ChangeLog:
PR modula2/116181
* pge-boot/GM2RTS.h: Regenerate.
* pge-boot/m2rts.h: Ditto.
Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
Diffstat (limited to 'gcc/m2')
-rw-r--r-- | gcc/m2/pge-boot/GM2RTS.h | 10 | ||||
-rw-r--r-- | gcc/m2/pge-boot/m2rts.h | 28 |
2 files changed, 7 insertions, 31 deletions
diff --git a/gcc/m2/pge-boot/GM2RTS.h b/gcc/m2/pge-boot/GM2RTS.h index 4186c8f..055cc95 100644 --- a/gcc/m2/pge-boot/GM2RTS.h +++ b/gcc/m2/pge-boot/GM2RTS.h @@ -54,11 +54,6 @@ typedef struct M2RTS_ArgCVEnvP_p M2RTS_ArgCVEnvP; typedef void (*M2RTS_ArgCVEnvP_t) (int, void *, void *); struct M2RTS_ArgCVEnvP_p { M2RTS_ArgCVEnvP_t proc; }; -#define M2RTS_RegisterModule_Cstr(MODNAME,LIBNAME,init,fini,dep) \ - M2RTS_RegisterModule (reinterpret_cast <void *> (const_cast <char *> (MODNAME)), \ - reinterpret_cast <void *> (const_cast <char *> (LIBNAME)), \ - init, fini, dep) - EXTERN void M2RTS_ConstructModules (void * applicationmodule, void * libname, void * overrideliborder, int argc, void * argv, void * envp); EXTERN void M2RTS_DeconstructModules (void * applicationmodule, void * libname, int argc, void * argv, void * envp); @@ -68,10 +63,7 @@ EXTERN void M2RTS_DeconstructModules (void * applicationmodule, void * libname, explored to determine initialization order. */ -EXTERN void M2RTS_RegisterModule (void *name, void *libname, - M2RTS_ArgCVEnvP init, - M2RTS_ArgCVEnvP fini, - PROC dependencies); +EXTERN void M2RTS_RegisterModule (void * name, void * libname, M2RTS_ArgCVEnvP init, M2RTS_ArgCVEnvP fini, PROC dependencies); /* RequestDependant - used to specify that modulename is dependant upon diff --git a/gcc/m2/pge-boot/m2rts.h b/gcc/m2/pge-boot/m2rts.h index d8bac68..df6cbcb 100644 --- a/gcc/m2/pge-boot/m2rts.h +++ b/gcc/m2/pge-boot/m2rts.h @@ -24,31 +24,15 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ -#ifdef M2_MC -/* These type definitions match those used by mc, they are defined differently - to satisfy -Wodr when building from the mc translated versions of m2 - source. */ #include "GM2RTS.h" -#else -/* These type definitions match those used by cc1gm2, they will be the same - sizeof as those above (and also for all their dependants). */ -typedef void (*M2RTS_ArgCVEnvP) (int, char **, char **); -typedef void (*PROC) (void); -#endif +#ifdef MC_M2 +/* mc sources do not register their init fini functions as they are + initialized by a static scaffold (called by main). */ +#define M2RTS_RegisterModule_Cstr(MODNAME,LIBNAME,init,fini,dep) +#else #define M2RTS_RegisterModule_Cstr(MODNAME,LIBNAME,init,fini,dep) \ M2RTS_RegisterModule (reinterpret_cast <void *> (const_cast <char *> (MODNAME)), \ reinterpret_cast <void *> (const_cast <char *> (LIBNAME)), \ init, fini, dep) - -extern "C" void M2RTS_RequestDependant (const void *modulename, const void *dependancy); -extern "C" void M2RTS_RegisterModule (void *modulename, void *libname, - M2RTS_ArgCVEnvP init, M2RTS_ArgCVEnvP fini, PROC dependencies); -extern "C" void _M2_M2RTS_init (void); - -extern "C" void M2RTS_ConstructModules (const void *, - int argc, char *argv[], char *envp[]); -extern "C" void M2RTS_Terminate (void); -extern "C" void M2RTS_DeconstructModules (void); - -extern "C" void M2RTS_Halt (const char *, const char *, const char *, int) __attribute__ ((noreturn)); +#endif |