Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cwjcc!gatech!eedsp!baud From: baud@eedsp.gatech.edu (Kurt Baudendistel) Newsgroups: comp.lang.c++ Subject: Re: variable declaration Message-ID: <449@eedsp.gatech.edu> Date: 15 Sep 89 14:10:06 GMT References: <953@ncratl.Atlanta.NCR.COM> <6590251@hplsla.HP.COM> Reply-To: baud@eedsp.UUCP (Kurt Baudendistel) Organization: Georgia Institute of Technology Lines: 15 In article <6590251@hplsla.HP.COM> jima@hplsla.HP.COM (Jim Adcock) writes: >There shouldn't be any issue of optimization no matter where one declares >one's variables using any modern optimizing compiler. Be careful when making statements like this! ;-) If you are talking about strictly automatics (locals), this is true, but not if you are comparing automatics and external (global) variables. Automatics can be much more easily and effectively optimized than externals; witness the code generated by the GNU C/C++ compiler. kurt -- Kurt Baudendistel --- GRA Georgia Tech, School of Electrical Engineering, Atlanta, GA 30332 internet: baud@eedsp.gatech.edu uucp: gatech!gt-eedsp!baud