Re: [PATCH 2/7] jit,docs: replace c:type:`int_type` with :expr:`int_type`
On Tue, 2022-07-26 at 06:48 +0200, Martin Liška wrote: > On 7/26/22 00:37, David Malcolm wrote: > > On Mon, 2022-07-25 at 11:03 +0200, Martin Liska wrote: > > > Use expression that work fine for basic type. > > > > What's the motivation for this change? Surely the things being > > marked > > up are types, rather than expressions? > > Problem is that one can't reference a type that is not defined by a > :type: directive, > that's why I'm using :expr: > > Fixes the following Sphinx warnings: > > /home/marxin/Programming/gcc/gcc/jit/docs/topics/expressions.rst:70: > WARNING: Unparseable C cross-reference: 'long' > Invalid C declaration: Expected identifier in nested name, got > keyword: long [error at 4] > long > ^ Fair enough, thanks. LGTM. Dave
Re: [PATCH 2/7] jit,docs: replace c:type:`int_type` with :expr:`int_type`
On 7/26/22 00:37, David Malcolm wrote: > On Mon, 2022-07-25 at 11:03 +0200, Martin Liska wrote: >> Use expression that work fine for basic type. > > What's the motivation for this change? Surely the things being marked > up are types, rather than expressions? Problem is that one can't reference a type that is not defined by a :type: directive, that's why I'm using :expr: Fixes the following Sphinx warnings: /home/marxin/Programming/gcc/gcc/jit/docs/topics/expressions.rst:70: WARNING: Unparseable C cross-reference: 'long' Invalid C declaration: Expected identifier in nested name, got keyword: long [error at 4] long ^ Martin > > Dave > >> >> gcc/jit/ChangeLog: >> >> * docs/cp/topics/expressions.rst: Use :expr: for basic types. >> * docs/topics/compilation.rst: Likewise. >> * docs/topics/expressions.rst: Likewise. >> * docs/topics/function-pointers.rst: Likewise. >> --- >> gcc/jit/docs/cp/topics/expressions.rst | 6 +++--- >> gcc/jit/docs/topics/compilation.rst | 4 ++-- >> gcc/jit/docs/topics/expressions.rst | 6 +++--- >> gcc/jit/docs/topics/function-pointers.rst | 2 +- >> 4 files changed, 9 insertions(+), 9 deletions(-) >> >> diff --git a/gcc/jit/docs/cp/topics/expressions.rst >> b/gcc/jit/docs/cp/topics/expressions.rst >> index 239e004371e..003dbce8991 100644 >> --- a/gcc/jit/docs/cp/topics/expressions.rst >> +++ b/gcc/jit/docs/cp/topics/expressions.rst >> @@ -57,14 +57,14 @@ Simple expressions >> int value) const >> >> Given a numeric type (integer or floating point), build an rvalue >> for >> - the given constant :c:type:`int` value. >> + the given constant :expr:`int` value. >> >> .. function:: gccjit::rvalue \ >> gccjit::context::new_rvalue (gccjit::type >> numeric_type, \ >> long value) const >> >> Given a numeric type (integer or floating point), build an rvalue >> for >> - the given constant :c:type:`long` value. >> + the given constant :expr:`long` value. >> >> .. function:: gccjit::rvalue \ >> gccjit::context::zero (gccjit::type numeric_type) >> const >> @@ -91,7 +91,7 @@ Simple expressions >> double value) const >> >> Given a numeric type (integer or floating point), build an rvalue >> for >> - the given constant :c:type:`double` value. >> + the given constant :expr:`double` value. >> >> .. function:: gccjit::rvalue \ >> gccjit::context::new_rvalue (gccjit::type >> pointer_type, \ >> diff --git a/gcc/jit/docs/topics/compilation.rst >> b/gcc/jit/docs/topics/compilation.rst >> index c5fa6eb0faf..91b9c2533cf 100644 >> --- a/gcc/jit/docs/topics/compilation.rst >> +++ b/gcc/jit/docs/topics/compilation.rst >> @@ -98,8 +98,8 @@ In-memory compilation >> If the global is found, the result will need to be cast to a >> pointer of the correct type before it can be called. >> >> - This is a *pointer* to the global, so e.g. for an :c:type:`int` >> this is >> - an :c:type:`int *`. >> + This is a *pointer* to the global, so e.g. for an :expr:`int` >> this is >> + an :expr:`int *`. >> >> For example, given an ``int foo;`` created this way: >> >> diff --git a/gcc/jit/docs/topics/expressions.rst >> b/gcc/jit/docs/topics/expressions.rst >> index 49b7e14ae2b..00e2ec8cfeb 100644 >> --- a/gcc/jit/docs/topics/expressions.rst >> +++ b/gcc/jit/docs/topics/expressions.rst >> @@ -60,7 +60,7 @@ Simple expressions >> int value) >> >> Given a numeric type (integer or floating point), build an rvalue >> for >> - the given constant :c:type:`int` value. >> + the given constant :expr:`int` value. >> >> .. function:: gcc_jit_rvalue *\ >> gcc_jit_context_new_rvalue_from_long (gcc_jit_context >> *ctxt, \ >> @@ -68,7 +68,7 @@ Simple expressions >> long value) >> >> Given a numeric type (integer or floating point), build an rvalue >> for >> - the given constant :c:type:`long` value. >> + the given constant :expr:`long` value. >> >> .. function:: gcc_jit_rvalue *gcc_jit_context_zero (gcc_jit_context >> *ctxt, \ >> gcc_jit_type >> *numeric_type) >> @@ -96,7 +96,7 @@ Simple expressions >> double value) >> >> Given a numeric type (integer or floating point), build an rvalue >> for >> - the given constant :c:type:`double` value. >> + the given constant :expr:`double` value. >> >> .. function:: gcc_jit_rvalue *\ >> gcc_jit_context_new_rvalue_from_ptr (gcc_jit_context >> *ctxt, \ >> diff --git a/gcc/jit/docs/topics/function-pointers.rst >> b/gcc/jit/docs/topics/function-pointers.rst >> index e6f9970a7a7..dde49215853 100644 >> ---
Re: [PATCH 2/7] jit,docs: replace c:type:`int_type` with :expr:`int_type`
On Mon, 2022-07-25 at 11:03 +0200, Martin Liska wrote: > Use expression that work fine for basic type. What's the motivation for this change? Surely the things being marked up are types, rather than expressions? Dave > > gcc/jit/ChangeLog: > > * docs/cp/topics/expressions.rst: Use :expr: for basic types. > * docs/topics/compilation.rst: Likewise. > * docs/topics/expressions.rst: Likewise. > * docs/topics/function-pointers.rst: Likewise. > --- > gcc/jit/docs/cp/topics/expressions.rst | 6 +++--- > gcc/jit/docs/topics/compilation.rst | 4 ++-- > gcc/jit/docs/topics/expressions.rst | 6 +++--- > gcc/jit/docs/topics/function-pointers.rst | 2 +- > 4 files changed, 9 insertions(+), 9 deletions(-) > > diff --git a/gcc/jit/docs/cp/topics/expressions.rst > b/gcc/jit/docs/cp/topics/expressions.rst > index 239e004371e..003dbce8991 100644 > --- a/gcc/jit/docs/cp/topics/expressions.rst > +++ b/gcc/jit/docs/cp/topics/expressions.rst > @@ -57,14 +57,14 @@ Simple expressions > int value) const > > Given a numeric type (integer or floating point), build an rvalue > for > - the given constant :c:type:`int` value. > + the given constant :expr:`int` value. > > .. function:: gccjit::rvalue \ > gccjit::context::new_rvalue (gccjit::type > numeric_type, \ > long value) const > > Given a numeric type (integer or floating point), build an rvalue > for > - the given constant :c:type:`long` value. > + the given constant :expr:`long` value. > > .. function:: gccjit::rvalue \ > gccjit::context::zero (gccjit::type numeric_type) > const > @@ -91,7 +91,7 @@ Simple expressions > double value) const > > Given a numeric type (integer or floating point), build an rvalue > for > - the given constant :c:type:`double` value. > + the given constant :expr:`double` value. > > .. function:: gccjit::rvalue \ > gccjit::context::new_rvalue (gccjit::type > pointer_type, \ > diff --git a/gcc/jit/docs/topics/compilation.rst > b/gcc/jit/docs/topics/compilation.rst > index c5fa6eb0faf..91b9c2533cf 100644 > --- a/gcc/jit/docs/topics/compilation.rst > +++ b/gcc/jit/docs/topics/compilation.rst > @@ -98,8 +98,8 @@ In-memory compilation > If the global is found, the result will need to be cast to a > pointer of the correct type before it can be called. > > - This is a *pointer* to the global, so e.g. for an :c:type:`int` > this is > - an :c:type:`int *`. > + This is a *pointer* to the global, so e.g. for an :expr:`int` > this is > + an :expr:`int *`. > > For example, given an ``int foo;`` created this way: > > diff --git a/gcc/jit/docs/topics/expressions.rst > b/gcc/jit/docs/topics/expressions.rst > index 49b7e14ae2b..00e2ec8cfeb 100644 > --- a/gcc/jit/docs/topics/expressions.rst > +++ b/gcc/jit/docs/topics/expressions.rst > @@ -60,7 +60,7 @@ Simple expressions > int value) > > Given a numeric type (integer or floating point), build an rvalue > for > - the given constant :c:type:`int` value. > + the given constant :expr:`int` value. > > .. function:: gcc_jit_rvalue *\ > gcc_jit_context_new_rvalue_from_long (gcc_jit_context > *ctxt, \ > @@ -68,7 +68,7 @@ Simple expressions > long value) > > Given a numeric type (integer or floating point), build an rvalue > for > - the given constant :c:type:`long` value. > + the given constant :expr:`long` value. > > .. function:: gcc_jit_rvalue *gcc_jit_context_zero (gcc_jit_context > *ctxt, \ > gcc_jit_type > *numeric_type) > @@ -96,7 +96,7 @@ Simple expressions > double value) > > Given a numeric type (integer or floating point), build an rvalue > for > - the given constant :c:type:`double` value. > + the given constant :expr:`double` value. > > .. function:: gcc_jit_rvalue *\ > gcc_jit_context_new_rvalue_from_ptr (gcc_jit_context > *ctxt, \ > diff --git a/gcc/jit/docs/topics/function-pointers.rst > b/gcc/jit/docs/topics/function-pointers.rst > index e6f9970a7a7..dde49215853 100644 > --- a/gcc/jit/docs/topics/function-pointers.rst > +++ b/gcc/jit/docs/topics/function-pointers.rst > @@ -48,7 +48,7 @@ to it in :c:type:`gcc_jit_rvalue` form using > type obtained using :c:func:`gcc_jit_context_new_function_ptr_type`. > > Here's an example of creating a function pointer type corresponding > to C's > -:c:type:`void (*) (int, int, int)`: > +:expr:`void (*) (int, int, int)`: > > .. code-block:: c >
[PATCH 2/7] jit, docs: replace c:type:`int_type` with :expr:`int_type`
Use expression that work fine for basic type. gcc/jit/ChangeLog: * docs/cp/topics/expressions.rst: Use :expr: for basic types. * docs/topics/compilation.rst: Likewise. * docs/topics/expressions.rst: Likewise. * docs/topics/function-pointers.rst: Likewise. --- gcc/jit/docs/cp/topics/expressions.rst| 6 +++--- gcc/jit/docs/topics/compilation.rst | 4 ++-- gcc/jit/docs/topics/expressions.rst | 6 +++--- gcc/jit/docs/topics/function-pointers.rst | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/gcc/jit/docs/cp/topics/expressions.rst b/gcc/jit/docs/cp/topics/expressions.rst index 239e004371e..003dbce8991 100644 --- a/gcc/jit/docs/cp/topics/expressions.rst +++ b/gcc/jit/docs/cp/topics/expressions.rst @@ -57,14 +57,14 @@ Simple expressions int value) const Given a numeric type (integer or floating point), build an rvalue for - the given constant :c:type:`int` value. + the given constant :expr:`int` value. .. function:: gccjit::rvalue \ gccjit::context::new_rvalue (gccjit::type numeric_type, \ long value) const Given a numeric type (integer or floating point), build an rvalue for - the given constant :c:type:`long` value. + the given constant :expr:`long` value. .. function:: gccjit::rvalue \ gccjit::context::zero (gccjit::type numeric_type) const @@ -91,7 +91,7 @@ Simple expressions double value) const Given a numeric type (integer or floating point), build an rvalue for - the given constant :c:type:`double` value. + the given constant :expr:`double` value. .. function:: gccjit::rvalue \ gccjit::context::new_rvalue (gccjit::type pointer_type, \ diff --git a/gcc/jit/docs/topics/compilation.rst b/gcc/jit/docs/topics/compilation.rst index c5fa6eb0faf..91b9c2533cf 100644 --- a/gcc/jit/docs/topics/compilation.rst +++ b/gcc/jit/docs/topics/compilation.rst @@ -98,8 +98,8 @@ In-memory compilation If the global is found, the result will need to be cast to a pointer of the correct type before it can be called. - This is a *pointer* to the global, so e.g. for an :c:type:`int` this is - an :c:type:`int *`. + This is a *pointer* to the global, so e.g. for an :expr:`int` this is + an :expr:`int *`. For example, given an ``int foo;`` created this way: diff --git a/gcc/jit/docs/topics/expressions.rst b/gcc/jit/docs/topics/expressions.rst index 49b7e14ae2b..00e2ec8cfeb 100644 --- a/gcc/jit/docs/topics/expressions.rst +++ b/gcc/jit/docs/topics/expressions.rst @@ -60,7 +60,7 @@ Simple expressions int value) Given a numeric type (integer or floating point), build an rvalue for - the given constant :c:type:`int` value. + the given constant :expr:`int` value. .. function:: gcc_jit_rvalue *\ gcc_jit_context_new_rvalue_from_long (gcc_jit_context *ctxt, \ @@ -68,7 +68,7 @@ Simple expressions long value) Given a numeric type (integer or floating point), build an rvalue for - the given constant :c:type:`long` value. + the given constant :expr:`long` value. .. function:: gcc_jit_rvalue *gcc_jit_context_zero (gcc_jit_context *ctxt, \ gcc_jit_type *numeric_type) @@ -96,7 +96,7 @@ Simple expressions double value) Given a numeric type (integer or floating point), build an rvalue for - the given constant :c:type:`double` value. + the given constant :expr:`double` value. .. function:: gcc_jit_rvalue *\ gcc_jit_context_new_rvalue_from_ptr (gcc_jit_context *ctxt, \ diff --git a/gcc/jit/docs/topics/function-pointers.rst b/gcc/jit/docs/topics/function-pointers.rst index e6f9970a7a7..dde49215853 100644 --- a/gcc/jit/docs/topics/function-pointers.rst +++ b/gcc/jit/docs/topics/function-pointers.rst @@ -48,7 +48,7 @@ to it in :c:type:`gcc_jit_rvalue` form using type obtained using :c:func:`gcc_jit_context_new_function_ptr_type`. Here's an example of creating a function pointer type corresponding to C's -:c:type:`void (*) (int, int, int)`: +:expr:`void (*) (int, int, int)`: .. code-block:: c -- 2.37.1