<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gcc.git/libcpp/include/cpp-id-data.h, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/'/>
<entry>
<title>[PATCH] Kill cpp-id-data.h</title>
<updated>2018-08-20T14:20:04+00:00</updated>
<author>
<name>Nathan Sidwell</name>
<email>nathan@acm.org</email>
</author>
<published>2018-08-20T14:20:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=abcd1775e067600918da69330f8ff3f1f6734b4c'/>
<id>abcd1775e067600918da69330f8ff3f1f6734b4c</id>
<content type='text'>
https://gcc.gnu.org/ml/gcc-patches/2018-08/msg01149.html
	libcpp/
	* Makefile.in (TAGS_SOURCES): Remove cpp-id-data.h.
	* include/cpp-id-data.h: Delete.
	* internal.h: Include cpplib.h not cpp-id-data.h.
	gcc/
	* Makefile.in (CPP_ID_DATA_H): Delete.
	(CPP_INTERNAL_H): Don't add it.
	(GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
	* gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h

From-SVN: r263663
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://gcc.gnu.org/ml/gcc-patches/2018-08/msg01149.html
	libcpp/
	* Makefile.in (TAGS_SOURCES): Remove cpp-id-data.h.
	* include/cpp-id-data.h: Delete.
	* internal.h: Include cpplib.h not cpp-id-data.h.
	gcc/
	* Makefile.in (CPP_ID_DATA_H): Delete.
	(CPP_INTERNAL_H): Don't add it.
	(GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
	* gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h

From-SVN: r263663
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] #assert becomes macro-like</title>
<updated>2018-08-20T12:39:36+00:00</updated>
<author>
<name>Nathan Sidwell</name>
<email>nathan@acm.org</email>
</author>
<published>2018-08-20T12:39:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=3fb558b154f795983ae6a9dd6478e18a2c846584'/>
<id>3fb558b154f795983ae6a9dd6478e18a2c846584</id>
<content type='text'>
https://gcc.gnu.org/ml/gcc-patches/2018-08/msg01140.html
	libcpp/
	* include/cpp-id-data.h (struct answer): Delete.
	* include/cpplib.h (struct answer): Don't forward-declare.
	(enum cpp_macro_kind): Add cmk_assert.
	(struct cpp_macro): Union parms and next assert chain.
	(union _cpp_hashnode_value): 'answer' field is cpp_macro.
	* directives.c (parse_answer): Convert to use cpp_macro. Return
	true on success. 
	(parse_assertion, find_answer, _cpp_test_assertion, cpp_do_assert)
	(cpp_do_unassert): Convert to use cpp_macro.
	* macro.c (warn_of_redefinition, _cpp_new_macro)
	(check_trad_stringification, cpp_macro_definition): Adjust macro
	parm access.
	* traditional.c (_cpp_replacement_text_len)
	(_cpp_copy_replacement_text, _cpp_create_trad_definition): Likewise.
	gcc/c-family/
	* c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
	access.

From-SVN: r263658
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://gcc.gnu.org/ml/gcc-patches/2018-08/msg01140.html
	libcpp/
	* include/cpp-id-data.h (struct answer): Delete.
	* include/cpplib.h (struct answer): Don't forward-declare.
	(enum cpp_macro_kind): Add cmk_assert.
	(struct cpp_macro): Union parms and next assert chain.
	(union _cpp_hashnode_value): 'answer' field is cpp_macro.
	* directives.c (parse_answer): Convert to use cpp_macro. Return
	true on success. 
	(parse_assertion, find_answer, _cpp_test_assertion, cpp_do_assert)
	(cpp_do_unassert): Convert to use cpp_macro.
	* macro.c (warn_of_redefinition, _cpp_new_macro)
	(check_trad_stringification, cpp_macro_definition): Adjust macro
	parm access.
	* traditional.c (_cpp_replacement_text_len)
	(_cpp_copy_replacement_text, _cpp_create_trad_definition): Likewise.
	gcc/c-family/
	* c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
	access.

From-SVN: r263658
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] Move cpp_macro to cpplib.h</title>
<updated>2018-08-17T12:04:13+00:00</updated>
<author>
<name>Nathan Sidwell</name>
<email>nathan@acm.org</email>
</author>
<published>2018-08-17T12:04:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=c5d725c0a8da3b2227d119871e881d8a6e1bf600'/>
<id>c5d725c0a8da3b2227d119871e881d8a6e1bf600</id>
<content type='text'>
https://gcc.gnu.org/ml/gcc-patches/2018-08/msg01016.html
	libcpp/
	* cpp-id-data.h (uchar, UC): Move to internal.h
	(struct cpp_macro): Move to cpplib.h.
	* internal.h (uchar, UC): From cpp-id-data.h.
	* include/cpplib.h (struct cpp_macro): From cpp-id-data.h.
	gcc/c-family/
	* c-ada-spec.c: Don't #include "cpp-id-data.h"
	* c-cppbuiltin.c: Likewise.
	gcc/
	* cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".

