This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch, toplevel] --enable-multilib*S* is an easy typo to recognize...


On Thu, Feb 12, 2004 at 07:07:34PM -0500, DJ Delorie wrote:
> 
> IMHO it would be better to fail if that switch is detected, to teach
> them the correct option.  Once we start supporting typos, we have to
> keep supporting them, and where do we draw the line for new typos?

On Fri, Feb 13, 2004 at 04:19:16PM -0200, Alexandre Oliva wrote:
> But really, I don't think we should do this.  It's a slippery slope.

You know, "slippery slope" arguments have never held much weight with me.
Pretend this patch goes in.  Pretend future typo-handling patches are proposed.
It's not like they wouldn't be reviewed on their own merit.  This idea was to
handle /common/ typos, not all of them.  Anyhow.

But failing with an error works just as well.  This wouldn't be hard to
generalize, either (perhaps --enable-language= should also be tagged, for the
missing 's').  Here's the rough patch:


Index: configure.in
===================================================================
RCS file: /home/pme/Repositories/GCC/gcc/configure.in,v
retrieving revision 1.270
diff -u -r1.270 configure.in
--- configure.in        11 Feb 2004 17:31:24 -0000      1.270
+++ configure.in        15 Feb 2004 00:20:31 -0000
@ -1770,6 +1770,11 @@
 serialization_dependencies=serdep.tmp
 AC_SUBST_FILE(serialization_dependencies)

+# Flag common typos.
+if test x${enable_multilibs} != x ; then
+  AC_MSG_ERROR([This option is spelled ...-multilib, not ...-multilibs.])
+fi
+
 # Base args.  Strip norecursion, cache-file, srcdir, host, build,
 # target and nonopt.  These are the ones we might not want to pass
 # down to subconfigures.  Also strip program-prefix, program-suffix,


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]