Page MenuHomePhabricator

[flang][msvc] Remove default arguments for function specializations.

Authored by Meinersbur on Aug 10 2020, 8:39 AM.



C++ does not allow function template specializations to have default arguments. IIUC callers will only use the default arguments of the primary template. gcc and clang accept the syntax anyway, but msvc emits an error.

See for more details.

This patch is part of the series to make flang compilable with MS Visual Studio.

Diff Detail

Unit TestsFailed

20 mslinux > Flang.Preprocessing::compiler_defined_macros.F90
Script: -- : 'RUN: at line 6'; /mnt/disks/ssd0/agent/llvm-project/build/bin/f18 -intrinsic-module-directory /mnt/disks/ssd0/agent/llvm-project/build/tools/flang/include/flang -E /mnt/disks/ssd0/agent/llvm-project/flang/test/Preprocessing/compiler_defined_macros.F90 | /mnt/disks/ssd0/agent/llvm-project/build/bin/FileCheck --ignore-case /mnt/disks/ssd0/agent/llvm-project/flang/test/Preprocessing/compiler_defined_macros.F90

Event Timeline

Meinersbur created this revision.Aug 10 2020, 8:39 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 10 2020, 8:39 AM
Meinersbur requested review of this revision.Aug 10 2020, 8:39 AM
This revision is now accepted and ready to land.Aug 11 2020, 5:12 AM
This revision was landed with ongoing or failed builds.Aug 12 2020, 2:46 PM
This revision was automatically updated to reflect the committed changes.