This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [rfa] gdb_thread_db.h: #errror if no uintptr_t
- From: Michael Elizabeth Chastain <mec at shout dot net>
- To: brobecker at gnat dot com
- Cc: gdb-patches at sources dot redhat dot com
- Date: Wed, 26 Feb 2003 13:56:43 -0600
- Subject: Re: [rfa] gdb_thread_db.h: #errror if no uintptr_t
Hi Joel,
mec> +#ifndef HAVE_UINTPTR_T
mec> +#error No uintptr_t available; your C library is too old.
mec> +/* Inhibit further compilation errors after this error. */
mec> +#define uintptr_t void *
mec> +#endif
joel> Forgive my curiosity, why adding the "#define uintptr_t"? Isn't the
joel> compilation going to stop with the #error message anyway?
No, the compilation will keep on going to the end of the file,
so my nice #error message gets followed by 20 lines of errors.
I want to have a directive for 'stop processing now' but #error
does not do that. I suppose a line like '#include +cpp_syntax_error+'
would achieve the desired effect.
A smart user might notice that if they take the #error out, but leave the
#define in, then the build runs to completion. But if they do that,
then they are smart enough to realize that when their gdb doesn't work,
it's their fault.
I hope.
Michael C