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: [libiberty] support piping stderr


Vladimir Prus <vladimir@codesourcery.com> writes:

> On Wednesday 31 January 2007 18:22, Ian Lance Taylor wrote:
> > Vladimir Prus <vladimir@codesourcery.com> writes:
> > 
> > > +  if (errname != NULL && (flags & PEX_STDERR_TO_PIPE))
> > 
> > Write the test as
> >     (flags & PEX_STDERR_TO_PIPE) != 0
> > as in other parts of the file.
> 
> Is this a libiberty guideline? I can't find this in GNU coding standard.

It's not a guideline.  But it's how the tests are written in other
parts of that file.  For things which are not in the standard, I think
it's best to emulate the code in the same file.

> > This should also be written as
> >     ((flags & PEX_STDERR_TO_PIPE) != 0)
> > If we retain the restriction that you can only use this on the last
> > program, then you should also check PEX_LAST here and give an error if
> > it is not set.
> 
> Are you sure? At least for pex_read_output it is explicitly documented
> that PEX_LAST should *not* be used. Then, by analogy, it should
> not be used for pex_read_err.

Oh yeah.  OK.


+FILE *pex_read_err (struct pex_obj *obj, int binary)

Formatting is wrong here--pex_read_err should be on a new line by
itself (this one is part of the GNU coding standard).

OK with that change.

Thanks.

Ian


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