public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/44191]  New: -E output broken for gcc-4.5.0
@ 2010-05-18 22:34 gcc-bug at andihellmund dot com
  2010-05-18 22:45 ` [Bug preprocessor/44191] " jakub at gcc dot gnu dot org
  0 siblings, 1 reply; 3+ messages in thread
From: gcc-bug at andihellmund dot com @ 2010-05-18 22:34 UTC (permalink / raw)
  To: gcc-bugs

Hey,

while working on a low-prio PR24024, I recognized that the -E output of
gcc-4.5.0 is somehow "broken" for certain constructs, for example:

==== test.c ====
int main ()
{
  int ret, a;

  ret = a + \
  b;
}
==== END test.c ====

(gcc-4.5.0) # gcc -E test.c
# 1 "test.c"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "test.c"
int main ()
{
int ret, a;
ret = a +
 b;
}

I also tested this on older versions of gcc and each of these versions (4.2.0,
4.3.0 and 4.4.3) return the expected output:

# 1 "test.c"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "test.c"
int main ()
{
int ret, a;
ret = a + b;

}

I currently suspect that this incorrect output in gcc-4.5.0 is caused by
_cpp_clean_line. For my understanding, _cpp_clean_line should detect the splice
operator and merge the two lines to form a new logical line which is then
output due to the -E option.


-- 
           Summary: -E output broken for gcc-4.5.0
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: gcc-bug at andihellmund dot com
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44191


^ permalink raw reply	[flat|nested] 3+ messages in thread
[parent not found: <bug-44191-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2012-09-11 22:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-18 22:34 [Bug c/44191] New: -E output broken for gcc-4.5.0 gcc-bug at andihellmund dot com
2010-05-18 22:45 ` [Bug preprocessor/44191] " jakub at gcc dot gnu dot org
     [not found] <bug-44191-4@http.gcc.gnu.org/bugzilla/>
2012-09-11 22:40 ` ipinkas at nds dot com

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).