Re: [RFC TREE-WIDE] gcc: stop using 'int' to represent sets of qualifiers

Project / Subsystem

gcc / gcc

Date

2026-06-30

Proposer

Joseph Myers <josmyers@redhat.com>

Source type

public_inbox

Consensus

Proposed

Sentiment

/10

Technical tradeoffs

  • Moving from `int` bitfields to a more robust representation for qualifier sets improves accuracy but complicates internal compiler logic and may require significant code changes.
  • Handling `TYPE_QUAL_ATOMIC` explicitly ensures correctness for atomic operations but requires careful integration with existing qualifier logic.
  • Decoupling bug fixes from refactoring ensures the refactoring itself can proceed more smoothly, but may delay the resolution of existing issues.

All attributes

project
gcc
subsystem
gcc
patch_id
discussion_id
9a0c6c9e-fe13-64cf-a444-5b5f4130f58c@redhat.com
source_type
public_inbox
title
Re: [RFC TREE-WIDE] gcc: stop using 'int' to represent sets of qualifiers
headline
gcc: stop using 'int' to represent sets of qualifiers
tldr
Discussion on appropriately representing qualifier sets in GCC, moving away from 'int' to handle complexities like TYPE_QUAL_ATOMIC and address spaces.
proposer
Joseph Myers <josmyers@redhat.com>
consensus
Proposed
outcome
proposed
sentiment_score
technical_tradeoffs
  • Moving from `int` bitfields to a more robust representation for qualifier sets improves accuracy but complicates internal compiler logic and may require significant code changes.
  • Handling `TYPE_QUAL_ATOMIC` explicitly ensures correctness for atomic operations but requires careful integration with existing qualifier logic.
  • Decoupling bug fixes from refactoring ensures the refactoring itself can proceed more smoothly, but may delay the resolution of existing issues.
series_id
series_role
standalone
series_parts
[]
tags
  • gcc
  • c
  • type-system
  • compiler-internals
  • refactoring
bugzilla_url
date
2026-06-30T00:00:00.000Z

Re: [RFC TREE-WIDE] gcc: stop using 'int' to represent sets of qualifiers

In a continuation of a discussion about refactoring GCC’s internal representation of qualifier sets, Joseph Myers addresses Arsen Arsenović’s suggestion to rename includes_p to usable_as_p. Myers agrees that qualifier sets, particularly TYPE_QUAL_ATOMIC, involve complexities beyond simple inclusion, especially concerning address spaces. He emphasizes that while the refactoring itself is ongoing, any bugs found during this process should be addressed separately to maintain clarity.