public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/36457]  New: preprocessing: option -idirafter undefined for fortran
@ 2008-06-07 15:45 dfranke at gcc dot gnu dot org
  2008-12-03 23:30 ` [Bug fortran/36457] " billingd at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2008-06-07 15:45 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/ml/fortran/2008-06/msg00048.html

For the sake of completeness, I want to flag that with recent snapshots of
GFortran, on CYGWIN, there are the following warnings, also with a simple
test-case:

$ cat hello.F95
program hello
  print *,'Hello World!'
end program hello

 $ gfortran hello.F95
 f951: warning: command line option "-idirafter" is valid for C/C++/ObjC/ObjC++
but not for Fortran


-- 
           Summary: preprocessing: option -idirafter undefined for fortran
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: dfranke at gcc dot gnu dot org
        ReportedBy: dfranke at gcc dot gnu dot org
  GCC host triplet: cygwin


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36457


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug fortran/36457] preprocessing: option -idirafter undefined for fortran
  2008-06-07 15:45 [Bug fortran/36457] New: preprocessing: option -idirafter undefined for fortran dfranke at gcc dot gnu dot org
@ 2008-12-03 23:30 ` billingd at gcc dot gnu dot org
  2008-12-04  0:27 ` billingd at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: billingd at gcc dot gnu dot org @ 2008-12-03 23:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from billingd at gcc dot gnu dot org  2008-12-03 23:28 -------
This is causing testsuite failures and should be fixed.  The -idirafter appears
to be coming from the cpp section in specs file, while the warning is generated
in gcc/opts.c.  I can see several possible approaches:

1. Prune the warning with dejagnu 
2. Modify the cygwin specs file so -idirafter is not used for .F or .F90 file
(or when called from gfortran)
3. Modify the code to somewhere

Thoughts?


-- 

billingd at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |billingd at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-12-03 23:28:45
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36457


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug fortran/36457] preprocessing: option -idirafter undefined for fortran
  2008-06-07 15:45 [Bug fortran/36457] New: preprocessing: option -idirafter undefined for fortran dfranke at gcc dot gnu dot org
  2008-12-03 23:30 ` [Bug fortran/36457] " billingd at gcc dot gnu dot org
@ 2008-12-04  0:27 ` billingd at gcc dot gnu dot org
  2008-12-04  7:08 ` burnus at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: billingd at gcc dot gnu dot org @ 2008-12-04  0:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from billingd at gcc dot gnu dot org  2008-12-04 00:25 -------
I can kill this warning if I invoke gfortran with -nostdinc.  I would have
expected this to be the default.  After all, why include C source code or
headers in a Fortran file.

I will test this patch then ask on fortran@ 

--- cpp.c       2008-11-21 16:37:52.000000000 +1100
+++ cpp.c.new   2008-12-04 11:13:09.000000000 +1100
@@ -294,7 +294,7 @@
   gfc_cpp_option.dump_includes = 0;
   gfc_cpp_option.working_directory = -1;
   gfc_cpp_option.no_predefined = 0;
-  gfc_cpp_option.standard_include_paths = 1;
+  gfc_cpp_option.standard_include_paths = 0;
   gfc_cpp_option.verbose = 0;

   gfc_cpp_option.multilib = NULL;


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36457


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug fortran/36457] preprocessing: option -idirafter undefined for fortran
  2008-06-07 15:45 [Bug fortran/36457] New: preprocessing: option -idirafter undefined for fortran dfranke at gcc dot gnu dot org
  2008-12-03 23:30 ` [Bug fortran/36457] " billingd at gcc dot gnu dot org
  2008-12-04  0:27 ` billingd at gcc dot gnu dot org
@ 2008-12-04  7:08 ` burnus at gcc dot gnu dot org
  2008-12-04  7:46 ` dfranke at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-12-04  7:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from burnus at gcc dot gnu dot org  2008-12-04 07:07 -------
> I can kill this warning if I invoke gfortran with -nostdinc.

But won't that break programs which use e.g. include "netcdf.inc" which is in
/usr/include/netcdf.inc ?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36457


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug fortran/36457] preprocessing: option -idirafter undefined for fortran
  2008-06-07 15:45 [Bug fortran/36457] New: preprocessing: option -idirafter undefined for fortran dfranke at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2008-12-04  7:08 ` burnus at gcc dot gnu dot org
@ 2008-12-04  7:46 ` dfranke at gcc dot gnu dot org
  2008-12-09 19:29 ` dfranke at gcc dot gnu dot org
  2008-12-09 19:41 ` dfranke at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2008-12-04  7:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from dfranke at gcc dot gnu dot org  2008-12-04 07:44 -------
> Thoughts?

Make it known to the fortran frontend. 
I, finally, might find time to get this done this weekend ...


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36457


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug fortran/36457] preprocessing: option -idirafter undefined for fortran
  2008-06-07 15:45 [Bug fortran/36457] New: preprocessing: option -idirafter undefined for fortran dfranke at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2008-12-04  7:46 ` dfranke at gcc dot gnu dot org
@ 2008-12-09 19:29 ` dfranke at gcc dot gnu dot org
  2008-12-09 19:41 ` dfranke at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2008-12-09 19:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from dfranke at gcc dot gnu dot org  2008-12-09 19:27 -------
Subject: Bug 36457

Author: dfranke
Date: Tue Dec  9 19:25:55 2008
New Revision: 142607

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142607
Log:
2008-12-09  Daniel Franke  <franke.daniel@gmail.com>

        PR fortran/36457
        * lang.opt: Added option idirafter.
        * cpp.h (gfc_cpp_add_include_path_after): New prototype.
        * cpp.c (gfc_cpp_handle_option): Recognize and handle OPT_dirafter.
        (gfc_cpp_add_include_path_after): New, adds user-defined search path
        after any other paths.
        * invoke.texi (idirafter): New.
        (no-range-check): Fixed entry in option-index.


Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/cpp.c
    trunk/gcc/fortran/cpp.h
    trunk/gcc/fortran/invoke.texi
    trunk/gcc/fortran/lang.opt


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36457


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug fortran/36457] preprocessing: option -idirafter undefined for fortran
  2008-06-07 15:45 [Bug fortran/36457] New: preprocessing: option -idirafter undefined for fortran dfranke at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2008-12-09 19:29 ` dfranke at gcc dot gnu dot org
@ 2008-12-09 19:41 ` dfranke at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2008-12-09 19:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from dfranke at gcc dot gnu dot org  2008-12-09 19:29 -------
Fixed in trunk. Closing.


-- 

dfranke at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36457


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-12-09 19:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-07 15:45 [Bug fortran/36457] New: preprocessing: option -idirafter undefined for fortran dfranke at gcc dot gnu dot org
2008-12-03 23:30 ` [Bug fortran/36457] " billingd at gcc dot gnu dot org
2008-12-04  0:27 ` billingd at gcc dot gnu dot org
2008-12-04  7:08 ` burnus at gcc dot gnu dot org
2008-12-04  7:46 ` dfranke at gcc dot gnu dot org
2008-12-09 19:29 ` dfranke at gcc dot gnu dot org
2008-12-09 19:41 ` dfranke at gcc dot gnu dot org

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).