Search notes:

gcc -fshort-wchar

The -fshort-wchar option specifies that the underlying type for a wchar_t should be short unsigned int.
The following program prints the size of a wchar_t:
#include <stdio.h>
#include <stddef.h>

int main() {

  printf("sizeof(wchar_t): %d\n", sizeof(wchar_t));

}
Github repository about-gcc, path: /options/f/short/wchar/prog.c
This Makefile creates two versions of the program, one of which is compiled with the -fshort-wchar options.
#
#  Create two versions of the program, one thati
#  is compiled with and another that is compiled
#  without the -fshort-wchar option:
#
all: a.out short-wchar

a.out: prog.c
	gcc $< -o $@

short-wchar: prog.c
	gcc -fshort-wchar $< -o $@
Github repository about-gcc, path: /options/f/short/wchar/Makefile
On platforms, where the size of a wchar_t is four bytes, the version where the option is used, the size is reduced to two bytes.

See also

GCC options

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1759406892, '216.73.216.42', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/C-C-plus-plus/GCC/options/f/short/wchar(67): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78