C compile problem

Charles-Antoine Gauthier charles.gauthier at nrc.ca
Fri Apr 7 14:47:07 UTC 2000


'or' is a reserved keyword in C++. Patches for this problem have already
been submitted as part of work to fuse the MBX860 and MBX821 BSPs and
PPC860 and PPC821 processors. Because of the substantial reorganization,
it was decided that the change would go in after RTEMS 4.5.0 was
released. For now, in
rtems/c/src/lib/libcpu/powerpc/mpc860/include/mpc860.h, just do this:

/*
 * Memory controller registers
 */
typedef struct m860MEMCRegisters_ {
  rtems_unsigned32        _br;
  rtems_unsigned32        _or;
} m860MEMCRegisters_t;


I quickly scaned of the eth_comm BSP files. It seems that the fields are
not used, so the above change may be the only one that is required. If
you are not using the eth_comm BSP, or if I missed finding the usage of
the fields, you will have to make the corresponding change in the source
files.

Patrick.VARNEY at syntegra.bt.co.uk wrote:
> 
> When I try to compile a C++ file that includes mpc860.h which includes a
> structure which defines a field called 'or', the RTEMS GNU C++ compiler
> fails reporting 'empty component declaration'. However, the RTEMS GNU C
> compiler doesn't fail. Is there a way round this, other than turning the
> file into a C file ?
> 
> Patrick Varney
> Tel. 01932 773576
> Mob. 0771 8046 750
> email patrick.varney at syntegra.bt.co.uk

-- 
Charles-Antoine Gauthier
Institute for Information Technology   Institut de technologie de
l'information
National Research Council of Canada    Conseil national de recherches du
Canada



More information about the users mailing list