Comments (3)
A proposed fix: #4631
from ldc.
If a D function has pragma(inline, true) applied to it, or a C function is inline
Ideally, we'd be able to discriminate these 2 cases, and error out properly for an invalid pragma(inline, true)
(upstream, in the frontend directly). But if importC translates inline
to the same AST representation, then that's firstly not really correct, but probably works in most cases, and so I agree that we should just ignore it.
There's a Dsymbol::isCsymbol()
method that we could use to restrict this 'hack' to functions in C files only.
from ldc.
If a D function has pragma(inline, true) applied to it, or a C function is inline
Ideally, we'd be able to discriminate these 2 cases, and error out properly for an invalid
pragma(inline, true)
(upstream, in the frontend directly). But if importC translatesinline
to the same AST representation, then that's firstly not really correct, but probably works in most cases, and so I agree that we should just ignore it.There's a
Dsymbol::isCsymbol()
method that we could use to restrict this 'hack' to functions in C files only.
Mhm, ImportC just sets FuncDeclaration.inlining
to PINLINE.always
for inline
functions (though it doesn't emit a PragmaDeclaration
).
I've changed #4631 to ignore always-inline when DMD-style inline assembly is present only for C functions.
from ldc.
Related Issues (20)
- `--x86-asm-syntax=intel` option not documented HOT 2
- Memory sanitizer doesn't appear to be compiled with -fPIC on linux HOT 1
- LDC 1.38.0 crash on default parameter with `new` HOT 2
- WebAssembly: doesn't support emscripten data layout HOT 1
- lit test broken for Python >= 3.12 HOT 2
- core.stdc.stdlib.d is missing some type definitions for wasm32-unknown-unknown-wasm target HOT 5
- Memory leak in rt.minfo according to ASAN HOT 3
- Time trace large amounts of time spent in writing of files HOT 8
- stat_t has wrong size for Android armv7a HOT 2
- Struct with constructor in member returned using pointer on Windows x64 HOT 1
- Segmentation fault: ldc2 compiled tinyscheme-1.42 (DMD works fine) HOT 1
- No error when using params in @naked functions HOT 4
- Shadowed static assert error in the compiler output HOT 8
- musl libc requires `-link-defaultlib-debug -frame-pointer=all` to show line information in backtrace
- Support CMAKE_INSTALL_LIBDIR ? HOT 1
- LLVM ERROR when cross-compiling to arm64 with -g -flto HOT 1
- Reduce output of `ldc2 --version`
- `core.atomic.atomicStore` and `core.atomic.atomicLoad` calls itself recursively HOT 4
- ldc expects shared libraries even thought explicitly asks for a static build HOT 2
- remove or de-UB --release from the CLI HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ldc.