I wrote:
> I started working on stuff in the PCB source, and found that it uses a
> typedef called 'Boolean' rather than the c99 bool type. Please find
> three patches that transition PCB over to using the c99 bool ...
Ineiev wrote:
> What are the advantages? is current implementation broken for some
> platform, modern or future?
Advantages:
* Compiler is able to perform optimisations specific to the bool
type.
* Additional type safety.
* Code becomes less obfuscated (in my mind it's similar to
typedef'ing an int to be Int) and so more approachable by new
hackers.
* Crucially for me, any code in PCB used outside PCB's source
doesn't have to have this additional "Boolean" type cluttering
the place up.
I wrote:
> The PCB build scripts tell the compiler to use the 'gnu99' standard
> (C99 with GNU extensions)
Ineiev wrote:
> I believe it does not in general case, and current sources do build
> with c89 compilers as far as I know.
On closer inspection, the build scripts in PCB don't specifically
require C99. I was looking at the arguments it was feeding to the
compiler. What I said earlier in this thread about adding
AC_HEADER_STDBOOL still applies.
(Also note that C99 introduced the ubiquitous '//' inline comment into
the C standard.)
Cheers,
Rob
Attachment:
signature.asc
Description: This is a digitally signed message part
_______________________________________________ geda-user mailing list geda-user@xxxxxxxxxxxxxx http://www.seul.org/cgi-bin/mailman/listinfo/geda-user