[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Remove the rest of the comment from _AC_CACHE_DUMP
From: |
Paul Eggert |
Subject: |
Re: Remove the rest of the comment from _AC_CACHE_DUMP |
Date: |
Mon, 10 Apr 2006 10:47:48 -0700 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) |
Stepan Kasal <address@hidden> writes:
> What if you have:
>
> #ifdef FOO
> #define FOO_EARLY 1
> #endif
> #define FOO 1
> #ifdef FOO
> #define FOO_LATE 1
> #endif
>
> Shall we sort the blocks between the occurences of #ifdef's?
We can't do that in general, unless we write a parser for C. Here is
a strictly-conforming C99 program that defines FOO to 0. All but the
last line could, at least in theory, occur in confdefs.h but if you
sort them you'll get chaos. Admittedly this is an extreme case, but
the point is that sorting is not practical in general.
// Even comments can get you into trouble!??/
This looks like a syntax error, but it isn't.
#define ignore(x) // This ignores its argument.
#if !(FOO && BAR) ignore (/*This line need not end in a quote:*/ "\\
now here is a real funny one:\??/
tough to understand, huh? ??/
#define FOO "This line need not end in a quote either!??/
But now it is time to end this nonsense and define "FOO" to 0....)
??=\
\
d\
e\
f\
i\
n\
e\
\
F\
O\
O\
\
('1'??''??/
1')
#end\
if
int main (void) { return FOO; }
- Re: Remove the rest of the comment from _AC_CACHE_DUMP, (continued)
- Re: Remove the rest of the comment from _AC_CACHE_DUMP, Stepan Kasal, 2006/04/08
- Re: Remove the rest of the comment from _AC_CACHE_DUMP, Paul Eggert, 2006/04/09
- Re: Remove the rest of the comment from _AC_CACHE_DUMP, Noah Misch, 2006/04/09
- Re: Remove the rest of the comment from _AC_CACHE_DUMP, Paul Eggert, 2006/04/10
- Re: Remove the rest of the comment from _AC_CACHE_DUMP, Ralf Wildenhues, 2006/04/10
- Re: Remove the rest of the comment from _AC_CACHE_DUMP, Stepan Kasal, 2006/04/10
- Re: Remove the rest of the comment from _AC_CACHE_DUMP, Paul Eggert, 2006/04/10
- Re: Remove the rest of the comment from _AC_CACHE_DUMP, Ralf Wildenhues, 2006/04/10
- Re: Remove the rest of the comment from _AC_CACHE_DUMP, Stepan Kasal, 2006/04/10
- Re: Remove the rest of the comment from _AC_CACHE_DUMP, Ralf Wildenhues, 2006/04/10
- Re: Remove the rest of the comment from _AC_CACHE_DUMP,
Paul Eggert <=