`operator new' takes type `size_t' as first parameter

I'm compiling C++ code with m68k-elf-g++ compiler. I'm getting the following error messages:


include/new:32: `operator new' takes type `size_t' as first parameter
include/new:33: `operator new' takes type `size_t' as first parameter
include/new:36: `operator new' takes type `size_t' as first parameter
include/new:37: `operator new' takes type `size_t' as first parameter
include/new:42: `operator new' takes type `size_t' as first parameter
include/new:43: `operator new' takes type `size_t' as first parameter


The code in include/new looks like this:

#pragma interface "new"
#include <stddef.h>
#include <exception>

extern "C++" {

#if 0
namespace std {
#endif

  class bad_alloc : public exception {
  public:
    virtual const char* what() const throw() { return "bad_alloc"; }
  };

  struct nothrow_t {};
  extern const nothrow_t nothrow;
  typedef void (*new_handler)();
  new_handler set_new_handler (new_handler);

// replaceable signatures
void *operator new (size_t) throw (std::bad_alloc);         (line 32)
void *operator new[] (size_t) throw (std::bad_alloc);
void operator delete (void *) throw();
void operator delete[] (void *) throw();
void *operator new (size_t, const nothrow_t&) throw();
void *operator new[] (size_t, const nothrow_t&) throw();
void operator delete (void *, const nothrow_t&) throw();
void operator delete[] (void *, const nothrow_t&) throw();

// default placement versions of operator new
inline void *operator new(size_t, void *place) throw() { return place; }
(line 42)
inline void *operator new[](size_t, void *place) throw() { return place; }
} // extern "C++"

#endif


Any help will be appreciated.
kimkAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

kimkAuthor Commented:
very urgent!!!
0
jadams117Commented:
What does your code look like?
0
MafaldaCommented:
Well, you can search for the error in google ...

All the information I could find was refering to a compiler problem, thus suggesting using a newer version of the copiler ... in some cases even calling the compiler a poor C++ compiler

See in example
http://www.uclinux.org/pub/uClinux/archive/3866.html
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

kimkAuthor Commented:
1.My code does nothing, the error is from the include/new file.
2.I have seen this topis, but it is from September 2001! Does it mean that I cannot use C++ for uClinux??
0
MafaldaCommented:
Try to obtain the latest version of the compiler you work with.
Usually it solves the problem
0
tinchosCommented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Please Review

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Tinchos
EE Cleanup Volunteer
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C++

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.