c and c++

Developing across C and C++ requires managing ABI/linkage and mixed-language builds (extern "C"), handling headers and linkage, using C idioms alongside C++ features (STL, templates, RAII), and configuring cross-compiler toolchains and build systems such as CMake for interoperable binaries.

candc++

12-Month Skill Trend

Momentum and market value over time
Trending
Score
+20 in 12 mo
96
12 mo agoNow
Career
Value
+$12K in 12 mo
$42K/year
12 mo agoNow

Recommended Survey Paper

Quick overview of the field
View more

Must-Read Papers

Most classic and influential ideas
View more

Analyzing C/C++ Library Migrations at the Package-level: Prevalence, Domains, Targets and Rationals across Seven Package Management Tools

Jul 03, 2025
HG
Haiqiao Gu
🏛️ Peking University | University of Science and Technology Beijing

Prior research on library migration has largely overlooked C/C++, leaving a critical gap in understanding its ecosystem’s evolution. Method: We construct the first large-scale, multi-source C/C++ library migration dataset, encompassing 19,943 projects across seven package managers, and conduct an empirical analysis integrating dependency graphs, commit histories, and issue trackers to systematically characterize migration behaviors, domains, and motivations—comparing findings against Python, JavaScript, and Java. Contribution/Results: We find C/C++ migrations concentrate in GUI, build-system, and OS development; 83.46% of source libraries map deterministically to a single target library; and unique drivers include reducing compilation time and unifying dependency management. Crucially, C/C++ migration patterns diverge significantly from dynamic languages (e.g., JS/Python) and Java—especially in domain distribution—demonstrating the dataset’s utility for developing specialized migration recommendation tools.

Analyzing C/C++ library migrations across package management toolsComparing C/C++ migration trends with Python, JavaScript, and JavaInvestigating prevalence, domains, and rationale of C/C++ migrations

CXXCrafter: An LLM-Based Agent for Automated C/C++ Open Source Software Building

May 27, 2025
ZY
Zhengmin Yu
🏛️ Fudan University | Huazhong University of Science and Technology

Automated build automation for C/C++ open-source projects faces core challenges including intricate dependency graphs, heterogeneous build systems (e.g., Make, CMake, Autotools, Bazel), diverse toolchains, and poor error resilience—areas where existing approaches offer limited support. To address these, we propose the first large language model (LLM)-based dynamic interactive build agent framework. It enables end-to-end adaptive build repair via implicit knowledge reasoning and closed-loop environmental feedback. We design a unified abstraction layer to support multiple build systems and integrate context-aware error diagnosis, intelligent retry mechanisms, and recovery strategies grounded in real-time build-state awareness. Evaluated on standard open-source benchmarks, our framework achieves a 78% build success rate; on the Top100 dataset, it outperforms manual builds on three projects and significantly improves overall build coverage. This work establishes a scalable, LLM-driven paradigm for C/C++ ecosystem build automation.

Automating C/C++ project building is complex due to dependencies and errorsExisting methods struggle with diverse build systems and toolchainsLLM-based agents can dynamically resolve build issues and dependencies

Experience converting a large mathematical software package written in C++ to C++20 modules

Jun 26, 2025
WB
Wolfgang Bangerth
🏛️ Colorado State University

To address compilation redundancy, fragile dependencies, and inefficient builds caused by traditional C++ header-based interfaces in large-scale mathematical software, this paper proposes the first progressive C++20 module migration framework tailored for ultra-large scientific computing libraries—exemplified by deal.II (800K lines of code). Methodologically, we design a dual-mode (header/module) coexistence interface, customize the CMake build system, and develop a systematic compilation performance analysis toolchain. Our key contributions are: (1) a fine-grained, backward-compatible module partitioning strategy; (2) empirical validation that modularization reduces the library’s own compilation time by 37% on average, while downstream project compilation overhead shows no statistically significant change; and (3) the first established technical pathway and collaborative paradigm for scaling C++ modules across the scientific computing ecosystem.

Addressing clunky header-file interfaces in C++Converting large C++ math software to C++20 modulesEnsuring compatibility between header and module systems

Traditional compiler-based translation requires building a dedicated translator for each language pair, leading to exponential growth in complexity. This work proposes CrossGL—a unified intermediate representation (IR) supporting multi-paradigm semantic expression—and a modular, bidirectional translation system enabling efficient conversion among GPU compute languages including CUDA, HIP, and Metal. The pipeline performs lexical and syntactic analysis to generate an abstract syntax tree (AST), then employs a ToCrossGLConverter for frontend lowering and CodeGen for backend emission, integrating tools such as Slang into a complete compilation flow. CrossGL drastically reduces the engineering overhead of onboarding new languages and enables “write once, deploy anywhere” across heterogeneous GPU platforms. Experimental evaluation confirms successful compilation and correct execution across all supported backends in GPU computing, graphics rendering, and systems programming scenarios, advancing language-agnostic programming.

Bidirectional translation between multiple programming languagesEliminating exponential complexity of pairwise translatorsUnified intermediate representation for cross-language compatibility

This work addresses the challenge of manually repairing implicit data loss compiler warnings in industrial-scale C++ projects by proposing an automated approach based on large language models (LLMs). The method leverages the Language Server Protocol and Tree-sitter to precisely extract code context, enabling intelligent decisions on whether range checks are necessary and generating performance-conscious repair code. As the first study to apply LLMs to this specific problem, the system achieves a 92.73% human-review acceptance rate on real-world projects, reduces auxiliary instruction overhead by 39.09% compared to baseline methods, and produces fixes whose runtime performance closely approximates that of optimal human-written solutions—differing by only 13.56%.

