Diagnostics reference
Every diagnostic GB# can report - all 88 of them, generated from the compiler's own descriptors in GBSharp.Rules, so this list cannot drift from what a build reports.
Ids are permanent once released, and banded by category. An id means the same thing in the compiler and in the editor analyzers, because both read the same definition.
Severities
Severity
Meaning
Error
Compilation cannot continue.
Warning
The code is suspect.
Performance
The code is correct but costs more than it looks like it does.
Resource
The code consumes a constrained resource: WRAM, VRAM, ROM, sprites.
Info
Informational only.
Performance and Resource are distinct from Warning because they say something about the hardware rather than about the code's correctness.
Suppressibility
A diagnostic marked suppressible can be silenced or downgraded per id or per category, in gbsharp.json or .editorconfig - see Configuring diagnostics . Errors are not suppressible: the compiler depends on them stopping the build, and downgrading one would produce nonsense C rather than a working ROM. A setting that names one anyway is answered with GBS0508 rather than ignored.
Diagnostics marked IDE are additionally reported live in the editor by the Roslyn analyzers, before any build.
Language subset (GBS0001–GBS0099)
Id
Title
Severity
GBS0001
Unsupported construct
Error
GBS0002
Unsupported type
Error
IDE
GBS0003
No entry point
Error
GBS0004
Multiple entry points
Error
GBS0005
Call cannot be lowered
Error
GBS0007
32-bit arithmetic
Performance
IDE
GBS0042
Dynamic collection
Error
IDE
GBS0043
System.String is unavailable
Error
IDE
GBS0044
Exceptions are unavailable
Error
IDE
GBS0045
Delegates and events are unavailable
Error
IDE
GBS0046
Interfaces are unavailable
Error
IDE
GBS0047
async/await is unavailable
Error
IDE
GBS0048
Boxing
Error
GBS0049
LINQ is unavailable
Error
IDE
GBS0050
Reference type allocation
Error
IDE
GBS0051
Unsupported operator
Error
GBS0052
Array size must be constant
Error
GBS0053
Invalid [Native] declaration
Error
GBS0054
Capacity required
Error
GBS0055
Invalid capacity
Error
GBS0056
Write to read-only data
Error
GBS0057
Initializer is not constant
Error
GBS0058
Recursive call
Warning
suppressible
GBS0059
Constructor needs somewhere to construct
Error
Id
Title
Severity
GBS0101
Arithmetic widened
Performance
suppressible
GBS0102
Expensive multiplication
Performance
suppressible
GBS0103
Expensive division
Performance
suppressible
Memory (GBS0200–GBS0299)
Id
Title
Severity
GBS0201
Static allocation
Resource
suppressible, IDE
GBS0202
Large struct passed by value
Resource
suppressible
GBS0203
ROM allocation
Resource
suppressible, IDE
GBS0204
VRAM tile budget
Resource
suppressible
GBS0205
VRAM tile budget exceeded
Error
GBS0210
WRAM budget exceeded
Error
GBS0211
ROM budget exceeded
Error
GBS0212
ROM bank budget exceeded
Error
Banking (GBS0300–GBS0399)
Id
Title
Severity
GBS0300
The entry point cannot be banked
Error
GBS0301
Banked call
Performance
GBS0302
Bank overflow
Error
GBS0303
Banked data read directly
Error
GBS0304
Invalid ROM bank
Error
GBS0305
Conflicting banks for shared data
Error
GBS0306
Mutable data cannot be banked
Error
GBS0307
Bank 0 nearly full
Resource
GBS0308
Bank placement
Info
GBS0309
Automatic placement
Info
GBS0310
Bank 0 overflowed
Error
Cycle cost (GBS0400–GBS0499)
Id
Title
Severity
GBS0401
Frame loop is close to a frame
Performance
suppressible
GBS0410
Loop cost
Performance
suppressible
GBS0420
Call depth
Resource
suppressible
GBS0440
Banked call every frame
Performance
suppressible
GBS0441
Callee could share its caller's bank
Info
suppressible
Id
Title
Severity
GBS0501
GBDK not found
Error
GBS0502
Backend compilation failed
Error
GBS0503
Invalid project file
Error
GBS0504
No source files
Error
GBS0505
No emulator configured
Warning
GBS0506
Emulator could not be launched
Error
GBS0507
Project file drift
Warning
suppressible
GBS0508
Diagnostic cannot be suppressed
Warning
GBS0510
Bank usage unavailable
Info
GBS0511
Library not found
Error
GBS0512
Include not found
Error
GBS0513
Cartridge RAM does not match the mapper
Warning
suppressible
Assets (GBS0600–GBS0699)
Id
Title
Severity
GBS0601
Too many colours
Error
GBS0602
Tile uses too many colours
Error
GBS0603
Too many palettes
Error
GBS0604
Tile budget exceeded
Error
GBS0605
Dimensions not tile-aligned
Error
GBS0606
Asset not found
Error
GBS0607
Unsupported image feature
Error
GBS0608
Malformed image
Error
GBS0609
Invalid asset declaration
Error
GBS0610
Asset support unavailable
Error
GBS0611
Map too large
Error
GBS0612
Colours on an original Game Boy
Warning
GBS0613
Asset used as a value
Error
GBS0614
Flip deduplication unavailable
Error
GBS0615
Binary asset too large
Error
GBS0620
Asset ROM cost
Resource
GBS0621
Shared asset
Info
GBS0622
Binary asset ROM cost
Resource
suppressible
GBS0623
Map larger than the hardware map
Info
suppressible
GBS0624
Tall sprite height not aligned
Error
GBS0625
Metasprite sheet not divisible into frames
Error
GBS0626
Metasprite has too many sub-sprites
Error
GBS0627
Font sheet has the wrong shape
Error
GBS0628
Font characters required
Error
Internal (GBS9000+)
Id
Title
Severity
GBS9001
Internal compiler error
Error