This is the mail archive of the gcc@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: QMTest Update


Hans-Peter Nilsson <hp@bitrange.com> writes:

| On 13 Jun 2002, Gabriel Dos Reis wrote:
| > Hans-Peter Nilsson <hp@bitrange.com> writes:
| > | >   foreach file [lsort [find $srcdir/$subdir *.C]] {
| > | > Note the "lsort" command.
| > |
| > | Note its absence in gcc.c-torture/compile/compile.exp.
| > | Perhaps all similar absenteeisms should be fixed as
| > | obvious.
| >
| > Actually, instead of duplicating the same code over and over, I think
| > a more scalable approach is to factorise the main-loop codes.  That is
| > a much more viable approach in the long run.
| 
| We're still talking about what's now a one-line for-loop, right?

Which actually is not a one-line for-loop.

| Well, if you find a non-obfuscating way to rewrite it, go wild
| with the factoring.

Well, that is not on the top of my TODO list but that doesn't mean
that I should not point out against code duplication -- which means
duplicated effort when it comes to modify something.

Dejagnu knows load_lib which can be used to load a routine that
does the above, but defined only once in one place.  I don't find what
is necessarily obfuscating about not duplication codes.

-- Gaby


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