delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/07/24/16:27:11

Date: Tue, 24 Jul 2001 22:36:39 +0300 (WET)
From: Andris Pavenis <pavenis AT lanet DOT lv>
To: Gisle Vanem <giva AT bgnett DOT no>
Cc: djgpp AT delorie DOT com
Subject: Re: gcc 3.0 preprocessor bug?
In-Reply-To: <Pine.UW2.3.95.1010724171031.1375A-100000@bryggen.bgnett.no>
Message-ID: <Pine.A41.4.05.10107242232310.43666-100000@ieva06.lanet.lv>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

Seems that this problem only happens when GCC-3.0 is reading input
file from stdin. I reproduced problem trying to run gcc-3.0 under DOSEMU
in ssh session (I'm about 200 km away now and not near any computer with
DJGPP installed ...)

Perhaps I should look into that when I'll return

Andris


On Tue, 24 Jul 2001, Gisle Vanem wrote:

> The following makefile demonstrates strange behaviour of the
> preprocessor in gcc 3.0 (cpp0.exe dated 22 June 2001).
>  
>   TEXT = "/* comment */\n" \
>          ".text\n" \
>          "ret"
>  
>   all:
>         $(DJDIR)/bin/echo $(TEXT) | gcc -E -
>  
> The output is:
>   e:/djgpp/bin/echo "/* comment */\n" ".text\n" "ret" | gcc -E -
>   cpp0.exe: warning:  is shorter than expected
>   # 1 "<stdin>"
>   # 1 "e:/djgpp/lib/gcc-lib/djgpp/3.0/djgpp.ver" 1
>   # 1 "e:/djgpp/include/sys/version.h" 1 3
>   # 2 "e:/djgpp/lib/gcc-lib/djgpp/3.0/djgpp.ver" 2
>   # 2 "<stdin>" 2
>    .text
>    ret
>   t
>  
> Note the last 't'. Changing "ret" to "ret\n" removes the last 't',
> but the cpp warning is still printed.
> 
> Gisle V.
> 
> 

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019