public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* preprocessor/3081: Preprocessor merges 2 first lines when -imacros is being used
@ 2001-06-07 22:46 pavenis
  0 siblings, 0 replies; 3+ messages in thread
From: pavenis @ 2001-06-07 22:46 UTC (permalink / raw)
  To: gcc-gnats

>Number:         3081
>Category:       preprocessor
>Synopsis:       Preprocessor merges 2 first lines when -imacros is being used
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 07 22:46:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Andris Pavenis
>Release:        gcc-3.0 20010606
>Organization:
>Environment:
Tested on targets targets i686-pc-linux-gnu, i586-pc-msdosdjgpp
>Description:
Preprocessor merges 2 first source lines (if first is not
#define) when command line option '-imacros dome_file'
is specified for preprocessor. Example is for C. It's not critical in this case, but it more serious for preprocessing assembler source as it may cause syntax error
in this situation. Initially I noticed it after preprocessing assembler file (target -i586-pc-msdosdjgpp)
as I get syntax errors due to this bug. After that I 
suceeded  to reproduce the same for Linux

Andris

-----------------  foo.h  ---------------------
#define foo
-----------------  foo.c  ---------------------
int	a=0;
int	b=0;
-----------------  command (under Linux)  -----
cpp -v -imacros foo.h foo.c
-----------------  output  --------------------
bash-2.05$ cpp -v -imacros foo.h foo.c -o -
Reading specs from /disk2/gcctest/lib/gcc-lib/i686-pc-linux-gnu/3.0/specs
Configured with: ../gcc/configure --prefix=/disk2/gcctest --enable-shared --verbose --enable-languages=c,c++,g77,objc --enable-threads=posix
Thread model: posix
gcc version 3.0 20010606 (prerelease)
 /disk2/gcctest/lib/gcc-lib/i686-pc-linux-gnu/3.0/cpp0 -lang-c -v -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem=posix -D__STDC_HOSTED__=1 -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i686__ -D__tune_pentiumpro__ -imacros foo.h foo.c -o -
GNU CPP version 3.0 20010606 (prerelease) (cpplib) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /disk2/gcctest/lib/gcc-lib/i686-pc-linux-gnu/3.0/include
 /disk2/gcctest/i686-pc-linux-gnu/include
 /usr/include
End of search list.
# 1 "foo.c"
# 1 "foo.h" 1
# 2 "foo.c" 2
int a;int b;
bash-2.05$
>How-To-Repeat:
See description
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: preprocessor/3081: Preprocessor merges 2 first lines when -imacros is being used
@ 2001-08-05 10:35 neil
  0 siblings, 0 replies; 3+ messages in thread
From: neil @ 2001-08-05 10:35 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, neil, pavenis

Synopsis: Preprocessor merges 2 first lines when -imacros is being used

State-Changed-From-To: analyzed->closed
State-Changed-By: neil
State-Changed-When: Sun Aug  5 10:35:41 2001
State-Changed-Why:
    Fixed in 3.1.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3081&database=gcc


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: preprocessor/3081: Preprocessor merges 2 first lines when -imacros is being used
@ 2001-06-07 23:16 neil
  0 siblings, 0 replies; 3+ messages in thread
From: neil @ 2001-06-07 23:16 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, neil, nobody, pavenis

Synopsis: Preprocessor merges 2 first lines when -imacros is being used

Responsible-Changed-From-To: unassigned->neil
Responsible-Changed-By: neil
Responsible-Changed-When: Thu Jun  7 23:16:47 2001
Responsible-Changed-Why:
    Mine.
State-Changed-From-To: open->analyzed
State-Changed-By: neil
State-Changed-When: Thu Jun  7 23:16:47 2001
State-Changed-Why:
    Confirmed, though I doubt a fix will make it in for 3.0.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3081&database=gcc


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-08-05 10:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-07 22:46 preprocessor/3081: Preprocessor merges 2 first lines when -imacros is being used pavenis
2001-06-07 23:16 neil
2001-08-05 10:35 neil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).