Skip to content

Instantly share code, notes, and snippets.

@whitty
whitty / Makefile
Created March 14, 2021 02:14
Reproduces `warning: jobserver unavailable: using -j1. Add '+' to parent make rule.`
.PHONY: all clean bear
all:
touch done
clean:
rm -f done
bear:
$(MAKE) clean
bear $(MAKE) all
@whitty
whitty / test.c
Created March 11, 2020 08:11
Gives error: test.c:10:0: error: failed to expand 'LOGTRACE', it is invalid to use a preprocessor directive as macro parameter [preprocessorErrorDirective]
#include <stdio.h>
#define LOGTRACE(...) fprintf(stderr, __VA_ARGS__);
int main(void)
{
#ifdef ALT_FORMAT
LOGTRACE("abc %u def %u ghi %u\n",
#else
LOGTRACE("abcdefghi %u, %u, %u\n",
#endif