https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55534 --- Comment #10 from Manuel López-Ibáñez --- (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: 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: List-Archive: List-Post: List-Help: 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" 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