0
votes

I'm working on updating a very large codebase to be able to use gcc4.3 and ran into this issue. The question has been asked several times, however I think my situation is a little unique and Haven't been able to get a good explanation out of it.

The error I get is

error: deprecated conversion from string constant to 'realchar {aka char*}'

realchar refers to a typedef I have:

typedef char*   realchar;

public:
ClassNameIsMe(const realchar name="UsyncBndLNQueue");

changing realChar to be simply char* removes the warning. however shouldn't that be equivalent since it is a typedef pointing to char*?

1
Possible duplicate of typedef pointer const weirdnessgavv

1 Answers

4
votes

The problem is that const realchar name is const pointer to char, i.e it is equivalent to:

char * name const

instead of pointer to const char, which would be equivalent to:

const char * name

So the warning is valid.


See details here: