Skip to content

Commit

Permalink
remove unnecessary condition
Browse files Browse the repository at this point in the history
  • Loading branch information
wrongnull committed Sep 30, 2024
1 parent 99f2af5 commit 1e48ed3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/aro/Parser.zig
Original file line number Diff line number Diff line change
Expand Up @@ -5504,8 +5504,7 @@ pub const Result = struct {
// if both aren't arithmetic then either both should be pointers or just a
if (!a_ptr or !(b_ptr or b_int)) return a.invalidBinTy(tok, b, p);

if ((a.ty.isVoidStar() or b.ty.isVoidStar()) and
(p.comp.diagnostics.options.@"gnu-pointer-arith" == .warning or p.comp.diagnostics.options.pedantic == .warning))
if (a.ty.isVoidStar() or b.ty.isVoidStar())
try p.errTok(.gnu_pointer_arith, tok);

if (a_ptr and b_ptr) {
Expand Down

0 comments on commit 1e48ed3

Please sign in to comment.