<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - comments to the right of an include not allowed"
href="https://bugs.llvm.org/show_bug.cgi?id=47466">47466</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>comments to the right of an include not allowed
</td>
</tr>
<tr>
<th>Product</th>
<td>flang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Frontend
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>naromero@anl.gov
</td>
</tr>
<tr>
<th>CC</th>
<td>David.Truby@arm.com, jperier@nvidia.com, kirankumartp@gmail.com, llvm-bugs@lists.llvm.org, sscalpone@nvidia.com
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=23939" name="attach_23939" title="Test include header file with comment">attachment 23939</a> <a href="attachment.cgi?id=23939&action=edit" title="Test include header file with comment">[details]</a></span>
Test include header file with comment
A comment to the right of include line is not supported by the Flang front-end.
#include "simpleheader.fh" ! Simple header
[naromero@naromero-desktop bugs]$
/nfs/gce/projects/naromero-workspace/llvm-master/bin/flang -c
testheadercomments.F
/nfs/gce/projects/naromero-workspace/llvm-master/bin/f18: could not scan
testheadercomments.F
testheadercomments.F:2:10: error: #include: expected name of file to include
#include "simpleheader.fh" ! Simple header
^^^^^^^^^^^^^^^^^
I am not sure if this is part of the Fortran language standard or not, but
ifort supports it without warnings. PGI and Gfortran support it, but issue a
warning.
[naromero@naromero-desktop bugs]$ pgfortran -c testheadercomments.F
PGF90-W-0951-Extraneous tokens ignored following # directive
(testheadercomments.F: 2)
GFortran
[naromero@naromero-desktop bugs]$ gfortran -c testheadercomments.F
testheadercomments.F:2:0:
#include "simpleheader.fh" ! Simple header
Warning: extra tokens at end of #include directive
I am not sure if this is part of the Fortran standard or not.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>