Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

GCC

$ gcc Foundation Low Risk
GNU · Code & DevOps · GPL-3.0-or-later · macos / linux / windows

The foundational GNU compiler driver supporting C, C++, and multi-target optimization. Modern GCC releases include -fdiagnostics-format=json and -fsyntax-only for non-destructive type and syntax checks, though its massive flag matrix and stderr output require careful agent discipline.

FCRS-1.0 Score
78 /100
Good
Medium Confidence
Zero-Friction Install
brew install gcc
CLI vs MCP Decision CLI Only

Local native compiler toolchain; agents invoke gcc directly or via build systems like CMake and Make.

Agent-Readiness Checklist

Local Probe Evidence
✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
✓ NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md
Version
—
Startup
3001 ms
Exit Codes (help / invalid)
— / —
NO_COLOR Clean / Non-TTY Safe
Yes / Hung

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 16 / 25

Modern GCC supports -fdiagnostics-format=json and -fdiagnostics-color=never, but legacy defaults emit dense multi-line stderr text and hundreds of target flags.

  • Supports -fdiagnostics-format=json (GCC 10+) and -fsyntax-only
  • No built-in --jq or subcommand discovery
Trust & Safety 20 / 25

Runs locally with zero network/auth side effects and supports -fsyntax-only, though -o overwrites target paths silently.

  • Local filesystem execution with -fsyntax-only read-only mode
Setup & Portability 13 / 15

Standard on Linux and available via Homebrew (gcc-14) or MinGW-w64 on Windows, though macOS /usr/bin/gcc points to Apple Clang.

  • Preinstalled on most Linux distros; Homebrew formula installs versioned binary on macOS
Utility & Efficiency 13 / 15

Industry-standard optimizing compiler for C, C++, and Fortran, usually orchestrated via CMake/Make.

  • Core system compiler across Linux and embedded toolchains
Maintenance & Lineage 9 / 10

Maintained by the GNU Project with decades of production stability and annual major releases.

  • Official GNU Compiler Collection
Docs & Verifiability 7 / 10

Exhaustive official manuals exist, though --help is split across --help=common, --help=warnings, and man pages.

  • Comprehensive online docs at gcc.gnu.org/onlinedocs

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

No credentials required; operates strictly on local source files and toolchain include/library paths.

Side Effects
Read-Only Local Write
Cost & Quotas

GPL-3.0-or-later free software toolchain.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# GCC (gcc) Agent Rules
- Prefer `-fsyntax-only -fdiagnostics-color=never` when validating edits before linking.
- On macOS, check `gcc --version` first because `/usr/bin/gcc` aliases Apple Clang rather than GNU GCC (`gcc-14`).

Agent-Ready Command Recipes

Safe Read-Only Queries

Syntax-check a C file with JSON diagnostics
gcc -fsyntax-only -fdiagnostics-format=json -fdiagnostics-color=never -Wall main.c

Validates syntax and types without writing object files, emitting JSON diagnostics.

Inspect target machine and version configuration
gcc -v --version

Prints exact compiler target triple, thread model, and configured build options.

Controlled Writes & Previews

Compile with warnings as errors to an explicit output
gcc -O2 -Wall -Wextra -Werror -fdiagnostics-color=never main.c -o build/app

Compiles main.c deterministically to build/app while failing on any compiler warning.

Strengths for Agents

  • + -fsyntax-only and -fdiagnostics-format=json allow fast, structured pre-link checks.
  • + Zero authentication or network access needed for local builds.

Caveats & Pitfalls

  • ! On macOS, gcc is typically an Apple Clang shim unless a versioned Homebrew binary like gcc-14 is invoked.
  • ! Huge flag surface and verbose linker errors can consume context tokens when -fdiagnostics-format=json is omitted or unsupported on older releases.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI