N
Nick
Vincenzo Mercuri said:From: Vincenzo Mercuri <[email protected]>
Subject: Re: Software maintenance
Newsgroups: comp.lang.c
Date: Thu, 16 Sep 2010 19:47:44 +0200
that reminds me of an example on "C Unleashed", something like:
func1(path); // in C:\DIR\
func2(path);
GCC tries - if asked to - to do something sensible about this:
$ cat test.c
func1(path); // in C:\DIR \
func2(path);
$ gcc -E test.c
# 1 "test.c"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "test.c"
func1(path);
$ gcc -Wall -E test.c
# 1 "test.c"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "test.c"
test.c:1:14: warning: multi-line comment
func1(path);
(the -E stops it going any futher and so avoids we having to create a
scaffolding around these two lines). You'll see that in both cases the
splicing still occurs. I think it's quite a good warning as well
(although I'd have added a mention of // in there) - if you want a
multi-line comments you ought to be using /* ... */