Skip to content

Commit

Permalink
doc: Document correct -fwide-exec-charset defaults [PR41041]
Browse files Browse the repository at this point in the history
As shown in the PR, the default is not UTF-32 but rather UTF-32BE or
UTF-32LE, avoiding the need for a byte order mark in literals.

gcc/ChangeLog:

	PR c/41041
	* doc/cppopts.texi: Document -fwide-exec-charset defaults
	correctly.
  • Loading branch information
jwakely committed Nov 5, 2022
1 parent 6b1a247 commit e50ea3a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions gcc/doc/cppopts.texi
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,10 @@ supported by the system's @code{iconv} library routine.
@opindex fwide-exec-charset
@cindex character set, wide execution
Set the wide execution character set, used for wide string and
character constants. The default is UTF-32 or UTF-16, whichever
corresponds to the width of @code{wchar_t}. As with
@option{-fexec-charset}, @var{charset} can be any encoding supported
character constants. The default is one of UTF-32BE, UTF-32LE, UTF-16BE,
or UTF-16LE, whichever corresponds to the width of @code{wchar_t} and the
big-endian or little-endian byte order being used for code generation. As
with @option{-fexec-charset}, @var{charset} can be any encoding supported
by the system's @code{iconv} library routine; however, you will have
problems with encodings that do not fit exactly in @code{wchar_t}.

Expand Down

0 comments on commit e50ea3a

Please sign in to comment.