Article View: gnu.gcc.help
Article #42729Undeclared variables compiling groff with gcc 2.7.0
From: Varadarajan
Date: Fri, 03 Nov 1995 00:00
Date: Fri, 03 Nov 1995 00:00
25 lines
1458 bytes
1458 bytes
>>>>> ">" == Robert Gagnon <lonas@jrv.qc.ca> writes:
>> Hi.
>> I am attempting to compile groff 1.09 with gcc 2.7.0.
>> The compilation aborts with undeclared variables in some file.
>> I edit the file, then will see something like:
>> for (int i=0; i<10; i++) {
>> ...
>> }
>> ...
>> i = 2;
Hi,
With gcc 2.7.0 the scope of a variable initialized in a for
statement ends with the for block (As specified by the new ANSI C++
rules). You can give an option -fno-for-scope to override this.
Hope this helps,
------------------------------------------------------------------------
| Varadarajan.T.S. | It's not an optical illusion, it just |
| M.S. Comp Science | looks like one. |
| tsv@cs.umanitoba.ca | #include "std_disclaimer.h" |
------------------------------------------------------------------------
Technical Details
Message-ID:
<9511031626.AA00598@silver.cs.umanitoba.ca>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<47dbb2$9oc@wagner.spc.videotron.ca>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,23822cb2d525fe69,start X-Google-Attributes: gid11318c,public From: tsv@cs.umanitoba.CA (Varadarajan) Subject: Undeclared variables compiling groff with gcc 2.7.0 Date: 1995/11/03 Message-ID: <9511031626.AA00598@silver.cs.umanitoba.ca> X-Deja-AN: 118699729 distribution: gnu sender: daemon@cis.ohio-state.edu references: <47dbb2$9oc@wagner.spc.videotron.ca> organization: GNUs Not Usenet reply-to: tsv@cs.umanitoba.ca newsgroups: gnu.gcc.help