> For the complete documentation index, see [llms.txt](https://guide.cronuszen.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.cronuszen.com/gpcscripting/gpc-script-guide/troubleshooting/compiler-diagnostic-catalog/semantic-warnings-gpc30xx.md).

# Semantic warnings (GPC30xx)

### GPC3000 — REMAP\_NULL Deprecated

```
REMAP_NULL has been deprecated, use unmap instead.
```

**Severity:** Warning (tagged *deprecated*)

A `remap` statement maps a button to `REMAP_NULL`. The construct still compiles, but the dedicated `unmap` statement replaces it.

***

### GPC3001 — `int` Deprecated in Const Arrays

```
Type 'int' is deprecated in const array declarations. Use 'int16' instead.
```

**Severity:** Warning (tagged *deprecated*)

A const array is declared with the legacy `int` element type. It still compiles as a 16-bit signed array; spell it `int16`.

***

### GPC3002 — `char` Deprecated in Const Arrays

```
Type 'char' is deprecated in const array declarations. Use 'int8' instead.
```

**Severity:** Warning (tagged *deprecated*)

Legacy `char` element type on a const array; use `int8`.

***

### GPC3003 — `byte` Deprecated in Const Arrays

```
Type 'byte' is deprecated in const array declarations. Use 'uint8' instead.
```

**Severity:** Warning (tagged *deprecated*)

Legacy `byte` element type on a const array; use `uint8`.

***

### GPC3004 — Unreachable Code

```
Unreachable code detected
```

**Severity:** Warning (tagged *unnecessary*)

A statement follows a terminating statement (`return`, `break`, or `continue`) in the same block, so it can never execute. The editor renders the dead statements grayed out.

```c
function f() {
    return 1;
    set_val(PS4_R2, 100);   // GPC3004 — never runs
}
```

***

### GPC3005 — Dead Function Removed

```
Function '{name}' is never called and has been removed
```

**Severity:** Warning

A user-defined function is not reachable from `main`, `init`, or any combo, so the dead-code optimizer drops it entirely — it consumes no bytecode or variable slots. Delete it, or call it if the omission was accidental.

***

### GPC3006 — Unused Combo Removed

```
Combo '{name}' is never run and has been removed
Fcombo '{name}' is never run and has been removed
```

**Severity:** Warning

A combo (or fcombo) is never started — there is no reachable `combo_run`, `combo_restart`, or `call` referencing it — so it has been removed from the compiled output.

***

### GPC3007 — Dead Control Flow

```
Condition is always false
Condition is always false; loop body will never execute
```

**Severity:** Warning (tagged *unnecessary*)

An `if`/`else if` condition, or a `while`/`for` condition, folds to a constant false at compile time. The guarded body can never run and is eliminated.

***

### GPC3008 — Combo Runs Itself

```
Combo '{name}' is trying to {combo_run|combo_resume}() itself. This has no effect since the combo is already running.
```

**Severity:** Warning

Inside a combo body, `combo_run` or `combo_resume` is invoked with that same combo's name. The combo is by definition already running at that point, so the call is a no-op (contrast with `call`, which is an error — see GPC4015).

***

### GPC3009 — Parameter Shadows Global

```
Function parameter '{name}' shadows {kind} '{name}' declared on {location}.
```

Or without the location for built-in constants.

**Severity:** Warning

A function parameter has the same name as a global variable, constant, define, enum member, const array, or built-in constant. Inside the function the parameter wins, which frequently surprises: writes go to the parameter, not the global. Rename the parameter.

***

### GPC3010 — Built-in Pattern Match

```
Function '{name}' matches built-in '{name}' ({pattern} pattern) and will be dropped
```

**Severity:** Warning (tagged *unnecessary*)

A user-defined function named after a pattern-detectable built-in (`min`, `max`, `clamp`, ...) implements exactly the same logic as the built-in. The compiler drops the user function and routes calls to the built-in, saving bytecode. If your implementation intentionally differs, it raises GPC4025 instead.

***

### GPC3011 — Always-True Condition

```
Condition is always true
```

**Severity:** Warning (tagged *unnecessary*)

An `if`/`else if` condition folds to constant true; the check is removed and the branch always taken. Any `else` branch becomes dead code.

***

### GPC3012 — Const Array Fits int8

```
Const array '{name}' uses {type} but all values fit in int8. Consider using int8 instead.
```

**Severity:** Warning

A const array declared as `int16`, `int`, `uint16`, `int24`, `uint24`, or `int32` has every value within `int8` range (`-128..127`). Narrowing the declared type saves data-section space; `int8`/`uint8`/`char`/`byte`/`image`/`string`/`ps5adt` arrays are never checked (already narrowest, or not numerically narrowable). When the values fit both `int8` and `uint8`, the suggestion matches the declared type's signedness.

***

### GPC3013 — Const Array Fits uint8

```
Const array '{name}' uses {type} but all values fit in uint8. Consider using uint8 instead.
```

**Severity:** Warning

Same population as GPC3012, reported when the values fit `uint8` range (`0..255`) instead.

***

### GPC3014 — Const Array Fits int16

```
Const array '{name}' uses {type} but all values fit in int16. Consider using int16 instead.
```

**Severity:** Warning

Only checked for const arrays declared as `int24`, `uint24`, or `int32` whose values all fit `int16` range.

***

### GPC3015 — Const Array Fits uint16

```
Const array '{name}' uses {type} but all values fit in uint16. Consider using uint16 instead.
```

**Severity:** Warning

Same population as GPC3014, reported when the values fit `uint16` range instead.

***

### GPC3016 — Const Array Fits int24

```
Const array '{name}' uses {type} but all values fit in int24. Consider using int24 instead.
```

**Severity:** Warning

Only checked for const arrays declared as `int32` whose values all fit `int24` range, and only on devices that support the `int24` element type.

***

### GPC3017 — Const Array Fits uint24

```
Const array '{name}' uses {type} but all values fit in uint24. Consider using uint24 instead.
```

**Severity:** Warning

Same population as GPC3016, reported when the values fit `uint24` range instead.

***

### GPC3018 — Reference to Removed Combo

```
'{keyword}({combo})' has been removed because combo '{combo}' was removed
'{keyword}({combo})' is always 0 because combo '{combo}' was removed
```

**Severity:** Warning

Follow-up to GPC3006: surviving code still references a combo that was removed — e.g. `combo_running(X)` where combo `X` is never actually started anywhere. Expression keywords (`combo_running(X)`, `combo_suspended(X)`, ...) are folded to the constant `0`; statement keywords that merely control an already-running combo (`combo_stop(X);`, `combo_suspend(X);`, `combo_resume(X);`) are dropped along with the combo. `combo_run(X)` and `combo_restart(X)` can never trigger this warning — they count as starting the combo, so a combo they reference is not removed in the first place.

***

### GPC3019 — Ambiguous Number

```
You should put spaces between - and the number in '-{value}'.
```

**Severity:** Warning

A `-` sits glued to a number where a binary subtraction was expected, with a space before the `-` but none after it (e.g. `5 -1`) — a spelling that reads ambiguously between "five minus one" and "five, negative one". This fires only for that specific spacing; a fully-spaced `5 - 1` and a fully-glued `x-1` are both left alone as unambiguous.

If you ignore the warning, the compiler treats it as **subtraction**: `x = 5 -1` compiles to `x = 4` — it is *not* read as the number negative-one. The warning exists because a reader (or you, later) may have intended a negative literal, especially in an argument list. Nothing is wrong if subtraction was what you meant — add a space on both sides (`5 - 1`) to make the intent explicit and silence the warning. If a negative literal was intended, separate it properly (e.g. put the comma before `-1`).

```c
int x;
main {
    x = 5 -1;   // GPC3019 — parses as subtraction: x = 4
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://guide.cronuszen.com/gpcscripting/gpc-script-guide/troubleshooting/compiler-diagnostic-catalog/semantic-warnings-gpc30xx.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
