public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH][Ada] Fix syntax errors in expect.c
@ 2023-08-19  8:01 Andris Pavēnis
  2023-09-01 13:41 ` Arnaud Charlet
  2023-11-10 16:10 ` Marc Poulhiès
  0 siblings, 2 replies; 3+ messages in thread
From: Andris Pavēnis @ 2023-08-19  8:01 UTC (permalink / raw)
  To: GCC Patches

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

Noticed trivial syntax errors in gcc/ada/expect.c when tried to compile gcc 13.2 as cross-compiler 
for target i686-pc-msdosdjgpp.

Errors were there since

Tiedostossa, joka sisällytettiin kohdasta expect.c:54:
expect.c:Funktio ”__gnat_waitpid”:
expect.c:353:13:virhe: expected ”(” before numeric constant
  353 |   } else if WIFSTOPPED(status) {
      | ^~~~~~~~~~
expect.c:358:1:varoitus: ei-void-tyyppisen funktion loppu saavutettu [-Wreturn-type]
  358 | }
      | ^
make[5]: *** [../gcc-interface/Makefile:297: expect.o] Error 1

Errors were there since commit 9e6274e0a3b60e77a42784c3fb6ef2aa3cfc071a(Wed Dec 15 19:26:50 2021 
+0600)

Fixing these errors (attached patch for master branch) was not sufficient for building Ada 
cross-compiler, but it fixed compiler errors.

This would perhaps qualify for trivial change, but it seems that I no more have write access (I got 
it in 2015, but have not used it for a long time. Perhaps I do not really need it)


Andris





[-- Attachment #2: expect.c.patch --]
[-- Type: text/x-patch, Size: 749 bytes --]

commit 64c48aa99656e06d5728bf5837da3bbc50ae4cc5
Author: Andris Pavēnis <andris.pavenis@fmi.fi>
Date:   Sat Aug 19 10:40:22 2023 +0300

    Fix syntax error
    
    gcc/ada/expect.c(__gnat_waitpid):
            fix syntax errors

diff --git a/gcc/ada/expect.c b/gcc/ada/expect.c
index e6899632bc9..7333c11d954 100644
--- a/gcc/ada/expect.c
+++ b/gcc/ada/expect.c
@@ -346,11 +346,11 @@ __gnat_waitpid (int pid)
      return -1;
   }
 
-  if WIFEXITED (status) {
+  if (WIFEXITED (status)) {
      status = WEXITSTATUS (status);
-  } else if WIFSIGNALED (status) {
+  } else if (WIFSIGNALED (status)) {
      status = WTERMSIG (status);
-  } else if WIFSTOPPED (status) {
+  } else if (WIFSTOPPED (status)) {
      status = WSTOPSIG (status);
   }
 

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

* Re: [PATCH][Ada] Fix syntax errors in expect.c
  2023-08-19  8:01 [PATCH][Ada] Fix syntax errors in expect.c Andris Pavēnis
@ 2023-09-01 13:41 ` Arnaud Charlet
  2023-11-10 16:10 ` Marc Poulhiès
  1 sibling, 0 replies; 3+ messages in thread
From: Arnaud Charlet @ 2023-09-01 13:41 UTC (permalink / raw)
  To: Andris Pav??nis; +Cc: GCC Patches

Change is OK, thanks!

> Noticed trivial syntax errors in gcc/ada/expect.c when tried to compile gcc
> 13.2 as cross-compiler for target i686-pc-msdosdjgpp.
> 
> Errors were there since
> 
> Tiedostossa, joka sisällytettiin kohdasta expect.c:54:
> expect.c:Funktio ”__gnat_waitpid”:
> expect.c:353:13:virhe: expected ”(” before numeric constant
>  353 |   } else if WIFSTOPPED(status) {
>      | ^~~~~~~~~~
> expect.c:358:1:varoitus: ei-void-tyyppisen funktion loppu saavutettu [-Wreturn-type]
>  358 | }
>      | ^
> make[5]: *** [../gcc-interface/Makefile:297: expect.o] Error 1
> 
> Errors were there since commit 9e6274e0a3b60e77a42784c3fb6ef2aa3cfc071a(Wed
> Dec 15 19:26:50 2021 +0600)
> 
> Fixing these errors (attached patch for master branch) was not sufficient
> for building Ada cross-compiler, but it fixed compiler errors.
> 
> This would perhaps qualify for trivial change, but it seems that I no more
> have write access (I got it in 2015, but have not used it for a long time.
> Perhaps I do not really need it)
> 
> Andris
> 
> commit 64c48aa99656e06d5728bf5837da3bbc50ae4cc5
> Author: Andris Pavēnis <andris.pavenis@fmi.fi>
> Date:   Sat Aug 19 10:40:22 2023 +0300
> 
>     Fix syntax error
>     
>     gcc/ada/expect.c(__gnat_waitpid):
>             fix syntax errors

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

* Re: [PATCH][Ada] Fix syntax errors in expect.c
  2023-08-19  8:01 [PATCH][Ada] Fix syntax errors in expect.c Andris Pavēnis
  2023-09-01 13:41 ` Arnaud Charlet
@ 2023-11-10 16:10 ` Marc Poulhiès
  1 sibling, 0 replies; 3+ messages in thread
From: Marc Poulhiès @ 2023-11-10 16:10 UTC (permalink / raw)
  To: Andris Pavēnis; +Cc: gcc-patches


Andris Pavēnis <andris.pavenis@iki.fi> writes:

> Fixing these errors (attached patch for master branch) was not sufficient for
> building Ada cross-compiler, but it fixed compiler errors.
>
> This would perhaps qualify for trivial change, but it seems that I no more have
> write access (I got it in 2015, but have not used it for a long time. Perhaps I
> do not really need it)

Hello,

I've merged you patch as r14-5332.

Thanks!
Marc

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

end of thread, other threads:[~2023-11-10 16:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-19  8:01 [PATCH][Ada] Fix syntax errors in expect.c Andris Pavēnis
2023-09-01 13:41 ` Arnaud Charlet
2023-11-10 16:10 ` Marc Poulhiès

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