C++code repaircompiler warnings

Latest Papers

What's happening recently
View more

Exploringand Unleashing the Power of Large Language Models in CI/CD Configuration Translation

Nov 03, 2025
JW
Jiajun Wu
🏛️ Soochow University | Nanyang Technological University | University of Shanghai for Science and Technology

This work addresses the challenge of automated configuration migration across CI platforms—particularly from Travis CI to GitHub Actions—where manual translation is error-prone and labor-intensive. We propose an LLM-based translation framework grounded in empirical analysis of 811 real-world migration cases, enabling the first quantitative characterization of configuration conversion effort. We introduce a four-category taxonomy of translation problems and identify recurring developer pain points. Methodologically, we design a composite prompting strategy integrating documentation-guided instruction, iterative refinement, and in-context learning to enhance LLM robustness and fidelity. Evaluation on GPT-4o shows our approach achieves 75.5% end-to-end build success rate—nearly tripling the performance of baseline prompting—while substantially reducing manual intervention. The framework provides a reproducible, quantitatively evaluable pathway for intelligent CI/CD configuration migration.

Addressing semantic differences in CI migration processesImproving accuracy of automated CI configuration translationTranslating CI configurations between different platforms

This work addresses the unreliability of disassembly caused by the absence of compiler-intended semantic information in stripped binary executables. To overcome this limitation, the authors propose a novel lightweight metadata embedding mechanism that explicitly encodes critical semantics—such as code regions and memory boundaries—directly into the binary. This approach yields a decidable intermediate representation situated between raw binaries and source code. For the first time, it enables disassembly that is both decidable and recompilable, facilitating precise lifting to high-level intermediate representations. Experimental evaluation demonstrates that the embedded metadata incurs only 17% of the size overhead of DWARF debug information, introduces no runtime performance penalty, and successfully supports behavior-preserving binary lifting, instrumentation, and recompilation across a wide range of real-world C/C++ programs.

binary formatcompilation metadatadisassembly

Existing patch transplantation methods struggle to address implicit inconsistencies across code repositories—such as branches and forks—due to their reliance on global code semantics rather than local context. This work proposes MIP, the first framework to systematically tackle this challenge by synergistically integrating large language models, compiler diagnostics, and static analysis. MIP dynamically selects between compiler feedback–driven repair or cross-repository semantic matching, depending on whether source identifiers are present in the target code, thereby enabling automatic resolution of implicit inconsistencies. Experimental results demonstrate that MIP successfully transplants more than twice as many patches as the best-performing baseline in both cross-branch and cross-fork scenarios, with its practical efficacy further validated through an industrial user study.

codebase variantsglobal mapping knowledgeimplicit inconsistencies

Cross-ISA program execution faces two fundamental challenges: poor performance of dynamic binary translation (DBT) and the infeasibility of full cross-compilation. This paper proposes a hybrid execution system that synergistically integrates compilation and simulation—departing from conventional all-translation or pure-simulation paradigms—by introducing a fine-grained, function-level offloading mechanism. Leveraging LLVM-based static analysis, the system automatically identifies offloadable functions; it then employs a customized QEMU-based inter-ISA calling interface and a lightweight runtime coordination protocol to enable efficient heterogeneous execution. The core innovations are automated, low-overhead function-level offloading decisions and robust cross-architecture function invocation support. Experimental evaluation demonstrates up to 13× speedup over state-of-the-art DBT systems, significantly reducing translation overhead while maintaining broad applicability and practical deployability.

Accelerates dynamic binary translation via hybrid compilation-emulationEnables selective function offloading to reduce emulation overheadOvercomes all-or-nothing cross-compilation limitations for diverse ISAs

ATLAS: Automated Tree-based Language Analysis System for C and C++ source programs

Dec 13, 2025
JM
Jaid Monwar Chowdhury
🏛️ Bangladesh University of Engineering and Technology

Static analysis of C/C++ programs faces significant challenges due to pointer aliasing, multi-level indirection, function pointers, and type ambiguity induced by `typedef`. To address these, this paper proposes an end-to-end, compiler-agnostic, interprocedural, type-aware static analysis system. Methodologically, it leverages Clang LibTooling to construct a unified multi-view intermediate representation—integrating AST, CFG, and DFG—and introduces custom CFG/DFG construction algorithms alongside an alias-aware type inference module, enabling the first interprocedural, type-sensitive data-flow modeling. Contributions include: (1) statement-level control-flow and type-aware data-flow graph generation for uncompiled code; (2) empirical validation on real-world open-source projects demonstrating high-fidelity modeling of complex semantic dependencies; and (3) provision of interpretable, structurally enriched input representations for downstream software engineering tasks such as vulnerability detection and code completion.

Generates control and data flow graphs for C/C++ programsHandles compilable and non-compilable multi-file C/C++ projectsProduces unified multi-view code representations for program analysis

Hot Scholars

CW

Chengpeng Wang

Purdue University
AI for CodeProgram AnalysisSoftware Engineering
XL

Xuwei Liu

Purdue University
Software EngineeringProgramming Language
MZ

Mingwei Zheng

Purdue University
Large Language ModelsSoftware Engineering