Tag
一篇博客深入逆向分析 macOS 上的 `gcc` 二进制文件,揭示它并非简单的 clang 别名,而是通过 libxcselect 的 xcselect_invoke_xcrun() 调用 xcrun 来转发到真实的开发者工具。
作者分享了在 C23 标准下采用的三种现代 C 编码约定,包括使用 [[nodiscard]] 与 [[maybe_unused]] 处理未使用返回值、C23 中 union 初始化行为的变化,以及借助 auto 简化代码的新模式。
一篇技术博客文章,列举了标准 C 与 gcc/clang + glibc/musl 实际行为之间的多种不兼容之处,包括 asm 关键字、FLT_ROUNDS、标准 pragma 未实现以及 initstate 错误处理等问题。
C++ Insights is an open-source Clang-based tool that performs C++ source-to-source transformation, revealing compiler-provided magic such as special member functions, lambdas, range-based for-loops, and structured bindings. It helps developers and educators see code through the compiler's eyes, with a hosted online version available.
The article describes how switching a BPF program to use BTF-generated vmlinux.h caused incorrect IP checksums due to Clang's Type-Based Alias Analysis optimization, and details the debugging process through assembly inspection.
A LWN comment discusses the relatively recent implementation of tail-call optimization in C compilers, citing historical limitations and noting that modern GCC and Clang now support it, with potential benefits for interpreter implementations.
A blog post examines an ambiguity in the C89 standard about implicit function declarations, where GCC and Clang disagree on interpretation, leading to different compile results for certain code.
This blog post explores parsing ambiguities in C23 involving `auto` as a type inference specifier or storage-class specifier, showing how GCC and Clang disagree on parsing declarations like `auto x = 67;` when `x` is a typedef, and how attributes complicate the situation.
The article delves into the cycle decomposition algorithm used in clang's libcxx for rotation, explaining how it achieves the minimum number of swaps by computing the greatest common divisor (gcd) to determine the number of cycles.
This article discusses the practical challenges of writing portable C code due to reliance on non-standard compiler extensions and glibc's conditional headers, illustrating with examples from building a C compiler.
ACAV is an interactive Abstract Syntax Tree visualization tool for C, C++, and Objective-C, built with Clang and Qt, that allows developers to explore ASTs from real codebases using compilation databases.
Matt Godbolt explores compiler optimizations that convert an O(n) summation loop into an O(1) closed-form solution, highlighting how Clang and GCC employ sophisticated techniques like loop unrolling and mathematical simplification to dramatically improve code performance.
This repository hosts the LLVM compiler infrastructure, a modular toolkit for building highly optimized compilers, optimizers, and runtimes, alongside related components including the Clang frontend, libc++ standard library, and LLD linker.