# C: warning/error: passing argument from incompatible pointer type [-Wincompatible-pointer-types]

**Code:** `incompatible pointer type` · **Category:** C/C++ · **Seen on:** C, GCC

A pointer of one type is passed where another pointer type is expected.

## Meaning

GCC 14 turned this warning into an error by default, breaking older C code that compiled before.

## Common causes

- Wrong pointer type (int* vs long*)
- const mismatch
- Callback signature differs
- Upgrading to GCC 14

## Quick fix

1. Cast deliberately or fix the type
2. Fix function signature
3. Use `-Wno-error=incompatible-pointer-types` as a stopgap

## Detailed fix by platform

### GCC 14

1. `CFLAGS+=-Wno-error=incompatible-pointer-types` for legacy code

## How to diagnose

1. **Types** — Which two?
2. **GCC** — Version 14?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/cpp/incompatible-pointer-types)
