Thanks for using Compiler Explorer
Jakt
C++
Ada
Analysis
Android Java
Android Kotlin
Assembly
C
C3
Carbon
C++ (Circle)
CIRCT
Clean
CMake
CMakeScript
COBOL
C++ for OpenCL
MLIR
Cppx
Cppx-Blue
Cppx-Gold
Cpp2-cppfront
Crystal
C#
CUDA C++
D
Dart
Elixir
Erlang
Fortran
F#
GLSL
Go
Haskell
HLSL
Hook
Hylo
IL
ispc
Java
Julia
Kotlin
LLVM IR
LLVM MIR
Modula-2
Nim
Objective-C
Objective-C++
OCaml
OpenCL C
Pascal
Pony
Python
Racket
Ruby
Rust
Snowball
Scala
Solidity
Spice
SPIR-V
Swift
LLVM TableGen
Toit
TypeScript Native
V
Vala
Visual Basic
WASM
Zig
Javascript
GIMPLE
Ygen
c source #1
Output
Compile to binary object
Link to binary
Execute the code
Intel asm syntax
Demangle identifiers
Verbose demangling
Filters
Unused labels
Library functions
Directives
Comments
Horizontal whitespace
Debug intrinsics
Compiler
AArch64 (Morello compiler)
Hybrid CHERI-MIPS
Hybrid CHERI-RISCV64
Hybrid Morello
MIPS (without CHERI)
Purecap CHERI-MIPS
Purecap CHERI-RISCV64
Purecap Morello
RISCV64 (without CHERI)
Options
Source code
#include <stdint.h> typedef intptr_t LONG_PTR; typedef void* HWND; extern LONG_PTR SetWindowLongPtrW( HWND hWnd, int nIndex, LONG_PTR dwNewLong ); extern HWND some_hwnd; long test1() { return SetWindowLongPtrW( some_hwnd, 1, 1234); } void* test2(int* data) { return (void*)SetWindowLongPtrW( some_hwnd, 1, (LONG_PTR)data); } long test3(int data) { return SetWindowLongPtrW( some_hwnd, 1, data); } intptr_t intptr_add(intptr_t a) { return a + 2; } intptr_t intptr_mul(intptr_t a) { return a * 2; }
Become a Patron
Sponsor on GitHub
Donate via PayPal
Source on GitHub
Mailing list
Installed libraries
Wiki
Report an issue
How it works
Contact the author
CE on Mastodon
About the author
Statistics
Changelog
Version tree