Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA
Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!godot!harvard!seismo!brl-tgr!tgr!cpc@AMES-NAS.ARPA
From: Chuck Collins 
Newsgroups: net.lang.c
Subject: Re: A useful construct for C !
Message-ID: <8128@brl-tgr.ARPA>
Date: Fri, 8-Feb-85 02:16:50 EST
Article-I.D.: brl-tgr.8128
Posted: Fri Feb  8 02:16:50 1985
Date-Received: Sun, 10-Feb-85 04:10:53 EST
Sender: news@brl-tgr.ARPA
Organization: Ballistic Research Lab
Lines: 14

I have often felt the need for a "typeof" operator, and in cases that
cannot readily be taken care of by typedef. Consider:

	#include	

	struct	sgttyb	get;

	saveflags(flags)
	(typeof get.sg_flags)	flags;
	{

This provides a clean way of making two data items match. You wouldn't
suggest that I open up sgtty.h and add a typedef. This example seems
trivial, but I've run into it in much more practical situations.