🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #51354

declaring variables

#51354
From: Gregory F. Hogg
Date: Sun, 23 May 1993 14:16
22 lines
942 bytes
I have gcc 2.3.3 and would like to do the following:


main()
{

	int x;
	printf("x = %d\n", x);

	int y;
	printf("y = %d\n", y);
}

That is declare local variables  where I need them instead of at
the start of each function.  I can do this with g++ but not gcc why?

-- 
                          
    +++++++++++++++++     
   +++++++++++++++++++    Greg Hogg
   +++             +++    
Technical Details
Message-ID: <C7HGz8.10H@halexvii.uucp>
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!noc.near.net!uunet!halexvii!greg

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,93f999d6ebca1ac3,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1993-05-25 06:56:27 PST
Newsgroups: gnu.gcc.help
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!noc.near.net!uunet!halexvii!greg
From: greg@halexii.uucp (Gregory F. Hogg)
Subject: declaring variables
Organization: HOGG'S SOFTWARE
Date: Sun, 23 May 1993 14:16:20 GMT
Message-ID: <C7HGz8.10H@halexvii.uucp>
Sender: greg@halexvii.uucp (Gregory F. Hogg)
Lines: 22