This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] microMIPS support
On Thu, 26 Apr 2012 23:52:22 +0200, Maciej W. Rozycki wrote:
> But are you absolutely sure that it was a supported construct with C89 or
> are you only assuming having no counter-evidence?
(a) C89 == C90: http://en.wikipedia.org/wiki/C89_%28C_version%29#C89
(b) The suggested 'const' construct is compliant with 'gcc -std=c89 -pedantic'.
This does not prove it is really C89 compliant but:
(c) GDB codebase is already not C90 compliant, at least not
with 'gcc -std=c89 -pedantic', as discussed in the thread
Re: [no-commit-intention] Naive unnamed fields for main_type
http://sourceware.org/ml/gdb-patches/2012-02/msg00146.html
I checked according to C90 const array means const elements of the array.
And 'const type *var;' does not make 'var' const - my conclusion is qualifier
'const' is therefore independent for 'var' and the target type.
> At the time I learnt C (some 18 years ago) that certainly wasn't a
> construct I had seen in any language reference
I do not see any problem using const for an array, what specifically do you
see wrong here?
> AFAIK we still require our code to conform to C89 (fortunately not K&R
> anymore) or we could use lots of good stuff,
I agree. I find const arrays compliant with C89.
Thanks,
Jan