This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: g++ -fconserve-space makes no effect
- From: Falk Hueffner <hueffner at informatik dot uni-tuebingen dot de>
- To: Takenaka Kazuhiro <takenaka at intellilink dot co dot jp>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Tue, 03 Aug 2004 09:54:21 +0200
- Subject: Re: g++ -fconserve-space makes no effect
- References: <410EE84D.5010509@intellilink.co.jp>
Takenaka Kazuhiro <takenaka@intellilink.co.jp> writes:
> Can you help me with the following problem. I tried to compile
> C++ program on Fedra core 1 by g++ 3.3.2 and then compilation
> was aborted.
>
> (The program is first developped on Solaris 8 by Sun compiler.)
>
> Source files are like following.
>
> <<< main.C
> #include <stdio.h>
>
> int var;
>
> int main(void)
> {
> var = 0;
> printf("var = %d\n", var);
> return 0;
> }
>>>> end
>
> <<< var.C
> int var;
>>>> end
This is not legal in C++. One of these must be "static" or "external"
(depending on whether you want them to be identical or not).
--
Falk