Re: Help wanted: compile error detection

2000-07-14 Thread Thomas E. Dickey
On Fri, 14 Jul 2000, Martin Wilck wrote: > Dear Thomas E. Dickey, you wrote on Today: > > > I've seen some compilers generate a zero-length (or nearly-zero ;-) > > object file on error. (no, I don't recall which ones) > > That's why we should use test -s rather than test -f, like AC_LINK_IFELS

Re: Help wanted: compile error detection

2000-07-14 Thread Thomas E. Dickey
On 14 Jul 2000, Alexandre Oliva wrote: > On Jul 14, 2000, "Thomas E. Dickey" <[EMAIL PROTECTED]> wrote: > > > I've seen some compilers generate a zero-length (or nearly-zero ;-) > > object file on error. > > But would they *also* fail to return a non-zero exit status? if I remembered (or had ac

Re: Help wanted: compile error detection

2000-07-14 Thread Martin Wilck
Dear Thomas E. Dickey, you wrote on Today: > I've seen some compilers generate a zero-length (or nearly-zero ;-) > object file on error. (no, I don't recall which ones) That's why we should use test -s rather than test -f, like AC_LINK_IFELSE. -- Martin Wilck <[EMAIL PROTECTED]> Institute for

Re: Help wanted: compile error detection

2000-07-14 Thread Alexandre Oliva
On Jul 14, 2000, "Thomas E. Dickey" <[EMAIL PROTECTED]> wrote: > I've seen some compilers generate a zero-length (or nearly-zero ;-) > object file on error. But would they *also* fail to return a non-zero exit status? -- Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/ Re

Re: Help wanted: compile error detection

2000-07-14 Thread Thomas E. Dickey
On Fri, 14 Jul 2000, Martin Wilck wrote: > > > I have come across one compiler that returns an exit status of 0 > > > if compile errors occur :-{ > > > > Does it generate an object file? If not, we could just add a test for > > the existence of the object file to tell whether compilation succee

Re: Help wanted: compile error detection

2000-07-14 Thread Martin Wilck
> > I have come across one compiler that returns an exit status of 0 > > if compile errors occur :-{ > > Does it generate an object file? If not, we could just add a test for > the existence of the object file to tell whether compilation succeeded > or not. It doesn't - that should work. -- M

Re: Help wanted: compile error detection

2000-07-14 Thread Alexandre Oliva
On Jul 12, 2000, Martin Wilck <[EMAIL PROTECTED]> wrote: > I have come across one compiler that returns an exit status of 0 > if compile errors occur :-{ Does it generate an object file? If not, we could just add a test for the existence of the object file to tell whether compilation succeeded

Re: Help wanted: compile error detection

2000-07-13 Thread Akim Demaille
> "Martin" == Martin Wilck <[EMAIL PROTECTED]> writes: Akim> I don't think it would really learn something to us. s/learn/teach/, sorry, Frenchism.

Re: Help wanted: compile error detection

2000-07-13 Thread Akim Demaille
> "Martin" == Martin Wilck <[EMAIL PROTECTED]> writes: Martin> Sounds good to me, although test -s may be more error-proof Martin> (?). You're right, I had not realized test -s was safe. Martin> After all, a stupid compiler might create the file and than Martin> write nothing to it (there

Re: Help wanted: compile error detection

2000-07-13 Thread Martin Wilck
Akim Demaille wrote: > >> I have come across one compiler that returns an exit status of 0 if > >> compile errors occur :-{ > > Gross! What's this? Lahey/Fujitsu Fortran, a widely used compiler system. I couldn't believe it myself. To make matters worse, the compiler writes to stderr whether o

Re: Help wanted: compile error detection

2000-07-13 Thread Akim Demaille
> "Martin" == Martin Wilck <[EMAIL PROTECTED]> writes: Martin> I wrote: >> I have come across one compiler that returns an exit status of 0 if >> compile errors occur :-{ Gross! What's this? >> Thus, AC_COMPILE_IFELSE can't be used to test this compiler's >> features. >> >> Suggestions?

Re: Help wanted: compile error detection

2000-07-12 Thread Martin Wilck
I wrote: > > I have come across one compiler that returns an exit status of 0 > if compile errors occur :-{ > > Thus, AC_COMPILE_IFELSE can't be used to test this compiler's features. > > Suggestions? A possible workaround is using AC_LINK_IFELSE instead, since that tests whether an output fil

Help wanted: compile error detection

2000-07-12 Thread Martin Wilck
I have come across one compiler that returns an exit status of 0 if compile errors occur :-{ Thus, AC_COMPILE_IFELSE can't be used to test this compiler's features. Suggestions? -- Martin Wilck <[EMAIL PROTECTED]> Institute for Tropospheric Research, Permoserstr. 15, D-04318 Leipzig, Germany