totalspectrum / flexprop

Simple GUI for Propeller development (both P1 and P2)
Other
38 stars 15 forks source link

sizeof() doesn't recognize BOOL data type #86

Closed francisbauer closed 9 months ago

francisbauer commented 9 months ago

Currently using sizeof(char) as a temporary workaround.

Simple example:

#include <stdio.h>
#include <stdbool.h>
void main() {
  bool test;
  printf("%d\n",sizeof(bool));
}

Compiler output:

"C:flexprop-6.8.0/bin/flexspin" -2 -l --tabs=8 -D_BAUD=230400 -O1 -g --charset=utf8 -I "C:flexprop-6.6.2/include" "C:test.c" Propeller Spin/PASM Compiler 'FlexSpin' (c) 2011-2023 Total Spectrum Software Inc. and contributors Version 6.8.0 Compiled on: Dec 27 2023 test.c fmt.c basicfmt.c vfs.c posixio.c fmt.c posixio.c bufio.c errno.c bufio.c C:test.c:5: error: Unknown type for sizeof C:test.c:5: error: Unknown type for sizeof C:test.c:5: error: Unknown type for sizeof child process exited abnormally Finished at Fri Feb 2 16:42:22 2024

totalspectrum commented 9 months ago

Thank you for the bug report. This is fixed in the flexspin/spin2cpp compiler now, and will be in flexprop in the next release.