Commit Graph

18 Commits

Author SHA1 Message Date
Martin Storsjö
8e2346154e libavutil: Hook up the rest of the gcc specific attributes to clang as well
Hook up all attributes that don't have a MSVC specific version at the
moment.

See f637046d31 for details.

These don't seem to be critical for building with clang in MSVC mode
though, and thus haven't been hooked up until now.

These seem to build fine with as old clang as 3.3 at least.
(clang 3.3 disguises itself as gcc 4.2 normally, so all of these
have been used for clang before, except for av_cold.)

The clang version numbers themselves are useless for detecting what
attributes are available, since Apple's clang builds use a completely
different versioning (presenting itself as e.g. clang 8.0 instead
of 3.8).

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-03-22 14:25:45 +02:00
Martin Storsjö
3aa9c523e9 libavutil: Define the noreturn attribute for clang in MSVC mode as well
This is a follow-up to f637046d31.

Without the noreturn attribute set, avconv_opt.c fails to build after
d2e6dd32a4 with the error "control may reach end of non-void function".
By making sure the noreturn attribute is set properly, this compiles
as intended.

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-03-21 22:57:21 +01:00
Martin Storsjö
f637046d31 libavutil: Always use some GCC style attributes on clang
Clang normally disguises as GCC (defining __GNUC__), and thus get
all the normal GCC specific attributes.

Clang can also work as a drop-in replacement for MSVC, and in these
cases, it doesn't define __GNUC__, but defines _MSC_VER instead.

Even in these setups, it still supports the GCC style attributes,
thus use them, especially where there isn't any MSVC specific
version, or where the MSVC specific version doesn't work on clang
(for DECLARE_ASM_CONST).

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-07-21 12:52:19 +03:00
Vittorio Giovara
5858a67f13 attributes: disable flatten on llvm/clang 2013-11-03 11:51:40 +01:00
Alex Smith
33b88f2a4a msvc/icl: Use __declspec(noinline)
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-20 14:40:06 +03:00
Alex Smith
09f2581dc5 msvc/icl: Use __declspec(deprecated)
Prior to this on msvc/icl there was no handling of deprecated functions
and the deprecated warning was disabled.

After enabling there are a number of warnings relating to the CRT and
the use of the non-secure versions of several functions.  Defining
_CRT_SECURE_NO_WARNINGS silences these warnings.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-20 14:40:06 +03:00
Reinhard Tartler
22662ca560 attributes: add av_noreturn
Also use it in the declaration of the various exit_program
implementations in avtools.

inspired by a clang-scan report.
2012-07-03 17:26:51 +02:00
Reinhard Tartler
a1641e9540 attributes: drop pointless define guards
the av_-prefixed attributes must not be defined outside of this file
2012-07-03 17:26:51 +02:00
Ronald S. Bultje
4f2c846d96 attributes: Add a definition of av_always_inline for MSVC
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-30 16:03:45 +03:00
Martin Storsjö
67e9ae14d9 Add av_printf_format, for marking printf style format strings and their parameters
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-06-23 20:17:44 +03:00
Mans Rullgard
820818a330 Remove unnecessary icc version checks
With unknown attribute warnings disabled, these checks are no
longer needed.  Removing them improves readability while having
no effect on generated code.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-23 12:39:58 +00:00
Mans Rullgard
2912e87a6c Replace FFmpeg with Libav in licence headers
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 13:33:20 +00:00
Mans Rullgard
365e3c7878 Rename attribute_used to av_used and move it to attributes.h
This is consistent with most of the other attribute macros.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-31 16:01:26 +00:00
Carl Eugen Hoyos
086e997e34 Intel C compiler 12.0 does not suport these attributes: may_alias, force_align_arg_pointer and alloc_size.
Originally committed as revision 25716 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-10 12:45:41 +00:00
Michael Niedermayer
a74d707cb7 av_alias is an attribute and belongs to attributes.h
also attributes.h is public and external api and can thus not depend
on configure tested compiler support thus this part is removed. A
different solution must be found if this breaks for some compiler
which i hope it does not.

Originally committed as revision 23115 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-13 16:30:58 +00:00
Diego Biurrun
ba87f0801d Remove explicit filename from Doxygen @file commands.
Passing an explicit filename to this command is only necessary if the
documentation in the @file block refers to a file different from the
one the block resides in.

Originally committed as revision 22921 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-20 14:45:34 +00:00
Michael Niedermayer
4ed39eedca av_builtin_constant_p()
Originally committed as revision 22770 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-02 01:03:27 +00:00
Måns Rullgård
2791730dbf Move gcc attribute macros to new header libavutil/attributes.h
Originally committed as revision 22346 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-08 21:28:56 +00:00