[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gnupg-devel
Subject:    Re: C99 compatibility fixes for gnupg 1
From:       Jakub Wilk <jwilk () jwilk ! net>
Date:       2023-01-30 16:45:52
Message-ID: 20230130164552.zwf5mdurxumgjvs5 () jwilk ! net
[Download RAW message or body]

* Florian Weimer, 2023-01-30 17:18:
>* Werner Koch:
>
>>I applied the patch.  However, changing main to void without having a 
>>return statement is also prone to errors or warnings, right?
>
>I think reaching the } of main has always been specified to return 0

Only since C99. It wasn't like that in C89:

"Reaching the } that terminates a function is equivalent to executing a 
return statement without an expression."

"If the main function executes a return that specifies no value, the 
termination status returned to the host environment is undefined."

-- 
Jakub Wilk

_______________________________________________
Gnupg-devel mailing list
Gnupg-devel@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic