lkml.org 
[lkml]   [2001]   [Nov]   [22]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateThu, 22 Nov 2001 15:29:07 +0100
FromGiacomo Catenazzi <>
SubjectRe: Asm style
ncw@axis.demon.co.uk wrote:
> Giacomo Catenazzi wrote:
>> 
>> not ANSI C. The trailing \ is understood only in marco definitions
>> (and outside strings)
>> 
> gcc begs to differ
> 
> /* z.c */
> #include <stdio.h>
> 
> int main(void)
> {
>     printf("This is a string\n\
> with continuation characters\n");
>     return 0;
> }
> 
> $ gcc -Wall -pedantic -ansi z.c -o z
> [silence]
> 
> Remove the \ and you get
> 
> z.c:5: warning: string constant runs past end of line
> z.c: In function `main':
> z.c:5: warning: ANSI C forbids newline in string constant
> 

gcc should warn in both case (when calling it with -pedantic -ansi).
But forget my comment:
Talking about ANSI C for asm construct doen't make much sense.

If gcc people will maintain (in long future) the syntax of
trailing \ + NL, I agree to use it into kernel.

	giacomo


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:13    [W:0.123 / U:0.010 seconds]
©2003-2008 Jasper Spaans