This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Emit a warning for ineffective set VAR = EXP command


On Thu, May 3, 2012 at 8:05 AM, Joel Brobecker <brobecker@adacore.com> wrote:
>> Ok with one more change.
>>
>> -gdb_test "set language ada" ".*" "set language ada"
>> +gdb_test_no_output "set language ada"
>
> There is going to be some output, because this command is forcing
> a language which does not match the frame.

Ah.

>> [I'm assuming the warning test has the desired affect. ?I don't know ada. :-)]
>
> Correct, it's a `='/`==' vs `:='/'=' confusion. In Ada, the comparison
> operator is "=". The user should have used the assignment operator which
> is ":=". ?The number of times I got bitten by this....

It's trivial to add tests for a few more languages.
Whether it's worth it, I don't know.
It may be worth it if only as an educational vehicle so people who
don't know these other languages get exposed to them for this
particular issue.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]