[Rd] missing extern in GraphicsBase.h

dmitrii.pasechnik at maths.ox.ac.uk dmitrii.pasechnik at maths.ox.ac.uk
Thu Feb 15 15:39:55 CET 2018

Dear all,
in src/include/GraphicsBase.h one has a declaration

int baseRegisterIndex;

the same as in src/main/devices.c

which causes problems on Solaris, see bug #17385, 
and other platforms with "unusual" linkers, see bug #16633.

By right, global variables like baseRegisterIndex are to be
declared just once, and not in a header file, but in a *.c file.
Then, to use them elsewhere in the code, one declares them as
extern in the header. 
(as proposed on #17385)

Otherwise one has an undefined behaviour,
some linkers might silently prepend extern, some not...

May I humbly request attention to this bug
(which is classified as UNCONFIRNMED---and indeed it needs an extra
effort to reproduce the error on, say, Linux --- but it really is an obvious C
bug, which will rear its ugly head sooner or later again)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: Digital signature
URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20180215/81d3065b/attachment.sig>

More information about the R-devel mailing list