From-SVN: r263618
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://gcc.gnu.org/ml/gcc-patches/2018-08/msg01016.html
	libcpp/
	* cpp-id-data.h (uchar, UC): Move to internal.h
	(struct cpp_macro): Move to cpplib.h.
	* internal.h (uchar, UC): From cpp-id-data.h.
	* include/cpplib.h (struct cpp_macro): From cpp-id-data.h.
	gcc/c-family/
	* c-ada-spec.c: Don't #include "cpp-id-data.h"
	* c-cppbuiltin.c: Likewise.
	gcc/
	* cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".

From-SVN: r263618
</pre>
</div>
</content>
</entry>
<entry>
<title>Update copyright years.</title>
<updated>2018-01-03T10:03:58+00:00</updated>
<author>
<name>Jakub Jelinek</name>
<email>jakub@gcc.gnu.org</email>
</author>
<published>2018-01-03T10:03:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=85ec4feb11167c9e4489361bf2399a20afbe52c8'/>
<id>85ec4feb11167c9e4489361bf2399a20afbe52c8</id>
<content type='text'>
From-SVN: r256169
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
From-SVN: r256169
</pre>
</div>
</content>
</entry>
<entry>
<title>Update copyright years.</title>
<updated>2017-01-01T12:07:43+00:00</updated>
<author>
<name>Jakub Jelinek</name>
<email>jakub@gcc.gnu.org</email>
</author>
<published>2017-01-01T12:07:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=cbe34bb5edd97015e38c483516492f171bf9f95d'/>
<id>cbe34bb5edd97015e38c483516492f171bf9f95d</id>
<content type='text'>
From-SVN: r243994
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
From-SVN: r243994
</pre>
</div>
</content>
</entry>
<entry>
<title>Update copyright years.</title>
<updated>2016-01-04T14:30:50+00:00</updated>
<author>
<name>Jakub Jelinek</name>
<email>jakub@gcc.gnu.org</email>
</author>
<published>2016-01-04T14:30:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=818ab71a415cd234be092111a0aa5e812ec56434'/>
<id>818ab71a415cd234be092111a0aa5e812ec56434</id>
<content type='text'>
From-SVN: r232055
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
From-SVN: r232055
</pre>
</div>
</content>
</entry>
<entry>
<title>Update copyright years.</title>
<updated>2015-01-05T12:33:28+00:00</updated>
<author>
<name>Jakub Jelinek</name>
<email>jakub@gcc.gnu.org</email>
</author>
<published>2015-01-05T12:33:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=5624e564d2239a74daa140e726b7b229d6e9a115'/>
<id>5624e564d2239a74daa140e726b7b229d6e9a115</id>
<content type='text'>
From-SVN: r219188
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
From-SVN: r219188
</pre>
</div>
</content>
</entry>
<entry>
<title>Preserve original spellings of extended identifiers.</title>
<updated>2014-11-06T21:08:52+00:00</updated>
<author>
<name>Joseph Myers</name>
<email>joseph@codesourcery.com</email>
</author>
<published>2014-11-06T21:08:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=be5ffc59ad88c5cd1cf6f568ec73001228cf28d5'/>
<id>be5ffc59ad88c5cd1cf6f568ec73001228cf28d5</id>
<content type='text'>
This patch makes cpplib track the original spellings of extended
identifiers, as well as the canonical UTF-8 version, in order to
follow standard semantics properly without needing a convoluted and
undocumented canonicalization in translation phase 1 (see bug 9449
comments 39-46 regarding such a canonicalization).

The spelling is tracked in cpp_identifier and cpp_macro_arg without
making cpp_token any larger.  The original spelling is used for checks
of duplicate macro definitions, stringizing (see the C++ tests added;
this case is only an issue for C++ not C because C makes it
implementation-defined whether a \ is inserted before the \ of a UCN
in a string or character constant when stringizing, while C++ does
not), pasting (relevant when the result is then stringized for C++)
and when macro definitions are output as text (e.g. for -d options).

Once a macro has been defined, only the original spelling of the
argument names needs keeping in the argument list.  While it is being
defined, however, both spellings are needed: the original one for
subsequent saving for checks of duplicate macro definitions, and the
canonical one which is the node marked specially to generate macro
argument tokens rather than normal identifier tokens.  The buffer that
is used to save the original values of the identifier tokens is
changed so that it stores both those original values and a pointer to
the canonical hash nodes, so that those canonical nodes can be found
when their values need restoring after the macro definition has been
parsed.

I believe this covers the known standards issues in extended
identifiers support (the remaining unimplemented C99 areas in GCC all
being floating-point-related), except for C++ translation of extended
characters to UCNs in phase 1 (which I have no plans to work on).
There are however probably issues left with handling of extended
identifiers in other places, as listed in
&lt;https://gcc.gnu.org/ml/gcc-patches/2014-11/msg00337.html&gt; (those
issues are generally the sort of thing that could be addressed as bugs
outside development stage 1).  (The bulk of the potential issues Zack
was concerned about in 2003-5, that resulted in extended identifiers
being disabled in the absence of -fextended-identifiers, were
effectively eliminated by the audit and fixes I did in 2009, however;
that todo list reflects what was left over after that audit.)

Bootstrapped with no regressions on x86_64-unknown-linux-gnu.

libcpp:
	* include/cpp-id-data.h (struct cpp_macro): Update comment
	regarding parameters.
	* include/cpplib.h (struct cpp_macro_arg, struct cpp_identifier):
	Add spelling fields.
	(struct cpp_token): Update comment on macro_arg.
	* internal.h (_cpp_save_parameter): Add extra argument.
	(_cpp_spell_ident_ucns): New declaration.
	* lex.c (lex_identifier): Add SPELLING argument.  Set *SPELLING to
	original spelling of identifier.
	(_cpp_lex_direct): Update calls to lex_identifier.
	(_cpp_spell_ident_ucns): New function, factored out of
	cpp_spell_token.
	(cpp_spell_token): Adjust FORSTRING argument semantics to return
	original spelling of identifiers.  Use _cpp_spell_ident_ucns in
	!FORSTRING case.
	(_cpp_equiv_tokens): Check spellings of identifiers and macro
	arguments are identical.
	* macro.c (macro_arg_saved_data): New structure.
	(paste_tokens): Use original spellings of identifiers from
	cpp_spell_token.
	(_cpp_save_parameter): Add argument SPELLING.  Save both canonical
	node and its value.
	(parse_params): Update calls to _cpp_save_parameter.
	(lex_expansion_token): Save spelling of macro argument tokens.
	(_cpp_create_definition): Extract canonical node from saved data.
	(cpp_macro_definition): Use UCNs in spelling of macro name.  Use
	original spellings of macro argument tokens and identifiers.
	* traditional.c (scan_parameters): Update call to
	_cpp_save_parameter.

gcc:
	* doc/invoke.texi (-std=c99, -std=c11): Don't refer to corner
	cases of extended identifiers.

gcc/testsuite:
	* g++.dg/cpp/ucnid-2.C, g++.dg/cpp/ucnid-3.C,
	gcc.dg/cpp/ucnid-11.c, gcc.dg/cpp/ucnid-12.c,
	gcc.dg/cpp/ucnid-13.c, gcc.dg/cpp/ucnid-14.c,
	gcc.dg/cpp/ucnid-15.c: New tests.

From-SVN: r217202
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch makes cpplib track the original spellings of extended
identifiers, as well as the canonical UTF-8 version, in order to
follow standard semantics properly without needing a convoluted and
undocumented canonicalization in translation phase 1 (see bug 9449
comments 39-46 regarding such a canonicalization).

The spelling is tracked in cpp_identifier and cpp_macro_arg without
making cpp_token any larger.  The original spelling is used for checks
of duplicate macro definitions, stringizing (see the C++ tests added;
this case is only an issue for C++ not C because C makes it
implementation-defined whether a \ is inserted before the \ of a UCN
in a string or character constant when stringizing, while C++ does
not), pasting (relevant when the result is then stringized for C++)
and when macro definitions are output as text (e.g. for -d options).

Once a macro has been defined, only the original spelling of the
argument names needs keeping in the argument list.  While it is being
defined, however, both spellings are needed: the original one for
subsequent saving for checks of duplicate macro definitions, and the
canonical one which is the node marked specially to generate macro
argument tokens rather than normal identifier tokens.  The buffer that
is used to save the original values of the identifier tokens is
changed so that it stores both those original values and a pointer to
the canonical hash nodes, so that those canonical nodes can be found
when their values need restoring after the macro definition has been
parsed.

I believe this covers the known standards issues in extended
identifiers support (the remaining unimplemented C99 areas in GCC all
being floating-point-related), except for C++ translation of extended
characters to UCNs in phase 1 (which I have no plans to work on).
There are however probably issues left with handling of extended
identifiers in other places, as listed in
&lt;https://gcc.gnu.org/ml/gcc-patches/2014-11/msg00337.html&gt; (those
issues are generally the sort of thing that could be addressed as bugs
outside development stage 1).  (The bulk of the potential issues Zack
was concerned about in 2003-5, that resulted in extended identifiers
being disabled in the absence of -fextended-identifiers, were
effectively eliminated by the audit and fixes I did in 2009, however;
that todo list reflects what was left over after that audit.)

Bootstrapped with no regressions on x86_64-unknown-linux-gnu.

libcpp:
	* include/cpp-id-data.h (struct cpp_macro): Update comment
	regarding parameters.
	* include/cpplib.h (struct cpp_macro_arg, struct cpp_identifier):
	Add spelling fields.
	(struct cpp_token): Update comment on macro_arg.
	* internal.h (_cpp_save_parameter): Add extra argument.
	(_cpp_spell_ident_ucns): New declaration.
	* lex.c (lex_identifier): Add SPELLING argument.  Set *SPELLING to
	original spelling of identifier.
	(_cpp_lex_direct): Update calls to lex_identifier.
	(_cpp_spell_ident_ucns): New function, factored out of
	cpp_spell_token.
	(cpp_spell_token): Adjust FORSTRING argument semantics to return
	original spelling of identifiers.  Use _cpp_spell_ident_ucns in
	!FORSTRING case.
	(_cpp_equiv_tokens): Check spellings of identifiers and macro
	arguments are identical.
	* macro.c (macro_arg_saved_data): New structure.
	(paste_tokens): Use original spellings of identifiers from
	cpp_spell_token.
	(_cpp_save_parameter): Add argument SPELLING.  Save both canonical
	node and its value.
	(parse_params): Update calls to _cpp_save_parameter.
	(lex_expansion_token): Save spelling of macro argument tokens.
	(_cpp_create_definition): Extract canonical node from saved data.
	(cpp_macro_definition): Use UCNs in spelling of macro name.  Use
	original spellings of macro argument tokens and identifiers.
	* traditional.c (scan_parameters): Update call to
	_cpp_save_parameter.

gcc:
	* doc/invoke.texi (-std=c99, -std=c11): Don't refer to corner
	cases of extended identifiers.

gcc/testsuite:
	* g++.dg/cpp/ucnid-2.C, g++.dg/cpp/ucnid-3.C,
	gcc.dg/cpp/ucnid-11.c, gcc.dg/cpp/ucnid-12.c,
	gcc.dg/cpp/ucnid-13.c, gcc.dg/cpp/ucnid-14.c,
	gcc.dg/cpp/ucnid-15.c: New tests.

From-SVN: r217202
</pre>
</div>
</content>
</entry>
<entry>
<title>Update copyright years in libcpp/</title>
<updated>2014-01-02T22:24:45+00:00</updated>
<author>
<name>Richard Sandiford</name>
<email>rdsandiford@googlemail.com</email>
</author>
<published>2014-01-02T22:24:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=35c3d610e3bbf073ffb3f5af532f277a37f0bfa8'/>
<id>35c3d610e3bbf073ffb3f5af532f277a37f0bfa8</id>
<content type='text'>
From-SVN: r206293
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
From-SVN: r206293
</pre>
</div>
</content>
</entry>
<entry>
<title>Update copyright years in libcpp.</title>
<updated>2013-01-14T18:13:59+00:00</updated>
<author>
<name>Richard Sandiford</name>
<email>rdsandiford@googlemail.com</email>
</author>
<published>2013-01-14T18:13:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=500f3ed906ee255426a939c9df4e3b90b4d8e3e3'/>
<id>500f3ed906ee255426a939c9df4e3b90b4d8e3e3</id>
<content type='text'>
From-SVN: r195162
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
From-SVN: r195162
</pre>
</div>
</content>
</entry>
</feed>
