[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: proposal for version mismatch
From: |
Gary V. Vaughan |
Subject: |
Re: proposal for version mismatch |
Date: |
Tue, 18 Jul 2006 23:39:39 +0100 |
User-agent: |
Thunderbird 1.5.0.4 (Macintosh/20060530) |
Hi Eric!
Eric Blake wrote:
> Would this patch be okay to apply to branch-1_4? It will help people playing
> with m4 2.0 to more easily recognize when 1.4.6 can't parse a frozen file
> generated by 2.0.
In principle, I like this idea a lot, and think it is a worthy
addition to branch-1_4. BUT...
> GET_DIRECTIVE;
> VALIDATE ('V');
> GET_CHARACTER;
> - VALIDATE ('1');
> - GET_CHARACTER;
> + GET_NUMBER (number[0]);
> + if (number[0] > 1)
> + M4ERROR ((EXIT_MISMATCH, 0,
> + "frozen file version %d greater than max supported of 1",
> + number[0]));
> + else if (number[0] < 1)
> + M4ERROR ((EXIT_FAILURE, 0,
> + "ill-formed frozen file, version directive expected"));
> VALIDATE ('\n');
I don't like this particular patch though. Is it not the case
that m4-1.4.6 might actually run perfectly well with a file
frozen by m4-1.4o/m4-1.9a/m4-2.x in many cases? I think failing
on the version number off the bat is not the most flexible approach,
especially considering your earlier patch to not barf on changeword
entries in the frozen file. (Or did 1.4o still generate V1 files?)
Unfortunately, this opens a whole can of worms... and it is not
at all straight forward to figure out whether a particular frozen
state will cause problems subsequent to loading (maybe impossible
infact). More thought required :-(
Cheers,
Gary.
--
Gary V. Vaughan ())_. address@hidden,gnu.org}
Research Scientist ( '/ http://blog.azazil.net
GNU Hacker / )= http://trac.azazil.net/projects/libtool
Technical Author `(_~)_ http://sources.redhat.com/autobook
signature.asc
Description: OpenPGP digital signature