Skip to content

Instantly share code, notes, and snippets.

View SourLemonJuice's full-sized avatar

酸柠檬猹 SourLemonJuice

View GitHub Profile
@SourLemonJuice
SourLemonJuice / .clang-format
Last active October 31, 2024 08:34
A clang-format config file(.clang-format) for SourLemonJuice(myself).
---
BasedOnStyle: Microsoft
IndentWidth: 4
UseTab: Never
LineEnding: DeriveLF
MaxEmptyLinesToKeep: 1
BreakBeforeBraces: Linux
AllowShortBlocksOnASingleLine: Never
AllowShortIfStatementsOnASingleLine: Never
IndentCaseLabels: false
@SourLemonJuice
SourLemonJuice / undefined-jock.c
Last active June 9, 2024 19:17
What is the result of (++i)+(++i)? Is Undifined.
// side note: https://www.bilibili.com/video/BV1ZL411n7Yd
// in clang you will get:
// warning: multiple unsequenced modifications to 'i'
#include <stdio.h>
int main(void)
{
int i,b;
i = 1;
b = (++i)+(++i);