🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: gnu.g++.lib.bug
1 messages
1 total messages Started by Lewis G. Pringle Wed, 09 Sep 1992 00:37
size_t should be typedef
#282
Author: Lewis G. Pringle
Date: Wed, 09 Sep 1992 00:37
17 lines
1146 bytes
In libg++ 2.1 it seems that size_t is made to be a #define. This has the
unfortunate side-effect of breaking code which uses functional cast notation
to cast to type size_t.

eg:
	size_t	fred	=	size_t (1);

fails to compile, because size_t is expanded as a #define to unsigned int.

If you must check all over the place if it is defined, why not use __size_t or
some such thing? Or at least, if you MUST use a #define here, please #define to
a simple type name - (first cons up bogus typedef like
typedef unsigned int _nobody_would_ever_use_this_, and then #define size_t _nobody_would_ever_use_this_.
At least this way, my code would compile :-).


			Lewis.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads