https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118519

            Bug ID: 118519
           Summary: Escaped line breaks in the middle of a token
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: alx at kernel dot org
  Target Milestone: ---

Once upon a time, this probably made sense due to hardware or software
limitations.  These days, it doesn't make sense anymore.
We should add a diagnostic when an escaped line break breaks a token.


alx@devuan:~/tmp/gcc$ cat split.c 
#define A\
B \
4\
2

int
ma\
in(void)
{
        return AB;
}
alx@devuan:~/tmp/gcc$ cc -Wall -Wextra split.c 
alx@devuan:~/tmp/gcc$ ./a.out 
alx@devuan:~/tmp/gcc$ echo $?
42


---

Or:

alx@devuan:~/tmp/gcc$ cat split.c 
#d\
e\
f\
i\
n\
e \
A\
B \
4\
2

i\
n\
t

m\
a\
i\
n
(
v\
o\
i\
d)
{

r\
e\
t\
u\
r\
n AB;
}
alx@devuan:~/tmp/gcc$ cc -Wall -Wextra split.c 
alx@devuan:~/tmp/gcc$ ./a.out; echo $?
42

Reply via email to