!UNVBThoJtlIiVwiDjU:nixos.org

Staging

361 Members
Staging merges | Find currently open staging-next PRs: https://github.com/NixOS/nixpkgs/pulls?q=is%3Apr+sort%3Aupdated-desc+head%3Astaging-next+head%3Astaging-next-21.05+is%3Aopen116 Servers

Load older messages


SenderMessageTime
15 Mar 2026
@dramforever:matrix.orgdramforeverif i worked faster i could have made that pr #50000006:24:50
@vcunat:matrix.orgVladimír ČunátI honestly don't get why length of char array should affect alignment. (though I only have significant experience with pure C)06:28:19
@dramforever:matrix.orgdramforeveri think it's less alignment and more padding up the size of the struct?06:28:41
@vcunat:matrix.orgVladimír ČunátYes, that's what I mean.06:28:55
@dramforever:matrix.orgdramforeverwhich, to be clear, is a weird thing to do for a struct with flexible array struct06:29:02
@vcunat:matrix.orgVladimír ČunátIt's a char array, and chars have alignment of 1 only.06:29:11
@dramforever:matrix.orgdramforever but if you just change it to name[] it trips a static assert somewhere else 06:29:19
@vcunat:matrix.orgVladimír Čunát You'd do uint64_t name[1]; to get an aligned piece. 06:30:32
@vcunat:matrix.orgVladimír Čunát(but that has aliasing issues)06:30:52
@vcunat:matrix.orgVladimír Čunát* (but that has aliasing issues in some usage patterns)06:31:10
@dramforever:matrix.orgdramforever uint64_t nothing[0]; char name[]? 06:31:18
@vcunat:matrix.orgVladimír Čunát* (but that has type-aliasing issues in some usage patterns)06:31:20
@dramforever:matrix.orgdramforeveror is that not allowed06:31:26
@emilazy:matrix.orgemily given the UNSAFE_TODO I'm guessing this is some neglected corner of the browser 06:31:33
@emilazy:matrix.orgemily [0] is precisely GNU extension right 06:31:42
@vcunat:matrix.orgVladimír ČunátNot in standard C06:31:43
@dramforever:matrix.orgdramforeverdang06:31:49
@emilazy:matrix.orgemily isn't there an __attribute__((align(…))) or something. maybe something like that got standardized 06:32:10
@vcunat:matrix.orgVladimír ČunátYes.06:32:24
@dramforever:matrix.orgdramforeveroh, lol yeah06:32:32
@dramforever:matrix.orgdramforeverhttps://en.cppreference.com/w/c/language/alignas.html06:32:43
@dramforever:matrix.orgdramforeveralthough still06:32:55
@dramforever:matrix.orgdramforeveri'm not sure if that's what they even wanted06:33:04
@dramforever:matrix.orgdramforever i'm [13677/56297] into building chromium-unwrapped and my laptop hasn't exploded yet 06:33:32
@dramforever:matrix.orgdramforeveri think that's a good sign that i will be able to test this after all06:35:19
@vcunat:matrix.orgVladimír ČunátIn standard C this certainly works to ensure what they apparently wanted.06:36:16
@vcunat:matrix.orgVladimír Čunát(I do use it.)06:36:22
@vcunat:matrix.orgVladimír ČunátC++ does have it as well, so probable there as well.06:36:42
@dramforever:matrix.orgdramforever this definitely aligns 06:36:44
@dramforever:matrix.orgdramforever but the old code obviously also just didn't align 06:36:52

Show newer messages


Back to Room ListRoom Version: 6