Bug 386788 - Free form not processing include files
Summary: Free form not processing include files
Status: NEW
Alias: None
Product: PTP
Classification: Tools
Component: Photran.Parser (show other bugs)
Version: 8.0.1   Edit
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Photran Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-07 18:20 EDT by Greg Watson CLA
Modified: 2012-08-08 09:13 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Greg Watson CLA 2012-08-07 18:20:28 EDT
The Free Form - C Preprocessed source form does not process include files correctly.

Repeat by:

1. Create a Fortran project.

2. Create a file test.F90 containing:

subroutine test
    implicit none
    interface
#include test.h
    end interface
end subroutine test

3. Create a file test.h containing:

subroutine foo
end subroutine

4. Add the project path to Paths and Symbols in the Fortran General properties.

5. Open test.F90. A syntax error is displayed in the outline view.
Comment 1 Jeffrey Overbey CLA 2012-08-07 20:04:32 EDT
The syntax for the #include line should be

#include "test.h"

(with double-quotes).  Does that fix the problem?
Comment 2 Greg Watson CLA 2012-08-08 09:13:46 EDT
It does fix this problem (typo on my part), but to better reflect the problem I'm seeing, do the following:

1. Create a subdirectory in the project
2. Move test.h to the subdirectory
3. Add the subdirectory path to the Paths and Symbols as a workspace path

At this point, the syntax error is displayed again. However, if I add the sub-directory path to Paths and Symbols as a filesystem path, it seems to resolve correctly. It looks like workspace paths are not being handled correctly.