<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 - `#pragma once` doesn't work in a ciopfs mount if the header is included through two different cases"
   href="https://bugs.llvm.org/show_bug.cgi?id=34931">34931</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>`#pragma once` doesn't work in a ciopfs mount if the header is included through two different cases
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </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>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>nicolasweber@gmx.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>$ mkdir icase icase.cp
$ ciopfs icase.cp/ icase
$ cat icase/File.h 
#pragma once
struct S {};
$ cat test.cc
#include "file.h"
#include "File.h"
$ third_party/llvm-build/Release+Asserts/bin/clang -c test.cc -I icase
In file included from test.cc:2:
icase/File.h:3:8: error: redefinition of 'S'
struct S {};
       ^
icase/file.h:3:8: note: previous definition is here
struct S {};
       ^
1 error generated.


This shouldn't error out.


It works fine with a real FAT mount:

$ fallocate -l 10m icase.disk
$ mkfs.vfat icase.disk 
mkfs.fat 3.0.26 (2014-03-07)
$ mkdir icase.fat
$ sudo mount icase.disk icase.fat -t vfat -o loop,owner,group,umask=000
[sudo] password for thakis: 
$ cp icase/File.h icase.fat/
$ cat icase.fat/File.h 
#pragma once
struct S {};
$ third_party/llvm-build/Release+Asserts/bin/clang -c test.cc -I icase.fat
test.cc:1:10: warning: non-portable path to file '"File.h"'; specified path
differs in case from file name on disk [-Wnonportable-include-path]
#include "file.h"
         ^~~~~~~~
         "File.h"
1 warning generated.



It'd be cool if this worked with ciopfs too, since that doesn't need root to
use.</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>