JorgeF 0 Report post Posted March 22, 2012 (edited) Hi I'm not exactly sure if it is a bug or a feature but the BoostC compiler report an "unexpected '.' operator" when its used to access a bit in the same expression with the '.' operator for accesing a struct or union field. Sample: . . // Type definition typedef union { BYTE Buffer[i2C_EXEC_BUFLEN]; struct { BYTE State; BYTE Adc_Res; BYTE Seconds; BYTE Comm_Status; BYTE Exec_04; BYTE Exec_05; // False interrupt INTCON BYTE Exec_06; // False interrupt PIR1 BYTE Version; } Fields; } EXEC_DATA; . . . // Variable declaration EXEC_DATA Executive_Data; . . . // Statement Executive_Data.Fields.Comm_Status.0 = portc.7; // ********* ERROR ******** // ************** COMPILER MESSAGE ********************* "C:\Program Files\SourceBoost\boostc_pic16.exe" -t PIC16F886 -idx 1 -obj Debug -d _DEBUG Adc.c PKSD_JF.c Interrupt.c Globals.c Rtcc.c I2C.c Executive.c Pksi.c BoostC Optimizing C Compiler Version 7.05 (for PIC16 architecture) [url="http://www.sourceboost.com"]http://www.sourceboost.com[/url] Copyright© 2004-2011 Pavel Baranov Copyright© 2004-2011 David Hobday Licensed to António Ferreira under Single user Pro License for 2 node(s) Limitations: PIC12,PIC16 max code size:Unlimited, max RAM banks:Unlimited Adc.c PKSD_JF.c <C:\Program Files\SourceBoost\include\icd3.h> @ 20: MESSAGE: "Including ICD3 declarations (icd3.h)" <C:\Program Files\SourceBoost\include\icd3.h> @ 1230: MESSAGE: "Warning: ICD3 Reserved ROM address range:0x1F00-0x1FFF (use linker -rt option)" Interrupt.c Globals.c Rtcc.c I2C.c Executive.c Pksi.c failure Pksi.c(16:35): error: unexpected '.' operator after 'Comm_Status' Pksi.c(16:2): error: failed to generate expression Pksi.c(16:2): error: invalid operand 'Executive_Data.Fields.Comm_Status.0' Pksi.c(16:38): error: failed to generate expression Failed to locate output file 'Debug\Pksi.obj' Done Failed Best regards Jorge Edited March 24, 2012 by JorgeF Quote Share this post Link to post Share on other sites