public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/55534] -Wno-missing-include-dirs does not work with gfortran
Date: Mon, 29 Dec 2014 21:28:00 -0000	[thread overview]
Message-ID: <bug-55534-4-3eKbrfoMym@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-55534-4@http.gcc.gnu.org/bugzilla/>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 4599 bytes --]

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55534

--- Comment #10 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Harald Anlauf from comment #9)
> (In reply to Manuel López-Ibáñez from comment #8)
> > (In reply to Manuel López-Ibáñez from comment #7)
> > > The ideal fix for this would adding a function like:
> > 
> > I forgot about this bug and redid the above from scratch. But this time, I
> > actually tested that it works:
> > https://gcc.gnu.org/ml/fortran/2014-10/msg00019.html
> 
> Has this patch been applied?

An equivalent one has. The remaining problem (I think) is that the warning is
given when -I is processed, so the order of -I and -Wno-missing-include-dirs
matters. In your example, the order should be correct, but the driver
unhelpfully re-orders the command-line as:

f951 xxx.f90 -I /no/such/dir -quiet -dumpbase xxx.f90 "-mtune=generic"
"-march=x86-64" -auxbase xxx -Wno-missing-include-dirs -fintrinsic-modules-path
finclude -o /tmp/ccwz8Va5.s

If I invoke f951 manually, it works:

f951 -Wno-missing-include-dirs ~/xxx.f90 -I /no/such/dir
-Wno-missing-include-dirs

However, if I invoke it like this it doesn't work:

f951 -Wno-missing-include-dirs ~/xxx.f90 -I /no/such/dir
-Wno-missing-include-dirs

because prune_options removes duplicated options by keeping the last one.

Thus, the fix is either to buffer the arguments to -I and process them after
all options have been processed or move just the warning code to such a latter
phase. I'm not sure what is simpler.

This is what the C/C++ FE does (see incpath.c add_path, which is called when -I
is processed and c-opts.c register_include_chains, which is called after
options processing and gives the diagnostics).

Note that this applies to all warnings given by add_path_to_list, since ideally
they should be disabled by "--no-warnings" (aka -w), but currently it depends
on the order they are given.
>From gcc-bugs-return-471907-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Dec 29 21:42:44 2014
Return-Path: <gcc-bugs-return-471907-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 7007 invoked by alias); 29 Dec 2014 21:42:43 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 6996 invoked by uid 89); 29 Dec 2014 21:42:43 -0000
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=4.0 required=5.0 testsºYES_99,BAYES_999,FILL_THIS_FORM_FRAUD_PHISH,RCVD_IN_DNSWL_NONE,SPF_FAIL,T_FILL_THIS_FORM_SHORT autolearn=no version=3.3.2
X-HELO: sg2nlvphout03.shr.prod.sin2.secureserver.net
Received: from sg2nlvphout03.shr.prod.sin2.secureserver.net (HELO sg2nlvphout03.shr.prod.sin2.secureserver.net) (182.50.132.197) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 29 Dec 2014 21:42:42 +0000
Received: from vedaserver ([118.139.182.196])	by sg2nlvphout03.shr.prod.sin2.secureserver.net with : DED :	id ZZid1p02J4Ef9Kq01ZieEW; Mon, 29 Dec 2014 14:42:38 -0700
MIME-Version: 1.0
From: "Anushka ISMS" <anushka@ismsedu.com>
Reply-To: anushka@ismsedu.com
To: gcc-bugs@gcc.gnu.org
Subject: Opportunity Never Wait for Anybody : New Session Announcement For Distance Learning Courses
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable
Date: Mon, 29 Dec 2014 21:42:00 -0000
Message-ID: <2164207878536797320837@vedaserver>
X-SW-Source: 2014-12/txt/msg02914.txt.bz2
Content-length: 767

Get MBA, E-MBA , MMS, DMS, PGDBM ,DBM etc done without disturbing your job... Any Certificate NO Donation / Percentage Barrier

International Attestations by Ministry of External Affairs and Foreign Affairs (Charges apply*)

GIVE US AN OPPORTUNITY TO MAKE YOUR CAREER:

Please reply to this mail providing following details to obtain detail information about our Institute, Course, Exams etc.

Name:

Contact No.:

Email id :

Course of Interest:

Specialization:

Query:

Qualifications & Work Experience :

Address Details:

When you're ready to make the time, my help is just a phone call or e-mail away.

With your success in mind,

For ISMS

Indian School of Management & Studies,

Anushka ISMS

Email :- anushka@ismsedu.com

Website :- www.ismsedu.com


  parent reply	other threads:[~2014-12-29 21:28 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-29 20:31 [Bug fortran/55534] New: " anlauf at gmx dot de
2012-11-29 20:32 ` [Bug fortran/55534] " anlauf at gmx dot de
2012-12-04 23:02 ` anlauf at gmx dot de
2012-12-05  9:29 ` burnus at gcc dot gnu.org
2012-12-05 21:44 ` anlauf at gmx dot de
2012-12-06  0:04 ` burnus at gcc dot gnu.org
2012-12-07 21:10 ` anlauf at gmx dot de
2012-12-13 21:11 ` anlauf at gmx dot de
2014-09-09 21:39 ` manu at gcc dot gnu.org
2014-12-29 20:00 ` anlauf at gmx dot de
2014-12-29 21:28 ` manu at gcc dot gnu.org [this message]
2021-09-17  9:42 ` burnus at gcc dot gnu.org
2021-09-17 13:02 ` burnus at gcc dot gnu.org
2021-09-21  6:28 ` cvs-commit at gcc dot gnu.org
2021-09-21  7:13 ` burnus at gcc dot gnu.org
2021-09-22 18:58 ` cvs-commit at gcc dot gnu.org
2021-09-24  7:31 ` cvs-commit at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-55534-4-3eKbrfoMym@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).