Skip to content

Add inline and goto qualifier support to __asm__ declarations#3

Closed
Copilot wants to merge 3 commits into
mainfrom
copilot/support-inline-and-goto-keywords
Closed

Add inline and goto qualifier support to __asm__ declarations#3
Copilot wants to merge 3 commits into
mainfrom
copilot/support-inline-and-goto-keywords

Conversation

Copy link
Copy Markdown

Copilot AI commented May 6, 2026

GCC's asm inline and asm goto qualifiers were silently rejected by CDT's parser. Additionally, the existing volatile qualifier was consumed but never stored, making it inaccessible via the AST API.

__asm__ inline ("nop");   // previously: parse error
__asm__ goto ("nop");     // previously: parse error
__asm__ volatile ("nop"); // previously: parsed but qualifier not queryable

Description

Changes

  • IASTASMDeclaration — New API (@since 9.3): isVolatile()/setVolatile(), isInline()/setInline(), isGoto()/setGoto()
  • CASTASMDeclaration / CPPASTASMDeclaration — Store all three qualifier flags; propagate through copy()
  • AbstractGNUSourceCodeParser.asmDeclaration() — Parse qualifiers in a loop (any order, consistent with GCC); pass flags through to buildASMDirective()
  • DeclarationWriter — Emit qualifier keywords when rewriting ASM declarations
  • GCCCompleteParseExtensionsTest — New test testAsmInlineGotoQualifiers covering all qualifiers individually and combined for both C and C++ parsers
  • META-INF/MANIFEST.MF — Bumped Bundle-Version from 9.3.200.qualifier to 9.4.0.qualifier to reflect the new public API additions

Checklist:

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

Test Results

4 719 tests  +1   4 710 ✅ +1   2m 29s ⏱️ -3s
  182 suites ±0       9 💤 ±0 
  182 files   ±0       0 ❌ ±0 

Results for commit 44d2599. ± Comparison against base commit acd4556.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

Test Results

  182 files  ± 0    182 suites  ±0   2m 30s ⏱️ -2s
4 719 tests + 1  4 710 ✅ + 1  9 💤 ±0  0 ❌ ±0 
4 708 runs   - 10  4 699 ✅  - 10  9 💤 ±0  0 ❌ ±0 

Results for commit 44d2599. ± Comparison against base commit acd4556.

@strimo378
Copy link
Copy Markdown

@copilot Fix run 25583771422

Copy link
Copy Markdown
Author

Copilot AI commented May 9, 2026

@copilot Fix run 25583771422

Fixed in commit 5db0aaf. The CI failure had two causes:

  1. @since 9.4 tags were invalid — changed to @since 9.3 (the current version)
  2. Bundle-Version needed its minor version incremented since new APIs were added — bumped from 9.3.200.qualifier to 9.4.0.qualifier

Copilot AI requested a review from strimo378 May 9, 2026 00:12
@strimo378 strimo378 marked this pull request as ready for review May 9, 2026 00:20
@strimo378 strimo378 closed this May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants