This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, fortran] PR 53379 Backtrace on error termination
- From: David Edelsohn <dje dot gcc at gmail dot com>
- To: Ian Lance Taylor <ian at airs dot com>
- Cc: Mike Stump <mikestump at comcast dot net>, FX <fxcoudert at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Fortran List <fortran at gcc dot gnu dot org>, Janne Blomqvist <blomqvist dot janne at gmail dot com>
- Date: Wed, 9 Sep 2015 08:29:08 -0400
- Subject: Re: [PATCH, fortran] PR 53379 Backtrace on error termination
- Authentication-results: sourceware.org; auth=none
- References: <CAGWvnymArrXV9uWhkLBow6Di8_WaZP_w3fO-kf3cwbg6nWr8=A at mail dot gmail dot com> <5474EA6F-E6C0-4FA0-B299-C0D9558D6ACB at gmail dot com> <CAGWvny==F7BJ3SfiJQzaUcL3E0nvjOSe+LmRSkLYyhBUc_Lcsg at mail dot gmail dot com> <CAGWvnynRJVQUrpJfBvjkiF_vx2HQY01uOZNQvEP2kVqbtc=rMw at mail dot gmail dot com> <9A070869-B851-4D20-A4E3-3D4D9746A6E3 at gmail dot com> <CAGWvnynCSzSfJensW4g2yoipF9U4Vxmwrh9Wd84713=Qt180kA at mail dot gmail dot com> <91FF19E4-8EA4-49D9-8103-94C4E7969C3E at comcast dot net> <m3a8swut74 dot fsf at pepe dot airs dot com>
On Wed, Sep 9, 2015 at 12:12 AM, Ian Lance Taylor <ian@airs.com> wrote:
> Mike Stump <mikestump@comcast.net> writes:
>
>> Not a big issue, but slightly better if (O_CLOEXEC>>32) != 0 is also
>> true. See, if AIX should ever define this to a sensible value, the
>> above would disappear the feature. However, if they did, then this
>> expression should then be false.
>
> Yes, I think this might be even better in code. How about something
> like
>
> /* On some versions of AIX O_CLOEXEC does not fit in int, so use a
> cast to force it. */
> descriptor = open (filename, (int) (O_RDONLY | O_BINARY | O_CLOEXEC));
>
> Does that work on AIX?
Yes, that approach also fixes the warning and the build failure.
Thanks, David