Experience shows that not directly recognizing .h files as C files is unexpected and should be fixed.
Comment #1 by destructionator — 2022-11-13T01:31:34Z
What's your plan for things like #include "foo.h" vs #include <foo.h> ? I expect people are more interested in the <stdio.h> than the "stdio.h" variety.
But what about #include<dir/file.h> ?
Comment #2 by bugzilla — 2022-11-13T02:23:16Z
There's no plan for distinguishing between <foo.h> and "foo.h". The only difference between them, anyway, is <foo.h> does not look in the default directory first.
import dir.file;
Comment #3 by dlang-bot — 2022-11-13T03:44:26Z
@WalterBright created dlang/dmd pull request #14636 "fix Issue 23479 - ImportC recognizes .i and .c files, but not .h files" fixing this issue:
- fix Issue 23479 - ImportC recognizes .i and .c files, but not .h files
https://github.com/dlang/dmd/pull/14636
Comment #4 by dlang-bot — 2022-11-13T09:37:16Z
dlang/dmd pull request #14636 "fix Issue 23479 - ImportC recognizes .i and .c files, but not .h files" was merged into master:
- 8114448e6b4ffe684728463fc2f3fae54a2cfe57 by Walter Bright:
fix Issue 23479 - ImportC recognizes .i and .c files, but not .h files
https://github.com/dlang/dmd/pull/14636
Comment #5 by john.michael.hall — 2022-11-13T17:32:22Z
(In reply to Walter Bright from comment #2)
> There's no plan for distinguishing between <foo.h> and "foo.h". The only
> difference between them, anyway, is <foo.h> does not look in the default
> directory first.
>
> import dir.file;
I understand that is generally true, but ultimately implementation defined where both of them look, at least according to stack overflow:
https://stackoverflow.com/a/3162067
The other difference is that <foo.h> looks for a header and "foo.h" looks for a file. Apparently a header doesn't need to be a file. But I'm not enough of a C expert to know if that matters.
Comment #6 by dlang-bot — 2022-12-10T22:50:12Z
dlang/dmd pull request #14682 "Revert "fix Issue 23479 - ImportC recognizes .i and .c files, but not .h files"" was merged into master:
- 1bb9184f98bbc0d1862c2ac1a78b0a627b60195c by Iain Buclaw:
Revert "fix Issue 23479 - ImportC recognizes .i and .c files, but not .h files (#14636)"
This reverts commit 94d589fd5460851ebd5af334b677b4522fb57918.
https://github.com/dlang/dmd/pull/14682
@ibuclaw created dlang/dmd pull request #14864 "reapply fix Issue 23479 - ImportC recognizes .i and .c files, but not .h files" mentioning this issue:
- reapply fix Issue 23479 - ImportC recognizes .i and .c files, but not .h files
https://github.com/dlang/dmd/pull/14864
Comment #9 by dlang-bot — 2023-02-09T12:02:39Z
dlang/dmd pull request #14864 "reapply fix Issue 23479 - ImportC recognizes .i and .c files, but not .h files" was merged into master:
- 93383180917dc790f3ef8f878126cd70e2b3808b by Iain Buclaw:
reapply fix Issue 23479 - ImportC recognizes .i and .c files, but not .h files
https://github.com/dlang/dmd/pull/14864
Comment #10 by dlang-bot — 2023-02-13T23:14:44Z
dlang/dmd pull request #14870 "Revert "reapply fix Issue 23479 - ImportC recognizes .i and .c files, but not .h files"" was merged into master:
- 96a1664f9ee339edddd0e8e9142adb61f715fe13 by Walter Bright:
Revert "reapply fix Issue 23479 - ImportC recognizes .i and .c files, but not .h files"
This reverts commit 650b75b7c19a3e9fd8c8645ac538f8e08bedc733.
https://github.com/dlang/dmd/pull/14870
Comment #11 by robert.schadek — 2024-12-13T19:25:39Z