Skip to main content
sami
Associate III
April 18, 2013
Question

keil problem Error #136

  • April 18, 2013
  • 6 replies
  • 1059 views
Posted on April 18, 2013 at 18:41

Hello

I have a struct in my code ;

typedef struct

{

unsigned char  volume;

unsigned char  l_bat;

unsigned char  h_bat;

unsigned char  rtc;

unsigned char  pace;

unsigned char  child;

 unsigned char date;

unsigned char  day; 

unsigned char  month; 

unsigned char  year;

unsigned char  hour;

unsigned char  min; 

unsigned char  motion;  

signed char    gmt;

unsigned int delay[10];

unsigned int shock[3];

char language[3];

}settings;

but the comp?ler give an error for one member

..\src\main.c(452): error:  &sharp136: struct ''<unnamed>'' has no field ''date''..

I can use the other members but not date!!!

what is wrong here ... ?

Thank you

#unproven-fix
    This topic has been closed for replies.

    6 replies

    Tesla DeLorean
    Guru
    April 18, 2013
    Posted on April 18, 2013 at 19:26

    what is wrong here ... ?

    Something else. You probably have something else defined as date, perhaps another typedef.

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    sami
    samiAuthor
    Associate III
    April 18, 2013
    Posted on April 18, 2013 at 20:56

    Infact no .. there is no otherdate ,  even though when i change  the member date to other words..still give the same error.. that is really crazy...

    Thank you

    sami
    samiAuthor
    Associate III
    April 18, 2013
    Posted on April 18, 2013 at 22:22

    Upgrading to 4.70 solved the problem ..strange
    Andrew Neil
    Super User
    April 19, 2013
    Posted on April 19, 2013 at 08:15

    Trouble is, if you don't know what was causing the problem originally, and you don't know why it's now gone away - how can you be sure that it's really fixed?

    You may still have a latent bug which just happens not to manifest - yet...

    A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
    sami
    samiAuthor
    Associate III
    April 19, 2013
    Posted on April 19, 2013 at 11:37

    It is was strange error .. that I have never seen it .

    The compiler can accept all stuck member but not date .. even if i change date to any other word .. it seems it was related to stuck size .. not sure .. after upgrading it is ok .. Even keil guys could not make better reply more than suggest to upgrade ..

    However , now after upgrading non of my 3ulink2 work! even after upgrading them ! strange ..

    Thanks

    frankmeyer9
    Associate III
    April 19, 2013
    Posted on April 19, 2013 at 11:49

    Have you tried to make your struct non-anonymous ?

    Just in case the compiler has some problems with that.