- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Consider the following directory tree:
test.F90
b.inc
test/
├─ a.inc
└─ b.inc
With the following contents:
- `test.F90`:
#include "test/a.inc"
end
- `test/a.inc`:
#include "test/b.inc"
#include "b.inc"
#include "b.inc"
- `test/b.inc`:
print*,"Hello from test/b.inc"
- `b.inc`:
print*,"Hello from b.inc"
A similar example was already discussed here. Running the compiled code with the Intel compiler (ifort 2021.8.0 and ifx 2023.0.0 on Ubuntu 18.04.2 LTS) without any flags leads to the following output:
Hello from test/b.inc
Hello from test/b.inc
Hello from test/b.inc
After the first `#include "test/b.inc"` in `a.inc` the directory is "changed" to `test` for some reason and only `test/b.inc` is included in all consequent `#include` statements.
Is it the intended behavior of the preprocessor? Or is it a bug?
1 Solução
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
This fpp issue is fixed in the compiler versions released this week as part of 2024.0.
@V-T, please try the new compiler.
Link copiado
- « Anterior
-
- 1
- 2
- Próximo »
21 Respostas
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado

Responder
Opções do tópico
- Subscrever fonte RSS
- Marcar tópico como novo
- Marcar tópico como lido
- Flutuar este Tópico para o utilizador atual
- Marcador
- Subscrever
- Página amigável para impressora
- « Anterior
-
- 1
- 2
- Próximo »