Skip to content

apple clang failed tautological-compare #2

Description

@nega0

This is fixed on trunk.

// Predicate for tm equality
static bool tmEq(struct tm const& t1, struct tm const& t2) {
return t1.tm_sec == t2.tm_sec && t1.tm_min == t2.tm_min &&
t1.tm_hour == t2.tm_hour && t1.tm_mday == t1.tm_mday &&
t1.tm_mon == t2.tm_mon && t1.tm_year == t2.tm_year;
}

Apple clang missed the self-compare of t1.tm_mday, here. Need to do one or more of:

  • confirm llvm/clang catches it
  • reformat so apple/clang and/or llvm/clang catches it
  • make a local test case (really?)
  • make a test case to send upstream

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

compilertag for compiler differences or issues

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions