public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] libproc_macro: Put literal members in namespace
@ 2023-05-02 7:08 Thomas Schwinge
0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2023-05-02 7:08 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:9b5f58352b3995d0432667c35c1a5308d68b6932
commit 9b5f58352b3995d0432667c35c1a5308d68b6932
Author: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Date: Fri Apr 7 15:02:55 2023 +0200
libproc_macro: Put literal members in namespace
Add a Literal namespace to gather all every literal related code.
ChangeLog:
* libgrust/libproc_macro/literal.cc (Literal__from_string):
Add abort because unimplemented.
* libgrust/libproc_macro/literal.h (Literal__from_string): Add
namespace.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Diff:
---
libgrust/libproc_macro/literal.cc | 5 +++++
libgrust/libproc_macro/literal.h | 2 ++
2 files changed, 7 insertions(+)
diff --git a/libgrust/libproc_macro/literal.cc b/libgrust/libproc_macro/literal.cc
index a667fcb72fe..57709d59b37 100644
--- a/libgrust/libproc_macro/literal.cc
+++ b/libgrust/libproc_macro/literal.cc
@@ -22,6 +22,9 @@
#include "literal.h"
#include <cstring>
+#include <cstdlib>
+
+namespace Literal {
extern "C" {
@@ -75,6 +78,8 @@ bool
Literal__from_string (const unsigned char *str, std::uint64_t len, Literal *lit)
{
// FIXME: implement this function with parser
+ std::abort ();
return false;
}
}
+} // namespace Literal
diff --git a/libgrust/libproc_macro/literal.h b/libgrust/libproc_macro/literal.h
index 62a14522d1d..6ae707b5b5e 100644
--- a/libgrust/libproc_macro/literal.h
+++ b/libgrust/libproc_macro/literal.h
@@ -25,6 +25,7 @@
#include <cstdint>
+namespace Literal {
enum UnsignedTag
{
UNSIGNED_8,
@@ -172,5 +173,6 @@ bool
Literal__from_string (const unsigned char *str, std::uint64_t len,
Literal *lit);
}
+} // namespace Literal
#endif /* ! LITERAL_H */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-05-02 7:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-02 7:08 [gcc/devel/rust/master] libproc_macro: Put literal members in namespace Thomas Schwinge
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).