~mcf

https://github.com/michaelforney/

Trackers

~mcf/cc-issues

Last active 7 days ago

~mcf/qbe

Last active 3 months ago

~mcf/oasis

Last active 3 months ago

~mcf/sbase

Last active 4 months ago

~mcf/samurai

Last active 7 months ago

#66 Handle #line directives 7 days ago

Ticket created by ~mcf on ~mcf/cc-issues

Until we have our own preprocessor (and even afterward for output of tools like yacc), it would be really nice to handle #line directives to write the location of errors in the source file, not the preprocessed source.

#50 Ignore parameter qualifiers when checking compatible function types? 8 days ago

Comment by ~mcf on ~mcf/cc-issues

Looks like I missed one important point at the end of 6.7.6.3p15:

In the determination of type compatibility and of a composite type, each parameter declared with function or array type is taken as having the adjusted type and each parameter declared with qualified type is taken as having the unqualified version of its declared type.

So I just relaxed the check in 3f8a5efa.

REPORTED RESOLVED FIXED

#5 Link to external dependencies (POSIX, Linux, BSD man, etc) 8 days ago

Comment by ~mcf on ~sircmpwn/annotate

For -E posix, https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/idx/functions.html could be used to generate the symbol mapping.

#9 GNU alternate keywords 9 days ago

Comment by ~mcf on ~sircmpwn/annotate

Whoops, I see you are already handling some of these, not sure how I missed that.

Comparing the existing ones, and the ones I found I needed to handle, the differences are

  • __asm
  • __inline__
  • __signed
  • __thread

I've also seen __attribute in one package. Not sure how commonly used that one is.

#10 Consider undefining __GNUC__ 9 days ago

lang-c added by ~mcf on ~sircmpwn/annotate

#10 Consider undefining __GNUC__ 9 days ago

Ticket created by ~mcf on ~sircmpwn/annotate

You might be able to avoid many syntax errors in code in the wild if you pass -U __GNUC__ -U __GNUC_MINOR__ to the preprocessor by default. It is very common for projects to use GNU C extensions guarded by #ifdef __GNUC__, and it probably shouldn't affect the generated references too much.

#9 GNU alternate keywords 9 days ago

lang-c added by ~mcf on ~sircmpwn/annotate

#9 GNU alternate keywords 9 days ago

Ticket created by ~mcf on ~sircmpwn/annotate

I think some of the errors you're seeing (i.e. in #6) might be due to use of GNU alternate keywords.

https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Alternate-Keywords.html#Alternate-Keywords

Here's what I'm currently accepting in my compiler, which has been sufficient for most projects I've tried to build: https://git.sr.ht/~mcf/cproc/tree/master/pp.c#L29-40

I'm not sure if there is a complete list somewhere of the keywords gcc accepts, or if you have to dig in the source, but the list above might be a good starting point.

#4 Choose a name 10 days ago

Comment by ~mcf on ~mcf/cc-issues

I chose cproc since I needed to choose something.

Thanks to everyone who offered suggestions!

REPORTED RESOLVED FIXED

#10 Build oasis core 15 days ago

Comment by ~mcf on ~mcf/cc-issues

Sent a whole bunch of patches to various packages, but this is now done.

Still need to sort out long double and volatile, but the workarounds are fine for now.

REPORTED RESOLVED FIXED