Go to file
Gaius Mulley b8ef805e4d PR modula2/116181 remove ODR warnings from library interface files
This patch removes the warnings generated by -Wodr from the library
interface between modula-2 and C.

gcc/m2/ChangeLog:

	PR modula2/116181
	* Make-lang.in (MC_SRC_FLAGS): New macro.
	(m2/mc-boot/$(SRC_PREFIX)%.o): Use MC_SRC_FLAGS.
	(m2/mc-boot-ch/$(SRC_PREFIX)%.o): Ditto.
	(m2/gm2-libs-boot/M2RTS.o): Ditto.
	(m2/gm2-libs-boot/%.o): Ditto.
	(GM2-LIBS-BOOT-H): New macro.
	(m2/gm2-libs-boot/RTcodummy.o): Use MC_SRC_FLAGS.
	Remove gm2-libs-host.h from the dependancy.
	(m2/gm2-libs-boot/wrapc.o): Use MC_SRC_FLAGS.
	Add dependancy GM2-LIBS-BOOT-H.
	(m2/gm2-libs-boot/UnixArgs.o): Ditto.
	(m2/gm2-libs-boot/choosetemp.o): Ditto.
	(m2/gm2-libs-boot/errno.o): Ditto.
	(m2/gm2-libs-boot/dtoa.o): Ditto.
	(m2/gm2-libs-boot/ldtoa.o): Ditto.
	(m2/gm2-libs-boot/termios.o): Ditto.
	(m2/gm2-libs-boot/SysExceptions.o): Ditto.
	(m2/gm2-compiler-boot/M2GCCDeclare.o): Add gm2-libs-ch to the
	search path.
	(m2/gm2-compiler-boot/M2Error.o): Ditto.
	(m2/gm2-compiler-boot/%.o): Ditto.
	(m2/pge-boot/%.o): Ditto.
	* gm2-gcc/m2color.cc (m2color_colorize_start): Replace parameter
	type char to void and recast to char * when calling colorize_start.
	* gm2-gcc/m2color.h (m2color_colorize_start): Replace parameter
	type char to void.
	* gm2-gcc/m2type.h: Remove #if 0 block.
	* gm2-libs-ch/SysExceptions.c (DECL_PROC_T): Provide alternative
	defines for MC an gm2.
	(PROC_FUNC): Ditto.
	(EXTERN): Force undefine and redefine.
	(SysExceptions_InitExceptionHandlers): Rewrite function
	declaration using defined macros.
	(_M2_SysExceptions_init): Use EXTERN.
	(_M2_SysExceptions_finish): Replace with ...
	(_M2_SysExceptions_fini): ... this and add parameters.
	* gm2-libs-ch/UnixArgs.cc (gm2-libs-host.h): Include.
	(GUnixArgs.h): Include.
	(GM2RTS.h): Include.
	(UnixArgs_GetArgV): Change return type to void *.
	(UnixArgs_GetEnvV): Ditto.
	* gm2-libs-ch/m2rts.h (M2RTS_RegisterModule_Cstr): Add new
	conditional macro.
	(M2RTS_RequestDependant): Remove.
	(M2RTS_RegisterModule): Ditto.
	(M2RTS_Terminate): Ditto.
	(M2RTS_DeconstructModules): Ditto.
	(M2RTS_Halt): Ditto.
	(_M2_M2RTS_init): Ditto.
	(M2RTS_ConstructModules): Ditto.
	* gm2-libs-ch/termios.c (_termios_C): Define.
	(EXTERN): Add conditional definition.
	(doSetUnset): New function.
	(_M2_termios_init): Add correct parameters.
	(_M2_termios_finish): Ditto.
	(_M2_termios_fini): Ditto.
	* mc-boot-ch/GSysExceptions.c (DECL_PROC_T): New define.
	(PROC_FUNC): Ditto.
	(EXTERN): Force undef.
	(SysExceptions_InitExceptionHandlers): Rewrite.
	* mc-boot-ch/Glibc.c (libc_open): Rename parameter
	oflag to flags.
	* mc-boot-ch/Gtermios.cc (_termios_C): New define.
	(KillTermios): Change parameter type from
	struct termios * to termios_TERMIOS.
	(tcsnow): Rewrite.
	(tcsnow): Rewrite.
	(tcsdrain): Rewrite.
	(tcsflush): Rewrite.
	(cfgetospeed): Rewrite.
	(cfgetispeed): Rewrite.
	(cfsetospeed): Rewrite.
	(cfsetispeed): Rewrite.
	(cfsetspeed): Rewrite.
	(cfsetspeed): Rewrite.
	(tcgetattr): Rewrite.
	(tcsetattr): Rewrite.
	(cfmakeraw): Rewrite.
	(tcsendbreak): Rewrite.
	(tcdrain): Rewrite.
	(tcflushi): Rewrite.
	(tcflusho): Rewrite.
	(tcflushio): Rewrite.
	(tcflowoni): Rewrite.
	(tcflowoffi): Rewrite.
	(tcflowono): Rewrite.
	(tcflowoffo): Rewrite.
	(GetFlag): Rewrite.
	(SetFlag): Rewrite.
	(GetChar): Rewrite.
	(SetChar): Rewrite.
	(InitTermios): Rewrite.
	* pge-boot/GM2RTS.cc: Regenerate.
	* pge-boot/GSysExceptions.cc: Ditto.
	* pge-boot/Gtermios.cc: Ditto.
	* pge-boot/m2rts.h: Rewrite.
	* mc-boot-ch/GSYSTEM.h: New file.
	* mc-boot-ch/GSysExceptions.h: New file.
	* mc-boot-ch/Gtermios.h: New file.

Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
2024-08-28 22:51:11 +01:00
.github
c++tools
config
contrib
fixincludes
gcc PR modula2/116181 remove ODR warnings from library interface files 2024-08-28 22:51:11 +01:00
gnattools
gotools
include
INSTALL
libada
libatomic
libbacktrace
libcc1
libcody
libcpp Daily bump. 2024-08-28 00:19:45 +00:00
libdecnumber
libffi
libgcc Daily bump. 2024-08-28 00:19:45 +00:00
libgfortran Daily bump. 2024-08-21 00:19:34 +00:00
libgm2
libgo
libgomp libgomp: Add interop types and routines to OpenMP's headers and module 2024-08-28 11:50:43 +02:00
libgrust
libiberty
libitm
libobjc
libphobos
libquadmath Libquadmath: update doc for some constants 2024-08-28 15:53:05 +02:00
libsanitizer
libssp
libstdc++-v3 libstdc++: Fix autoconf check for O_NONBLOCK in <fcntl.h> 2024-08-28 21:34:22 +01:00
libvtv
lto-plugin Daily bump. 2024-08-24 00:18:13 +00:00
maintainer-scripts
zlib
.b4-config
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
ar-lib
ChangeLog Daily bump. 2024-08-23 00:17:24 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess
config.rpath
config.sub
configure
configure.ac
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.RUNTIME
depcomp
install-sh
libtool-ldflags
libtool.m4
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS
Makefile.def
Makefile.in Makefile.tpl: fix whitespace in licence header 2024-08-22 03:41:12 +01:00
Makefile.tpl Makefile.tpl: fix whitespace in licence header 2024-08-22 03:41:12 +01:00
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
README
SECURITY.txt
symlink-tree
test-driver
ylwrap

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.