public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Remove Pascal-related entries in code and comments.
@ 2018-09-21 10:12 Martin Liška
  2018-09-21 16:49 ` Joseph Myers
  0 siblings, 1 reply; 4+ messages in thread
From: Martin Liška @ 2018-09-21 10:12 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 1425 bytes --]

Hi.

This is removal of some Pascal-related comments.

Patch survives regression tests on x86_64-linux-gnu.

Ready for trunk?
Martin

gcc/ChangeLog:

2018-09-19  Martin Liska  <mliska@suse.cz>

	* config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
	Do not handle "GNU Pascal".
	* config/rs6000/rs6000.c (rs6000_output_function_epilogue):
	Likewise.
	* config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
	from documentation. Likewise.
	* dbxout.c (dbxout_range_type): Likewise.
	* doc/cpp.texi: Likewise.
	* doc/extend.texi: Likewise.
	* doc/frontends.texi: Likewise.
	* doc/invoke.texi: Remove Pascal entry.
	* doc/rtl.texi: Likewise.
	* tree.def (CLEANUP_POINT_EXPR): Likewise.

gcc/c-family/ChangeLog:

2018-09-19  Martin Liska  <mliska@suse.cz>

	* c-common.c (c_common_truthvalue_conversion):
	Remove Pascal from documentation.
---
 gcc/c-family/c-common.c            |  2 +-
 gcc/config/powerpcspe/powerpcspe.c |  4 +---
 gcc/config/rs6000/rs6000.c         |  4 +---
 gcc/config/sparc/sparc.c           |  5 ++---
 gcc/dbxout.c                       |  2 +-
 gcc/doc/cpp.texi                   |  2 +-
 gcc/doc/extend.texi                |  2 +-
 gcc/doc/frontends.texi             |  3 +--
 gcc/doc/invoke.texi                |  3 ---
 gcc/doc/rtl.texi                   |  2 +-
 gcc/tree.def                       | 17 ++++++-----------
 11 files changed, 16 insertions(+), 30 deletions(-)



[-- Attachment #2: 0001-Remove-Pascal-related-entries-in-code-and-comments.patch --]
[-- Type: text/x-patch, Size: 9655 bytes --]

diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c
index 4bfb14585e2..10a8bc29bfa 100644
--- a/gcc/c-family/c-common.c
+++ b/gcc/c-family/c-common.c
@@ -3289,7 +3289,7 @@ c_common_truthvalue_conversion (location_t location, tree expr)
  	tree inner = TREE_OPERAND (expr, 0);
 	if (decl_with_nonnull_addr_p (inner))
 	  {
-	    /* Common Ada/Pascal programmer's mistake.  */
+	    /* Common Ada programmer's mistake.  */
 	    warning_at (location,
 			OPT_Waddress,
 			"the address of %qD will always evaluate as %<true%>",
diff --git a/gcc/config/powerpcspe/powerpcspe.c b/gcc/config/powerpcspe/powerpcspe.c
index dea1eab1188..325b6ad5223 100644
--- a/gcc/config/powerpcspe/powerpcspe.c
+++ b/gcc/config/powerpcspe/powerpcspe.c
@@ -32024,7 +32024,7 @@ rs6000_output_function_epilogue (FILE *file)
       /* Language type.  Unfortunately, there does not seem to be any
 	 official way to discover the language being compiled, so we
 	 use language_string.
-	 C is 0.  Fortran is 1.  Pascal is 2.  Ada is 3.  C++ is 9.
+	 C is 0.  Fortran is 1.  Ada is 3.  C++ is 9.
 	 Java is 13.  Objective-C is 14.  Objective-C++ isn't assigned
 	 a number, so for now use 9.  LTO, Go and JIT aren't assigned numbers
 	 either, so for now use 0.  */
@@ -32036,8 +32036,6 @@ rs6000_output_function_epilogue (FILE *file)
       else if (! strcmp (language_string, "GNU F77")
 	       || lang_GNU_Fortran ())
 	i = 1;
-      else if (! strcmp (language_string, "GNU Pascal"))
-	i = 2;
       else if (! strcmp (language_string, "GNU Ada"))
 	i = 3;
       else if (lang_GNU_CXX ()
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index a36e6140ecb..2aea649aa6b 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -28403,7 +28403,7 @@ rs6000_output_function_epilogue (FILE *file)
       /* Language type.  Unfortunately, there does not seem to be any
 	 official way to discover the language being compiled, so we
 	 use language_string.
-	 C is 0.  Fortran is 1.  Pascal is 2.  Ada is 3.  C++ is 9.
+	 C is 0.  Fortran is 1.  Ada is 3.  C++ is 9.
 	 Java is 13.  Objective-C is 14.  Objective-C++ isn't assigned
 	 a number, so for now use 9.  LTO, Go and JIT aren't assigned numbers
 	 either, so for now use 0.  */
@@ -28415,8 +28415,6 @@ rs6000_output_function_epilogue (FILE *file)
       else if (! strcmp (language_string, "GNU F77")
 	       || lang_GNU_Fortran ())
 	i = 1;
-      else if (! strcmp (language_string, "GNU Pascal"))
-	i = 2;
       else if (! strcmp (language_string, "GNU Ada"))
 	i = 3;
       else if (lang_GNU_CXX ()
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index 2481fbf3b0a..42acabb5d78 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -7516,9 +7516,8 @@ sparc_pass_by_reference (cumulative_args_t cum ATTRIBUTE_UNUSED,
 {
   if (TARGET_ARCH32)
     /* Original SPARC 32-bit ABI says that structures and unions,
-       and quad-precision floats are passed by reference.  For Pascal,
-       also pass arrays by reference.  All other base types are passed
-       in registers.
+       and quad-precision floats are passed by reference.
+       All base types are passed in registers.
 
        Extended ABI (as implemented by the Sun compiler) says that all
        complex floats are passed by reference.  Pass complex integers
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index 459b7c2806f..bf41b17a263 100644
--- a/gcc/dbxout.c
+++ b/gcc/dbxout.c
@@ -1715,7 +1715,7 @@ dbxout_range_type (tree type, tree low, tree high)
   if (TREE_TYPE (type))
     dbxout_type (TREE_TYPE (type), 0);
   else if (TREE_CODE (type) != INTEGER_TYPE)
-    dbxout_type (type, 0); /* E.g. Pascal's ARRAY [BOOLEAN] of INTEGER */
+    dbxout_type (type, 0);
   else
     {
       /* Traditionally, we made sure 'int' was type 1, and builtin types
diff --git a/gcc/doc/cpp.texi b/gcc/doc/cpp.texi
index efad2c8eab5..53455741fd9 100644
--- a/gcc/doc/cpp.texi
+++ b/gcc/doc/cpp.texi
@@ -194,7 +194,7 @@ will be removed, and the Makefile will not work.
 
 Having said that, you can often get away with using cpp on things which
 are not C@.  Other Algol-ish programming languages are often safe
-(Pascal, Ada, etc.) So is assembly, with caution.  @option{-traditional-cpp}
+(Ada, etc.) So is assembly, with caution.  @option{-traditional-cpp}
 mode preserves more white space, and is otherwise more permissive.  Many
 of the problems can be avoided by writing C or C++ style comments
 instead of native language comments, and keeping macros simple.
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 4b606c007d8..64463ee4638 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -26,7 +26,7 @@ extensions, accepted by GCC in C90 mode and in C++.
 * Statement Exprs::     Putting statements and declarations inside expressions.
 * Local Labels::        Labels local to a block.
 * Labels as Values::    Getting pointers to labels, and computed gotos.
-* Nested Functions::    As in Algol and Pascal, lexical scoping of functions.
+* Nested Functions::    As in Algol lexical scoping of functions.
 * Constructing Calls::  Dispatching a call to another function.
 * Typeof::              @code{typeof}: referring to the type of an expression.
 * Conditionals::        Omitting the middle operand of a @samp{?:} expression.
diff --git a/gcc/doc/frontends.texi b/gcc/doc/frontends.texi
index ecf1d51905e..dbb83eed299 100644
--- a/gcc/doc/frontends.texi
+++ b/gcc/doc/frontends.texi
@@ -32,11 +32,10 @@ various processors.
 
 @cindex COBOL
 @cindex Mercury
-@cindex Pascal
 The part of a compiler that is specific to a particular language is
 called the ``front end''.  In addition to the front ends that are
 integrated components of GCC, there are several other front ends that
-are maintained separately.  These support languages such as Pascal,
+are maintained separately.  These support languages such as
 Mercury, and COBOL@.  To use these, they must be built together with
 GCC proper.
 
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 685c211e176..4da07ee6de9 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -1450,9 +1450,6 @@ Ada source code file containing a library unit body (a subprogram or
 package body).  Such files are also called @dfn{bodies}.
 
 @c GCC also knows about some suffixes for languages not yet included:
-@c Pascal:
-@c @var{file}.p
-@c @var{file}.pas
 @c Ratfor:
 @c @var{file}.r
 
diff --git a/gcc/doc/rtl.texi b/gcc/doc/rtl.texi
index 5b1e69527a5..7817ebbc127 100644
--- a/gcc/doc/rtl.texi
+++ b/gcc/doc/rtl.texi
@@ -1395,7 +1395,7 @@ Complex floating point modes.  By default these are @code{QCmode},
 
 @findex MODE_FUNCTION
 @item MODE_FUNCTION
-Algol or Pascal function variables including a static chain.
+Algol function variables including a static chain.
 (These are not currently implemented).
 
 @findex MODE_CC
diff --git a/gcc/tree.def b/gcc/tree.def
index 49bc423c0a8..a6882d9288d 100644
--- a/gcc/tree.def
+++ b/gcc/tree.def
@@ -141,11 +141,7 @@ DEFTREECODE (BOOLEAN_TYPE, "boolean_type", tcc_type, 0)
 /* Integer types in all languages, including char in C.
    Also used for sub-ranges of other discrete types.
    Has components TYPE_MIN_VALUE, TYPE_MAX_VALUE (expressions, inclusive)
-   and TYPE_PRECISION (number of bits used by this type).
-   In the case of a subrange type in Pascal, the TREE_TYPE
-   of this will point at the supertype (another INTEGER_TYPE,
-   or an ENUMERAL_TYPE or BOOLEAN_TYPE).
-   Otherwise, the TREE_TYPE is zero.  */
+   and TYPE_PRECISION (number of bits used by this type).  */
 DEFTREECODE (INTEGER_TYPE, "integer_type", tcc_type, 0)
 
 /* C's float and double.  Different floating types are distinguished
@@ -200,16 +196,15 @@ DEFTREECODE (VECTOR_TYPE, "vector_type", tcc_type, 0)
  and holds the type to coerce a value of that array type to in C.
  TYPE_STRING_FLAG indicates a string (in contrast to an array of chars)
  in languages (such as Chill) that make a distinction.  */
-/* Array types in C or Pascal */
+/* Array types in C */
 DEFTREECODE (ARRAY_TYPE, "array_type", tcc_type, 0)
 
-/* Struct in C, or record in Pascal.  */
+/* Struct in C.  */
 /* Special fields:
    TYPE_FIELDS  chain of FIELD_DECLs for the fields of the struct,
      VAR_DECLs, TYPE_DECLs and CONST_DECLs for record-scope variables,
      types and enumerators and FUNCTION_DECLs for methods associated
-     with the type.
-   A few may need to be added for Pascal.  */
+     with the type.  */
 /* See the comment above, before ENUMERAL_TYPE, for how
    forward references to struct tags are handled in C.  */
 DEFTREECODE (RECORD_TYPE, "record_type", tcc_type, 0)
@@ -460,7 +455,7 @@ DEFTREECODE (IMAGPART_EXPR, "imagpart_expr", tcc_reference, 1)
    generating insns.  */
 DEFTREECODE (VIEW_CONVERT_EXPR, "view_convert_expr", tcc_reference, 1)
 
-/* C unary `*' or Pascal `^'.  One operand, an expression for a pointer.  */
+/* C unary `*'.  One operand, an expression for a pointer.  */
 DEFTREECODE (INDIRECT_REF, "indirect_ref", tcc_reference, 1)
 
 /* Used to represent lookup in a virtual method table which is dependent on
@@ -632,7 +627,7 @@ DEFTREECODE (CLEANUP_POINT_EXPR, "cleanup_point_expr", tcc_expression, 1)
    object of the same type or even for one and the same object within
    its scope.
 
-   Record types with discriminants in Ada or schema types in Pascal are
+   Record types with discriminants in Ada are
    examples of such types.  This mechanism is also used to create "fat
    pointers" for unconstrained array types in Ada; the fat pointer is a
    structure one of whose fields is a pointer to the actual array type


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Remove Pascal-related entries in code and comments.
  2018-09-21 10:12 [PATCH] Remove Pascal-related entries in code and comments Martin Liška
@ 2018-09-21 16:49 ` Joseph Myers
  2018-09-24 11:29   ` Martin Liška
  0 siblings, 1 reply; 4+ messages in thread
From: Joseph Myers @ 2018-09-21 16:49 UTC (permalink / raw)
  To: Martin Liška; +Cc: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 875 bytes --]

On Fri, 21 Sep 2018, Martin Liška wrote:

> Hi.
> 
> This is removal of some Pascal-related comments.

There are two different kinds of comments being removed here.  There are 
comments relating to GNU Pascal, which has long been a dead project, so 
removing those seems reasonable.  But there are also comments / 
documentation references referring to Pascal as a language that has some 
feature, rather than to the GNU Pascal implementation, and it's much less 
clear those should be removed.  And where you change "As in Algol and 
Pascal, lexical scoping of functions.", which is one of the latter kind, 
I'd think Algol is likely to be more obscure than Pascal to readers of the 
manual, so if it changes at all it should probably be to refer to more 
modern examples of languages with nested functions that form closures.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Remove Pascal-related entries in code and comments.
  2018-09-21 16:49 ` Joseph Myers
@ 2018-09-24 11:29   ` Martin Liška
  2018-09-24 18:28     ` Jeff Law
  0 siblings, 1 reply; 4+ messages in thread
From: Martin Liška @ 2018-09-24 11:29 UTC (permalink / raw)
  To: Joseph Myers; +Cc: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 987 bytes --]

On 9/21/18 6:47 PM, Joseph Myers wrote:
> On Fri, 21 Sep 2018, Martin Liška wrote:
> 
>> Hi.
>>
>> This is removal of some Pascal-related comments.
> 
> There are two different kinds of comments being removed here.  There are 
> comments relating to GNU Pascal, which has long been a dead project, so 
> removing those seems reasonable.  But there are also comments / 
> documentation references referring to Pascal as a language that has some 
> feature, rather than to the GNU Pascal implementation, and it's much less 
> clear those should be removed.  And where you change "As in Algol and 
> Pascal, lexical scoping of functions.", which is one of the latter kind, 
> I'd think Algol is likely to be more obscure than Pascal to readers of the 
> manual, so if it changes at all it should probably be to refer to more 
> modern examples of languages with nested functions that form closures.
> 

Hi Joseph.

I agree with that and I address the request in v2 of the patch.

Martin

[-- Attachment #2: 0001-Remove-Pascal-related-entries-in-code-and-comments.patch --]
[-- Type: text/x-patch, Size: 11299 bytes --]

From 24b257c7bf33a5765801b68ce3c451b7c3b1cc12 Mon Sep 17 00:00:00 2001
From: marxin <mliska@suse.cz>
Date: Wed, 19 Sep 2018 13:19:47 +0200
Subject: [PATCH] Remove Pascal-related entries in code and comments.

gcc/ChangeLog:

2018-09-19  Martin Liska  <mliska@suse.cz>

	* config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
	Do not handle "GNU Pascal".
	* config/rs6000/rs6000.c (rs6000_output_function_epilogue):
	Likewise.
	* config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
	from documentation. Likewise.
	* dbxout.c (dbxout_range_type): Likewise.
	* doc/cpp.texi: Likewise.
	* doc/extend.texi: Likewise.
	* doc/frontends.texi: Likewise.
	* doc/invoke.texi: Remove Pascal entry.
	* tree.def (CLEANUP_POINT_EXPR): Likewise.
	* doc/rtl.texi (MODE_FUNCTION): Remove not used entry.

gcc/c-family/ChangeLog:

2018-09-19  Martin Liska  <mliska@suse.cz>

	* c-common.c (c_common_truthvalue_conversion):
	Remove Pascal from documentation.
---
 gcc/c-family/c-common.c            |  2 +-
 gcc/config/powerpcspe/powerpcspe.c |  4 +---
 gcc/config/rs6000/rs6000.c         |  4 +---
 gcc/config/sparc/sparc.c           |  5 ++---
 gcc/dbxout.c                       |  2 +-
 gcc/doc/cpp.texi                   |  2 +-
 gcc/doc/extend.texi                |  2 +-
 gcc/doc/frontends.texi             |  3 +--
 gcc/doc/invoke.texi                |  3 ---
 gcc/doc/rtl.texi                   |  5 -----
 gcc/tree.def                       | 17 ++++++-----------
 11 files changed, 15 insertions(+), 34 deletions(-)

diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c
index 4bfb14585e2..10a8bc29bfa 100644
--- a/gcc/c-family/c-common.c
+++ b/gcc/c-family/c-common.c
@@ -3289,7 +3289,7 @@ c_common_truthvalue_conversion (location_t location, tree expr)
  	tree inner = TREE_OPERAND (expr, 0);
 	if (decl_with_nonnull_addr_p (inner))
 	  {
-	    /* Common Ada/Pascal programmer's mistake.  */
+	    /* Common Ada programmer's mistake.  */
 	    warning_at (location,
 			OPT_Waddress,
 			"the address of %qD will always evaluate as %<true%>",
diff --git a/gcc/config/powerpcspe/powerpcspe.c b/gcc/config/powerpcspe/powerpcspe.c
index dea1eab1188..325b6ad5223 100644
--- a/gcc/config/powerpcspe/powerpcspe.c
+++ b/gcc/config/powerpcspe/powerpcspe.c
@@ -32024,7 +32024,7 @@ rs6000_output_function_epilogue (FILE *file)
       /* Language type.  Unfortunately, there does not seem to be any
 	 official way to discover the language being compiled, so we
 	 use language_string.
-	 C is 0.  Fortran is 1.  Pascal is 2.  Ada is 3.  C++ is 9.
+	 C is 0.  Fortran is 1.  Ada is 3.  C++ is 9.
 	 Java is 13.  Objective-C is 14.  Objective-C++ isn't assigned
 	 a number, so for now use 9.  LTO, Go and JIT aren't assigned numbers
 	 either, so for now use 0.  */
@@ -32036,8 +32036,6 @@ rs6000_output_function_epilogue (FILE *file)
       else if (! strcmp (language_string, "GNU F77")
 	       || lang_GNU_Fortran ())
 	i = 1;
-      else if (! strcmp (language_string, "GNU Pascal"))
-	i = 2;
       else if (! strcmp (language_string, "GNU Ada"))
 	i = 3;
       else if (lang_GNU_CXX ()
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index a36e6140ecb..2aea649aa6b 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -28403,7 +28403,7 @@ rs6000_output_function_epilogue (FILE *file)
       /* Language type.  Unfortunately, there does not seem to be any
 	 official way to discover the language being compiled, so we
 	 use language_string.
-	 C is 0.  Fortran is 1.  Pascal is 2.  Ada is 3.  C++ is 9.
+	 C is 0.  Fortran is 1.  Ada is 3.  C++ is 9.
 	 Java is 13.  Objective-C is 14.  Objective-C++ isn't assigned
 	 a number, so for now use 9.  LTO, Go and JIT aren't assigned numbers
 	 either, so for now use 0.  */
@@ -28415,8 +28415,6 @@ rs6000_output_function_epilogue (FILE *file)
       else if (! strcmp (language_string, "GNU F77")
 	       || lang_GNU_Fortran ())
 	i = 1;
-      else if (! strcmp (language_string, "GNU Pascal"))
-	i = 2;
       else if (! strcmp (language_string, "GNU Ada"))
 	i = 3;
       else if (lang_GNU_CXX ()
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index 2481fbf3b0a..42acabb5d78 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -7516,9 +7516,8 @@ sparc_pass_by_reference (cumulative_args_t cum ATTRIBUTE_UNUSED,
 {
   if (TARGET_ARCH32)
     /* Original SPARC 32-bit ABI says that structures and unions,
-       and quad-precision floats are passed by reference.  For Pascal,
-       also pass arrays by reference.  All other base types are passed
-       in registers.
+       and quad-precision floats are passed by reference.
+       All base types are passed in registers.
 
        Extended ABI (as implemented by the Sun compiler) says that all
        complex floats are passed by reference.  Pass complex integers
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index 459b7c2806f..bf41b17a263 100644
--- a/gcc/dbxout.c
+++ b/gcc/dbxout.c
@@ -1715,7 +1715,7 @@ dbxout_range_type (tree type, tree low, tree high)
   if (TREE_TYPE (type))
     dbxout_type (TREE_TYPE (type), 0);
   else if (TREE_CODE (type) != INTEGER_TYPE)
-    dbxout_type (type, 0); /* E.g. Pascal's ARRAY [BOOLEAN] of INTEGER */
+    dbxout_type (type, 0);
   else
     {
       /* Traditionally, we made sure 'int' was type 1, and builtin types
diff --git a/gcc/doc/cpp.texi b/gcc/doc/cpp.texi
index efad2c8eab5..53455741fd9 100644
--- a/gcc/doc/cpp.texi
+++ b/gcc/doc/cpp.texi
@@ -194,7 +194,7 @@ will be removed, and the Makefile will not work.
 
 Having said that, you can often get away with using cpp on things which
 are not C@.  Other Algol-ish programming languages are often safe
-(Pascal, Ada, etc.) So is assembly, with caution.  @option{-traditional-cpp}
+(Ada, etc.) So is assembly, with caution.  @option{-traditional-cpp}
 mode preserves more white space, and is otherwise more permissive.  Many
 of the problems can be avoided by writing C or C++ style comments
 instead of native language comments, and keeping macros simple.
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 4b606c007d8..09be82a2ddb 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -26,7 +26,7 @@ extensions, accepted by GCC in C90 mode and in C++.
 * Statement Exprs::     Putting statements and declarations inside expressions.
 * Local Labels::        Labels local to a block.
 * Labels as Values::    Getting pointers to labels, and computed gotos.
-* Nested Functions::    As in Algol and Pascal, lexical scoping of functions.
+* Nested Functions::    Nested function in GNU C.
 * Constructing Calls::  Dispatching a call to another function.
 * Typeof::              @code{typeof}: referring to the type of an expression.
 * Conditionals::        Omitting the middle operand of a @samp{?:} expression.
diff --git a/gcc/doc/frontends.texi b/gcc/doc/frontends.texi
index ecf1d51905e..dbb83eed299 100644
--- a/gcc/doc/frontends.texi
+++ b/gcc/doc/frontends.texi
@@ -32,11 +32,10 @@ various processors.
 
 @cindex COBOL
 @cindex Mercury
-@cindex Pascal
 The part of a compiler that is specific to a particular language is
 called the ``front end''.  In addition to the front ends that are
 integrated components of GCC, there are several other front ends that
-are maintained separately.  These support languages such as Pascal,
+are maintained separately.  These support languages such as
 Mercury, and COBOL@.  To use these, they must be built together with
 GCC proper.
 
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 685c211e176..4da07ee6de9 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -1450,9 +1450,6 @@ Ada source code file containing a library unit body (a subprogram or
 package body).  Such files are also called @dfn{bodies}.
 
 @c GCC also knows about some suffixes for languages not yet included:
-@c Pascal:
-@c @var{file}.p
-@c @var{file}.pas
 @c Ratfor:
 @c @var{file}.r
 
diff --git a/gcc/doc/rtl.texi b/gcc/doc/rtl.texi
index 5b1e69527a5..14aa577f182 100644
--- a/gcc/doc/rtl.texi
+++ b/gcc/doc/rtl.texi
@@ -1393,11 +1393,6 @@ Complex floating point modes.  By default these are @code{QCmode},
 @code{HCmode}, @code{SCmode}, @code{DCmode}, @code{XCmode}, and
 @code{TCmode}.
 
-@findex MODE_FUNCTION
-@item MODE_FUNCTION
-Algol or Pascal function variables including a static chain.
-(These are not currently implemented).
-
 @findex MODE_CC
 @item MODE_CC
 Modes representing condition code values.  These are @code{CCmode} plus
diff --git a/gcc/tree.def b/gcc/tree.def
index 49bc423c0a8..a6882d9288d 100644
--- a/gcc/tree.def
+++ b/gcc/tree.def
@@ -141,11 +141,7 @@ DEFTREECODE (BOOLEAN_TYPE, "boolean_type", tcc_type, 0)
 /* Integer types in all languages, including char in C.
    Also used for sub-ranges of other discrete types.
    Has components TYPE_MIN_VALUE, TYPE_MAX_VALUE (expressions, inclusive)
-   and TYPE_PRECISION (number of bits used by this type).
-   In the case of a subrange type in Pascal, the TREE_TYPE
-   of this will point at the supertype (another INTEGER_TYPE,
-   or an ENUMERAL_TYPE or BOOLEAN_TYPE).
-   Otherwise, the TREE_TYPE is zero.  */
+   and TYPE_PRECISION (number of bits used by this type).  */
 DEFTREECODE (INTEGER_TYPE, "integer_type", tcc_type, 0)
 
 /* C's float and double.  Different floating types are distinguished
@@ -200,16 +196,15 @@ DEFTREECODE (VECTOR_TYPE, "vector_type", tcc_type, 0)
  and holds the type to coerce a value of that array type to in C.
  TYPE_STRING_FLAG indicates a string (in contrast to an array of chars)
  in languages (such as Chill) that make a distinction.  */
-/* Array types in C or Pascal */
+/* Array types in C */
 DEFTREECODE (ARRAY_TYPE, "array_type", tcc_type, 0)
 
-/* Struct in C, or record in Pascal.  */
+/* Struct in C.  */
 /* Special fields:
    TYPE_FIELDS  chain of FIELD_DECLs for the fields of the struct,
      VAR_DECLs, TYPE_DECLs and CONST_DECLs for record-scope variables,
      types and enumerators and FUNCTION_DECLs for methods associated
-     with the type.
-   A few may need to be added for Pascal.  */
+     with the type.  */
 /* See the comment above, before ENUMERAL_TYPE, for how
    forward references to struct tags are handled in C.  */
 DEFTREECODE (RECORD_TYPE, "record_type", tcc_type, 0)
@@ -460,7 +455,7 @@ DEFTREECODE (IMAGPART_EXPR, "imagpart_expr", tcc_reference, 1)
    generating insns.  */
 DEFTREECODE (VIEW_CONVERT_EXPR, "view_convert_expr", tcc_reference, 1)
 
-/* C unary `*' or Pascal `^'.  One operand, an expression for a pointer.  */
+/* C unary `*'.  One operand, an expression for a pointer.  */
 DEFTREECODE (INDIRECT_REF, "indirect_ref", tcc_reference, 1)
 
 /* Used to represent lookup in a virtual method table which is dependent on
@@ -632,7 +627,7 @@ DEFTREECODE (CLEANUP_POINT_EXPR, "cleanup_point_expr", tcc_expression, 1)
    object of the same type or even for one and the same object within
    its scope.
 
-   Record types with discriminants in Ada or schema types in Pascal are
+   Record types with discriminants in Ada are
    examples of such types.  This mechanism is also used to create "fat
    pointers" for unconstrained array types in Ada; the fat pointer is a
    structure one of whose fields is a pointer to the actual array type
-- 
2.19.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Remove Pascal-related entries in code and comments.
  2018-09-24 11:29   ` Martin Liška
@ 2018-09-24 18:28     ` Jeff Law
  0 siblings, 0 replies; 4+ messages in thread
From: Jeff Law @ 2018-09-24 18:28 UTC (permalink / raw)
  To: Martin Liška, Joseph Myers; +Cc: gcc-patches

On 9/24/18 5:17 AM, Martin Liška wrote:
> On 9/21/18 6:47 PM, Joseph Myers wrote:
>> On Fri, 21 Sep 2018, Martin Liška wrote:
>>
>>> Hi.
>>>
>>> This is removal of some Pascal-related comments.
>> There are two different kinds of comments being removed here.  There are 
>> comments relating to GNU Pascal, which has long been a dead project, so 
>> removing those seems reasonable.  But there are also comments / 
>> documentation references referring to Pascal as a language that has some 
>> feature, rather than to the GNU Pascal implementation, and it's much less 
>> clear those should be removed.  And where you change "As in Algol and 
>> Pascal, lexical scoping of functions.", which is one of the latter kind, 
>> I'd think Algol is likely to be more obscure than Pascal to readers of the 
>> manual, so if it changes at all it should probably be to refer to more 
>> modern examples of languages with nested functions that form closures.
>>
> Hi Joseph.
> 
> I agree with that and I address the request in v2 of the patch.
> 
> Martin
> 
> 
> 0001-Remove-Pascal-related-entries-in-code-and-comments.patch
> 
> From 24b257c7bf33a5765801b68ce3c451b7c3b1cc12 Mon Sep 17 00:00:00 2001
> From: marxin <mliska@suse.cz>
> Date: Wed, 19 Sep 2018 13:19:47 +0200
> Subject: [PATCH] Remove Pascal-related entries in code and comments.
> 
> gcc/ChangeLog:
> 
> 2018-09-19  Martin Liska  <mliska@suse.cz>
> 
> 	* config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
> 	Do not handle "GNU Pascal".
> 	* config/rs6000/rs6000.c (rs6000_output_function_epilogue):
> 	Likewise.
> 	* config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
> 	from documentation. Likewise.
> 	* dbxout.c (dbxout_range_type): Likewise.
> 	* doc/cpp.texi: Likewise.
> 	* doc/extend.texi: Likewise.
> 	* doc/frontends.texi: Likewise.
> 	* doc/invoke.texi: Remove Pascal entry.
> 	* tree.def (CLEANUP_POINT_EXPR): Likewise.
> 	* doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
> 
> gcc/c-family/ChangeLog:
> 
> 2018-09-19  Martin Liska  <mliska@suse.cz>
> 
> 	* c-common.c (c_common_truthvalue_conversion):
> 	Remove Pascal from documentation.
OK
jeff

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-09-24 18:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-21 10:12 [PATCH] Remove Pascal-related entries in code and comments Martin Liška
2018-09-21 16:49 ` Joseph Myers
2018-09-24 11:29   ` Martin Liška
2018-09-24 18:28     ` Jeff Law

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).