Skip to content

Conversation

@adamant-pwn
Copy link

When GCC preprocesses with -dD flag and encounters #pragma GCC target(), it emits extra macro definitions for compiler features (AVX2, SSE4_1, etc). This causes a line count mismatch in the bundler's assertion that line counts must be equal between raw source and uncommented code.

Solution: Temporarily comment out #pragma GCC target() before preprocessing, then uncomment in the output. Uses OJ_BUNDLE_PRAGMA marker to distinguish from user-written comments.

Fixes #438

When GCC preprocesses with -dD flag and encounters #pragma GCC target(),
it emits extra macro definitions for compiler features (__AVX2__, __SSE4_1__, etc).
This causes a line count mismatch in the bundler's assertion that line counts
must be equal between raw source and uncommented code.

Solution: Temporarily comment out #pragma GCC target() before preprocessing,
then uncomment in the output. Uses OJ_BUNDLE_PRAGMA marker to distinguish
from user-written comments.

Fixes online-judge-tools#438
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

oj-bundle no longer works with avx2 GCC pragma

1 participant