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]

Re: gcc_AC_EXAMINE_OBJECT


On Fri, Mar 16, 2001 at 02:54:13PM -0800, Richard Henderson wrote:
> The endianness test fails on Alpha/ELF.  The problem is that 
> 
>   sed 's/^[0-7]*[       ]*//
>           s/\*/./g
>           s/ \\n/*/g
> 
> you delete all the spaces at the beginning of the line, then
> expect a space before the \n.  As luck would have it, the od
> output is like
> 
> 0000100  \n   e   n   d   i   a   n   :   B   A   X  \n 001 021 001 003
> 
> and the rest of the transformation results in
> 
>    ....\nendian:B
>    AX

Argh...

> 
> being split across a line like that.  Since you're about to
> remove all of the spaces completely, I suggest not caring
> about the space separator that od emits.

The trouble with this is, then you won't distinguish
  0   0   1
and
  001
in od output, anymore.  We don't *need* that right now, but we might.
(Notice e.g. that the expected string for the PDP10 float format has
"10" in it.)

How about doing s/^[0-7]*[ 	]*/ / - replace with one blank -
instead?

zw


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