Hi everyone,

I started studying GCC and the new COBOL part when I noticed something that
looked like a typing error. I thought it would make a good first issue to
report, so here is my patch.

Here is the patch
From 4f7fd1e08151df26b37a5a1f2cbce2623f214361 Mon Sep 17 00:00:00 2001
From: pulk66-s <hugo.marra...@epitech.eu>
Date: Sun, 18 May 2025 16:19:04 +0200
Subject: [PATCH] cobol: fix minor grammar in comments

---
 gcc/cobol/lexio.cc | 2 +-
 gcc/cobol/parse.y  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/gcc/cobol/lexio.cc b/gcc/cobol/lexio.cc
index 2db1af273e9..4f68bf65887 100644
--- a/gcc/cobol/lexio.cc
+++ b/gcc/cobol/lexio.cc
@@ -1455,7 +1455,7 @@ cdftext::lex_open( const char filename[] ) {
 
   int output = open_output();
 
-  // Process any files supplied by the -include comamnd-line option.
+  // Process any files supplied by the -include command-line option.
   for( auto name : included_files ) {
     int input;
     if( -1 == (input = open(name, O_RDONLY)) ) {
diff --git a/gcc/cobol/parse.y b/gcc/cobol/parse.y
index cb96c907361..1df9a9a63e9 100644
--- a/gcc/cobol/parse.y
+++ b/gcc/cobol/parse.y
@@ -5038,7 +5038,7 @@ accept:         accept_body end_accept {
 		  switch( $accept_body.func ) {
 		  case accept_done_e:
 		    error_msg(@ec, "ON EXCEPTION valid only "
-			    "with ENVIRONMENT or COMAMND-LINE(n)");
+			    "with ENVIRONMENT or COMMAND-LINE(n)");
 		    break;
 		  case accept_command_line_e:
 		    if( $1.from->field == NULL ) { // take next command-line arg
@@ -5050,7 +5050,7 @@ accept:         accept_body end_accept {
 		      parser_move(*$1.into, *$1.from);
 		      if( $ec.on_error || $ec.not_error ) {
 			error_msg(@ec, "ON EXCEPTION valid only "
-				"with ENVIRONMENT or COMAMND-LINE(n)");
+				"with ENVIRONMENT or COMMAND-LINE(n)");
 		      }
 		    } else {
 		      parser_accept_command_line(*$1.into, *$1.from,
-- 
2.45.2

Reply via email to