-qlonglit

Description

Makes unsuffixed literals into the long type in 64-bit mode.

Syntax

Read syntax diagramSkip visual syntax diagram        .-nolonglit-.
>>- -q--+-longlit---+------------------------------------------><

Notes

C only

The following table shows the implicit types for constants in 64-bit mode when compiling in the stdc89, extc89, or extended language level:

  default 64-bit mode 64-bit mode with qlonglit
unsuffixed decimal
signed int
signed long
unsigned long
signed long
unsigned long 
unsuffixed octal or hex
signed int
unsigned int
signed long
unsigned long
signed long
unsigned long
suffixed by u/U
unsigned int
unsigned long
unsigned long
suffixed by l/L
signed long
unsigned long
signed long
unsigned long
suffixed by ul/UL
unsigned long
unsigned long

C++ only

The following table shows the implicit types for constants in 64-bit mode when compiling in the stdc99, extc99, or extended language level:

  Decimal Constant -qlonglit effect on Decimal Constant
unsuffixed
int
long int
long int
u or U
unsigned int
unsigned long int
unsigned long int
l or L
long int
long int
Both u or U, and l or L
unsigned long int
unsigned long int
ll or LL
long long int
long long int
Both u or U, and ll or LL
unsigned long long int
unsigned long long int
  Octal or Hexadecimal Constant -qlonglit effect on Octal or Hexadecimal Constant
unsuffixed
int
unsigned int
long int
unsigned long int
long int
unsigned long int
u or U
unsigned int
unsigned long int
unsigned long int
l or L
long int
unsigned long int
long int
unsigned long int
Both u or U, and l or L
unsigned long int
unsigned long int
ll or LL
long long int
unsigned long long int
long long int
unsigned long long int
Both u or U, and ll or LL
unsigned long long int
unsigned long long int

Related information