Hi Segher!
On 11/7/19 8:47 AM, Segher Boessenkool wrote:
Hi!
On Wed, Nov 06, 2019 at 06:21:33PM +0100, Egeyar Bagcioglu wrote:
gcc/testsuite/ChangeLog:
2019-11-06 Egeyar Bagcioglu <egeyar.bagcio...@oracle.com>
* lib/target-supports-dg.exp: Define dg-require-target-object-format.
* lib/target-supports-dg.exp (dg-require-target-object-format): New.
Right, thanks for the correction!
+proc dg-require-target-object-format { args } {
+ if { [gcc_target_object_format] == [lindex $args 1] } {
+ return
+ }
"==" for strings is dangerous. Use "eq" or "string equal"?
I see many "string match"es. I will make the change.
Just as a note, though: Why is it dangerous? In C, for example, this
would be a pointer comparison and consistently fail. In many other
languages, it is indeed a string comparison and works well.
I am asking also because I see "==" for variable vs literal strings in
gcc/testsuite/lib. As opposed to C-like languages that consistently fail
them, these seem to work. If you still think this is dangerous, I'd love
to know why. Also, if so, someone might want to check the library.
Thanks for the review!
Egeyar