http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55919
Bug #: 55919
Summary: [4.8 Regression] Bogus warning with -J directory/
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P3
Component: fortran
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Found at
https://groups.google.com/d/topic/comp.lang.fortran/G6XGIE-lwuk/discussion
The following code in scanner.c's add_path_to_list triggers a bogus warning
under Windows, if a dirname ends in a '/' or a '\\':
if (stat (p, &st))
{
if (errno != ENOENT)
gfc_warning_now ("Include directory \"%s\": %s", path,
xstrerror(errno));
else
{
/* FIXME: Also support -Wmissing-include-dirs. */
if (warn)
gfc_warning_now ("Nonexistent include directory \"%s\"", path);
}
Note that the macro IS_DIR_SEPARATOR can be used to check for / and \.
By the way, one should take the opportunity and add support for
Wmissing-include-dirs. Cf. PR 55534.