Re: More pgindent follies
От | ncm@zembu.com (Nathan Myers) |
---|---|
Тема | Re: More pgindent follies |
Дата | |
Msg-id | 20010523142114.L18121@store.zembu.com обсуждение исходный текст |
Ответ на | Re: More pgindent follies (Bruce Momjian <pgman@candle.pha.pa.us>) |
Ответы |
Re: More pgindent follies
|
Список | pgsql-hackers |
On Wed, May 23, 2001 at 11:58:51AM -0400, Bruce Momjian wrote: > > > I don't see the problem here. My assumption is that the comment is not > > > part of the define, right? > > > > Well, that's the question. ANSI C requires comments to be replaced by > > whitespace before preprocessor commands are detected/executed, but there > > was an awful lot of variation in preprocessor behavior before ANSI. > > I suspect there are still preprocessors out there that might misbehave > > on this input --- for example, by leaving the text "* end-of-string */" > > present in the preprocessor output. Now we still go to considerable > > lengths to support not-quite-ANSI preprocessors. I don't like the idea > > that all the work done by configure and c.h in that direction might be > > wasted because of pgindent carelessness. > > I agree, but in a certain sense, we would have found those compilers > already. This is not new behavour as far as I know, and clearly this > would throw a compiler error. This is good news! Maybe this process can be formalized. That is, each official release migh contain a source file with various "modern" constructs which we suspect might break old compilers. A comment block at the top requests that any breakage be reported. A configure option would allow a user to avoid compiling it, and a comment in the file would explain how to use the option. After a major release, any modern construct that caused no trouble in the last release is considered OK to use. This process makes it easy to leave behind obsolete language restrictions: if you wonder if it's OK now to use a feature that once broke some crufty platform, drop it in modern.c and forget about it. After the next release, you know the answer. Nathan Myers ncm@zembu.com
В списке pgsql-hackers по дате отправления: