🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.bug
Article #2153

typeof on types

#2153
From: Brad Fowlow
Date: Wed, 10 Jan 1990 15:36
17 lines
824 bytes
The following variant of Thoms Kunz' example does compile and 
produce SIZE: 4 using g++ 1.36.1 on a Sun 3.

----------------
#include <stream.h>

main()
{
  printf( "SIZE: %d\n", sizeof( typeof( typeof(int[3])* )));
}
----------------
The original version said  typeof(* typeof( int[3] ) ), 
but  ` * int * '  is neither a type nor an expression; 
hence the original syntax error.

brad fowlow
Technical Details
Message-ID: <9001101536.AA09105@bnrmtl.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!LARRY.MCRCIM.MCGILL.EDU!brad%bnrmtl.UUCP

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!LARRY.MCRCIM.MCGILL.EDU!brad%bnrmtl.UUCP
From: brad%bnrmtl.UUCP@LARRY.MCRCIM.MCGILL.EDU (Brad Fowlow)
Newsgroups: gnu.g++.bug
Subject: typeof on types
Message-ID: <9001101536.AA09105@bnrmtl.com>
Date: 10 Jan 90 15:36:22 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 17