# Control AL compiler warnings with pragma directives
> APPLIES TO: Business Central 2020 release wave 2 and later
The `#pragma warning disable` directive suppresses specified compiler warnings from its location until a matching `#pragma warning restore` directive or the end of the file. If you omit the warning list, the directive applies to all configurable warnings.
> IMPORTANT
> Suppress warnings only when you can't address their cause. A warning can become an error in a later release and break your extension.
## Syntax
```al
#pragma warning disable warning-list
```
```al
#pragma warning restore warning-list
```
## Parameters
warning-list
A comma-separated list of warning IDs or numeric warning codes, such as `AL0468, AL0604`.
When you don't specify warning IDs, disable suppresses all configurable warnings from that point forward. restore clears the pragma warning state and returns all warnings to their default or project-configured reporting state.
> NOTE
> To find warning IDs, build your AL project in Visual Studio Code and check the Output window. Learn more about code analysis in ../devenv-using-code-analysis-tool.
## Example
The following example illustrates how the specific rule AL0468 is temporarily turned off for a specific field definition.
```al
table 50110 MyTable
{
    fields
    {
        #pragma warning disable AL0468
        field(1; TableWithLongIdentifierThatExceedsOurMax; Integer) { }
        #pragma warning restore AL0468
    }
}
```
## Related information
Development in AL<../devenv-dev-overview>
AL development environment<../devenv-reference-overview>
Pragma directive in AL<devenv-directive-pragma>
devenv-directives-in-al#conditional-directives
Deprecating explicit and implicit with statements<../devenv-deprecating-with-statements-overview>

Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/directives/devenv-directive-pragma-warning, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact. https://jonas-paprotka.de/docs/dev-itpro/developer/directives/devenv-directive-pragma-warning/
